File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change 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 }
6868 renderBundle : true ,
6969 count : MAX_GEOMETRY_COUNT ,
7070 opacity : 1 ,
71+ dynamic : false
7172 } ;
7273
7374
125126
126127 }
127128
128-
129-
130-
131129 function cleanup ( ) {
132130
133131 if ( group ) {
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
251249
252250 } ) ;
253251
252+ gui . add ( api , 'dynamic' ) ;
253+
254254 // listeners
255255
256256 window . addEventListener ( 'resize' , onWindowResize ) ;
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
311308
312309 }
313310
314- }
311+ }
312+
315313 </ script >
316314
317315</ body >
You can’t perform that action at this time.
0 commit comments