Skip to content

pixi-hm05 (player) / pixi-hm05 / unprojectToFlat

Function: unprojectToFlat() ​

ts
function unprojectToFlat(
   obj, 
   x, 
   y
): 
  | {
  x: number;
  y: number;
}
  | null;

A point in obj's PARENT space (as a flat hit test would use) → the point on the card it shows, in the parent space too; null = it misses the card (edge-on, behind the eye, the hidden back). Uses fresh transforms, so it works outside a render.

Parameters ​

ParameterType
objContainer
xnumber
ynumber

Returns ​

| { x: number; y: number; } | null

HereSplash — 2D animation for the web