diff --git a/packages/viewer/src/index.ts b/packages/viewer/src/index.ts index e38a1cdc05..182a7bd2b7 100644 --- a/packages/viewer/src/index.ts +++ b/packages/viewer/src/index.ts @@ -119,6 +119,11 @@ import { DepthNormalPass } from './modules/pipeline/Passes/DepthNormalPass.js' import { BasitPass } from './modules/pipeline/Passes/BasitPass.js' import { ProgressiveAOPass } from './modules/pipeline/Passes/ProgressiveAOPass.js' import { TAAPass } from './modules/pipeline/Passes/TAAPass.js' +import { + FilterMaterial, + FilterMaterialOptions, + FilterMaterialType +} from './modules/materials/Materials.js' export { Viewer, @@ -201,7 +206,10 @@ export { MRTShadedViewPipeline, MRTPenViewPipeline, ViewModes, - ViewMode + ViewMode, + FilterMaterial, + FilterMaterialType, + FilterMaterialOptions } export type { diff --git a/packages/viewer/src/modules/Viewer.ts b/packages/viewer/src/modules/Viewer.ts index 47a3f2954a..0aaa797574 100644 --- a/packages/viewer/src/modules/Viewer.ts +++ b/packages/viewer/src/modules/Viewer.ts @@ -79,11 +79,9 @@ export class Viewer extends EventEmitter implements IViewer { const cs = [] let pt = obj do { - if ((pt = Object.getPrototypeOf(pt))) cs.push(pt.constructor || null) + if ((pt = Object.getPrototypeOf(pt))) cs.push(pt.constructor.name || null) } while (pt !== null) - return cs.map(function (c) { - return c ? c.toString().split(/\s|\(/)[1] : null - }) + return cs } public createExtension(type: Constructor): T {