diff options
author | Jose Antonio Marquez | 2012-03-06 11:18:30 -0800 |
---|---|---|
committer | Jose Antonio Marquez | 2012-03-06 11:18:30 -0800 |
commit | 3c4967fa93b3abc529fc404115707307ba72d5cd (patch) | |
tree | f3737db979727ee050f8b9c85ef994b0e6ddae27 /js | |
parent | bee2df0d4da72677aaa2adae669ffdd4ac210dd6 (diff) | |
parent | 84332ab81c1b445195f1d9be8bbeae0725c8e758 (diff) | |
download | ninja-3c4967fa93b3abc529fc404115707307ba72d5cd.tar.gz |
Merge branch 'refs/heads/Ninja-Internal' into FileIO
Diffstat (limited to 'js')
95 files changed, 11169 insertions, 256 deletions
diff --git a/js/controllers/elements/shapes-controller.js b/js/controllers/elements/shapes-controller.js index 749a1dd9..3423a5a7 100755 --- a/js/controllers/elements/shapes-controller.js +++ b/js/controllers/elements/shapes-controller.js | |||
@@ -8,6 +8,9 @@ var Montage = require("montage/core/core").Montage, | |||
8 | CanvasController = require("js/controllers/elements/canvas-controller").CanvasController, | 8 | CanvasController = require("js/controllers/elements/canvas-controller").CanvasController, |
9 | njModule = require("js/lib/NJUtils"); | 9 | njModule = require("js/lib/NJUtils"); |
10 | 10 | ||
11 | var World = require("js/lib/drawing/world").World; | ||
12 | var MaterialsModel = require("js/models/materials-model").MaterialsModel; | ||
13 | |||
11 | exports.ShapesController = Montage.create(CanvasController, { | 14 | exports.ShapesController = Montage.create(CanvasController, { |
12 | 15 | ||
13 | setProperty: { | 16 | setProperty: { |
@@ -78,7 +81,7 @@ exports.ShapesController = Montage.create(CanvasController, { | |||
78 | this.application.ninja.selectionController.selectElement(el); | 81 | this.application.ninja.selectionController.selectElement(el); |
79 | return; | 82 | return; |
80 | case "strokeMaterial": | 83 | case "strokeMaterial": |
81 | var sm = Object.create(MaterialsLibrary.getMaterial(value)); | 84 | var sm = Object.create(MaterialsModel.getMaterial(value)); |
82 | if(sm) | 85 | if(sm) |
83 | { | 86 | { |
84 | el.elementModel.shapeModel.GLGeomObj.setStrokeMaterial(sm); | 87 | el.elementModel.shapeModel.GLGeomObj.setStrokeMaterial(sm); |
@@ -88,7 +91,7 @@ exports.ShapesController = Montage.create(CanvasController, { | |||
88 | } | 91 | } |
89 | break; | 92 | break; |
90 | case "fillMaterial": | 93 | case "fillMaterial": |
91 | var fm = Object.create(MaterialsLibrary.getMaterial(value)); | 94 | var fm = Object.create(MaterialsModel.getMaterial(value)); |
92 | if(fm) | 95 | if(fm) |
93 | { | 96 | { |
94 | el.elementModel.shapeModel.GLGeomObj.setFillMaterial(fm); | 97 | el.elementModel.shapeModel.GLGeomObj.setFillMaterial(fm); |
@@ -317,7 +320,7 @@ exports.ShapesController = Montage.create(CanvasController, { | |||
317 | optionItem.innerText = "Default"; | 320 | optionItem.innerText = "Default"; |
318 | cb.appendChild(optionItem); | 321 | cb.appendChild(optionItem); |
319 | 322 | ||
320 | var materials = MaterialsLibrary.materials; | 323 | var materials = this.application.ninja.appModel.materials; |
321 | var len = materials.length; | 324 | var len = materials.length; |
322 | 325 | ||
323 | var i; | 326 | var i; |
@@ -366,19 +369,19 @@ exports.ShapesController = Montage.create(CanvasController, { | |||