Skip to main content

Canvas.UnitType

Enum

Used by Canvas to set how an object is positioned.

  • Available on all platforms
Platform details: Snapchat, SPECS, Camera Kit Web, Camera Kit Mobile fully supported.

Platform details

  • Snapchat — Fully supported.

  • SPECS — Fully supported.

  • Camera Kit Web — Fully supported.

  • Camera Kit Mobile — Fully supported.

Since Lens Scripting v182

Index

Enumeration Members

Enumeration Members

Pixels

Pixels: number

The smallest addressable element on a display.

Since

Lens Scripting Version 182


Points

Points: number

Sometimes referred to as “Density Independent Pixels (dp)”, are abstractions of pixels that make it easier to deal with displays of different densities.

Since

Lens Scripting Version 182


World

World: number

How objects are positioned outside of canvas.

Since

Lens Scripting Version 182