ObjectHelper Class
Various methods to handle 3D object manipulation.
Constructor
ObjectHelper
()
Item Index
Methods
- load static
- resolvePlaneConstraint
Methods
load
-
jsons
-
successCallback
-
errorCallback
-
[interval]
Load a collection of JSONs. Here are two methods to load JSONs.
- A simple array with urls [ "data.json", "data2.json" ]
- An url "data.json"
Parameters:
-
jsons
Array | StrignAn array of URLs or a single URL.
-
successCallback
Function(Optional) A function called when the script is ready which contains a parameters with parsed JSONs.
-
errorCallback
Function(Optional) A function called if the process fail.
-
[interval]
Number optionalThe value of check interval.
resolvePlaneConstraint
-
objectBox
-
ray_
-
flyY
-
grab
-
floorY
Given a ray, and some params about the object, determines the point pointed by the ray in the scene, only considering the projection on the floor ( not considering walls or objects that may be on the path )
Parameters:
-
objectBox
ObjectHelper.OyBBthe object, as a Bounding Box Oriented along y axis
-
ray_
BABYLON.Raythe ray which will determine the new position of the object box
-
flyY
Boolean or Numberif false, the object is not flying, else the elevation where the object is flying
-
grab
BABYLON.Vector3the vector from the center of the box to the point where it is grabbed
-
floorY
Numberelevation of the floor
Returns:
the point pointed by the ray with this resolution