解答: 刪除 fillScene()
裡的 scene.add( arm )
並用以下取代:
1
2
3
4
5
6
7
8
9
10
|
body = new THREE.Object3D();
var bodyLength = 60;
// 解答
createRobotBody( body, bodyLength, robotBodyMaterial );
// 將上臂移動到身體的頂端
arm.position.y = bodyLength;
body.add( arm );
scene.add( body );
|
然後取消以下三行的註解:
1
2
3
4
5
6
|
// UNCOMMENT FOLLOWING LINES TO ENABLE CONTROLS FOR BODY:
// body.rotation.y = effectController.by * Math.PI/180; // yaw
// by: 0.0,
// student, uncomment: h.add(effectController, "by", -180.0, 180.0, 0.025).name("Body y");
|