Global

Methods

use_namespace(namePath, nickNameopt)

use_namespace allows for a shortcut to namespaces such as depthjs or createjs. By invoking the use_namespace function you can tell which classes you want your project to use as global very simply.

Example: use_namespace('depthjs.Shape3D'); would allow you to instantiate the Shape3D class via just new Shape3D() instead of new depthjs.Shape3D();. It can also take the * wildcard. So simply calling use_namespace('depthjs.*'); means all DepthJS classes will be accessible without writing out the namespace. The same can be done for use_namespace('createjs.*');

See this article for more usage information on use_namespace
Parameters:
Name Type Attributes Description
namePath String The namespace to use, such as "depthjs.Stage3D" or "createjs.*"
nickName String <optional>
In case of conlict you can assign an alternate name to the non-namespaced global classname.
Source:
See: