譯註:這裡的圓柱指的是題目裡的圓錐
解答: 將以下程式加入 fillScene()
:
var flower = new THREE.Object3D();
for ( var i = 0; i < 24 ; i++ )
{
var cylinder = new THREE.Mesh( cylGeom, petalMaterial );
cylinder.position.y = petalLength / 2;
var petal = new THREE.Object3D();
petal.add( cylinder );
petal.rotation.z = 90 * Math.PI/180;
petal.rotation.y = 15*i * Math.PI/180;
petal.position.y = flowerHeight;
flower.add( petal );
}