Preparing search index...

    Class BitmojiModule

    Provides access to functionalities related to Bitmoji avatar.

    Bitmoji Overview guide.

    // @input Asset.BitmojiModule bitmojiModule
    // @input Asset.RemoteMediaModule remoteMediaModule
    // @input Asset.Material pbrMaterialHolder

    script.bitmojiModule.requestBitmoji3DResource(
    function (bitmoji3DResource) {
    script.remoteMediaModule.loadResourceAsGltfAsset(
    bitmoji3DResource,
    onDownloaded,
    onFail
    )
    }
    )

    function onDownloaded (gltfAsset){
    var root = scene.createSceneObject("BitmojiAvatar");
    var gltfSettings = GltfSettings.create();
    gltfSettings.convertMetersToCentimeters = true;
    var avatar = gltfAsset.tryInstantiateWithSetting(root, script.pbrMaterialHolder, gltfSettings);
    }

    function onFail (e){
    print(e);
    }

    Hierarchy (View Summary)

    Index

    Properties

    name: string

    The name of the Asset in Lens Studio.

    uniqueIdentifier: string

    Methods

    • Returns the name of this object's type.

      Returns string

    • Returns true if the object matches or derives from the passed in type.

      Parameters

      • type: string

      Returns boolean

    • Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

      Parameters

      Returns boolean

    • Request a base Bitmoji3D resource with explicit body customization options. Uses the default base avatar and applies body parameters from baseBodyParams if provided. If baseBodyParams is not provided or missing values, falls back to cached avatar data.

      Parameters

      Returns void

    • Returns a DynamicResource via the provided callback, which can be resolved into a texture using RemoteMediaModule.

      Parameters

      Returns void

    • Request the current user's 3D Bitmoji avatar.

      Parameters

      Returns void