@pixi/3d
    Preparing search index...

    Interface PortalPassOptions

    Options for constructing a PortalPass

    const options: PortalPassOptions = { entry, exit, texture: feed };
    view3d.passes = [new PortalPass(options)];
    interface PortalPassOptions {
        enabled?: boolean;
        entry: Mesh3D;
        exit: Mesh3D;
        texture: RenderTexture;
    }

    Hierarchy (View Summary)

    Index
    enabled?: boolean

    Whether the pass starts enabled; see Pass3D#enabled

    true
    
    view.passes = [new MeshPass({ name: 'wireframe', enabled: false })];
    

    entry

    entry: Mesh3D

    The quad the viewer looks through, drawn with a PortalMaterial that shows texture

    const entry = new Mesh3D({
    geometry: new PlaneGeometry({ width: 3, height: 4 }),
    material: new PortalMaterial({ texture: feed }),
    });
    exit: Mesh3D

    The quad on the far side, whose +Z side holds the room the entry shows

    const exit = new Mesh3D({ geometry: new PlaneGeometry({ width: 3, height: 4 }), material: new FlatMaterial() });
    exit.position.set(60, 2, -10);
    texture: RenderTexture

    The texture the far side is drawn into, which the entry's material shows

    Size it to the view, and resize it with the view. A different aspect ratio stretches the far side, and fewer pixels blur it. In a view with a 'beforeToneMapping' effect, give it an rgba16float format; Camera3D#renderTexture explains why.

    const feed = RenderTexture.create({
    width: view3d.width,
    height: view3d.height,
    format: 'rgba16float',
    });
    feed.resize(view3d.width, view3d.height, app.renderer.resolution);