Skip to content
pixi-silk
GitHub repository
Interface

CameraState

import type { CameraState } from 'pixi-silk/ui/camera';

The reactive view of a Camera: where it is now, animations included.

Properties#

PropertyTypeDescriptionDefined in
heightReadSignal<number>Element height in CSS pixels. Follows resizes where ResizeObserver exists.ui/camera.ts:92
panningReadSignal<boolean>True while the user drags the view.ui/camera.ts:88
widthReadSignal<number>Element width in CSS pixels. Follows resizes where ResizeObserver exists.ui/camera.ts:90
xReadSignal<number>Screen x of the world’s origin, in CSS pixels from the element’s left edge.ui/camera.ts:84
yReadSignal<number>Screen y of the world’s origin, in CSS pixels from the element’s top edge.ui/camera.ts:86
zoomReadSignal<number>Scale of the world. 1 is 100%.ui/camera.ts:82