API Docs for: 2.7.3
Show:

ObjectHelper Class

Module: Helpers
Parent Module: Wanaplan

Various methods to handle 3D object manipulation.

Constructor

ObjectHelper

()

Item Index

Methods

Methods

load

(
  • jsons
  • successCallback
  • errorCallback
  • [interval]
)
static

Provided by the Wanaplan module.

Load a collection of JSONs. Here are two methods to load JSONs.

  1. A simple array with urls [ "data.json", "data2.json" ]
  2. An url "data.json"

Parameters:

  • jsons Array | Strign

    An 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 optional

    The value of check interval.

resolvePlaneConstraint

(
  • objectBox
  • ray_
  • flyY
  • grab
  • floorY
)
BABYLON.Vector3

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.OyBB

    the object, as a Bounding Box Oriented along y axis

  • ray_ BABYLON.Ray

    the ray which will determine the new position of the object box

  • flyY Boolean or Number

    if false, the object is not flying, else the elevation where the object is flying

  • grab BABYLON.Vector3

    the vector from the center of the box to the point where it is grabbed

  • floorY Number

    elevation of the floor

Returns:

BABYLON.Vector3:

the point pointed by the ray with this resolution