Skip to content

Add

Constructors

new Add()

new Add(defaultContainer): Add

Parameters

defaultContainer: Container<DisplayObject>

Returns

Add

Source

src/utils/factory/Add.ts:54

Methods

animatedSprite()

animatedSprite(settings): AnimatedSprite

Parameters

settings: AnimatedSpriteSettings

Returns

AnimatedSprite

Source

src/utils/factory/Add.ts:406


bitmapText()

bitmapText(settings)

bitmapText(settings?): BitmapText

Parameters

settings?: BitmapTextSettings

Returns

BitmapText

Source

src/utils/factory/Add.ts:232

bitmapText(value, style, alpha, position, anchor, scale)

bitmapText(value?, style?, alpha?, position?, anchor?, scale?): BitmapText

Parameters

value?: string

style?: Partial<IBitmapTextStyle>

alpha?: number

position?: PointLike

anchor?: PointLike

scale?: PointLike

Returns

BitmapText

Source

src/utils/factory/Add.ts:233


coloredSprite()

coloredSprite(settings)

coloredSprite(settings): Sprite<Application<any>>

Parameters

settings: ColoredSpriteSettings

Returns

Sprite<Application<any>>

Source

src/utils/factory/Add.ts:89

coloredSprite(color, size, shape, opts, alpha, position, anchor, scale)

coloredSprite(color, size?, shape?, opts?, alpha?, position?, anchor?, scale?): Sprite<Application<any>>

Parameters

color: number

size?: PointLike

shape?: "rectangle" | "circle" | "rounded_rectangle"

opts?

alpha?: number

position?: PointLike

anchor?: PointLike

scale?: PointLike

Returns

Sprite<Application<any>>

Source

src/utils/factory/Add.ts:90


container()

container(settings)

container(settings?): Container<Application<any>>

Parameters

settings?: ContainerSettings

Returns

Container<Application<any>>

Source

src/utils/factory/Add.ts:257

container(alpha, position, scale)

container(alpha?, position?, scale?): Container<Application<any>>

Parameters

alpha?: number

position?: PointLike

scale?: PointLike

Returns

Container<Application<any>>

Source

src/utils/factory/Add.ts:258


existing()

existing(pObject, settings)

existing<T>(pObject, settings): T

Type parameters

T

Parameters

pObject: T

settings: ExistingSettings

Returns

T

Source

src/utils/factory/Add.ts:56

existing(pObject, position, anchor, scale)

existing<T>(pObject, position?, anchor?, scale?): T

Type parameters

T

Parameters

pObject: T

position?: PointLike

anchor?: PointLike

scale?: PointLike

Returns

T

Source

src/utils/factory/Add.ts:57


flexContainer()

flexContainer(settings)

flexContainer(settings): FlexContainer

Parameters

settings: Partial<FlexContainerCreationSettings>

Returns

FlexContainer

Source

src/utils/factory/Add.ts:270

flexContainer(alpha, position, settings, scale)

flexContainer(alpha?, position?, settings?, scale?): FlexContainer

Parameters

alpha?: number

position?: PointLike

settings?: Partial<FlexContainerSettings>

scale?: PointLike

Returns

FlexContainer

Source

src/utils/factory/Add.ts:271


graphics()

graphics(settings)

graphics(settings): Graphics

Parameters

settings: GraphicsSettings

Returns

Graphics

Source

src/utils/factory/Add.ts:292

graphics(alpha, position, scale)

graphics(alpha?, position?, scale?): Graphics

Parameters

alpha?: number

position?: PointLike

scale?: PointLike

Returns

Graphics

Source

src/utils/factory/Add.ts:293


htmlText()

htmlText(settings)

htmlText(settings?): HTMLText

Parameters

settings?: HTMLTextSettings

Returns

HTMLText

Source

src/utils/factory/Add.ts:207

htmlText(value, style, alpha, position, anchor, scale)

htmlText(value?, style?, alpha?, position?, anchor?, scale?): HTMLText

Parameters

value?: string

style?: Partial<HTMLTextStyle | TextStyle | ITextStyle>

alpha?: number

position?: PointLike

anchor?: PointLike

scale?: PointLike

Returns

HTMLText

Source

src/utils/factory/Add.ts:208


mesh()

mesh(settings)

mesh(settings): Mesh<Shader>

Parameters

settings: MeshSettings

Returns

Mesh<Shader>

Source

src/utils/factory/Add.ts:334

mesh(geometry, shader, state, drawMode)

mesh(geometry, shader, state?, drawMode?): Mesh<Shader>

Parameters

geometry: Geometry

shader: Shader

state?: State

drawMode?: DRAW_MODES

Returns

Mesh<Shader>

Source

src/utils/factory/Add.ts:335


nineSlice()

nineSlice(settings)

nineSlice(settings): NineSlicePlane

Parameters

settings: NineSliceSettings

Returns

NineSlicePlane

Source

src/utils/factory/Add.ts:303

nineSlice(asset, sheet, leftWidth, topHeight, rightWidth, bottomHeight, alpha, position, scale)

nineSlice(asset, sheet?, leftWidth?, topHeight?, rightWidth?, bottomHeight?, alpha?, position?, scale?): NineSlicePlane

Parameters

asset: string | Texture<Resource>

sheet?: SpritesheetLike

leftWidth?: number

topHeight?: number

rightWidth?: number

bottomHeight?: number

alpha?: number

position?: PointLike

scale?: PointLike

Returns

NineSlicePlane

Source

src/utils/factory/Add.ts:304


simplePlane()

simplePlane(settings)

simplePlane(settings): SimplePlane

Parameters

settings: SimplePlaneSettings

Returns

SimplePlane

Source

src/utils/factory/Add.ts:378

simplePlane(asset, sheet, vertsWidth, vertsHeight, alpha, position, scale)

simplePlane(asset?, sheet?, vertsWidth?, vertsHeight?, alpha?, position?, scale?): SimplePlane

Parameters

asset?: string | Texture<Resource>

sheet?: SpritesheetLike

vertsWidth?: number

vertsHeight?: number

alpha?: number

position?: PointLike

scale?: PointLike

Returns

SimplePlane

Source

src/utils/factory/Add.ts:379


simpleRope()

simpleRope(settings)

simpleRope(settings): object

Parameters

settings: SimpleRopeSettings

Returns

object

points

points: Point[]

rope

rope: SimpleRope

Source

src/utils/factory/Add.ts:349

simpleRope(asset, sheet, numPoints, segmentLength, autoUpdate, alpha, position, scale)

simpleRope(asset, sheet?, numPoints?, segmentLength?, autoUpdate?, alpha?, position?, scale?): object

Parameters

asset: string | Texture<Resource>

sheet?: SpritesheetLike

numPoints?: number

segmentLength?: number

autoUpdate?: boolean

alpha?: number

position?: PointLike

scale?: PointLike

Returns

object

points

points: Point[]

rope

rope: SimpleRope

Source

src/utils/factory/Add.ts:350


spine()

spine(settings): Spine

Parameters

settings: SpineSettings

Returns

Spine

Source

src/utils/factory/Add.ts:412


sprite()

sprite(settings)

sprite(settings): Sprite<Application<any>>

Parameters

settings: SpriteSettings

Returns

Sprite<Application<any>>

Source

src/utils/factory/Add.ts:127

sprite(pTexture, pSheet, alpha, position, anchor, scale)

sprite(pTexture, pSheet?, alpha?, position?, anchor?, scale?): Sprite<Application<any>>

Parameters

pTexture: string | Texture<Resource>

pSheet?: SpritesheetLike

alpha?: number

position?: PointLike

anchor?: PointLike

scale?: PointLike

Returns

Sprite<Application<any>>

Source

src/utils/factory/Add.ts:128


text()

text(value, style, alpha, position, anchor, scale)

text(value?, style?, alpha?, position?, anchor?, scale?): Text

Parameters

value?: string

style?: Partial<TextStyle | ITextStyle>

alpha?: number

position?: PointLike

anchor?: PointLike

scale?: PointLike

Returns

Text

Source

src/utils/factory/Add.ts:183

text(settings)

text(settings): Text

Parameters

settings: TextSettings

Returns

Text

Source

src/utils/factory/Add.ts:191


tilingSprite()

tilingSprite(settings)

tilingSprite(settings): TilingSprite

Parameters

settings: TilingSpriteSettings

Returns

TilingSprite

Source

src/utils/factory/Add.ts:152

tilingSprite(asset, sheet, width, height, tilePosition, alpha, position, anchor, scale)

tilingSprite(asset, sheet, width, height, tilePosition?, alpha?, position?, anchor?, scale?): TilingSprite

Parameters

asset: string | Texture<Resource>

sheet: SpritesheetLike

width: number

height: number

tilePosition?: PointLike

alpha?: number

position?: PointLike

anchor?: PointLike

scale?: PointLike

Returns

TilingSprite

Source

src/utils/factory/Add.ts:153


uiCanvas()

uiCanvas(settings): UICanvas

Parameters

settings: UICanvasMakeSettings

Returns

UICanvas

Source

src/utils/factory/Add.ts:418