A 3D Tiles extension for t3d.js.
This project is licensed under the BSD 3-Clause License. See the LICENSE file for details.
- NASA-AMMOS/3DTilesRendererJS: Licensed under the Apache License 2.0. Copyright © 2020 California Institute of Technology. See LICENSE for details. The
coremodule is directly referenced fromNASA-AMMOS/3DTilesRendererJS, while other parts have been modified to work with thet3d.jsrendering 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);