About
Partnerships
Tools
Blog
Contact
Login
Login
Three.js 3D Viewer
Write Three.js code and see 3D scenes live. Export as standalone HTML files.
▶ Run
JavaScript (Three.js r128)
📋 Templates
📂 Import
📤 Export .js
const scene = new THREE.Scene(); const camera = new THREE.PerspectiveCamera(75, window.innerWidth/window.innerHeight, 0.1, 1000); const renderer = new THREE.WebGLRenderer({ antialias: true }); renderer.setSize(window.innerWidth, window.innerHeight); renderer.setClearColor(0xf0f4f8); document.body.appendChild(renderer.domElement); const geometry = new THREE.BoxGeometry(1, 1, 1); const material = new THREE.MeshPhongMaterial({ color: 0x3b82f6 }); const cube = new THREE.Mesh(geometry, material); scene.add(cube); const light = new THREE.DirectionalLight(0xffffff, 1); light.position.set(5, 5, 5); scene.add(light); scene.add(new THREE.AmbientLight(0x404040)); camera.position.z = 3; function animate() { requestAnimationFrame(animate); cube.rotation.x += 0.01; cube.rotation.y += 0.01; renderer.render(scene, camera); } animate();
🤖 AI Prompt Helper
3D Preview
📄 HTML