Skip to content

NgtRenderer breaks AnimationRenderer #93

Open

Description

@i3ene

There seems to be a problem with provideNgtRenderer(), as it uses a custom RendererFactory2. This conflicts with the Angulars internal AsyncAnimationRendererFactory which provides animations (e.g. for material components).
Image
I tried to look at the Angular animation provider and merge the NgtRenderer to it but this does not seem to work.

Activity

  1. i3ene commented on Sep 29, 2026

    @i3ene
    Author

    I got it monkey patched with

    const originalDestroyNode = NgtRenderer2.prototype.destroyNode;
    
    NgtRenderer2.prototype.destroyNode = function (node) {
      if (!node || !("type" in node.__ngt_renderer__) || node.__ngt_renderer__.type !== 'three') {
        this.delegateRenderer.destroyNode?.(node);
        return;
      }
      originalDestroyNode.call(this, node);
    };

    and keeping the provider order to this

    export const appConfig: ApplicationConfig = {
      providers: [
        provideAnimations(),
        provideNgtRenderer()
      ]
    };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions