A 3D Tiles extension for t3d.js.
This project is licensed under the BSD 3-Clause License. See the LICENSE file for details.
core module is directly referenced from NASA-AMMOS/3DTilesRendererJS, while other parts have been modified to work with the t3d.js rendering engine while maintaining the original functionality.Most of the interfaces and usage are similar to NASA-AMMOS/3DTilesRendererJS.
Here is the basic usage of t3d-3dtiles:
import { TilesRenderer } from 't3d-3dtiles';
// Create tiles with tileset URI
const tiles = new TilesRenderer('./path/to/tileset.json');
// Add tiles.group to scene
scene.add(tiles.group);
// Add camera to tiles, you can add multiple cameras
tiles.addCamera(camera);
// Set screen size for tiles
tiles.setResolution(width, height);
function loop(count) {
requestAnimationFrame(loop);
...
tiles.update(); // Update tiles every frame
forwardRenderer.render(scene, camera);
}
requestAnimationFrame(loop);