Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
d48af79
fix: added missing shaders
pecoram Nov 5, 2025
8429ec3
fix: dom renderer types
pecoram Nov 6, 2025
1cc4cd4
refactoring: the DOM renderer has been moved to its own folder
pecoram Nov 6, 2025
7326702
fix: exports dom-renderer
pecoram Nov 7, 2025
ec33676
fix: dom renderer event emitter
pecoram Nov 7, 2025
a3d0129
fix: dom renderer props
pecoram Nov 7, 2025
d8f203f
fix: load dom renderer fonts
pecoram Nov 7, 2025
278ea26
fix: dom renderer guard
pecoram Nov 7, 2025
3603570
fix: linear gradient
pecoram Nov 7, 2025
6d0ffe3
fix: border radius
pecoram Nov 7, 2025
7dd3330
feat: coverted background-image in img + added events
pecoram Nov 7, 2025
a2f151e
fix: linear gradient
pecoram Nov 7, 2025
c984494
fix: radial gradient
pecoram Nov 7, 2025
d5973d2
fix: angle
pecoram Nov 7, 2025
f75617c
fix: remove image if fails
pecoram Nov 7, 2025
e15934b
fix: removed cast
pecoram Nov 9, 2025
b7bf98b
fix: cirle gradient
pecoram Nov 10, 2025
6426f42
fix: fixed linear gradient degree
pecoram Nov 10, 2025
fd457dd
fix: legacy browser compatibility
pecoram Nov 11, 2025
b0e40f3
feat: introducind domRenderereEnabled Config
pecoram Nov 11, 2025
7174fd0
refactor: fix types
pecoram Nov 11, 2025
9a35ec6
fix: subtexture size
pecoram Nov 11, 2025
52c9189
refactor: moved utils
pecoram Nov 11, 2025
afba3d6
fix: clean
pecoram Nov 14, 2025
caa4bf7
fix: treeshaking loadFont
pecoram Nov 17, 2025
d24684d
fix: types
pecoram Nov 17, 2025
1879972
fix: subtexture scale
pecoram Nov 17, 2025
f7b43e5
fix: hide image failed
pecoram Nov 17, 2025
87a38e9
fix: typo
pecoram Nov 17, 2025
ed6d6f4
fix: subtexture not yet loaded
pecoram Nov 18, 2025
6070c80
fix: legacy
pecoram Nov 18, 2025
42caabf
fix: added css legacy
pecoram Nov 18, 2025
65b830a
fix: lagacy fonts.ready
pecoram Nov 18, 2025
a532e55
fix: legacy bowsers without getBoundingClientRect setter
pecoram Nov 18, 2025
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
13 changes: 8 additions & 5 deletions src/animation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import {
type ElementNode,
LightningRendererNumberProps,
} from './elementNode.js';
import { type IRendererStage } from './lightningInit.js';
import { renderer } from './lightningInit.js';
import { CoreAnimation } from './intrinsicTypes.js';

/**
* Simplified Animation Settings
Expand Down Expand Up @@ -43,15 +44,15 @@ interface SimpleAnimationNodeConfig {
export class SimpleAnimation {
private nodeConfigs: SimpleAnimationNodeConfig[] = [];
private isRegistered = false;
private stage: IRendererStage | undefined;
private stage: typeof renderer.stage | undefined;

register(stage: IRendererStage) {
register(stage: typeof renderer.stage) {
if (this.isRegistered) {
return;
}
this.isRegistered = true;
this.stage = stage;
stage.animationManager.registerAnimation(this);
stage.animationManager.registerAnimation(this as unknown as CoreAnimation);
}

/**
Expand Down Expand Up @@ -173,7 +174,9 @@ export class SimpleAnimation {
this.nodeConfigs.splice(i, 1);
}
if (this.nodeConfigs.length === 0) {
this.stage?.animationManager.unregisterAnimation(this);
this.stage?.animationManager.unregisterAnimation(
this as unknown as CoreAnimation,
);
this.isRegistered = false;
}
}
Expand Down
13 changes: 7 additions & 6 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,18 @@ export const SHADERS_ENABLED = !!(
before running any Lightning modules to ensure consistent behavior across the application.
*/
export interface Config {
animationsEnabled: boolean;
animationSettings?: AnimationSettings;
debug: boolean;
domRendererEnabled?: boolean;
focusDebug: boolean;
keyDebug: boolean;
simpleAnimationsEnabled?: boolean;
animationSettings?: AnimationSettings;
animationsEnabled: boolean;
focusStateKey: DollarString;
fontSettings: Partial<TextProps>;
keyDebug: boolean;
lockStyles?: boolean;
rendererOptions?: Partial<RendererMainSettings>;
setActiveElement: (elm: ElementNode) => void;
focusStateKey: DollarString;
lockStyles?: boolean;
simpleAnimationsEnabled?: boolean;
throttleInput?: number;
}

Expand Down
Loading