Createjs shadow only in the right and bottom

How to draw a shadow only on the right and bottom of an object in createjs. There is no shadow above the object or above and to the left.

the shadow contains only 4 parameters
1. shadow color 2. x 3. y 4. The effect of blur, but he did not say anything about 4 different sides.

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

the above code generates a portion of the blur on top of the top and left of the object.

+6
source share
3 answers

Your example works for me, I 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 testing these browsers using the latest version of createjs.

+2
source

Try the following:

 var box = new createjs.Shape(); box.graphics.beginFill("red").drawRect(0, 0, 100, 100); box.shadow = new createjs.Shadow("#000000", 10, 10, 0); 
+1
source

this gives a dark black color with the outline of a shadow window above the subject. I need a blurry shadow on the right and bottom, without affecting the object.

+1
source

Source: https://habr.com/ru/post/974871/


All Articles