aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/io/system/ninjalibrary.json2
-rwxr-xr-xjs/lib/geom/circle.js2
-rwxr-xr-xjs/lib/geom/rectangle.js10
3 files changed, 6 insertions, 8 deletions
diff --git a/js/io/system/ninjalibrary.json b/js/io/system/ninjalibrary.json
index 5bacb28a..0d211fb5 100644
--- a/js/io/system/ninjalibrary.json
+++ b/js/io/system/ninjalibrary.json
@@ -1,6 +1,6 @@
1{ 1{
2 "libraries": [ 2 "libraries": [
3 {"name": "Montage", "path": "/node_modules/descriptor.json", "version": "0.8.0.0"}, 3 {"name": "Montage", "path": "/node_modules/descriptor.json", "version": "0.8.0.0"},
4 {"name": "RDGE", "path": "/assets/descriptor.json", "version": "0.5.6.1"} 4 {"name": "RDGE", "path": "/assets/descriptor.json", "version": "0.5.6.2"}
5 ] 5 ]
6} \ No newline at end of file 6} \ No newline at end of file
diff --git a/js/lib/geom/circle.js b/js/lib/geom/circle.js
index 2ca4c1f5..4a369844 100755
--- a/js/lib/geom/circle.js
+++ b/js/lib/geom/circle.js
@@ -581,7 +581,7 @@ exports.Circle = Object.create(GeomObj, {
581 if (this._strokeColor) { 581 if (this._strokeColor) {
582 if(this._strokeColor.gradientMode) { 582 if(this._strokeColor.gradientMode) {
583 if(this._strokeColor.gradientMode === "radial") { 583 if(this._strokeColor.gradientMode === "radial") {
584 gradient = ctx.createRadialGradient(xCtr, yCtr, Math.min(xScale, yScale), 584 gradient = ctx.createRadialGradient(xCtr, yCtr, 0,
585 xCtr, yCtr, 0.5*Math.max(this._height, this._width)); 585 xCtr, yCtr, 0.5*Math.max(this._height, this._width));
586 } else { 586 } else {
587 gradient = ctx.createLinearGradient(0, this._height/2, this._width, this._height/2); 587 gradient = ctx.createLinearGradient(0, this._height/2, this._width, this._height/2);
diff --git a/js/lib/geom/rectangle.js b/js/lib/geom/rectangle.js
index 711245ae..b85433a0 100755
--- a/js/lib/geom/rectangle.js
+++ b/js/lib/geom/rectangle.js
@@ -507,7 +507,7 @@ exports.Rectangle = Object.create(GeomObj, {
507 } 507 }
508 }, 508 },
509 509
510 render: { 510 render: {
511 value: function() { 511 value: function() {
512 // get the world 512 // get the world
513 var world = this.getWorld(); 513 var world = this.getWorld();
@@ -538,7 +538,6 @@ exports.Rectangle = Object.create(GeomObj, {
538 if(this._fillColor.gradientMode) { 538 if(this._fillColor.gradientMode) {
539 if(this._fillColor.gradientMode === "radial") { 539 if(this._fillColor.gradientMode === "radial") {
540 var ww = w - 2*lw, hh = h - 2*lw; 540 var ww = w - 2*lw, hh = h - 2*lw;
541 //gradient = ctx.createRadialGradient(w/2, h/2, 0, w/2-this._strokeWidth, h/2, Math.max(ww, hh)/2);
542 gradient = ctx.createRadialGradient(w/2, h/2, 0, w/2, h/2, Math.max(ww, hh)/2); 541 gradient = ctx.createRadialGradient(w/2, h/2, 0, w/2, h/2, Math.max(ww, hh)/2);
543 } else { 542 } else {
544 gradient = ctx.createLinearGradient(inset, h/2, w-inset, h/2); 543 gradient = ctx.createLinearGradient(inset, h/2, w-inset, h/2);
@@ -572,11 +571,10 @@ exports.Rectangle = Object.create(GeomObj, {
572 inset = Math.ceil( 0.5*lw ) - 0.5; 571 inset = Math.ceil( 0.5*lw ) - 0.5;
573 572
574 if(this._strokeColor.gradientMode) { 573 if(this._strokeColor.gradientMode) {
575 if(this._strokeColor.gradientMode === "radial") { 574 if(this._strokeColor.gradientMode === "radial")
576 gradient = ctx.createRadialGradient(w/2, h/2, Math.min(h, w)/2-inset, w/2, h/2, Math.max(h, w)/2); 575 gradient = ctx.createRadialGradient(w/2, h/2, 0, w/2, h/2, Math.max(h, w)/2);
577 } else { 576 else
578 gradient = ctx.createLinearGradient(0, h/2, w, h/2); 577 gradient = ctx.createLinearGradient(0, h/2, w, h/2);
579 }
580 colors = this._strokeColor.color; 578 colors = this._strokeColor.color;
581 579
582 len = colors.length; 580 len = colors.length;