Documentation / @imvu/chkn / ProductDefinition
Class: ProductDefinition
Defined in: packages/chkn/src/ProductDefinition.ts:93
Constructors
Constructor
new ProductDefinition(template): ProductDefinition;Defined in: packages/chkn/src/ProductDefinition.ts:95
Parameters
| Parameter | Type | Description |
|---|---|---|
template | TemplateDict | The expanded Template dictionary. |
Returns
ProductDefinition
Properties
template
readonly template: TemplateDict;Defined in: packages/chkn/src/ProductDefinition.ts:95
The expanded Template dictionary.
Accessors
actions
Get Signature
get actions(): ActionSpec[];Defined in: packages/chkn/src/ProductDefinition.ts:210
Embedded actions (ActionN), in numeric order.
Returns
attachmentNodeName
Get Signature
get attachmentNodeName(): string;Defined in: packages/chkn/src/ProductDefinition.ts:117
The bone an attachment is attached to (e.g. Neck03), or ''.
Returns
string
bodyParts
Get Signature
get bodyParts(): Map<number, BodyPartSpec>;Defined in: packages/chkn/src/ProductDefinition.ts:147
Body parts by id: from BodyPatternDef, or synthesized from top-level meshes for older clothing.
Returns
Map<number, BodyPartSpec>
isBodyPattern
Get Signature
get isBodyPattern(): boolean;Defined in: packages/chkn/src/ProductDefinition.ts:126
Returns
boolean
isStudioProduct
Get Signature
get isStudioProduct(): boolean;Defined in: packages/chkn/src/ProductDefinition.ts:122
Whether the product was made with IMVU's creator tools (it records a CreatorVersion).
Returns
boolean
meshes
Get Signature
get meshes(): Map<number, MeshSpec>;Defined in: packages/chkn/src/ProductDefinition.ts:179
Mesh slots by index (= body part id), body-pattern meshes first, then top-level MeshN.
Returns
Map<number, MeshSpec>
name
Get Signature
get name(): string;Defined in: packages/chkn/src/ProductDefinition.ts:102
Returns
string
productType
Get Signature
get productType(): string;Defined in: packages/chkn/src/ProductDefinition.ts:107
The product type name (Avatar Clothing, Room, Room Attachment, …), defaulting like the client does.
Returns
string
productTypeId
Get Signature
get productTypeId(): number | undefined;Defined in: packages/chkn/src/ProductDefinition.ts:112
Returns
number | undefined
sceneAmbient
Get Signature
get sceneAmbient(): [number, number, number] | undefined;Defined in: packages/chkn/src/ProductDefinition.ts:134
The scene ambient color as bytes from <SceneAmbient>r g b</SceneAmbient>, or undefined (the client then falls back to the skeleton's ambient color).
Returns
[number, number, number] | undefined
skeletonAsset
Get Signature
get skeletonAsset(): string | undefined;Defined in: packages/chkn/src/ProductDefinition.ts:141
The skeleton file name.
Returns
string | undefined
Methods
materialsFor()
materialsFor(bodyPartId): Map<number, MaterialSpec>;Defined in: packages/chkn/src/ProductDefinition.ts:196
Material slots for a body part, keyed by material index (Index, else position): the top-level Material when it has entries, else the body part's own.
Parameters
| Parameter | Type |
|---|---|
bodyPartId | number |
Returns
Map<number, MaterialSpec>
property()
property(name): string | undefined;Defined in: packages/chkn/src/ProductDefinition.ts:98
A top-level text property, e.g. property('ProductName').
Parameters
| Parameter | Type |
|---|---|
name | string |
Returns
string | undefined