01
A familiar scene graph
Compose Object3D, Group, Scene, and Mesh nodes with position, rotation, scale, visibility, and inherited world transforms.
Java scene graph · TeaVM · WebGL
A small Three.js-inspired library with no JavaScript runtime dependency. TeaVM compiles the scene, glTF loader, LMCode host API, transforms, animation, controls, and WebGL calls.
Scene controls
Compiling the scene…
Waiting for the first frame
01
Compose Object3D, Group, Scene, and Mesh nodes with position, rotation, scale, visibility, and inherited world transforms.
02
Indexed geometry, cached buffers, inverse-transpose normals, Phong and unlit materials, depth testing, and three light types.
03
OrbitControls listens for pointer and wheel events. requestAnimationFrame updates the same Java scene every frame.
One language, end to end
The API is intentionally recognizable to Three.js users, while remaining ordinary Java. lm3d is a focused subset, not a drop-in Three.js port.
Read the LLM quick reference →Scene scene = new Scene();
PerspectiveCamera camera =
new PerspectiveCamera(48, 16f / 9, 0.1f, 100);
camera.position.set(5, 4, 7);
camera.lookAt(0, 1, 0);
Mesh cube = new Mesh(
new BoxGeometry(2, 2, 2),
new MeshPhongMaterial("#61d6c5"));
cube.position.y = 1.25f;
scene.add(cube);
scene.add(new AmbientLight("#ffffff", 0.4f));
WebGLRenderer renderer = new WebGLRenderer(canvas);
renderer.setSize(960, 540);
renderer.render(scene, camera);