From 46defc9bd11bf077efd672c72787a3b67da1a178 Mon Sep 17 00:00:00 2001 From: hwc487 Date: Mon, 12 Mar 2012 14:59:08 -0700 Subject: Uber material changes for IO --- .../RDGE/src/core/script/MeshManager.js | 2 +- .../RDGE/src/core/script/run_state.js | 16 +-- js/lib/geom/geom-obj.js | 6 +- js/lib/rdge/materials/flat-material.js | 6 - js/lib/rdge/materials/uber-material.js | 122 ++++++++++++++++++--- 5 files changed, 121 insertions(+), 31 deletions(-) (limited to 'js') diff --git a/js/helper-classes/RDGE/src/core/script/MeshManager.js b/js/helper-classes/RDGE/src/core/script/MeshManager.js index 43813078..7dfc79d4 100755 --- a/js/helper-classes/RDGE/src/core/script/MeshManager.js +++ b/js/helper-classes/RDGE/src/core/script/MeshManager.js @@ -69,7 +69,7 @@ MeshManager.prototype.deleteMesh = function (name) if (model) { g_Engine.ctxMan.forEach(function(context) - { + { context.renderer.deletePrimitive(model.primitive); }); diff --git a/js/helper-classes/RDGE/src/core/script/run_state.js b/js/helper-classes/RDGE/src/core/script/run_state.js index acdb6797..a5981caa 100755 --- a/js/helper-classes/RDGE/src/core/script/run_state.js +++ b/js/helper-classes/RDGE/src/core/script/run_state.js @@ -30,9 +30,9 @@ RunState.prototype.Init = function() this.userRunState.init(); } - if (this.hasUserState && this.userRunState && this.userRunState.onRunState) - this.userRunState.onRunState(); - + if (this.hasUserState && this.userRunState && this.userRunState.onRunState) + this.userRunState.onRunState(); + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -97,11 +97,11 @@ RunState.prototype.ReInit = function() if(!this.initialized) { this.Init(); - } - else - { - if (this.hasUserState && this.userRunState && this.userRunState.onRunState) - this.userRunState.onRunState(); + } + else + { + if (this.hasUserState && this.userRunState && this.userRunState.onRunState) + this.userRunState.onRunState(); } } diff --git a/js/lib/geom/geom-obj.js b/js/lib/geom/geom-obj.js index 1a197832..35ebadb9 100755 --- a/js/lib/geom/geom-obj.js +++ b/js/lib/geom/geom-obj.js @@ -285,9 +285,11 @@ var GeomObj = function GLGeomObj() { if (mat) mat.import( importStr ); - var endIndex = importStr.indexOf( "endMaterial\n" ); + // pull off the end of the material + var endMat = "endMaterial\n"; + var endIndex = importStr.indexOf( endMat ); if (endIndex < 0) break; - importStr = importStr.substr( endIndex ); + importStr = importStr.substr( endIndex + endMat.length ); } } diff --git a/js/lib/rdge/materials/flat-material.js b/js/lib/rdge/materials/flat-material.js index 97e4f646..fff0e68e 100755 --- a/js/lib/rdge/materials/flat-material.js +++ b/js/lib/rdge/materials/flat-material.js @@ -102,13 +102,7 @@ var FlatMaterial = function FlatMaterial() { try { var color = eval( "[" + pu.nextValue( "color: " ) + "]" ); - this.setProperty( "color", color); - - var endKey = "endMaterial\n"; - var index = importStr.indexOf( endKey ); - index += endKey.length; - rtnStr = importStr.substr( index ); } catch (e) { diff --git a/js/lib/rdge/materials/uber-material.js b/js/lib/rdge/materials/uber-material.js index 655d8e2a..8ec5b05c 100755 --- a/js/lib/rdge/materials/uber-material.js +++ b/js/lib/rdge/materials/uber-material.js @@ -4,6 +4,7 @@ (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. */ +var MaterialParser = require("js/lib/rdge/materials/material-parser").MaterialParser; var Material = require("js/lib/rdge/materials/material").Material; var UberMaterial = function UberMaterial() { @@ -375,19 +376,111 @@ var UberMaterial = function UberMaterial() { var endKey = "endMaterial\n"; var index = importStr.indexOf( endKey ); index += endKey.length; - importStr = importStr.substr( index ); + importStr = importStr.slice( 0, index ); var pu = new MaterialParser( importStr ); var matProps = pu.nextValue( "materialProps: " ); if (matProps) { - var ambientColor = Number( pu.nextValue( "ambientColor: " )); this.setProperty( "ambientColor", ambientColor ); - var diffuseColor = Number( pu.nextValue( "diffuseColor: " )); this.setProperty( "diffuseColor", diffuseColor ); - var specularColor = Number( pu.nextValue( "specularColor: " )); this.setProperty( "specularColor", specularColor ); - var specularPower = Number( pu.nextValue( "specularPower: " )); this.setProperty( "specularPower", specularPower ); + var ambientColor = eval( "[" + pu.nextValue("ambientColor: ") + ']' ); this.setProperty( "ambientColor", ambientColor ); + var diffuseColor = eval( "[" + pu.nextValue( "diffuseColor: ") + ']' ); this.setProperty( "diffuseColor", diffuseColor ); + var specularColor = eval( "[" + pu.nextValue( "specularColor: ") + ']' ); this.setProperty( "specularColor", specularColor ); + var specularPower = eval( "[" + pu.nextValue( "specularPower: ") + ']' ); this.setProperty( "specularPower", specularPower ); } - var lightProps = pu.nextValue( "theLights" ); + var lightProps = pu.nextValue( "lightProps: " ); + if (lightProps) + { + this._lights = []; + var lightStr; + for (var i=0; i 0) + { + this._ubershaderCaps.lighting = + { + 'light0' : this._lights[0], + 'light1' : this._lights[1], + 'light2' : this._lights[2], + 'light3' : this._lights[3] + } + } + } + + var diffuseMap = pu.nextValue( "diffuseMap: " ) + if(diffuseMap) + this.setProperty( "diffuseMap", diffuseMap ); + + var normalMap = pu.nextValue( "normalMap: " ); + if(normalMap) + this.setProperty( "normalMap", normalMap ); + + var specularMap = pu.nextValue( "specularMap: " ); + if(specularMap) + this.setProperty( "specularMap", specularMap ); + + var environmentMap = pu.nextValue( "environmentMap: " ); + if(environmentMap) + { + this.setProperty( "environmentMap", environmentMap ); + this.setProperty( "environmentAmount", Number( pu.nextValue( "envReflection" ) ) ); + } + + this.rebuildShader(); } this.export = function() @@ -428,20 +521,18 @@ var UberMaterial = function UberMaterial() { else if (light.type === 'spot') { exportStr += 'light' + i + 'Pos: ' + light['position'] + '\n'; - - var deg2Rad = Math.PI / 180; - exportStr += 'light' + i + 'Spot: ' + [ Math.cos( ( light['spotInnerCutoff'] || 45.0 ) * deg2Rad ), - Math.cos( ( light['spotOuterCutoff'] || 90.0 ) * deg2Rad )] + '\n'; + exportStr += 'light' + i + 'SpotInnerCutoff: ' + light['spotInnerCutoff'] + '\n'; + exportStr += 'light' + i + 'SpotOuterCutoff: ' + light['spotOuterCutoff'] + '\n'; } else // light.type === 'point' { - exportStr += 'light' + i + 'Pos: ' + (light['position'] || [ 0, 0, 0 ]) ; - exportStr += 'light' + i + 'Attenuation: ' + (light['attenuation'] || [ 1, 0, 0 ]) ; + exportStr += 'light' + i + 'Pos: ' + (light['position'] || [ 0, 0, 0 ]) + '\n'; + exportStr += 'light' + i + 'Attenuation: ' + (light['attenuation'] || [ 1, 0, 0 ]) + '\n'; } // common to all lights - exportStr += 'light' + i + 'Color: ' + light['diffuseColor'] || [ 1,1,1,1 ] + '\n'; - exportStr += 'light' + i + 'SpecularColor: ' + light['specularColor'] || [ 1, 1, 1, 1 ] + '\n'; + exportStr += 'light' + i + 'Color: ' + (light['diffuseColor'] || [ 1,1,1,1 ]) + '\n'; + exportStr += 'light' + i + 'SpecularColor: ' + (light['specularColor'] || [ 1, 1, 1, 1 ]) + '\n'; exportStr += "endlight\n"; } @@ -466,7 +557,10 @@ var UberMaterial = function UberMaterial() { exportStr += "specularMap: " + caps.specularMap.texture + "\n"; if(typeof caps.environmentMap != 'undefined') + { exportStr += "environmentMap: " + caps.environmentMap.texture + "\n"; + exportStr += "envReflection: " + caps.environmentMap.envReflection + "\n"; + } // every material needs to terminate like this exportStr += "endMaterial\n"; -- cgit v1.2.3 From 9b40878fcc82d3ec08361e30d2029de261f0f80e Mon Sep 17 00:00:00 2001 From: hwc487 Date: Tue, 13 Mar 2012 16:32:46 -0700 Subject: Fixed BumpMetal material --- js/document/html-document.js | 12 +++++-- js/helper-classes/3D/vec-utils.js | 71 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 80 insertions(+), 3 deletions(-) (limited to 'js') diff --git a/js/document/html-document.js b/js/document/html-document.js index 051490f5..f4ec3184 100755 --- a/js/document/html-document.js +++ b/js/document/html-document.js @@ -207,9 +207,17 @@ exports.HTMLDocument = Montage.create(TextDocument, { }, set: function(value) { var elt = this.documentRoot; - if (elt) { + if (elt) + { var nWorlds= value.length; - for (var i=0; i= 0) { diff --git a/js/helper-classes/3D/vec-utils.js b/js/helper-classes/3D/vec-utils.js index 3db95ab7..e6db4a8d 100755 --- a/js/helper-classes/3D/vec-utils.js +++ b/js/helper-classes/3D/vec-utils.js @@ -191,5 +191,74 @@ var VecUtils = exports.VecUtils = Object.create(Object.prototype, return vec; } - } + }, + + matI : + { + value: function(dimen) + { + var mat = []; + for (var i=0; i --- .../gradientpicker.reel/gradientpicker.js | 22 +- .../brush-properties.reel/brush-properties.html | 56 +- .../brush-properties.reel/brush-properties.js | 26 +- .../treeview/ninja-leaf.reel/ninja-leaf.css | 14 +- js/components/ui/icon-list-basic/icon.reel/icon.js | 14 +- .../ui/tree-basic/treeItem.reel/treeItem.js | 14 +- js/controllers/document-controller.js | 50 +- js/controllers/elements/element-controller.js | 32 +- js/controllers/elements/shapes-controller.js | 140 +- js/controllers/selection-controller.js | 19 +- js/controllers/styles-controller.js | 10 +- js/data/menu-data.js | 6 + js/document/html-document.js | 149 +- js/helper-classes/3D/draw-utils.js | 140 +- js/helper-classes/3D/math-utils.js | 5 +- js/helper-classes/3D/snap-manager.js | 12 +- js/helper-classes/RDGE/rdge-compiled.js | 64 +- .../RDGE/runtime/CanvasDataManager.js | 98 -- js/helper-classes/RDGE/runtime/GLRuntime.js | 159 -- js/helper-classes/RDGE/src/core/script/engine.js | 15 + js/helper-classes/RDGE/src/core/script/fx/ssao.js | 2 +- .../RDGE/src/core/script/init_state.js | 12 +- js/helper-classes/RDGE/src/core/script/jshader.js | 8 +- js/helper-classes/RDGE/src/core/script/renderer.js | 1 + .../RDGE/src/core/script/scenegraphNodes.js | 2 +- .../RDGE/src/core/script/utilities.js | 4 +- js/helper-classes/RDGE/src/tools/rdge-compiled.js | 64 +- js/helper-classes/backup-delete/GLBrushStroke.js | 174 +- js/helper-classes/backup-delete/GLCircle.js | 3 +- js/helper-classes/backup-delete/GLGeomObj.js | 46 + js/helper-classes/backup-delete/GLRectangle.js | 2 + js/helper-classes/backup-delete/GLSubpath.js | 147 +- js/helper-classes/backup-delete/GLWorld.js | 71 +- .../backup-delete/Materials/BumpMetalMaterial.js | 39 +- .../backup-delete/Materials/DeformMaterial.js | 2 +- .../backup-delete/Materials/FlatMaterial.js | 34 +- .../backup-delete/Materials/FlyMaterial.js | 2 +- .../backup-delete/Materials/JuliaMaterial.js | 2 +- .../Materials/KeleidoscopeMaterial.js | 2 +- .../Materials/LinearGradientMaterial.js | 2 +- .../backup-delete/Materials/MandelMaterial.js | 2 +- .../backup-delete/Materials/PlasmaMaterial.js | 2 +- .../backup-delete/Materials/PulseMaterial.js | 5 +- .../backup-delete/Materials/RadialBlurMaterial.js | 2 +- .../Materials/RadialGradientMaterial.js | 6 +- .../Materials/ReliefTunnelMaterial.js | 2 +- .../Materials/SquareTunnelMaterial.js | 2 +- .../backup-delete/Materials/StarMaterial.js | 2 +- .../backup-delete/Materials/TaperMaterial.js | 4 +- .../backup-delete/Materials/TunnelMaterial.js | 2 +- .../backup-delete/Materials/TwistMaterial.js | 2 +- .../backup-delete/Materials/TwistVertMaterial.js | 2 +- .../backup-delete/Materials/UberMaterial.js | 73 +- .../backup-delete/Materials/WaterMaterial.js | 4 +- .../backup-delete/Materials/ZInvertMaterial.js | 2 +- js/io/system/ninjalibrary.js | 10 +- js/io/system/ninjalibrary.json | 2 +- js/io/ui/file-picker/file-picker-controller.js | 2 +- js/io/ui/file-picker/file-picker-model.js | 6 + .../picker-navigator.reel/picker-navigator.js | 7 +- js/io/ui/save-as-dialog.reel/save-as-dialog.js | 4 +- js/lib/NJUtils.js | 34 +- js/lib/drawing/world.js | 102 +- js/lib/geom/brush-stroke.js | 329 ++-- js/lib/geom/circle.js | 103 +- js/lib/geom/geom-obj.js | 210 ++- js/lib/geom/line.js | 57 +- js/lib/geom/rectangle.js | 111 +- js/lib/geom/sub-path.js | 86 +- js/lib/rdge/materials/bump-metal-material.js | 10 +- js/lib/rdge/materials/deform-material.js | 2 +- js/lib/rdge/materials/flat-material.js | 41 +- js/lib/rdge/materials/fly-material.js | 2 +- js/lib/rdge/materials/julia-material.js | 2 +- js/lib/rdge/materials/keleidoscope-material.js | 2 +- js/lib/rdge/materials/linear-gradient-material.js | 2 +- js/lib/rdge/materials/mandel-material.js | 2 +- js/lib/rdge/materials/plasma-material.js | 37 +- js/lib/rdge/materials/pulse-material.js | 11 +- js/lib/rdge/materials/radial-blur-material.js | 9 +- js/lib/rdge/materials/radial-gradient-material.js | 7 +- js/lib/rdge/materials/relief-tunnel-material.js | 2 +- js/lib/rdge/materials/square-tunnel-material.js | 2 +- js/lib/rdge/materials/star-material.js | 2 +- js/lib/rdge/materials/taper-material.js | 8 +- js/lib/rdge/materials/tunnel-material.js | 2 +- js/lib/rdge/materials/twist-material.js | 2 +- js/lib/rdge/materials/twist-vert-material.js | 6 +- js/lib/rdge/materials/uber-material.js | 109 +- js/lib/rdge/materials/water-material.js | 2 +- js/lib/rdge/materials/z-invert-material.js | 2 +- js/mediators/element-mediator.js | 15 +- js/mediators/io-mediator.js | 93 +- js/models/color-model.js | 3 + js/panels/Color/colorbutton-manager.js | 44 - .../ColorPanelPopup.scssc | Bin 15335 -> 0 bytes .../ColorPanelPopup.scssc | Bin 17879 -> 0 bytes .../ColorPanelBase.scssc | Bin 23592 -> 0 bytes .../Color/colorchippopup.reel/colorchippopup.html | 63 - .../Color/colorchippopup.reel/colorchippopup.js | 590 ------- js/panels/Color/colorchippopup.reel/config.rb | 9 - .../colorchippopup.reel/css/colorchippopup.css | 239 --- .../colorchippopup.reel/css/colorchippopup.scss | 240 --- .../Color/colorchippopup.reel/img/icon_bitmap.png | Bin 3072 -> 0 bytes .../colorchippopup.reel/img/icon_colorwheel.png | Bin 3420 -> 0 bytes .../colorchippopup.reel/img/icon_gradient.png | Bin 2815 -> 0 bytes .../Color/colorchippopup.reel/img/icon_nofill.png | Bin 2951 -> 0 bytes js/panels/Color/colorchippopup.reel/img/knob.png | Bin 1036 -> 0 bytes js/panels/Color/colorpanel.js | 53 - .../Color/colorpanelbase.reel/colorpanelbase.html | 76 - .../Color/colorpanelbase.reel/colorpanelbase.js | 1654 -------------------- js/panels/Color/colorpanelbase.reel/config.rb | 9 - .../colorpanelbase.reel/css/colorpanelbase.css | 332 ---- .../colorpanelbase.reel/css/colorpanelbase.scss | 339 ---- .../Color/colorpanelbase.reel/img/icon_default.png | Bin 3011 -> 0 bytes .../Color/colorpanelbase.reel/img/icon_nocolor.png | Bin 3036 -> 0 bytes .../Color/colorpanelbase.reel/img/icon_swap.png | Bin 2961 -> 0 bytes js/panels/Color/colorpanelbase.reel/img/knob.png | Bin 1036 -> 0 bytes .../colorpanelpopup.reel/colorpanelpopup.html | 68 - .../Color/colorpanelpopup.reel/colorpanelpopup.js | 466 ------ js/panels/Color/colorpanelpopup.reel/config.rb | 9 - .../colorpanelpopup.reel/css/colorpanelpopup.css | 239 --- .../colorpanelpopup.reel/css/colorpanelpopup.scss | 240 --- .../Color/colorpanelpopup.reel/img/icon_bitmap.png | Bin 3072 -> 0 bytes .../colorpanelpopup.reel/img/icon_colorwheel.png | Bin 3420 -> 0 bytes .../colorpanelpopup.reel/img/icon_gradient.png | Bin 2815 -> 0 bytes .../Color/colorpanelpopup.reel/img/icon_nofill.png | Bin 2951 -> 0 bytes js/panels/Color/colorpanelpopup.reel/img/knob.png | Bin 1036 -> 0 bytes js/panels/Color/colorpopup-manager.js | 529 ------- .../Color/colortoolbar.reel/colortoolbar.html | 54 - js/panels/Color/colortoolbar.reel/colortoolbar.js | 138 -- js/panels/Color/colortoolbar.reel/config.rb | 9 - .../Color/colortoolbar.reel/css/colortoolbar.css | 45 - .../Color/colortoolbar.reel/css/colortoolbar.scss | 52 - js/panels/color/colorbutton-manager.js | 44 + .../color/colorchippopup.reel/colorchippopup.html | 63 + .../color/colorchippopup.reel/colorchippopup.js | 590 +++++++ js/panels/color/colorchippopup.reel/config.rb | 9 + .../colorchippopup.reel/css/colorchippopup.css | 239 +++ .../colorchippopup.reel/css/colorchippopup.scss | 240 +++ .../color/colorchippopup.reel/img/icon_bitmap.png | Bin 0 -> 3072 bytes .../colorchippopup.reel/img/icon_colorwheel.png | Bin 0 -> 3420 bytes .../colorchippopup.reel/img/icon_gradient.png | Bin 0 -> 2815 bytes .../color/colorchippopup.reel/img/icon_nofill.png | Bin 0 -> 2951 bytes js/panels/color/colorchippopup.reel/img/knob.png | Bin 0 -> 1036 bytes js/panels/color/colorpanel.js | 53 + .../color/colorpanelbase.reel/colorpanelbase.html | 76 + .../color/colorpanelbase.reel/colorpanelbase.js | 1654 ++++++++++++++++++++ js/panels/color/colorpanelbase.reel/config.rb | 9 + .../colorpanelbase.reel/css/colorpanelbase.css | 332 ++++ .../colorpanelbase.reel/css/colorpanelbase.scss | 339 ++++ .../color/colorpanelbase.reel/img/icon_default.png | Bin 0 -> 3011 bytes .../color/colorpanelbase.reel/img/icon_nocolor.png | Bin 0 -> 3036 bytes .../color/colorpanelbase.reel/img/icon_swap.png | Bin 0 -> 2961 bytes js/panels/color/colorpanelbase.reel/img/knob.png | Bin 0 -> 1036 bytes .../colorpanelpopup.reel/colorpanelpopup.html | 68 + .../color/colorpanelpopup.reel/colorpanelpopup.js | 466 ++++++ js/panels/color/colorpanelpopup.reel/config.rb | 9 + .../colorpanelpopup.reel/css/colorpanelpopup.css | 239 +++ .../colorpanelpopup.reel/css/colorpanelpopup.scss | 240 +++ .../color/colorpanelpopup.reel/img/icon_bitmap.png | Bin 0 -> 3072 bytes .../colorpanelpopup.reel/img/icon_colorwheel.png | Bin 0 -> 3420 bytes .../colorpanelpopup.reel/img/icon_gradient.png | Bin 0 -> 2815 bytes .../color/colorpanelpopup.reel/img/icon_nofill.png | Bin 0 -> 2951 bytes js/panels/color/colorpanelpopup.reel/img/knob.png | Bin 0 -> 1036 bytes js/panels/color/colorpopup-manager.js | 529 +++++++ .../color/colortoolbar.reel/colortoolbar.html | 54 + js/panels/color/colortoolbar.reel/colortoolbar.js | 138 ++ js/panels/color/colortoolbar.reel/config.rb | 9 + .../color/colortoolbar.reel/css/colortoolbar.css | 45 + .../color/colortoolbar.reel/css/colortoolbar.scss | 52 + js/panels/presets/content.reel/content.css | 4 +- js/panels/properties.reel/properties.js | 4 +- js/preloader/Preloader.js | 2 + js/stage/layout.js | 10 +- js/stage/stage-view.reel/stage-view.js | 5 +- js/tools/BrushTool.js | 41 +- js/tools/EyedropperTool.js | 133 +- js/tools/PenTool.js | 18 +- js/tools/SelectionTool.js | 28 +- js/tools/Translate3DToolBase.js | 1 - js/tools/TranslateObject3DTool.js | 2 +- js/tools/modifier-tool-base.js | 12 +- 183 files changed, 7917 insertions(+), 6551 deletions(-) delete mode 100644 js/helper-classes/RDGE/runtime/CanvasDataManager.js delete mode 100644 js/helper-classes/RDGE/runtime/GLRuntime.js delete mode 100755 js/panels/Color/colorbutton-manager.js delete mode 100755 js/panels/Color/colorchippopup.reel/.sass-cache/2fbca323ccf38cf180e7675ba0d8d3e07adeffea/ColorPanelPopup.scssc delete mode 100755 js/panels/Color/colorchippopup.reel/.sass-cache/6f8390f69a31f1a976968b9c18d0824d78460db2/ColorPanelPopup.scssc delete mode 100755 js/panels/Color/colorchippopup.reel/.sass-cache/de22270a8ac487505e8876f1cd16286e094a5127/ColorPanelBase.scssc delete mode 100755 js/panels/Color/colorchippopup.reel/colorchippopup.html delete mode 100755 js/panels/Color/colorchippopup.reel/colorchippopup.js delete mode 100755 js/panels/Color/colorchippopup.reel/config.rb delete mode 100755 js/panels/Color/colorchippopup.reel/css/colorchippopup.css delete mode 100755 js/panels/Color/colorchippopup.reel/css/colorchippopup.scss delete mode 100755 js/panels/Color/colorchippopup.reel/img/icon_bitmap.png delete mode 100755 js/panels/Color/colorchippopup.reel/img/icon_colorwheel.png delete mode 100755 js/panels/Color/colorchippopup.reel/img/icon_gradient.png delete mode 100755 js/panels/Color/colorchippopup.reel/img/icon_nofill.png delete mode 100755 js/panels/Color/colorchippopup.reel/img/knob.png delete mode 100755 js/panels/Color/colorpanel.js delete mode 100755 js/panels/Color/colorpanelbase.reel/colorpanelbase.html delete mode 100755 js/panels/Color/colorpanelbase.reel/colorpanelbase.js delete mode 100755 js/panels/Color/colorpanelbase.reel/config.rb delete mode 100755 js/panels/Color/colorpanelbase.reel/css/colorpanelbase.css delete mode 100755 js/panels/Color/colorpanelbase.reel/css/colorpanelbase.scss delete mode 100755 js/panels/Color/colorpanelbase.reel/img/icon_default.png delete mode 100755 js/panels/Color/colorpanelbase.reel/img/icon_nocolor.png delete mode 100755 js/panels/Color/colorpanelbase.reel/img/icon_swap.png delete mode 100755 js/panels/Color/colorpanelbase.reel/img/knob.png delete mode 100755 js/panels/Color/colorpanelpopup.reel/colorpanelpopup.html delete mode 100755 js/panels/Color/colorpanelpopup.reel/colorpanelpopup.js delete mode 100755 js/panels/Color/colorpanelpopup.reel/config.rb delete mode 100755 js/panels/Color/colorpanelpopup.reel/css/colorpanelpopup.css delete mode 100755 js/panels/Color/colorpanelpopup.reel/css/colorpanelpopup.scss delete mode 100755 js/panels/Color/colorpanelpopup.reel/img/icon_bitmap.png delete mode 100755 js/panels/Color/colorpanelpopup.reel/img/icon_colorwheel.png delete mode 100755 js/panels/Color/colorpanelpopup.reel/img/icon_gradient.png delete mode 100755 js/panels/Color/colorpanelpopup.reel/img/icon_nofill.png delete mode 100755 js/panels/Color/colorpanelpopup.reel/img/knob.png delete mode 100755 js/panels/Color/colorpopup-manager.js delete mode 100755 js/panels/Color/colortoolbar.reel/colortoolbar.html delete mode 100755 js/panels/Color/colortoolbar.reel/colortoolbar.js delete mode 100755 js/panels/Color/colortoolbar.reel/config.rb delete mode 100755 js/panels/Color/colortoolbar.reel/css/colortoolbar.css delete mode 100755 js/panels/Color/colortoolbar.reel/css/colortoolbar.scss create mode 100755 js/panels/color/colorbutton-manager.js create mode 100755 js/panels/color/colorchippopup.reel/colorchippopup.html create mode 100755 js/panels/color/colorchippopup.reel/colorchippopup.js create mode 100755 js/panels/color/colorchippopup.reel/config.rb create mode 100755 js/panels/color/colorchippopup.reel/css/colorchippopup.css create mode 100755 js/panels/color/colorchippopup.reel/css/colorchippopup.scss create mode 100755 js/panels/color/colorchippopup.reel/img/icon_bitmap.png create mode 100755 js/panels/color/colorchippopup.reel/img/icon_colorwheel.png create mode 100755 js/panels/color/colorchippopup.reel/img/icon_gradient.png create mode 100755 js/panels/color/colorchippopup.reel/img/icon_nofill.png create mode 100755 js/panels/color/colorchippopup.reel/img/knob.png create mode 100755 js/panels/color/colorpanel.js create mode 100755 js/panels/color/colorpanelbase.reel/colorpanelbase.html create mode 100755 js/panels/color/colorpanelbase.reel/colorpanelbase.js create mode 100755 js/panels/color/colorpanelbase.reel/config.rb create mode 100755 js/panels/color/colorpanelbase.reel/css/colorpanelbase.css create mode 100755 js/panels/color/colorpanelbase.reel/css/colorpanelbase.scss create mode 100755 js/panels/color/colorpanelbase.reel/img/icon_default.png create mode 100755 js/panels/color/colorpanelbase.reel/img/icon_nocolor.png create mode 100755 js/panels/color/colorpanelbase.reel/img/icon_swap.png create mode 100755 js/panels/color/colorpanelbase.reel/img/knob.png create mode 100755 js/panels/color/colorpanelpopup.reel/colorpanelpopup.html create mode 100755 js/panels/color/colorpanelpopup.reel/colorpanelpopup.js create mode 100755 js/panels/color/colorpanelpopup.reel/config.rb create mode 100755 js/panels/color/colorpanelpopup.reel/css/colorpanelpopup.css create mode 100755 js/panels/color/colorpanelpopup.reel/css/colorpanelpopup.scss create mode 100755 js/panels/color/colorpanelpopup.reel/img/icon_bitmap.png create mode 100755 js/panels/color/colorpanelpopup.reel/img/icon_colorwheel.png create mode 100755 js/panels/color/colorpanelpopup.reel/img/icon_gradient.png create mode 100755 js/panels/color/colorpanelpopup.reel/img/icon_nofill.png create mode 100755 js/panels/color/colorpanelpopup.reel/img/knob.png create mode 100755 js/panels/color/colorpopup-manager.js create mode 100755 js/panels/color/colortoolbar.reel/colortoolbar.html create mode 100755 js/panels/color/colortoolbar.reel/colortoolbar.js create mode 100755 js/panels/color/colortoolbar.reel/config.rb create mode 100755 js/panels/color/colortoolbar.reel/css/colortoolbar.css create mode 100755 js/panels/color/colortoolbar.reel/css/colortoolbar.scss (limited to 'js') diff --git a/js/components/gradientpicker.reel/gradientpicker.js b/js/components/gradientpicker.reel/gradientpicker.js index da4e8c0f..b10f6624 100755 --- a/js/components/gradientpicker.reel/gradientpicker.js +++ b/js/components/gradientpicker.reel/gradientpicker.js @@ -213,21 +213,13 @@ exports.GradientPicker = Montage.create(Component, { removeStop: { enumerable: false, value: function(stop) { - //Removing stops - this.element._components.stopsContainer.removeChild(stop); - //Stopping events related to this current stop - this.removeStopMoving(); - //Resetting stops if less than 2 var i, buttons = this.element._components.stopsContainer.getElementsByTagName('button'); - if (buttons.length < 2) { - //Removing remaining stops prior to resetting - for (i=0; buttons[i]; i++) { - this.element._components.stopsContainer.removeChild(buttons[i].stop); - } - //Nulling then adding defaults - this.value = null; - this.addDefaultStops(); - this._dispatchEvent('change', false); + // + if (buttons.length > 2) { + //Removing stops + this.element._components.stopsContainer.removeChild(stop); + //Stopping events related to this current stop + this.removeStopMoving(); } } }, @@ -327,7 +319,7 @@ exports.GradientPicker = Montage.create(Component, { // this.application.ninja.colorController.colorPopupManager.hideColorChipPopup(); // - if ((e._event.y+this.hack.y) > this.element._trackY+50 || (e._event.y+this.hack.y) < this.element._trackY) { + if ((e._event.y+this.hack.y) > this.element._trackY+70 || (e._event.y+this.hack.y) < this.element._trackY) { this.removeStop(this.currentStop); } // diff --git a/js/components/tools-properties/brush-properties.reel/brush-properties.html b/js/components/tools-properties/brush-properties.reel/brush-properties.html index 38f7f856..608111bd 100755 --- a/js/components/tools-properties/brush-properties.reel/brush-properties.html +++ b/js/components/tools-properties/brush-properties.reel/brush-properties.html @@ -11,12 +11,55 @@