aboutsummaryrefslogtreecommitdiff
path: root/js/models
diff options
context:
space:
mode:
Diffstat (limited to 'js/models')
-rwxr-xr-xjs/models/color-model.js4
-rwxr-xr-xjs/models/materials-model.js14
2 files changed, 9 insertions, 9 deletions
diff --git a/js/models/color-model.js b/js/models/color-model.js
index a8ceb981..1fb2ba9c 100755
--- a/js/models/color-model.js
+++ b/js/models/color-model.js
@@ -154,7 +154,7 @@ exports.ColorModel = Montage.create(Component, {
154 this._alpha = value; 154 this._alpha = value;
155 // 155 //
156 if (this.rgb || this.hsl) { 156 if (this.rgb || this.hsl) {
157 this._dispatchChangeEvent('alpha', value); 157 this._dispatchChangeEvent('alpha', value);
158 } 158 }
159 } 159 }
160 }, 160 },
@@ -445,7 +445,7 @@ exports.ColorModel = Montage.create(Component, {
445 } 445 }
446 if (this.hex) 446 if (this.hex)
447 colorEvent.hex = this.hex; 447 colorEvent.hex = this.hex;
448 //Standard values that apply to any event 448 //Standard values that apply to any event
449 colorEvent.value = value; 449 colorEvent.value = value;
450 colorEvent.mode = mode; 450 colorEvent.mode = mode;
451 if (value && value.wasSetByCode) { 451 if (value && value.wasSetByCode) {
diff --git a/js/models/materials-model.js b/js/models/materials-model.js
index 1fd52721..b8500234 100755
--- a/js/models/materials-model.js
+++ b/js/models/materials-model.js
@@ -110,7 +110,7 @@ exports.MaterialsModel = Montage.create(Component, {
110 return this._materials; 110 return this._materials;
111 } 111 }
112 }, 112 },
113 113
114 addMaterial: { 114 addMaterial: {
115 value: function (material) { 115 value: function (material) {
116 this._materials.push(material); 116 this._materials.push(material);
@@ -152,8 +152,8 @@ exports.MaterialsModel = Montage.create(Component, {
152 } 152 }
153 } 153 }
154 }, 154 },
155 155
156 getMaterialByShader: 156 getMaterialByShader:
157 { 157 {
158 value: function( shaderName ) 158 value: function( shaderName )
159 { 159 {
@@ -161,7 +161,7 @@ exports.MaterialsModel = Montage.create(Component, {
161 if (index >= 0) 161 if (index >= 0)
162 return this._materials[index]; 162 return this._materials[index];
163 } 163 }
164 }, 164 },
165 165
166 getIndexOfMaterialByShader: { 166 getIndexOfMaterialByShader: {
167 value: function (shaderName) { 167 value: function (shaderName) {
@@ -220,13 +220,13 @@ exports.MaterialsModel = Montage.create(Component, {
220 matArray.push( matObj ); 220 matArray.push( matObj );
221 } 221 }
222 222
223 var jObj = 223 var jObj =
224 { 224 {
225 'materialLibrary': 1.0, 225 'materialLibrary': 1.0,
226 'materials': matArray 226 'materials': matArray
227 }; 227 };
228 228
229 // prepend an identifiable string to aid parsing when the 229 // prepend an identifiable string to aid parsing when the
230 // material model is loaded. 230 // material model is loaded.
231 var jStr = "materialLibrary;" + JSON.stringify( jObj ); 231 var jStr = "materialLibrary;" + JSON.stringify( jObj );
232 232
@@ -285,7 +285,7 @@ exports.MaterialsModel = Montage.create(Component, {
285 // make sure we have some materials to import before doing anything 285 // make sure we have some materials to import before doing anything
286 var matArray = jObj.materials; 286 var matArray = jObj.materials;
287 if (!matArray) return; 287 if (!matArray) return;
288 288
289 // we replace allmaterials, so remove anything 289 // we replace allmaterials, so remove anything
290 // that is currently there. 290 // that is currently there.
291 this.clearAllMaterials(); 291 this.clearAllMaterials();