A Canvas is the starting point for anything based on [[UIX]]. It provides the bounds of the UI and controls how users can interact with it.
The '''Canvas''' component is the starting point for anything based on [[UIX]]. It provides the bounds of the UI and controls how users can interact with it.
<!--T:3-->
<!--T:3-->
== Usage ==
{{Table ComponentFields
{{Table ComponentFields
|Size|Float2|The dimensions of the canvas. At normal scale, this is equivalent to meters.
|Size|Float2|The dimensions of the canvas. At normal scale, this is equivalent to meters
|EditModeOnly|Bool|FIXME
|EditModeOnly|Bool|This makes this component only editable in [[Edit Mode]]
|AcceptRemoteTouch|Bool|Makes the canvas accepts laser touches
|AcceptRemoteTouch|Bool|Makes the canvas accepts laser touches
|AcceptPhysicalTouch|Bool|Makes the canvas accepts direct touches
|AcceptPhysicalTouch|Bool|Makes the canvas accepts direct touches
|AcceptExistingTouch|Bool|FIXME
|AcceptExistingTouch|Bool|If this canvas is already being touched (physically or remotely), accept the input
|HighPriorityIntegration|Bool|FIXME
|HighPriorityIntegration|Bool|Prioritizes the procedural meshes in the queue for this component
|IgnoreTouchesFromBehind|Bool|Makes the canvas ignore all touches from behind
|IgnoreTouchesFromBehind|Bool|Makes the canvas ignore all touches from behind
|BlockAllInteractions|Bool|Prevents any interaction if enabled
|BlockAllInteractions|Bool|Prevents any interaction if enabled
|LaserPassThrough|Bool|Allows the laser to go through the canvas
|LaserPassThrough|Bool|Allows the laser to go through the canvas
|PixelScale|Float|FIXME
|PixelScale|Float|Sets the pixel scale for this canvas and its contents
|UnitScale|Float|
|UnitScale|Float|Scales the contents of this canvas, higher number makes the contents smaller
|_colliderOffset|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv15=true|Internal - Offsets this box collider for this canvas
|StartingOffset|Int|FIXME
|StartingOffset|Int|The visibility order of rendering this canvas (lower number gets drawn over higher numbers)
|StartingMaskDepth|Int|FIXME
|StartingMaskDepth|Int|Masking layer for the canvas
}}
}}
<!--T:4-->
<!--T:4-->
== Behavior ==
== Usage ==
This component is needed for [[UIX]], without it, your other components that relay on UIX, canvas, elements, and [[Type:Rect|rects]] will not work as expected. Using a canvas not only organizes your other components, it renders them and makes them usable and intractable.
This component is needed for UIX, without it, your other components that relay on UIX, canvas, elements, and rects will not work as expected. Using a canvas not only organizes your other components, it renders them and makes them usable and intractable.