An 3D Tiles extension for t3d.js, requires t3d.js version v0.2.7
or later.
This project is modified and extended based on NASSA-AMMOS / 3DTilesRendererJS (Apache 2.0 License).
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);