简体   繁体   English

Swift / SpriteKit:如何创建水滴效果?

[英]Swift / SpriteKit: How to create a water drop effect?

i wonder how the following effect could be made in Swift (SpriteKit). 我想知道如何在Swift(SpriteKit)中产生以下效果。

效果示例图片

I think about adding some ShapeNodes and fill them with the background image with -yscale 1. 我考虑添加一些ShapeNode并用-yscale 1填充背景图片。

But i think this effect was made somehow different, because the background image isn't just mirrored horizontally - it also has some graphics effects on it (it is mirrored in the shape the water pearl has and so on). 但是我认为这种效果有所不同,因为背景图像不仅是水平镜像的,而且还具有一些图形效果(它被镜像成水珍珠的形状等等)。

Was it done with a ShaderNode? 是用ShaderNode完成的吗?

Does someone has an idea how i could create a same effect in SpriteKit - like water pearls which looks like they are on the "camera" and they mirror the background "waterpearl like"? 是否有人知道我如何在SpriteKit中创建相同的效果-像水珍珠一样看起来像在“相机”上,并且它们反映了“水珍珠一样”的背景?

Thank you. 谢谢。

嗯,您可以创建一堆水图像,并将它们随机显示在屏幕上某个z位置处,但是我认为这种效果是在另一个程序(如unity或类似的程序)中实现的,最好的选择是创建透明的水滴作为图像并将它们随机显示在屏幕上。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM