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:
-
node
SceneNode -
instance
PhysicsInstance | RenderInstance -
position
Vec3collision position
-
distance
Number
Item Index
Methods
request
-
request
A front-end for XMLHttpRequest so it is simpler and more cross-platform
Parameters:
-
request
Objectobject 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:
-
url
String -
params
Objectform params
-
callback(
Functionfile )
requestJSON
-
url
-
params
-
callback(
retrieve a JSON file from url (you can bind LEvents to done and fail)
Parameters:
-
url
String -
params
Objectform params
-
callback(
Functionjson )
requestScript
-
url
-
on_complete
-
on_error
-
on_progress
Request script and inserts it in the DOM
Parameters:
-
url
Stringcould be an array with urls to load in order
-
on_complete
Function -
on_error
Function -
on_progress
Function(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:
-
url
String -
params
Objectform params
-
callback(
Functiondata )