# THREE

THREE is the object with all classes, objects, properties included in the three.js (opens new window) core library, and GLTFLoader (opens new window). It is used as the namespace for the three.js core library.

WARNING

The bundled three.js version may change between Mini Tokyo 3D releases. Custom three.js layers and plugins should use mt3d.THREE instead of bundling their own copy, and verify compatibility with the bundled version when upgrading.

Type Object (opens new window)

# Properties

For more information, see three.js docs (opens new window).

# Example

// A callback in ThreeLayerInterface
onAdd(map, context) {
	const {x, y, z} = map.getModelPosition([139.7143859, 35.6778094]);
	const scale = map.getModelScale();
	const geometry = new mt3d.THREE.BoxGeometry(10, 10, 10);
	const material = new mt3d.THREE.MeshBasicMaterial({color: 0xffff00});
	const mesh = new mt3d.THREE.Mesh(geometry, material);
	mesh.position.set(x, y, z);
	mesh.scale.setScalar(scale);
	context.scene.add(mesh);
}
Last Updated: 7/26/2026, 11:34:08 PM