Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Sprite2DRendererOptions

Modifier component. Add alongside a Sprite2DRenderer to override the world space size computation. Regular sprites have a base (untransformed) size that is computed as image asset size times pixelsToWorldUnits. When this component is added to an entity the base size is set explicitly, and the image is placed inside that region depending on the repeat mode.

Hierarchy

Index

Constructors

constructor

Properties

drawMode

drawMode: DrawMode

Draw mode, defaults to ContinuousTiling. This mode specifies how the natural sized sprite is mapped into the new size.

size

size: Vector2

Sprite size in world units This is used to override the computed natural sprite size. The natural size is Image2D.imagePixelSize * Image2D.pixelsToWorldUnits * Sprite2D.imageRegion.size. The new size is also used in hit testing.

Static _isSharedComp

_isSharedComp: boolean

Static _size

_size: number

Static _view

_view: any

Static cid

cid: number

Static size

Methods

Static _dtorFn

Static _fromPtr

Static _tempHeapPtr

Static _toPtr

Generated using TypeDoc