Jump to content

API Documentation


Anthony
 Share

Recommended Posts

MetaScript API Document

export interface MixedRealityExtension {

    processClientMessages(payload : any) : void;
    
    getLocalActors() : Map<string, AbstractActor>;

    getMaterial(id : string) : AbstractAsset;

    emit(payload : any) : void;

    createSound(id : string, remoteUrl : string) : string;
    
    playSound(soundId : string, actorId : string, volume? : number, loop? : boolean) : void;

    playVideo(videoId : string, actorId : string, volume? : number, loop? : boolean, paused? : false) : void;

    createColor3Material(id: string, r: number, g: number, b: number) : string;
    
    createColor4Material(id: string, r: number, g: number, b: number, a: number) : string;

    createTexturedMaterial(id : string, remoteUrl : string): string;

    sendMessage(message : string, playerId : string) : void;

    sendCommand(payload : any) : void;

    detachActor(actorId : string) : void;

    getActorById(actorId : string) : AbstractActor;

    destroyActor(actorId : string, owner? : AbstractPlayer) : void;

    attachActor(options : ActorOptions, ownerId? : string, exclusiveTo? : string, subscriptions? : any[]) : AbstractActor;
    
    createText(name : string, parentId : string, text : string, height: number, hexColor : string, position : Position, rotation : Position, ownerId? : string, exclusiveTo? : string, subscriptions? : any[]) : AbstractActor;
    
    createPrimitive(name : string, parentId : string, dimensions: Position, position : Position, rotation : Position, materialId? : string, ownerId? : string, exclusiveTo? : string, subscriptions? : any[]) : AbstractActor;

    createActor(options : ActorOptions, ownerId? : string, exclusiveTo? : string, subscriptions? : any[]) : AbstractActor;
    
    createActorFromLibrary(options : ActorOptions, ownerId? : string, exclusiveTo? : string, subscriptions? : any[]) : AbstractActor;

    createVideo(videoId : string, uri : string, type? : string) : string;

    modifyActor(actorId : string, modification : ActorModification) : void;

    createLight(lightId : string, color : string, intensity : number, position : Position, rotation : Position, parentId? : string) : AbstractActor;

    get(url : string, requestHandler : any) : void;

    lookAt(target : string, actorId : string, lookAtMode : string, backwards? : boolean) : void;

    post(url : string, payload : any, requestHandler : any) : void;

    createZone(zoneId : string, zoneLength : number, zoneWidth : number, zoneHeight : number, position : AbstractPosition, zoneManager : AbstractZoneManager) : AbstractZone;


    dispose() : void;
    
}

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.