2013-01-23 66 views
0

我想和設定其中心起始位置的節點上的旋轉設置旋轉中心的位置,但動畫功能把我的節點的左上角.....如何使用cgscenegraph框架

我有類似的東西:

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

你能幫助我嗎?

thx,

+0

什麼是'sceneGraph'或'animate()'?這是jQuery的'animate()'? – Cerbrus

+0

你好Cerbrus,我正在開發一個小遊戲,我發現這個html5畫布框架:cgscenegraph在http://gwennaelbuchet.github.com/cgSceneGraph – jerem

回答

0

您可以使用節點的rotationCenter屬性指定節點的旋轉點。

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

希望這可以幫助你:)

+0

是的,這很好!謝謝 !!!現在,我可以爲我的加載狀態創建一個微調;) – jerem

+0

很高興幫助你:) –