Name | Type | Description |
---|---|---|
system |
SystemObject | The system informations |
position |
THREE.Vector3 | The current object position |
isHero |
boolean | Indicate if the object is the hero |
Properties:
Name | Type | Argument | Default | Description |
---|---|---|---|---|
MapObject.SPEED_NORMAL |
number |
<optional> |
0.004666 | Normal speed coef |
system |
SystemObject | The system infos | ||
position |
THREE.Vector3 | The current object position | ||
previousPosition |
THREE.Vector3 | The previous position before last move | ||
mesh |
THREE.Mesh | The current mesh used for this object | ||
meshBoundingBox |
Array.<THREE.Mesh> | The meshs bounding box used for collisions | ||
currentBoundingBox |
THREE.Mesh | The current bounding box mesh | ||
boundingBoxSettings |
Object | The bounding box settings | ||
frame |
Frame | The animation move frame | ||
orientationEye |
Orientation | Orientation where the character is looking at | ||
orientation |
Orientation | The orientation according to camera | ||
width |
number | The width by number of squares | ||
height |
number | The height by number of squares | ||
moving |
boolean | Indicate if the object is moving | ||
moveFrequencyTick |
number | The move frequency tick | ||
isHero |
boolean | Indicate if this obejct is the hero | ||
isStartup |
boolean | Indicate if this object is a startup | ||
isInScene |
boolean | Indicate if this object mesh is in the scene | ||
receivedOneEvent |
boolean | Indicate if this object receive one event per frame | ||
movingState |
Object | The current state (for moving command) | ||
previousOrientation |
Orientation | The previous orientation before last move | ||
otherMoveCommand |
EventCommandMoveObject | The other move command for calculating diagonal move | ||
yMountain |
number | The last y mountain pixel | ||
properties |
Array.<number> | The properties values according to ID | ||
statesInstance |
Array.<Object> | The states instances values according to ID | ||
timeEventsEllapsed |
Array.<Array.<any>> | Informations about time events | ||
states |
Array.<number> | The states IDs | ||
currentState |
SystemObjectState | The current system object state | ||
currentStateInstance |
Object | The current instance object state | ||
speed |
SystemValue | Speed coef | ||
frequency |
SystemValue | Frequency value |
Methods
-
Update the object with a particular ID
Name Type Description object
MapObject This object objectID
number The object ID searched base
Object The base module for the callback callback
function The function to call after having found the object -
Get the direct object and portion
Name Type Description object
MapObject This object objectID
number The object ID searched base
Object The base module for the callback callback
function The function to call after having found the object -
Initialize objet properties
-
Initialize time events (reactions to event time)
-
Update time events
-
Update the current state (graphics to display), also update the mesh
-
Read the JSON associated to the object
Name Type Description json
Object Json object describing the object -
Simulate moving object position
Name Type Description orientation
Orientation The orientation to move distance
number The distance angle
number The angle Returns:
Type Description THREE.Vector3 -
Check collision with another object
Name Type Description object
MapObject The other map object Returns:
Type Description boolean -
Check the collision detection
Returns:
Type Description THREE.Vector3 -
Check if two objects can be in the same floor rect (need test collision)
Name Type Description object
MapObject The other map object Returns:
Type Description boolean -
Only updates the bounding box mesh position
Name Type Description position
THREE.Vector3 Position to update -
Only updates the bounding box mesh position
Name Type Description position
THREE.Vector3 Position to update -
Move the object (one step)
Name Type Description orientation
Orientation Orientation to move limit
number Max distance to go angle
number The angle isCameraOrientation
number Indicate if this should take account of camera orientation Returns:
Type Description Array.<number> -
Teleport the object
Name Type Description position
THREE.Vector3 Position to teleport -
Remove datas move temp
-
Add to datas move temp
-
Add object mesh to scene
-
Add bounding boxes mesh to scene
-
remove object mesh from scene
-
Remove bounding boxes mesh from scene
-
Receive an event
Name Type Description sender
MapObject The sender of this event isSystem
boolean Indicate if it is an event system eventID
number The event ID parameters
Array.<SystemParameter> List of all the parameters states
Array.<number> List of all the current states of the object event
Array.<number> The time events list Returns:
Type Description boolean -
Update according to camera angle
Name Type Description angle
number The camera angle -
Update moving state
-
Update sprite faces angles
Name Type Description angle
number The camera angle -
Update the orientation according to the camera position
-
Update the UVs coordinates according to frame and orientation
-
Update the material
-
Get the state index
Returns:
Type Description number -
Check if graphics is none
Returns:
Type Description boolean