| 18 | const TEST_TIMESTEP = 500; |
| 19 | |
| 20 | @Component({ |
| 21 | selector: 'adev-animation-host', |
| 22 | imports: [AnimationLayerDirective], |
| 23 | providers: [AnimationCreatorService], |
| 24 | template: ` |
| 25 | <div adevAnimationLayer layerId="layer-1"> |
| 26 | <div class="circle"></div> |
| 27 | </div> |
| 28 | <div adevAnimationLayer layerId="layer-2"> |
| 29 | <div class="square"></div> |
| 30 | </div> |
| 31 | <div adevAnimationLayer layerId="layer-3"> |
| 32 | <div class="triangle"></div> |
| 33 | <div class="triangle"></div> |
| 34 | </div> |
| 35 | `, |
| 36 | }) |
| 37 | class AnimationHost implements AfterViewInit { |
| 38 | private animationCreator = inject(AnimationCreatorService); |
| 39 | layers = viewChildren(AnimationLayerDirective); |
| 40 | animation!: Animation; |
| 41 | |
| 42 | ngAfterViewInit() { |
| 43 | this.animation = this.animationCreator.createAnimation(this.layers(), { |
| 44 | timestep: TEST_TIMESTEP, |
| 45 | }); |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | // Animation definition |
| 50 | const DEFINITION: AnimationDefinition = [ |
nothing calls this directly
no test coverage detected
searching dependent graphs…