Thanks to visit codestin.com
Credit goes to github.com

Skip to content

uinosoft/t3d-3dtiles

Repository files navigation

t3d-3dtiles

NPM Package

A 3D Tiles extension for t3d.js.

Examples

Licensing

This project is licensed under the BSD 3-Clause License. See the LICENSE file for details.

Dependencies

  • NASA-AMMOS/3DTilesRendererJS: Licensed under the Apache License 2.0. Copyright © 2020 California Institute of Technology. See LICENSE for details. The 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.

Quick Start

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);

About

A 3dtile extension based on t3d.js.

Resources

License

Stars

Watchers

Forks

Packages

No packages published