From eae2ba6913c709b9b02093b9df0c8b5b3c30a1a8 Mon Sep 17 00:00:00 2001 From: dpen2000 Date: Tue, 15 Apr 2014 17:37:10 -0400 Subject: [PATCH] Fix #736 Invisible thangs still have shadows --- app/lib/surface/Mark.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/lib/surface/Mark.coffee b/app/lib/surface/Mark.coffee index 8a42b3272..3d01a2ee5 100644 --- a/app/lib/surface/Mark.coffee +++ b/app/lib/surface/Mark.coffee @@ -93,6 +93,7 @@ module.exports = class Mark extends CocoClass @lastHeight = @sprite.thang.height buildShadow: -> + alpha = @sprite.thang?.alpha ? 1 width = (@sprite.thang?.width ? 0) + 0.5 height = (@sprite.thang?.height ? 0) + 0.5 longest = Math.max width, height @@ -103,7 +104,7 @@ module.exports = class Mark extends CocoClass height *= Camera.PPM * @camera.y2x # TODO: doesn't work with rotation @mark = new createjs.Shape() @mark.mouseEnabled = false - @mark.graphics.beginFill "black" + @mark.graphics.beginFill "rgba(0, 0, 0, #{alpha})" if @sprite.thang.shape in ['ellipsoid', 'disc'] @mark.graphics.drawEllipse 0, 0, width, height else