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
2 changes: 1 addition & 1 deletion docs/RouteEngine.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ Invalid `_event.*` bindings fail fast with an explicit error.
min: 0
max: 100
change:
actionPayload:
payload:
actions:
updateVariable:
id: setVolume
Expand Down
2 changes: 1 addition & 1 deletion docs/vt-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Define one stable standard for VT authoring in this repo:

- The VT Docker flow runs Chromium in a software WebGL fallback path on this repo's current container/runtime setup.
- Full-size `1920x1080` Pixi capture on that path is expensive, so VT syncs a local ignored `vt/static/RouteGraphics.js` bundle before VT runs.
- The sync script downloads `route-graphics@0.1.2/dist/RouteGraphics.js` from jsDelivr by default.
- The sync script downloads `route-graphics@1.0.0/dist/RouteGraphics.js` from jsDelivr by default.
- Override the source with `VT_ROUTE_GRAPHICS_URL`, or just the package version with `VT_ROUTE_GRAPHICS_VERSION`.
- That VT-only bundle is patched during sync to initialize Pixi with `resolution: 0.5` and `preserveDrawingBuffer: true`.
- Full-frame VT references are exported from that native half-resolution render surface.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "route-engine-js",
"version": "0.2.1",
"version": "0.2.2",
"description": "A lightweight Visual Novel engine built in JavaScript for creating interactive narrative games with branching storylines",
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions scripts/sync-vt-route-graphics.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const repoRoot = path.resolve(__dirname, "..");
const targetPath = path.resolve(repoRoot, "vt/static/RouteGraphics.js");
const defaultVersion = process.env.VT_ROUTE_GRAPHICS_VERSION || "0.1.2";
const defaultVersion = process.env.VT_ROUTE_GRAPHICS_VERSION || "1.0.0";
const sourceUrl =
process.env.VT_ROUTE_GRAPHICS_URL ||
`https://cdn.jsdelivr.net/npm/route-graphics@${defaultVersion}/dist/RouteGraphics.js`;
Expand Down Expand Up @@ -35,7 +35,7 @@ if (!initPattern.test(source)) {
const patched = source.replace(
initPattern,
(_, initPrefix) =>
`await r.init({${initPrefix}preference:"webgl",resolution:globalThis.RTGL_VT_DEBUG ? .5 : 1,preserveDrawingBuffer:!!globalThis.RTGL_VT_DEBUG,clearBeforeRender:!0})`,
`await r.init({${initPrefix}preference:"webgl",resolution:(globalThis.RTGL_VT_DEBUG||navigator.webdriver)? .5 : 1,preserveDrawingBuffer:!!(globalThis.RTGL_VT_DEBUG||navigator.webdriver),clearBeforeRender:!0})`,
);

fs.mkdirSync(path.dirname(targetPath), { recursive: true });
Expand Down
8 changes: 4 additions & 4 deletions spec/system/renderState/addCharacters.spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -335,12 +335,12 @@ in:
keyframes:
- duration: 2000
value: 2.2
easing: easeOut
easing: easeOutQuad
scaleY:
keyframes:
- duration: 2000
value: 2.2
easing: easeOut
easing: easeOutQuad
out:
elements:
- id: "story"
Expand Down Expand Up @@ -374,12 +374,12 @@ out:
keyframes:
- duration: 2000
value: 2.2
easing: easeOut
easing: easeOutQuad
scaleY:
keyframes:
- duration: 2000
value: 2.2
easing: easeOut
easing: easeOutQuad
---
case: multiple characters with different sprites
in:
Expand Down
16 changes: 8 additions & 8 deletions spec/system/renderState/addChoices.spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ out:
x: 0
y: 0
click:
actionPayload:
payload:
actions: {}
- type: "button"
id: "choice-button"
Expand Down Expand Up @@ -102,7 +102,7 @@ out:
x: 0
y: 0
click:
actionPayload:
payload:
actions: {}
- type: "container"
id: "choices"
Expand Down Expand Up @@ -193,7 +193,7 @@ out:
x: 0
y: 0
click:
actionPayload:
payload:
actions: {}
- id: "choice-label"
type: "text"
Expand Down Expand Up @@ -250,7 +250,7 @@ out:
x: 0
y: 0
click:
actionPayload:
payload:
actions: {}
- id: "choice-panel"
type: "rect"
Expand Down Expand Up @@ -302,7 +302,7 @@ out:
x: 0
y: 0
click:
actionPayload:
payload:
actions: {}
- id: "choice-image"
type: "sprite"
Expand Down Expand Up @@ -376,7 +376,7 @@ out:
x: 0
y: 0
click:
actionPayload:
payload:
actions: {}
animations: []
---
Expand Down Expand Up @@ -417,7 +417,7 @@ out:
x: 0
y: 0
click:
actionPayload:
payload:
actions: {}
animations: []
---
Expand Down Expand Up @@ -458,7 +458,7 @@ out:
x: 0
y: 0
click:
actionPayload:
payload:
actions: {}
- type: "text"
content: "No choices available"
Expand Down
22 changes: 11 additions & 11 deletions spec/system/renderState/addLayeredViews.spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ out:
x: 0
y: 0
click:
actionPayload:
payload:
actions: {}
- type: "text"
content: "LayeredView content"
Expand Down Expand Up @@ -150,7 +150,7 @@ out:
x: 0
y: 0
click:
actionPayload:
payload:
actions: {}
- type: "text"
content: "Menu"
Expand All @@ -167,7 +167,7 @@ out:
x: 0
y: 0
click:
actionPayload:
payload:
actions: {}
- type: "image"
src: "overlay.png"
Expand Down Expand Up @@ -219,7 +219,7 @@ out:
x: 0
y: 0
click:
actionPayload:
payload:
actions: {}
- type: "text"
content: "Exists"
Expand Down Expand Up @@ -286,7 +286,7 @@ out:
x: 0
y: 0
click:
actionPayload:
payload:
actions: {}
- type: "text"
content: "Animated"
Expand Down Expand Up @@ -366,7 +366,7 @@ out:
x: 0
y: 0
click:
actionPayload:
payload:
actions: {}
- id: "credits-body"
type: "container"
Expand Down Expand Up @@ -433,7 +433,7 @@ out:
x: 0
y: 0
click:
actionPayload:
payload:
actions: {}
- type: "container"
x: 10
Expand Down Expand Up @@ -487,7 +487,7 @@ out:
x: 0
y: 0
click:
actionPayload:
payload:
actions: {}
animations: []
---
Expand Down Expand Up @@ -551,7 +551,7 @@ out:
x: 0
y: 0
click:
actionPayload:
payload:
actions: {}
- id: "layered-label"
type: "text"
Expand Down Expand Up @@ -615,7 +615,7 @@ out:
x: 0
y: 0
click:
actionPayload:
payload:
actions: {}
- id: "layered-panel"
type: "rect"
Expand Down Expand Up @@ -674,7 +674,7 @@ out:
x: 0
y: 0
click:
actionPayload:
payload:
actions: {}
- id: "layered-image"
type: "sprite"
Expand Down
4 changes: 2 additions & 2 deletions spec/system/renderState/addLayout.spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ in:
colorId: "hoverColor"
click:
colorId: "clickColor"
actionPayload:
payload:
actions: {}
colors:
idleColor:
Expand Down Expand Up @@ -285,7 +285,7 @@ out:
fill: "#303030"
click:
fill: "#404040"
actionPayload:
payload:
actions: {}
animations: []
---
Expand Down
4 changes: 2 additions & 2 deletions spec/system/renderState/resolveColorIds.spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ in:
cursor: "pointer"
click:
colorId: "active"
actionPayload:
payload:
actions: {}
rightClick:
colorId: "muted"
Expand All @@ -56,7 +56,7 @@ out:
cursor: "pointer"
click:
fill: "#666666"
actionPayload:
payload:
actions: {}
rightClick:
fill: "#000000"
Expand Down
8 changes: 4 additions & 4 deletions spec/system/renderState/resolveImageIds.spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ in:
clickImageId: "click"
hover:
cursor: "pointer"
actionPayload:
payload:
action: "hovered"
click:
actionPayload:
payload:
action: "clicked"
- images:
idle:
Expand All @@ -40,11 +40,11 @@ out:
height: 180
hover:
cursor: "pointer"
actionPayload:
payload:
action: "hovered"
src: "hover.png"
click:
actionPayload:
payload:
action: "clicked"
src: "click.png"
---
Expand Down
5 changes: 1 addition & 4 deletions src/schemas/projectData/animationResource.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ $defs:
description: Easing function to use.
enum:
- linear
- easeIn
- easeOut
- easeInOut
- easeInQuad
- easeOutQuad
- easeInOutQuad
Expand Down Expand Up @@ -199,7 +196,7 @@ properties:
complete:
type: object
properties:
actionPayload:
payload:
type: object
additionalProperties: true
tween:
Expand Down
4 changes: 2 additions & 2 deletions src/schemas/projectData/resources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,9 @@ properties:
additionalProperties:
type: object
properties:
actionPayload:
payload:
type: object
required: [actionPayload]
required: [payload]
layouts:
type: object
description: Layout configurations authored with resource references that are resolved before rendering
Expand Down
4 changes: 2 additions & 2 deletions src/stores/constructRenderState.js
Original file line number Diff line number Diff line change
Expand Up @@ -1284,7 +1284,7 @@ export const addChoices = (
x: 0,
y: 0,
click: {
actionPayload: {
payload: {
actions: {},
},
},
Expand Down Expand Up @@ -1562,7 +1562,7 @@ export const addLayeredViews = (
x: 0,
y: 0,
click: {
actionPayload: {
payload: {
actions: {},
},
},
Expand Down
2 changes: 1 addition & 1 deletion vt/specs/background/animation-1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ resources:
width: 1920
height: 1080
click:
actionPayload:
payload:
actions:
nextLine: {}
colorId: layoutColor1
Expand Down
2 changes: 1 addition & 1 deletion vt/specs/background/animation-2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ resources:
width: 1920
height: 1080
click:
actionPayload:
payload:
actions:
nextLine: {}
colorId: layoutColor1
Expand Down
2 changes: 1 addition & 1 deletion vt/specs/background/animation-once-per-line.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ resources:
width: 1920
height: 1080
click:
actionPayload:
payload:
actions:
nextLine: {}
colorId: layoutColor1
Expand Down
2 changes: 1 addition & 1 deletion vt/specs/background/backgroundId.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ resources:
width: 1920
height: 1080
click:
actionPayload:
payload:
actions:
nextLine: {}
colorId: layoutColor1
Expand Down
Loading
Loading