Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 CAReplicatorLayer 层中引入随机性?例如,随机化每个粒子的位置。
最好的,万斯
您必须setInstanceTransform:(CATransform3D)transform对每个复制层。
setInstanceTransform:(CATransform3D)transform
结合使用它arc4rand()来随机化位置..
arc4rand()