Skip to content

Commit 1e91229

Browse files
authored
Examples: Clean up webgpu_performance_renderbundle (#29289)
* Update webgpu_performance_renderbundle.html * Update webgpu_performance_renderbundle.html
1 parent a2d8fa2 commit 1e91229

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

examples/webgpu_performance_renderbundle.html

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
{
3030
"imports": {
3131
"three": "../build/three.webgpu.js",
32-
"three/tsl": "../build/three.webgpu.js",
32+
"three/tsl": "../build/three.webgpu.js",
3333
"three/addons/": "./jsm/",
3434
"stats-gl": "https://cdn.jsdelivr.net/npm/[email protected]/dist/main.js"
3535
}
@@ -68,6 +68,7 @@
6868
renderBundle: true,
6969
count: MAX_GEOMETRY_COUNT,
7070
opacity: 1,
71+
dynamic: false
7172
};
7273

7374

@@ -125,9 +126,6 @@
125126

126127
}
127128

128-
129-
130-
131129
function cleanup() {
132130

133131
if ( group ) {
@@ -154,7 +152,7 @@
154152

155153
function initRegularMesh( count ) {
156154

157-
group = api.renderBundle ? new THREE.BundleGroup() : new THREE.Group();
155+
group = api.renderBundle ? new THREE.BundleGroup() : new THREE.Group();
158156

159157
for ( let i = 0; i < count; i ++ ) {
160158

@@ -251,6 +249,8 @@
251249

252250
} );
253251

252+
gui.add( api, 'dynamic' );
253+
254254
// listeners
255255

256256
window.addEventListener( 'resize', onWindowResize );
@@ -291,10 +291,7 @@
291291
function animateMeshes() {
292292

293293
const count = api.count / ( api.webgpu ? 1 : 10 );
294-
const countDynamic = api.dynamic / ( api.webgpu ? 1 : 10 );
295-
296-
const loopNum = Math.min( count, countDynamic );
297-
294+
const loopNum = api.dynamic ? count : 0;
298295

299296
for ( let i = 0; i < loopNum; i ++ ) {
300297

@@ -311,7 +308,8 @@
311308

312309
}
313310

314-
}
311+
}
312+
315313
</script>
316314

317315
</body>

0 commit comments

Comments
 (0)