CR的代码文本

all for learning about the world
  订阅 订阅  :: 管理

3D场景响应mouseDown的怪状[未解]

Posted on 2011-11-04 18:00  mumuliang  阅读(226)  评论(0编辑  收藏  举报
director,lingo中. 

mousedown的repeat中貌似每次都需要有足够的等待时间,否则会很难响应。

下面repeat中的首句put删除以后,3d场景的响应效率反而会非常低下。

 疑问! 

on mouseDown me
  p_lastdownH = the mouseH
  p_angle = 0
  repeat while the mousedown 
    put the mouseh
    _angle =  (the mouseH - p_lastdownH).float * 0.1
    pScene.model("My Cube").rotate(0,0,_angle)
    updateStage
    p_lastdownH = the mouseH
    p_angle = p_angle + _angle
  end repeat
end

 

解释:

尚无