A collection descripes everything that is shown in a PICTOFiT Virtual Styling Component.

It contains the available avatars, the available scenes, all available garments, as well as the predefined outfits.

Reactive Reality is creating these collections and will provide a reference, to allow fetching of these collections via a centralized system.

IVirtualStylingBuilder.getCollection can be used to fetch such a collection from this centralized system.

During the build a json schema for this interface it generated and available in the location src/schema/collection.schema.json of the npm package.

interface Collection {
    accessories?: AccessoryReference[];
    avatars?: AvatarAssetReference[];
    fallbackGarments?: FallbackGarments;
    garments?: AssetReference[];
    info?: {
        collectionLink?: string;
        imageUrl: string;
        name: string;
    };
    outfits?: Outfit[];
    scenes?: AssetReference[];
    settings?: {
        carouselTimeout?: number;
        style?: string;
    };
}

Properties

accessories?: AccessoryReference[]

Holds all accessories that are available for the virtual tryon in this collection

Holds all avatars that are available for the virtual tryon in this collection

fallbackGarments?: FallbackGarments

These garments are dressed for certain garment groups (shirts, etc.) in case currently no other garment is selected in this group. With this setting it can be prevented to show avatars in half-naked states in the virtual dressing room, by falling back to the garments in this list.

garments?: AssetReference[]

Holds all garments that are available for the virtual tryon in this collection

info?: {
    collectionLink?: string;
    imageUrl: string;
    name: string;
}

This object holds generic information on the collection, like the name, a link to the collection (for example a PLP), and a logo url to represent the collection.

Type declaration

  • OptionalcollectionLink?: string

    This is not supported anymore

  • imageUrl: string
  • name: string
outfits?: Outfit[]

Holds all outfit assets, these are precalculated outfit assets, that are shown in the initial carusel.

scenes?: AssetReference[]

Holds all scenes that are available for the virtual tryon in this collection

settings?: {
    carouselTimeout?: number;
    style?: string;
}

These settings enable customization of the VSC behaviour based on the collection.

Type declaration

  • OptionalcarouselTimeout?: number

    This is not supported anymore

  • Optionalstyle?: string