This commit is contained in:
Nick Winter 2014-07-14 17:54:27 -07:00
parent d8d40ab0f6
commit 7b39bd06f3

View file

@ -66,10 +66,10 @@ module.exports = class Mark extends CocoClass
@mark = new createjs.Container()
@mark.mouseChildren = false
style = @sprite.thang.drawsBoundsStyle
@drawsBoundsIndex = @sprite.thang.drawsBoundsIndex
return if style is 'corner-text' and @sprite.thang.world.age is 0
# Confusingly make some semi-random colors that'll be consistent based on the drawsBoundsIndex
@drawsBoundsIndex = @sprite.thang.drawsBoundsIndex
colors = (128 + Math.floor(('0.'+Math.sin(3 * @drawsBoundsIndex + i).toString().substr(6)) * 128) for i in [1 ... 4])
color = "rgba(#{colors[0]}, #{colors[1]}, #{colors[2]}, 0.5)"
[w, h] = [@sprite.thang.width * Camera.PPM, @sprite.thang.height * Camera.PPM * @camera.y2x]