Merge constructor._name with _type and use CamelCase for Item types.

This commit is contained in:
Jürg Lehni 2013-03-01 17:13:22 -08:00
parent 293294a55a
commit 3f5d0a6925
19 changed files with 29 additions and 44 deletions

View file

@ -50,12 +50,10 @@ var context = vm.createContext({
// Load Paper.js library files:
context.include('paper.js');
// Export all classes through PaperScope:
context.Base.each(context, function(val, key) {
if (val && val.prototype instanceof context.Base) {
val._name = key;
// Export all classes through PaperScope:
if (val && val.prototype instanceof context.Base)
context.PaperScope.prototype[key] = val;
}
});
context.PaperScope.prototype['Canvas'] = context.Canvas;