Skip to main content

ObjectEventMap

type ObjectEventMap<T extends ObjectType = ObjectType> = {
onPointerMove: (event: ObjectPointerEvent<T>) => void;

onPointerDown: (event: ObjectPointerEvent<T>) => void;

onPointerUp: (event: ObjectPointerEvent<T>) => void;

onPointerEnter: (event: ObjectPointerEvent<T>) => void;

onPointerLeave: (event: ObjectPointerEvent<T>) => void;

onTransitionEnd: (transitionId: number | string) => void;

onTransitionStart: (transitionId: number | string) => void;

onProximityActionTriggered: (event: ObjectProximityActionEvent<T>) => void;

onSoundEnd: (event: ObjectSoundEvent<T>) => void;

onEnterSensor: (player: PlayerManager) => void;

onLeaveSensor: (player: PlayerManager) => void;
};
type ObjectPointerEvent<T extends ObjectType = ObjectType> = PointerEvent & {
object: ObjectManager<T>;
intersects: IntersectsResult;
};