UNPKG

@needle-tools/engine

Version:

Needle Engine is a web-based runtime for 3D apps. It runs on your machine for development with great integrations into editors like Unity or Blender - and can be deployed onto any device! It is flexible, extensible and networking and XR are built-in.

28 lines (21 loc) 714 B
import type { Effect } from "postprocessing"; import { EffectProviderResult, PostProcessingEffect } from "../PostProcessingEffect.js"; /** * [EffectWrapper](https://engine.needle.tools/docs/api/EffectWrapper) wraps a custom postprocessing effect to integrate it with the Needle Engine post-processing pipeline. * * @category Effects * @group Components */ export class EffectWrapper extends PostProcessingEffect { readonly effect: Effect; constructor(effect: Effect) { super(); this.effect = effect; } get typeName(): string { return this.effect.constructor.name; } onCreateEffect(): EffectProviderResult | undefined { return this.effect; } }