Skip to content

Commit

Permalink
Remove DOM references from default values to support server side imports
Browse files Browse the repository at this point in the history
  • Loading branch information
reindernijhoff committed Dec 21, 2023
1 parent cb215c0 commit 8c57a57
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib/ImageEffectRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default class ImageEffectRenderer {
public static defaultOptions: ImageEffectRendererOptions = {
loop: false,
autoResize: true,
pixelRatio: window.devicePixelRatio,
pixelRatio: typeof window !== 'undefined' ? window.devicePixelRatio : 1,
useSharedContext: true,
asyncCompile: true,
};
Expand Down
2 changes: 1 addition & 1 deletion src/lib/RendererBuffer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export class RendererBuffer extends Renderer {
...Renderer.defaultImageOptions,
useMipmap: false,
useCache: false,
type: WebGLRenderingContext.UNSIGNED_BYTE,
type: 5121, // WebGLRenderingContext.UNSIGNED_BYTE,
};

public options: BufferOptions;
Expand Down

0 comments on commit 8c57a57

Please sign in to comment.