Skip to content

Commit

Permalink
Fix circular dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
reindernijhoff committed Nov 21, 2023
1 parent 1fa67c4 commit 9060330
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
7 changes: 3 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export { default as ImageEffectRenderer } from './lib/ImageEffectRenderer.js';
export { RendererInstance } from './lib/RendererInstance.js';
export { RendererBuffer } from './lib/RendererBuffer.js';
export {default as ImageEffectRenderer} from './lib/ImageEffectRenderer.js';
export {RendererInstance} from './lib/RendererInstance.js';
export {RendererBuffer} from './lib/RendererBuffer.js';
export type {ImageOptions} from './lib/Renderer.js';
export type {ImageEffectRendererOptions} from './lib/ImageEffectRenderer.js';

2 changes: 1 addition & 1 deletion src/lib/Program.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {WebGLInstance} from "./WebGLInstance.js";
import type {WebGLInstance} from "./WebGLInstance.js";

export enum ProgramType {
SHADERTOY_WEBGL,
Expand Down
5 changes: 2 additions & 3 deletions src/lib/RendererInstance.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {WebGLInstance} from "./WebGLInstance.js";
import type {ImageEffectRendererOptions} from "./ImageEffectRenderer.js";
import {Renderer} from "./Renderer.js";
import {ImageEffectRenderer} from "../index.js";
import {type BufferOptions, RendererBuffer} from "./RendererBuffer.js";
import Program from "./Program.js";

Expand All @@ -26,10 +25,10 @@ export class RendererInstance extends Renderer {
private resizeObserver: ResizeObserver;
private _ready: boolean = false;

constructor(glInstance: WebGLInstance, container: HTMLElement, shader: string, options: Partial<ImageEffectRendererOptions> = {}) {
constructor(glInstance: WebGLInstance, container: HTMLElement, shader: string, options: ImageEffectRendererOptions) {
super(glInstance);

this.options = {...ImageEffectRenderer.defaultOptions, ...options};
this.options = {...options};
this.index = RendererInstance.index++;
this.container = container;
this.main = this;
Expand Down

0 comments on commit 9060330

Please sign in to comment.