Giter Site home page Giter Site logo

Comments (3)

lovelle-cardoso avatar lovelle-cardoso commented on June 15, 2024 1

@jnsmalm I didn't have to change depthTest or anything else to fix my specific layering issue, but to be fair, I just started the process of implementing our sprite system using pixi3d yesterday, so I haven't tested pixi3d too deeply yet!


The layering issue I was encountering can be replicated like so:

  1. Spawn a large Sprite3D with a texture and rotate it to be the "floor" plane.
  2. Set the zIndex of the floor to be very low like -1000.
  3. Spawn a few billboarded Sprite3D's at various positions on top of the floor plane (like the bunnies example)

Result: Any Bunnies rendered at the top half of the screen render with their boundary box incorrectly "obscuring" the floor plane texture.


Simply redirecting the zIndex property fixed that issue for me without needing to change any other code.

from pixi3d.

jnsmalm avatar jnsmalm commented on June 15, 2024

Thanks! It's correct, it should have the zIndex property exposed.

But, for this to have any effect right now you also need to set depthTest = false on the sprite renderer (which is available on the standard pipeline, but only as a private property). So right now something like:

app.renderer.plugins.pipeline._spriteRenderer.state.depthTest = false

Just curious, did you do this as well for your zIndex fix to function correctly or did you do anything else?

from pixi3d.

lovelle-cardoso avatar lovelle-cardoso commented on June 15, 2024

@jnsmalm (Just as an overall note, I find it easier to work with typescript libraries that default to using protected backing fields in their classes instead of private ones. That way you can still keep the public-facing interface clean, but us end-users can more easily extend classes with our own functionality or implement temporary workarounds for bugged functionality while we wait for fixes/updates from the library author. Just a suggestion, of course!)

from pixi3d.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.