Feature: Cauldron handles
This commit is contained in:
parent
499fc006f5
commit
6a2498ef04
@ -21,6 +21,28 @@ export function createCauldron(x, y, z) {
|
|||||||
cauldronMesh.rotation.z = Math.PI;
|
cauldronMesh.rotation.z = Math.PI;
|
||||||
cauldronGroup.add(cauldronMesh);
|
cauldronGroup.add(cauldronMesh);
|
||||||
|
|
||||||
|
// 1.5. Cauldron Handles
|
||||||
|
const handleRadius = 0.08;
|
||||||
|
const handleTube = 0.01;
|
||||||
|
const handleMaterial = new THREE.MeshPhongMaterial({ color: 0x333333, shininess: 50 });
|
||||||
|
|
||||||
|
const handleGeo = new THREE.TorusGeometry(handleRadius, handleTube, 8, 32);
|
||||||
|
|
||||||
|
const handleShiftX = 0.07;
|
||||||
|
const handleShiftY = 0.12;
|
||||||
|
|
||||||
|
const leftHandle = new THREE.Mesh(handleGeo, handleMaterial);
|
||||||
|
leftHandle.rotation.y = Math.PI / 2;
|
||||||
|
leftHandle.position.set(-cauldronRadius - handleRadius * 0.5 + handleShiftX, cauldronHeight * 0.5 - handleShiftY, 0);
|
||||||
|
leftHandle.castShadow = true;
|
||||||
|
cauldronGroup.add(leftHandle);
|
||||||
|
|
||||||
|
const rightHandle = new THREE.Mesh(handleGeo, handleMaterial);
|
||||||
|
rightHandle.rotation.y = -Math.PI / 2;
|
||||||
|
rightHandle.position.set(cauldronRadius + handleRadius * 0.5 - handleShiftX, cauldronHeight * 0.5 - handleShiftY, 0);
|
||||||
|
rightHandle.castShadow = true;
|
||||||
|
cauldronGroup.add(rightHandle);
|
||||||
|
|
||||||
// 2. Glowing Liquid Surface
|
// 2. Glowing Liquid Surface
|
||||||
const liquidColor = 0x00ff00; // Bright green
|
const liquidColor = 0x00ff00; // Bright green
|
||||||
const liquidMaterial = new THREE.MeshPhongMaterial({
|
const liquidMaterial = new THREE.MeshPhongMaterial({
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user