LS.Collision Class
Contains information about the collision of a ray and the scene
- position: vec3
- node: SceneNode
- instance: could be a RenderInstance or a PhysicsInstance
- distance: number
Constructor
LS.Collision
-
node -
instance -
position -
distance
Parameters:
-
nodeSceneNode -
instancePhysicsInstance | RenderInstance -
positionVec3collision position
-
distanceNumber
Item Index
Methods
request
-
request
A front-end for XMLHttpRequest so it is simpler and more cross-platform
Parameters:
-
requestObjectobject with the fields for the request: dataType: result type {text,xml,json,binary,arraybuffer,image}, data: object with form fields, callbacks supported: {success, error, progress}
Returns:
the XMLHttpRequest of the petition
requestFile
-
url -
params -
callback(
retrieve a file from url (you can bind LEvents to done and fail)
Parameters:
-
urlString -
paramsObjectform params
-
callback(Functionfile )
requestJSON
-
url -
params -
callback(
retrieve a JSON file from url (you can bind LEvents to done and fail)
Parameters:
-
urlString -
paramsObjectform params
-
callback(Functionjson )
requestScript
-
url -
on_complete -
on_error -
on_progress
Request script and inserts it in the DOM
Parameters:
-
urlStringcould be an array with urls to load in order
-
on_completeFunction -
on_errorFunction -
on_progressFunction(if several files are required, on_progress is called after every file is added to the DOM)
requestText
-
url -
params -
callback(
retrieve a text file from url (you can bind LEvents to done and fail)
Parameters:
-
urlString -
paramsObjectform params
-
callback(Functiondata )
