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

Remove autoclear = false #255

Open
samreid opened this issue May 17, 2024 · 0 comments
Open

Remove autoclear = false #255

samreid opened this issue May 17, 2024 · 0 comments

Comments

@samreid
Copy link
Member

samreid commented May 17, 2024

Discovered in phetsims/density-buoyancy-common#81 @zepumph and I saw this code in Molecule Shapes:

  render( target ) {
    // render the 3D scene first
    this.threeRenderer.render( this.threeScene, this.threeCamera, target );
    this.threeRenderer.autoClear = false;
    // then render the 2D overlay on top, without clearing the Canvas in-between
    this.threeRenderer.render( this.overlayScene, this.overlayCamera, target );
    this.threeRenderer.autoClear = true;
  }

Can we leave autoclear on? It seems autoclear is only supposed to be used when rendering multiple render calls over one another. Also leaving the autoclear on solved bugs in phetsims/density-buoyancy-common#81

It seemed in density-buoyancy-common that the autoclear was disabled in order to let the background show through, but that can be accomplished with Color.TRANSPARENT background + clear and no rendering artifacts.

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