File tree Expand file tree Collapse file tree 2 files changed +19
-5
lines changed Expand file tree Collapse file tree 2 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -524,17 +524,31 @@ const IWSY = (playerElement, scriptObject) => {
524
524
}
525
525
} ;
526
526
527
- // Run a pan-zoom
527
+ // Run a pan-zoom (for testing animations)
528
528
const panzoom = arg => {
529
529
player . innerText = `` ;
530
530
const vfx = JSON . parse ( arg ) ;
531
531
vfx . container = player ;
532
+ vfx . startsize = 100 ;
533
+ vfx . startxoff = 0 ;
534
+ vfx . startyoff = 0 ;
535
+ let url ;
536
+ if ( vfx . url [ 0 ] === `=` ) {
537
+ const name = vfx . url . slice ( 1 ) ;
538
+ for ( const vfx2 of script . vfx ) {
539
+ if ( name === vfx2 . name ) {
540
+ url = vfx2 . url ;
541
+ break ;
542
+ }
543
+ }
544
+ } else {
545
+ url = vfx . url ;
546
+ }
532
547
const image = new Image ( ) ;
533
548
vfx . image = image ;
534
- image . src = spec . url ;
535
- // image.style.display = `none`;
549
+ image . src = url ;
536
550
image . addEventListener ( `load` , ( ) => {
537
- initImage ( spec ) ;
551
+ initImage ( vfx ) ;
538
552
requestAnimationFrame ( timestamp => {
539
553
animatePanzoom ( timestamp , vfx ) ;
540
554
} ) ;
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ Restart:
62
62
create Title in Row
63
63
set the style of Title to
64
64
`flex:1;font-size:110%;font-weight:bold;background:lightgray;text-align:center;margin-bottom:0.5em`
65
- set the content of Title to `Content Items`
65
+ set the content of Title to `VFX Items`
66
66
create Cell in Row
67
67
set the style of Cell to `width:1.4em;text-align:center`
68
68
create Link in Cell
You can’t perform that action at this time.
0 commit comments