Closed brannondorsey closed 7 years ago
yea, the idea of a BB.BaseBBxObject() w/ .dependencies + .loadDependencies ( even the Error that checks to see if the dependency is loaded && if not maybe tries to load it assuming it's in root or js && if not throws the error? ) >> that'll help keep things consistent.
but why BBx? just for clear API's sake? i'm not opposed to it...
this is being handled via the dependency check within each module. see the module template file in the documentation for a break down on this
I put a bit more thought into the way that we are thinking about writing modules that depend on other libraries to be pre-loaded in the global context of the page (
LeapMotion
,THREE
, etc...). I had the idea that maybe we could use theBBx
namespace instead of theBB
namespace for anything that has a dependency. These modules could still live insrc
and only throw runtime errors if needed libraries dependencies aren't found but it would be a good way to let the programmer know they need to include something w/out having to look it up in the documentation.BBx
objects could also then have adependencies
property that is an array of all of the names/paths of those dependency sources as well as aloadDependencies(...)
function to be used as a utility to easily load them without having to include them as a script tag inindex.html
, etc...All
BBx
objects could then derive fromBB.BaseBBxObject()
that has those helpful methods/properties.