I find the documentation given by the Wick Editor lacking. There are so much other useful properties that aren’t documented. I got this documentation from the current docs, printing out objects to the console, and looking at the source code.
Global API
Timeline
-
play()
Plays the parent timeline that this object belongs to
-
stop()
Stops the parent timeline that this object belongs to
-
gotoAndPlay(frame)
Moves the playhead to a frame on the timeline that this object belongs to, and plays that timeline
frame: An integer or string which is where you want the frame to be. -
gotoAndStop(frame)
Moves the playhead to a frame on the timeline that this object belongs to, and stops that timeline
frame: An integer or string which is where you want the frame to be. -
gotoAndStop(frame)
Moves the playhead to a frame on the timeline that this object belong to, and stops that timeline.
frame: An integer or string which is where you want the frame to be. -
gotoNextFrame()
Moves the playhead to the next frame on the timeline that the object belongs to.
-
gotoPrevFrame()
Moves the playhead to the previous frame on the timeline that this object belongs to.
Input
-
mouseX
The x position of the mouse on the screen
-
mouseY
The y position of the mouse on the screen
-
mouseMoveX
The amount the mouse moved on the x-axis in the last tick.
-
mouseMoveY
The amount the mouse moved on the y-axis in the last tick
-
key
The last key pressed
-
keys
An array of all keys which are currently pressed down
D key = “d”
L key = “l”
CTRL key = “control”
ALT key = “alt”
PG UP key = “page-up”
LEFT ARROW key = “left”
DELETE key = “delete”
ESC key = “escape” -
isMouseDown
True if the mouse is currently pressed down
-
isKeyDown(key)
Returns true if the given key is currently down
key: A string -
isKeyJustPressed(key)
Returns true if the given key was pressed within the last tick
key: A string -
hideCursor()
Hides the cursor
-
showCursor()
Un-hides the cursor
Project
-
project
Returns the project clip
-
project.width
The width of the project canvas
-
project.height
The height of the project canvas
-
project.framerate
The max framerate that you set of the project
Random
-
random.integer(min, max)
Returns a random whole number between a minimum and maximum
min: Integer
max: Integer -
random.float(min, max)
Returns a random decimal number between a minimum and maximum
min: Number
max: Number -
random.choice(arr)
Returns a random item in the given array
arr: Array
Sound
-
playSound(assetName [, options])
Plays a sound in the asset library
assetName: A string that is the asset name
options: An optional Object that may include:
{
loop: bool
volume: number
} -
stopAllSounds()
Stops all currently playing sounds
Event
-
onEvent(name, fn)
Binds a function to an event.
name: A string that describes the event
fn: The function to bind
Wick.Clip
Uncategorized
-
Clip._cachedSerializeData
Clip’s default data -
Clip.setText()
it literally just throws an error that’s all it does in the code
-
Clip.remove()
Removes this object from the project.
If you don’t want code running in a removed clip, check ifthis.parent !== null
. That seemed to work for me. -
Clip.cursor
The appearance of the cursor when this is hovered over (only works on buttons)
-
Clip.identifier
The given name of this Clip
-
Clip.uuid
A randomly-generated unique identifier for this Clip
-
Clip.view
A Wick.View.Clip, which is what is rendered on the screen.
-
Clip.bounds
A Rectangle that describes the bounds of this Clip
-
Clip.hitTest(other)
Checks if this Clip’s bounds intersects with the other’s
other: Can be a Clip
This is deprecated from 1.19 and onwards -
Clip.animationType
The animation type of this Clip
-
Clip.isFocus
-
Clip.isRoot
-
Clip.isScriptable
-
Clip.isSelected
-
Clip.isSynced
-
Clip.lineage
-
Clip.name
-
Clip.needsAutosave
-
Clip.playedOnce
-
Clip.singleFrameNumber
-
Clip.syncFrame
-
Clip.breakApart()
Transformation
-
Clip.transformation
A Wick.Transformation object that describes this clip’s transformation
-
Clip._cachedSerializeData.transformation
This is what the editor uses to reset clips transformation after the project pauses. -
Clip.x
The x position of the object (Left to Right)
-
Clip.y
The y position of the object (Up to Down)
-
Clip.scaleX
The scale of the object on the x-axis
-
Clip.scaleY
The scale of the object on the y-axis
-
Clip.rotation
The rotation of the object (measured in degrees)
-
Clip.opacity
The opacity of the object. 0 is completely transparent, 1 is completely opaque
Timeline
-
Clip.timeline
The timeline of this Clip
-
Clip.activeFrame
-
Clip.activeLayer
-
Clip.currentFrameName
-
Clip.currentFrameNumber
-
Clip.gotoAndPlay(frame)
-
Clip.gotoAndStop(frame)
-
Clip.gotoNextFrame()
-
Clip.gotoPrevFrame()
-
Clip.play()
-
Clip.stop()
-
Clip.updateTimelineForAnimationType()
Parents
-
Clip.project
The Wick.Project
-
Clip.parent
The parent of this Clip. Usually a Wick.Frame
-
Clip.parentClip
The Clip that this is contained in. If it has no parent Clip, it will return the project Clip.
-
Clip.parentFrame
The Frame that this is contained in.
-
Clip.parentLayer
The Layer that this is contained in
-
Clip.parentTimeline
The Timeline that this is contained in
Children
-
Clip._children
All the children of this object
-
Clip.namedChildren
-
Clip.activeNamedChildren
-
Clip.addObjects(objects)
Clones
-
Clip.clone()
Creates a clone of this object, places it on the same frame, and returns a reference to it
Returns a Wick.Clip that is the cloned object. -
Clip.clones
An array of every clone of an object
-
Clip.isClone
Returns true if this is a clone
-
Clip.sourceClipUUID
Probably the UUID of the object that this was cloned from.
Wick.Frame
Note: Scripts in Frames refer to this
as the project clip
Uncategorized
-
Frame.identifier
The name of the Frame given in the “Name” property of the inspector.
-
Frame.length
Parents
-
Frame.parentClip
The Clip containing this object. Frames on the main timeline will return the project Clip.
-
Frame.parentFrame
The Frame containing this object. Frames on the main timeline will return null.
-
Frame.parentLayer
The Layer containing this object.
-
Frame.parentTimeline
The Timeline containing this object.
-
Frame.remove()
Removes this Frame
Children
-
Frame._children
The children of this Frame. They will include clips, paths, and text objects.
-
Frame.clips
The clips and text contained in this Frame.
-
Frame.paths
The paths contained in this Frame
-
Frame.addClip(clip)
-
Frame.removeClip(clip)
-
Frame.addPath(path)
-
Frame.removePath(path)
Sound
-
Frame.sound
-
Frame.soundEndMS
-
Frame.soundStart
-
Frame.soundStartMS
-
Frame.soundLoop
-
Frame.soundVolume
-
Frame.playSound()
-
Frame.stopSound()
-
Frame.removeSound()
-
Frame.isSoundPlaying()
Tweens
-
Frame.addTween(tween)
-
Frame.removeTween(tween)
I will add more docs, like for projects, bounds, e.t.c, later.