Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions exports/main-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,4 @@ export * from '../src/common/CommonTypes.js';
// context of the main API.
export type { TextRendererMap } from '../src/core/text-rendering/renderers/TextRenderer.js';
export type { TrFontFaceMap } from '../src/core/text-rendering/font-face-types/TrFontFace.js';
export type { AnimationSettings } from '../src/core/animations/CoreAnimation.js';
4 changes: 2 additions & 2 deletions src/core/animations/CoreAnimation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { getTimingFunction } from '../utils.js';
import { mergeColorProgress } from '../../utils.js';
import { EventEmitter } from '../../common/EventEmitter.js';

export interface IAnimationSettings {
export interface AnimationSettings {
duration: number;
delay: number;
easing: string;
Expand All @@ -42,7 +42,7 @@ export class CoreAnimation extends EventEmitter {
constructor(
private node: CoreNode,
private props: Partial<INodeAnimatableProps>,
public settings: Partial<IAnimationSettings>,
public settings: Partial<AnimationSettings>,
) {
super();
this.propStartValues = {};
Expand Down
4 changes: 2 additions & 2 deletions src/main-api/INode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import type {
TextRendererMap,
TrProps,
} from '../core/text-rendering/renderers/TextRenderer.js';
import type { IAnimationSettings } from '../core/animations/CoreAnimation.js';
import type { AnimationSettings } from '../core/animations/CoreAnimation.js';

/**
* Writable properties of a Node.
Expand Down Expand Up @@ -399,7 +399,7 @@ export interface INode extends INodeWritableProps, IEventEmitter<INodeEvents> {
readonly children: INode[];
animate(
props: Partial<INodeAnimatableProps>,
settings: Partial<IAnimationSettings>,
settings: Partial<AnimationSettings>,
): IAnimationController;
destroy(): void;
flush(): void;
Expand Down
4 changes: 2 additions & 2 deletions src/render-drivers/main/MainOnlyNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import type {
ShaderRef,
TextureRef,
} from '../../main-api/RendererMain.js';
import type { IAnimationSettings } from '../../core/animations/CoreAnimation.js';
import type { AnimationSettings } from '../../core/animations/CoreAnimation.js';
import { EventEmitter } from '../../common/EventEmitter.js';
import type {
TextureFailedEventHandler,
Expand Down Expand Up @@ -422,7 +422,7 @@ export class MainOnlyNode extends EventEmitter implements INode {

animate(
props: Partial<INodeAnimatableProps>,
settings: Partial<IAnimationSettings>,
settings: Partial<AnimationSettings>,
): IAnimationController {
const animation = new CoreAnimation(this.coreNode, props, settings);
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call
Expand Down
4 changes: 2 additions & 2 deletions src/render-drivers/threadx/ThreadXMainNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { assertTruthy } from '../../utils.js';
import type { NodeStruct } from './NodeStruct.js';
import { SharedNode } from './SharedNode.js';
import { ThreadXMainAnimationController } from './ThreadXMainAnimationController.js';
import type { IAnimationSettings } from '../../core/animations/CoreAnimation.js';
import type { AnimationSettings } from '../../core/animations/CoreAnimation.js';

export class ThreadXMainNode extends SharedNode implements INode {
private nextAnimationId = 1;
Expand Down Expand Up @@ -97,7 +97,7 @@ export class ThreadXMainNode extends SharedNode implements INode {

animate(
props: Partial<INodeAnimatableProps>,
settings: Partial<IAnimationSettings>,
settings: Partial<AnimationSettings>,
): IAnimationController {
const id = this.nextAnimationId++;
this.emit('createAnimation', { id, props, settings });
Expand Down
4 changes: 2 additions & 2 deletions src/render-drivers/threadx/worker/ThreadXRendererNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { CoreAnimationController } from '../../../core/animations/CoreAnimationC
import type { Texture } from '../../../core/textures/Texture.js';
import { CoreNode } from '../../../core/CoreNode.js';
import type { ShaderRef, TextureRef } from '../../../main-api/RendererMain.js';
import type { IAnimationSettings } from '../../../core/animations/CoreAnimation.js';
import type { AnimationSettings } from '../../../core/animations/CoreAnimation.js';
import type { Dimensions } from '../../../common/CommonTypes.js';

export class ThreadXRendererNode extends SharedNode {
Expand Down Expand Up @@ -78,7 +78,7 @@ export class ThreadXRendererNode extends SharedNode {
const animation = new CoreAnimation(
this.coreNode,
props as Partial<INodeAnimatableProps>,
settings as Partial<IAnimationSettings>,
settings as Partial<AnimationSettings>,
);
animation.on('finished', () => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
Expand Down