{.section-title.accent.text-primary} # API Room functions Reference ### Detecting when the user enters/leaves a zone ``` WA.room.onEnterZone(name: string, callback: () => void): void WA.room.onLeaveZone(name: string, callback: () => void): void ``` 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.