Sto provando a utilizzare il sistema particellare di iOS 5 (CAEmitterLayer e CAEmitterCell) per disegnare particelle attorno a un cerchio (o anche meglio, un CGPath), ma non so come farlo. Il meglio che potrei fare è creare un arco (modificando la proprietà yAcceleration di CAEmitterCell), ma non posso fare una cerchia completa. Certo, potrei fare più archi per simulare un cerchio, ma i "nodi" sono molto visibili. Inoltre, non voglio usare maschere, perché sembrerebbe che le particelle ai bordi siano ritagliate. Qualche idea su come farlo?utilizzare CAEmitterLayer per disegnare particelle attorno a un cerchio o a CGPath
5
A
risposta
3
È possibile utilizzare un CAKeyframeAnimation per animare l'emitterPosition:
CAKeyframeAnimation *particleAnimation = [CAKeyframeAnimation animationWithKeyPath:@"emitterPosition"];
[particleAnimation setPath:yourPath];
[particleAnimation setDuration:1.0];
[particleAnimation setCalculationMode:kCAAnimationPaced];
[yourEmitterLayer addAnimation:particleAnimation forKey:@"yourAnimation"];
+0
Ciao, come si usa con CAEmitterCell? – Jules
0
Si desidera utilizzare particleEmitter.emitterShape = kCAEmitterLayerCircle
0
yourEmitter.emitterShape = kCAEmitterLayerCircle;
yourEmitter.emitterMode = kCAEmitterLayerOutline;
Problemi correlati
- 1. Spostare un'ombra attorno a un cerchio
- 2. iOS: acquisizione di particelle CAEmitterLayer sullo schermo
- 3. Come creare cerchi attorno a un cerchio con css, javascript?
- 4. Disegnare un cerchio imperfetto
- 5. Come disegnare un bordo attorno a un pulsante NSTexturedSquareBezelStyle
- 6. QT disegnare un cerchio
- 7. Organizzare dinamicamente i pulsanti attorno a un cerchio
- 8. disegnare un cerchio riempito
- 9. Involucro del testo attorno a un cerchio con css
- 10. Algoritmo per disegnare un contorno o un tratto attorno a qualsiasi immagine trasparente alfa
- 11. CAEmitterLayer emette particelle indesiderate casuali su eventi touch
- 12. Come posso disegnare un cerchio in Unity3D?
- 13. Applicando CGAffineTransform a CGPath
- 14. Come disegnare il bordo attorno a un UILabel?
- 15. Come disegnare un poligono attorno a una polilinea in JavaScript?
- 16. Come disegnare un cerchio trasparente?
- 17. Cerchio di disegnare Android intorno al testo
- 18. iOS - Come disegnare un CGPath specifico con CGPoints non ordinate
- 19. disegno un cerchio di raggio R attorno ad un punto
- 20. iOS - Un modo semplice per disegnare un cerchio utilizzando CAShapeLayer
- 21. WPF - Bordo attorno a un controllo articoli
- 22. Come disegnare un cerchio pieno in Java?
- 23. Come disegnare un cerchio in iOS Swift?
- 24. Animare un cerchio di tela per disegnare sul carico
- 25. Schermata con CAEmitterLayer
- 26. Viste di layout Android ruotate e distanziate attorno a un cerchio?
- 27. Avvolgere/piegare un testo attorno a un cerchio nel grafico (R)
- 28. Come posso aggiungere un'ombra a un cerchio UIImageView o UIView?
- 29. Come disegnare un cerchio solido con cocos2d per iPhone
- 30. Non riesco a riempire il mio CGPath
qualsiasi esempio di codice? – nycynik