Constructor
new Portal(scene, serverFolder, callback, shadowGenerator)
Create a portal
Parameters:
Name | Type | Description |
---|---|---|
scene |
babylonjs scene | |
serverFolder |
containing world class and content | |
callback |
to execute when portal is activated (clicked, tapped) | |
shadowGenerator |
optionally, portal can cast shadows |
- Source:
Classes
Methods
dispose()
dispose of everything
- Source:
enabled(enable)
Enables or disables the portal
Parameters:
Name | Type | Description |
---|---|---|
enable |
- Source:
enter()
Executes callback on entry
- Source:
(async) loadAt(x, y, z, angle)
Load and display portal at given coordinates. Copies existing portal mesh to new coordinates and angle.
Parameters:
Name | Type | Description |
---|---|---|
x |
||
y |
||
z |
||
angle |
- Source:
worldUrl()
handy, returns base url and folder name
- Source: