fix: imports

This commit is contained in:
cha0s 2022-05-04 14:08:38 -05:00
parent fecbfd00af
commit d2e4b64d2c
2 changed files with 6 additions and 1 deletions

View File

@ -1,12 +1,17 @@
/* eslint-disable global-require, max-classes-per-file */
let ColorMatrixFilter;
let defaultVertex;
let Filter;
if ('web' === process.env.FLECKS_CORE_BUILD_TARGET) {
// eslint-disable-next-line global-require
({defaultVertex, Filter} = require('@pixi/core'));
({ColorMatrixFilter} = require('@pixi/filter-color-matrix'));
}
else {
ColorMatrixFilter = class {};
Filter = class {};
}
exports.defaultVertex = defaultVertex;
exports.ColorMatrixFilter = ColorMatrixFilter;
exports.Filter = Filter;

View File

@ -1,4 +1,4 @@
import {ColorMatrixFilter} from '@pixi/filter-color-matrix';
import {ColorMatrixFilter} from './imports';
const NIGHTNESS = 0.1;