API Docs for:
Show:

LS.Collision Class

Defined in: ../src/physics.js:3
Module: LS

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
)

Defined in ../src/physics.js:3

Parameters:

  • node SceneNode
  • instance PhysicsInstance | RenderInstance
  • position Vec3

    collision position

  • distance Number

Methods

request

(
  • request
)
XMLHttpRequest

Defined in ../src/network.js:8

A front-end for XMLHttpRequest so it is simpler and more cross-platform

Parameters:

  • request Object

    object 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:

XMLHttpRequest:

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 Object

    form params

  • callback( Function

    file )

requestJSON

(
  • url
  • params
  • callback(
)

retrieve a JSON file from url (you can bind LEvents to done and fail)

Parameters:

  • url String
  • params Object

    form params

  • callback( Function

    json )

requestScript

(
  • url
  • on_complete
  • on_error
  • on_progress
)

Request script and inserts it in the DOM

Parameters:

  • url String

    could 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 Object

    form params

  • callback( Function

    data )