aboutsummaryrefslogtreecommitdiff
path: root/assets/canvas-runtime.js
diff options
context:
space:
mode:
Diffstat (limited to 'assets/canvas-runtime.js')
-rw-r--r--assets/canvas-runtime.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/assets/canvas-runtime.js b/assets/canvas-runtime.js
index c2ab0bd8..feb35187 100644
--- a/assets/canvas-runtime.js
+++ b/assets/canvas-runtime.js
@@ -2264,7 +2264,10 @@ NinjaCvsRt.RuntimeBrushStroke = Object.create(NinjaCvsRt.RuntimeGeomObj, {
2264 var disp = [brushStamp[t][0], brushStamp[t][1]]; 2264 var disp = [brushStamp[t][0], brushStamp[t][1]];
2265 var alphaVal = 1.0; 2265 var alphaVal = 1.0;
2266 var distFromOpaqueRegion = Math.abs(t-halfNumTraces) - opaqueRegionHalfWidth; 2266 var distFromOpaqueRegion = Math.abs(t-halfNumTraces) - opaqueRegionHalfWidth;
2267 if (distFromOpaqueRegion>0) { 2267 if (numTraces === 1){
2268 distFromOpaqueRegion = 0;
2269 }
2270 else if (distFromOpaqueRegion>0) {
2268 var transparencyFactor = distFromOpaqueRegion/maxTransparentRegionHalfWidth; 2271 var transparencyFactor = distFromOpaqueRegion/maxTransparentRegionHalfWidth;
2269 alphaVal = 1.0 - transparencyFactor;//(transparencyFactor*transparencyFactor);//the square term produces nonlinearly varying alpha values 2272 alphaVal = 1.0 - transparencyFactor;//(transparencyFactor*transparencyFactor);//the square term produces nonlinearly varying alpha values
2270 alphaVal *= 0.5; //factor that accounts for lineWidth == 2 2273 alphaVal *= 0.5; //factor that accounts for lineWidth == 2