Skip to content

Commit 65104ce

Browse files
authored
Examples: More clean up. (#31696)
1 parent f163bfa commit 65104ce

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

examples/webgpu_compute_birds.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@
130130
}
131131

132132
}
133+
134+
// TODO: Fix example with WebGL backend
133135

134136
if ( WebGPU.isAvailable() === false ) {
135137

examples/webgpu_compute_cloth.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@
6868
sheenColor: 0xffffff // sRGB
6969
};
7070

71+
// TODO: Fix example with WebGL backend
72+
7173
if ( WebGPU.isAvailable() === false ) {
7274

7375
document.body.appendChild( WebGPU.getErrorMessage() );

examples/webgpu_compute_water.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737

3838
import { GUI } from 'three/addons/libs/lil-gui.module.min.js';
3939
import Stats from 'three/addons/libs/stats.module.js';
40+
import WebGPU from 'three/addons/capabilities/WebGPU.js';
4041

4142
// Dimensions of simulation grid.
4243
const WIDTH = 128;
@@ -81,6 +82,16 @@
8182

8283
const simplex = new SimplexNoise();
8384

85+
// TODO: Fix example with WebGL backend
86+
87+
if ( WebGPU.isAvailable() === false ) {
88+
89+
document.body.appendChild( WebGPU.getErrorMessage() );
90+
91+
throw new Error( 'No WebGPU support' );
92+
93+
}
94+
8495
init();
8596

8697
function noise( x, y ) {

0 commit comments

Comments
 (0)