Skip to content

Documentation / @imvu/chkn / ProductDefinition

Class: ProductDefinition ​

Defined in: packages/chkn/src/ProductDefinition.ts:93

Constructors ​

Constructor ​

ts
new ProductDefinition(template): ProductDefinition;

Defined in: packages/chkn/src/ProductDefinition.ts:95

Parameters ​

ParameterTypeDescription
templateTemplateDictThe expanded Template dictionary.

Returns ​

ProductDefinition

Properties ​

template ​

ts
readonly template: TemplateDict;

Defined in: packages/chkn/src/ProductDefinition.ts:95

The expanded Template dictionary.

Accessors ​

actions ​

Get Signature ​

ts
get actions(): ActionSpec[];

Defined in: packages/chkn/src/ProductDefinition.ts:210

Embedded actions (ActionN), in numeric order.

Returns ​

ActionSpec[]


attachmentNodeName ​

Get Signature ​

ts
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 ​

ts
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 ​

ts
get isBodyPattern(): boolean;

Defined in: packages/chkn/src/ProductDefinition.ts:126

Returns ​

boolean


isStudioProduct ​

Get Signature ​

ts
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 ​

ts
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 ​

ts
get name(): string;

Defined in: packages/chkn/src/ProductDefinition.ts:102

Returns ​

string


productType ​

Get Signature ​

ts
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 ​

ts
get productTypeId(): number | undefined;

Defined in: packages/chkn/src/ProductDefinition.ts:112

Returns ​

number | undefined


sceneAmbient ​

Get Signature ​

ts
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 ​

ts
get skeletonAsset(): string | undefined;

Defined in: packages/chkn/src/ProductDefinition.ts:141

The skeleton file name.

Returns ​

string | undefined

Methods ​

materialsFor() ​

ts
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 ​

ParameterType
bodyPartIdnumber

Returns ​

Map<number, MaterialSpec>


property() ​

ts
property(name): string | undefined;

Defined in: packages/chkn/src/ProductDefinition.ts:98

A top-level text property, e.g. property('ProductName').

Parameters ​

ParameterType
namestring

Returns ​

string | undefined

Released under the MIT License.