Back to documentation

Canvas

A programmable canvas that can be used to create interactive experiences, tools or games.

Information

Plan: Pro Gold
Added at: 2026-05-25

Properties

PropertyTypeDefault
Background color
string
"var(--ophixor-semantic-surface-base)"
Border color
string
"var(--ophixor-semantic-border-default)"
Border radius
string
"6px"
Border width
string
"1px"
Border style
string
"solid"
Box shadow
string
"var(--ophixor-semantic-shadow-medium)"
Width
string
"100%"
Height
string
"500px"
On mouse down
object
null
On mouse move
object
null
On mouse up
object
null
On render
object
null
On update
object
null
Is visible
boolean
true
Selectors
array
[]

Related actions

ActionDescriptionPlan
Canvas circleDraws or fills a circle in the current canvas.Pro Gold
Canvas clearClears the current canvas.Pro Gold
Canvas imageDraws an image in the current canvas.Pro Gold
Canvas lineDraws a line in the current canvas.Pro Gold
Canvas polygonDraws or fills a polygon in the current canvas.Pro Gold
Canvas rectangleDraws or fills a rectangle in the current canvas.Pro Gold
Canvas restoreRestores the current canvas.Pro Gold
Canvas rotateRotates the current canvas.Pro Gold
Canvas saveSaves the current canvas.Pro Gold
Canvas scaleScales the current canvas.Pro Gold
Canvas textFills text in the current canvas.Pro Gold
Canvas translateTranslates the current canvas.Pro Gold

Related expressions

ExpressionDescriptionPlan
Canvas delta timeReturns the delta time since the last update.Pro Gold
Canvas frames per secondReturns the most recently calculated frames per second (FPS).Pro Gold
Canvas frameComing soon...Pro Gold
Canvas heightReturns the height of the canvas.Pro Gold
Canvas key downReturns true if the provided key is being pressed and false otherwise.Pro Gold
Canvas mouse buttonComing soon...Pro Gold
Canvas mouse downComing soon...Pro Gold
Canvas mouse movedComing soon...Pro Gold
Canvas mouse pressedComing soon...Pro Gold
Canvas mouse releasedComing soon...Pro Gold
Canvas mouse wheelComing soon...Pro Gold
Canvas mouse XReturns the X-coordinate of the mouse cursor in the canvas.Pro Gold
Canvas mouse YReturns the Y-coordinate of the mouse cursor in the canvas.Pro Gold
Canvas timeComing soon...Pro Gold
Canvas widthReturns the width of the canvas.Pro Gold