Graphics Reference
In-Depth Information
The platform features a Marketplace from which ready-to-use components
can be downloaded for free (and also as paid content in the future). The aim here
is to encourage a lively exchange of ideas, projects, and individual components.
Edge Animate's symbols and project templates are one such possibility. These
can be easily exported out of Edge Animate and imported into other projects.
7.4.2 Loading Edge Commons
Since Edge Commons is a JavaScript library, you can simply load it with the pre-
viously described yepnope function at runtime. You can acquire the various ver-
sions of Edge Commons on the relevant CDN servers. For specific URLs, including
instructions for integration, please visit the website: http://cdn.edgecommons.org.
You have already learned about the simplest ways to load the Edge Commons
in various examples:
yepnope({load: "http://cdn.edgecommons.org/an/1.0.0/js/
min/EdgeCommons.js")};
This statement can be used in the compositionReady event of your com-
position, for example. If you want to use other individual functions from Edge
Commons, you must first make sure that they are fully loaded. To do this, use the
complete function again:
yepnope({
load: "http://cdn.edgecommons.org/an/1.0.0/js/min/
EdgeCommons.js",
complete: function() {
// Your code
EC.centerStage( sym );
}
});
If you want to run Edge Commons on its own server or use it in an offline
project, you can also download the library as a .zip file from the CDN page and
store it in a subfolder of your project. Again, you use yepnope at runtime to link
to it or load it directly into the head segment of the HTML document.
Once Edge Commons is initially loaded, it can be used via the abbreviation EC.
The core functions are provided directly through EC: EC.centerStage(sym).
Logging is also one of the core functions, which I will introduce in the next sec-
tions. In contrast, more complex functions such as parallax and spotlight are
encapsulated in a sub-object so that the call looks as follows: EC.Parallax.
setup(sym) or EC.Spotlight.open(...).
 
Search WWH ::




Custom Search