开发者

CAReplicatorLayer random position

开发者 https://www.devze.com 2023-03-02 14:48 出处:网络
How do you introduce randomnes开发者_运维问答s within a CAReplicatorLayer layer? For example, randomizing the positions of each particle.

How do you introduce randomnes开发者_运维问答s within a CAReplicatorLayer layer? For example, randomizing the positions of each particle.

Best, Vance


You must setInstanceTransform:(CATransform3D)transform to each replicated layer.

Use that in conjunction with arc4rand() to randomise the positions..

0

精彩评论

暂无评论...
验证码 换一张
取 消