Bladeren bron

frist commit

jinx 2 jaren geleden
bovenliggende
commit
329b082f7f
100 gewijzigde bestanden met toevoegingen van 29253 en 0 verwijderingen
  1. 56 0
      .drone.yml
  2. 1 0
      .eslintignore
  3. 13 0
      .eslintrc.cjs
  4. 6 0
      .gitignore
  5. 7 0
      .prettierrc
  6. 59 0
      CHANGELOG.md
  7. 6 0
      CODEOWNERS
  8. 47 0
      CODE_OF_CONDUCT.md
  9. 45 0
      CONTRIBUTING.md
  10. 9 0
      LICENSE
  11. 7 0
      SECURITY.md
  12. 30 0
      api-extractor.json
  13. 172 0
      dist/three-loader-3dtiles.d.ts
  14. 17768 0
      dist/three-loader-3dtiles.esm.js
  15. 1 0
      dist/three-loader-3dtiles.esm.js.map
  16. 16 0
      dist/three-loader-3dtiles.esm.min.js
  17. 1 0
      dist/three-loader-3dtiles.esm.min.js.map
  18. 16 0
      dist/three-loader-3dtiles.min.js
  19. 1 0
      dist/three-loader-3dtiles.min.js.map
  20. 11 0
      dist/tsdoc-metadata.json
  21. 12 0
      docs/index.md
  22. 11 0
      docs/three-loader-3dtiles.geocoord.height.md
  23. 11 0
      docs/three-loader-3dtiles.geocoord.lat.md
  24. 11 0
      docs/three-loader-3dtiles.geocoord.long.md
  25. 22 0
      docs/three-loader-3dtiles.geocoord.md
  26. 20 0
      docs/three-loader-3dtiles.geotransform.md
  27. 29 0
      docs/three-loader-3dtiles.loader3dtiles.load.md
  28. 20 0
      docs/three-loader-3dtiles.loader3dtiles.md
  29. 13 0
      docs/three-loader-3dtiles.loaderoptions.basistranscoderpath.md
  30. 13 0
      docs/three-loader-3dtiles.loaderoptions.cesiumiontoken.md
  31. 13 0
      docs/three-loader-3dtiles.loaderoptions.computenormals.md
  32. 13 0
      docs/three-loader-3dtiles.loaderoptions.debug.md
  33. 13 0
      docs/three-loader-3dtiles.loaderoptions.dracodecoderpath.md
  34. 13 0
      docs/three-loader-3dtiles.loaderoptions.geotransform.md
  35. 13 0
      docs/three-loader-3dtiles.loaderoptions.material.md
  36. 13 0
      docs/three-loader-3dtiles.loaderoptions.maxconcurrency.md
  37. 13 0
      docs/three-loader-3dtiles.loaderoptions.maximummemoryusage.md
  38. 13 0
      docs/three-loader-3dtiles.loaderoptions.maximumscreenspaceerror.md
  39. 13 0
      docs/three-loader-3dtiles.loaderoptions.maxrequests.md
  40. 43 0
      docs/three-loader-3dtiles.loaderoptions.md
  41. 13 0
      docs/three-loader-3dtiles.loaderoptions.pointcloudcoloring.md
  42. 13 0
      docs/three-loader-3dtiles.loaderoptions.pointsize.md
  43. 13 0
      docs/three-loader-3dtiles.loaderoptions.preloadtilescount.md
  44. 13 0
      docs/three-loader-3dtiles.loaderoptions.shadercallback.md
  45. 13 0
      docs/three-loader-3dtiles.loaderoptions.shading.md
  46. 13 0
      docs/three-loader-3dtiles.loaderoptions.skiplevelofdetail.md
  47. 13 0
      docs/three-loader-3dtiles.loaderoptions.throttlerequests.md
  48. 13 0
      docs/three-loader-3dtiles.loaderoptions.transparent.md
  49. 13 0
      docs/three-loader-3dtiles.loaderoptions.updateinterval.md
  50. 13 0
      docs/three-loader-3dtiles.loaderoptions.updatetransforms.md
  51. 13 0
      docs/three-loader-3dtiles.loaderoptions.viewdistancescale.md
  52. 13 0
      docs/three-loader-3dtiles.loaderoptions.wireframe.md
  53. 13 0
      docs/three-loader-3dtiles.loaderoptions.worker.md
  54. 13 0
      docs/three-loader-3dtiles.loaderprops.loadingmanager.md
  55. 29 0
      docs/three-loader-3dtiles.loaderprops.md
  56. 25 0
      docs/three-loader-3dtiles.loaderprops.onprogress.md
  57. 13 0
      docs/three-loader-3dtiles.loaderprops.options.md
  58. 13 0
      docs/three-loader-3dtiles.loaderprops.renderer.md
  59. 13 0
      docs/three-loader-3dtiles.loaderprops.url.md
  60. 29 0
      docs/three-loader-3dtiles.md
  61. 24 0
      docs/three-loader-3dtiles.pointcloudcoloring.md
  62. 17 0
      docs/three-loader-3dtiles.runtime.dispose.md
  63. 24 0
      docs/three-loader-3dtiles.runtime.getcamerafrustum.md
  64. 24 0
      docs/three-loader-3dtiles.runtime.getlatlongheightfromposition.md
  65. 24 0
      docs/three-loader-3dtiles.runtime.getpositionfromlatlongheight.md
  66. 19 0
      docs/three-loader-3dtiles.runtime.getstats.md
  67. 17 0
      docs/three-loader-3dtiles.runtime.gettileboxes.md
  68. 19 0
      docs/three-loader-3dtiles.runtime.gettileset.md
  69. 38 0
      docs/three-loader-3dtiles.runtime.md
  70. 24 0
      docs/three-loader-3dtiles.runtime.setdebug.md
  71. 24 0
      docs/three-loader-3dtiles.runtime.setelevationrange.md
  72. 24 0
      docs/three-loader-3dtiles.runtime.sethideground.md
  73. 24 0
      docs/three-loader-3dtiles.runtime.setintensitycontrast.md
  74. 24 0
      docs/three-loader-3dtiles.runtime.setmaxintensity.md
  75. 24 0
      docs/three-loader-3dtiles.runtime.setpointalpha.md
  76. 24 0
      docs/three-loader-3dtiles.runtime.setpointcloudcoloring.md
  77. 24 0
      docs/three-loader-3dtiles.runtime.setshading.md
  78. 24 0
      docs/three-loader-3dtiles.runtime.setviewdistancescale.md
  79. 24 0
      docs/three-loader-3dtiles.runtime.setwireframe.md
  80. 24 0
      docs/three-loader-3dtiles.runtime.showtiles.md
  81. 26 0
      docs/three-loader-3dtiles.runtime.update.md
  82. 22 0
      docs/three-loader-3dtiles.shading.md
  83. 131 0
      etc/three-loader-3dtiles.api.md
  84. 200 0
      examples/demos/cesium/index.html
  85. 4 0
      examples/demos/ic_code_black_24dp.svg
  86. 41 0
      examples/demos/index.html
  87. 1 0
      examples/demos/map-overlay/README.md
  88. 256 0
      examples/demos/map-overlay/index.html
  89. 233 0
      examples/demos/realitycapture/index.html
  90. 24 0
      examples/installation/es-module/index.html
  91. 7 0
      examples/installation/es-module/index.js
  92. 7 0
      examples/installation/webpack/README.md
  93. 29 0
      examples/installation/webpack/dist/index.html
  94. 8724 0
      examples/installation/webpack/package-lock.json
  95. 25 0
      examples/installation/webpack/package.json
  96. 88 0
      examples/installation/webpack/src/index.ts
  97. 21 0
      examples/installation/webpack/tsconfig.json
  98. 37 0
      examples/installation/webpack/webpack.config.js
  99. 9 0
      examples/r3f/README.md
  100. 0 0
      examples/r3f/dist/index.html

+ 56 - 0
.drone.yml

@@ -0,0 +1,56 @@
+kind: pipeline
+type: docker
+name: default
+   
+steps:
+  - name: install
+    image: node:14
+    commands:
+      - npm install
+
+  - name: build
+    image: node:14
+    commands:
+      - npm run build:production
+    when:
+      branch:
+      - main
+      - dev
+
+  - name: build-npm
+    image: node:14
+    commands:
+      - npm run build:production
+    when:
+      event:
+      - tag
+
+  - name: test
+    image: node:14
+    commands:
+      - npm run test
+    when:
+      branch:
+      - main
+      - dev
+
+  - name: docs
+    image: node:14
+    commands:
+      - npm run docs:production
+    when:
+      branch:
+      - main
+      - dev
+
+  - name: npm
+    image: plugins/npm
+    settings:
+      token: 
+        from_secret: npm_token
+      email: 
+        from_secret: npm_email
+    when:
+      event:
+      - tag
+

+ 1 - 0
.eslintignore

@@ -0,0 +1 @@
+*.js

+ 13 - 0
.eslintrc.cjs

@@ -0,0 +1,13 @@
+module.exports = {
+  env: {
+    browser: true,
+    es6: true,
+  },
+  parser: '@typescript-eslint/parser',
+  extends: ['plugin:@typescript-eslint/recommended'],
+  parserOptions: {
+    ecmaVersion: 2018,
+    sourceType: 'module',
+  },
+  ignorePatterns: ['dist/**', 'lib/**', 'examples/installation/**']
+}

+ 6 - 0
.gitignore

@@ -0,0 +1,6 @@
+*.swp
+*.swo
+node_modules
+lib
+temp
+dist/three-loader-3dtiles.js*

+ 7 - 0
.prettierrc

@@ -0,0 +1,7 @@
+{
+  "bracketSpacing": true,
+  "printWidth": 120,
+  "singleQuote": true,
+  "tabWidth": 2, 
+  "trailingComma": "all"
+}

+ 59 - 0
CHANGELOG.md

@@ -0,0 +1,59 @@
+## v1.1
+
+### v1.1.17
+ -  Support a three.js loading manager with a specified preloading tiles count. 
+ 
+### v1.1.14
+ -  Support setting point cloud opacity and material transparency.
+
+### v1.1.12
+ -  Point cloud shader fixes: support 16bit intensity values and a custom point size.
+
+### v1.1.10
+- Detect and reset the tileset orientation when it is deeper in the hierarchy (workaround for DJI Terra exports).
+
+### v1.1.8
+- Added a `GeoTransform` option, supporting Web Mercator. New demo with _OpenStreetMap_.
+
+### v1.1.5
+ - Fixed a bug where tileset geo-transformations were not correctly reset to 0.
+ - Dispose KTX2 and DRACO loaders.
+ - Support the `material` option in point cloud tilesets.
+
+### v1.1.4
+ - Bump to Three.js r137.
+
+### v1.1.3
+ - Bump to Three.js r133 and loaders.gl 3.1.4 ([issue #12](https://github.com/nytimes/three-loader-3dtiles/issues/12)).
+ - Remove `loadersGlGltf`, `RDGLTFLoader.js`: Now supporting glTF parsing only via Three.JS.
+ - Remove `initialTransform`: Now supoorting tileset transformation only via setting the matrix of the root Object3D.
+ - Bug fixes in glTF tranversal and tile transformations ([issue #11](https://github.com/nytimes/three-loader-3dtiles/issues/11)).
+ - Support for tilesets with shifted bounding volumes but no `transformMatrix` property (e.g. from _DJI Terra_).
+
+## v1.0
+
+### v1.0.9
+Orientation bug fix for point cloud elevation shader.
+
+### v1.0.8
+Better disposal of materials and textures.
+
+### v1.0.7
+Set tile transform by the root object3d's transform. Update transforms by default.
+
+### v1.0.6
+- Added UMD build.
+
+### v1.0.3
+
+- Fixes for NPM build.
+- Updates Webpack example.
+
+### v1.0.1
+
+- Name change.
+- Drone CI Integration.
+
+### v1.0.0
+
+- First public release!

+ 6 - 0
CODEOWNERS

@@ -0,0 +1,6 @@
+# Each line is a file pattern followed by one or more owners.
+
+# These owners will be the default owners for everything in the
+# repo. Unless a later match takes precedence, these owners will be
+# requested for review when someone opens a pull request.
+* @Avnerus

File diff suppressed because it is too large
+ 47 - 0
CODE_OF_CONDUCT.md


+ 45 - 0
CONTRIBUTING.md

@@ -0,0 +1,45 @@
+# Introduction
+
+Thank you for considering contributing the 3D Tiles loader.
+
+Following these guidelines helps to communicate that you respect the time of the developers managing and developing this open source project. In return, they should reciprocate that respect in addressing your issue, assessing changes, and helping you finalize your pull requests.
+
+There are many ways to contribute, from writing tutorials or blog posts, improving the documentation, submitting bug reports and feature requests or writing code which can be incorporated into the loader itself.
+
+**HINT**: Check the [Roadmap section](https://github.com/nytimes/three-loader-3dtiles#roadmap) in the README, as well as `//TODO` comments within the code hinting at pending tasks.
+
+# Ground Rules
+
+ * Use Typescript and proper typings for all of the code that you write.
+ * Create a test for any new feature.
+ * Write [typedoc comments](https://api-extractor.com/pages/tsdoc/doc_comment_syntax/) for new information.
+ * Ensure cross-browser compatibility for every change. Refer to the `browserslist` field in [package.json](./package.json) for target browsers.
+ * Keep feature versions as small as possible, preferably one new feature per version.
+ * Refer to [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md)
+ 
+
+# Getting started
+
+Build instructions are available in the main [README](./README.md). To contribute, follow these steps:
+
+1. Create your own fork of the code
+2. Do the changes in your fork (**don't forget to write tests and generate documentation!**).
+
+3. If you like the change and think the project could use it. Send a pull request. Thank you!
+
+# How to report a bug
+If you find a security vulnerability, do NOT open an issue. Please report the vulnerability to the person or team maintaining the code. (refer to [SECURITY.md](./SECURITY.md)).
+
+ When filing an issue, make sure to answer these five questions:
+
+1. What version of Three.js you are using?
+2. What browser and operating system are you using? What graphics card?
+3. What did you do?
+4. What did you expect to see?
+5. What did you see instead?
+
+# How to suggest a feature or enhancement
+
+If you find yourself wishing for a feature that doesn't exist in the 3D tiles loader, you are probably not alone. There are bound to be others out there with similar needs. Open an issue on our issues list on GitHub which describes the feature you would like to see, why you need it, and how it should work.
+
+Thank you for contributing!

+ 9 - 0
LICENSE

@@ -0,0 +1,9 @@
+Copyright (c) 2020 The New York Times Company
+ 
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use this library except in compliance with the License.
+You may obtain a copy of the License at
+ 
+[www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
+ 
+Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

+ 7 - 0
SECURITY.md

@@ -0,0 +1,7 @@
+# Security Issues
+
+The New York Times takes security bugs in the NYTimes authored or maintained OSS seriously. We appreciate your efforts to responsibly disclose your findings, and will make every effort to acknowledge your contributions.
+
+To report a security issue, email rd@nytimes.com with security bug title as a subject line and you will get a response indicating the next steps in handing your report.
+
+If you find vulnerabilities in software, libraries or modules used by NYTimes authored or maintained OSS but written by third-party, please report the vulnerability to the person or team maintaining the code. 

+ 30 - 0
api-extractor.json

@@ -0,0 +1,30 @@
+
+{
+  "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
+  "mainEntryPointFilePath": "<projectFolder>/lib/index.d.ts",
+  "apiReport": {
+    "enabled": true,
+    "reportFileName": "three-loader-3dtiles.api.md"
+  },
+  "docModel": {
+    "enabled": true,
+    "apiJsonFilePath": "<projectFolder>/temp/three-loader-3dtiles.api.json"
+  },
+  "dtsRollup": {
+    "enabled": true,
+    "untrimmedFilePath": "<projectFolder>/dist/three-loader-3dtiles.d.ts"
+  },
+  "messages": {
+    "compilerMessageReporting": {
+      "default": {
+        "logLevel": "warning"
+      }
+    },
+    "extractorMessageReporting": {
+      "ae-missing-release-tag": {
+        "logLevel": "none",
+        "addToApiReportFile": false
+      }
+    }
+  }
+}

+ 172 - 0
dist/three-loader-3dtiles.d.ts

@@ -0,0 +1,172 @@
+import { LoadingManager } from 'three';
+import { Material } from 'three';
+import { Object3D } from 'three';
+import { Shader } from 'three';
+import { Stats } from '@probe.gl/stats';
+import { Tileset3D } from '@loaders.gl/tiles';
+import { Vector3 } from 'three';
+import { WebGLRenderer } from 'three';
+
+/** Container object for interfacing with lat/long/height coordinates */
+export declare interface GeoCoord {
+    long: number;
+    lat: number;
+    height: number;
+}
+
+export declare enum GeoTransform {
+    Reset = 1,
+    Mercator = 2,
+    WGS84Cartesian = 3
+}
+
+/** 3D Tiles Loader */
+export declare class Loader3DTiles {
+    /**
+    * Loads a tileset of 3D Tiles according to the given {@link LoaderProps}
+    * @public
+    *
+    * @param props - Properties for this load call {@link LoaderProps}.
+    * @returns An object containing the 3D Model to be added to the scene
+    * and a runtime engine to be updated every frame.
+    */
+    static load(props: LoaderProps): Promise<{
+        model: Object3D;
+        runtime: Runtime;
+    }>;
+}
+
+/** Advanced loader options */
+export declare interface LoaderOptions {
+    /** A Cesium ION access token when loading tilesets from Cesium ION. */
+    cesiumIONToken?: string;
+    /** Whether to check if the tileset was transformed, set to `true` if the model is changes position in runtime. Default: `true` */
+    updateTransforms?: boolean;
+    /** Interval in seconds for the traverser to check in an update is needed - Default: `0.1`. */
+    updateInterval?: number;
+    /** Maximum GPU memory (MB) to use for displaying tiles. May go over the limit if tiles within the camera viewport exceed that ammount - Default: `32`. */
+    maximumMemoryUsage?: number;
+    /** determines the distance from tiles in which they are refined, depending on their geometrical size. increase the value to load lower lod tiles from the same view distance (increases performnace) - default: `16`.*/
+    maximumScreenSpaceError?: number;
+    /** 0-1 scale for the LOD quality. A lower value loads tiles from lower LODs (increases performance). */
+    viewDistanceScale?: number;
+    /** Maximum worker thread concurrency when processing DRACO-compressed tiles - Default: `1` worker. */
+    maxConcurrency?: number;
+    /** Whether to use workers when processing DRACO-compressed tiles - Default: `true`. */
+    worker?: boolean;
+    /** Whether to throttle network requests so that tiles got out of the frame before the request launched, would not be requested - Default: `true` */
+    throttleRequests?: boolean;
+    /** When thorttling requests, how many requests can launch simultaneously - Default: `64` */
+    maxRequests?: number;
+    /** _EXPERIMENTAL_: Skip traversal mechanism, not yet supported. Default: `false` */
+    skipLevelOfDetail?: boolean;
+    /** When viewing b3dm (mesh) tiles, which type of {@link Shading} is used - Default: `Shading.FlatTexture` */
+    shading?: Shading;
+    /** Whether to set the material as transparent - Default: `false` */
+    transparent?: boolean;
+    /** Apply a custom material, supports both b3dm (mesh) tiles and Point Cloud tiles - Default: `undefined` **/
+    material?: Material;
+    /** When viewing b3dm (mesh) tiles, a callback to update shader uniforms - Default: `undefined` */
+    shaderCallback?: (shader: Shader, renderer: WebGLRenderer) => void;
+    /** When viewing b3dm (mesh) tiles, show meshes as wireframe - Default: `false`. */
+    wireframe?: boolean;
+    /** When viewing b3dm (mesh) tiles, compute the vertex normals - Default: `false`. */
+    computeNormals?: boolean;
+    /** When viewing Point Cloud tiles, how should the points be colored ({@link PointCloudColoring}) - Default: `PointCloudColoring.White` */
+    pointCloudColoring?: PointCloudColoring;
+    /** Point size for Point Cloud tiles -  Default: `1.0` */
+    pointSize?: number;
+    /** Debug mode: Show tile bounding boxes. Make sure to add the boxes to the scene from {@link Runtime.getTileBoxes} - Default: `false` */
+    debug?: boolean;
+    /** A path to that contains the basis universal library. e.g: `https://unpkg.com/three@0.129.0/examples/js/libs/basis` - Default: `undefined` */
+    basisTranscoderPath?: string;
+    /** A path to that contains the draco library. e.g: `https://unpkg.com/three@0.129.0/examples/js/libs/draco` - Default: `undefined` */
+    dracoDecoderPath?: string;
+    /** How to handle geo transformations: Reset any geo location and place the model at (0,0,0), Apply Mercator projection (for use with ccommon 2D mapping applications, or convert WGS84 long/lat to 3D cartesian coordinates)- Default: `Reset` */
+    geoTransform?: GeoTransform;
+    /** When using a three.js loading manager, do not call `onLoad` until this number of tiles were loaded - Default: `undefined` */
+    preloadTilesCount?: number;
+}
+
+/** Properties for loading a tileset */
+export declare interface LoaderProps {
+    /** The URL of the tileset. For example if using Cesium ION,
+    * it would have the form: `https://assets.cesium.com/[ASSET_ID]/tileset.json`.
+    */
+    url: string;
+    /** Required when using compressed textures (basis universal) for GPU feature detection. */
+    renderer?: WebGLRenderer;
+    /** Advanced options for loading the tileset ({@link LoaderOptions}) */
+    options?: LoaderOptions;
+    /** a loading progress callback function */
+    onProgress?(progress: number | ProgressEvent<EventTarget>, total?: number): void;
+    /** Use a Three JS loading manager */
+    loadingManager?: LoadingManager;
+}
+
+/** Types of coloring used when viewing point cloud tiles */
+export declare enum PointCloudColoring {
+    Intensity = 1,
+    Classification = 2,
+    Elevation = 3,
+    RGB = 4,
+    White = 5
+}
+
+/** Runtime methods that can be used once a tileset is loaded */
+export declare interface Runtime {
+    /**
+    * Get a reference to the loaders.gl {@link https://github.com/visgl/loaders.gl/blob/master/modules/tiles/docs/api-reference/tileset-3d.md | Tileset3D} object.
+    *
+    * @returns {@link https://github.com/visgl/loaders.gl/blob/master/modules/tiles/docs/api-reference/tileset-3d.md | Tileset3D}
+    */
+    getTileset(): Tileset3D;
+    /**
+    * Get a reference to the probe.gl {@link https://github.com/uber-web/probe.gl/blob/master/docs/api-reference/stats/stats.md | Stats} object.
+    * @returns {@link https://github.com/uber-web/probe.gl/blob/master/docs/api-reference/stats/stats.md | Stats}
+    */
+    getStats(): Stats;
+    /** Get the tile bounding boxes group when `debug: true` is set. */
+    getTileBoxes(): Object3D;
+    /** Show or hide the tile bounding boxes. */
+    showTiles(boolean: any): void;
+    /** Enable or disable wireframe mode. */
+    setWireframe(boolean: any): void;
+    /** Enable or disable deubg mode. */
+    setDebug(boolean: any): void;
+    /** Set the current shading mode for b3dm tiles. See {@link Shading}. */
+    setShading(Shading: any): void;
+    /** Set the current view distance scale. See {@link LoaderOptions} */
+    setViewDistanceScale(number: any): void;
+    /** In point clouds wher the points are classified as `Ground`, hide the ground level points - Default: `false`.*/
+    setHideGround(boolean: any): void;
+    /** In point clouds set the type of coloring used. See {@link PointCloudColoring} */
+    setPointCloudColoring(PointCloudColoring: any): void;
+    /** In point clouds when coloring by `PointCloudColoring.Elevation`, set the min/max elevation values - Default: `[0, 400]`. */
+    setElevationRange(range: ReadonlyArray<number>): void;
+    /** In point clouds when coloring by `PointCloudColoring.Intensity`, set the max intensity value -  Default: `1.0` */
+    setMaxIntensity(number: any): void;
+    /** In point clouds when coloring by `PointCloudColoring.Intensity`, set the contrast factor. Default: `1.0`. */
+    setIntensityContrast(number: any): void;
+    /** In point clouds when, set the alpha value. Default: `1.0`. */
+    setPointAlpha(number: any): void;
+    /** When viewing a Geo-located tileset, get the {@link GeoCoord} value from a world-space `Vector3`. */
+    getLatLongHeightFromPosition(Vector3: any): GeoCoord;
+    /** When viewing a Geo-located tileset, world-space `Vector3` from a {@link GeoCoord}. */
+    getPositionFromLatLongHeight(GeoCoord: any): Vector3;
+    /** Get the current camera frustum as mesh planes (for debugging purposes). */
+    getCameraFrustum(Camera: any): Object3D;
+    /** Update the tileset for rendering. */
+    update(number: any, WebGLRenderer: any, Camera: any): void;
+    /** Dispose of all of the tileset's assets in memory. */
+    dispose(): void;
+}
+
+/** Types of shading used when viewing b3dm (mesh) tiles */
+export declare enum Shading {
+    FlatTexture = 1,
+    ShadedTexture = 2,
+    ShadedNoTexture = 3
+}
+
+export { }

File diff suppressed because it is too large
+ 17768 - 0
dist/three-loader-3dtiles.esm.js


File diff suppressed because it is too large
+ 1 - 0
dist/three-loader-3dtiles.esm.js.map


File diff suppressed because it is too large
+ 16 - 0
dist/three-loader-3dtiles.esm.min.js


File diff suppressed because it is too large
+ 1 - 0
dist/three-loader-3dtiles.esm.min.js.map


File diff suppressed because it is too large
+ 16 - 0
dist/three-loader-3dtiles.min.js


File diff suppressed because it is too large
+ 1 - 0
dist/three-loader-3dtiles.min.js.map


+ 11 - 0
dist/tsdoc-metadata.json

@@ -0,0 +1,11 @@
+// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
+// It should be published with your NPM package.  It should not be tracked by Git.
+{
+  "tsdocVersion": "0.12",
+  "toolPackages": [
+    {
+      "packageName": "@microsoft/api-extractor",
+      "packageVersion": "7.17.0"
+    }
+  ]
+}

+ 12 - 0
docs/index.md

@@ -0,0 +1,12 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md)
+
+## API Reference
+
+## Packages
+
+|  Package | Description |
+|  --- | --- |
+|  [three-loader-3dtiles](./three-loader-3dtiles.md) |  |
+

+ 11 - 0
docs/three-loader-3dtiles.geocoord.height.md

@@ -0,0 +1,11 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [GeoCoord](./three-loader-3dtiles.geocoord.md) &gt; [height](./three-loader-3dtiles.geocoord.height.md)
+
+## GeoCoord.height property
+
+<b>Signature:</b>
+
+```typescript
+height: number;
+```

+ 11 - 0
docs/three-loader-3dtiles.geocoord.lat.md

@@ -0,0 +1,11 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [GeoCoord](./three-loader-3dtiles.geocoord.md) &gt; [lat](./three-loader-3dtiles.geocoord.lat.md)
+
+## GeoCoord.lat property
+
+<b>Signature:</b>
+
+```typescript
+lat: number;
+```

+ 11 - 0
docs/three-loader-3dtiles.geocoord.long.md

@@ -0,0 +1,11 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [GeoCoord](./three-loader-3dtiles.geocoord.md) &gt; [long](./three-loader-3dtiles.geocoord.long.md)
+
+## GeoCoord.long property
+
+<b>Signature:</b>
+
+```typescript
+long: number;
+```

+ 22 - 0
docs/three-loader-3dtiles.geocoord.md

@@ -0,0 +1,22 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [GeoCoord](./three-loader-3dtiles.geocoord.md)
+
+## GeoCoord interface
+
+Container object for interfacing with lat/long/height coordinates
+
+<b>Signature:</b>
+
+```typescript
+interface GeoCoord 
+```
+
+## Properties
+
+|  Property | Type | Description |
+|  --- | --- | --- |
+|  [height](./three-loader-3dtiles.geocoord.height.md) | number |  |
+|  [lat](./three-loader-3dtiles.geocoord.lat.md) | number |  |
+|  [long](./three-loader-3dtiles.geocoord.long.md) | number |  |
+

+ 20 - 0
docs/three-loader-3dtiles.geotransform.md

@@ -0,0 +1,20 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [GeoTransform](./three-loader-3dtiles.geotransform.md)
+
+## GeoTransform enum
+
+<b>Signature:</b>
+
+```typescript
+declare enum GeoTransform 
+```
+
+## Enumeration Members
+
+|  Member | Value | Description |
+|  --- | --- | --- |
+|  Mercator | <code>2</code> |  |
+|  Reset | <code>1</code> |  |
+|  WGS84Cartesian | <code>3</code> |  |
+

+ 29 - 0
docs/three-loader-3dtiles.loader3dtiles.load.md

@@ -0,0 +1,29 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [Loader3DTiles](./three-loader-3dtiles.loader3dtiles.md) &gt; [load](./three-loader-3dtiles.loader3dtiles.load.md)
+
+## Loader3DTiles.load() method
+
+Loads a tileset of 3D Tiles according to the given [LoaderProps](./three-loader-3dtiles.loaderprops.md)
+
+<b>Signature:</b>
+
+```typescript
+static load(props: LoaderProps): Promise<{
+        model: Object3D;
+        runtime: Runtime;
+    }>;
+```
+
+## Parameters
+
+|  Parameter | Type | Description |
+|  --- | --- | --- |
+|  props | LoaderProps | Properties for this load call [LoaderProps](./three-loader-3dtiles.loaderprops.md)<!-- -->. |
+
+<b>Returns:</b>
+
+Promise&lt;{ model: Object3D; runtime: Runtime; }&gt;
+
+An object containing the 3D Model to be added to the scene and a runtime engine to be updated every frame.
+

+ 20 - 0
docs/three-loader-3dtiles.loader3dtiles.md

@@ -0,0 +1,20 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [Loader3DTiles](./three-loader-3dtiles.loader3dtiles.md)
+
+## Loader3DTiles class
+
+3D Tiles Loader
+
+<b>Signature:</b>
+
+```typescript
+declare class Loader3DTiles 
+```
+
+## Methods
+
+|  Method | Modifiers | Description |
+|  --- | --- | --- |
+|  [load(props)](./three-loader-3dtiles.loader3dtiles.load.md) | <code>static</code> | Loads a tileset of 3D Tiles according to the given [LoaderProps](./three-loader-3dtiles.loaderprops.md) |
+

+ 13 - 0
docs/three-loader-3dtiles.loaderoptions.basistranscoderpath.md

@@ -0,0 +1,13 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [LoaderOptions](./three-loader-3dtiles.loaderoptions.md) &gt; [basisTranscoderPath](./three-loader-3dtiles.loaderoptions.basistranscoderpath.md)
+
+## LoaderOptions.basisTranscoderPath property
+
+A path to that contains the basis universal library. e.g: `https://unpkg.com/three@0.129.0/examples/js/libs/basis` - Default: `undefined`
+
+<b>Signature:</b>
+
+```typescript
+basisTranscoderPath?: string;
+```

+ 13 - 0
docs/three-loader-3dtiles.loaderoptions.cesiumiontoken.md

@@ -0,0 +1,13 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [LoaderOptions](./three-loader-3dtiles.loaderoptions.md) &gt; [cesiumIONToken](./three-loader-3dtiles.loaderoptions.cesiumiontoken.md)
+
+## LoaderOptions.cesiumIONToken property
+
+A Cesium ION access token when loading tilesets from Cesium ION.
+
+<b>Signature:</b>
+
+```typescript
+cesiumIONToken?: string;
+```

+ 13 - 0
docs/three-loader-3dtiles.loaderoptions.computenormals.md

@@ -0,0 +1,13 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [LoaderOptions](./three-loader-3dtiles.loaderoptions.md) &gt; [computeNormals](./three-loader-3dtiles.loaderoptions.computenormals.md)
+
+## LoaderOptions.computeNormals property
+
+When viewing b3dm (mesh) tiles, compute the vertex normals - Default: `false`<!-- -->.
+
+<b>Signature:</b>
+
+```typescript
+computeNormals?: boolean;
+```

+ 13 - 0
docs/three-loader-3dtiles.loaderoptions.debug.md

@@ -0,0 +1,13 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [LoaderOptions](./three-loader-3dtiles.loaderoptions.md) &gt; [debug](./three-loader-3dtiles.loaderoptions.debug.md)
+
+## LoaderOptions.debug property
+
+Debug mode: Show tile bounding boxes. Make sure to add the boxes to the scene from [Runtime.getTileBoxes()](./three-loader-3dtiles.runtime.gettileboxes.md) - Default: `false`
+
+<b>Signature:</b>
+
+```typescript
+debug?: boolean;
+```

+ 13 - 0
docs/three-loader-3dtiles.loaderoptions.dracodecoderpath.md

@@ -0,0 +1,13 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [LoaderOptions](./three-loader-3dtiles.loaderoptions.md) &gt; [dracoDecoderPath](./three-loader-3dtiles.loaderoptions.dracodecoderpath.md)
+
+## LoaderOptions.dracoDecoderPath property
+
+A path to that contains the draco library. e.g: `https://unpkg.com/three@0.129.0/examples/js/libs/draco` - Default: `undefined`
+
+<b>Signature:</b>
+
+```typescript
+dracoDecoderPath?: string;
+```

+ 13 - 0
docs/three-loader-3dtiles.loaderoptions.geotransform.md

@@ -0,0 +1,13 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [LoaderOptions](./three-loader-3dtiles.loaderoptions.md) &gt; [geoTransform](./three-loader-3dtiles.loaderoptions.geotransform.md)
+
+## LoaderOptions.geoTransform property
+
+How to handle geo transformations: Reset any geo location and place the model at (0,0,0), Apply Mercator projection (for use with ccommon 2D mapping applications, or convert WGS84 long/lat to 3D cartesian coordinates)- Default: `Reset`
+
+<b>Signature:</b>
+
+```typescript
+geoTransform?: GeoTransform;
+```

+ 13 - 0
docs/three-loader-3dtiles.loaderoptions.material.md

@@ -0,0 +1,13 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [LoaderOptions](./three-loader-3dtiles.loaderoptions.md) &gt; [material](./three-loader-3dtiles.loaderoptions.material.md)
+
+## LoaderOptions.material property
+
+Apply a custom material, supports both b3dm (mesh) tiles and Point Cloud tiles - Default: `undefined` \*
+
+<b>Signature:</b>
+
+```typescript
+material?: Material;
+```

+ 13 - 0
docs/three-loader-3dtiles.loaderoptions.maxconcurrency.md

@@ -0,0 +1,13 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [LoaderOptions](./three-loader-3dtiles.loaderoptions.md) &gt; [maxConcurrency](./three-loader-3dtiles.loaderoptions.maxconcurrency.md)
+
+## LoaderOptions.maxConcurrency property
+
+Maximum worker thread concurrency when processing DRACO-compressed tiles - Default: `1` worker.
+
+<b>Signature:</b>
+
+```typescript
+maxConcurrency?: number;
+```

+ 13 - 0
docs/three-loader-3dtiles.loaderoptions.maximummemoryusage.md

@@ -0,0 +1,13 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [LoaderOptions](./three-loader-3dtiles.loaderoptions.md) &gt; [maximumMemoryUsage](./three-loader-3dtiles.loaderoptions.maximummemoryusage.md)
+
+## LoaderOptions.maximumMemoryUsage property
+
+Maximum GPU memory (MB) to use for displaying tiles. May go over the limit if tiles within the camera viewport exceed that ammount - Default: `32`<!-- -->.
+
+<b>Signature:</b>
+
+```typescript
+maximumMemoryUsage?: number;
+```

+ 13 - 0
docs/three-loader-3dtiles.loaderoptions.maximumscreenspaceerror.md

@@ -0,0 +1,13 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [LoaderOptions](./three-loader-3dtiles.loaderoptions.md) &gt; [maximumScreenSpaceError](./three-loader-3dtiles.loaderoptions.maximumscreenspaceerror.md)
+
+## LoaderOptions.maximumScreenSpaceError property
+
+determines the distance from tiles in which they are refined, depending on their geometrical size. increase the value to load lower lod tiles from the same view distance (increases performnace) - default: `16`<!-- -->.
+
+<b>Signature:</b>
+
+```typescript
+maximumScreenSpaceError?: number;
+```

+ 13 - 0
docs/three-loader-3dtiles.loaderoptions.maxrequests.md

@@ -0,0 +1,13 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [LoaderOptions](./three-loader-3dtiles.loaderoptions.md) &gt; [maxRequests](./three-loader-3dtiles.loaderoptions.maxrequests.md)
+
+## LoaderOptions.maxRequests property
+
+When thorttling requests, how many requests can launch simultaneously - Default: `64`
+
+<b>Signature:</b>
+
+```typescript
+maxRequests?: number;
+```

+ 43 - 0
docs/three-loader-3dtiles.loaderoptions.md

@@ -0,0 +1,43 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [LoaderOptions](./three-loader-3dtiles.loaderoptions.md)
+
+## LoaderOptions interface
+
+Advanced loader options
+
+<b>Signature:</b>
+
+```typescript
+interface LoaderOptions 
+```
+
+## Properties
+
+|  Property | Type | Description |
+|  --- | --- | --- |
+|  [basisTranscoderPath?](./three-loader-3dtiles.loaderoptions.basistranscoderpath.md) | string | <i>(Optional)</i> A path to that contains the basis universal library. e.g: <code>https://unpkg.com/three@0.129.0/examples/js/libs/basis</code> - Default: <code>undefined</code> |
+|  [cesiumIONToken?](./three-loader-3dtiles.loaderoptions.cesiumiontoken.md) | string | <i>(Optional)</i> A Cesium ION access token when loading tilesets from Cesium ION. |
+|  [computeNormals?](./three-loader-3dtiles.loaderoptions.computenormals.md) | boolean | <i>(Optional)</i> When viewing b3dm (mesh) tiles, compute the vertex normals - Default: <code>false</code>. |
+|  [debug?](./three-loader-3dtiles.loaderoptions.debug.md) | boolean | <i>(Optional)</i> Debug mode: Show tile bounding boxes. Make sure to add the boxes to the scene from [Runtime.getTileBoxes()](./three-loader-3dtiles.runtime.gettileboxes.md) - Default: <code>false</code> |
+|  [dracoDecoderPath?](./three-loader-3dtiles.loaderoptions.dracodecoderpath.md) | string | <i>(Optional)</i> A path to that contains the draco library. e.g: <code>https://unpkg.com/three@0.129.0/examples/js/libs/draco</code> - Default: <code>undefined</code> |
+|  [geoTransform?](./three-loader-3dtiles.loaderoptions.geotransform.md) | GeoTransform | <i>(Optional)</i> How to handle geo transformations: Reset any geo location and place the model at (0,0,0), Apply Mercator projection (for use with ccommon 2D mapping applications, or convert WGS84 long/lat to 3D cartesian coordinates)- Default: <code>Reset</code> |
+|  [material?](./three-loader-3dtiles.loaderoptions.material.md) | Material | <i>(Optional)</i> Apply a custom material, supports both b3dm (mesh) tiles and Point Cloud tiles - Default: <code>undefined</code> \* |
+|  [maxConcurrency?](./three-loader-3dtiles.loaderoptions.maxconcurrency.md) | number | <i>(Optional)</i> Maximum worker thread concurrency when processing DRACO-compressed tiles - Default: <code>1</code> worker. |
+|  [maximumMemoryUsage?](./three-loader-3dtiles.loaderoptions.maximummemoryusage.md) | number | <i>(Optional)</i> Maximum GPU memory (MB) to use for displaying tiles. May go over the limit if tiles within the camera viewport exceed that ammount - Default: <code>32</code>. |
+|  [maximumScreenSpaceError?](./three-loader-3dtiles.loaderoptions.maximumscreenspaceerror.md) | number | <i>(Optional)</i> determines the distance from tiles in which they are refined, depending on their geometrical size. increase the value to load lower lod tiles from the same view distance (increases performnace) - default: <code>16</code>. |
+|  [maxRequests?](./three-loader-3dtiles.loaderoptions.maxrequests.md) | number | <i>(Optional)</i> When thorttling requests, how many requests can launch simultaneously - Default: <code>64</code> |
+|  [pointCloudColoring?](./three-loader-3dtiles.loaderoptions.pointcloudcoloring.md) | PointCloudColoring | <i>(Optional)</i> When viewing Point Cloud tiles, how should the points be colored ([PointCloudColoring](./three-loader-3dtiles.pointcloudcoloring.md)<!-- -->) - Default: <code>PointCloudColoring.White</code> |
+|  [pointSize?](./three-loader-3dtiles.loaderoptions.pointsize.md) | number | <i>(Optional)</i> Point size for Point Cloud tiles - Default: <code>1.0</code> |
+|  [preloadTilesCount?](./three-loader-3dtiles.loaderoptions.preloadtilescount.md) | number | <i>(Optional)</i> When using a three.js loading manager, do not call <code>onLoad</code> until this number of tiles were loaded - Default: <code>undefined</code> |
+|  [shaderCallback?](./three-loader-3dtiles.loaderoptions.shadercallback.md) | (shader: Shader, renderer: WebGLRenderer) =&gt; void | <i>(Optional)</i> When viewing b3dm (mesh) tiles, a callback to update shader uniforms - Default: <code>undefined</code> |
+|  [shading?](./three-loader-3dtiles.loaderoptions.shading.md) | Shading | <i>(Optional)</i> When viewing b3dm (mesh) tiles, which type of [Shading](./three-loader-3dtiles.shading.md) is used - Default: <code>Shading.FlatTexture</code> |
+|  [skipLevelOfDetail?](./three-loader-3dtiles.loaderoptions.skiplevelofdetail.md) | boolean | <i>(Optional)</i> \_EXPERIMENTAL\_: Skip traversal mechanism, not yet supported. Default: <code>false</code> |
+|  [throttleRequests?](./three-loader-3dtiles.loaderoptions.throttlerequests.md) | boolean | <i>(Optional)</i> Whether to throttle network requests so that tiles got out of the frame before the request launched, would not be requested - Default: <code>true</code> |
+|  [transparent?](./three-loader-3dtiles.loaderoptions.transparent.md) | boolean | <i>(Optional)</i> Whether to set the material as transparent - Default: <code>false</code> |
+|  [updateInterval?](./three-loader-3dtiles.loaderoptions.updateinterval.md) | number | <i>(Optional)</i> Interval in seconds for the traverser to check in an update is needed - Default: <code>0.1</code>. |
+|  [updateTransforms?](./three-loader-3dtiles.loaderoptions.updatetransforms.md) | boolean | <i>(Optional)</i> Whether to check if the tileset was transformed, set to <code>true</code> if the model is changes position in runtime. Default: <code>true</code> |
+|  [viewDistanceScale?](./three-loader-3dtiles.loaderoptions.viewdistancescale.md) | number | <i>(Optional)</i> 0-1 scale for the LOD quality. A lower value loads tiles from lower LODs (increases performance). |
+|  [wireframe?](./three-loader-3dtiles.loaderoptions.wireframe.md) | boolean | <i>(Optional)</i> When viewing b3dm (mesh) tiles, show meshes as wireframe - Default: <code>false</code>. |
+|  [worker?](./three-loader-3dtiles.loaderoptions.worker.md) | boolean | <i>(Optional)</i> Whether to use workers when processing DRACO-compressed tiles - Default: <code>true</code>. |
+

+ 13 - 0
docs/three-loader-3dtiles.loaderoptions.pointcloudcoloring.md

@@ -0,0 +1,13 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [LoaderOptions](./three-loader-3dtiles.loaderoptions.md) &gt; [pointCloudColoring](./three-loader-3dtiles.loaderoptions.pointcloudcoloring.md)
+
+## LoaderOptions.pointCloudColoring property
+
+When viewing Point Cloud tiles, how should the points be colored ([PointCloudColoring](./three-loader-3dtiles.pointcloudcoloring.md)<!-- -->) - Default: `PointCloudColoring.White`
+
+<b>Signature:</b>
+
+```typescript
+pointCloudColoring?: PointCloudColoring;
+```

+ 13 - 0
docs/three-loader-3dtiles.loaderoptions.pointsize.md

@@ -0,0 +1,13 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [LoaderOptions](./three-loader-3dtiles.loaderoptions.md) &gt; [pointSize](./three-loader-3dtiles.loaderoptions.pointsize.md)
+
+## LoaderOptions.pointSize property
+
+Point size for Point Cloud tiles - Default: `1.0`
+
+<b>Signature:</b>
+
+```typescript
+pointSize?: number;
+```

+ 13 - 0
docs/three-loader-3dtiles.loaderoptions.preloadtilescount.md

@@ -0,0 +1,13 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [LoaderOptions](./three-loader-3dtiles.loaderoptions.md) &gt; [preloadTilesCount](./three-loader-3dtiles.loaderoptions.preloadtilescount.md)
+
+## LoaderOptions.preloadTilesCount property
+
+When using a three.js loading manager, do not call `onLoad` until this number of tiles were loaded - Default: `undefined`
+
+<b>Signature:</b>
+
+```typescript
+preloadTilesCount?: number;
+```

+ 13 - 0
docs/three-loader-3dtiles.loaderoptions.shadercallback.md

@@ -0,0 +1,13 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [LoaderOptions](./three-loader-3dtiles.loaderoptions.md) &gt; [shaderCallback](./three-loader-3dtiles.loaderoptions.shadercallback.md)
+
+## LoaderOptions.shaderCallback property
+
+When viewing b3dm (mesh) tiles, a callback to update shader uniforms - Default: `undefined`
+
+<b>Signature:</b>
+
+```typescript
+shaderCallback?: (shader: Shader, renderer: WebGLRenderer) => void;
+```

+ 13 - 0
docs/three-loader-3dtiles.loaderoptions.shading.md

@@ -0,0 +1,13 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [LoaderOptions](./three-loader-3dtiles.loaderoptions.md) &gt; [shading](./three-loader-3dtiles.loaderoptions.shading.md)
+
+## LoaderOptions.shading property
+
+When viewing b3dm (mesh) tiles, which type of [Shading](./three-loader-3dtiles.shading.md) is used - Default: `Shading.FlatTexture`
+
+<b>Signature:</b>
+
+```typescript
+shading?: Shading;
+```

+ 13 - 0
docs/three-loader-3dtiles.loaderoptions.skiplevelofdetail.md

@@ -0,0 +1,13 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [LoaderOptions](./three-loader-3dtiles.loaderoptions.md) &gt; [skipLevelOfDetail](./three-loader-3dtiles.loaderoptions.skiplevelofdetail.md)
+
+## LoaderOptions.skipLevelOfDetail property
+
+\_EXPERIMENTAL\_: Skip traversal mechanism, not yet supported. Default: `false`
+
+<b>Signature:</b>
+
+```typescript
+skipLevelOfDetail?: boolean;
+```

+ 13 - 0
docs/three-loader-3dtiles.loaderoptions.throttlerequests.md

@@ -0,0 +1,13 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [LoaderOptions](./three-loader-3dtiles.loaderoptions.md) &gt; [throttleRequests](./three-loader-3dtiles.loaderoptions.throttlerequests.md)
+
+## LoaderOptions.throttleRequests property
+
+Whether to throttle network requests so that tiles got out of the frame before the request launched, would not be requested - Default: `true`
+
+<b>Signature:</b>
+
+```typescript
+throttleRequests?: boolean;
+```

+ 13 - 0
docs/three-loader-3dtiles.loaderoptions.transparent.md

@@ -0,0 +1,13 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [LoaderOptions](./three-loader-3dtiles.loaderoptions.md) &gt; [transparent](./three-loader-3dtiles.loaderoptions.transparent.md)
+
+## LoaderOptions.transparent property
+
+Whether to set the material as transparent - Default: `false`
+
+<b>Signature:</b>
+
+```typescript
+transparent?: boolean;
+```

+ 13 - 0
docs/three-loader-3dtiles.loaderoptions.updateinterval.md

@@ -0,0 +1,13 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [LoaderOptions](./three-loader-3dtiles.loaderoptions.md) &gt; [updateInterval](./three-loader-3dtiles.loaderoptions.updateinterval.md)
+
+## LoaderOptions.updateInterval property
+
+Interval in seconds for the traverser to check in an update is needed - Default: `0.1`<!-- -->.
+
+<b>Signature:</b>
+
+```typescript
+updateInterval?: number;
+```

+ 13 - 0
docs/three-loader-3dtiles.loaderoptions.updatetransforms.md

@@ -0,0 +1,13 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [LoaderOptions](./three-loader-3dtiles.loaderoptions.md) &gt; [updateTransforms](./three-loader-3dtiles.loaderoptions.updatetransforms.md)
+
+## LoaderOptions.updateTransforms property
+
+Whether to check if the tileset was transformed, set to `true` if the model is changes position in runtime. Default: `true`
+
+<b>Signature:</b>
+
+```typescript
+updateTransforms?: boolean;
+```

+ 13 - 0
docs/three-loader-3dtiles.loaderoptions.viewdistancescale.md

@@ -0,0 +1,13 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [LoaderOptions](./three-loader-3dtiles.loaderoptions.md) &gt; [viewDistanceScale](./three-loader-3dtiles.loaderoptions.viewdistancescale.md)
+
+## LoaderOptions.viewDistanceScale property
+
+0-1 scale for the LOD quality. A lower value loads tiles from lower LODs (increases performance).
+
+<b>Signature:</b>
+
+```typescript
+viewDistanceScale?: number;
+```

+ 13 - 0
docs/three-loader-3dtiles.loaderoptions.wireframe.md

@@ -0,0 +1,13 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [LoaderOptions](./three-loader-3dtiles.loaderoptions.md) &gt; [wireframe](./three-loader-3dtiles.loaderoptions.wireframe.md)
+
+## LoaderOptions.wireframe property
+
+When viewing b3dm (mesh) tiles, show meshes as wireframe - Default: `false`<!-- -->.
+
+<b>Signature:</b>
+
+```typescript
+wireframe?: boolean;
+```

+ 13 - 0
docs/three-loader-3dtiles.loaderoptions.worker.md

@@ -0,0 +1,13 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [LoaderOptions](./three-loader-3dtiles.loaderoptions.md) &gt; [worker](./three-loader-3dtiles.loaderoptions.worker.md)
+
+## LoaderOptions.worker property
+
+Whether to use workers when processing DRACO-compressed tiles - Default: `true`<!-- -->.
+
+<b>Signature:</b>
+
+```typescript
+worker?: boolean;
+```

+ 13 - 0
docs/three-loader-3dtiles.loaderprops.loadingmanager.md

@@ -0,0 +1,13 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [LoaderProps](./three-loader-3dtiles.loaderprops.md) &gt; [loadingManager](./three-loader-3dtiles.loaderprops.loadingmanager.md)
+
+## LoaderProps.loadingManager property
+
+Use a Three JS loading manager
+
+<b>Signature:</b>
+
+```typescript
+loadingManager?: LoadingManager;
+```

+ 29 - 0
docs/three-loader-3dtiles.loaderprops.md

@@ -0,0 +1,29 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [LoaderProps](./three-loader-3dtiles.loaderprops.md)
+
+## LoaderProps interface
+
+Properties for loading a tileset
+
+<b>Signature:</b>
+
+```typescript
+interface LoaderProps 
+```
+
+## Properties
+
+|  Property | Type | Description |
+|  --- | --- | --- |
+|  [loadingManager?](./three-loader-3dtiles.loaderprops.loadingmanager.md) | LoadingManager | <i>(Optional)</i> Use a Three JS loading manager |
+|  [options?](./three-loader-3dtiles.loaderprops.options.md) | LoaderOptions | <i>(Optional)</i> Advanced options for loading the tileset ([LoaderOptions](./three-loader-3dtiles.loaderoptions.md)<!-- -->) |
+|  [renderer?](./three-loader-3dtiles.loaderprops.renderer.md) | WebGLRenderer | <i>(Optional)</i> Required when using compressed textures (basis universal) for GPU feature detection. |
+|  [url](./three-loader-3dtiles.loaderprops.url.md) | string | The URL of the tileset. For example if using Cesium ION, it would have the form: <code>https://assets.cesium.com/[ASSET_ID]/tileset.json</code>. |
+
+## Methods
+
+|  Method | Description |
+|  --- | --- |
+|  [onProgress(progress, total)?](./three-loader-3dtiles.loaderprops.onprogress.md) | <i>(Optional)</i> a loading progress callback function |
+

+ 25 - 0
docs/three-loader-3dtiles.loaderprops.onprogress.md

@@ -0,0 +1,25 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [LoaderProps](./three-loader-3dtiles.loaderprops.md) &gt; [onProgress](./three-loader-3dtiles.loaderprops.onprogress.md)
+
+## LoaderProps.onProgress() method
+
+a loading progress callback function
+
+<b>Signature:</b>
+
+```typescript
+onProgress?(progress: number | ProgressEvent<EventTarget>, total?: number): void;
+```
+
+## Parameters
+
+|  Parameter | Type | Description |
+|  --- | --- | --- |
+|  progress | number \| ProgressEvent&lt;EventTarget&gt; |  |
+|  total | number |  |
+
+<b>Returns:</b>
+
+void
+

+ 13 - 0
docs/three-loader-3dtiles.loaderprops.options.md

@@ -0,0 +1,13 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [LoaderProps](./three-loader-3dtiles.loaderprops.md) &gt; [options](./three-loader-3dtiles.loaderprops.options.md)
+
+## LoaderProps.options property
+
+Advanced options for loading the tileset ([LoaderOptions](./three-loader-3dtiles.loaderoptions.md)<!-- -->)
+
+<b>Signature:</b>
+
+```typescript
+options?: LoaderOptions;
+```

+ 13 - 0
docs/three-loader-3dtiles.loaderprops.renderer.md

@@ -0,0 +1,13 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [LoaderProps](./three-loader-3dtiles.loaderprops.md) &gt; [renderer](./three-loader-3dtiles.loaderprops.renderer.md)
+
+## LoaderProps.renderer property
+
+Required when using compressed textures (basis universal) for GPU feature detection.
+
+<b>Signature:</b>
+
+```typescript
+renderer?: WebGLRenderer;
+```

+ 13 - 0
docs/three-loader-3dtiles.loaderprops.url.md

@@ -0,0 +1,13 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [LoaderProps](./three-loader-3dtiles.loaderprops.md) &gt; [url](./three-loader-3dtiles.loaderprops.url.md)
+
+## LoaderProps.url property
+
+The URL of the tileset. For example if using Cesium ION, it would have the form: `https://assets.cesium.com/[ASSET_ID]/tileset.json`<!-- -->.
+
+<b>Signature:</b>
+
+```typescript
+url: string;
+```

+ 29 - 0
docs/three-loader-3dtiles.md

@@ -0,0 +1,29 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md)
+
+## three-loader-3dtiles package
+
+## Classes
+
+|  Class | Description |
+|  --- | --- |
+|  [Loader3DTiles](./three-loader-3dtiles.loader3dtiles.md) | 3D Tiles Loader |
+
+## Enumerations
+
+|  Enumeration | Description |
+|  --- | --- |
+|  [GeoTransform](./three-loader-3dtiles.geotransform.md) |  |
+|  [PointCloudColoring](./three-loader-3dtiles.pointcloudcoloring.md) | Types of coloring used when viewing point cloud tiles |
+|  [Shading](./three-loader-3dtiles.shading.md) | Types of shading used when viewing b3dm (mesh) tiles |
+
+## Interfaces
+
+|  Interface | Description |
+|  --- | --- |
+|  [GeoCoord](./three-loader-3dtiles.geocoord.md) | Container object for interfacing with lat/long/height coordinates |
+|  [LoaderOptions](./three-loader-3dtiles.loaderoptions.md) | Advanced loader options |
+|  [LoaderProps](./three-loader-3dtiles.loaderprops.md) | Properties for loading a tileset |
+|  [Runtime](./three-loader-3dtiles.runtime.md) | Runtime methods that can be used once a tileset is loaded |
+

+ 24 - 0
docs/three-loader-3dtiles.pointcloudcoloring.md

@@ -0,0 +1,24 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [PointCloudColoring](./three-loader-3dtiles.pointcloudcoloring.md)
+
+## PointCloudColoring enum
+
+Types of coloring used when viewing point cloud tiles
+
+<b>Signature:</b>
+
+```typescript
+declare enum PointCloudColoring 
+```
+
+## Enumeration Members
+
+|  Member | Value | Description |
+|  --- | --- | --- |
+|  Classification | <code>2</code> |  |
+|  Elevation | <code>3</code> |  |
+|  Intensity | <code>1</code> |  |
+|  RGB | <code>4</code> |  |
+|  White | <code>5</code> |  |
+

+ 17 - 0
docs/three-loader-3dtiles.runtime.dispose.md

@@ -0,0 +1,17 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [Runtime](./three-loader-3dtiles.runtime.md) &gt; [dispose](./three-loader-3dtiles.runtime.dispose.md)
+
+## Runtime.dispose() method
+
+Dispose of all of the tileset's assets in memory.
+
+<b>Signature:</b>
+
+```typescript
+dispose(): void;
+```
+<b>Returns:</b>
+
+void
+

+ 24 - 0
docs/three-loader-3dtiles.runtime.getcamerafrustum.md

@@ -0,0 +1,24 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [Runtime](./three-loader-3dtiles.runtime.md) &gt; [getCameraFrustum](./three-loader-3dtiles.runtime.getcamerafrustum.md)
+
+## Runtime.getCameraFrustum() method
+
+Get the current camera frustum as mesh planes (for debugging purposes).
+
+<b>Signature:</b>
+
+```typescript
+getCameraFrustum(Camera: any): Object3D;
+```
+
+## Parameters
+
+|  Parameter | Type | Description |
+|  --- | --- | --- |
+|  Camera | any |  |
+
+<b>Returns:</b>
+
+Object3D
+

+ 24 - 0
docs/three-loader-3dtiles.runtime.getlatlongheightfromposition.md

@@ -0,0 +1,24 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [Runtime](./three-loader-3dtiles.runtime.md) &gt; [getLatLongHeightFromPosition](./three-loader-3dtiles.runtime.getlatlongheightfromposition.md)
+
+## Runtime.getLatLongHeightFromPosition() method
+
+When viewing a Geo-located tileset, get the [GeoCoord](./three-loader-3dtiles.geocoord.md) value from a world-space `Vector3`<!-- -->.
+
+<b>Signature:</b>
+
+```typescript
+getLatLongHeightFromPosition(Vector3: any): GeoCoord;
+```
+
+## Parameters
+
+|  Parameter | Type | Description |
+|  --- | --- | --- |
+|  Vector3 | any |  |
+
+<b>Returns:</b>
+
+GeoCoord
+

+ 24 - 0
docs/three-loader-3dtiles.runtime.getpositionfromlatlongheight.md

@@ -0,0 +1,24 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [Runtime](./three-loader-3dtiles.runtime.md) &gt; [getPositionFromLatLongHeight](./three-loader-3dtiles.runtime.getpositionfromlatlongheight.md)
+
+## Runtime.getPositionFromLatLongHeight() method
+
+When viewing a Geo-located tileset, world-space `Vector3` from a [GeoCoord](./three-loader-3dtiles.geocoord.md)<!-- -->.
+
+<b>Signature:</b>
+
+```typescript
+getPositionFromLatLongHeight(GeoCoord: any): Vector3;
+```
+
+## Parameters
+
+|  Parameter | Type | Description |
+|  --- | --- | --- |
+|  GeoCoord | any |  |
+
+<b>Returns:</b>
+
+Vector3
+

+ 19 - 0
docs/three-loader-3dtiles.runtime.getstats.md

@@ -0,0 +1,19 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [Runtime](./three-loader-3dtiles.runtime.md) &gt; [getStats](./three-loader-3dtiles.runtime.getstats.md)
+
+## Runtime.getStats() method
+
+Get a reference to the probe.gl [Stats](https://github.com/uber-web/probe.gl/blob/master/docs/api-reference/stats/stats.md) object.
+
+<b>Signature:</b>
+
+```typescript
+getStats(): Stats;
+```
+<b>Returns:</b>
+
+Stats
+
+[Stats](https://github.com/uber-web/probe.gl/blob/master/docs/api-reference/stats/stats.md)
+

+ 17 - 0
docs/three-loader-3dtiles.runtime.gettileboxes.md

@@ -0,0 +1,17 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [Runtime](./three-loader-3dtiles.runtime.md) &gt; [getTileBoxes](./three-loader-3dtiles.runtime.gettileboxes.md)
+
+## Runtime.getTileBoxes() method
+
+Get the tile bounding boxes group when `debug: true` is set.
+
+<b>Signature:</b>
+
+```typescript
+getTileBoxes(): Object3D;
+```
+<b>Returns:</b>
+
+Object3D
+

+ 19 - 0
docs/three-loader-3dtiles.runtime.gettileset.md

@@ -0,0 +1,19 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [Runtime](./three-loader-3dtiles.runtime.md) &gt; [getTileset](./three-loader-3dtiles.runtime.gettileset.md)
+
+## Runtime.getTileset() method
+
+Get a reference to the loaders.gl [Tileset3D](https://github.com/visgl/loaders.gl/blob/master/modules/tiles/docs/api-reference/tileset-3d.md) object.
+
+<b>Signature:</b>
+
+```typescript
+getTileset(): Tileset3D;
+```
+<b>Returns:</b>
+
+Tileset3D
+
+[Tileset3D](https://github.com/visgl/loaders.gl/blob/master/modules/tiles/docs/api-reference/tileset-3d.md)
+

+ 38 - 0
docs/three-loader-3dtiles.runtime.md

@@ -0,0 +1,38 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [Runtime](./three-loader-3dtiles.runtime.md)
+
+## Runtime interface
+
+Runtime methods that can be used once a tileset is loaded
+
+<b>Signature:</b>
+
+```typescript
+interface Runtime 
+```
+
+## Methods
+
+|  Method | Description |
+|  --- | --- |
+|  [dispose()](./three-loader-3dtiles.runtime.dispose.md) | Dispose of all of the tileset's assets in memory. |
+|  [getCameraFrustum(Camera)](./three-loader-3dtiles.runtime.getcamerafrustum.md) | Get the current camera frustum as mesh planes (for debugging purposes). |
+|  [getLatLongHeightFromPosition(Vector3)](./three-loader-3dtiles.runtime.getlatlongheightfromposition.md) | When viewing a Geo-located tileset, get the [GeoCoord](./three-loader-3dtiles.geocoord.md) value from a world-space <code>Vector3</code>. |
+|  [getPositionFromLatLongHeight(GeoCoord)](./three-loader-3dtiles.runtime.getpositionfromlatlongheight.md) | When viewing a Geo-located tileset, world-space <code>Vector3</code> from a [GeoCoord](./three-loader-3dtiles.geocoord.md)<!-- -->. |
+|  [getStats()](./three-loader-3dtiles.runtime.getstats.md) | Get a reference to the probe.gl [Stats](https://github.com/uber-web/probe.gl/blob/master/docs/api-reference/stats/stats.md) object. |
+|  [getTileBoxes()](./three-loader-3dtiles.runtime.gettileboxes.md) | Get the tile bounding boxes group when <code>debug: true</code> is set. |
+|  [getTileset()](./three-loader-3dtiles.runtime.gettileset.md) | Get a reference to the loaders.gl [Tileset3D](https://github.com/visgl/loaders.gl/blob/master/modules/tiles/docs/api-reference/tileset-3d.md) object. |
+|  [setDebug(boolean)](./three-loader-3dtiles.runtime.setdebug.md) | Enable or disable deubg mode. |
+|  [setElevationRange(range)](./three-loader-3dtiles.runtime.setelevationrange.md) | In point clouds when coloring by <code>PointCloudColoring.Elevation</code>, set the min/max elevation values - Default: <code>[0, 400]</code>. |
+|  [setHideGround(boolean)](./three-loader-3dtiles.runtime.sethideground.md) | In point clouds wher the points are classified as <code>Ground</code>, hide the ground level points - Default: <code>false</code>. |
+|  [setIntensityContrast(number)](./three-loader-3dtiles.runtime.setintensitycontrast.md) | In point clouds when coloring by <code>PointCloudColoring.Intensity</code>, set the contrast factor. Default: <code>1.0</code>. |
+|  [setMaxIntensity(number)](./three-loader-3dtiles.runtime.setmaxintensity.md) | In point clouds when coloring by <code>PointCloudColoring.Intensity</code>, set the max intensity value - Default: <code>1.0</code> |
+|  [setPointAlpha(number)](./three-loader-3dtiles.runtime.setpointalpha.md) | In point clouds when, set the alpha value. Default: <code>1.0</code>. |
+|  [setPointCloudColoring(PointCloudColoring)](./three-loader-3dtiles.runtime.setpointcloudcoloring.md) | In point clouds set the type of coloring used. See [PointCloudColoring](./three-loader-3dtiles.pointcloudcoloring.md) |
+|  [setShading(Shading)](./three-loader-3dtiles.runtime.setshading.md) | Set the current shading mode for b3dm tiles. See [Shading](./three-loader-3dtiles.shading.md)<!-- -->. |
+|  [setViewDistanceScale(number)](./three-loader-3dtiles.runtime.setviewdistancescale.md) | Set the current view distance scale. See [LoaderOptions](./three-loader-3dtiles.loaderoptions.md) |
+|  [setWireframe(boolean)](./three-loader-3dtiles.runtime.setwireframe.md) | Enable or disable wireframe mode. |
+|  [showTiles(boolean)](./three-loader-3dtiles.runtime.showtiles.md) | Show or hide the tile bounding boxes. |
+|  [update(number, WebGLRenderer, Camera)](./three-loader-3dtiles.runtime.update.md) | Update the tileset for rendering. |
+

+ 24 - 0
docs/three-loader-3dtiles.runtime.setdebug.md

@@ -0,0 +1,24 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [Runtime](./three-loader-3dtiles.runtime.md) &gt; [setDebug](./three-loader-3dtiles.runtime.setdebug.md)
+
+## Runtime.setDebug() method
+
+Enable or disable deubg mode.
+
+<b>Signature:</b>
+
+```typescript
+setDebug(boolean: any): void;
+```
+
+## Parameters
+
+|  Parameter | Type | Description |
+|  --- | --- | --- |
+|  boolean | any |  |
+
+<b>Returns:</b>
+
+void
+

+ 24 - 0
docs/three-loader-3dtiles.runtime.setelevationrange.md

@@ -0,0 +1,24 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [Runtime](./three-loader-3dtiles.runtime.md) &gt; [setElevationRange](./three-loader-3dtiles.runtime.setelevationrange.md)
+
+## Runtime.setElevationRange() method
+
+In point clouds when coloring by `PointCloudColoring.Elevation`<!-- -->, set the min/max elevation values - Default: `[0, 400]`<!-- -->.
+
+<b>Signature:</b>
+
+```typescript
+setElevationRange(range: ReadonlyArray<number>): void;
+```
+
+## Parameters
+
+|  Parameter | Type | Description |
+|  --- | --- | --- |
+|  range | ReadonlyArray&lt;number&gt; |  |
+
+<b>Returns:</b>
+
+void
+

+ 24 - 0
docs/three-loader-3dtiles.runtime.sethideground.md

@@ -0,0 +1,24 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [Runtime](./three-loader-3dtiles.runtime.md) &gt; [setHideGround](./three-loader-3dtiles.runtime.sethideground.md)
+
+## Runtime.setHideGround() method
+
+In point clouds wher the points are classified as `Ground`<!-- -->, hide the ground level points - Default: `false`<!-- -->.
+
+<b>Signature:</b>
+
+```typescript
+setHideGround(boolean: any): void;
+```
+
+## Parameters
+
+|  Parameter | Type | Description |
+|  --- | --- | --- |
+|  boolean | any |  |
+
+<b>Returns:</b>
+
+void
+

+ 24 - 0
docs/three-loader-3dtiles.runtime.setintensitycontrast.md

@@ -0,0 +1,24 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [Runtime](./three-loader-3dtiles.runtime.md) &gt; [setIntensityContrast](./three-loader-3dtiles.runtime.setintensitycontrast.md)
+
+## Runtime.setIntensityContrast() method
+
+In point clouds when coloring by `PointCloudColoring.Intensity`<!-- -->, set the contrast factor. Default: `1.0`<!-- -->.
+
+<b>Signature:</b>
+
+```typescript
+setIntensityContrast(number: any): void;
+```
+
+## Parameters
+
+|  Parameter | Type | Description |
+|  --- | --- | --- |
+|  number | any |  |
+
+<b>Returns:</b>
+
+void
+

+ 24 - 0
docs/three-loader-3dtiles.runtime.setmaxintensity.md

@@ -0,0 +1,24 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [Runtime](./three-loader-3dtiles.runtime.md) &gt; [setMaxIntensity](./three-loader-3dtiles.runtime.setmaxintensity.md)
+
+## Runtime.setMaxIntensity() method
+
+In point clouds when coloring by `PointCloudColoring.Intensity`<!-- -->, set the max intensity value - Default: `1.0`
+
+<b>Signature:</b>
+
+```typescript
+setMaxIntensity(number: any): void;
+```
+
+## Parameters
+
+|  Parameter | Type | Description |
+|  --- | --- | --- |
+|  number | any |  |
+
+<b>Returns:</b>
+
+void
+

+ 24 - 0
docs/three-loader-3dtiles.runtime.setpointalpha.md

@@ -0,0 +1,24 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [Runtime](./three-loader-3dtiles.runtime.md) &gt; [setPointAlpha](./three-loader-3dtiles.runtime.setpointalpha.md)
+
+## Runtime.setPointAlpha() method
+
+In point clouds when, set the alpha value. Default: `1.0`<!-- -->.
+
+<b>Signature:</b>
+
+```typescript
+setPointAlpha(number: any): void;
+```
+
+## Parameters
+
+|  Parameter | Type | Description |
+|  --- | --- | --- |
+|  number | any |  |
+
+<b>Returns:</b>
+
+void
+

+ 24 - 0
docs/three-loader-3dtiles.runtime.setpointcloudcoloring.md

@@ -0,0 +1,24 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [Runtime](./three-loader-3dtiles.runtime.md) &gt; [setPointCloudColoring](./three-loader-3dtiles.runtime.setpointcloudcoloring.md)
+
+## Runtime.setPointCloudColoring() method
+
+In point clouds set the type of coloring used. See [PointCloudColoring](./three-loader-3dtiles.pointcloudcoloring.md)
+
+<b>Signature:</b>
+
+```typescript
+setPointCloudColoring(PointCloudColoring: any): void;
+```
+
+## Parameters
+
+|  Parameter | Type | Description |
+|  --- | --- | --- |
+|  PointCloudColoring | any |  |
+
+<b>Returns:</b>
+
+void
+

+ 24 - 0
docs/three-loader-3dtiles.runtime.setshading.md

@@ -0,0 +1,24 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [Runtime](./three-loader-3dtiles.runtime.md) &gt; [setShading](./three-loader-3dtiles.runtime.setshading.md)
+
+## Runtime.setShading() method
+
+Set the current shading mode for b3dm tiles. See [Shading](./three-loader-3dtiles.shading.md)<!-- -->.
+
+<b>Signature:</b>
+
+```typescript
+setShading(Shading: any): void;
+```
+
+## Parameters
+
+|  Parameter | Type | Description |
+|  --- | --- | --- |
+|  Shading | any |  |
+
+<b>Returns:</b>
+
+void
+

+ 24 - 0
docs/three-loader-3dtiles.runtime.setviewdistancescale.md

@@ -0,0 +1,24 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [Runtime](./three-loader-3dtiles.runtime.md) &gt; [setViewDistanceScale](./three-loader-3dtiles.runtime.setviewdistancescale.md)
+
+## Runtime.setViewDistanceScale() method
+
+Set the current view distance scale. See [LoaderOptions](./three-loader-3dtiles.loaderoptions.md)
+
+<b>Signature:</b>
+
+```typescript
+setViewDistanceScale(number: any): void;
+```
+
+## Parameters
+
+|  Parameter | Type | Description |
+|  --- | --- | --- |
+|  number | any |  |
+
+<b>Returns:</b>
+
+void
+

+ 24 - 0
docs/three-loader-3dtiles.runtime.setwireframe.md

@@ -0,0 +1,24 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [Runtime](./three-loader-3dtiles.runtime.md) &gt; [setWireframe](./three-loader-3dtiles.runtime.setwireframe.md)
+
+## Runtime.setWireframe() method
+
+Enable or disable wireframe mode.
+
+<b>Signature:</b>
+
+```typescript
+setWireframe(boolean: any): void;
+```
+
+## Parameters
+
+|  Parameter | Type | Description |
+|  --- | --- | --- |
+|  boolean | any |  |
+
+<b>Returns:</b>
+
+void
+

+ 24 - 0
docs/three-loader-3dtiles.runtime.showtiles.md

@@ -0,0 +1,24 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [Runtime](./three-loader-3dtiles.runtime.md) &gt; [showTiles](./three-loader-3dtiles.runtime.showtiles.md)
+
+## Runtime.showTiles() method
+
+Show or hide the tile bounding boxes.
+
+<b>Signature:</b>
+
+```typescript
+showTiles(boolean: any): void;
+```
+
+## Parameters
+
+|  Parameter | Type | Description |
+|  --- | --- | --- |
+|  boolean | any |  |
+
+<b>Returns:</b>
+
+void
+

+ 26 - 0
docs/three-loader-3dtiles.runtime.update.md

@@ -0,0 +1,26 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [Runtime](./three-loader-3dtiles.runtime.md) &gt; [update](./three-loader-3dtiles.runtime.update.md)
+
+## Runtime.update() method
+
+Update the tileset for rendering.
+
+<b>Signature:</b>
+
+```typescript
+update(number: any, WebGLRenderer: any, Camera: any): void;
+```
+
+## Parameters
+
+|  Parameter | Type | Description |
+|  --- | --- | --- |
+|  number | any |  |
+|  WebGLRenderer | any |  |
+|  Camera | any |  |
+
+<b>Returns:</b>
+
+void
+

+ 22 - 0
docs/three-loader-3dtiles.shading.md

@@ -0,0 +1,22 @@
+<!-- Do not edit this file. It is automatically generated by API Documenter. -->
+
+[Home](./index.md) &gt; [three-loader-3dtiles](./three-loader-3dtiles.md) &gt; [Shading](./three-loader-3dtiles.shading.md)
+
+## Shading enum
+
+Types of shading used when viewing b3dm (mesh) tiles
+
+<b>Signature:</b>
+
+```typescript
+declare enum Shading 
+```
+
+## Enumeration Members
+
+|  Member | Value | Description |
+|  --- | --- | --- |
+|  FlatTexture | <code>1</code> |  |
+|  ShadedNoTexture | <code>3</code> |  |
+|  ShadedTexture | <code>2</code> |  |
+

+ 131 - 0
etc/three-loader-3dtiles.api.md

@@ -0,0 +1,131 @@
+## API Report File for "three-loader-3dtiles"
+
+> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
+
+```ts
+
+import { LoadingManager } from 'three';
+import { Material } from 'three';
+import { Object3D } from 'three';
+import { Shader } from 'three';
+import { Stats } from '@probe.gl/stats';
+import { Tileset3D } from '@loaders.gl/tiles';
+import { Vector3 } from 'three';
+import { WebGLRenderer } from 'three';
+
+// @public
+export interface GeoCoord {
+    // (undocumented)
+    height: number;
+    // (undocumented)
+    lat: number;
+    // (undocumented)
+    long: number;
+}
+
+// @public (undocumented)
+export enum GeoTransform {
+    // (undocumented)
+    Mercator = 2,
+    // (undocumented)
+    Reset = 1,
+    // (undocumented)
+    WGS84Cartesian = 3
+}
+
+// @public
+export class Loader3DTiles {
+    static load(props: LoaderProps): Promise<{
+        model: Object3D;
+        runtime: Runtime;
+    }>;
+}
+
+// @public
+export interface LoaderOptions {
+    basisTranscoderPath?: string;
+    cesiumIONToken?: string;
+    computeNormals?: boolean;
+    debug?: boolean;
+    dracoDecoderPath?: string;
+    geoTransform?: GeoTransform;
+    material?: Material;
+    maxConcurrency?: number;
+    maximumMemoryUsage?: number;
+    maximumScreenSpaceError?: number;
+    maxRequests?: number;
+    pointCloudColoring?: PointCloudColoring;
+    pointSize?: number;
+    preloadTilesCount?: number;
+    shaderCallback?: (shader: Shader, renderer: WebGLRenderer) => void;
+    shading?: Shading;
+    skipLevelOfDetail?: boolean;
+    throttleRequests?: boolean;
+    transparent?: boolean;
+    updateInterval?: number;
+    updateTransforms?: boolean;
+    viewDistanceScale?: number;
+    wireframe?: boolean;
+    worker?: boolean;
+}
+
+// @public
+export interface LoaderProps {
+    loadingManager?: LoadingManager;
+    onProgress?(progress: number | ProgressEvent<EventTarget>, total?: number): void;
+    options?: LoaderOptions;
+    renderer?: WebGLRenderer;
+    url: string;
+}
+
+// @public
+export enum PointCloudColoring {
+    // (undocumented)
+    Classification = 2,
+    // (undocumented)
+    Elevation = 3,
+    // (undocumented)
+    Intensity = 1,
+    // (undocumented)
+    RGB = 4,
+    // (undocumented)
+    White = 5
+}
+
+// @public
+export interface Runtime {
+    dispose(): void;
+    getCameraFrustum(Camera: any): Object3D;
+    getLatLongHeightFromPosition(Vector3: any): GeoCoord;
+    getPositionFromLatLongHeight(GeoCoord: any): Vector3;
+    getStats(): Stats;
+    getTileBoxes(): Object3D;
+    getTileset(): Tileset3D;
+    setDebug(boolean: any): void;
+    setElevationRange(range: ReadonlyArray<number>): void;
+    setHideGround(boolean: any): void;
+    setIntensityContrast(number: any): void;
+    setMaxIntensity(number: any): void;
+    setPointAlpha(number: any): void;
+    setPointCloudColoring(PointCloudColoring: any): void;
+    setShading(Shading: any): void;
+    setViewDistanceScale(number: any): void;
+    setWireframe(boolean: any): void;
+    showTiles(boolean: any): void;
+    update(number: any, WebGLRenderer: any, Camera: any): void;
+}
+
+// @public
+export enum Shading {
+    // (undocumented)
+    FlatTexture = 1,
+    // (undocumented)
+    ShadedNoTexture = 3,
+    // (undocumented)
+    ShadedTexture = 2
+}
+
+
+// (No @packageDocumentation comment for this package)
+
+```

+ 200 - 0
examples/demos/cesium/index.html

@@ -0,0 +1,200 @@
+<html lang="en">
+<head>
+  <meta charset="UTF-8">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  <title>3D Tiles Loader: Cesium ION</title>
+  <style>
+    * {
+      margin: 0;
+      padding: 0;
+    }
+    body {
+      width: 100vw;
+      height: 100vh;
+      overflow: hidden;
+    }
+    #canvas-parent {
+      width: 100vw;
+      height: 100vh;
+      touch-action: none;
+    }
+    #guide {
+      position: fixed;
+      top: 0;
+      right: 0;
+      width: 300px;
+      padding: 1rem 2rem;
+      font-family:'Courier New', Courier, monospace;
+      line-height: 1.2;
+      background-color: white;
+      color: black;
+    }
+
+    #guide p {
+      margin-top: 10px;
+    }
+
+    #stats-widget {
+      position: absolute;
+      top: 70px;
+      left: 10px;
+      background-color: rgb(255 255 255 / 83%);
+      padding: 10px;
+      width: 300px;
+      word-break: break-all;
+      visibility: hidden;
+    }
+    #button {
+      position: fixed;
+      bottom: 16px;
+      right: 16px;
+      padding: 12px;
+      border-radius: 50%;
+      margin-bottom: 0px;
+      background-color: #FFF;
+      opacity: .9;
+      z-index: 999;
+      box-shadow: 0 0 4px rgb(0 0 0 / 15%);
+    }
+    @media (max-width:480px) {
+      #guide, #stats-widget { display: none; }
+    }
+  </style>
+</head>
+<body>
+  <div id="canvas-parent"></div>
+  <div id="stats-widget"></div>
+
+  <div id="guide">
+    Use arrow keys, mouse wheel/trackpad, or right click to move around, and left click and drag to turn/rotate the camera.
+    <p>
+      <u>Available URL parameters:</u>
+      <ul>
+        <li><b>assetId</b>: Load another Cesium ion asset id.</li>
+        <li><b>ionToken</b>: Set the Cesium ion access token.</li>
+      </ul>
+    </p>
+  </div>
+
+  <script async src="https://ga.jspm.io/npm:es-module-shims@1.4.4/dist/es-module-shims.js"></script>
+  <script type="importmap">
+    {
+      "imports": {
+        "three": "https://cdn.skypack.dev/three@0.137.0",
+        "three/examples/jsm/loaders/GLTFLoader.js": "https://cdn.skypack.dev/three@v0.137.0/examples/jsm/loaders/GLTFLoader",
+        "three/examples/jsm/loaders/DRACOLoader.js": "https://cdn.skypack.dev/three@v0.137.0/examples/jsm/loaders/DRACOLoader",
+        "three/examples/jsm/loaders/KTX2Loader.js": "https://cdn.skypack.dev/three@v0.137.0/examples/jsm/loaders/KTX2Loader",
+        "three/examples/jsm/controls/OrbitControls": "https://cdn.skypack.dev/three@v0.137.0/examples/jsm/controls/OrbitControls",
+        "three/examples/jsm/libs/stats.module.js": "https://cdn.skypack.dev/three@v0.137.0/examples/jsm/libs/stats.module",
+        "@probe.gl/stats" : "https://cdn.skypack.dev/@probe.gl/stats@3.3.1",
+        "@probe.gl/stats-widget" : "https://cdn.skypack.dev/@probe.gl/stats-widget@3.5.0",
+        "three-loader-3dtiles" : "../../../dist/three-loader-3dtiles.esm.js"
+      }
+    }
+  </script>
+  <script type='module'>
+    import { 
+      Scene, 
+      PerspectiveCamera, 
+      WebGLRenderer, 
+      GridHelper, 
+      Clock,
+      Matrix4,
+      Euler
+    } from 'three';
+
+    import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls';
+
+    import { Loader3DTiles, PointCloudColoring } from 'three-loader-3dtiles';
+
+    import Stats from 'three/examples/jsm/libs/stats.module.js';
+    import StatsWidget from '@probe.gl/stats-widget';
+
+    const ION_TOKEN = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJlYWMxMzcyYy0zZjJkLTQwODctODNlNi01MDRkZmMzMjIxOWIiLCJpZCI6OTYyMCwic2NvcGVzIjpbImFzbCIsImFzciIsImdjIl0sImlhdCI6MTU2Mjg2NjI3M30.1FNiClUyk00YH_nWfSGpiQAjR5V2OvREDq1PJ5QMjWQ';
+
+    const canvasParent = document.querySelector('#canvas-parent');
+    const statsParent = document.querySelector('#stats-widget')
+
+    const scene = new Scene();
+    const camera = new PerspectiveCamera(
+      35,
+      1,
+      0.01,
+      10000,
+    );
+    camera.position.set(0, 2000, 0);
+
+    const renderer = new WebGLRenderer();
+    const clock = new Clock()
+    const controls = new OrbitControls( camera, canvasParent);
+    controls.listenToKeyEvents( window );
+
+    canvasParent.appendChild(renderer.domElement);
+
+    const threeJsStats = new Stats();
+    threeJsStats.domElement.style.position = 'absolute';
+    threeJsStats.domElement.style.top = '10px';
+    threeJsStats.domElement.style.left = '10px';
+
+    canvasParent.appendChild( threeJsStats.domElement );
+
+    const queryParams = new URLSearchParams(document.location.search);
+
+    loadTileset();
+
+    let tilesRuntime = undefined;
+    let statsRuntime = undefined;
+
+    async function loadTileset() {
+      const result = await Loader3DTiles.load(
+        {
+          url: `https://assets.cesium.com/${queryParams.get('assetId') ?? 43978}/tileset.json`,
+          renderer: renderer,
+          options: {
+            cesiumIONToken: queryParams.get('ionToken') ?? ION_TOKEN, 
+            dracoDecoderPath: 'https://cdn.jsdelivr.net/npm/three@0.137.0/examples/js/libs/draco',
+            pointCloudColoring: PointCloudColoring.RGB,
+            maximumScreenSpaceError: 6
+          }
+        }
+      );
+
+      const {model, runtime} = result;
+      model.rotation.set(-Math.PI / 2, 0, 0);
+
+      tilesRuntime = runtime;
+      scene.add(model);
+
+      statsRuntime = new StatsWidget(runtime.getStats(), {container: statsParent });
+      statsParent.style.visibility = 'visible';
+    }
+
+    function render(t) {
+      const dt = clock.getDelta()
+      controls.update();
+      if (tilesRuntime) {
+        tilesRuntime.update(dt, renderer, camera);
+      }
+      if (statsRuntime) {
+        statsRuntime.update();
+      }
+      renderer.render(scene, camera);
+      threeJsStats.update();
+      window.requestAnimationFrame(render);
+
+    }
+
+    onWindowResize();
+
+    function onWindowResize() {
+      renderer.setSize(canvasParent.clientWidth, canvasParent.clientHeight);
+      camera.aspect = canvasParent.clientWidth / canvasParent.clientHeight;
+      camera.updateProjectionMatrix();
+    }
+    window.addEventListener('resize', onWindowResize)
+
+    render();
+  </script>
+  <a id="button" target="_blank" href="https://github.com/nytimes/three-loader-3dtiles/blob/master/examples/demos/cesium/index.html" title="View source code for demo" style=""><img src="../ic_code_black_24dp.svg"></a>
+</body>
+</html>

+ 4 - 0
examples/demos/ic_code_black_24dp.svg

@@ -0,0 +1,4 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24" fill="#000000">
+    <path fill="none" d="M0 0h24v24H0V0z"/>
+    <path d="M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"/>
+</svg>

+ 41 - 0
examples/demos/index.html

@@ -0,0 +1,41 @@
+<html lang="en">
+<head>
+  <meta charset="UTF-8">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  <title>3D Tiles Loader | Demos</title>
+  <style>
+    body {
+      padding: 2rem;
+      font-family: 'Courier New', Courier, monospace;
+      width: 100%;
+      max-width: 700px;
+      box-sizing: border-box;
+    }
+    section {
+      margin-bottom: 2rem;
+    }
+    h1 {
+      margin-bottom: 3rem;
+    }
+    h3 {
+      margin-bottom: 0;
+    }
+    p {
+      margin-top: 0.5rem;
+      line-height: 1.3;
+    }
+  </style>
+</head>
+<body>
+  <h1> 3D Tiles Loader | Demos </h1>
+  <section>
+    <h3> <a href="realitycapture/index.html">RealityCapture LOD Export (glTF tiles)</a> </h3>
+  </section>
+  <section>
+    <h3> <a href="cesium/index.html">Cesium ION (Point cloud tiles)</a> </h3>
+  </section>
+  <section>
+    <h3> <a href="map-overlay/index.html">Map overlay</a> </h3>
+  </section>
+</body>
+</html>

+ 1 - 0
examples/demos/map-overlay/README.md

@@ -0,0 +1 @@
+This example uses the `GeoTranform.Mercator` option to overlay a tileset on map. Mapping is providing by _OpenStreetMap_ using the [geo-three](https://github.com/tentone/geo-three/) library.

+ 256 - 0
examples/demos/map-overlay/index.html

@@ -0,0 +1,256 @@
+<html lang="en">
+<head>
+  <meta charset="UTF-8">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  <title>3D Tiles Loader: Map overlay</title>
+  <style>
+    * {
+      margin: 0;
+      padding: 0;
+    }
+    body {
+      width: 100vw;
+      height: 100vh;
+      overflow: hidden;
+    }
+    #canvas-parent {
+      width: 100vw;
+      height: 100vh;
+      touch-action: none;
+    }
+    #guide {
+      position: fixed;
+      top: 0;
+      right: 0;
+      width: 300px;
+      padding: 1rem 2rem;
+      font-family:'Courier New', Courier, monospace;
+      line-height: 1.2;
+      background-color: white;
+      color: black;
+    }
+
+    #guide p {
+      margin-top: 10px;
+    }
+
+    #stats-widget {
+      position: absolute;
+      top: 70px;
+      left: 10px;
+      background-color: rgb(255 255 255 / 83%);
+      padding: 10px;
+      width: 300px;
+      word-break: break-all;
+      visibility: hidden;
+    }
+    #button {
+      position: fixed;
+      bottom: 16px;
+      right: 16px;
+      padding: 12px;
+      border-radius: 50%;
+      margin-bottom: 0px;
+      background-color: #FFF;
+      opacity: .9;
+      z-index: 999;
+      box-shadow: 0 0 4px rgb(0 0 0 / 15%);
+    }
+    @media (max-width:480px) {
+      #guide, #stats-widget { display: none; }
+    }
+  </style>
+</head>
+<body>
+  <div id="canvas-parent"></div>
+  <div id="stats-widget"></div>
+
+  <div id="guide">
+    <p>
+    <span id="example-desc">
+      Map overlay provided by <b>OpenStreetMap</b> using the <b>geo-three</b> library.
+    </span>
+    </p>
+    <p>
+    Use arrow keys, mouse wheel/trackpad, or right click to move around, and left click and drag to turn/rotate the camera.
+    </p>
+    <p>
+      <u>Available URL parameters:</u>
+      <ul>
+        <li><b>tilesetUrl</b>: Load another tileset json.</li>
+      </ul>
+    </p>
+  </div>
+
+  <script async src="https://ga.jspm.io/npm:es-module-shims@1.4.4/dist/es-module-shims.js"></script>
+  <script type="importmap">
+    {
+      "imports": {
+        "three": "https://cdn.skypack.dev/three@0.137.0",
+        "three/examples/jsm/loaders/GLTFLoader.js": "https://cdn.skypack.dev/three@v0.137.0/examples/jsm/loaders/GLTFLoader",
+        "three/examples/jsm/loaders/DRACOLoader.js": "https://cdn.skypack.dev/three@v0.137.0/examples/jsm/loaders/DRACOLoader",
+        "three/examples/jsm/loaders/KTX2Loader.js": "https://cdn.skypack.dev/three@v0.137.0/examples/jsm/loaders/KTX2Loader",
+        "three/examples/jsm/controls/OrbitControls": "https://cdn.skypack.dev/three@v0.137.0/examples/jsm/controls/OrbitControls",
+        "three/examples/jsm/libs/stats.module.js": "https://cdn.skypack.dev/three@v0.137.0/examples/jsm/libs/stats.module",
+        "@probe.gl/stats" : "https://cdn.skypack.dev/@probe.gl/stats@3.3.1",
+        "@probe.gl/stats-widget" : "https://cdn.skypack.dev/@probe.gl/stats-widget@3.5.0",
+        "three-loader-3dtiles" : "../../../dist/three-loader-3dtiles.esm.js",
+        "geo-three": "https://cdn.skypack.dev/geo-three@0.0.18",
+        "gsap": "https://cdn.skypack.dev/gsap@3.10.4"
+        
+    }
+  }
+  </script>
+  <script type='module'>
+    import { 
+      Scene, 
+      PerspectiveCamera, 
+      WebGLRenderer, 
+      GridHelper, 
+      Clock,
+      Matrix4,
+      Euler,
+      sRGBEncoding
+    } from 'three';
+
+    import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls';
+
+    import { Loader3DTiles, PointCloudColoring, GeoTransform } from 'three-loader-3dtiles';
+    import { MapView, OpenStreetMapsProvider } from 'geo-three'
+    import { TweenMax } from 'gsap'
+
+    import Stats from 'three/examples/jsm/libs/stats.module.js';
+    import StatsWidget from '@probe.gl/stats-widget';
+
+    const ION_TOKEN = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJlYWMxMzcyYy0zZjJkLTQwODctODNlNi01MDRkZmMzMjIxOWIiLCJpZCI6OTYyMCwic2NvcGVzIjpbImFzbCIsImFzciIsImdjIl0sImlhdCI6MTU2Mjg2NjI3M30.1FNiClUyk00YH_nWfSGpiQAjR5V2OvREDq1PJ5QMjWQ';
+
+    const canvasParent = document.querySelector('#canvas-parent');
+    const statsParent = document.querySelector('#stats-widget')
+
+    const scene = new Scene();
+    const camera = new PerspectiveCamera(
+      45,
+      1,
+      100,
+      1000000,
+    );
+
+    const renderer = new WebGLRenderer();
+    renderer.preserveDrawingBuffer  = true;
+
+    const clock = new Clock()
+    const controls = new OrbitControls( camera, canvasParent);
+    controls.listenToKeyEvents( window );
+
+    canvasParent.appendChild(renderer.domElement);
+
+    const threeJsStats = new Stats();
+    threeJsStats.domElement.style.position = 'absolute';
+    threeJsStats.domElement.style.top = '10px';
+    threeJsStats.domElement.style.left = '10px';
+
+    canvasParent.appendChild( threeJsStats.domElement );
+
+    const queryParams = new URLSearchParams(document.location.search);
+    if (queryParams.get('tilesetUrl')) {
+      renderer.outputEncoding = sRGBEncoding;
+    }
+
+    loadTileset();
+
+    let tilesRuntime = undefined;
+    let tilesModel = undefined;
+    let statsRuntime = undefined;
+
+    const provider = new OpenStreetMapsProvider();
+    const map = new MapView(MapView.PLANAR, provider);
+
+    scene.add(map)
+
+    async function loadTileset() {
+      const result = await Loader3DTiles.load(
+        {
+          url:
+            queryParams.get('tilesetUrl') ??
+            "https://assets.cesium.com/43978/tileset.json",
+          renderer: renderer,
+          options: {
+            cesiumIONToken: queryParams.get('tilesetUrl') ? null : ION_TOKEN, 
+            dracoDecoderPath: 'https://cdn.jsdelivr.net/npm/three@0.137.0/examples/js/libs/draco',
+            basisTranscoderPath: 'https://cdn.jsdelivr.net/npm/three@0.137.0/examples/js/libs/basis',
+            pointCloudColoring: PointCloudColoring.RGB,
+            maximumScreenSpaceError: queryParams.get('sse') ?? 6,
+            geoTransform: GeoTransform.Mercator
+          }
+        }
+      );
+
+      const {model, runtime} = result;
+
+      tilesRuntime = runtime;
+      tilesModel = model;
+      scene.add(model);
+
+      statsRuntime = new StatsWidget(runtime.getStats(), {container: statsParent });
+      statsParent.style.visibility = 'visible';
+
+      if (!queryParams.get('tilesetUrl')) {
+        // Scaling the scan to align with Maps, and bringing it up above the map
+        model.scale.set(1.27, 1.27, 1.27);
+        model.translateZ(230);
+      }
+      camera.position.copy(model.position);
+      camera.translateY(80000);
+
+      controls.target.copy(model.position);
+      controls.update();
+
+      zoomIn();
+    }
+
+    function zoomIn() {
+      controls.enabled = false
+      TweenMax.to( camera.position, {
+        duration: 5,
+        y: queryParams.get('tilesetUrl') ? 100 : 3000,
+        onUpdate: function() {
+          controls.update();
+        },
+        onComplete: function() {
+          controls.enabled = true;
+          camera.near = 1;
+          camera.updateProjectionMatrix();
+        }
+      } );
+    }
+
+
+    function render(t) {
+      const dt = clock.getDelta()
+      controls.update();
+      if (tilesRuntime) {
+        tilesRuntime.update(dt, renderer, camera);
+      }
+      if (statsRuntime) {
+        statsRuntime.update();
+      }
+      renderer.render(scene, camera);
+      threeJsStats.update();
+      window.requestAnimationFrame(render);
+
+    }
+
+    onWindowResize();
+
+    function onWindowResize() {
+      renderer.setSize(canvasParent.clientWidth, canvasParent.clientHeight);
+      camera.aspect = canvasParent.clientWidth / canvasParent.clientHeight;
+      camera.updateProjectionMatrix();
+    }
+    window.addEventListener('resize', onWindowResize)
+
+    render();
+  </script>
+  <a id="button" target="_blank" href="https://github.com/nytimes/three-loader-3dtiles/blob/master/examples/demos/map-overlay/index.html" title="View source code for demo" style=""><img src="../ic_code_black_24dp.svg"></a>
+</body>
+</html>

+ 233 - 0
examples/demos/realitycapture/index.html

@@ -0,0 +1,233 @@
+<html lang="en">
+<head>
+  <meta charset="UTF-8">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  <title>3D Tiles Loader: RealityCapture</title>
+  <style>
+    * {
+      margin: 0;
+      padding: 0;
+    }
+    body {
+      width: 100vw;
+      height: 100vh;
+      overflow: hidden;
+    }
+    #canvas-parent {
+      width: 100vw;
+      height: 100vh;
+      touch-action: none;
+    }
+    #guide {
+      position: fixed;
+      top: 0;
+      right: 0;
+      width: 300px;
+      padding: 1rem 2rem;
+      font-family:'Courier New', Courier, monospace;
+      line-height: 1.2;
+      background-color: white;
+      color: black;
+    }
+
+    #guide p {
+      margin-top: 10px;
+    }
+
+    #stats-widget {
+      position: absolute;
+      top: 70px;
+      left: 10px;
+      background-color: rgb(255 255 255 / 83%);
+      padding: 10px;
+      width: 300px;
+      word-break: break-all;
+      visibility: hidden;
+    }
+    #button {
+      position: fixed;
+      bottom: 16px;
+      right: 16px;
+      padding: 12px;
+      border-radius: 50%;
+      margin-bottom: 0px;
+      background-color: #FFF;
+      opacity: .9;
+      z-index: 999;
+      box-shadow: 0 0 4px rgb(0 0 0 / 15%);
+    }
+    @media (max-width:480px) {
+      #guide, #stats-widget { display: none; }
+    }
+  </style>
+</head>
+<body>
+  <div id='canvas-parent'></div>
+  <div id="stats-widget"></div>
+
+  <div id="guide">
+    <span id="example-desc">
+      <b>Freeman Alley, New York.</b> Captured using iPhone 12 Pro Max and processed via RealityCapture.
+    </span>
+    <p>Use arrow/WASD keys or mouse wheel/trackpad to move around, and click and drag to turn/rotate the camera.</p>
+    <p>
+      <u>Available URL parameters:</u>
+      <ul>
+        <li><b>tilesetUrl</b>: Load another tileset json.</li>
+        <li><b>sse</b>: Change the maximum screen space error.</li>
+      </ul>
+    </p>
+  </div>
+
+  <script async src="https://ga.jspm.io/npm:es-module-shims@1.4.4/dist/es-module-shims.js"></script>
+  <script type="importmap">
+    {
+      "imports": {
+        "three": "https://cdn.skypack.dev/three@0.137.0",
+        "three/examples/jsm/loaders/GLTFLoader.js": "https://cdn.skypack.dev/three@v0.137.0/examples/jsm/loaders/GLTFLoader",
+        "three/examples/jsm/loaders/DRACOLoader.js": "https://cdn.skypack.dev/three@v0.137.0/examples/jsm/loaders/DRACOLoader",
+        "three/examples/jsm/loaders/KTX2Loader.js": "https://cdn.skypack.dev/three@v0.137.0/examples/jsm/loaders/KTX2Loader",
+        "three/examples/jsm/libs/stats.module.js": "https://cdn.skypack.dev/three@v0.137.0/examples/jsm/libs/stats.module",
+        "three/examples/jsm/controls/OrbitControls": "https://cdn.skypack.dev/three@v0.137.0/examples/jsm/controls/OrbitControls",
+        "@probe.gl/stats" : "https://cdn.skypack.dev/@probe.gl/stats@3.3.1",
+        "@probe.gl/stats-widget" : "https://cdn.skypack.dev/@probe.gl/stats-widget@3.5.0",
+        "three-loader-3dtiles" : "../../../dist/three-loader-3dtiles.esm.js",
+        "gsap": "https://cdn.skypack.dev/gsap@3.6.1",
+        "three-story-controls" : "https://cdn.skypack.dev/three-story-controls@1.0.0"
+      }
+    }
+  </script>
+  <script type='module'>
+    import { 
+      Scene, 
+      PerspectiveCamera, 
+      WebGLRenderer, 
+      Clock,
+      Matrix4,
+      Euler,
+      sRGBEncoding,
+      Math as ThreeMath
+    } from 'three';
+
+    import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls';
+
+    import { Loader3DTiles } from 'three-loader-3dtiles';
+    import { CameraRig, FreeMovementControls } from 'three-story-controls'
+
+    import Stats from 'three/examples/jsm/libs/stats.module.js';
+    import StatsWidget from '@probe.gl/stats-widget';
+
+    const queryParams = new URLSearchParams(document.location.search);
+
+    const canvasParent = document.querySelector('#canvas-parent');
+    const statsParent = document.querySelector('#stats-widget')
+
+    const scene = new Scene();
+    const camera = new PerspectiveCamera(
+      35,
+      1,
+      0.01,
+      1000,
+    );
+
+    const renderer = new WebGLRenderer();
+    renderer.outputEncoding = sRGBEncoding;
+
+    const clock = new Clock()
+    const rig = new CameraRig(camera, scene)
+    
+    let controls = undefined;
+
+    if (queryParams.get('orbit')) {
+      controls = new OrbitControls( camera, canvasParent);
+      controls.listenToKeyEvents( document.body );
+      camera.position.set(0,200,0);
+      controls.update();
+    } else {
+      controls = new FreeMovementControls(rig, {
+        panDegreeFactor: 2,
+        wheelScaleFactor: 0.01,
+        keyboardScaleFactor: 0.015,
+        keyboardDampFactor: 0
+      });
+      controls.enable();
+    }
+    
+    canvasParent.appendChild(renderer.domElement);
+
+    const threeJsStats = new Stats();
+    threeJsStats.domElement.style.position = 'absolute';
+    threeJsStats.domElement.style.top = '10px';
+    threeJsStats.domElement.style.left = '10px';
+
+    canvasParent.appendChild( threeJsStats.domElement );
+
+
+    let tilesRuntime = undefined;
+    let statsRuntime = undefined;
+
+    if (queryParams.get('tilesetUrl')) {
+      document.querySelector('#example-desc').style.display = 'none';
+    }
+
+    loadTileset();
+
+
+    async function loadTileset() {
+      const result = await Loader3DTiles.load(
+        {
+          url:
+            queryParams.get('tilesetUrl') ??
+           'https://int.nyt.com/data/3dscenes/ONA360/TILESET/0731_FREEMAN_ALLEY_10M_A_36x8K__10K-PN_50P_DB/tileset_tileset.json',
+          renderer: renderer,
+          options: {
+            dracoDecoderPath: 'https://cdn.jsdelivr.net/npm/three@0.137.0/examples/js/libs/draco',
+            basisTranscoderPath: 'https://cdn.jsdelivr.net/npm/three@0.137.0/examples/js/libs/basis',
+            maximumScreenSpaceError: queryParams.get('sse') ?? 48,
+          }
+        }
+      );
+
+      const {model, runtime} = result;
+      model.rotation.set(-Math.PI / 2, 0, Math.PI / 2);
+
+      if (!queryParams.get('tilesetUrl')) {
+        model.position.set(-1, 4, -16);
+      }
+
+      tilesRuntime = runtime;
+      scene.add(model);
+
+      statsRuntime = new StatsWidget(runtime.getStats(), {container: statsParent });
+      statsParent.style.visibility = 'visible';
+    }
+
+    function render(t) {
+      const dt = clock.getDelta()
+      controls.update(t);
+      if (tilesRuntime) {
+        tilesRuntime.update(dt, renderer, camera);
+      }
+      if (statsRuntime) {
+        statsRuntime.update();
+      }
+      renderer.render(scene, camera);
+      threeJsStats.update();
+      window.requestAnimationFrame(render);
+
+    }
+
+    onWindowResize();
+
+    function onWindowResize() {
+      renderer.setSize(canvasParent.clientWidth, canvasParent.clientHeight);
+      camera.aspect = canvasParent.clientWidth / canvasParent.clientHeight;
+      camera.updateProjectionMatrix();
+    }
+    window.addEventListener('resize', onWindowResize)
+
+    render();
+  </script>
+  <a id="button" target="_blank" href="https://github.com/nytimes/three-loader-3dtiles/blob/master/examples/demos/realitycapture/index.html" title="View source code for demo" style=""><img src="../ic_code_black_24dp.svg"></a>
+</body>
+</html>

+ 24 - 0
examples/installation/es-module/index.html

@@ -0,0 +1,24 @@
+<html lang="en">
+<head>
+  <meta charset="UTF-8">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  <title>3D Tiles Loader: ES Module installation example</title>
+</head>
+<body>
+  <script async src="https://unpkg.com/es-module-shims@0.11.1/dist/es-module-shims.js"></script>
+  <script type="importmap-shim">
+    {
+      "imports": {
+        "three": "https://cdn.skypack.dev/three@0.129.0",
+        "three/examples/jsm/loaders/GLTFLoader.js": "https://cdn.skypack.dev/three@v0.129.0/examples/jsm/loaders/GLTFLoader",
+        "three/examples/jsm/loaders/DRACOLoader.js": "https://cdn.skypack.dev/three@v0.129.0/examples/jsm/loaders/DRACOLoader",
+        "three/examples/jsm/loaders/KTX2Loader.js": "https://cdn.skypack.dev/three@v0.129.0/examples/jsm/loaders/KTX2Loader",
+        "three/examples/jsm/loaders/OrbitControls": "https://cdn.skypack.dev/three@v0.129.0/examples/jsm/controls/OrbitControls",
+        "three/examples/jsm/libs/stats.module.js": "https://cdn.skypack.dev/three@v0.129.0/examples/jsm/libs/stats.module",
+        "three-loader-3dtiles" : "../../../dist/three-loader-3dtiles.esm.js"
+      }
+    }
+  </script>
+  <script type='module-shim' src='index.js'></script>
+</body>
+</html>

+ 7 - 0
examples/installation/es-module/index.js

@@ -0,0 +1,7 @@
+import { Scene, PerspectiveCamera } from 'three';
+import { Loader3DTiles } from 'three-loader-3dtiles';
+
+const scene = new Scene();
+const camera = new PerspectiveCamera();
+
+console.log(Loader3DTiles);

+ 7 - 0
examples/installation/webpack/README.md

@@ -0,0 +1,7 @@
+This example uses the default webpack configuration setup. For more control, running a dev server etc., see the [webpack documentation](https://webpack.js.org/concepts/)
+
+1. `npm install`
+2. `npm install --save three-loader-3dtiles`
+3. `npm run build` will build and output to `dist/` 
+3. `npm run dev` will serve the files in `dist/` 
+

+ 29 - 0
examples/installation/webpack/dist/index.html

@@ -0,0 +1,29 @@
+<html lang="en">
+<head>
+  <meta charset="UTF-8">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  <title>3D Tiles Loader: Webpack installation example</title>
+  <style>
+    #stats-widget {
+      position: absolute;
+      top: 70px;
+      left: 10px;
+      background-color: rgb(255 255 255 / 83%);
+      padding: 10px;
+      width: 300px;
+      word-break: break-all;
+      visibility: hidden;
+    }
+    #canvas-parent {
+      width: 100vw;
+      height: 100vh;
+      touch-action: none;
+    }
+  </style>
+</head>
+<body>
+  <div id="canvas-parent"></div>
+  <div id="stats-widget"></div>
+  <script src="bundle.js"></script>
+</body>
+</html>

File diff suppressed because it is too large
+ 8724 - 0
examples/installation/webpack/package-lock.json


+ 25 - 0
examples/installation/webpack/package.json

@@ -0,0 +1,25 @@
+{
+  "name": "webpack-example",
+  "version": "1.0.0",
+  "description": "",
+  "main": "index.js",
+  "scripts": {
+    "build": "webpack",
+    "dev": "webpack serve",
+    "test": "echo \"Error: no test specified\" && exit 1"
+  },
+  "author": "",
+  "license": "ISC",
+  "dependencies": {
+    "@probe.gl/stats-widget": "^3.5.0",
+    "three": "^0.137.0",
+    "three-loader-3dtiles": "^1.1.12"
+  },
+  "devDependencies": {
+    "ts-loader": "^9.2.3",
+    "typescript": "^4.4.3",
+    "webpack": "^5.38.1",
+    "webpack-cli": "^4.7.0",
+    "webpack-dev-server": "^4.2.1"
+  }
+}

+ 88 - 0
examples/installation/webpack/src/index.ts

@@ -0,0 +1,88 @@
+import { Loader3DTiles, PointCloudColoring } from 'three-loader-3dtiles'
+import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls';
+import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader';
+import { DRACOLoader } from 'three/examples/jsm/loaders/DRACOLoader';
+import { KTX2Loader } from 'three/examples/jsm/loaders/KTX2Loader';
+import StatsWidget from '@probe.gl/stats-widget';
+
+import {
+  Scene,
+  PerspectiveCamera,
+  WebGLRenderer,
+  Clock,
+  sRGBEncoding,
+  GridHelper,
+  AmbientLight
+} from 'three'
+
+const scene = new Scene()
+
+const gridHelper = new GridHelper( 1000, 10 );
+scene.add( gridHelper );
+
+const camera = new PerspectiveCamera();
+camera.position.set(0,0,100);
+
+const renderer = new WebGLRenderer()
+renderer.outputEncoding = sRGBEncoding;
+
+const clock = new Clock()
+const controls = new OrbitControls( camera, renderer.domElement);
+
+const canvasParent = document.querySelector('#canvas-parent');
+const statsParent = document.querySelector('#stats-widget') as HTMLElement;
+
+canvasParent.appendChild(renderer.domElement);
+
+let tilesRuntime = undefined;
+let statsRuntime = undefined;
+
+
+async function loadTileset() {
+  const result = await Loader3DTiles.load( 
+  {
+      url: 'https://int.nyt.com/data/3dscenes/ONA360/TILESET/0731_FREEMAN_ALLEY_10M_A_36x8K__10K-PN_50P_DB/tileset_tileset.json',
+      renderer: renderer,
+      options: {
+        dracoDecoderPath: 'https://unpkg.com/three@0.137.0/examples/js/libs/draco',
+        basisTranscoderPath: 'https://unpkg.com/three@0.137.0/examples/js/libs/basis',
+        debug: true,
+        pointCloudColoring: PointCloudColoring.RGB
+      }
+  }
+  )
+  const {model, runtime} = result;
+  scene.add(model);
+  scene.add(runtime.getTileBoxes());
+
+  tilesRuntime = runtime
+
+  statsRuntime = new StatsWidget(runtime.getStats(), {container: statsParent });
+  statsParent.style.visibility = 'visible';
+
+  model.rotation.set(-Math.PI/2, 0, 0);
+}
+
+function render() {
+  const dt = clock.getDelta()
+  controls.update();
+  if (tilesRuntime) {
+    tilesRuntime.update(dt, renderer, camera)
+  }
+  if (statsRuntime) {
+    statsRuntime.update();
+  }
+  renderer.render(scene, camera)
+  window.requestAnimationFrame(render)
+}
+
+function onWindowResize() {
+  renderer.setSize(canvasParent.clientWidth, canvasParent.clientHeight);
+  camera.aspect = canvasParent.clientWidth / canvasParent.clientHeight;
+  camera.updateProjectionMatrix();
+}
+window.addEventListener('resize', onWindowResize)
+
+loadTileset();
+onWindowResize();
+render();

+ 21 - 0
examples/installation/webpack/tsconfig.json

@@ -0,0 +1,21 @@
+{
+  "compilerOptions": {
+    "target": "es2015",
+    "module": "esnext",
+    "sourceMap": true,
+    "inlineSources": true,
+    "moduleResolution": "node",
+    "allowSyntheticDefaultImports": true,
+    "skipLibCheck": true,
+    "esModuleInterop": true,
+    "moduleResolution": "node",
+    "baseUrl": ".",
+    "paths": {
+      "three-loader-3dtiles": ["../../../dist/three-loader-3dtiles.d.ts"],
+      "@math.gl/culling": ["./node_modules/@math.gl/culling/src/index.js"]
+    }
+  },
+  "include": [
+    "./src/**/*"
+  ]
+}

+ 37 - 0
examples/installation/webpack/webpack.config.js

@@ -0,0 +1,37 @@
+const path = require("path");
+const webpack = require('webpack');
+
+module.exports = (env) => {
+  return {
+    entry: './src/index.ts',
+    devtool: 'inline-source-map',
+    resolve: {
+      extensions: [ '.ts', '.js' ],
+      alias: process.env.USE_SRC && {
+        'three-loader-3dtiles': path.resolve(__dirname, '../../../src')
+      } 
+    },
+    output: {
+      path: path.resolve(__dirname, "dist"),
+      publicPath: '/',
+      filename: "bundle.js",
+    },
+    mode: "development",
+    devServer: {
+        static: path.join(__dirname, "dist"),
+        port: 8000
+    },
+    plugins: [
+       new webpack.HotModuleReplacementPlugin()
+    ],
+    module: {
+      rules: [
+        {
+          test: /\.ts$/,
+          use: 'ts-loader',
+          exclude: /node_modules/,
+       }
+      ]
+    }
+  };
+}

+ 9 - 0
examples/r3f/README.md

@@ -0,0 +1,9 @@
+# three-loader-3dtiles & react-three-fiber
+
+This example demonstrates interoperability between the 3D Tiles loader and [react-three-fiber](https://github.com/pmndrs/react-three-fiber). The tileset is wrapped around the `useLoader` interface. The `<ErrorBoundary>` and `<Suspense>` tags are used to provide feedback on the loading state of the tileset. The `<group dispose>` attribute is used to automatically dispose of the tileset when the component is dropped.
+
+## Running
+```
+npm install
+npm run dev
+```

+ 0 - 0
examples/r3f/dist/index.html


Some files were not shown because too many files changed in this diff