Three.js particle problems
- Started
- Last post
- 10 Responses
- wwfc
Hi,
I have a problem with three.js. i have two particle system set ups that seem to be conflicting with each other.
The first scene loads up without problem, but when the second set loads the first set of particles vanish. This wouldn't be too confusing if it weren't for the the fact that the rest of the first scene is still appearing in the entire set up.
Is there an easy way to rename or call in the two sets of particles?
I've looked around but can't find a ref to this.
- chow0
https://jsfiddle.net/ please?
- wwfc0
fiddle doesn't seem to want to play!!! but you can see it here:
http://www.dno.me.uk/dance/you'll see the multi coloured cubes flash up and then vanish as the second lot load up...
but if you click "play" the music plays and the beams that are part of the first particle script flash up - which is why i am confused... the beams and cubes should be working together...
- section_0140
Post some code bro (not here, somewhere with syntax highlighting). Otherwise, we can only take shots in the dark.
Shot in the dark: Each particle cluster is named the same, thus the first is re-instantiated as the second.
Shot in the dark 2: Some sort of destructor call is being made when the second cluster is instantiated.
- wwfc0
actually...
how do i rename the particle_count element in either script?
- chow0
If you can set up a working fiddle, I'd be happy to troubleshoot it for you.
Here's a starting point: http://jsfiddle.net/theo/VsWb9/
- wwfc1
for some reason the jsfiddle won't work when i put it together... shows only parts of the whole thing... not the working version...
but maybe just the bare bones might be thing...
this one http://jsfiddle.net/wwfc/3L5z5mx…
is for the file min.'s (which drives the animated/moving particles that go from one shape to another...and this one http://jsfiddle.net/wwfc/v96L3kq…
is the one that calls and sets up the audio reactive particles...
this is the one that the particles (not the beams just particles) vanish from when min.'s loads up...i can see where both scripts create the particles that are clashing but no idea of how to remedy it :-(
is there anything glaringly obvious that i need to be addressing?
- btw... the fiddle doesn't work but in situ the code does work - apart from the first set of particles!wwfc
- chow0
Don't take this the wrong way, but it doesn't seem like you've made much effort in getting a working example on jsfiddle. I mean, Three.js isn't even linked, so of course the fiddles don't work. It looks like you've just pasted the JS from your site.
Pare down the fiddles into working a example. There's a lot of code in there. Kill the image loader, mouse event handler, anything that's not core to the problem at hand.
- wwfc0
***lol - looking at it from that point of view - it does look like i am being lazy ass - but i'm not, just seemed pointless to show a framework and no fizz... ;-) ***
no... that is exactly what i did, cut and pasted just the two sets of code that i am trying to make work together... i tried to set up the fiddles as working examples and they simply gave a result of essentially a wireframe :-/
so, as those seem to be the two sets of script that make a whole lot of funkiness happen as i thought there may be something that is causing the first particles to vanish within the second script.
i'll try stripping it down ;-)
- No worries. Post up when you've pared it down and I'll take another look.chow
- wwfc0
looking at it all... do you think it might be the fact that the first script uses "canvas renderer" and the second uses "webglrenderer" ??
i'm totally at a loss - wood for the trees kind of vibe!!!
- shoto_can0
since you opened this gap, i need a threejs webgl coder for a project, anyone available?