지금 당장은 매우 혼란 스럽습니다. X.transform.rotate() 함수는 매우 간단한 장면이라 할지라도 나에게 예상치 못한 결과를줍니다! http://jsfiddle.net/1sv25uLx/간단한 X.transform.rotate (회전 중심 오프셋) 문제 해결
이전 장면은 노란색 평행 육면체의 회전이 잘되는 Y = 0 만 개체를 포함 : 당신이 여기에서 볼 수 있듯이 회전
각도, OK입니다. 나는 더 많은 개체를 소개하면
그러나 번역이 추가되고 왜 이해할 수 없다 : http://jsfiddle.net/1bo7zdfs/1/
// create XYZ widgets with spheres
trysphere = new X.sphere();
trysphere.center = [0, 0, 0];
trysphere.color = [1, 1, 1];
trysphereX = new X.sphere();
trysphereX.center = [50, 0, 0];
trysphereX.color = [1, 0, 0];
trysphereY = new X.sphere();
trysphereY.center = [0, 50, 0];
trysphereY.color = [0, 1, 0];
trysphereZ = new X.sphere();
trysphereZ.center = [0, 0, 50];
trysphereZ.color = [0, 0, 1];
r.add(trysphere);
r.add(trysphereX);
r.add(trysphereY);
r.add(trysphereZ);
// create a parallelepiped
cube = new X.cube();
cube.center = [0, 0, 0];
cube.color = [1, 1, 0];
// orient it along X
cube.lengthY = cube.lengthZ = 5;
cube.lengthX = 40;
// add it
r.add(cube);
// rotate it (same result if done before or after .add)
cube.transform.rotateY(90);
내가 플러그인의 이전 버전을 사용하려고했습니다 수동으로 회전 행렬을 입력, .add, .transform 및 .render의 순서를 변경합니다. 그러나 이러한 성가신 오프셋을 제거 할 수는 없습니다.
아무도 도와 줄 수 있습니까? @hehn : Ricola3D의 인터페이스에서 일하고 있습니다. 2012 년에도이 작업을 다시 시작할 수 없습니다.
편집 : X/Wiki/Future에서이 문제에 관해 이야기하고 있습니다. 그러나 개체의 위치를 [0,0,0]으로 설정하고 회전 한 다음 위치를 지정하는 데 신경 쓰지는 않지만 그렇게해도 작동하지 않습니다.