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

Change particle emitter render order? #150

Open
grimdeathr opened this issue Apr 12, 2022 · 0 comments
Open

Change particle emitter render order? #150

grimdeathr opened this issue Apr 12, 2022 · 0 comments

Comments

@grimdeathr
Copy link

grimdeathr commented Apr 12, 2022

rainEmitter = new SPE.Emitter({
maxAge: {
value: 20
},
position: {
value: new THREE.Vector3(0, 20, -70),
spread: new THREE.Vector3( 50, 0, 50 )
},

  acceleration: {
          value: new THREE.Vector3(-10, -5, 0),
          spread: new THREE.Vector3( 0, 0, 20 )
      },

  velocity: {
          value: new THREE.Vector3(0, 0, 0),
          spread: new THREE.Vector3(0, 0, 0)
      },

      color: {
          value: [ new THREE.Color('white') ]
      },

      size: {
          value: 12.5
      },

  particleCount: 2000
});

particleGroup = new SPE.Group({
  texture: {
          value: new THREE.TextureLoader().load('./assets/rain.png')
      },
  // depthTest:true,
  // depthWrite:true,
  renderOrder:2,
});

RenderOrder doesnt do anything in the group, and cant see how to edit it in the emitter, and using particleGroup.mesh.renderOrder doesnt do anything either.

It seems to draw behind objects so need to bring it forward.

Is it possible to change the renderOrder of the particle emitter material?

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

No branches or pull requests

1 participant