Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added general purpose particle system example: campfire. #7841

Merged
merged 2 commits into from
Dec 31, 2015

Conversation

mkkellogg
Copy link
Contributor

General Purpose Particle System - There are a number of other particle system examples on the Three.js site, but the aim of this one is to be more general purpose, extendable, and to support texture animations. This campfire example includes three systems: fire, smoke, and embers. Example page is at examples/particles/general.

@WestLangley
Copy link
Collaborator

@mrdoob
Copy link
Owner

mrdoob commented Dec 25, 2015

Looks great!

Is https://github.com/mkkellogg/ParticleSystemJS the main page for it? If so we should probably link to it somewhere (either source or example).

@mkkellogg
Copy link
Contributor Author

Yes, https://github.com/mkkellogg/ParticleSystemJS is the main page, I can make a quick update to the example page with a link. The code for the particle systems is currently contained in 5 different files, should I package them up into a single file and minify them for the example or leave them as they are in the source repo?

@mrdoob
Copy link
Owner

mrdoob commented Dec 27, 2015

It depends of how you want the code to be managed. If you want to make sure there are no multiple versions of the code, then it's better to add here a minified file as a library and point to mkkellogg/ParticleSystemJS as the source.

@mkkellogg
Copy link
Contributor Author

Ok, I have updated the PR with the particle system source packaged into a single minified library file called GeneralParticleSystem.min.js.

mrdoob added a commit that referenced this pull request Dec 31, 2015
Added general purpose particle system example: campfire.
@mrdoob mrdoob merged commit e900614 into mrdoob:dev Dec 31, 2015
@mrdoob
Copy link
Owner

mrdoob commented Dec 31, 2015

Thanks!

@mrdoob
Copy link
Owner

mrdoob commented Jan 6, 2016

Now that this had become its own library, how about giving it a name? Say... flecks?

github.com/mkkellogg/flecks // github.com/mkkellogg/ParticleSystemJS
js/libs/flecks.min.js // js/GeneralParticleSystem.min.js

FLECKS.Atlas // THREE.Atlas
FLECKS.SingularVector // THREE.Particles.SingularVector
FLECKS.ParticleSystem // THREE.Particles.ParticleSystem
FLECKS.RandomModifier // THREE.Particles.RandomModifier
...

That way it's easier to use (less code to write), it has its own namespace so it can be simplified and it's also less THREE namespace pollution (and possible collision).

What do you think?

@mkkellogg
Copy link
Contributor Author

Ah, that's a good idea. "Flecks" is a good name, but I was also thinking about possibly naming it "Photons". I will give the name a little more thought and then I will make the update.

@mrdoob
Copy link
Owner

mrdoob commented Jan 7, 2016

Yay!

@mkkellogg
Copy link
Contributor Author

Ok, I have renamed the name-space to "PHOTONS" and I have included the minified version under examples/js/libs. The new PR is ready to go: #7927

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants