Viewer
    Preparing search index...

    Interface IPostProcessingApi

    interface IPostProcessingApi {
        antiAliasingTechnique: ANTI_ALIASING_TECHNIQUE;
        antiAliasingTechniqueMobile: ANTI_ALIASING_TECHNIQUE;
        effectComposer: EffectComposer | undefined;
        enablePostProcessingOnMobile: boolean;
        godRaysEffects: { [key: string]: GodRaysManager };
        manualPostProcessing: boolean;
        outlineEffects: { [key: string]: OutlineManager };
        selectiveBloomEffects: { [key: string]: SelectiveBloomManager };
        ssaaSampleLevel: number;
        addEffect(definition: IBloomEffectDefinition): string;
        addEffect(definition: IChromaticAberrationEffectDefinition): string;
        addEffect(definition: IDepthOfFieldEffectDefinition): string;
        addEffect(definition: IDotScreenEffectDefinition): string;
        addEffect(definition: IGodRaysEffectDefinition): string;
        addEffect(definition: IGridEffectDefinition): string;
        addEffect(definition: IHBAOEffectDefinition): string;
        addEffect(definition: IHueSaturationEffectDefinition): string;
        addEffect(definition: INoiseEffectDefinition): string;
        addEffect(definition: IOutlineEffectDefinition): string;
        addEffect(definition: IPixelationEffectDefinition): string;
        addEffect(definition: ISSAOEffectDefinition): string;
        addEffect(definition: IScanlineEffectDefinition): string;
        addEffect(definition: ISelectiveBloomEffectDefinition): string;
        addEffect(definition: ISepiaEffectDefinition): string;
        addEffect(definition: ITiltShiftEffectDefinition): string;
        addEffect(definition: IVignetteEffectDefinition): string;
        addEffect(
            definition: IPostProcessingEffectDefinition,
            token?: string,
        ): string;
        getDefaultEffectProperties(type: POST_PROCESSING_EFFECT_TYPE): unknown;
        getEffect(token: string): Effect;
        getEffectTokens(): { [key: string]: POST_PROCESSING_EFFECT_TYPE };
        getPostProcessingEffectsArray(): IPostProcessingEffectsArray;
        removeEffect(token: string): boolean;
        updateEffect(
            token: string,
            definition: IPostProcessingEffectDefinition,
        ): void;
    }
    Index

    Properties

    antiAliasingTechnique: ANTI_ALIASING_TECHNIQUE

    Defines the anti-aliasing technique that is used when the post-processing is active. (default: ANTI_ALIASING_TECHNIQUE.SSAA)

    The various anti-aliasing technique have an impact on the performance and the rendering quality. The order is as follows: NONE -> FXAA -> SMAA -> SSAA (lowest to highest quality, fastest to slowest performance)

    For the SSAA approach please see ssaaSampleLevel.

    Note: The post-processing API is still WIP. Breaking changes are to be expected.

    antiAliasingTechniqueMobile: ANTI_ALIASING_TECHNIQUE

    Defines the anti-aliasing technique that is used when the post-processing is active on mobile. (default: ANTI_ALIASING_TECHNIQUE.FXAA)

    The various anti-aliasing technique have an impact on the performance and the rendering quality. The order is as follows: NONE -> FXAA -> SMAA -> SSAA (lowest to highest quality, fastest to slowest performance)

    For the SSAA approach please see ssaaSampleLevel.

    Note: The post-processing API is still WIP. Breaking changes are to be expected.

    effectComposer: EffectComposer | undefined

    The effect composer that is used internally for the rendering of the postprocessing effects. In combination with manualPostProcessing you can adjust the effects and passes yourself.

    Note: The post-processing API is still WIP. Breaking changes are to be expected.

    enablePostProcessingOnMobile: boolean

    If the post-processing effects should be enabled on mobile. (default: true)

    As some post-processing effects greatly effect the rendering performance it might make sense to not use post-processing on mobile device. This will ensure that the rendering on mobile devices is still fluid, while providing the best results on desktop.

    Note: The post-processing API is still WIP. Breaking changes are to be expected.

    godRaysEffects: { [key: string]: GodRaysManager }

    Access to all currently added god ray effects via token.

    Note: The post-processing API is still WIP. Breaking changes are to be expected.

    • addEffect
    • updateEffect
    • removeEffect
    manualPostProcessing: boolean

    By setting this option to true you can manually work on the postprocessing pipeline. All current effects and passes are removed from the EffectComposer and you can start from scratch.

    Note: The post-processing API is still WIP. Breaking changes are to be expected.

    effectComposer

    outlineEffects: { [key: string]: OutlineManager }

    Access to all currently added outline effects via token.

    Note: The post-processing API is still WIP. Breaking changes are to be expected.

    • addEffect
    • updateEffect
    • removeEffect
    selectiveBloomEffects: { [key: string]: SelectiveBloomManager }

    Access to all currently added selective bloom effects via token.

    Note: The post-processing API is still WIP. Breaking changes are to be expected.

    • addEffect
    • updateEffect
    • removeEffect
    ssaaSampleLevel: number

    The number of samples that are taken in the Supersample Anti-Aliasing Render Pass. Specified as n, where the number of samples is 2^n, so sampleLevel = 4, is 2^4 samples, 16. (default: 4)

    Only works with ANTI_ALIASING_TECHNIQUE.SSAA.

    Note: The post-processing API is still WIP. Breaking changes are to be expected.

    Methods

    • Get the effect that was created with the specified token. This functions returns the Effect-Classes as used by the postprocessing package.

      Note: The post-processing API is still WIP. Breaking changes are to be expected.

      Parameters

      • token: string

      Returns Effect

    • Get a description of the post-processing effects that are current applied.

      Note: The post-processing API is still WIP. Breaking changes are to be expected.

      Returns IPostProcessingEffectsArray

    • Remove an effect of the postprocessing pipeline. Use the token that was generated by the addEffect-function.

      Note: The post-processing API is still WIP. Breaking changes are to be expected.

      Parameters

      • token: string

      Returns boolean

      • addEffect
      • updateEffect
    • Update an effect of the postprocessing pipeline with the specified token and definition. Use the token that was generated by the addEffect-function.

      Note: The post-processing API is still WIP. Breaking changes are to be expected.

      Parameters

      Returns void

      • addEffect
      • removeEffect