@lightningjs/renderer 0.3.5 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/README.md +6 -1
  2. package/dist/exports/core-api.d.ts +1 -0
  3. package/dist/exports/core-api.js +1 -0
  4. package/dist/exports/core-api.js.map +1 -1
  5. package/dist/exports/main-api.d.ts +1 -0
  6. package/dist/src/core/CoreShaderManager.d.ts +28 -1
  7. package/dist/src/core/CoreShaderManager.js +51 -1
  8. package/dist/src/core/CoreShaderManager.js.map +1 -1
  9. package/dist/src/core/animations/CoreAnimation.d.ts +3 -3
  10. package/dist/src/core/animations/CoreAnimation.js +5 -4
  11. package/dist/src/core/animations/CoreAnimation.js.map +1 -1
  12. package/dist/src/core/renderers/webgl/WebGlCoreCtxSubTexture.js +2 -2
  13. package/dist/src/core/renderers/webgl/WebGlCoreCtxSubTexture.js.map +1 -1
  14. package/dist/src/core/renderers/webgl/WebGlCoreCtxTexture.js +8 -5
  15. package/dist/src/core/renderers/webgl/WebGlCoreCtxTexture.js.map +1 -1
  16. package/dist/src/core/renderers/webgl/WebGlCoreShader.js +2 -2
  17. package/dist/src/core/renderers/webgl/WebGlCoreShader.js.map +1 -1
  18. package/dist/src/core/renderers/webgl/shaders/DynamicShader.d.ts +5 -28
  19. package/dist/src/core/renderers/webgl/shaders/DynamicShader.js +9 -9
  20. package/dist/src/core/renderers/webgl/shaders/DynamicShader.js.map +1 -1
  21. package/dist/src/core/renderers/webgl/shaders/RoundedRectangle.js +1 -8
  22. package/dist/src/core/renderers/webgl/shaders/RoundedRectangle.js.map +1 -1
  23. package/dist/src/core/renderers/webgl/shaders/effects/FadeOutEffect.d.ts +24 -0
  24. package/dist/src/core/renderers/webgl/shaders/effects/FadeOutEffect.js.map +1 -1
  25. package/dist/src/core/renderers/webgl/shaders/effects/LinearGradientEffect.d.ts +1 -1
  26. package/dist/src/core/renderers/webgl/shaders/effects/LinearGradientEffect.js +2 -9
  27. package/dist/src/core/renderers/webgl/shaders/effects/LinearGradientEffect.js.map +1 -1
  28. package/dist/src/core/renderers/webgl/shaders/effects/RadiusEffect.d.ts +15 -0
  29. package/dist/src/core/renderers/webgl/shaders/effects/RadiusEffect.js.map +1 -1
  30. package/dist/src/core/text-rendering/renderers/CanvasTextRenderer.js +3 -2
  31. package/dist/src/core/text-rendering/renderers/CanvasTextRenderer.js.map +1 -1
  32. package/dist/src/core/textures/ColorTexture.d.ts +2 -2
  33. package/dist/src/core/textures/ColorTexture.js +4 -3
  34. package/dist/src/core/textures/ColorTexture.js.map +1 -1
  35. package/dist/src/core/textures/ImageTexture.js +14 -11
  36. package/dist/src/core/textures/ImageTexture.js.map +1 -1
  37. package/dist/src/core/textures/NoiseTexture.js +3 -3
  38. package/dist/src/core/textures/NoiseTexture.js.map +1 -1
  39. package/dist/src/core/textures/SubTexture.d.ts +2 -2
  40. package/dist/src/core/textures/SubTexture.js +3 -1
  41. package/dist/src/core/textures/SubTexture.js.map +1 -1
  42. package/dist/src/core/textures/Texture.d.ts +13 -2
  43. package/dist/src/core/textures/Texture.js.map +1 -1
  44. package/dist/src/core/textures/utils.d.ts +11 -0
  45. package/dist/src/core/textures/utils.js +32 -0
  46. package/dist/src/core/textures/utils.js.map +1 -0
  47. package/dist/src/main-api/INode.d.ts +2 -2
  48. package/dist/src/main-api/RendererMain.d.ts +1 -1
  49. package/dist/src/main-api/RendererMain.js.map +1 -1
  50. package/dist/src/render-drivers/main/MainOnlyNode.d.ts +2 -2
  51. package/dist/src/render-drivers/main/MainOnlyNode.js.map +1 -1
  52. package/dist/src/render-drivers/threadx/ThreadXMainNode.d.ts +2 -2
  53. package/dist/src/render-drivers/threadx/ThreadXMainNode.js.map +1 -1
  54. package/dist/src/render-drivers/threadx/worker/ThreadXRendererNode.js.map +1 -1
  55. package/dist/tsconfig.dist.tsbuildinfo +1 -1
  56. package/exports/core-api.ts +1 -0
  57. package/exports/main-api.ts +1 -0
  58. package/package.json +2 -1
  59. package/src/core/CoreShaderManager.ts +90 -2
  60. package/src/core/animations/CoreAnimation.ts +7 -6
  61. package/src/core/renderers/webgl/WebGlCoreCtxSubTexture.ts +2 -2
  62. package/src/core/renderers/webgl/WebGlCoreCtxTexture.ts +13 -11
  63. package/src/core/renderers/webgl/WebGlCoreShader.ts +2 -2
  64. package/src/core/renderers/webgl/shaders/DynamicShader.ts +22 -22
  65. package/src/core/renderers/webgl/shaders/RoundedRectangle.ts +1 -8
  66. package/src/core/renderers/webgl/shaders/effects/FadeOutEffect.ts +24 -0
  67. package/src/core/renderers/webgl/shaders/effects/LinearGradientEffect.ts +3 -10
  68. package/src/core/renderers/webgl/shaders/effects/RadiusEffect.ts +15 -0
  69. package/src/core/text-rendering/renderers/CanvasTextRenderer.ts +4 -2
  70. package/src/core/textures/ColorTexture.ts +6 -5
  71. package/src/core/textures/ImageTexture.ts +14 -11
  72. package/src/core/textures/NoiseTexture.ts +3 -3
  73. package/src/core/textures/SubTexture.ts +5 -3
  74. package/src/core/textures/Texture.ts +13 -2
  75. package/src/main-api/INode.ts +2 -2
  76. package/src/main-api/RendererMain.ts +1 -1
  77. package/src/render-drivers/main/MainOnlyNode.ts +2 -2
  78. package/src/render-drivers/threadx/ThreadXMainNode.ts +2 -2
  79. package/src/render-drivers/threadx/worker/ThreadXRendererNode.ts +2 -2
@@ -37,6 +37,7 @@ import { BorderLeftEffect } from './effects/BorderLeftEffect.js';
37
37
  import { GlitchEffect } from './effects/GlitchEffect.js';
38
38
  import { FadeOutEffect } from './effects/FadeOutEffect.js';
39
39
  import { RadialGradientEffect } from './effects/RadialGradientEffect.js';
40
+ import type { EffectMap } from '../../../CoreShaderManager.js';
40
41
 
41
42
  /**
42
43
  * Allows the `keyof EffectMap` to be mapped over and form an discriminated
@@ -82,20 +83,6 @@ export interface DynamicShaderProps
82
83
  effects?: EffectDesc[];
83
84
  }
84
85
 
85
- export interface EffectMap {
86
- radius: typeof RadiusEffect;
87
- border: typeof BorderEffect;
88
- borderBottom: typeof BorderBottomEffect;
89
- borderLeft: typeof BorderLeftEffect;
90
- borderRight: typeof BorderRightEffect;
91
- borderTop: typeof BorderTopEffect;
92
- fadeOut: typeof FadeOutEffect;
93
- linearGradient: typeof LinearGradientEffect;
94
- radialGradient: typeof RadialGradientEffect;
95
- grayscale: typeof GrayscaleEffect;
96
- glitch: typeof GlitchEffect;
97
- }
98
-
99
86
  const Effects = {
100
87
  radius: RadiusEffect,
101
88
  border: BorderEffect,
@@ -120,8 +107,12 @@ export interface SpecificEffectDesc<
120
107
  export class DynamicShader extends WebGlCoreShader {
121
108
  effects: Array<InstanceType<EffectMap[keyof EffectMap]>> = [];
122
109
 
123
- constructor(renderer: WebGlCoreRenderer, props: DynamicShaderProps) {
124
- const shader = DynamicShader.createShader(props);
110
+ constructor(
111
+ renderer: WebGlCoreRenderer,
112
+ props: DynamicShaderProps,
113
+ effectContructors: Partial<EffectMap>,
114
+ ) {
115
+ const shader = DynamicShader.createShader(props, effectContructors);
125
116
  super({
126
117
  renderer,
127
118
  attributes: ['a_position', 'a_textureCoordinate', 'a_color'],
@@ -170,7 +161,10 @@ export class DynamicShader extends WebGlCoreShader {
170
161
  });
171
162
  }
172
163
 
173
- static createShader(props: DynamicShaderProps) {
164
+ static createShader(
165
+ props: DynamicShaderProps,
166
+ effectContructors: Partial<EffectMap>,
167
+ ) {
174
168
  //counts duplicate effects
175
169
  const effectNameCount: Record<string, number> = {};
176
170
  const methods: Record<string, string> = {};
@@ -181,7 +175,7 @@ export class DynamicShader extends WebGlCoreShader {
181
175
  const uFx: Record<string, unknown>[] = [];
182
176
 
183
177
  const effects = props.effects!.map((effect) => {
184
- const baseClass = Effects[effect.type];
178
+ const baseClass = effectContructors[effect.type]!;
185
179
  const key = baseClass.getEffectKey(effect.props || {});
186
180
 
187
181
  effectNameCount[key] = effectNameCount[key] ? ++effectNameCount[key] : 1;
@@ -208,7 +202,7 @@ export class DynamicShader extends WebGlCoreShader {
208
202
  let effectMethods = '';
209
203
 
210
204
  uFx?.forEach((fx) => {
211
- const fxClass = Effects[fx.type as keyof EffectMap];
205
+ const fxClass = effectContructors[fx.type as keyof EffectMap]!;
212
206
  const fxProps = fxClass.resolveDefaults(
213
207
  (fx.props ?? {}) as Record<string, unknown>,
214
208
  );
@@ -360,11 +354,14 @@ export class DynamicShader extends WebGlCoreShader {
360
354
 
361
355
  static override resolveDefaults(
362
356
  props: DynamicShaderProps,
357
+ effectContructors?: Partial<EffectMap>,
363
358
  ): Required<DynamicShaderProps> {
364
359
  return {
365
360
  effects: (props.effects ?? []).map((effect) => ({
366
361
  type: effect.type,
367
- props: Effects[effect.type].resolveDefaults(effect.props || {}),
362
+ props: effectContructors![effect.type]!.resolveDefaults(
363
+ effect.props || {},
364
+ ),
368
365
  })) as MapEffectDescs<keyof EffectMap>[],
369
366
  $dimensions: {
370
367
  width: 0,
@@ -374,10 +371,13 @@ export class DynamicShader extends WebGlCoreShader {
374
371
  };
375
372
  }
376
373
 
377
- static override makeCacheKey(props: DynamicShaderProps): string {
374
+ static override makeCacheKey(
375
+ props: DynamicShaderProps,
376
+ effectContructors?: Partial<EffectMap>,
377
+ ): string {
378
378
  let fx = '';
379
379
  props.effects?.forEach((effect) => {
380
- const baseClass = Effects[effect.type];
380
+ const baseClass = effectContructors![effect.type]!;
381
381
  const key = baseClass.getEffectKey(effect.props || {});
382
382
  fx += `,${key}`;
383
383
  });
@@ -45,12 +45,7 @@ export class RoundedRectangle extends WebGlCoreShader {
45
45
  constructor(renderer: WebGlCoreRenderer) {
46
46
  super({
47
47
  renderer,
48
- attributes: [
49
- 'a_position',
50
- 'a_textureCoordinate',
51
- 'a_color',
52
- 'a_textureIndex',
53
- ],
48
+ attributes: ['a_position', 'a_textureCoordinate', 'a_color'],
54
49
  uniforms: [
55
50
  { name: 'u_resolution', uniform: 'uniform2fv' },
56
51
  { name: 'u_pixelRatio', uniform: 'uniform1f' },
@@ -115,7 +110,6 @@ export class RoundedRectangle extends WebGlCoreShader {
115
110
 
116
111
  varying vec4 v_color;
117
112
  varying vec2 v_textureCoordinate;
118
- varying float v_textureIndex;
119
113
 
120
114
  void main() {
121
115
  vec2 normalized = a_position * u_pixelRatio / u_resolution;
@@ -125,7 +119,6 @@ export class RoundedRectangle extends WebGlCoreShader {
125
119
  // pass to fragment
126
120
  v_color = a_color;
127
121
  v_textureCoordinate = a_textureCoordinate;
128
- v_textureIndex = a_textureIndex;
129
122
 
130
123
  // flip y
131
124
  gl_Position = vec4(clip_space * vec2(1.0, -1.0), 0, 1);
@@ -22,7 +22,31 @@ import {
22
22
  type ShaderEffectUniforms,
23
23
  } from './ShaderEffect.js';
24
24
 
25
+ /**
26
+ * Properties of the {@link FadeOutEffect}
27
+ *
28
+ */
25
29
  export interface FadeOutEffectProps extends DefaultEffectProps {
30
+ /**
31
+ * Fade around the edges of the node
32
+ *
33
+ * @remarks
34
+ * You can input an array with a length of up to four or a number.
35
+ *
36
+ * array length 4:
37
+ * [top, right, bottom, left]
38
+ *
39
+ * array length 2:
40
+ * [20, 40] -> [20(top), 40(right), 20(bottom), 40(left)]
41
+ *
42
+ * array length 3:
43
+ * [20, 40, 60] -> [20(top), 40(right), 60(bottom), 20(left)]
44
+ *
45
+ * number:
46
+ * 30 -> [30, 30, 30, 30]
47
+ *
48
+ * @default 10
49
+ */
26
50
  fade?: number | number[];
27
51
  }
28
52
 
@@ -34,7 +34,7 @@ export interface LinearGradientEffectProps extends DefaultEffectProps {
34
34
  */
35
35
  colors?: number[];
36
36
  /**
37
- * Angle of the LinearGradientEffect
37
+ * Angle of the LinearGradientEffect, Angle in Radians
38
38
  *
39
39
  * @default 0
40
40
  */
@@ -137,11 +137,6 @@ export class LinearGradientEffect extends ShaderEffect {
137
137
  return mix(higher, lower, 1.0);
138
138
  }
139
139
  `,
140
- degToRad: `
141
- float function(float d) {
142
- return d * (PI / 180.0);
143
- }
144
- `,
145
140
  calcPoint: `
146
141
  vec2 function(float d, float angle) {
147
142
  return d * vec2(cos(angle), sin(angle)) + (u_dimensions * 0.5);
@@ -162,12 +157,10 @@ export class LinearGradientEffect extends ShaderEffect {
162
157
  static override onColorize = (props: LinearGradientEffectProps) => {
163
158
  const colors = props.colors!.length || 1;
164
159
  return `
165
- float d = angle - 90.0;
166
- float a = $degToRad(d);
160
+ float a = angle - (PI / 180.0 * 90.0);
167
161
  float lineDist = abs(u_dimensions.x * cos(a)) + abs(u_dimensions.y * sin(a));
168
-
169
162
  vec2 f = $calcPoint(lineDist * 0.5, a);
170
- vec2 t = $calcPoint(lineDist * 0.5, $degToRad(d + 180.0));
163
+ vec2 t = $calcPoint(lineDist * 0.5, a + PI);
171
164
  vec2 gradVec = t - f;
172
165
  float dist = dot(v_textureCoordinate.xy * u_dimensions - f, gradVec) / dot(gradVec, gradVec);
173
166
 
@@ -29,6 +29,21 @@ export interface RadiusEffectProps extends DefaultEffectProps {
29
29
  /**
30
30
  * Corner radius, in pixels, to cut out of the corners
31
31
  *
32
+ * @remarks
33
+ * You can input an array with a length of up to four or a number.
34
+ *
35
+ * array length 4:
36
+ * [topLeft, topRight, bottomRight, bottomLeft]
37
+ *
38
+ * array length 2:
39
+ * [20, 40] -> [20(topLeft), 40(topRight), 20(bottomRight), 40(bottomLeft)]
40
+ *
41
+ * array length 3:
42
+ * [20, 40, 60] -> [20(topLeft), 40(topRight), 60(bottomRight), 20(bottomLeft)]
43
+ *
44
+ * number:
45
+ * 30 -> [30, 30, 30, 30]
46
+ *
32
47
  * @default 10
33
48
  */
34
49
  radius?: number | number[];
@@ -42,11 +42,13 @@ import {
42
42
  type TrProps,
43
43
  } from './TextRenderer.js';
44
44
 
45
+ const resolvedGlobal = typeof self === 'undefined' ? globalThis : self;
46
+
45
47
  /**
46
48
  * Global font set regardless of if run in the main thread or a web worker
47
49
  */
48
- const globalFontSet = ((self.document as any)?.fonts ||
49
- (self as any).fonts) as FontFaceSet;
50
+ const globalFontSet = ((resolvedGlobal.document as any)?.fonts ||
51
+ (resolvedGlobal as any).fonts) as FontFaceSet;
50
52
 
51
53
  declare module './TextRenderer.js' {
52
54
  interface TextRendererMap {
@@ -18,7 +18,7 @@
18
18
  */
19
19
 
20
20
  import type { CoreTextureManager } from '../CoreTextureManager.js';
21
- import { Texture } from './Texture.js';
21
+ import { Texture, type TextureData } from './Texture.js';
22
22
 
23
23
  /**
24
24
  * Properties of the {@link ColorTexture}
@@ -60,12 +60,13 @@ export class ColorTexture extends Texture {
60
60
  this.props.color = color;
61
61
  }
62
62
 
63
- override async getTextureData(): Promise<ImageBitmap> {
63
+ override async getTextureData(): Promise<TextureData> {
64
64
  const pixelData32 = new Uint32Array([this.color]);
65
65
  const pixelData8 = new Uint8ClampedArray(pixelData32.buffer);
66
- return await createImageBitmap(new ImageData(pixelData8, 1, 1), {
67
- premultiplyAlpha: 'none',
68
- });
66
+ return {
67
+ data: new ImageData(pixelData8, 1, 1),
68
+ premultiplyAlpha: true,
69
+ };
69
70
  }
70
71
 
71
72
  static override makeCacheKey(props: ColorTextureProps): string {
@@ -73,22 +73,25 @@ export class ImageTexture extends Texture {
73
73
  override async getTextureData(): Promise<TextureData> {
74
74
  const { src, premultiplyAlpha } = this.props;
75
75
  if (!src) {
76
- return null;
76
+ return {
77
+ data: null,
78
+ };
77
79
  }
78
80
  if (src instanceof ImageData) {
79
- return await createImageBitmap(src, {
80
- premultiplyAlpha: premultiplyAlpha ? 'premultiply' : 'none',
81
- colorSpaceConversion: 'none',
82
- imageOrientation: 'none',
83
- });
81
+ return {
82
+ data: src,
83
+ premultiplyAlpha,
84
+ };
84
85
  }
85
86
  const response = await fetch(src);
86
87
  const blob = await response.blob();
87
- return await createImageBitmap(blob, {
88
- premultiplyAlpha: premultiplyAlpha ? 'premultiply' : 'none',
89
- colorSpaceConversion: 'none',
90
- imageOrientation: 'none',
91
- });
88
+ return {
89
+ data: await createImageBitmap(blob, {
90
+ premultiplyAlpha: premultiplyAlpha ? 'premultiply' : 'none',
91
+ colorSpaceConversion: 'none',
92
+ imageOrientation: 'none',
93
+ }),
94
+ };
92
95
  }
93
96
 
94
97
  static override makeCacheKey(props: ImageTextureProps): string | false {
@@ -72,9 +72,9 @@ export class NoiseTexture extends Texture {
72
72
  pixelData8[i + 2] = v;
73
73
  pixelData8[i + 3] = 255;
74
74
  }
75
- return await createImageBitmap(new ImageData(pixelData8, width, height), {
76
- premultiplyAlpha: 'none',
77
- });
75
+ return {
76
+ data: new ImageData(pixelData8, width, height),
77
+ };
78
78
  }
79
79
 
80
80
  static override makeCacheKey(props: NoiseTextureProps): string {
@@ -23,7 +23,7 @@ import type {
23
23
  } from '../../common/CommonTypes.js';
24
24
  import type { TextureRef } from '../../main-api/RendererMain.js';
25
25
  import type { CoreTextureManager } from '../CoreTextureManager.js';
26
- import { Texture } from './Texture.js';
26
+ import { Texture, type TextureData } from './Texture.js';
27
27
 
28
28
  /**
29
29
  * Properties of the {@link SubTexture}
@@ -115,8 +115,10 @@ export class SubTexture extends Texture {
115
115
  this.setState('failed', error);
116
116
  };
117
117
 
118
- override async getTextureData(): Promise<SubTextureProps> {
119
- return this.props;
118
+ override async getTextureData(): Promise<TextureData> {
119
+ return {
120
+ data: this.props,
121
+ };
120
122
  }
121
123
 
122
124
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -28,9 +28,20 @@ import type {
28
28
  import { EventEmitter } from '../../common/EventEmitter.js';
29
29
 
30
30
  /**
31
- * Texture sources that are used to populate a CoreContextTexture
31
+ * TextureData that is used to populate a CoreContextTexture
32
32
  */
33
- export type TextureData = ImageBitmap | SubTextureProps | null;
33
+ export interface TextureData {
34
+ /**
35
+ * The texture data
36
+ */
37
+ data: ImageBitmap | ImageData | SubTextureProps | null;
38
+ /**
39
+ * Premultiply alpha when uploading texture data to the GPU
40
+ *
41
+ * @defaultValue `false`
42
+ */
43
+ premultiplyAlpha?: boolean;
44
+ }
34
45
 
35
46
  export type TextureState = 'loading' | 'loaded' | 'failed';
36
47
 
@@ -24,7 +24,7 @@ import type {
24
24
  TextRendererMap,
25
25
  TrProps,
26
26
  } from '../core/text-rendering/renderers/TextRenderer.js';
27
- import type { IAnimationSettings } from '../core/animations/CoreAnimation.js';
27
+ import type { AnimationSettings } from '../core/animations/CoreAnimation.js';
28
28
 
29
29
  /**
30
30
  * Writable properties of a Node.
@@ -399,7 +399,7 @@ export interface INode extends INodeWritableProps, IEventEmitter<INodeEvents> {
399
399
  readonly children: INode[];
400
400
  animate(
401
401
  props: Partial<INodeAnimatableProps>,
402
- settings: Partial<IAnimationSettings>,
402
+ settings: Partial<AnimationSettings>,
403
403
  ): IAnimationController;
404
404
  destroy(): void;
405
405
  flush(): void;
@@ -229,7 +229,7 @@ export interface RendererMainSettings {
229
229
  export class RendererMain {
230
230
  readonly root: INode | null = null;
231
231
  readonly driver: IRenderDriver;
232
- private canvas: HTMLCanvasElement;
232
+ readonly canvas: HTMLCanvasElement;
233
233
  readonly settings: Readonly<Required<RendererMainSettings>>;
234
234
  private nodes: Map<number, INode> = new Map();
235
235
  private nextTextureId = 1;
@@ -33,7 +33,7 @@ import type {
33
33
  ShaderRef,
34
34
  TextureRef,
35
35
  } from '../../main-api/RendererMain.js';
36
- import type { IAnimationSettings } from '../../core/animations/CoreAnimation.js';
36
+ import type { AnimationSettings } from '../../core/animations/CoreAnimation.js';
37
37
  import { EventEmitter } from '../../common/EventEmitter.js';
38
38
  import type {
39
39
  TextureFailedEventHandler,
@@ -422,7 +422,7 @@ export class MainOnlyNode extends EventEmitter implements INode {
422
422
 
423
423
  animate(
424
424
  props: Partial<INodeAnimatableProps>,
425
- settings: Partial<IAnimationSettings>,
425
+ settings: Partial<AnimationSettings>,
426
426
  ): IAnimationController {
427
427
  const animation = new CoreAnimation(this.coreNode, props, settings);
428
428
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call
@@ -28,7 +28,7 @@ import { assertTruthy } from '../../utils.js';
28
28
  import type { NodeStruct } from './NodeStruct.js';
29
29
  import { SharedNode } from './SharedNode.js';
30
30
  import { ThreadXMainAnimationController } from './ThreadXMainAnimationController.js';
31
- import type { IAnimationSettings } from '../../core/animations/CoreAnimation.js';
31
+ import type { AnimationSettings } from '../../core/animations/CoreAnimation.js';
32
32
 
33
33
  export class ThreadXMainNode extends SharedNode implements INode {
34
34
  private nextAnimationId = 1;
@@ -97,7 +97,7 @@ export class ThreadXMainNode extends SharedNode implements INode {
97
97
 
98
98
  animate(
99
99
  props: Partial<INodeAnimatableProps>,
100
- settings: Partial<IAnimationSettings>,
100
+ settings: Partial<AnimationSettings>,
101
101
  ): IAnimationController {
102
102
  const id = this.nextAnimationId++;
103
103
  this.emit('createAnimation', { id, props, settings });
@@ -29,7 +29,7 @@ import { CoreAnimationController } from '../../../core/animations/CoreAnimationC
29
29
  import type { Texture } from '../../../core/textures/Texture.js';
30
30
  import { CoreNode } from '../../../core/CoreNode.js';
31
31
  import type { ShaderRef, TextureRef } from '../../../main-api/RendererMain.js';
32
- import type { IAnimationSettings } from '../../../core/animations/CoreAnimation.js';
32
+ import type { AnimationSettings } from '../../../core/animations/CoreAnimation.js';
33
33
  import type { Dimensions } from '../../../common/CommonTypes.js';
34
34
 
35
35
  export class ThreadXRendererNode extends SharedNode {
@@ -78,7 +78,7 @@ export class ThreadXRendererNode extends SharedNode {
78
78
  const animation = new CoreAnimation(
79
79
  this.coreNode,
80
80
  props as Partial<INodeAnimatableProps>,
81
- settings as Partial<IAnimationSettings>,
81
+ settings as Partial<AnimationSettings>,
82
82
  );
83
83
  animation.on('finished', () => {
84
84
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access