Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Createjs Shadow only in right and bottom

How to draw shadow only in right and bottom side of object in createjs. there is no shadow over the object or on top and left side.

the shadow contains only 4 parameters
1. color of shadow 2. x 3. y 4. blur effect but it didn't tell anything about 4 different sides.

var box = createjs.Shape();
box.shadow = new createjs.shadow('#000',4,4,5);

the above code generates some blur portion over top and left part of object.

like image 821
ashishkumar148 Avatar asked Sep 05 '14 06:09

ashishkumar148


1 Answers

Your example is working for me, I've tested on fiddle.net using firefox and chrome.

http://jsfiddle.net/by1vf7oc/

var box = new createjs.Shape();
box.graphics.beginFill("red").drawRect(100, 100, 100, 100);
box.shadow = new createjs.Shadow('#000', 4, 4, 5);

Try to test on these browsers, using the last version of the createjs.

like image 89
renatopp Avatar answered Oct 02 '22 00:10

renatopp