Particles are rendering behind my scene elements
I added the snow example to my scene. It looks great! Although particles are rendering behind all of my 3D objects. Any thoughts?
Thanks!
Oh I think you can take a look at this demo https://drawcall.github.io/three.proton/engine/example/spriterender-snow.html
Right, that is the example I implemented in my project. It works fine except for the particles rendering behind everything.
When I implement the following code,
var screenZone = new Proton.ScreenZone(this.camera, this.renderer, 20, "234"); emitter.addBehaviour(new Proton.CrossZone(screenZone, "dead"));
it throws this error...
three.proton.min.js:10 Uncaught TypeError: Cannot read property 'domElement' of undefined at bd._dead (three.proton.min.js:10) at bd.crossing (three.proton.min.js:10) at J.applyBehaviour (three.proton.min.js:10) at i.update (three.proton.min.js:10) at P.integrate (three.proton.min.js:10) at P.update (three.proton.min.js:10) at b.update (three.proton.min.js:10) at HolidayStage.render (HolidayStage.js:304) at HolidayStage.animate (Stage.js:254) at animateStage (index.js:316)
So I comment out those two lines and the error goes away. Can you explain what the CrossZone does? Is that what allows it to render within my 3D scene? Or something else?
Thanks again! :)
CrossZone here is to improve rendering performance, that is, the particles flying out of the scene die. You check whether the renderer is undefined
Yes, sorry about that. The renderer reference was my bad. But the particles are still rendering behind my scene.
I'm using THREE version 122. But I've tried other versions as well, so I don't believe it comes down to the version. The particles are still rendering behind all my objects. Any thoughts?
@drawcall :(