-
-
Notifications
You must be signed in to change notification settings - Fork 172
Open
Description
I am using the following versions in my project:
"@pixi/webworker": "^7.4.2"
"pixi-filters": "^5.3.0"
When I try to use AdjustmentFilter within a Web Worker, it results in an error.
Here is the code snippet:
import * as PIXI from "@pixi/webworker";
const adjustmentFilter = new AdjustmentFilter({
brightness: 1.2,
contrast: 1.5,
saturation: 1.3,
gamma: 1.0,
red: 1.1,
green: 1.0,
blue: 0.9,
});
videoSprite.filters = [adjustmentFilter];
app.stage.addChild(videoSprite);
Error Message:
adapter.ts:36 Uncaught (in promise) ReferenceError: document is not defined
It seems like the AdjustmentFilter is trying to access the document object, which is unavailable in the Web Worker context.
How can I make AdjustmentFilter work in the Web Worker environment? Are there any workarounds or specific configurations needed?
Metadata
Metadata
Assignees
Labels
No labels
