Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Sprite2DRendererHitBox2D

Describes a 2D hit box for simple picking. This component behaves the same as a HitBox2D component, but a Sprite2DRenderer component defines its size.

Hierarchy

Index

Constructors

constructor

Properties

pixelAccurate

pixelAccurate: boolean

When true, the Sprite2DRendererHitBox2D component uses pixel-accurate hit testing from the sprite. Defaults to false. Pixel-accurate hit testing requires that the entity have both an Image2D component and an Image2DAlphaMask component attached before image loading. It ignores hits and overlap where the sprite Alpha is zero. Note that pixel-accurate hit testing is computationally intensive.

Static _isSharedComp

_isSharedComp: boolean

Static _size

_size: number

Static _view

_view: any

Static cid

cid: number

Static pixelAccurate

pixelAccurate: ComponentFieldDesc

Methods

Static _dtorFn

Static _fromPtr

Static _tempHeapPtr

Static _toPtr

Generated using TypeDoc