ObjectHelper
Summary
Various methods to handle 3D object manipulation.
Constructor
ObjectHelper
Syntax
ObjectHelper
()
Summary
Item Index
Methods
- load static
- resolvePlaneConstraint
Methods
load
Syntax
load
-
jsons -
successCallback -
errorCallback -
[interval]
Summary
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:
-
jsonsArray | StrignAn array of URLs or a single URL.
-
successCallbackFunction(Optional) A function called when the script is ready which contains a parameters with parsed JSONs.
-
errorCallbackFunction(Optional) A function called if the process fail.
-
[interval]Number optionalThe value of check interval.
resolvePlaneConstraint
Syntax
resolvePlaneConstraint
-
objectBox -
ray_ -
flyY -
grab -
floorY
Summary
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:
-
objectBoxObjectHelper.OyBBthe object, as a Bounding Box Oriented along y axis
-
ray_BABYLON.Raythe ray which will determine the new position of the object box
-
flyYBoolean or Numberif false, the object is not flying, else the elevation where the object is flying
-
grabBABYLON.Vector3the vector from the center of the box to the point where it is grabbed
-
floorYNumberelevation of the floor
Returns:
the point pointed by the ray with this resolution