diff --git a/docs/maps/api-deprecated.md b/docs/maps/api-deprecated.md index cc96e12a..ffa8af9e 100644 --- a/docs/maps/api-deprecated.md +++ b/docs/maps/api-deprecated.md @@ -3,20 +3,21 @@ The list of functions below is **deprecated**. You should not use those but. use the replacement functions. -- Method `WA.sendChatMessage` is deprecated. It has been renamed to `WA.chat.sendChatMessage`. -- Method `WA.disablePlayerControls` is deprecated. It has been renamed to `WA.controls.disablePlayerControls`. -- Method `WA.restorePlayerControls` is deprecated. It has been renamed to `WA.controls.restorePlayerControls`. +- Method `WA.sendChatMessage` is deprecated. It has been renamed to [`WA.chat.sendChatMessage`](api-chat.md#sending-a-message-in-the-chat). +- Method `WA.disablePlayerControls` is deprecated. It has been renamed to [`WA.controls.disablePlayerControls`](api-controls.md#disabling--restoring-controls). +- Method `WA.restorePlayerControls` is deprecated. It has been renamed to [`WA.controls.restorePlayerControls`](api-controls.md#disabling--restoring-controls). - Method `WA.displayBubble` is deprecated. It has been renamed to `WA.ui.displayBubble`. - Method `WA.removeBubble` is deprecated. It has been renamed to `WA.ui.removeBubble`. -- Method `WA.openTab` is deprecated. It has been renamed to `WA.nav.openTab`. -- Method `WA.loadSound` is deprecated. It has been renamed to `WA.sound.loadSound`. -- Method `WA.goToPage` is deprecated. It has been renamed to `WA.nav.goToPage`. -- Method `WA.goToRoom` is deprecated. It has been renamed to `WA.nav.goToRoom`. -- Method `WA.openCoWebSite` is deprecated. It has been renamed to `WA.nav.openCoWebSite`. -- Method `WA.closeCoWebSite` is deprecated. It has been renamed to `WA.nav.closeCoWebSite`. -- Method `WA.closeCoWebsite` is deprecated. It has been renamed to `WA.nav.closeCoWebsite`. -- Method `WA.openPopup` is deprecated. It has been renamed to `WA.ui.openPopup`. -- Method `WA.onChatMessage` is deprecated. It has been renamed to `WA.chat.onChatMessage`. -- Method `WA.onEnterZone` is deprecated. It has been renamed to `WA.room.onEnterZone`. -- Method `WA.onLeaveZone` is deprecated. It has been renamed to `WA.room.onLeaveZone`. -- Method `WA.ui.registerMenuCommand` parameter `callback` is deprecated. Use `WA.ui.registerMenuCommand(commandDescriptor: string, options: MenuOptions)`. \ No newline at end of file +- Method `WA.openTab` is deprecated. It has been renamed to [`WA.nav.openTab`](api-nav.md#opening-a-web-page-in-a-new-tab). +- Method `WA.loadSound` is deprecated. It has been renamed to [`WA.sound.loadSound`](api-sound.md#load-a-sound-from-an-url). +- Method `WA.goToPage` is deprecated. It has been renamed to [`WA.nav.goToPage`](api-nav.md#opening-a-web-page-in-the-current-tab). +- Method `WA.goToRoom` is deprecated. It has been renamed to [`WA.nav.goToRoom`](api-nav.md#going-to-a-different-map-from-the-script). +- Method `WA.openCoWebSite` is deprecated. It has been renamed to [`WA.nav.openCoWebSite`](api-nav.md#openingclosing-web-page-in-co-websites). +- Method `WA.closeCoWebSite` is deprecated. It has been remove and [replace by a function close](api-nav.md#openingclosing-web-page-in-co-websites). +- Method `WA.openPopup` is deprecated. It has been renamed to [`WA.ui.openPopup`](api-ui.md#opening-a-popup). +- Method `WA.onChatMessage` is deprecated. It has been renamed to [`WA.chat.onChatMessage`](api-chat.md#listening-to-messages-from-the-chat). +- Method `WA.onEnterZone` is deprecated. It has been renamed to [`WA.room.onEnterZone`](api-room.md#detecting-when-the-user-entersleaves-a-layer). +- Method `WA.onLeaveZone` is deprecated. It has been renamed to [`WA.room.onLeaveZone`](api-room.md#detecting-when-the-user-entersleaves-a-layer). +- Method `WA.ui.registerMenuCommand` parameter `callback` is deprecated. Use [`WA.ui.registerMenuCommand(commandDescriptor: string, options: MenuOptions)`](api-ui.md#add-custom-menu). +- Method `WA.room.onEnterZone` is deprecated. Use instead [`WA.room.onEnterLayer`](api-room.md#detecting-when-the-user-entersleaves-a-layer). +- Method `WA.room.onLeaveZone` is deprecated. Use instead [`WA.room.onLeaveLayer`](api-room.md#detecting-when-the-user-entersleaves-a-layer). \ No newline at end of file diff --git a/docs/maps/api-room.md b/docs/maps/api-room.md index d1a26d2f..72947df8 100644 --- a/docs/maps/api-room.md +++ b/docs/maps/api-room.md @@ -17,35 +17,27 @@ The name of the layers of this map are : * `bottom/build/carpet` * `wall` -### Detecting when the user enters/leaves a zone +### Detecting when the user enters/leaves a layer ``` -WA.room.onEnterZone(name: string, callback: () => void): void -WA.room.onLeaveZone(name: string, callback: () => void): void +WA.room.onEnterLayer(name: string): Subscription +WA.room.onLeaveLayer(name: string): Subscription ``` -Listens to the position of the current user. The event is triggered when the user enters or leaves a given zone. The name of the zone is stored in the map, on a dedicated layer with the `zone` property. +Listens to the position of the current user. The event is triggered when the user enters or leaves a given layer. -