Skip to content

@orillusion/core


Class: PrefabAvatarParser ​

Defined in: src/loader/parser/prefab/PrefabAvatarParser.ts:18

Parses avatar (skeleton) blocks from an Orillusion prefab binary stream. Each decoded PrefabAvatarData is registered with the engine's resource host so meshes and animations can later bind to the skeleton.

Constructors ​

Constructor ​

new PrefabAvatarParser(): PrefabAvatarParser

Returns ​

PrefabAvatarParser

Inherited from ​

ParserBase.constructor

Properties ​

format ​

static format: ParserFormat = ParserFormat.BIN

Defined in: src/loader/parser/prefab/PrefabAvatarParser.ts:19

Overrides ​

ParserBase.format


baseUrl ​

baseUrl: string

Defined in: src/loader/parser/ParserBase.ts:12

Inherited from ​

ParserBase.baseUrl


initUrl ​

initUrl: string

Defined in: src/loader/parser/ParserBase.ts:13

Inherited from ​

ParserBase.initUrl


loaderFunctions? ​

optional loaderFunctions?: LoaderFunctions

Defined in: src/loader/parser/ParserBase.ts:14

Inherited from ​

ParserBase.loaderFunctions


userData? ​

optional userData?: any

Defined in: src/loader/parser/ParserBase.ts:15

Inherited from ​

ParserBase.userData


data ​

data: any

Defined in: src/loader/parser/ParserBase.ts:16

Inherited from ​

ParserBase.data


ctx? ​

optional ctx?: Context3D

Defined in: src/loader/parser/ParserBase.ts:20

Context3D this parser is operating under. Populated by FileLoader so default-texture lookups (Engine3D.resFor(this.ctx)) resolve against the owning engine's device rather than the global shim.

Inherited from ​

ParserBase.ctx

Methods ​

parser() ​

static parser(bytesStream, prefabParser): void

Defined in: src/loader/parser/prefab/PrefabAvatarParser.ts:26

Read every avatar block from the stream and register the resulting PrefabAvatarData instances on the resource host.

Parameters ​

bytesStream ​

BytesArray

the prefab binary stream positioned at the avatar section.

prefabParser ​

PrefabParser

the owning prefab parser, used for context lookup.

Returns ​

void


parseString() ​

parseString(str): void

Defined in: src/loader/parser/ParserBase.ts:22

Parameters ​

str ​

string

Returns ​

void

Inherited from ​

ParserBase.parseString


parseJson() ​

parseJson(obj): void

Defined in: src/loader/parser/ParserBase.ts:24

Parameters ​

obj ​

object

Returns ​

void

Inherited from ​

ParserBase.parseJson


parseBuffer() ​

parseBuffer(buffer): void

Defined in: src/loader/parser/ParserBase.ts:26

Parameters ​

buffer ​

ArrayBuffer

Returns ​

void

Inherited from ​

ParserBase.parseBuffer


parseTexture() ​

parseTexture(buffer): Texture

Defined in: src/loader/parser/ParserBase.ts:28

Parameters ​

buffer ​

ArrayBuffer

Returns ​

Texture

Inherited from ​

ParserBase.parseTexture


parse() ​

parse(data): void

Defined in: src/loader/parser/ParserBase.ts:32

Parameters ​

data ​

any

Returns ​

void

Inherited from ​

ParserBase.parse


verification() ​

verification(): boolean

Defined in: src/loader/parser/prefab/PrefabAvatarParser.ts:39

Verify that parsing produced valid data.

Returns ​

boolean

true when data is present; throws otherwise.

Overrides ​

ParserBase.verification

Released under the MIT License