Skip to content

pixi-hm05 (player) / pixi-hm05 / cardHitPoint

Function: cardHitPoint() ​

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

A GLOBAL point over a card → the global point the flat (unprojected) art has there, so hit tests inside it work as if it were flat; null = the card is not under it. Objects that are not cards pass it through.

Parameters ​

ParameterType
objContainer
p{ x: number; y: number; }
p.xnumber
p.ynumber

Returns ​

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

HereSplash — 2D animation for the web