text
stringclasses
5 values
<s>[INST] What it the definition of the TwoHandleCup in threejs? [/INST] function createTwoHandleCup(scene, position = {x: 0, y: 0, z: 0}, color = 0xaaaaaa, size = 1) {<n> const cupGeometry = new THREE.CylinderGeometry(2 * size, 2 * size, 5 * size, 32);<n> const handleGeometry = new THREE.TorusGeometry(size, size / 2, 16, 100, Math.PI);<n><n> const material = new THREE.MeshBasicMaterial({color: color});<n><n> const cup = new THREE.Mesh(cupGeometry, material);<n> cup.position.set(position.x, position.y + 2.5 * size, position.z);<n><n> const handle1 = new THREE.Mesh(handleGeometry, material);<n> handle1.position.set(position.x + 2 * size, position.y + 2.5 * size, position.z);<n> handle1.rotation.set(0, 0, 3*Math.PI / 2);<n><n> const handle2 = new THREE.Mesh(handleGeometry, material);<n> handle2.position.set(position.x - 2 * size, position.y + 2.5 * size, position.z);<n> handle2.rotation.set(0, 0, Math.PI / 2);<n><n> scene.add(cup);<n> scene.add(handle1);<n> scene.add(handle2);<n> } </s>
<s>[INST] What it the definition of the ThreeLegTable in threejs? [/INST] function createThreeLegTable(scene, position = {x: 0, y: 0, z: 0}, color = 0x8B4513, size = 1) {<n> const tableTopWidth = 4 * size;<n> const tableTopHeight = 0.2 * size;<n> const tableTopDepth = 3 * size;<n> const legWidth = 0.2 * size;<n> const legHeight = 2 * size;<n> const legDepth = 0.2 * size;<n><n> const tableTopGeometry = new THREE.BoxGeometry(tableTopWidth, tableTopHeight, tableTopDepth);<n> const legGeometry = new THREE.BoxGeometry(legWidth, legHeight, legDepth);<n><n> const material = new THREE.MeshBasicMaterial({color: color});<n><n> const tableTop = new THREE.Mesh(tableTopGeometry, material);<n> tableTop.position.set(position.x, position.y + legHeight / 2, position.z);<n><n> const leg1 = new THREE.Mesh(legGeometry, material);<n> leg1.position.set(position.x + tableTopWidth / 2 - legWidth / 2, position.y - legHeight / 2 - tableTopHeight / 2, position.z + tableTopDepth / 2 - legDepth / 2);<n><n> const leg2 = new THREE.Mesh(legGeometry, material);<n> leg2.position.set(position.x - tableTopWidth / 2 + legWidth / 2, position.y - legHeight / 2 - tableTopHeight / 2, position.z + tableTopDepth / 2 - legDepth / 2);<n><n> const leg3 = new THREE.Mesh(legGeometry, material);<n> leg3.position.set(position.x + tableTopWidth / 2 - legWidth / 2, position.y - legHeight / 2 - tableTopHeight / 2, position.z - tableTopDepth / 2 + legDepth / 2);<n><n> scene.add(tableTop);<n> scene.add(leg1);<n> scene.add(leg2);<n> scene.add(leg3);<n>} </s>
<s>[INST] What it the definition of the TwoLidCup in threejs? [/INST] function createTwoLidCup(scene, position = {x: 0, y: 0, z: 0}, color = 0xaaaaaa, size = 1) {<n> const cupGeometry = new THREE.CylinderGeometry(2 * size, 2 * size, 5 * size, 32);<n> const lidGeometry = new THREE.CylinderGeometry(2 * size, 2 * size, size / 2, 32);<n><n> const material = new THREE.MeshBasicMaterial({color: color});<n><n> const cup = new THREE.Mesh(cupGeometry, material);<n> cup.position.set(position.x, position.y + 2.5 * size, position.z);<n><n> const lidTop = new THREE.Mesh(lidGeometry, material);<n> lidTop.position.set(position.x, position.y + 5 * size + size / 2, position.z); // Make the top lid higher<n> lidTop.rotation.x = Math.PI / 2;<n><n> const lidBottom = new THREE.Mesh(lidGeometry, material);<n> lidBottom.position.set(position.x, position.y - size / 4, position.z); // Make the bottom lid lower<n> lidBottom.rotation.x = Math.PI / 2;<n><n> scene.add(cup);<n> scene.add(lidTop);<n> scene.add(lidBottom);<n>} </s>
<s>[INST] What it the definition of the PerfumeBottle in threejs? [/INST] function createPerfumeBottle(scene, position = {x: 0, y: 0, z: 0}, color = 0xaaaaaa, size = 1) {<n> const bottleBottomGeometry = new THREE.CylinderGeometry(2 * size, 3 * size, 4 * size, 32);<n> const bottleTopGeometry = new THREE.CylinderGeometry(1 * size, 2 * size, 2 * size, 32);<n> const bottleNeckGeometry = new THREE.CylinderGeometry(1 * size, 1 * size, 1 * size, 32);<n><n> const material = new THREE.MeshBasicMaterial({color: color});<n><n> const bottleBottom = new THREE.Mesh(bottleBottomGeometry, material);<n> bottleBottom.position.set(position.x, position.y, position.z);<n><n> const bottleTop = new THREE.Mesh(bottleTopGeometry, material);<n> bottleTop.position.set(position.x, position.y + 3 * size, position.z);<n><n> const bottleNeck = new THREE.Mesh(bottleNeckGeometry, material);<n> bottleNeck.position.set(position.x, position.y + 4.5 * size, position.z);<n><n> scene.add(bottleBottom);<n> scene.add(bottleTop);<n> scene.add(bottleNeck);<n>} </s>
<s>[INST] What it the definition of the WaterKettle in threejs? [/INST] function createWaterKettle(scene, position = {x: 0, y: 0, z: 0}, color = 0xaaaaaa, size = 1) {<n> const kettleBodyGeometry = new THREE.CylinderGeometry(3 * size, 3 * size, 6 * size, 32);<n> const handleGeometry = new THREE.TorusGeometry(3 * size, size / 4, 16, 100, Math.PI);<n> const spoutGeometry = new THREE.CylinderGeometry(size, 2 * size, 3 * size, 32);<n><n> const material = new THREE.MeshBasicMaterial({color: color});<n><n> const kettleBody = new THREE.Mesh(kettleBodyGeometry, material);<n> kettleBody.position.set(position.x, position.y, position.z);<n><n> const handle = new THREE.Mesh(handleGeometry, material);<n> handle.position.set(position.x, position.y, position.z + 3 * size);<n> handle.rotation.set(0, Math.PI / 2, 0);<n><n> const spout = new THREE.Mesh(spoutGeometry, material);<n> spout.position.set(position.x + 3 * size, position.y, position.z);<n> spout.rotation.z = Math.PI / 2;<n><n> scene.add(kettleBody);<n> scene.add(handle);<n> scene.add(spout);<n>} </s>
README.md exists but content is empty. Use the Edit dataset card button to edit it.
Downloads last month
5
Edit dataset card