aboutsummaryrefslogtreecommitdiff
path: root/js/lib
diff options
context:
space:
mode:
authorhwc4872012-06-13 10:17:07 -0700
committerhwc4872012-06-13 10:17:07 -0700
commiteea0703ca3b7f066a9d685ce09905d4860fa082d (patch)
treef0000ae8469a9e551f629c744251e6a688bbec4c /js/lib
parent1fe66f1a89ac949dee44ae881556901a8bf98bba (diff)
parent5a7774f6769a7a682e21bafe0e57007668f16153 (diff)
downloadninja-eea0703ca3b7f066a9d685ce09905d4860fa082d.tar.gz
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into Textures
Conflicts: js/io/system/ninjalibrary.json
Diffstat (limited to 'js/lib')
-rwxr-xr-xjs/lib/geom/brush-stroke.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/js/lib/geom/brush-stroke.js b/js/lib/geom/brush-stroke.js
index d9c2ab53..0e0406dd 100755
--- a/js/lib/geom/brush-stroke.js
+++ b/js/lib/geom/brush-stroke.js
@@ -719,7 +719,10 @@ BrushStroke.prototype.drawToContext = function(ctx, drawStageWorldPts, stageWorl
719 var disp = [brushStamp[t][0], brushStamp[t][1]]; 719 var disp = [brushStamp[t][0], brushStamp[t][1]];
720 var alphaVal = 1.0; 720 var alphaVal = 1.0;
721 var distFromOpaqueRegion = Math.abs(t-halfNumTraces) - opaqueRegionHalfWidth; 721 var distFromOpaqueRegion = Math.abs(t-halfNumTraces) - opaqueRegionHalfWidth;
722 if (distFromOpaqueRegion>0) { 722 if (numTraces === 1){
723 distFromOpaqueRegion = 0;
724 }
725 else if (distFromOpaqueRegion>0) {
723 var transparencyFactor = distFromOpaqueRegion/maxTransparentRegionHalfWidth; 726 var transparencyFactor = distFromOpaqueRegion/maxTransparentRegionHalfWidth;
724 alphaVal = 1.0 - transparencyFactor;//(transparencyFactor*transparencyFactor);//the square term produces nonlinearly varying alpha values 727 alphaVal = 1.0 - transparencyFactor;//(transparencyFactor*transparencyFactor);//the square term produces nonlinearly varying alpha values
725 alphaVal *= 0.5; //factor that accounts for lineWidth == 2 728 alphaVal *= 0.5; //factor that accounts for lineWidth == 2