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 package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "route-engine-js",
"version": "1.0.0",
"version": "1.0.1",
"description": "A lightweight Visual Novel engine built in JavaScript for creating interactive narrative games with branching storylines",
"repository": {
"type": "git",
Expand Down
17 changes: 17 additions & 0 deletions spec/projectDataSchema.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ const projectDataSchemaId = new URL(
"projectData/projectData.yaml",
schemaBaseUrl,
).href;
const presentationActionsSchemaId = new URL(
"presentationActions.yaml",
schemaBaseUrl,
).href;
const systemActionsSchemaId = new URL("systemActions.yaml", schemaBaseUrl).href;
const projectDataSchemaPaths = [
path.join(schemasRoot, "projectData"),
Expand Down Expand Up @@ -110,6 +114,7 @@ const createValidator = (schemaId) => {
};

const validateProjectData = createValidator(projectDataSchemaId);
const validatePresentationActions = createValidator(presentationActionsSchemaId);
const validateSystemActions = createValidator(systemActionsSchemaId);

const createMinimalProjectData = (overrides = {}) => ({
Expand Down Expand Up @@ -147,6 +152,18 @@ describe("projectData schema", () => {
expect(validateProjectData.errors).toBeNull();
});

it("accepts background transformId in presentation actions", () => {
expect(
validatePresentationActions({
background: {
resourceId: "bg1",
transformId: "centerStage",
},
}),
).toBe(true);
expect(validatePresentationActions.errors).toBeNull();
});

it("parses all VT YAML specs", () => {
const vtSpecsRoot = path.join(repoRoot, "vt", "specs");
const vtSpecPaths = collectYamlFiles(vtSpecsRoot);
Expand Down
16 changes: 8 additions & 8 deletions spec/system/constructRenderState.spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,13 @@ out:
- id: "bg-cg-bgImage"
type: "sprite"
alpha: 1
anchorX: 0
anchorY: 0
anchorX: 0.5
anchorY: 0.5
rotation: 0
scaleX: 1
scaleY: 1
x: 0
y: 0
x: 960
y: 540
src: "background.jpg"
width: 1920
height: 1080
Expand Down Expand Up @@ -139,13 +139,13 @@ out:
- id: "bg-cg-newBg"
type: "sprite"
alpha: 1
anchorX: 0
anchorY: 0
anchorX: 0.5
anchorY: 0.5
rotation: 0
scaleX: 1
scaleY: 1
x: 0
y: 0
x: 960
y: 540
src: "new-background.jpg"
width: 1920
height: 1080
Expand Down
Loading
Loading