particles

use CAEmitterLayer to draw particles around a circle or a CGPath

血红的双手。 提交于 2019-12-06 03:58:08
问题 I'm trying to use iOS 5's particle system (CAEmitterLayer and CAEmitterCell) to draw particles around a circle (or even better, a CGPath), but I don't know how to do it. The best I could do is make an arc (by modifying the yAcceleration property of CAEmitterCell), but I can't do a complete circle. Of course, I could do multiple arcs to simulate a circle, but the "knots" are very visible. Also, I don't want to use masks, because it would seem like the particles at the edges are cropped. Any

Simulating a candle flame in Objective C

瘦欲@ 提交于 2019-12-05 18:48:41
As part of a current project I've been asked to display a candle onscreen. Users should be able to tilt the device to tilt the flame, and perform an action (eg. tap) to blow out the flame. I'm at a real loss on how to achieve this. Some ideas I've had: purchase a movie of a candle from a stock video site. This won't let me tilt or blow out the flame though obtain a number of frames and animate them to give the appearance of a flickering flame use some form of particle emitter I guess my preference would probably be to use the particle emitter, as I can't see the video working and getting the

uniform generation of 3D points on cylinder/cone

为君一笑 提交于 2019-12-05 08:11:29
I wish to randomly and uniformly generate points on a cylinder and a cone (separately). The cylinder is defined by its center, its radius and height. Same specifications for the cone. I am able to get the bounding box for each shape so I was thinking of generating points within the bounding box. However, I'm not sure how to project them onto the cylinder/cone or if this is the best idea. Any suggestions? Thanks. The cylinder case is trivial. If the cylinder of radius r > 0 and height h > 0 is the image of (x, y, z) = (r cos φ, r sin φ, z) on φ ∈ [0, 2π[ and z ∈ [-h/2, h/2], then simply choose

Slowing down particles of an SKEmitterNode

二次信任 提交于 2019-12-05 06:20:53
问题 I was just curious, is there a way to slowdown particle emitting along the other objects in the scene. Say you have one particle emitter, and one sprite. Sprite is moved using SKAction . An emitter is emitting. Both nodes are added to the scene. If you set self.speed to 0.5, only the sprite will slow down. Emitters will continue emitting at the same speed. Is there a way to slowdown in some other way than using particleSpeed property, because that will change the behaviour of an emitter. My

xcode iphone particles without cocos2D

送分小仙女□ 提交于 2019-12-05 04:39:51
问题 is it possible to have particles without using cocos 2D. I know particle designer but we have to use it with cocos 2D. How can I make particles without cocos 2D ?? 回答1: You can do it by spawning an image and adding it to an array, which makes it extremly easy to animate the image or do whatever with it. - (void)createImage { UIImageView *Image = [[UIImageView alloc] initWithFrame:CGRectMake(arc4random() % 320, 480, 40, 40)]; [Image setBackgroundColor:[UIColor blackColor]]; [self.view

Most performant image format for SCNParticles?

被刻印的时光 ゝ 提交于 2019-12-05 02:51:55
I've been using 24bit .png with Alpha, from Photoshop, and just tried a .psd which worked fine with OpenGL ES, but Metal didn't see the Alpha channel. What's the absolutely most performant texture format for particles within SceneKit? Here's a sheet to test on, if needs be. It looks white... right click and save as in the blank space. It's an alpha heavy set of rings. You can probably barely make them out if you squint at the screen: exaggerated example use case: https://www.dropbox.com/s/vu4dvfl0aj3f50o/circless.mov?dl=0 // Additional points for anyone can guess the difference between the

Three.js: How to animate particles along a line

不羁的心 提交于 2019-12-05 02:48:29
问题 I'm trying to animate particles along a path similar to this chrome expriement: http://armsglobe.chromeexperiments.com/ I've tried digging into the source of this project, and what I've groked so far is that they are using a built in curve method .getPoitns() to generate about 30 points on their lines. Is there a better example on what I'm trying to accomplish? Is there a method for getting points on the line than using the .lerp() method 30 times to get 30 points? Should I just use TWEEN

How do those java sand games keep track of so many particles?

若如初见. 提交于 2019-12-04 23:55:05
问题 Can anyone shed any light on how a program like that might be structured? What java classes would they employ to keep track of so many particles and then check against them for things like collision detection? Particles need to know what particles they are next to, or that they're not next to anything so they can fall etc. Here's an example, incase you're not sure what a sand game is. 回答1: Arrays, mainly. A one-dimensional array of actively moving grains, represented by two coordinates (and

Particles.js as a background?

我是研究僧i 提交于 2019-12-04 17:19:22
问题 I'm trying to use this example as a background but I can't seem to get it to work. http://vincentgarreau.com/particles.js/#nasa In order to get around this I'm forced to use a margin top of -1500px just to place my text over the top of it and it's causing major issues with responsiveness. Does anyone have any idea on how I can use it strictly as a background? The creator of the plugin has done it here on his website. http://vincentgarreau.com/en You can tell because when you inspect it, there

what is the easiest way to implement particle system without openGL nor cocos2d

别来无恙 提交于 2019-12-04 15:10:43
问题 All is in the question, I've worked enough with cocos2d to say it's a great library but today I only wanna use particle system in a total UIKit project. As long as I know, unfortunately, I have to implement one with OpenGL. Any suggestions ? 回答1: You can use Core Animation and CAReplicatorLayer to generate particle systems without having to drop down to OpenGL ES. Joe Ricioppo's "To 1e100f And Beyond with CAReplicatorLayer" gives an introduction to how to use this class. Also, Apple has their