Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Formatting and bug fixes
  • Loading branch information
graham-trott committed Aug 5, 2020
commit 065f29b9d356e39d4050dcc7202aaddd0ce2f062
19 changes: 14 additions & 5 deletions iwsy/iwsy.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ const IWSY = (playerElement, scriptObject) => {
}
if (!vfx.continueFlag) {
if (script.runMode === `manual`) {
enterManualMode(step);
enterManualMode(vfx.step);
} else {
vfx.step.next();
}
Expand Down Expand Up @@ -360,6 +360,7 @@ const IWSY = (playerElement, scriptObject) => {
block.element.style.display = `none`;
}
}
step.next();
} else {
for (const block of stepBlocks)
{
Expand Down Expand Up @@ -494,9 +495,17 @@ const IWSY = (playerElement, scriptObject) => {
}
};
delete(vfx.start);
requestAnimationFrame(timestamp => {
animatePanzoom(timestamp, vfx);
});
if (script.speed === `scan`) {
vfx.image.style.width = `${vfx.w2}px`;
vfx.image.style.height = `${vfx.h2}px`;
vfx.image.style.left = `${vfx.xoff2}px`;
vfx.image.style.top = `${vfx.yoff2}px`;
step.next();
} else {
requestAnimationFrame(timestamp => {
animatePanzoom(timestamp, vfx);
});
}
break;
}
}
Expand All @@ -505,7 +514,7 @@ const IWSY = (playerElement, scriptObject) => {
}
};

// Animate blocks
// Animate a block
const animate = step => {
let continueFlag = true;
for (const block of script.blocks) {
Expand Down
11 changes: 7 additions & 4 deletions iwsy/resources/ecs/blocks.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

script Blocks

import div Panel and variable Presentation
import div Container and variable Presentation

div Panel
div Editor
div Title
div Table
Expand Down Expand Up @@ -58,9 +59,11 @@ Start:

Restart:
put property `blocks` of Presentation into Blocks
clear Panel
clear Container
create Panel in Container
set the style of Panel to `height:100%;display:flex;flex-direction:column`
create Row in Panel
set the style of Row to `display:flex`
set the style of Row to `height:2em;display:flex`
create Title in Row
set the style of Title to
`flex:1;font-size:110%;font-weight:bold;background:lightgray;text-align:center;margin-bottom:0.5em`
Expand Down Expand Up @@ -99,7 +102,7 @@ Restart:
set the elements of DeleteBlock to NBlocks
end
create Table in Panel
set the style of Table to `width:100%`
set the style of Table to `flex:1;width:100%;overflow-y:scroll`
put 0 into N
while N is less than NBlocks
begin
Expand Down
13 changes: 8 additions & 5 deletions iwsy/resources/ecs/content.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

script Content

import div Panel and variable Presentation
import div Container and variable Presentation

div Panel
div Editor
div Title
div Table
Expand Down Expand Up @@ -57,9 +58,11 @@ Restart:
add 1 to N
end

clear Panel
clear Container
create Panel in Container
set the style of Panel to `height:100%;display:flex;flex-direction:column`
create Row in Panel
set the style of Row to `display:flex`
set the style of Row to `height:2em;display:flex`
create Title in Row
set the style of Title to
`flex:1;font-size:110%;font-weight:bold;background:lightgray;text-align:center;margin-bottom:0.5em`
Expand Down Expand Up @@ -93,7 +96,7 @@ Restart:
set the elements of TextArea to NumItems
end
create Table in Panel
set the style of Table to `width:100%`
set the style of Table to `flex:1;width:100%;overflow-y:scroll`
put 0 into N
while N is less than NumItems
begin
Expand All @@ -109,7 +112,7 @@ Restart:
create Cell in Row
set the style of Cell to `width:100%;display:flex`
create EditButton in Cell
set the style of EditButton to `flex:1`
set the style of EditButton to `height:2em;flex:1`
set the text of EditButton to ItemName
if N is 0
begin
Expand Down