在游戏中制作类似 Photoshop 的阴影
我正在制作一款游戏,游戏的大小各不相同,所以我想制作自己的阴影。我使用的 api 可以填充矩形、制作椭圆、水平线等。并且支持 rgba。鉴于此,我怎样才能制作阴影?我尝试制作一个黑到白的渐变并将 alpha 设置为 20%,但它看起来不太好......我不确定它们是如何完成的。谢谢
I'm making a game where the game's size varies, so I want to make my own shadows. The api i'm using can fill rectangles, make ellipses, horizontal lines etc. And supports rgba. Given this, how could I make a drop shadow? I tried making a black to white gradient and setting the alpha to 20%, but it didnt look very good... I'm not sure how they are done. Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议:
I would suggest: