Divooka Reference

Animation

19 nodes

On this page 19

Add Animated Image

Function

A story with an image that is an animation: picture lines and pauses that animate it wherever it is shown.

Signature
AddAnimatedImage -> Story
    story: Story
    name: Text
    animation: Animation
Story AddAnimatedImage(
    Story story,
    string name,
    Animation animation)

Parameters

nametypedefaultdescription
storyStory—
nameText—
animationAnimation—

Returns

StoryStory
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Animation
Package
Novella Visual Novels

Also Change

Function

Changes another property in the step before, so the two change together: a move and a fade at once.

Signature
AlsoChange -> Animation
    animation: Animation
    property: Text
    value: Text
Animation AlsoChange(
    Animation animation,
    string property,
    string value)

Parameters

nametypedefaultdescription
animationAnimation—
propertyText—
valueText—

Returns

AnimationAnimation
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Animation
Package
Novella Visual Novels

Animate Property

Function

Animates a property to a value over some seconds, eased by a warper.

Signature
AnimateProperty -> Animation
    animation: Animation
    warper: Text
    seconds: Number
    property: Text
    value: Text
Animation AnimateProperty(
    Animation animation,
    string warper,
    double seconds,
    string property,
    string value)

Parameters

nametypedefaultdescription
animationAnimation—The animation so far.
warperText—How it moves: linear, ease, easein, easeout, easeout_bounce, ease_back...
secondsNumber—How long it takes.
propertyText—The property.
valueText—The value it ends at, as a script writes it.

Returns

AnimationAnimation
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Animation
Package
Novella Visual Novels

Animation Block

Function

A timeline nested in this one, so a repeat inside it loops only that part.

Signature
AnimationBlock -> Animation
    animation: Animation
    block: Animation
Animation AnimationBlock(Animation animation, Animation block)

Parameters

nametypedefaultdescription
animationAnimation—
blockAnimation—

Returns

AnimationAnimation
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Animation
Package
Novella Visual Novels

Animation From Script

Function

An animation written as a script's animation block, one statement per line.

Signature
AnimationFromScript(script: Text) -> Animation
Animation AnimationFromScript(string script)

Parameters

nametypedefaultdescription
scriptText—

Returns

AnimationAnimation
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Animation
Package
Novella Visual Novels

Animation To Script

Function

An animation as a script writes it.

Signature
AnimationToScript(animation: Animation) -> Text
string AnimationToScript(Animation animation)

Parameters

nametypedefaultdescription
animationAnimation—

Returns

ScriptText
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Animation
Package
Novella Visual Novels

At Time

Function

What follows starts this many seconds after the animation began, cutting short what was running.

Signature
AtTime(animation: Animation, seconds: Number) -> Animation
Animation AtTime(Animation animation, double seconds)

Parameters

nametypedefaultdescription
animationAnimation—
secondsNumber—

Returns

AnimationAnimation
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Animation
Package
Novella Visual Novels

Call Transform Function

Function

Hands the image to a function the game registers for animations, for as long as the function lasts.

Signature
CallTransformFunction -> Animation
    animation: Animation
    function: Text
Animation CallTransformFunction(
    Animation animation,
    string function)

Parameters

nametypedefaultdescription
animationAnimation—
functionText—

Returns

AnimationAnimation
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Animation
Package
Novella Visual Novels

Choose Between

Function

One of two or three timelines, picked at random by weight each time the animation gets here; the same moment of the same shown image always picks the same.

Signature
ChooseBetween -> Animation
    animation: Animation
    first: Animation
    second: Animation
    third: Animation
    firstWeight: Number
    secondWeight: Number
    thirdWeight: Number
Animation ChooseBetween(
    Animation animation,
    Animation first,
    Animation second,
    Animation third,
    double firstWeight = 1,
    double secondWeight = 1,
    double thirdWeight = 1)

Parameters

nametypedefaultdescription
animationAnimation—
firstAnimation—
secondAnimation—
thirdAnimation—
firstWeightNumber1
secondWeightNumber1
thirdWeightNumber1

Returns

AnimationAnimation
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Animation
Package
Novella Visual Novels

Contains Picture

Function

A picture drawn inside this one with a timeline of its own, placed within it: sparkles over a lantern.

Signature
ContainsPicture -> Animation
    animation: Animation
    image: Text
    timeline: Animation
Animation ContainsPicture(
    Animation animation,
    string image,
    Animation timeline)

Parameters

nametypedefaultdescription
animationAnimation—The animation so far.
imageText—The contained picture.
timelineAnimation—Its own animation; empty keeps it still.

Returns

AnimationAnimation
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Animation
Package
Novella Visual Novels

Define Transform

Function

A story with a transform: an animation a show's at can name, which may take parameters.

Signature
DefineTransform -> Story
    story: Story
    name: Text
    animation: Animation
    parameters: Text
Story DefineTransform(
    Story story,
    string name,
    Animation animation,
    string parameters = "")

Parameters

nametypedefaultdescription
storyStory—The story.
nameText—The transform's name.
animationAnimation—Its animation.
parametersText—Its parameters, separated by commas, each with an optional default: height=20; empty for none.

Returns

StoryStory
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Animation
Package
Novella Visual Novels

Include Transform

Function

Runs another transform in place, such as left or one the story defines.

Signature
IncludeTransform -> Animation
    animation: Animation
    transform: Text
    arguments: Text
Animation IncludeTransform(
    Animation animation,
    string transform,
    string arguments = "")

Parameters

nametypedefaultdescription
animationAnimation—The animation so far.
transformText—The transform's name.
argumentsText—Its arguments as a script writes them, separated by commas; empty for none.

Returns

AnimationAnimation
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Animation
Package
Novella Visual Novels

In Parallel

Function

Timelines that run at the same time, each animating its own properties: a bob while fading in.

Signature
InParallel -> Animation
    animation: Animation
    first: Animation
    second: Animation
    third: Animation
Animation InParallel(
    Animation animation,
    Animation first,
    Animation second,
    Animation third)

Parameters

nametypedefaultdescription
animationAnimation—
firstAnimation—
secondAnimation—
thirdAnimation—

Returns

AnimationAnimation
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Animation
Package
Novella Visual Novels

On Event

Function

What the image does when it is shown, replaced or hidden. An image whose animation handles hide stays on the stage until that timeline ends, so it can fade or slide away.

Signature
OnEvent -> Animation
    animation: Animation
    events: Text
    timeline: Animation
Animation OnEvent(
    Animation animation,
    string events,
    Animation timeline)

Parameters

nametypedefaultdescription
animationAnimation—The animation so far.
eventsText—show, replace or hide, or several separated by commas.
timelineAnimation—What happens then.

Returns

AnimationAnimation
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Animation
Package
Novella Visual Novels

Repeat

Function

Starts the timeline (or the block it is in) again: a number of times, or forever when 0.

Signature
Repeat(animation: Animation, times: Integer) -> Animation
Animation Repeat(Animation animation, int times = 0)

Parameters

nametypedefaultdescription
animationAnimation—
timesInteger0

Returns

AnimationAnimation
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Animation
Package
Novella Visual Novels

Set Property

Function

Sets a property at once.

Signature
SetProperty -> Animation
    animation: Animation
    property: Text
    value: Text
Animation SetProperty(
    Animation animation,
    string property,
    string value)

Parameters

nametypedefaultdescription
animationAnimation—The animation so far.
propertyText—The property: xalign, yalign, xpos, ypos, pos, xoffset, yoffset, zoom, alpha, rotate, blur, saturation, brightness, tint...
valueText—Its value, as a script writes it.

Returns

AnimationAnimation
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Animation
Package
Novella Visual Novels

Show Picture

Function

From here on the image shows this picture, cross-fading over a transition's length if one is given: frames of a blink, a candle, a waving flag.

Signature
ShowPicture -> Animation
    animation: Animation
    image: Text
    with: Text
Animation ShowPicture(
    Animation animation,
    string image,
    string with = "")

Parameters

nametypedefaultdescription
animationAnimation—The animation so far.
imageText—An image name or a file.
withText—A transition whose length the change cross-fades over; empty changes at once.

Returns

AnimationAnimation
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Animation
Package
Novella Visual Novels

Start Animation

Function

An empty timeline to build on.

Signature
StartAnimation() -> Animation
Animation StartAnimation()

Returns

AnimationAnimation
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Animation
Package
Novella Visual Novels

Wait

Function

Waits before the next step.

Signature
Wait(animation: Animation, seconds: Number) -> Animation
Animation Wait(Animation animation, double seconds)

Parameters

nametypedefaultdescription
animationAnimation—
secondsNumber—

Returns

AnimationAnimation
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Animation
Package
Novella Visual Novels