Skip to content

Commit 5e3104b

Browse files
authored
Merge branch 'master' into update-WMTSImageSource
2 parents 94fbf13 + aa10ecd commit 5e3104b

55 files changed

Lines changed: 2694 additions & 286 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,42 @@
1-
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3-
4-
name: Build Examples
1+
name: Deploy Examples to GitHub Pages
52

63
on:
74
push:
85
branches: [ master ]
96

10-
jobs:
11-
build:
12-
13-
runs-on: ubuntu-latest
7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
1411

15-
strategy:
16-
matrix:
17-
node-version: [20.x]
12+
concurrency:
13+
group: "pages"
14+
cancel-in-progress: true
1815

16+
jobs:
17+
deploy:
18+
environment:
19+
name: github-pages
20+
url: ${{ steps.deployment.outputs.page_url }}
21+
runs-on: ubuntu-latest
1922
steps:
20-
- uses: actions/checkout@v2
23+
- uses: actions/checkout@v4
2124

22-
- name: Use Node.js ${{ matrix.node-version }}
25+
- name: Setup Node.js
2326
uses: actions/setup-node@v4
2427
with:
25-
node-version: ${{ matrix.node-version }}
28+
node-version: 22.x
2629
cache: 'npm'
2730
- run: npm ci --prefer-offline
2831
- run: npm run build-examples
2932
env:
3033
VITE_ION_KEY: ${{ secrets.VITE_ION_KEY }}
3134

32-
- name: Commit Examples
33-
uses: EndBug/add-and-commit@v7
35+
- name: Upload artifact
36+
uses: actions/upload-pages-artifact@v3
3437
with:
35-
add: 'example/bundle'
36-
message: 'update builds'
37-
push: 'origin HEAD:examples --force'
38+
path: ./example/bundle
39+
40+
- name: Deploy to GitHub Pages
41+
id: deployment
42+
uses: actions/deploy-pages@v4

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## [0.4.23] - Unreleased
8+
### Added
9+
- DebugTilesPlugin: Added support for "boundsColorMode".
10+
11+
### Fixed
12+
- QuantizedMeshPlugin: Fixed case where child tiles could be added redundantly.
13+
- QuantizedMeshPlugin: Fixed case where tiles could throw error on disposal due to be incomplete.
14+
- ImageOverlayPlugin: Fixed case where split tiles could be added and not be processed.
15+
716
## [0.4.22] - 2026-03-06
817
### Added
918
- Types for gltf metadata extensions.

README.md

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,36 +11,36 @@ If a tileset or geometry does not load or render properly please make an issue!
1111

1212
# Examples
1313

14-
The following examples use **Three.js**. Babylon.js demos are also available for [Mars](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/babylonjs/mars.html) and [Google Photorealistic Tiles](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/babylonjs/googleMapsAerial.html).
14+
The following examples use **Three.js**. Babylon.js demos are also available for [Mars](https://nasa-ammos.github.io/3DTilesRendererJS/babylonjs/mars.html) and [Google Photorealistic Tiles](https://nasa-ammos.github.io/3DTilesRendererJS/babylonjs/googleMapsAerial.html).
1515

1616
See the [Three.js usage guide](./USAGE.md) or [Babylon.js usage guide](./src/babylonjs/renderer/README.md) for setup details with each engine.
1717

1818
| Example | Description |
1919
| --- | --- |
2020
| **Core** | |
21-
| [Dingo Gap Mars](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/three/mars.html) | Multiple tilesets |
22-
| [Kitchen Sink](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/three/index.html) | All options and features |
23-
| [VR](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/three/vr.html) | Rendering in VR |
21+
| [Dingo Gap Mars](https://nasa-ammos.github.io/3DTilesRendererJS/three/mars.html) | Multiple tilesets |
22+
| [Kitchen Sink](https://nasa-ammos.github.io/3DTilesRendererJS/three/index.html) | All options and features |
23+
| [VR](https://nasa-ammos.github.io/3DTilesRendererJS/three/vr.html) | Rendering in VR |
2424
| **External Tiles Providers** ¹ | |
25-
| [Cesium Ion 3D Tiles](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/three/ionExample.html) | Standard Cesium Ion tileset |
26-
| [Cesium Ion Lunar](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/three/ionLunar.html) | Lunar surface tiles |
27-
| [Cesium Ion Mars](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/three/ionLunar.html?mars) | Mars surface tiles |
28-
| [Google Photorealistic](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/three/googleMapsAerial.html) | Google Photorealistic Tiles |
29-
| [Google Globe](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/three/googleMapsExample.html) | Google Globe Tiles |
25+
| [Cesium Ion 3D Tiles](https://nasa-ammos.github.io/3DTilesRendererJS/three/ionExample.html) | Standard Cesium Ion tileset |
26+
| [Cesium Ion Lunar](https://nasa-ammos.github.io/3DTilesRendererJS/three/ionLunar.html) | Lunar surface tiles |
27+
| [Cesium Ion Mars](https://nasa-ammos.github.io/3DTilesRendererJS/three/ionLunar.html?mars) | Mars surface tiles |
28+
| [Google Photorealistic](https://nasa-ammos.github.io/3DTilesRendererJS/three/googleMapsAerial.html) | Google Photorealistic Tiles |
29+
| [Google Globe](https://nasa-ammos.github.io/3DTilesRendererJS/three/googleMapsExample.html) | Google Globe Tiles |
3030
| **Customization** | |
31-
| [Custom Material](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/three/customMaterial.html) | Using a custom material |
32-
| [Offscreen Shadows](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/three/offscreenShadows.html) | Shadows from offscreen tiles |
33-
| [Texture Overlays](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/three/landformSiteOverlay.html) | Alternate texture overlays |
31+
| [Custom Material](https://nasa-ammos.github.io/3DTilesRendererJS/three/customMaterial.html) | Using a custom material |
32+
| [Offscreen Shadows](https://nasa-ammos.github.io/3DTilesRendererJS/three/offscreenShadows.html) | Shadows from offscreen tiles |
33+
| [Texture Overlays](https://nasa-ammos.github.io/3DTilesRendererJS/three/landformSiteOverlay.html) | Alternate texture overlays |
3434
| **Plugins** | |
35-
| [Metadata](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/three/metadata.html) | Tile metadata |
36-
| [Fade Transition](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/three/fadingTiles.html) | Tile LoD fade transition |
37-
| [Deep Zoom](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/three/deepZoom.html) | Deep Zoom Image format |
38-
| [TMS / XYZ](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/three/mapTiles.html) | TMS, XYZ map tiles |
39-
| [WMTS](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/three/wmtsTiles.html) | WMTS map tiles |
40-
| [WMS](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/three/wmsTiles.html) | WMS map tiles |
41-
| [Quantized Mesh](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/three/quantMeshOverlays.html) | Quantized mesh with overlays |
42-
| [Load Region](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/three/loadRegion.html) | Loading tiles in region volumes |
43-
| [GeoJSON](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/three/geojson.html) | GeoJSON overlays |
35+
| [Metadata](https://nasa-ammos.github.io/3DTilesRendererJS/three/metadata.html) | Tile metadata |
36+
| [Fade Transition](https://nasa-ammos.github.io/3DTilesRendererJS/three/fadingTiles.html) | Tile LoD fade transition |
37+
| [Deep Zoom](https://nasa-ammos.github.io/3DTilesRendererJS/three/deepZoom.html) | Deep Zoom Image format |
38+
| [TMS / XYZ](https://nasa-ammos.github.io/3DTilesRendererJS/three/mapTiles.html) | TMS, XYZ map tiles |
39+
| [WMTS](https://nasa-ammos.github.io/3DTilesRendererJS/three/wmtsTiles.html) | WMTS map tiles |
40+
| [WMS](https://nasa-ammos.github.io/3DTilesRendererJS/three/wmsTiles.html) | WMS map tiles |
41+
| [Quantized Mesh](https://nasa-ammos.github.io/3DTilesRendererJS/three/quantMeshOverlays.html) | Quantized mesh with overlays |
42+
| [Load Region](https://nasa-ammos.github.io/3DTilesRendererJS/three/loadRegion.html) | Loading tiles in region volumes |
43+
| [GeoJSON](https://nasa-ammos.github.io/3DTilesRendererJS/three/geojson.html) | GeoJSON overlays |
4444

4545
¹ Requires a [Google Tiles API Key](https://developers.google.com/maps/documentation/tile/3d-tiles) or [Cesium Ion API Key](https://cesium.com/platform/cesium-ion/)
4646

@@ -65,8 +65,6 @@ See [API Reference](./API.md): TilesRenderer, PriorityQueue, LRUCache, and Batch
6565
## Plugins
6666
See [Plugins](./PLUGINS.md): GLTFLoader extension plugins, TilesRenderer plugins, and extra classes
6767

68-
69-
7068
# LICENSE
7169

7270
The software is available under the [Apache V2.0 license](LICENSE).

TESTCASES.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ Verify that an error is logged stating that the tileset could not be found just
202202

203203
#### steps
204204

205-
1. Open the kitchen sink example with a midtile with broken content by navigating [here](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/three/#../data/tileset-broken-root-content.json).
205+
1. Open the kitchen sink example with a midtile with broken content by navigating [here](https://nasa-ammos.github.io/3DTilesRendererJS/three/#../data/tileset-broken-root-content.json).
206206
1. Set the error threshold as high as it goes.
207207
1. Click rebuild.
208208

@@ -214,7 +214,7 @@ Verify an error is logged stating that the root tile content could not be loaded
214214

215215
#### steps
216216

217-
1. Open the kitchen sink example with the no root content tileset by navigating [here](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/three/#../data/tileset-no-root-content.json).
217+
1. Open the kitchen sink example with the no root content tileset by navigating [here](https://nasa-ammos.github.io/3DTilesRendererJS/three/#../data/tileset-no-root-content.json).
218218
1. Set the error threshold as high as it goes.
219219
1. Click rebuild.
220220

@@ -226,7 +226,7 @@ Verify that the tileset still renders correctly.
226226

227227
#### steps
228228

229-
1. Open the kitchen sink example with a remote tileset by navigating [here](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/three/#https://raw.githubusercontent.com/NASA-AMMOS/3DTilesRendererJS/master/example/data/tileset.json).
229+
1. Open the kitchen sink example with a remote tileset by navigating [here](https://nasa-ammos.github.io/3DTilesRendererJS/three/#https://raw.githubusercontent.com/NASA-AMMOS/3DTilesRendererJS/master/example/data/tileset.json).
230230

231231
#### expected
232232

@@ -236,7 +236,7 @@ Verify the tileset loads correctly and tehre are no errors in the console.
236236

237237
#### steps
238238

239-
1. Open the kitchen sink example with the no root content tileset by navigating [here](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/three/#../data/tileset-no-root-content.json).
239+
1. Open the kitchen sink example with the no root content tileset by navigating [here](https://nasa-ammos.github.io/3DTilesRendererJS/three/#../data/tileset-no-root-content.json).
240240
1. Slowly move the tileset offscreen by right clicking and dragging the view.
241241

242242
#### expected
@@ -264,7 +264,7 @@ Verify that the stats display 125 geometries, 126 textures, and 1 programs.
264264

265265
#### steps
266266

267-
1. Open the kitchen sink example with the no root content tileset by navigating [here](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/three/#../data/tileset-no-root-content.json).
267+
1. Open the kitchen sink example with the no root content tileset by navigating [here](https://nasa-ammos.github.io/3DTilesRendererJS/three/#../data/tileset-no-root-content.json).
268268
1. Set `colorMode` to `RANDOM_COLOR`.
269269

270270
#### expected
@@ -287,7 +287,7 @@ Verify the tileset loads correctly and there are no missing chunks or errors in
287287

288288
#### steps
289289

290-
1. Load `tileset-external-broken.json` in the kitchen sink example [here](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/three/#../data/tileset-external-broken.json).
290+
1. Load `tileset-external-broken.json` in the kitchen sink example [here](https://nasa-ammos.github.io/3DTilesRendererJS/three/#../data/tileset-external-broken.json).
291291
1. Zoom in and out.
292292
1. Set target error to `0`.
293293

@@ -299,7 +299,7 @@ Verify that the external tileset does not load but the rest of the tileset conti
299299

300300
#### steps
301301

302-
1. Load `tileset-external.json` in the kitchen sink example [here](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/three/#../data/tileset-external.json).
302+
1. Load `tileset-external.json` in the kitchen sink example [here](https://nasa-ammos.github.io/3DTilesRendererJS/three/#../data/tileset-external.json).
303303
1. Zoom in and out.
304304
1. Set target error to `0`.
305305
1. Ensure external tileset has loaded by running `tiles.root.children[0].children[0].children` in the console and verifying it's not empty.
@@ -315,7 +315,7 @@ Verify all steps happen as written.
315315

316316
#### steps
317317

318-
1. Load `tileset-external.json` in the kitchen sink example [here](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/three/#../data/tileset-external.json).
318+
1. Load `tileset-external.json` in the kitchen sink example [here](https://nasa-ammos.github.io/3DTilesRendererJS/three/#../data/tileset-external.json).
319319
1. Zoom in and out to load in tiles.
320320
1. Set target error to `0`.
321321
1. Open render stats display.
@@ -330,7 +330,7 @@ Verify that the total geometries in the render stats display is still "220".
330330

331331
#### steps
332332

333-
1. Open the kitchen sink example with the no root content tileset by navigating [here](https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/three/#../data/tileset-add.json).
333+
1. Open the kitchen sink example with the no root content tileset by navigating [here](https://nasa-ammos.github.io/3DTilesRendererJS/three/#../data/tileset-add.json).
334334
1. Set `colorMode` to `RANDOM_COLOR`.
335335
1. Set `maxDepth` to 2 so two layers are displayed on top of eachother.
336336
1. Click the color that represents the root tile and ensure depth is logged as "0".

eslint.config.js

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import react from 'eslint-plugin-react';
55
import reactHooks from 'eslint-plugin-react-hooks';
66
import globals from 'globals';
77
import mdcs from 'eslint-config-mdcs';
8+
import jsdoc from 'eslint-plugin-jsdoc';
89

910
export default [
1011
// files to ignore
@@ -30,7 +31,7 @@ export default [
3031
name: 'base rules',
3132
files: [ '**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx' ],
3233
languageOptions: {
33-
ecmaVersion: 2020,
34+
ecmaVersion: 2022,
3435
sourceType: 'module',
3536
globals: {
3637
...globals.browser,
@@ -52,6 +53,7 @@ export default [
5253
vars: 'all',
5354
args: 'none',
5455
} ],
56+
'template-curly-spacing': [ 'error', 'always' ],
5557
},
5658
},
5759

@@ -99,6 +101,38 @@ export default [
99101
},
100102
},
101103

104+
// jsdoc
105+
{
106+
name: 'jsdoc rules',
107+
files: [ '**/*.js', '**/*.jsx' ],
108+
plugins: {
109+
jsdoc,
110+
},
111+
settings: {
112+
jsdoc: {
113+
preferredTypes: {
114+
Any: 'any',
115+
Boolean: 'boolean',
116+
Number: 'number',
117+
object: 'Object',
118+
String: 'string',
119+
},
120+
tagNamePreference: {
121+
returns: 'return',
122+
extends: 'augments',
123+
},
124+
},
125+
},
126+
rules: {
127+
'jsdoc/check-types': 'error',
128+
'jsdoc/require-param-type': 'error',
129+
'jsdoc/require-returns-type': 'error',
130+
'jsdoc/require-returns': 'off',
131+
'jsdoc/require-param-description': 'off',
132+
'jsdoc/require-returns-description': 'off',
133+
},
134+
},
135+
102136
// vitest
103137
{
104138
name: 'vitest rules',

example/three/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ const params = {
6666
displaySphereBounds: false,
6767
displayRegionBounds: false,
6868
colorMode: urlParams.get( 'colorMode' ) in DebugTilesPlugin.ColorModes ? DebugTilesPlugin.ColorModes[ urlParams.get( 'colorMode' ) ] : DebugTilesPlugin.ColorModes.NONE,
69+
boundsColorMode: DebugTilesPlugin.ColorModes.NONE,
6970
unlit: Boolean( urlParams.get( 'unlit' ) ),
7071
showThirdPerson: false,
7172
showSecondView: false,
@@ -269,6 +270,7 @@ function init() {
269270
debug.add( params, 'displaySphereBounds' );
270271
debug.add( params, 'displayRegionBounds' );
271272
debug.add( params, 'colorMode', DebugTilesPlugin.ColorModes );
273+
debug.add( params, 'boundsColorMode', DebugTilesPlugin.ColorModes );
272274
debug.add( params, 'unlit' );
273275
debug.open();
274276

@@ -472,6 +474,7 @@ function animate() {
472474
plugin.displaySphereBounds = params.displaySphereBounds;
473475
plugin.displayRegionBounds = params.displayRegionBounds;
474476
plugin.colorMode = parseFloat( params.colorMode );
477+
plugin.boundsColorMode = parseFloat( params.boundsColorMode );
475478
plugin.unlit = params.unlit;
476479

477480
if ( params.orthographic ) {

0 commit comments

Comments
 (0)