Skip to content

Commit

Permalink
Update examples (#596)
Browse files Browse the repository at this point in the history
* Update three.js

* Add examples

* Update patch

* Delete examples
  • Loading branch information
Methuselah96 authored Sep 1, 2023
1 parent 31d698c commit d364881
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 10 deletions.
25 changes: 17 additions & 8 deletions examples-testing/changes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -1286,19 +1286,19 @@ index ad6e3f5..3eec71e 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 97630ab..1cbb2e6 100644
index 7a0e782..db8aee7 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';
import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
@@ -7,7 +7,7 @@ import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
import { USDZExporter } from 'three/addons/exporters/USDZExporter.js';
import { GUI } from 'three/addons/libs/lil-gui.module.min.js';

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

init();
render();
@@ -45,7 +45,7 @@ function init() {
const params = {
exportUSDZ: exportUSDZ,
@@ -50,7 +50,7 @@ function init() {
const arraybuffer = await exporter.parse(gltf.scene);
const blob = new Blob([arraybuffer], { type: 'application/octet-stream' });

Expand All @@ -1307,7 +1307,7 @@ index 97630ab..1cbb2e6 100644
link.href = URL.createObjectURL(blob);
});

@@ -64,7 +64,7 @@ function createSpotShadowMesh() {
@@ -78,7 +78,7 @@ function createSpotShadowMesh() {
canvas.width = 128;
canvas.height = 128;

Expand All @@ -1316,6 +1316,15 @@ index 97630ab..1cbb2e6 100644
const gradient = context.createRadialGradient(
canvas.width / 2,
canvas.height / 2,
@@ -118,7 +118,7 @@ function onWindowResize() {
}

function exportUSDZ() {
- const link = document.getElementById('link');
+ const link = document.getElementById('link')!;
link.click();
}

diff --git a/examples-testing/examples/misc_lookat.ts b/examples-testing/examples/misc_lookat.ts
index f6241b9..93e8340 100644
--- a/examples-testing/examples/misc_lookat.ts
Expand Down Expand Up @@ -5783,7 +5792,7 @@ index d3203e3..7b7f06f 100644
+ }
}
diff --git a/examples-testing/examples/webgl_postprocessing_fxaa.ts b/examples-testing/examples/webgl_postprocessing_fxaa.ts
index 24270de..4012110 100644
index 18ae7b7..83fb702 100644
--- a/examples-testing/examples/webgl_postprocessing_fxaa.ts
+++ b/examples-testing/examples/webgl_postprocessing_fxaa.ts
@@ -6,15 +6,20 @@ import { ShaderPass } from 'three/addons/postprocessing/ShaderPass.js';
Expand Down
6 changes: 5 additions & 1 deletion examples-testing/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,12 +311,14 @@ const files = {
'webgl2_volume_instancing',
'webgl2_volume_perlin',
],
webgpu: [
'webgpu (wip)': [
// 'webgpu_audio_processing',
// 'webgpu_backdrop',
// 'webgpu_backdrop_area',
// 'webgpu_clearcoat',
// 'webgpu_compute',
// 'webgpu_compute_particles',
// 'webgpu_compute_texture',
// 'webgpu_cubemap_adjustments',
// 'webgpu_cubemap_dynamic',
// 'webgpu_cubemap_mix',
Expand All @@ -334,7 +336,9 @@ const files = {
// 'webgpu_loader_gltf_sheen',
// 'webgpu_materials',
// 'webgpu_materials_video',
// 'webgpu_multiple_rendertargets',
// 'webgpu_morphtargets',
// 'webgpu_occlusion',
// 'webgpu_particles',
// 'webgpu_rtt',
// 'webgpu_sandbox',
Expand Down
2 changes: 1 addition & 1 deletion three.js
Submodule three.js updated 930 files

0 comments on commit d364881

Please sign in to comment.