Skip to content

MatterPhysicsSprite

Extends

  • Container

Implements

Constructors

new MatterPhysicsSprite()

new MatterPhysicsSprite(pTexture, pSheet?, pSize?, pBodyType?): MatterPhysicsSprite

Parameters

pTexture: string | Texture<Resource>

pSheet?: SpritesheetLike

pSize?: number | [number, number?] | object

pBodyType?: PhysicsBodyType= PhysicsBodyType.RECTANGLE

Returns

MatterPhysicsSprite

Overrides

Container.constructor

Source

src/physics/matter/gameobjects/MatterPhysicsSprite.ts:15

Properties

_bodyType

_bodyType: PhysicsBodyType

Source

src/physics/matter/gameobjects/MatterPhysicsSprite.ts:13


_size

_size: object

x

x: number

y

y: number

Source

src/physics/matter/gameobjects/MatterPhysicsSprite.ts:12


body

body: Body

Implementation of

IPhysicsObject.body

Source

src/physics/matter/gameobjects/MatterPhysicsSprite.ts:11


visual

visual: Sprite

Implementation of

IPhysicsObject.visual

Source

src/physics/matter/gameobjects/MatterPhysicsSprite.ts:10


DEFAULT_DEBUG_COLOR

static readonly DEFAULT_DEBUG_COLOR: number = 0x29c5f6

Source

src/physics/matter/gameobjects/MatterPhysicsSprite.ts:9

Accessors

app

get app(): Application<any>

Returns

Application<any>

Source

src/physics/matter/gameobjects/MatterPhysicsSprite.ts:55


debugColor

get debugColor(): number

Returns

number

Source

src/physics/matter/gameobjects/MatterPhysicsSprite.ts:51


physics

get physics(): MatterPhysics

Returns

MatterPhysics

Source

src/physics/matter/gameobjects/MatterPhysicsSprite.ts:47

Methods

createBody()

createBody(): void

Returns

void

Source

src/physics/matter/gameobjects/MatterPhysicsSprite.ts:68


onAdded()

onAdded(): void

Returns

void

Source

src/physics/matter/gameobjects/MatterPhysicsSprite.ts:59


onRemoved()

onRemoved(): void

Returns

void

Source

src/physics/matter/gameobjects/MatterPhysicsSprite.ts:64


update()

update(): void

Returns

void

Source

src/physics/matter/gameobjects/MatterPhysicsSprite.ts:85