Interactive 3D aquariumOne-line
Nemotron 3 Nano Omni (free)
by NVIDIAReasoning1 console error
Running live in a sandboxed frame. Click inside it before using the keyboard.
How it went
- Total time
- 12.1 s
- Cost
- $0
- Output tokens
- 1,428
- Spent thinking
- 0 tokens
- Speed
- 120.8 tok/s
- Console errors
- 1
- First token after
- 290 ms
- First visible text after
- 290 ms
- Prompt tokens
- 448
- Code size
- 5.2 KB
- Finish reason
- stop
- Served by
- Nvidia
- Model id
nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free- Reasoning sent
{"effort":"none"}- Max output
- 32,000 tokens
- Generated
- Nov 9, 2026
Console errors
Caught in the first 3 seconds after load, in a sandboxed iframe like the one above.
Cannot use import statement outside a module
What it was asked
The prompt
“a 3D aquarium with Three.js where the fish swim away when I move the mouse near them (Load Three.js only through this import map: <script type="importmap">{"imports":{"three":"https://cdn.jsdelivr.net/npm/three@0.170.0/build/three.module.js","three/addons/":"https://cdn.jsdelivr.net/npm/three@0.170.0/examples/jsm/"}}</script>)”
System prompt, sent with every prompt
You are generating a self-contained web demo. It will be rendered automatically in a sandboxed iframe and compared side by side with the output of other AI models given the exact same task. Output rules: - Reply with exactly ONE fenced code block containing the complete file: ```html (or ```svg when the task asks for an SVG). No text before or after the code block. - Everything must be inline: CSS in <style>, JavaScript in <script>. No external files, images, fonts or network requests, except the CDN URLs explicitly allowed by the task. - Do not use localStorage, sessionStorage, cookies, IndexedDB, alert(), confirm(), prompt() or window.open(): they are blocked in the sandbox and will throw. - The page must look right in a 1280×800 viewport and adapt gracefully down to 375px wide. No horizontal scrollbar. - Something meaningful must be visible on first paint: a screenshot is taken automatically about 3 seconds after load, without any interaction. - Everything that makes the demo interesting must be visible within the first seconds: nothing hidden behind a high score, a later level or a long play session. - Games must start in a self-playing demo mode (a simple AI plays) behind a "Click or press a key to start" message, so the game can be judged in action without playing. - The iframe only receives keyboard events after the user clicks it: if the demo uses the keyboard, display a clear "Click or press a key to start" message. - The code must run with zero errors in the console of the latest Chrome.
Code run-1.html · 179 lines
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>3D Aquarium</title>
<style>
body { margin: 0; overflow: hidden; background: #000; }
#startText {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: white;
font-family: sans-serif;
font-size: 24px;
text-align: center;
pointer-events: none;
}
</style>
</head>
<body>
<div id="startText">Click or press a key to start</div>
<script type="importmap">
{
"imports": {
"three": "https://cdn.jsdelivr.net/npm/three@0.170.0/build/three.module.js",
"three/addons/": "https://cdn.jsdelivr.net/npm/three@0.170.0/examples/jsm/"
}
}
</script>
<script>
import * as THREE from 'three';
import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
// Scene setup
const scene = new THREE.Scene();
scene.background = new THREE.Color(0x87ceeb); // Light blue background
// Camera
const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000);
camera.position.z = 5;
// Renderer
const renderer = new THREE.WebGLRenderer({ antialias: true });
renderer.setSize(window.innerWidth, window.innerHeight);
document.body.appendChild(renderer.domElement);
// Lighting
const ambientLight = new THREE.AmbientLight(0xffffff, 0.5);
scene.add(ambientLight);
const directionalLight = new THREE.DirectionalLight(0xffffff, 0.8);
directionalLight.position.set(5, 5, 5);
scene.add(directionalLight);
// Floor plane
const floorGeometry = new THREE.PlaneGeometry(100, 100);
const floorMaterial = new THREE.MeshStandardMaterial({ color: 0x228b22 });
const floor = new THREE.Mesh(floorGeometry, floorMaterial);
floor.rotation.x = -Math.PI / 2;
scene.add(floor);
// Fish container
const fishGroup = new THREE.Group();
scene.add(fishGroup);
// Fish model (simple torus knot)
const fishGeometry = new THREE.TorusKnotGeometry(0.1, 0.05, 100, 20);
const fishMaterial = new THREE.MeshStandardMaterial({ color: 0xffa500, metalness: 0.5, roughness: 0.5 });
// Create multiple fish
for (let i = 0; i < 20; i++) {
const fish = new THREE.Mesh(fishGeometry, fishMaterial);
fish.position.set(
THREE.MathUtils.randFloatSpread(50),
0,
THREE.MathUtils.randFloatSpread(50)
);
fish.rotation.set(0, THREE.MathUtils.randFloat(0, Math.PI * 2), 0);
fish.userData = {
speed: THREE.MathUtils.randFloat(0.01, 0.03),
target: new THREE.Vector3(
THREE.MathUtils.randFloatSpread(50),
0,
THREE.MathUtils.randFloatSpread(50)
),
lastUpdate: 0
};
fishGroup.add(fish);
}
// Mouse tracking
const mouse = new THREE.Vector2();
const raycaster = new THREE.Raycaster();
let isMoving = false;
// Animation loop
let lastTime = 0;
function animate(time) {
const delta = (time - lastTime) / 1000;
lastTime = time;
// Update fish movement
fishGroup.children.forEach(fish => {
const pos = fish.position;
const target = fish.userData.target;
const distance = pos.distanceTo(target);
if (distance < 0.1) {
target.set(
THREE.MathUtils.randFloatSpread(50),
0,
THREE.MathUtils.randFloatSpread(50)
);
}
// Move towards target
pos.x += (target.x - pos.x) * fish.userData.speed * delta;
pos.z += (target.z - pos.z) * fish.userData.speed * delta;
pos.y = 0; // Keep on floor
});
// Check mouse proximity
if (isMoving) {
raycaster.setFromCamera(mouse, camera);
const intersects = raycaster.intersectObjects(fishGroup.children, true);
intersects.forEach(intersect => {
const fish = intersect.object;
const pos = fish.position;
const direction = new THREE.Vector3(
mouse.x * 2 - 1,
0,
mouse.y * 2 - 1
).normalize();
// Push fish away from mouse
const pushVector = direction.multiplyScalar(0.1);
pos.x += pushVector.x * 0.5 * delta;
pos.z += pushVector.z * 0.5 * delta;
pos.y = 0;
});
}
// Render
renderer.render(scene, camera);
requestAnimationFrame(animate);
}
// Start the animation
function startDemo() {
document.getElementById('startText').style.display = 'none';
isMoving = true;
lastTime = performance.now();
animate(0);
}
// Event listeners
window.addEventListener('click', () => {
if (document.getElementById('startText').style.display === 'block') {
startDemo();
}
});
window.addEventListener('keydown', () => {
if (document.getElementById('startText').style.display === 'block') {
startDemo();
}
});
// Resize handling
window.addEventListener('resize', () => {
camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();
renderer.setSize(window.innerWidth, window.innerHeight);
});
</script>
</body>
</html>