diff --git a/examples-testing/README.md b/examples-testing/README.md index f517d0b83..8e3b0ab04 100644 --- a/examples-testing/README.md +++ b/examples-testing/README.md @@ -4,7 +4,7 @@ - Commit changes - `git apply changes.patch` - Make changes -- `yarn run type-check` +- `npm run type-check` - `git diff > ../changes.patch` - Reset changes - Move patch file @@ -15,7 +15,7 @@ - Commit changes - `git apply --reject changes.patch` - Fix conflicts -- `yarn run type-check` +- `npm run type-check` - `git diff > ../changes.patch` - Reset example changes - Move patch file diff --git a/examples-testing/changes.patch b/examples-testing/changes.patch index 4a47a6bd4..193bb4699 100644 --- a/examples-testing/changes.patch +++ b/examples-testing/changes.patch @@ -1,5 +1,5 @@ diff --git a/examples-testing/examples/css2d_label.ts b/examples-testing/examples/css2d_label.ts -index cf61d1e..693b1e2 100644 +index 24c45ad..1eb439f 100644 --- a/examples-testing/examples/css2d_label.ts +++ b/examples-testing/examples/css2d_label.ts @@ -7,7 +7,7 @@ import { GUI } from 'three/addons/libs/lil-gui.module.min.js'; @@ -155,7 +155,7 @@ index 5384726..f08bb34 100644 const atom = document.createElement('img'); atom.src = colorSprite; diff --git a/examples-testing/examples/css3d_orthographic.ts b/examples-testing/examples/css3d_orthographic.ts -index 4aabbed..5488635 100644 +index 39bcf17..c6d998b 100644 --- a/examples-testing/examples/css3d_orthographic.ts +++ b/examples-testing/examples/css3d_orthographic.ts @@ -3,10 +3,11 @@ import * as THREE from 'three'; @@ -172,7 +172,7 @@ index 4aabbed..5488635 100644 const frustumSize = 500; -@@ -75,18 +76,18 @@ function init() { +@@ -76,18 +77,18 @@ function init() { renderer2 = new CSS3DRenderer(); renderer2.setSize(window.innerWidth, window.innerHeight); renderer2.domElement.style.position = 'absolute'; @@ -194,7 +194,7 @@ index 4aabbed..5488635 100644 element.style.background = cssColor; const object = new CSS3DObject(element); -@@ -133,12 +134,12 @@ function createPanel() { +@@ -134,12 +135,12 @@ function createPanel() { const settings = { setViewOffset() { @@ -213,7 +213,7 @@ index 4aabbed..5488635 100644 }, fullWidth: 0, fullHeight: 0, -@@ -147,12 +148,12 @@ function createPanel() { +@@ -148,12 +149,12 @@ function createPanel() { width: 0, height: 0, clearViewOffset() { @@ -232,7 +232,7 @@ index 4aabbed..5488635 100644 camera.clearViewOffset(); }, }; -@@ -160,32 +161,46 @@ function createPanel() { +@@ -161,32 +162,46 @@ function createPanel() { folder1.add(settings, 'setViewOffset'); folder1 .add(settings, 'fullWidth', window.screen.width / 4, window.screen.width * 2, 1) @@ -392,7 +392,7 @@ index e3a33f7..516df46 100644 .onUpdate(render) .start(); diff --git a/examples-testing/examples/css3d_sandbox.ts b/examples-testing/examples/css3d_sandbox.ts -index 1088b84..b910c1f 100644 +index 6b9efbb..8d241c1 100644 --- a/examples-testing/examples/css3d_sandbox.ts +++ b/examples-testing/examples/css3d_sandbox.ts @@ -2,13 +2,13 @@ import * as THREE from 'three'; @@ -422,7 +422,7 @@ index 1088b84..b910c1f 100644 element.style.background = new THREE.Color(Math.random() * 0xffffff).getStyle(); const object = new CSS3DObject(element); -@@ -67,7 +67,7 @@ function init() { +@@ -68,7 +68,7 @@ function init() { renderer2 = new CSS3DRenderer(); renderer2.setSize(window.innerWidth, window.innerHeight); renderer2.domElement.style.position = 'absolute'; @@ -431,7 +431,7 @@ index 1088b84..b910c1f 100644 document.body.appendChild(renderer2.domElement); controls = new TrackballControls(camera, renderer2.domElement); -@@ -101,12 +101,12 @@ function createPanel() { +@@ -102,12 +102,12 @@ function createPanel() { const settings = { setViewOffset() { @@ -450,7 +450,7 @@ index 1088b84..b910c1f 100644 }, fullWidth: 0, fullHeight: 0, -@@ -115,12 +115,12 @@ function createPanel() { +@@ -116,12 +116,12 @@ function createPanel() { width: 0, height: 0, clearViewOffset() { @@ -469,7 +469,7 @@ index 1088b84..b910c1f 100644 camera.clearViewOffset(); }, }; -@@ -128,32 +128,46 @@ function createPanel() { +@@ -129,32 +129,46 @@ function createPanel() { folder1.add(settings, 'setViewOffset'); folder1 .add(settings, 'fullWidth', window.screen.width / 4, window.screen.width * 2, 1) @@ -623,7 +623,7 @@ index 62652f8..3dcc2f1 100644 controls.addEventListener('start', function () { diff --git a/examples-testing/examples/games_fps.ts b/examples-testing/examples/games_fps.ts -index 49dd6f3..911a149 100644 +index a37faaa..9b1e817 100644 --- a/examples-testing/examples/games_fps.ts +++ b/examples-testing/examples/games_fps.ts @@ -39,7 +39,7 @@ directionalLight.shadow.radius = 4; @@ -635,7 +635,7 @@ index 49dd6f3..911a149 100644 const renderer = new THREE.WebGLRenderer({ antialias: true }); renderer.setPixelRatio(window.devicePixelRatio); -@@ -50,9 +50,9 @@ renderer.toneMapping = THREE.ACESFilmicToneMapping; +@@ -51,9 +51,9 @@ renderer.useLegacyLights = false; container.appendChild(renderer.domElement); const stats = new Stats(); @@ -648,7 +648,7 @@ index 49dd6f3..911a149 100644 const GRAVITY = 30; -@@ -64,7 +64,13 @@ const STEPS_PER_FRAME = 5; +@@ -65,7 +65,13 @@ const STEPS_PER_FRAME = 5; const sphereGeometry = new THREE.IcosahedronGeometry(SPHERE_RADIUS, 5); const sphereMaterial = new THREE.MeshLambertMaterial({ color: 0xdede8d }); @@ -663,7 +663,7 @@ index 49dd6f3..911a149 100644 let sphereIdx = 0; for (let i = 0; i < NUM_SPHERES; i++) { -@@ -91,7 +97,7 @@ const playerDirection = new THREE.Vector3(); +@@ -92,7 +98,7 @@ const playerDirection = new THREE.Vector3(); let playerOnFloor = false; let mouseTime = 0; @@ -672,7 +672,7 @@ index 49dd6f3..911a149 100644 const vector1 = new THREE.Vector3(); const vector2 = new THREE.Vector3(); -@@ -164,7 +170,7 @@ function playerCollisions() { +@@ -165,7 +171,7 @@ function playerCollisions() { } } @@ -681,7 +681,7 @@ index 49dd6f3..911a149 100644 let damping = Math.exp(-4 * deltaTime) - 1; if (!playerOnFloor) { -@@ -184,7 +190,7 @@ function updatePlayer(deltaTime) { +@@ -185,7 +191,7 @@ function updatePlayer(deltaTime) { camera.position.copy(playerCollider.end); } @@ -690,7 +690,7 @@ index 49dd6f3..911a149 100644 const center = vector1.addVectors(playerCollider.start, playerCollider.end).multiplyScalar(0.5); const sphere_center = sphere.collider.center; -@@ -239,7 +245,7 @@ function spheresCollisions() { +@@ -240,7 +246,7 @@ function spheresCollisions() { } } @@ -699,7 +699,7 @@ index 49dd6f3..911a149 100644 spheres.forEach(sphere => { sphere.collider.center.addScaledVector(sphere.velocity, deltaTime); -@@ -282,7 +288,7 @@ function getSideVector() { +@@ -283,7 +289,7 @@ function getSideVector() { return playerDirection; } @@ -708,7 +708,7 @@ index 49dd6f3..911a149 100644 // gives a bit of air control const speedDelta = deltaTime * (playerOnFloor ? 25 : 8); -@@ -317,12 +323,12 @@ loader.load('collision-world.glb', gltf => { +@@ -318,12 +324,12 @@ loader.load('collision-world.glb', gltf => { worldOctree.fromGraphNode(gltf.scene); gltf.scene.traverse(child => { @@ -724,7 +724,7 @@ index 49dd6f3..911a149 100644 } } }); -@@ -332,7 +338,7 @@ loader.load('collision-world.glb', gltf => { +@@ -333,7 +339,7 @@ loader.load('collision-world.glb', gltf => { scene.add(helper); const gui = new GUI({ width: 200 }); @@ -734,7 +734,7 @@ index 49dd6f3..911a149 100644 }); diff --git a/examples-testing/examples/misc_animation_groups.ts b/examples-testing/examples/misc_animation_groups.ts -index 19d263f..f8d0bed 100644 +index e882045..17c6a3a 100644 --- a/examples-testing/examples/misc_animation_groups.ts +++ b/examples-testing/examples/misc_animation_groups.ts @@ -2,8 +2,8 @@ import * as THREE from 'three'; @@ -749,7 +749,7 @@ index 19d263f..f8d0bed 100644 init(); animate(); diff --git a/examples-testing/examples/misc_animation_keys.ts b/examples-testing/examples/misc_animation_keys.ts -index 4a80898..d2613d0 100644 +index 0c678e2..f0313a0 100644 --- a/examples-testing/examples/misc_animation_keys.ts +++ b/examples-testing/examples/misc_animation_keys.ts @@ -2,8 +2,8 @@ import * as THREE from 'three'; @@ -776,7 +776,7 @@ index 4a80898..d2613d0 100644 scene.add(mesh); diff --git a/examples-testing/examples/misc_boxselection.ts b/examples-testing/examples/misc_boxselection.ts -index a78c71b..0ecae0f 100644 +index 2e2ac51..fc58453 100644 --- a/examples-testing/examples/misc_boxselection.ts +++ b/examples-testing/examples/misc_boxselection.ts @@ -5,8 +5,8 @@ import Stats from 'three/addons/libs/stats.module.js'; @@ -833,7 +833,7 @@ index a78c71b..0ecae0f 100644 } }); diff --git a/examples-testing/examples/misc_controls_arcball.ts b/examples-testing/examples/misc_controls_arcball.ts -index f7ea233..64a2143 100644 +index 923d07b..d8e4db0 100644 --- a/examples-testing/examples/misc_controls_arcball.ts +++ b/examples-testing/examples/misc_controls_arcball.ts @@ -12,8 +12,12 @@ const cameraType = { type: 'Perspective' }; @@ -851,7 +851,7 @@ index f7ea233..64a2143 100644 const arcballGui = { gizmoVisible: true, -@@ -99,8 +103,8 @@ function init() { +@@ -98,8 +102,8 @@ function init() { material.normalMap.wrapS = THREE.RepeatWrapping; group.traverse(function (child) { @@ -862,7 +862,7 @@ index f7ea233..64a2143 100644 } }); -@@ -166,12 +170,12 @@ function onWindowResize() { +@@ -165,12 +169,12 @@ function onWindowResize() { const halfW = perspectiveDistance * Math.tan(halfFovH); const halfH = perspectiveDistance * Math.tan(halfFovV); @@ -880,7 +880,7 @@ index f7ea233..64a2143 100644 } camera.updateProjectionMatrix(); -@@ -185,7 +189,7 @@ function render() { +@@ -184,7 +188,7 @@ function render() { renderer.render(scene, camera); } @@ -889,7 +889,7 @@ index f7ea233..64a2143 100644 if (event.key === 'c') { if (event.ctrlKey || event.metaKey) { controls.copyState(); -@@ -197,7 +201,7 @@ function onKeyDown(event) { +@@ -196,7 +200,7 @@ function onKeyDown(event) { } } @@ -899,7 +899,7 @@ index f7ea233..64a2143 100644 camera = makeOrthographicCamera(); camera.position.set(0, 0, orthographicDistance); diff --git a/examples-testing/examples/misc_controls_drag.ts b/examples-testing/examples/misc_controls_drag.ts -index da4bd24..ec63df3 100644 +index 131fa6b..555fb1e 100644 --- a/examples-testing/examples/misc_controls_drag.ts +++ b/examples-testing/examples/misc_controls_drag.ts @@ -2,12 +2,12 @@ import * as THREE from 'three'; @@ -951,10 +951,10 @@ index da4bd24..ec63df3 100644 } diff --git a/examples-testing/examples/misc_controls_fly.ts b/examples-testing/examples/misc_controls_fly.ts -index 2dd77ec..7c184f4 100644 +index dd48a63..b13530a 100644 --- a/examples-testing/examples/misc_controls_fly.ts +++ b/examples-testing/examples/misc_controls_fly.ts -@@ -20,11 +20,15 @@ const MARGIN = 0; +@@ -19,11 +19,15 @@ const MARGIN = 0; let SCREEN_HEIGHT = window.innerHeight - MARGIN * 2; let SCREEN_WIDTH = window.innerWidth; @@ -974,7 +974,7 @@ index 2dd77ec..7c184f4 100644 const textureLoader = new THREE.TextureLoader(); -@@ -57,7 +61,7 @@ function init() { +@@ -56,7 +60,7 @@ function init() { // y scale is negated to compensate for normal map handedness. normalScale: new THREE.Vector2(0.85, -0.85), }); @@ -983,7 +983,7 @@ index 2dd77ec..7c184f4 100644 // planet -@@ -74,7 +78,7 @@ function init() { +@@ -73,7 +77,7 @@ function init() { map: textureLoader.load('textures/planets/earth_clouds_1024.png'), transparent: true, }); @@ -992,7 +992,7 @@ index 2dd77ec..7c184f4 100644 meshClouds = new THREE.Mesh(geometry, materialClouds); meshClouds.scale.set(cloudsScale, cloudsScale, cloudsScale); -@@ -86,7 +90,7 @@ function init() { +@@ -85,7 +89,7 @@ function init() { const materialMoon = new THREE.MeshPhongMaterial({ map: textureLoader.load('textures/planets/moon_1024.jpg'), }); @@ -1002,7 +1002,7 @@ index 2dd77ec..7c184f4 100644 meshMoon = new THREE.Mesh(geometry, materialMoon); meshMoon.position.set(radius * 5, 0, 0); diff --git a/examples-testing/examples/misc_controls_map.ts b/examples-testing/examples/misc_controls_map.ts -index 35e03d2..698e57a 100644 +index 943098e..c41b797 100644 --- a/examples-testing/examples/misc_controls_map.ts +++ b/examples-testing/examples/misc_controls_map.ts @@ -4,7 +4,7 @@ import { GUI } from 'three/addons/libs/lil-gui.module.min.js'; @@ -1014,20 +1014,8 @@ index 35e03d2..698e57a 100644 init(); //render(); // remove when using next line for animation loop (requestAnimationFrame) -@@ -43,7 +43,10 @@ function init() { - - const geometry = new THREE.BoxGeometry(1, 1, 1); - geometry.translate(0, 0.5, 0); -- const material = new THREE.MeshPhongMaterial({ color: 0xeeeeee, flatShading: true }); -+ const material = new THREE.MeshPhongMaterial({ -+ color: 0xeeeeee, -+ flatShading: true, -+ }); - - for (let i = 0; i < 500; i++) { - const mesh = new THREE.Mesh(geometry, material); diff --git a/examples-testing/examples/misc_controls_orbit.ts b/examples-testing/examples/misc_controls_orbit.ts -index 28bc3c0..a13dc53 100644 +index a6dd046..610447c 100644 --- a/examples-testing/examples/misc_controls_orbit.ts +++ b/examples-testing/examples/misc_controls_orbit.ts @@ -2,7 +2,7 @@ import * as THREE from 'three'; @@ -1039,20 +1027,8 @@ index 28bc3c0..a13dc53 100644 init(); //render(); // remove when using next line for animation loop (requestAnimationFrame) -@@ -41,7 +41,10 @@ function init() { - // world - - const geometry = new THREE.CylinderGeometry(0, 10, 30, 4, 1); -- const material = new THREE.MeshPhongMaterial({ color: 0xffffff, flatShading: true }); -+ const material = new THREE.MeshPhongMaterial({ -+ color: 0xffffff, -+ flatShading: true, -+ }); - - for (let i = 0; i < 500; i++) { - const mesh = new THREE.Mesh(geometry, material); diff --git a/examples-testing/examples/misc_controls_pointerlock.ts b/examples-testing/examples/misc_controls_pointerlock.ts -index d29ffaf..7859ead 100644 +index 9c3138f..c075d08 100644 --- a/examples-testing/examples/misc_controls_pointerlock.ts +++ b/examples-testing/examples/misc_controls_pointerlock.ts @@ -2,11 +2,11 @@ import * as THREE from 'three'; @@ -1122,7 +1098,7 @@ index d29ffaf..7859ead 100644 const box = new THREE.Mesh(boxGeometry, boxMaterial); diff --git a/examples-testing/examples/misc_controls_trackball.ts b/examples-testing/examples/misc_controls_trackball.ts -index 19c42c6..1b7f21a 100644 +index 2e398e6..fb903c8 100644 --- a/examples-testing/examples/misc_controls_trackball.ts +++ b/examples-testing/examples/misc_controls_trackball.ts @@ -5,7 +5,12 @@ import { GUI } from 'three/addons/libs/lil-gui.module.min.js'; @@ -1139,19 +1115,7 @@ index 19c42c6..1b7f21a 100644 const params = { orthographicCamera: false, -@@ -39,7 +44,10 @@ function init() { - scene.fog = new THREE.FogExp2(0xcccccc, 0.002); - - const geometry = new THREE.CylinderGeometry(0, 10, 30, 4, 1); -- const material = new THREE.MeshPhongMaterial({ color: 0xffffff, flatShading: true }); -+ const material = new THREE.MeshPhongMaterial({ -+ color: 0xffffff, -+ flatShading: true, -+ }); - - for (let i = 0; i < 500; i++) { - const mesh = new THREE.Mesh(geometry, material); -@@ -79,7 +87,7 @@ function init() { +@@ -80,7 +85,7 @@ function init() { const gui = new GUI(); gui.add(params, 'orthographicCamera') .name('use orthographic') @@ -1160,7 +1124,7 @@ index 19c42c6..1b7f21a 100644 controls.dispose(); createControls(value ? orthographicCamera : perspectiveCamera); -@@ -92,7 +100,7 @@ function init() { +@@ -93,7 +98,7 @@ function init() { createControls(perspectiveCamera); } @@ -1170,7 +1134,7 @@ index 19c42c6..1b7f21a 100644 controls.rotateSpeed = 1.0; diff --git a/examples-testing/examples/misc_controls_transform.ts b/examples-testing/examples/misc_controls_transform.ts -index aa4de6f..7c08981 100644 +index 596e8bc..e49ef59 100644 --- a/examples-testing/examples/misc_controls_transform.ts +++ b/examples-testing/examples/misc_controls_transform.ts @@ -3,8 +3,8 @@ import * as THREE from 'three'; @@ -1184,19 +1148,7 @@ index aa4de6f..7c08981 100644 init(); render(); -@@ -36,7 +36,10 @@ function init() { - texture.anisotropy = renderer.capabilities.getMaxAnisotropy(); - - const geometry = new THREE.BoxGeometry(200, 200, 200); -- const material = new THREE.MeshLambertMaterial({ map: texture, transparent: true }); -+ const material = new THREE.MeshLambertMaterial({ -+ map: texture, -+ transparent: true, -+ }); - - orbit = new OrbitControls(currentCamera, renderer.domElement); - orbit.update(); -@@ -84,7 +87,9 @@ function init() { +@@ -87,7 +87,9 @@ function init() { case 67: // C const position = currentCamera.position.clone(); @@ -1208,7 +1160,7 @@ index aa4de6f..7c08981 100644 orbit.object = currentCamera; diff --git a/examples-testing/examples/misc_exporter_draco.ts b/examples-testing/examples/misc_exporter_draco.ts -index ce1e696..f8b4b86 100644 +index 4fb3cdb..6b0e1be 100644 --- a/examples-testing/examples/misc_exporter_draco.ts +++ b/examples-testing/examples/misc_exporter_draco.ts @@ -4,7 +4,11 @@ import { OrbitControls } from 'three/addons/controls/OrbitControls.js'; @@ -1224,7 +1176,7 @@ index ce1e696..f8b4b86 100644 const params = { export: exportFile, -@@ -109,12 +113,12 @@ const link = document.createElement('a'); +@@ -108,12 +112,12 @@ const link = document.createElement('a'); link.style.display = 'none'; document.body.appendChild(link); @@ -1240,7 +1192,7 @@ index ce1e696..f8b4b86 100644 save(new Blob([buffer], { type: 'application/octet-stream' }), filename); } diff --git a/examples-testing/examples/misc_exporter_gltf.ts b/examples-testing/examples/misc_exporter_gltf.ts -index c9d9433..c57b22f 100644 +index f7d5624..bc5c478 100644 --- a/examples-testing/examples/misc_exporter_gltf.ts +++ b/examples-testing/examples/misc_exporter_gltf.ts @@ -6,7 +6,7 @@ import { KTX2Loader } from 'three/addons/loaders/KTX2Loader.js'; @@ -1294,7 +1246,7 @@ index c9d9433..c57b22f 100644 const params = { trs: false, diff --git a/examples-testing/examples/misc_exporter_obj.ts b/examples-testing/examples/misc_exporter_obj.ts -index 02ad907..efb71b1 100644 +index 2361ae4..522d4f0 100644 --- a/examples-testing/examples/misc_exporter_obj.ts +++ b/examples-testing/examples/misc_exporter_obj.ts @@ -4,7 +4,7 @@ import { OrbitControls } from 'three/addons/controls/OrbitControls.js'; @@ -1306,7 +1258,7 @@ index 02ad907..efb71b1 100644 const params = { addTriangle: addTriangle, -@@ -66,12 +66,12 @@ function exportToObj() { +@@ -67,12 +67,12 @@ function exportToObj() { saveString(result, 'object.obj'); } @@ -1322,7 +1274,7 @@ index 02ad907..efb71b1 100644 scene.remove(child); i--; } -@@ -156,13 +156,13 @@ const link = document.createElement('a'); +@@ -157,13 +157,13 @@ const link = document.createElement('a'); link.style.display = 'none'; document.body.appendChild(link); @@ -1339,7 +1291,7 @@ index 02ad907..efb71b1 100644 } diff --git a/examples-testing/examples/misc_exporter_ply.ts b/examples-testing/examples/misc_exporter_ply.ts -index b6a334d..a0e6691 100644 +index bb381fa..7ab5278 100644 --- a/examples-testing/examples/misc_exporter_ply.ts +++ b/examples-testing/examples/misc_exporter_ply.ts @@ -4,7 +4,11 @@ import { OrbitControls } from 'three/addons/controls/OrbitControls.js'; @@ -1355,7 +1307,7 @@ index b6a334d..a0e6691 100644 const params = { exportASCII: exportASCII, -@@ -142,16 +146,16 @@ const link = document.createElement('a'); +@@ -143,16 +147,16 @@ const link = document.createElement('a'); link.style.display = 'none'; document.body.appendChild(link); @@ -1376,7 +1328,7 @@ index b6a334d..a0e6691 100644 save(new Blob([buffer], { type: 'application/octet-stream' }), filename); } diff --git a/examples-testing/examples/misc_exporter_stl.ts b/examples-testing/examples/misc_exporter_stl.ts -index 673bad1..71e6541 100644 +index 373aaab..4f1e683 100644 --- a/examples-testing/examples/misc_exporter_stl.ts +++ b/examples-testing/examples/misc_exporter_stl.ts @@ -4,7 +4,11 @@ import { OrbitControls } from 'three/addons/controls/OrbitControls.js'; @@ -1392,7 +1344,7 @@ index 673bad1..71e6541 100644 const params = { exportASCII: exportASCII, -@@ -115,16 +119,16 @@ const link = document.createElement('a'); +@@ -116,16 +120,16 @@ const link = document.createElement('a'); link.style.display = 'none'; document.body.appendChild(link); @@ -1413,7 +1365,7 @@ index 673bad1..71e6541 100644 save(new Blob([buffer], { type: 'application/octet-stream' }), filename); } diff --git a/examples-testing/examples/misc_exporter_usdz.ts b/examples-testing/examples/misc_exporter_usdz.ts -index 9117411..e6c6e85 100644 +index e4853b3..0303273 100644 --- a/examples-testing/examples/misc_exporter_usdz.ts +++ b/examples-testing/examples/misc_exporter_usdz.ts @@ -6,7 +6,7 @@ import { RoomEnvironment } from 'three/addons/environments/RoomEnvironment.js'; @@ -1425,7 +1377,7 @@ index 9117411..e6c6e85 100644 init(); render(); -@@ -45,7 +45,7 @@ function init() { +@@ -46,7 +46,7 @@ function init() { const arraybuffer = await exporter.parse(gltf.scene); const blob = new Blob([arraybuffer], { type: 'application/octet-stream' }); @@ -1434,7 +1386,7 @@ index 9117411..e6c6e85 100644 link.href = URL.createObjectURL(blob); }); -@@ -64,7 +64,7 @@ function createSpotShadowMesh() { +@@ -65,7 +65,7 @@ function createSpotShadowMesh() { canvas.width = 128; canvas.height = 128; @@ -1444,7 +1396,7 @@ index 9117411..e6c6e85 100644 canvas.width / 2, canvas.height / 2, diff --git a/examples-testing/examples/misc_lookat.ts b/examples-testing/examples/misc_lookat.ts -index f6241b9..93e8340 100644 +index 44d3006..4a34f9a 100644 --- a/examples-testing/examples/misc_lookat.ts +++ b/examples-testing/examples/misc_lookat.ts @@ -2,9 +2,9 @@ import * as THREE from 'three'; @@ -1459,7 +1411,7 @@ index f6241b9..93e8340 100644 let mouseX = 0, mouseY = 0; -@@ -64,7 +64,7 @@ function onWindowResize() { +@@ -65,7 +65,7 @@ function onWindowResize() { renderer.setSize(window.innerWidth, window.innerHeight); } @@ -1482,7 +1434,7 @@ index 4f782d4..0759cfc 100644 d.innerHTML = '

' + name + '

'; diff --git a/examples-testing/examples/physics_ammo_instancing.ts b/examples-testing/examples/physics_ammo_instancing.ts -index eb33424..aed0936 100644 +index 9a4e034..e02ae14 100644 --- a/examples-testing/examples/physics_ammo_instancing.ts +++ b/examples-testing/examples/physics_ammo_instancing.ts @@ -1,12 +1,12 @@ @@ -1503,7 +1455,7 @@ index eb33424..aed0936 100644 init(); diff --git a/examples-testing/examples/physics_rapier_instancing.ts b/examples-testing/examples/physics_rapier_instancing.ts -index 8f1bdda..67d3517 100644 +index aa612a9..59244c0 100644 --- a/examples-testing/examples/physics_rapier_instancing.ts +++ b/examples-testing/examples/physics_rapier_instancing.ts @@ -1,12 +1,12 @@ @@ -1622,7 +1574,7 @@ index e6be838..faea9a7 100644 node.appendChild(doc.documentElement); diff --git a/examples-testing/examples/webaudio_orientation.ts b/examples-testing/examples/webaudio_orientation.ts -index 8a74c41..7258ed1 100644 +index 5a15d35..20a0dfd 100644 --- a/examples-testing/examples/webaudio_orientation.ts +++ b/examples-testing/examples/webaudio_orientation.ts @@ -4,16 +4,16 @@ import { OrbitControls } from 'three/addons/controls/OrbitControls.js'; @@ -1684,7 +1636,7 @@ index 8a74c41..7258ed1 100644 const wall = new THREE.Mesh(wallGeometry, wallMaterial); wall.position.set(0, 0.5, -0.5); diff --git a/examples-testing/examples/webaudio_sandbox.ts b/examples-testing/examples/webaudio_sandbox.ts -index 8b40d14..780877b 100644 +index 1fe2921..bd250db 100644 --- a/examples-testing/examples/webaudio_sandbox.ts +++ b/examples-testing/examples/webaudio_sandbox.ts @@ -4,19 +4,23 @@ import { GUI } from 'three/addons/libs/lil-gui.module.min.js'; @@ -1787,7 +1739,7 @@ index 8b40d14..780877b 100644 const gui = new GUI(); const soundControls = new SoundControls(); -@@ -192,7 +209,6 @@ function init() { +@@ -193,7 +210,6 @@ function init() { controls.movementSpeed = 70; controls.lookSpeed = 0.05; @@ -1796,7 +1748,7 @@ index 8b40d14..780877b 100644 // diff --git a/examples-testing/examples/webaudio_timing.ts b/examples-testing/examples/webaudio_timing.ts -index 7504966..acac149 100644 +index 39259ae..3852550 100644 --- a/examples-testing/examples/webaudio_timing.ts +++ b/examples-testing/examples/webaudio_timing.ts @@ -2,22 +2,22 @@ import * as THREE from 'three'; @@ -1837,7 +1789,7 @@ index 7504966..acac149 100644 ball.userData.down = false; } diff --git a/examples-testing/examples/webaudio_visualizer.ts b/examples-testing/examples/webaudio_visualizer.ts -index 545694e..4aba18c 100644 +index ecbcda0..b045a17 100644 --- a/examples-testing/examples/webaudio_visualizer.ts +++ b/examples-testing/examples/webaudio_visualizer.ts @@ -1,8 +1,13 @@ @@ -1870,7 +1822,7 @@ index 545694e..4aba18c 100644 + const container = document.getElementById('container')!; renderer = new THREE.WebGLRenderer({ antialias: true }); - renderer.setSize(window.innerWidth, window.innerHeight); + renderer.setPixelRatio(window.devicePixelRatio); @@ -59,8 +64,8 @@ function init() { const material = new THREE.ShaderMaterial({ @@ -1883,7 +1835,7 @@ index 545694e..4aba18c 100644 const geometry = new THREE.PlaneGeometry(1, 1); diff --git a/examples-testing/examples/webgl2_buffergeometry_attributes_integer.ts b/examples-testing/examples/webgl2_buffergeometry_attributes_integer.ts -index 848814c..ca05c89 100644 +index 9a22568..c98f35d 100644 --- a/examples-testing/examples/webgl2_buffergeometry_attributes_integer.ts +++ b/examples-testing/examples/webgl2_buffergeometry_attributes_integer.ts @@ -6,7 +6,7 @@ if (WebGL.isWebGL2Available() === false) { @@ -1916,7 +1868,7 @@ index 848814c..ca05c89 100644 glslVersion: THREE.GLSL3, }); diff --git a/examples-testing/examples/webgl2_buffergeometry_attributes_none.ts b/examples-testing/examples/webgl2_buffergeometry_attributes_none.ts -index a77b973..d24a458 100644 +index 75bea7b..27151c7 100644 --- a/examples-testing/examples/webgl2_buffergeometry_attributes_none.ts +++ b/examples-testing/examples/webgl2_buffergeometry_attributes_none.ts @@ -6,7 +6,7 @@ if (WebGL.isWebGL2Available() === false) { @@ -1939,7 +1891,7 @@ index a77b973..d24a458 100644 side: THREE.DoubleSide, glslVersion: THREE.GLSL3, }); -@@ -54,11 +54,11 @@ function init() { +@@ -55,11 +55,11 @@ function init() { document.body.appendChild(renderer.domElement); } @@ -1955,7 +1907,7 @@ index a77b973..d24a458 100644 renderer.render(scene, camera); } diff --git a/examples-testing/examples/webgl2_materials_texture3d.ts b/examples-testing/examples/webgl2_materials_texture3d.ts -index b746daf..e3cdd9b 100644 +index be5c068..43f73eb 100644 --- a/examples-testing/examples/webgl2_materials_texture3d.ts +++ b/examples-testing/examples/webgl2_materials_texture3d.ts @@ -10,7 +10,15 @@ if (WebGL.isWebGL2Available() === false) { @@ -1976,7 +1928,7 @@ index b746daf..e3cdd9b 100644 init(); diff --git a/examples-testing/examples/webgl2_materials_texture3d_partialupdate.ts b/examples-testing/examples/webgl2_materials_texture3d_partialupdate.ts -index 0268130..bfbb917 100644 +index d0c8b1a..b16d46c 100644 --- a/examples-testing/examples/webgl2_materials_texture3d_partialupdate.ts +++ b/examples-testing/examples/webgl2_materials_texture3d_partialupdate.ts @@ -11,15 +11,15 @@ if (WebGL.isWebGL2Available() === false) { @@ -1999,7 +1951,7 @@ index 0268130..bfbb917 100644 const data = new Uint8Array(size * size * size); const scale = (scaleFactor * 10.0) / size; -@@ -65,7 +65,7 @@ function init() { +@@ -66,7 +66,7 @@ function init() { canvas.width = 1; canvas.height = 32; @@ -2008,7 +1960,7 @@ index 0268130..bfbb917 100644 const gradient = context.createLinearGradient(0, 0, 0, 32); gradient.addColorStop(0.0, '#014a84'); gradient.addColorStop(0.5, '#0561a0'); -@@ -317,7 +317,7 @@ function animate() { +@@ -318,7 +318,7 @@ function animate() { const scaleFactor = (Math.random() + 0.5) * 0.5; const source = generateCloudTexture(perElementPaddedSize, scaleFactor); @@ -2018,7 +1970,7 @@ index 0268130..bfbb917 100644 prevTime = time; diff --git a/examples-testing/examples/webgl2_multiple_rendertargets.ts b/examples-testing/examples/webgl2_multiple_rendertargets.ts -index cc10827..217ec13 100644 +index 1d85f79..a94cbe8 100644 --- a/examples-testing/examples/webgl2_multiple_rendertargets.ts +++ b/examples-testing/examples/webgl2_multiple_rendertargets.ts @@ -4,9 +4,9 @@ import WebGL from 'three/addons/capabilities/WebGL.js'; @@ -2034,7 +1986,7 @@ index cc10827..217ec13 100644 const parameters = { samples: 4, -@@ -68,8 +68,8 @@ function init() { +@@ -69,8 +69,8 @@ function init() { new THREE.Mesh( new THREE.TorusKnotGeometry(1, 0.3, 128, 32), new THREE.RawShaderMaterial({ @@ -2045,7 +1997,7 @@ index cc10827..217ec13 100644 uniforms: { tDiffuse: { value: diffuse }, repeat: { value: new THREE.Vector2(5, 0.5) }, -@@ -88,8 +88,8 @@ function init() { +@@ -89,8 +89,8 @@ function init() { new THREE.Mesh( new THREE.PlaneGeometry(2, 2), new THREE.RawShaderMaterial({ @@ -2056,7 +2008,7 @@ index cc10827..217ec13 100644 uniforms: { tDiffuse: { value: renderTarget.texture[0] }, tNormal: { value: renderTarget.texture[1] }, -@@ -124,8 +124,8 @@ function render() { +@@ -125,8 +125,8 @@ function render() { renderTarget.samples = parameters.samples; scene.traverse(function (child) { @@ -2068,10 +2020,10 @@ index cc10827..217ec13 100644 }); diff --git a/examples-testing/examples/webgl2_multisampled_renderbuffers.ts b/examples-testing/examples/webgl2_multisampled_renderbuffers.ts -index 18cf29d..a1a050a 100644 +index 1a20251..72c23b6 100644 --- a/examples-testing/examples/webgl2_multisampled_renderbuffers.ts +++ b/examples-testing/examples/webgl2_multisampled_renderbuffers.ts -@@ -7,9 +7,9 @@ import { GammaCorrectionShader } from 'three/addons/shaders/GammaCorrectionShade +@@ -6,9 +6,9 @@ import { OutputPass } from 'three/addons/postprocessing/OutputPass.js'; import WebGL from 'three/addons/capabilities/WebGL.js'; import { GUI } from 'three/addons/libs/lil-gui.module.min.js'; @@ -2083,7 +2035,7 @@ index 18cf29d..a1a050a 100644 const params = { animate: true, -@@ -23,7 +23,7 @@ function init() { +@@ -22,7 +22,7 @@ function init() { return; } @@ -2093,7 +2045,7 @@ index 18cf29d..a1a050a 100644 camera = new THREE.PerspectiveCamera(45, container.offsetWidth / container.offsetHeight, 10, 2000); camera.position.z = 500; diff --git a/examples-testing/examples/webgl2_texture2darray_compressed.ts b/examples-testing/examples/webgl2_texture2darray_compressed.ts -index bf86320..5294a1f 100644 +index a75fb5a..575fbd7 100644 --- a/examples-testing/examples/webgl2_texture2darray_compressed.ts +++ b/examples-testing/examples/webgl2_texture2darray_compressed.ts @@ -9,7 +9,12 @@ if (WebGL.isWebGL2Available() === false) { @@ -2110,7 +2062,7 @@ index bf86320..5294a1f 100644 const planeWidth = 50; const planeHeight = 25; -@@ -49,8 +54,8 @@ function init() { +@@ -50,8 +55,8 @@ function init() { depth: { value: 55 }, size: { value: new THREE.Vector2(planeWidth, planeHeight) }, }, @@ -2122,7 +2074,7 @@ index bf86320..5294a1f 100644 }); diff --git a/examples-testing/examples/webgl2_ubo.ts b/examples-testing/examples/webgl2_ubo.ts -index e296fdc..527b9a7 100644 +index f4f8c07..2163795 100644 --- a/examples-testing/examples/webgl2_ubo.ts +++ b/examples-testing/examples/webgl2_ubo.ts @@ -2,7 +2,7 @@ import * as THREE from 'three'; @@ -2165,7 +2117,7 @@ index e296fdc..527b9a7 100644 glslVersion: THREE.GLSL3, }); -@@ -136,7 +136,7 @@ function animate() { +@@ -137,7 +137,7 @@ function animate() { const delta = clock.getDelta(); scene.traverse(function (child) { @@ -2175,7 +2127,7 @@ index e296fdc..527b9a7 100644 child.rotation.y += delta * 0.3; } diff --git a/examples-testing/examples/webgl2_volume_cloud.ts b/examples-testing/examples/webgl2_volume_cloud.ts -index bc54732..2ebf428 100644 +index 217ab94..b986403 100644 --- a/examples-testing/examples/webgl2_volume_cloud.ts +++ b/examples-testing/examples/webgl2_volume_cloud.ts @@ -9,8 +9,8 @@ if (WebGL.isWebGL2Available() === false) { @@ -2189,7 +2141,7 @@ index bc54732..2ebf428 100644 init(); animate(); -@@ -34,7 +34,7 @@ function init() { +@@ -35,7 +35,7 @@ function init() { canvas.width = 1; canvas.height = 32; @@ -2199,7 +2151,7 @@ index bc54732..2ebf428 100644 gradient.addColorStop(0.0, '#014a84'); gradient.addColorStop(0.5, '#0561a0'); diff --git a/examples-testing/examples/webgl2_volume_instancing.ts b/examples-testing/examples/webgl2_volume_instancing.ts -index 8932869..54fe148 100644 +index fe795d5..60fad45 100644 --- a/examples-testing/examples/webgl2_volume_instancing.ts +++ b/examples-testing/examples/webgl2_volume_instancing.ts @@ -8,8 +8,8 @@ if (WebGL.isWebGL2Available() === false) { @@ -2214,7 +2166,7 @@ index 8932869..54fe148 100644 init(); animate(); diff --git a/examples-testing/examples/webgl2_volume_perlin.ts b/examples-testing/examples/webgl2_volume_perlin.ts -index a75328f..cdd9549 100644 +index 75ccf8d..ae357e0 100644 --- a/examples-testing/examples/webgl2_volume_perlin.ts +++ b/examples-testing/examples/webgl2_volume_perlin.ts @@ -9,8 +9,8 @@ if (WebGL.isWebGL2Available() === false) { @@ -2229,7 +2181,7 @@ index a75328f..cdd9549 100644 init(); animate(); diff --git a/examples-testing/examples/webgl_furnace_test.ts b/examples-testing/examples/webgl_furnace_test.ts -index a819541..46230b4 100644 +index f746f2e..143dc67 100644 --- a/examples-testing/examples/webgl_furnace_test.ts +++ b/examples-testing/examples/webgl_furnace_test.ts @@ -1,6 +1,6 @@ @@ -2240,7 +2192,7 @@ index a819541..46230b4 100644 const COLOR = 0xcccccc; -@@ -20,7 +20,8 @@ function init() { +@@ -21,7 +21,8 @@ function init() { document.body.addEventListener('mouseover', function () { scene.traverse(function (child) { @@ -2250,7 +2202,7 @@ index a819541..46230b4 100644 }); render(); -@@ -28,7 +29,8 @@ function init() { +@@ -29,7 +30,8 @@ function init() { document.body.addEventListener('mouseout', function () { scene.traverse(function (child) { diff --git a/examples-testing/index.js b/examples-testing/index.js index ab7348b9f..c6ab7e0fc 100644 --- a/examples-testing/index.js +++ b/examples-testing/index.js @@ -137,6 +137,7 @@ const files = { // 'webgl_loader_xyz', // 'webgl_lod', // 'webgl_marchingcubes', + // 'webgl_materials_alphahash', // 'webgl_materials_blending', // 'webgl_materials_blending_custom', // 'webgl_materials_bumpmap', @@ -312,6 +313,8 @@ const files = { webgpu: [ // 'webgpu_audio_processing', // 'webgpu_backdrop', + // 'webgpu_backdrop_area', + // 'webgpu_clearcoat', // 'webgpu_compute', // 'webgpu_cubemap_adjustments', // 'webgpu_cubemap_dynamic', @@ -326,8 +329,10 @@ const files = { // 'webgpu_lights_selective', // 'webgpu_loader_gltf', // 'webgpu_loader_gltf_compressed', + // 'webgpu_loader_gltf_sheen', // 'webgpu_materials', // 'webgpu_materials_video', + // 'webgpu_morphtargets', // 'webgpu_particles', // 'webgpu_rtt', // 'webgpu_sandbox', @@ -336,6 +341,8 @@ const files = { // 'webgpu_skinning_instancing', // 'webgpu_skinning_points', // 'webgpu_sprites', + // 'webgpu_tsl_editor', + // 'webgpu_video_panorama', ], webaudio: ['webaudio_orientation', 'webaudio_sandbox', 'webaudio_timing', 'webaudio_visualizer'], webxr: [ diff --git a/three.js b/three.js index 560c5fcba..edefdc237 160000 --- a/three.js +++ b/three.js @@ -1 +1 @@ -Subproject commit 560c5fcba722d9b37884a6925895d64195cd675e +Subproject commit edefdc237b2528b9668fb873a1c06cb835840303