EverambleGAME API / 1

CONTENT CONTRACT · VERSION 1

StorybookPage

One painted page: layers on a shared canvas, the part of it the screen shows, and the camera's travel over the page.

Signature

{ camera: {StorybookCameraKey}, camera_portrait: ({StorybookCameraKey})?, canvas: {number}, id: Name, layers: {StorybookLayer}, lightning: (StorybookLightning)?, parallax_permille: (number)?, parallax_portrait_permille: (number)?, sounds: ({StorybookSound})?, to_grey: (StorybookToGrey)?, viewport: {number} }

Fields

NameTypeMeaning
camera{StorybookCameraKey}Camera keys over the page's time, eased in and out between them.
Items: 1…16
camera_portrait{StorybookCameraKey}Camera keys on a portrait (9:16) screen, which shows a vertical slice of the page at the viewport's height; absent: the landscape keys. The camera stops where any layer would leave its canvas, so all layers stop together.
Items: 1…16
canvas{number}Width and height of the page's layers.
Items: 2…2; Unit: px
idNameLocal name of the page; language tracks name its start by it.
Length: 1…96; Pattern: ^[a-z][a-z0-9_]{0,95}$
layers{StorybookLayer}Layers from back to front.
Items: 1…12
lightningStorybookLightningLightning flashes over the page; absent: none.
parallax_permillenumberCamera travel against layer depth on this page; absent: the book's.
Range: 0…4000; Unit: permille
parallax_portrait_permillenumberParallax of this page on a portrait screen; absent: the book's.
Range: 0…4000; Unit: permille
sounds{StorybookSound}Sounds of the page (storm, thunder); absent: none.
Items: 1…8
to_greyStorybookToGreyThe page loses its colour: layers with a grey image cross into it; absent: the page stays in colour.
viewport{number}The shown part of the canvas at rest (x, y, width, height); the rest is reserve for the camera.
Items: 4…4; Unit: px