1
刻度的圓柱體是否可以從特定點增加Y軸上圓柱體的刻度。Three.js - 從點
由於氣缸不是從原來的上升到下降到新的比例,而是從頂部向上/向下增長,只能像條形圖一樣。
當前代碼:
function animate() {
render();
cylinder.scale.y += 0.1;
requestAnimationFrame(animate);
}
刻度的圓柱體是否可以從特定點增加Y軸上圓柱體的刻度。Three.js - 從點
由於氣缸不是從原來的上升到下降到新的比例,而是從頂部向上/向下增長,只能像條形圖一樣。
當前代碼:
function animate() {
render();
cylinder.scale.y += 0.1;
requestAnimationFrame(animate);
}
您可以創建一箇中介Object3D
來實現這一目標:
var cylinder = new THREE.Object3D();
scene.add(cylinder);
var cylinderMesh = new THREE.Mesh(geometry.material);
cylinder.add(cylinderMesh);
cylinderMesh.position.y = 2; // move pivot up
cylinder.scale.y += 0.1;