Skip to content

@relu-interactives/spatial-ecs


@relu-interactives/spatial-ecs / index / ScreenPosition

Type Alias: ScreenPosition ​

ts
type ScreenPosition = {
  x: number;
  y: number;
  visible: boolean;
};

Defined in: gestures/screen.ts:8

A place on screen, in CSS pixels from the top left of the page, the same as a pointer event's clientX and clientY.

Properties ​

PropertyTypeDescriptionDefined in
xnumber-gestures/screen.ts:9
ynumber-gestures/screen.ts:10
visiblebooleanWhether it's inside the window and in front of the camera.gestures/screen.ts:12