【问题标题】:How to set a center rotation position using the cgscenegraph framework如何使用 cgscenegraph 框架设置中心旋转位置
【发布时间】:2013-01-06 20:10:29
【问题描述】:

我想在一个节点上进行旋转,并将起始位置设置为它的中心,但是动画函数占据了我节点的左上角.....

我有类似的东西:

sceneGraph.animate(circleNode, "rotation.angle", 400, 0, 2, "linear", 0, true);

你能帮我吗?

谢谢,

【问题讨论】:

  • 什么是sceneGraphanimate()?是 jQuery 的 animate() 吗?
  • 你好 Cerbrus,我正在开发一个小游戏,我发现了这个 html5 画布框架:cgscenegraph gwennaelbuchet.github.com/cgSceneGraph

标签: javascript html canvas frameworks javascript-framework


【解决方案1】:

可以通过节点的rotationCenter属性指定节点的旋转点。

示例: MyNode.rotationCenter = new CGSGPosition (0.5, 0.5);

希望对你有帮助:)

【讨论】:

  • 是的,很好!谢谢 !!!现在,我可以为我的加载状态创建一个微调器;)
猜你喜欢
  • 1970-01-01
  • 2012-07-22
  • 2013-07-22
  • 2013-02-12
  • 1970-01-01
  • 2016-07-07
  • 2016-01-16
  • 1970-01-01
  • 2012-10-18
相关资源
最近更新 更多