Skip to content

Drop shadow angles use the global coordinate space, rather than the layer-local coordinate space (dotlottie) #3813

@rgprog

Description

@rgprog

ThorVG 1.0.0-pre28 seems to interpret drop shadow angles in the global coordinate space. This is only true for shadow angles, not shadow distances or shadow blur radii.

To reproduce the bug, load this Lottie file into an online viewer which uses a recent version of ThorVG, such as this viewer or this one.

{"v":"5.7.5","fr":100,"ip":0,"op":100,"w":300,"h":300,"nm":"Comp 1","ddd":0,"metadata":{},"assets":[{"id":"0","layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 1","sr":1,"ks":{"p":{"a":0,"k":[218,218],"ix":2},"a":{"a":0,"k":[0,0],"ix":2},"s":{"a":0,"k":[100,100],"ix":2},"r":{"a":0,"k":0,"ix":2},"o":{"a":0,"k":100,"ix":2},"sk":{"a":0,"k":0,"ix":2},"sa":{"a":0,"k":0,"ix":2}},"ao":0,"shapes":[{"ty":"gr","nm":"Shape Layer 1","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[100,100],"ix":2},"p":{"a":0,"k":[0,0],"ix":2},"r":{"a":0,"k":0,"ix":2}},{"ty":"fl","c":{"a":0,"k":[0.40784313725490196,0.6313725490196078,0.8666666666666667],"ix":2},"o":{"a":0,"k":100,"ix":2},"r":1,"bm":0},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":2},"s":{"a":0,"k":[100,100],"ix":2},"r":{"a":0,"k":0,"ix":2},"o":{"a":0,"k":100,"ix":2},"sk":{"a":0,"k":0,"ix":2},"sa":{"a":0,"k":0,"ix":2}}]}],"ip":0,"op":101,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Shape Layer 1 Overscan","sr":1,"ks":{"p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":2},"s":{"a":0,"k":[100,100],"ix":2},"r":{"a":0,"k":0,"ix":2},"o":{"a":0,"k":100,"ix":2},"sk":{"a":0,"k":0,"ix":2},"sa":{"a":0,"k":0,"ix":2}},"ao":0,"shapes":[{"ty":"rc","d":1,"s":{"a":0,"k":[436,436],"ix":2},"p":{"a":0,"k":[218,218],"ix":2},"r":{"a":0,"k":0,"ix":2}},{"ty":"fl","c":{"a":0,"k":[0,0,0],"ix":2},"o":{"a":0,"k":0,"ix":2},"r":1,"bm":0}],"ip":0,"op":101,"st":0,"bm":0}]}],"layers":[{"ddd":0,"ind":3,"ty":3,"nm":"Group Layer 1","sr":1,"ks":{"p":{"a":0,"k":[150,150],"ix":2},"a":{"a":0,"k":[0,0],"ix":2},"s":{"a":0,"k":[100,100],"ix":2},"r":{"a":0,"k":45,"ix":2},"o":{"a":0,"k":100,"ix":2},"sk":{"a":0,"k":0,"ix":2},"sa":{"a":0,"k":0,"ix":2}},"ao":0,"ip":0,"op":101,"st":0,"bm":0},{"ddd":0,"refId":"0","w":436,"h":436,"ind":4,"ty":0,"nm":"Shape Layer 1","sr":1,"ks":{"p":{"a":0,"k":[-218,-218],"ix":2},"a":{"a":0,"k":[0,0],"ix":2},"s":{"a":0,"k":[100,100],"ix":2},"r":{"a":0,"k":0,"ix":2},"o":{"a":0,"k":100,"ix":2},"sk":{"a":0,"k":0,"ix":2},"sa":{"a":0,"k":0,"ix":2}},"ao":0,"ip":0,"op":101,"st":0,"bm":0,"parent":3,"ef":[{"ty":25,"nm":"Drop Shadow","mn":"ADBE Drop Shadow","ef":[{"ty":2,"nm":"Shadow Color","mn":"ADBE Drop Shadow-0001","v":{"a":0,"k":[0,0,0],"ix":2}},{"ty":0,"nm":"Opacity","mn":"ADBE Drop Shadow-0002","v":{"a":0,"k":127.5,"ix":2}},{"ty":1,"nm":"Direction","mn":"ADBE Drop Shadow-0003","v":{"a":0,"k":135,"ix":2}},{"ty":0,"nm":"Distance","mn":"ADBE Drop Shadow-0004","v":{"a":0,"k":141.42,"ix":2}},{"ty":0,"nm":"Softness","mn":"ADBE Drop Shadow-0005","v":{"a":0,"k":40,"ix":2}}],"np":5,"ix":0,"en":1}]}],"markers":[]}

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinglottieLottie animation

Type

No type

Projects

Status

Done 1.0

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions