Skip to content

BatchedMesh.copy() fails with WebGL warning #30960

@Ctrlmonster

Description

@Ctrlmonster

Description

Doing batchedMesh.copy(otherBatchMesh) results in a WebGL warning + nothing being rendered.
I saw that at least the _indirectTexture is not being copied inside copy(), but maybe something else is missing?

Reproduction steps

  1. Create and render a BatchedMesh
  2. Create a new one and call newBatch.copy(oldBatch)
  3. Hide old one and add new to the scene

Code

const b = new BachedMesh(0, 0);
b.copy(otherBatchedMesh); 
scene.add(b); // <- will cause WebGL warning

Live example

Screenshots

Image

Version

0.175.0

Device

Desktop

Browser

Chrome

OS

Linux

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions