import { Component } from "@angular/core";
import { BlinnMotionComponent } from "@blinn-motion/angular";
import type { MotionDoc } from "@blinn-motion/core";
import doc from "./card.motion.json";
@Component({
selector: "app-hero",
standalone: true,
imports: [BlinnMotionComponent],
template: `
<blinn-motion
#motion
[doc]="doc"
renderer="dom"
[loop]="true"
[autoplay]="true"
(frame)="onFrame($event)"
></blinn-motion>
<button type="button" (click)="motion.toggle()">Play / pause</button>
`,
})
export class HeroComponent {
doc = doc as MotionDoc;
onFrame(e: { time: number; fraction: number }) {
/* scrubber / meter */
}
}