Skip to content

Commit

Permalink
Update patch and delete examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Methuselah96 committed Dec 14, 2024
1 parent 6556535 commit 2322fc3
Show file tree
Hide file tree
Showing 379 changed files with 41 additions and 58,265 deletions.
41 changes: 41 additions & 0 deletions examples-testing/changes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -13761,6 +13761,47 @@ index 5638c902..a274a953 100644
meshKnot.rotation.y = time / 1000;

renderer.render(scene, camera);
diff --git a/examples-testing/examples/webgpu_lights_spotlight.ts b/examples-testing/examples/webgpu_lights_spotlight.ts
index 6beae580..5e9c56e5 100644
--- a/examples-testing/examples/webgpu_lights_spotlight.ts
+++ b/examples-testing/examples/webgpu_lights_spotlight.ts
@@ -1,13 +1,13 @@
-import * as THREE from 'three';
+import * as THREE from 'three/webgpu';

import { GUI } from 'three/addons/libs/lil-gui.module.min.js';

import { PLYLoader } from 'three/addons/loaders/PLYLoader.js';
import { OrbitControls } from 'three/addons/controls/OrbitControls.js';

-let renderer, scene, camera;
+let renderer: THREE.WebGPURenderer, scene: THREE.Scene, camera: THREE.PerspectiveCamera;

-let spotLight, lightHelper;
+let spotLight: THREE.SpotLight, lightHelper: THREE.SpotLightHelper;

init();

@@ -42,7 +42,7 @@ function init() {
const loader = new THREE.TextureLoader().setPath('textures/');
const filenames = ['disturb.jpg', 'colors.png', 'uv_grid_opengl.jpg'];

- const textures = { none: null };
+ const textures: { [filename: string]: THREE.Texture | null } = { none: null };

for (let i = 0; i < filenames.length; i++) {
const filename = filenames[i];
@@ -157,8 +157,8 @@ function init() {
renderer.shadowMap.enabled = val;

scene.traverse(function (child) {
- if (child.material) {
- child.material.needsUpdate = true;
+ if ((child as THREE.Mesh<THREE.BufferGeometry, THREE.Material>).material) {
+ (child as THREE.Mesh<THREE.BufferGeometry, THREE.Material>).material.needsUpdate = true;
}
});
});
diff --git a/examples-testing/examples/webgpu_lights_tiled.ts b/examples-testing/examples/webgpu_lights_tiled.ts
index ed195757..84114277 100644
--- a/examples-testing/examples/webgpu_lights_tiled.ts
Expand Down
186 changes: 0 additions & 186 deletions examples-testing/examples/css2d_label.ts

This file was deleted.

Loading

0 comments on commit 2322fc3

Please sign in to comment.