Skip to content

Class PlayerModel

🏭 Constructors

constructor

ts
new PlayerModel(): PlayerModel

Return Type

  • PlayerModel

Defined in: packages/model/player.ts:218

🏷️ Properties

materialCape

ts
materialCape: MeshBasicMaterial

Defined in: packages/model/player.ts:214

materialPlayer

ts
materialPlayer: MeshBasicMaterial

Defined in: packages/model/player.ts:212

materialTransparent

ts
materialTransparent: MeshBasicMaterial

Defined in: packages/model/player.ts:213

playerObject3d

ts
playerObject3d: PlayerObject3D

Defined in: packages/model/player.ts:211

textureCape

ts
textureCape: CanvasTexture

Defined in: packages/model/player.ts:215

texturePlayer

ts
texturePlayer: CanvasTexture

Defined in: packages/model/player.ts:216

🔧 Methods

setCape

ts
setCape(cape: undefined | TextureSource): Promise<void>

Parameters

  • cape: undefined | TextureSource

Return Type

  • Promise<void>

Defined in: packages/model/player.ts:276

setSkin

ts
setSkin(skin: TextureSource, isSlim: boolean= false): Promise<void>

Parameters

  • skin: TextureSource The skin texture source. Should be url string, URL object, or a Image HTML element
  • isSlim: boolean Is this skin slim

Return Type

  • Promise<void>

Defined in: packages/model/player.ts:257

create

ts
create(): PlayerModel

Return Type

  • PlayerModel

Defined in: packages/model/player.ts:209

Released under the MIT License.