-
SceneMap.getPortionName
(x, y, z)string
static
-
Get the portion file name
Name |
Type |
Description |
x |
number
|
The global x portion |
y |
number
|
The global y portion |
z |
number
|
The global z portion |
Returns:
-
SceneMap.getGlobalPortion
(position)Array.<number>
static
-
Get the global portion of a json position
Name |
Type |
Description |
position |
Array.<number>
|
The json position |
Returns:
Type |
Description |
Array.<number>
|
|
-
-
Load async stuff
-
readMapProperties
()
async
-
Read the map properties file
-
initializeObjects
()
async
-
Initialize the map objects
-
initializePortionsObjects
()
-
Initialize all the objects moved or / and with changed states
-
-
Load all the textures of the map
-
-
Load the collisions settings
-
initializePortions
()
async
-
Initialize the map portions
-
loadPortions
(noNewPortion)
async
-
Get the portion file name
Name |
Type |
Description |
noNewPortion |
boolean
|
Indicate if the map portions array needs
to be initialized |
-
loadPortion
(realX, realY, realZ, x, y, z, move)
async
-
Load a portion
Name |
Type |
Description |
realX |
number
|
The global x portion |
realY |
number
|
The global y portion |
realZ |
number
|
The global z portion |
x |
number
|
The local x portion |
y |
number
|
The local y portion |
z |
number
|
The local z portion |
move |
boolean
|
Indicate if the portion was moved or completely
loaded |
-
loadPortionFromPortion
(portion, x, y, z, move)
async
-
Load a portion from a portion
Name |
Type |
Description |
portion |
Array.<number>
|
The portion |
x |
number
|
The local x portion |
y |
number
|
The local y portion |
z |
number
|
The local z portion |
move |
boolean
|
Indicate if the portion was moved or completely
loaded |
-
removePortion
(x, y, z, move)
-
Remove a portion
Name |
Type |
Description |
x |
number
|
The local x portion |
y |
number
|
The local y portion |
z |
number
|
The local z portion |
move |
boolean
|
Indicate if the portion was moved or completely
loaded |
-
setPortion
(i, j, k, m, n, o)
-
Set a portion
Name |
Type |
Description |
i |
number
|
The previous x portion |
j |
number
|
The previous y portion |
k |
number
|
The previous z portion |
m |
number
|
The new x portion |
n |
number
|
The new y portion |
o |
number
|
The new z portion |
-
setMapPortion
(x, y, z, mapPortion, move)
-
Set a portion
Name |
Type |
Description |
x |
number
|
The local x portion |
y |
number
|
The local y portion |
z |
number
|
The local z portion |
mapPortion |
MapPortion
|
The new map portion |
move |
boolean
|
Indicate if the portion was moved or completely
loaded |
-
getObjectsAtPortion
(i, j, k)Array.<Object>
-
Get the objects at a specific portion
Name |
Type |
Description |
i |
number
|
The global x portion |
j |
number
|
The global y portion |
k |
number
|
The global z portion |
Returns:
Type |
Description |
Array.<Object>
|
|
-
-
Get a map portion at local postions
Name |
Type |
Description |
x |
number
|
The local x portion |
y |
number
|
The local y portion |
z |
number
|
The local z portion |
Returns:
-
-
Get a map portion at local portion
Name |
Type |
Description |
portion |
Array.<number>
|
The local portion |
Returns:
-
-
Get a map portion at json position
Name |
Type |
Description |
position |
Array.<number>
|
The json position |
Returns:
-
-
Get map portion according to portion index
Name |
Type |
Description |
index |
number
|
The portion index |
Returns:
-
getPortionIndex
(x, y, z)number
-
Get portion index according to local position
Name |
Type |
Description |
x |
number
|
The local x portion |
y |
number
|
The local y portion |
z |
number
|
The local z portion |
Returns:
-
getLocalPortion
(portion)Array.<number>
-
Set a local portion with a global portion
Name |
Type |
Description |
portion |
Array.<number>
|
The global portion |
Returns:
Type |
Description |
Array.<number>
|
|
-
getMapPortionLimit
()number
-
Get the map portion limit
Returns:
-
getMapPortionSize
()number
-
Get the map portions size
Returns:
-
getMapPortionTotalSize
()number
-
Get the map portion total size
Returns:
-
isInPortion
(portion)boolean
-
Check if a local portion if in the limit
Name |
Type |
Description |
portion |
number
|
The local portion |
Returns:
-
isInMap
(position)boolean
-
Check if a json position is in the map
Name |
Type |
Description |
position |
Array.<number>
|
The json position |
Returns:
-
getHeroPosition
()THREE.Vector3
-
Get the hero position according to battle map
Returns:
Type |
Description |
THREE.Vector3
|
|
-
-
Update the background color
-
loadSpecialsCollision
(list, kind, specials)
-
Load collision for special elements
-
-
Update moving portions
-
updateMovingPortionsEastWest
()
-
Update moving portions for east and west
-
updateMovingPortionsNorthSouth
()
-
Update moving portions for north and south
-
updateMovingPortionsUpDown
()
-
Update moving portions for up and down
-
-
Update portions according to a callback
-
-
Update the scene
-
-
Handle scene key pressed
Name |
Type |
Description |
key |
number
|
The key ID |
-
-
Handle scene key released
Name |
Type |
Description |
key |
number
|
The key ID |
-
-
Handle scene pressed repeat key
Name |
Type |
Description |
key |
number
|
The key ID |
Returns:
-
-
Handle scene pressed and repeat key
Name |
Type |
Description |
key |
number
|
The key ID |
Returns:
-
-
Draw the 3D scene
-
-
Close the map
-
-
Update all the reactions interpreters
-
-
Update all the parallel commands
-
addReaction
(sender, reaction, object, state, parameters, event, moving)
inherited
overrides
-
Add a reaction in the interpreter list
Name |
Type |
Description |
sender |
MapObject
|
The sender of this reaction |
reaction |
SystemReaction
|
The reaction to add |
object |
MapObject
|
The object reacting |
state |
number
|
The state ID |
parameters |
Array.<SystemParameter>
|
All the parameters coming with
this reaction |
event |
Array.<number>
|
The time events values |
moving |
boolean
|
Indicate if command is a moving one |
-
-
Draw the HUD scene