Skip to content

uinosoft/t3d-3dtiles

Repository files navigation

t3d-3dtiles

NPM Package

An extension for 3D Tiles based on t3d.js, requires t3d.js version v0.2.7 or later. Inspired by NASSA-AMMOS / 3DTilesRendererJS.

Examples

Usage

Here is the basic usage of t3d-3dtiles:

// Create tiles3D with tileset URI
const tilesetURI = "./path/to/tileset.json";
const tiles3D = new Tiles3D(tilesetURI);

// Add tiles3D to scene
scene.add(tiles3D);

// Add camera to tiles3D, you can add multiple cameras
tiles3D.addCamera(camera);

// Set screen size for tiles3D
tiles3D.resize(width, height);

function loop(count) {
    requestAnimationFrame(loop);

    ...
    	
    tiles3D.update(); // Update tiles3D every frame

    forwardRenderer.render(scene, camera);
}
requestAnimationFrame(loop);