 
   render: =>
     if @dirty == true
-      console.log "Draw!"
+      #console.log "Draw!"
       # Clear Screen
       @gl.clear(@gl.COLOR_BUFFER_BIT | @gl.DEPTH_BUFFER_BIT)
       # Draw everything

      width: @opts.width?() || @$glCanvas.parent().innerWidth()
      height: @opts.height?() || @$glCanvas.parent().innerHeight()
    @$glCanvas.attr @size
    #@$glCanvas.attr height: @size.height
    console.log @size
    @gl.viewport(0, 0, @size.width, @size.height)
    @camera.aspect = @size.width / @size.height
    @camera.update()


  _onO3DLoad: (opts, p3d, o3d) =>
    #console.log p3d
    window.a = p3d.blob if p3d?
    @_alignModel o3d, opts.alignment if opts.alignment?
    opts.init(o3d) if opts.init?
    #o3d.drawType = @gl.LINES
    o3d.update()
    if o3d == @model
      @position.y = -(@model.dimensions?[2] * @model.scale[2]||0)/2
    @scene.add o3d
    @update()
    @requestRender()
