pixi.js
    Preparing search index...

    Interface InstructionPipe<INSTRUCTION>Advanced

    An interface for a pipe that can be used to build instructions for the renderer. InstructionPipes are specifically used to manage the state of the renderer. For example, the BlendModePipe is used to set the blend mode of the renderer.

    interface InstructionPipe<INSTRUCTION extends Instruction> {
        buildEnd?: (instructionSet: InstructionSet) => void;
        buildReset?: (instructionSet: InstructionSet) => void;
        buildStart?: (instructionSet: InstructionSet) => void;
        execute?: (instruction: INSTRUCTION) => void;
        pop?: (
            effect: Effect,
            targetContainer: Container,
            instructionSet: InstructionSet,
        ) => void;
        push?: (
            effect: Effect,
            targetContainer: Container,
            instructionSet: InstructionSet,
        ) => void;
        renderEnd?: () => void;
        renderStart?: () => void;
        upload?: (instructionSet: InstructionSet) => void;
    }

    Type Parameters

    Implemented by

    Index

    Properties

    buildEnd?: (instructionSet: InstructionSet) => void
    buildReset?: (instructionSet: InstructionSet) => void
    buildStart?: (instructionSet: InstructionSet) => void
    execute?: (instruction: INSTRUCTION) => void

    this is where the actual instruction is executed - eg make the draw call activate a filter. Any instructions that have the same renderPipeId have their execute method called

    Type declaration

    pop?: (
        effect: Effect,
        targetContainer: Container,
        instructionSet: InstructionSet,
    ) => void

    Used by effect pipes to pop effects from the renderer.

    Type declaration

      • (
            effect: Effect,
            targetContainer: Container,
            instructionSet: InstructionSet,
        ): void
      • Parameters

        • effect: Effect

          the effect to pop

        • targetContainer: Container

          the container that the effect is being applied to

        • instructionSet: InstructionSet

          the instruction set currently being built

        Returns void

    push?: (
        effect: Effect,
        targetContainer: Container,
        instructionSet: InstructionSet,
    ) => void

    Used by the effect pipes push and pop effects to the renderer. A push effect allows the renderer to change its state to support the effect. A pop effect allows the renderer to return to its previous state. An example of this would be the filter effect.

    Type declaration

      • (
            effect: Effect,
            targetContainer: Container,
            instructionSet: InstructionSet,
        ): void
      • Parameters

        • effect: Effect

          the effect to push

        • targetContainer: Container

          the container that the effect is being applied to

        • instructionSet: InstructionSet

          the instruction set currently being built

        Returns void

    renderEnd?: () => void

    Called just after the render ends giving the RenderPipes a chance to do any cleanup

    renderStart?: () => void

    Called just before the render starts giving the RenderPipes a chance to do any setup

    upload?: (instructionSet: InstructionSet) => void

    called just before we execute the draw calls , this is where the pipes have an opportunity to upload data to the GPU. This is only called if data changes.

    Type declaration