Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions examples/jsm/libs/demuxer_mp4.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import MP4Box from 'https://cdn.jsdelivr.net/npm/mp4box@0.5.3/+esm';
import { createFile, DataStream } from 'https://cdn.jsdelivr.net/npm/mp4box@2.3.0/+esm';

// From: https://w3c.github.io/webcodecs/samples/video-decode-display/

Expand Down Expand Up @@ -47,7 +47,7 @@ export class MP4Demuxer {
this.#setStatus = setStatus;

// Configure an MP4Box File for demuxing.
this.#file = MP4Box.createFile();
this.#file = createFile();
this.#file.onError = error => setStatus("demux", error);
this.#file.onReady = this.#onReady.bind(this);
this.#file.onSamples = this.#onSamples.bind(this);
Expand All @@ -68,7 +68,7 @@ export class MP4Demuxer {
for (const entry of trak.mdia.minf.stbl.stsd.entries) {
const box = entry.avcC || entry.hvcC || entry.vpcC || entry.av1C;
if (box) {
const stream = new MP4Box.DataStream(undefined, 0, MP4Box.DataStream.BIG_ENDIAN);
const stream = new DataStream(undefined, 0, DataStream.BIG_ENDIAN);
box.write(stream);
return new Uint8Array(stream.buffer, 8); // Remove the box header.
}
Expand Down
21 changes: 0 additions & 21 deletions examples/jsm/libs/rhino3dm/rhino3dm.js

This file was deleted.

16 changes: 0 additions & 16 deletions examples/jsm/libs/rhino3dm/rhino3dm.module.js

This file was deleted.

Binary file removed examples/jsm/libs/rhino3dm/rhino3dm.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion examples/jsm/loaders/3DMLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const _taskCache = new WeakMap();
*
* ```js
* const loader = new Rhino3dmLoader();
* loader.setLibraryPath( 'https://cdn.jsdelivr.net/npm/rhino3dm@8.0.1' );
* loader.setLibraryPath( 'https://cdn.jsdelivr.net/npm/rhino3dm@8.17.0/' );
*
* const object = await loader.loadAsync( 'models/3dm/Rhino_Logo.3dm' );
* scene.add( object );
Expand Down
4 changes: 2 additions & 2 deletions examples/misc_exporter_gcode.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<script type="module">

import * as THREE from 'three';
import Polyslice from 'https://unpkg.com/@jgphilpott/polyslice@25.12.8/dist/index.browser.esm.js';
import Polyslice from 'https://cdn.jsdelivr.net/npm/@jgphilpott/polyslice@26.4.0/dist/index.browser.esm.js';

import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
import { GUI } from 'three/addons/libs/lil-gui.module.min.js';
Expand Down Expand Up @@ -129,7 +129,7 @@
// Check if Polyslice is loaded
if ( typeof Polyslice === 'undefined' ) {

alert( 'Polyslice library failed to load from CDN.\n\nPossible solutions:\n1. Disable ad blockers or browser extensions\n2. Check your network connection\n3. Ensure unpkg.com is not blocked by your firewall' );
alert( 'Polyslice library failed to load from CDN.\n\nPossible solutions:\n1. Disable ad blockers or browser extensions\n2. Check your network connection\n3. Ensure cdn.jsdelivr.net is not blocked by your firewall' );
return;

}
Expand Down
Binary file modified examples/screenshots/webgl_batch_lod_bvh.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgl_morphtargets_webcam.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions examples/tags.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"webgl_lines_fat": [ "gpu", "stats", "panel" ],
"webgl_lines_fat_raycasting": [ "gpu", "stats", "panel", "raycast" ],
"webgl_loader_gltf_animation_pointer": [ "community", "animation", "gltf" ],
"webgl_loader_3dm": [ "rhino", "community" ],
"webgl_loader_3dtiles": [ "community", "3dtiles", "3d-tiles", "maps", "tiles", "globe", "earth", "cesium" ],
"webgl_loader_gltf_dispersion": [ "transmission" ],
"webgl_loader_gltf_progressive_lod": [ "community", "performance", "plugin", "library", "level", "details" ],
Expand Down
16 changes: 8 additions & 8 deletions examples/webgl_batch_lod_bvh.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@
"three": "../build/three.module.js",
"three/addons/": "./jsm/",

"three-mesh-bvh": "https://cdn.jsdelivr.net/npm/three-mesh-bvh@0.9.9/build/index.module.js",
"three-mesh-bvh": "https://cdn.jsdelivr.net/npm/three-mesh-bvh@0.9.10/build/index.module.js",

"@three.ez/batched-mesh-extensions": "https://cdn.jsdelivr.net/npm/@three.ez/batched-mesh-extensions@0.0.8/build/webgl.js",
"@three.ez/batched-mesh-extensions": "https://cdn.jsdelivr.net/npm/@three.ez/batched-mesh-extensions@0.0.11/build/webgl.js",
"bvh.js": "https://cdn.jsdelivr.net/npm/bvh.js@0.0.13/build/index.js",

"@three.ez/simplify-geometry": "https://cdn.jsdelivr.net/npm/@three.ez/simplify-geometry@0.0.1/build/index.js",
"meshoptimizer": "https://cdn.jsdelivr.net/npm/meshoptimizer@0.23.0/+esm"
"meshoptimizer": "https://cdn.jsdelivr.net/npm/meshoptimizer@1.1.1/+esm"
}
}
</script>
Expand Down Expand Up @@ -131,7 +131,7 @@
// create BatchedMesh
const { vertexCount, indexCount, LODIndexCount } = getBatchedMeshLODCount( geometriesLODArray );
batchedMesh = new THREE.BatchedMesh( instancesCount, vertexCount, indexCount, new THREE.MeshStandardMaterial( { metalness: 1, roughness: 0.8 } ) );

// enable radix sort for better performance
batchedMesh.customSort = createRadixSort( batchedMesh );

Expand All @@ -140,10 +140,10 @@

const geometryLOD = geometriesLODArray[ i ];
const geometryId = batchedMesh.addGeometry( geometryLOD[ 0 ], - 1, LODIndexCount[ i ] );
batchedMesh.addGeometryLOD( geometryId, geometryLOD[ 1 ], 50 );
batchedMesh.addGeometryLOD( geometryId, geometryLOD[ 2 ], 100 );
batchedMesh.addGeometryLOD( geometryId, geometryLOD[ 3 ], 125 );
batchedMesh.addGeometryLOD( geometryId, geometryLOD[ 4 ], 200 );
batchedMesh.addGeometryLOD( geometryId, geometryLOD[ 1 ], 0.08 ); // used when below ~8% of the screen height
batchedMesh.addGeometryLOD( geometryId, geometryLOD[ 2 ], 0.04 ); // below ~4%
batchedMesh.addGeometryLOD( geometryId, geometryLOD[ 3 ], 0.033 ); // below ~3.3%
batchedMesh.addGeometryLOD( geometryId, geometryLOD[ 4 ], 0.02 ); // below ~2%

}

Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_geometry_csg.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"imports": {
"three": "../build/three.module.js",
"three/addons/": "./jsm/",
"three-mesh-bvh": "https://cdn.jsdelivr.net/npm/three-mesh-bvh@0.9.9/build/index.module.js",
"three-mesh-bvh": "https://cdn.jsdelivr.net/npm/three-mesh-bvh@0.9.10/build/index.module.js",
"three-bvh-csg": "https://cdn.jsdelivr.net/npm/three-bvh-csg@0.0.18/build/index.module.js"
}
}
Expand Down
3 changes: 1 addition & 2 deletions examples/webgl_loader_3dm.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@
scene.add( directionalLight );

const loader = new Rhino3dmLoader();
//generally, use this for the Library Path: https://cdn.jsdelivr.net/npm/rhino3dm@8.0.1
loader.setLibraryPath( 'jsm/libs/rhino3dm/' );
loader.setLibraryPath( 'https://cdn.jsdelivr.net/npm/rhino3dm@8.17.0/' );
loader.load( 'models/3dm/Rhino_Logo.3dm', function ( object ) {

scene.add( object );
Expand Down
20 changes: 10 additions & 10 deletions examples/webgl_loader_3dtiles.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,16 @@
"three": "../build/three.module.js",
"three/addons/": "./jsm/",
"three/examples/": "./",
"3d-tiles-renderer": "https://cdn.jsdelivr.net/npm/3d-tiles-renderer@0.4.24/build/index.js",
"3d-tiles-renderer/core/plugins": "https://cdn.jsdelivr.net/npm/3d-tiles-renderer@0.4.24/build/index.core-plugins.js",
"3d-tiles-renderer/three/plugins": "https://cdn.jsdelivr.net/npm/3d-tiles-renderer@0.4.24/build/index.three-plugins.js",
"postprocessing": "https://cdn.jsdelivr.net/npm/postprocessing@6.39.0/build/index.js",
"@takram/three-clouds": "https://cdn.jsdelivr.net/npm/@takram/three-clouds@0.7.3/build/index.js",
"@takram/three-atmosphere": "https://cdn.jsdelivr.net/npm/@takram/three-atmosphere@0.17.1/build/index.js",
"@takram/three-geospatial": "https://cdn.jsdelivr.net/npm/@takram/three-geospatial@0.7.1/build/index.js",
"@takram/three-geospatial/shaders": "https://cdn.jsdelivr.net/npm/@takram/three-geospatial@0.7.1/build/shaders.js",
"@takram/three-geospatial-effects": "https://cdn.jsdelivr.net/npm/@takram/three-geospatial-effects@0.6.1/build/index.js",
"@takram/three-atmosphere/shaders/bruneton": "https://cdn.jsdelivr.net/npm/@takram/three-atmosphere@0.17.1/build/shaders/bruneton.js"
"3d-tiles-renderer": "https://cdn.jsdelivr.net/npm/3d-tiles-renderer@0.4.27/build/index.js",
"3d-tiles-renderer/core/plugins": "https://cdn.jsdelivr.net/npm/3d-tiles-renderer@0.4.27/build/index.core-plugins.js",
"3d-tiles-renderer/three/plugins": "https://cdn.jsdelivr.net/npm/3d-tiles-renderer@0.4.27/build/index.three-plugins.js",
"postprocessing": "https://cdn.jsdelivr.net/npm/postprocessing@6.39.1/build/index.js",
"@takram/three-clouds": "https://cdn.jsdelivr.net/npm/@takram/three-clouds@0.7.6/build/index.js",
"@takram/three-atmosphere": "https://cdn.jsdelivr.net/npm/@takram/three-atmosphere@0.19.1/build/index.js",
"@takram/three-geospatial": "https://cdn.jsdelivr.net/npm/@takram/three-geospatial@0.9.1/build/index.js",
"@takram/three-geospatial/shaders": "https://cdn.jsdelivr.net/npm/@takram/three-geospatial@0.9.1/build/shaders.js",
"@takram/three-geospatial-effects": "https://cdn.jsdelivr.net/npm/@takram/three-geospatial-effects@0.6.4/build/index.js",
"@takram/three-atmosphere/shaders/bruneton": "https://cdn.jsdelivr.net/npm/@takram/three-atmosphere@0.19.1/build/shaders/bruneton.js"
}
}
</script>
Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_loader_gltf_animation_pointer.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"imports": {
"three": "../build/three.module.js",
"three/addons/": "./jsm/",
"@needle-tools/three-animation-pointer": "https://cdn.jsdelivr.net/npm/@needle-tools/three-animation-pointer@1.0.1"
"@needle-tools/three-animation-pointer": "https://cdn.jsdelivr.net/npm/@needle-tools/three-animation-pointer@1.0.7"
}
}
</script>
Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_modifier_subdivision.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"imports": {
"three": "../build/three.module.js",
"three/addons/": "./jsm/",
"three-subdivide": "https://cdn.jsdelivr.net/npm/three-subdivide@1.1.2/build/index.module.js"
"three-subdivide": "https://cdn.jsdelivr.net/npm/three-subdivide@1.1.5/build/index.module.js"
}
}
</script>
Expand Down
Loading