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

Frame rate drops when wireframe manager is used for rendering Lottie #213

Open
JujieX opened this issue Jun 19, 2023 · 0 comments
Open

Frame rate drops when wireframe manager is used for rendering Lottie #213

JujieX opened this issue Jun 19, 2023 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@JujieX
Copy link
Member

JujieX commented Jun 19, 2023

  • use case
  _addEntityWireframe(entity: Entity, excludeComponent: Component = null, includeChildren = true): void {
    if (!this._visible) return;
    const wireframeManager = this._wireframeManager;

    if (includeChildren) {
      const components = new Array<SpriteRenderer>();
      entity.getComponentsIncludeChildren(SpriteRenderer, components);
      for (let i = 0, n = components.length; i < n; i++) {
        const component = <SpriteRenderer>components[i];
        if (component !== excludeComponent) {
          wireframeManager.addRendererWireframe(component);
        }
      }
    } else {
      const renderer = entity.getComponent(SpriteRenderer);
      if (renderer && renderer !== excludeComponent) {
        wireframeManager.addRendererWireframe(renderer);
      }
    }
  }
  1. frame rate drops 2.Spector shows draw triangles multiple times in one frame
@JujieX JujieX added the bug Something isn't working label Jun 19, 2023
@JujieX JujieX added this to the 1.1 milestone Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants