0% found this document useful (0 votes)
50 views1 page

Start - WorkAdventure Documentation

The document provides an overview of the WorkAdventure APIs, including the Map Scripting API and its functionalities. It emphasizes the importance of waiting for the WorkAdventure API to initialize using the WA.onInit() method before accessing certain properties. Additionally, it includes examples of how to use the API with asynchronous programming techniques.

Uploaded by

raziq.brown
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views1 page

Start - WorkAdventure Documentation

The document provides an overview of the WorkAdventure APIs, including the Map Scripting API and its functionalities. It emphasizes the importance of waiting for the WorkAdventure API to initialize using the WA.onInit() method before accessing certain properties. Additionally, it includes examples of how to use the API with asynchronous programming techniques.

Uploaded by

raziq.brown
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Map Building Admin User Developer Tutorials Login Get Started Search ctrl K

WorkAdventure APIs Map Scripting API Api Reference Start


Waiting for WorkAdventure API to be available
Inbound API

Map Scripting API Start


Variables

Events Waiting for WorkAdventure API to be available


Api Reference
When your script / iFrame loads WorkAdventure, it takes a few milliseconds for your script / iFrame to exchange data with
Camera WorkAdventure. You should wait for the WorkAdventure API to be fully ready using the WA.onInit() method.

Chat
WA.onInit(): Promise<void>
Controls

Event
Some properties (like the current user name, or the room ID) are not available until WA.onInit has completed.
Map Editor API
Example:
Metadata

Navigation
WA.onInit().then(() => {
Player console.log('Current player name: ', WA.player.name);
});
Players

Room Or the same code, using await/async:


Sound

Start (async () => {


await WA.onInit();
State console.log('Current player name: ', WA.player.name);
})();
UI

Deprecated Functions

Extended utility functions Edit this page


Scripting Internals

Using Typescript
Previous Next
Map Storage API « Sound State »
Room API

Docs Need help ? Follow us

Map Building Book a demo Linkedin


Admin Discord Twitter
Developer GitHub Facebook

Copyright © 2024 workadventu.re - All Rights Reserved

You might also like