instr
stringclasses
30 values
msg
stringclasses
30 values
What is the definition of the TwoHandleCup in threejs?
function createTwoHandleCup(scene, position = {x: 0, y: 0, z: 0}, color = 0xaaaaaa, size = 1) { const cupGeometry = new THREE.CylinderGeometry(2 * size, 2 * size, 5 * size, 32); const handleGeometry = new THREE.TorusGeometry(size, size / 2, 16, 100, Math.PI); const material = new THREE.MeshBasicMaterial({color: color}); const cup = new THREE.Mesh(cupGeometry, material); cup.position.set(position.x, position.y + 2.5 * size, position.z); const handle1 = new THREE.Mesh(handleGeometry, material); handle1.position.set(position.x + 2 * size, position.y + 2.5 * size, position.z); handle1.rotation.set(0, 0, 3*Math.PI / 2); const handle2 = new THREE.Mesh(handleGeometry, material); handle2.position.set(position.x - 2 * size, position.y + 2.5 * size, position.z); handle2.rotation.set(0, 0, Math.PI / 2); scene.add(cup); scene.add(handle1); scene.add(handle2); }
What is the definition of the ThreeLegTable in threejs?
function createThreeLegTable(scene, position = {x: 0, y: 0, z: 0}, color = 0x8B4513, size = 1) { const tableTopWidth = 4 * size; const tableTopHeight = 0.2 * size; const tableTopDepth = 3 * size; const legWidth = 0.2 * size; const legHeight = 2 * size; const legDepth = 0.2 * size; const tableTopGeometry = new THREE.BoxGeometry(tableTopWidth, tableTopHeight, tableTopDepth); const legGeometry = new THREE.BoxGeometry(legWidth, legHeight, legDepth); const material = new THREE.MeshBasicMaterial({color: color}); const tableTop = new THREE.Mesh(tableTopGeometry, material); tableTop.position.set(position.x, position.y + legHeight / 2, position.z); const leg1 = new THREE.Mesh(legGeometry, material); leg1.position.set(position.x + tableTopWidth / 2 - legWidth / 2, position.y - legHeight / 2 - tableTopHeight / 2, position.z + tableTopDepth / 2 - legDepth / 2); const leg2 = new THREE.Mesh(legGeometry, material); leg2.position.set(position.x - tableTopWidth / 2 + legWidth / 2, position.y - legHeight / 2 - tableTopHeight / 2, position.z + tableTopDepth / 2 - legDepth / 2); const leg3 = new THREE.Mesh(legGeometry, material); leg3.position.set(position.x + tableTopWidth / 2 - legWidth / 2, position.y - legHeight / 2 - tableTopHeight / 2, position.z - tableTopDepth / 2 + legDepth / 2); scene.add(tableTop); scene.add(leg1); scene.add(leg2); scene.add(leg3); }
What is the definition of the TwoLidCup in threejs?
function createTwoLidCup(scene, position = {x: 0, y: 0, z: 0}, color = 0xaaaaaa, size = 1) { const cupGeometry = new THREE.CylinderGeometry(2 * size, 2 * size, 5 * size, 32); const lidGeometry = new THREE.CylinderGeometry(2 * size, 2 * size, size / 2, 32); const material = new THREE.MeshBasicMaterial({color: color}); const cup = new THREE.Mesh(cupGeometry, material); cup.position.set(position.x, position.y + 2.5 * size, position.z); const lidTop = new THREE.Mesh(lidGeometry, material); lidTop.position.set(position.x, position.y + 5 * size + size / 2, position.z); // Make the top lid higher lidTop.rotation.x = Math.PI / 2; const lidBottom = new THREE.Mesh(lidGeometry, material); lidBottom.position.set(position.x, position.y - size / 4, position.z); // Make the bottom lid lower lidBottom.rotation.x = Math.PI / 2; scene.add(cup); scene.add(lidTop); scene.add(lidBottom); }
What is the definition of the PerfumeBottle in threejs?
function createPerfumeBottle(scene, position = {x: 0, y: 0, z: 0}, color = 0xaaaaaa, size = 1) { const bottleBottomGeometry = new THREE.CylinderGeometry(2 * size, 3 * size, 4 * size, 32); const bottleTopGeometry = new THREE.CylinderGeometry(1 * size, 2 * size, 2 * size, 32); const bottleNeckGeometry = new THREE.CylinderGeometry(1 * size, 1 * size, 1 * size, 32); const material = new THREE.MeshBasicMaterial({color: color}); const bottleBottom = new THREE.Mesh(bottleBottomGeometry, material); bottleBottom.position.set(position.x, position.y, position.z); const bottleTop = new THREE.Mesh(bottleTopGeometry, material); bottleTop.position.set(position.x, position.y + 3 * size, position.z); const bottleNeck = new THREE.Mesh(bottleNeckGeometry, material); bottleNeck.position.set(position.x, position.y + 4.5 * size, position.z); scene.add(bottleBottom); scene.add(bottleTop); scene.add(bottleNeck); }
What is the definition of the WaterKettle in threejs?
function createWaterKettle(scene, position = {x: 0, y: 0, z: 0}, color = 0xaaaaaa, size = 1) { const kettleBodyGeometry = new THREE.CylinderGeometry(3 * size, 3 * size, 6 * size, 32); const handleGeometry = new THREE.TorusGeometry(3 * size, size / 4, 16, 100, Math.PI); const spoutGeometry = new THREE.CylinderGeometry(size, 2 * size, 3 * size, 32); const material = new THREE.MeshBasicMaterial({color: color}); const kettleBody = new THREE.Mesh(kettleBodyGeometry, material); kettleBody.position.set(position.x, position.y, position.z); const handle = new THREE.Mesh(handleGeometry, material); handle.position.set(position.x, position.y, position.z + 3 * size); handle.rotation.set(0, Math.PI / 2, 0); const spout = new THREE.Mesh(spoutGeometry, material); spout.position.set(position.x + 3 * size, position.y, position.z); spout.rotation.z = Math.PI / 2; scene.add(kettleBody); scene.add(handle); scene.add(spout); }
How to create a TwoHandleCup in Three.js?
import * as THREE from 'https://unpkg.com/three/build/three.module.js'; const scene = new THREE.Scene(); const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000); const renderer = new THREE.WebGLRenderer(); renderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(renderer.domElement); camera.position.z = 15; createTwoHandleCup(scene, {x: 0, y: 0, z: 0}, 0xff0000, 1); function animate() { requestAnimationFrame(animate); renderer.render(scene, camera); } animate();
How to create a ThreeLegTable in Three.js?
import * as THREE from 'https://unpkg.com/three/build/three.module.js'; const scene = new THREE.Scene(); const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000); const renderer = new THREE.WebGLRenderer(); renderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(renderer.domElement); camera.position.z = 5; createThreeLegTable(scene, {x: 0, y: 0, z: 0}, 0x8B4513, 1); function animate() { requestAnimationFrame(animate); renderer.render(scene, camera); } animate();
How to create a TwoLidCup in Three.js?
import * as THREE from 'https://unpkg.com/three/build/three.module.js'; const scene = new THREE.Scene(); const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000); const renderer = new THREE.WebGLRenderer(); renderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(renderer.domElement); camera.position.z = 15; createTwoLidCup(scene, {x: 0, y: 0, z: 0}, 0x0000ff, 1); function animate() { requestAnimationFrame(animate); renderer.render(scene, camera); } animate();
How to create a PerfumeBottle in Three.js?
import * as THREE from 'https://unpkg.com/three/build/three.module.js'; const scene = new THREE.Scene(); const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000); const renderer = new THREE.WebGLRenderer(); renderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(renderer.domElement); camera.position.z = 15; createPerfumeBottle(scene, {x: 0, y: 0, z: 0}, 0xff00ff, 1); function animate() { requestAnimationFrame(animate); renderer.render(scene, camera); } animate();
How to create a WaterKettle in Three.js?
import * as THREE from 'https://unpkg.com/three/build/three.module.js'; const scene = new THREE.Scene(); const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000); const renderer = new THREE.WebGLRenderer(); renderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(renderer.domElement); camera.position.z = 15; createWaterKettle(scene, {x: 0, y: 0, z: 0}, 0xff00ff, 1); function animate() { requestAnimationFrame(animate); renderer.render(scene, camera); } animate();
Use threejs to call the function to generate the following scene: the Three-leg Table is large, the two-handled cup is small, while two-lid cup, perfume bottle, and water kettle are very small. The bottle of the double-handle cup is placed on the center of the desktop of the three-leg table. Two-lid cup, perfume bottle, and kettle are placed under the three-leg table and each is near a table leg. These five objects do not overlap, and have different colors.
import * as THREE from 'https://unpkg.com/three/build/three.module.js'; const scene = new THREE.Scene(); const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000); const renderer = new THREE.WebGLRenderer(); renderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(renderer.domElement); camera.position.z = 15; createThreeLegTable(scene, {x: 0, y: 0, z: 0}, 0x00ff00, 3, 1, 1); createTwoHandleCup(scene, {x: 0, y: 3, z: 0}, 0xff0000, 0.5); createTwoLidCup(scene, {x: 3, y: 0, z: 3}, 0x0000ff, 0.2); createPerfumeBottle(scene, {x: -3, y: 0, z: 3}, 0xffff00, 0.2); createWaterKettle(scene, {x: 3, y: 0, z: -3}, 0xff00ff, 0.2); function animate() { requestAnimationFrame(animate); renderer.render(scene, camera); } animate();
Use threejs to call the function to generate the following scene: a Two-lid Cup is placed on a Three-leg Table. The Three-leg Table is larger than the Two-lid Cup. The lowest end of the Two-lid Cup just touches the highest end of the Three-leg Table.
import * as THREE from 'https://unpkg.com/three/build/three.module.js'; const scene = new THREE.Scene(); const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000); const renderer = new THREE.WebGLRenderer(); renderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(renderer.domElement); camera.position.z = 15; createTwoLidCup(scene, {x: 0, y: 2.5, z: 0}, 0x0000ff, 1); createThreeLegTable(scene, {x: 0, y: -2, z: 0}, 0x8B4513, 2); function animate() { requestAnimationFrame(animate); renderer.render(scene, camera); } animate();
Create a scene with a ThreeLegTable, TwoLidCup, PerfumeBottle, WaterKettle, and TwoHandleCup, each with specific positions, colors, and sizes in Three.js
import * as THREE from 'https://unpkg.com/three/build/three.module.js'; const scene = new THREE.Scene(); const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000); const renderer = new THREE.WebGLRenderer(); renderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(renderer.domElement); camera.position.z = 50; // Add objects to the scene with position, color, and size createThreeLegTable(scene, {x: -20, y: 0, z: 0}, 0x00ff00, 1.5); createTwoLidCup(scene, {x: -10, y: 0, z: 0}, 0x0000ff, 1); createPerfumeBottle(scene, {x: 0, y: 0, z: 0}, 0xffff00, 0.5); createWaterKettle(scene, {x: 10, y: 0, z: 0}, 0xff00ff, 2); createTwoHandleCup(scene, {x: 20, y: 0, z: 0}, 0xff0000, 1.2); function animate() { requestAnimationFrame(animate); renderer.render(scene, camera); } animate();
In Three.js, create a scene where a small Perfume Bottle is placed on top of a larger Water Kettle. The bottom of the Perfume Bottle should align with the top of the Water Kettle.
import * as THREE from 'https://unpkg.com/three/build/three.module.js'; const scene = new THREE.Scene(); const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000); const renderer = new THREE.WebGLRenderer(); renderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(renderer.domElement); camera.position.z = 15; createPerfumeBottle(scene, {x: 0, y: 5, z: 0}, 0xFFC0CB, 0.5); createWaterKettle(scene, {x: 0, y: 0, z: 0}, 0x808080, 2); function animate() { requestAnimationFrame(animate); renderer.render(scene, camera); } animate();
Create a scene in Three.js where a TwoHandleCup and a ThreeLegTable are next to each other. The TwoHandleCup is half the size of the ThreeLegTable.
import * as THREE from 'https://unpkg.com/three/build/three.module.js'; const scene = new THREE.Scene(); const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000); const renderer = new THREE.WebGLRenderer(); renderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(renderer.domElement); camera.position.z = 20; createTwoHandleCup(scene, {x: -5, y: 0, z: 0}, 0xFF0000, 1); createThreeLegTable(scene, {x: 5, y: 0, z: 0}, 0x8B4513, 2); function animate() { requestAnimationFrame(animate); renderer.render(scene, camera); } animate();
In a Three.js scene, place a Perfume Bottle between two TwoLidCups. The Perfume Bottle is smaller and sits equidistant from both cups.
import * as THREE from 'https://unpkg.com/three/build/three.module.js'; const scene = new THREE.Scene(); const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000); const renderer = new THREE.WebGLRenderer(); renderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(renderer.domElement); camera.position.z = 15; createPerfumeBottle(scene, {x: 0, y: 0, z: 0}, 0xFFC0CB, 0.5); createTwoLidCup(scene, {x: -5, y: 0, z: 0}, 0x0000FF, 1); createTwoLidCup(scene, {x: 5, y: 0, z: 0}, 0x0000FF, 1); function animate() { requestAnimationFrame(animate); renderer.render(scene, camera); } animate();
Create a scene in Three.js with a large Water Kettle surrounded by smaller TwoHandleCups. The cups are arranged in a circle around the kettle.
import * as THREE from 'https://unpkg.com/three/build/three.module.js'; const scene = new THREE.Scene(); const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000); const renderer = new THREE.WebGLRenderer(); renderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(renderer.domElement); camera.position.z = 30; createWaterKettle(scene, {x: 0, y: 0, z: 0}, 0x808080, 3); createTwoHandleCup(scene, {x: -7, y: 0, z: 0}, 0xFF0000, 1); createTwoHandleCup(scene, {x: 7, y: 0, z: 0}, 0xFF0000, 1); function animate() { requestAnimationFrame(animate); renderer.render(scene, camera); } animate();
Create a Three.js scene where a small Perfume Bottle is placed inside a larger TwoLidCup. The Perfume Bottle should fit inside the cup without touching its sides.
import * as THREE from 'https://unpkg.com/three/build/three.module.js'; const scene = new THREE.Scene(); const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000); const renderer = new THREE.WebGLRenderer(); renderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(renderer.domElement); camera.position.z = 10; createTwoLidCup(scene, {x: 0, y: 0, z: 0}, 0x0000ff, 2); createPerfumeBottle(scene, {x: 0, y: 0.5, z: 0}, 0xFFC0CB, 0.5); function animate() { requestAnimationFrame(animate); renderer.render(scene, camera); } animate();
In Three.js, create a scene with three TwoHandleCups forming a pyramid structure above a large ThreeLegTable. The base of the pyramid should be just above the table.
import * as THREE from 'https://unpkg.com/three/build/three.module.js'; const scene = new THREE.Scene(); const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000); const renderer = new THREE.WebGLRenderer(); renderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(renderer.domElement); camera.position.z = 20; createThreeLegTable(scene, {x: 0, y: 0, z: 0}, 0x8B4513, 3); createTwoHandleCup(scene, {x: -2, y: 4, z: -2}, 0xFF0000, 1); createTwoHandleCup(scene, {x: 2, y: 4, z: -2}, 0xFF0000, 1); createTwoHandleCup(scene, {x: 0, y: 4, z: 2}, 0xFF0000, 1); function animate() { requestAnimationFrame(animate); renderer.render(scene, camera); } animate();
Design a Three.js scene where a Perfume Bottle and a TwoHandleCup are placed at opposite ends of a large Water Kettle, maintaining a balanced look.
import * as THREE from 'https://unpkg.com/three/build/three.module.js'; const scene = new THREE.Scene(); const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000); const renderer = new THREE.WebGLRenderer(); renderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(renderer.domElement); camera.position.z = 25; createWaterKettle(scene, {x: 0, y: 0, z: 0}, 0x808080, 3); createPerfumeBottle(scene, {x: -10, y: 0, z: 0}, 0xFFC0CB, 0.5); createTwoHandleCup(scene, {x: 10, y: 0, z: 0}, 0xFF0000, 1); function animate() { requestAnimationFrame(animate); renderer.render(scene, camera); } animate();
In Three.js, create a scene where a Water Kettle is suspended in the air above a TwoLidCup. The kettle should be twice the size of the cup.
import * as THREE from 'https://unpkg.com/three/build/three.module.js'; const scene = new THREE.Scene(); const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000); const renderer = new THREE.WebGLRenderer(); renderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(renderer.domElement); camera.position.z = 15; createTwoLidCup(scene, {x: 0, y: 0, z: 0}, 0x0000FF, 1); createWaterKettle(scene, {x: 0, y: 5, z: 0}, 0x808080, 2); function animate() { requestAnimationFrame(animate); renderer.render(scene, camera); } animate();
Create a Three.js scene with a small Perfume Bottle leaning against a larger Water Kettle. The Bottle is half the size of the Kettle.
import * as THREE from 'https://unpkg.com/three/build/three.module.js'; const scene = new THREE.Scene(); const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000); const renderer = new THREE.WebGLRenderer(); renderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(renderer.domElement); camera.position.z = 10; createWaterKettle(scene, {x: 0, y: 0, z: 0}, 0x808080, 2); createPerfumeBottle(scene, {x: 1, y: 0, z: 0}, 0xFFC0CB, 1); function animate() { requestAnimationFrame(animate); renderer.render(scene, camera); } animate();
In Three.js, create a scene with a ThreeLegTable and a TwoHandleCup at each leg. The cups are significantly smaller than the table.
import * as THREE from 'https://unpkg.com/three/build/three.module.js'; const scene = new THREE.Scene(); const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000); const renderer = new THREE.WebGLRenderer(); renderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(renderer.domElement); camera.position.z = 20; createThreeLegTable(scene, {x: 0, y: 0, z: 0}, 0x8B4513, 3); createTwoHandleCup(scene, {x: -2, y: -2, z: 2}, 0xFF0000, 1); createTwoHandleCup(scene, {x: 2, y: -2, z: 2}, 0xFF0000, 1); createTwoHandleCup(scene, {x: 0, y: -2, z: -2}, 0xFF0000, 1); function animate() { requestAnimationFrame(animate); renderer.render(scene, camera); } animate();
Design a Three.js scene where a large Perfume Bottle is surrounded by four smaller TwoLidCups in a square formation.
import * as THREE from 'https://unpkg.com/three/build/three.module.js'; const scene = new THREE.Scene(); const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000); const renderer = new THREE.WebGLRenderer(); renderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(renderer.domElement); camera.position.z = 15; createPerfumeBottle(scene, {x: 0, y: 0, z: 0}, 0xFFC0CB, 2); createTwoLidCup(scene, {x: -3, y: 0, z: 3}, 0x0000FF, 1); createTwoLidCup(scene, {x: 3, y: 0, z: 3}, 0x0000FF, 1); createTwoLidCup(scene, {x: -3, y: 0, z: -3}, 0x0000FF, 1); createTwoLidCup(scene, {x: 3, y: 0, z: -3}, 0x0000FF, 1); function animate() { requestAnimationFrame(animate); renderer.render(scene, camera); } animate();
In Three.js, create a scene with a Water Kettle and a TwoHandleCup on opposite sides of a large ThreeLegTable.
import * as THREE from 'https://unpkg.com/three/build/three.module.js'; const scene = new THREE.Scene(); const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000); const renderer = new THREE.WebGLRenderer(); renderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(renderer.domElement); camera.position.z = 25; createThreeLegTable(scene, {x: 0, y: 0, z: 0}, 0x8B4513, 3); createWaterKettle(scene, {x: -10, y: 0, z: 0}, 0x808080, 2); createTwoHandleCup(scene, {x: 10, y: 0, z: 0}, 0xFF0000, 1); function animate() { requestAnimationFrame(animate); renderer.render(scene, camera); } animate();
Create a scene in Three.js where a small TwoHandleCup is balancing on top of a slender Perfume Bottle.
import * as THREE from 'https://unpkg.com/three/build/three.module.js'; const scene = new THREE.Scene(); const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000); const renderer = new THREE.WebGLRenderer(); renderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(renderer.domElement); camera.position.z = 10; createPerfumeBottle(scene, {x: 0, y: 0, z: 0}, 0xFFC0CB, 1); createTwoHandleCup(scene, {x: 0, y: 3, z: 0}, 0xFF0000, 0.5); function animate() { requestAnimationFrame(animate); renderer.render(scene, camera); } animate();
In Three.js, make a scene with a ThreeLegTable, a Water Kettle underneath it, and two TwoLidCups on its top.
import * as THREE from 'https://unpkg.com/three/build/three.module.js'; const scene = new THREE.Scene(); const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000); const renderer = new THREE.WebGLRenderer(); renderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(renderer.domElement); camera.position.z = 20; createThreeLegTable(scene, {x: 0, y: 5, z: 0}, 0x8B4513, 2); createWaterKettle(scene, {x: 0, y: -5, z: 0}, 0x808080, 2); createTwoLidCup(scene, {x: -2, y: 6, z: 0}, 0x0000FF, 1); createTwoLidCup(scene, {x: 2, y: 6, z: 0}, 0x0000FF, 1); function animate() { requestAnimationFrame(animate); renderer.render(scene, camera); } animate();
Design a Three.js scene where several Perfume Bottles are arranged in a circle around a central TwoHandleCup.
import * as THREE from 'https://unpkg.com/three/build/three.module.js'; const scene = new THREE.Scene(); const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000); const renderer = new THREE.WebGLRenderer(); renderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(renderer.domElement); camera.position.z = 15; createTwoHandleCup(scene, {x: 0, y: 0, z: 0}, 0xFF0000, 2); for (let i = 0; i < 6; i++) { createPerfumeBottle(scene, {x: 5 * Math.sin(i * Math.PI / 3), y: 0, z: 5 * Math.cos(i * Math.PI / 3)}, 0xFFC0CB, 1); } function animate() { requestAnimationFrame(animate); renderer.render(scene, camera); } animate();
In Three.js, create a scene with a large Water Kettle flanked on each side by a smaller Perfume Bottle.
import * as THREE from 'https://unpkg.com/three/build/three.module.js'; const scene = new THREE.Scene(); const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000); const renderer = new THREE.WebGLRenderer(); renderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(renderer.domElement); camera.position.z = 15; createWaterKettle(scene, {x: 0, y: 0, z: 0}, 0x808080, 2); createPerfumeBottle(scene, {x: -3, y: 0, z: 0}, 0xFFC0CB, 1); createPerfumeBottle(scene, {x: 3, y: 0, z: 0}, 0xFFC0CB, 1); function animate() { requestAnimationFrame(animate); renderer.render(scene, camera); } animate();
Create a Three.js scene where a stack of TwoLidCups is topped with a small Perfume Bottle.
import * as THREE from 'https://unpkg.com/three/build/three.module.js'; const scene = new THREE.Scene(); const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000); const renderer = new THREE.WebGLRenderer(); renderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(renderer.domElement); camera.position.z = 20; createTwoLidCup(scene, {x: 0, y: 0, z: 0}, 0x0000FF, 1); createTwoLidCup(scene, {x: 0, y: 2, z: 0}, 0x0000FF, 1); createPerfumeBottle(scene, {x: 0, y: 4, z: 0}, 0xFFC0CB, 0.5); function animate() { requestAnimationFrame(animate); renderer.render(scene, camera); } animate();
README.md exists but content is empty. Use the Edit dataset card button to edit it.
Downloads last month
37
Edit dataset card