File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 14751475 resetFireButton : null
14761476 } ,
14771477 init ( ) {
1478- const buildFirePixels = ( ) => {
1478+ const buildFireVoxels = ( ) => {
14791479 this . instanceData . fireVoxelsXyz = [ ] ;
14801480 for ( let x = 0 , xc = ( VolumetricDisplay . layersX . length - 1 ) ; x < xc ; x ++ ) {
14811481 const xAr = [ ] ;
15221522 this . instanceData . resetFireButton . addEventListener ( 'click' , ( event ) => {
15231523 event . stopPropagation ( ) ;
15241524 event . preventDefault ( ) ;
1525- VolumetricDisplay . fill ( ) ;
1526- VolumetricDisplay . update ( ) ;
1527- buildFirePixels ( ) ;
1525+ buildFireVoxels ( ) ;
15281526 this . instanceData . requestAnimate = true ;
15291527 } ) ;
15301528 if ( this . instanceData . fireVoxelsXyz . length === 0 ) {
1531- buildFirePixels ( ) ;
1529+ buildFireVoxels ( ) ;
15321530 } else {
15331531 this . instanceData . requestAnimate = true ;
15341532 }
15391537 if ( this . instanceData . isPaused && ! this . instanceData . requestAnimate ) {
15401538 return ;
15411539 }
1542- const currentTimeMs = Date . now ( ) ;
1543- if ( ( ( currentTimeMs - this . instanceData . lastTimeMs ) > 30 ) || this . instanceData . requestAnimate ) {
1544- this . instanceData . lastTimeMs = currentTimeMs ;
1540+ const timeMs = Date . now ( ) ;
1541+ if ( ( ( timeMs - this . instanceData . lastTimeMs ) > 30 ) || this . instanceData . requestAnimate ) {
1542+ this . instanceData . lastTimeMs = timeMs ;
15451543 if ( ! this . instanceData . isPaused ) {
15461544 for ( let y = 0 , yc = ( VolumetricDisplay . layersY . length - 2 ) ; y < yc ; y ++ ) {
15471545 for ( let x = 0 , xc = ( VolumetricDisplay . layersX . length - 1 ) ; x < xc ; x ++ ) {
You can’t perform that action at this time.
0 commit comments