Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 1.02 KB

ping-pong-plane.md

File metadata and controls

29 lines (19 loc) · 1.02 KB

PingPongPlane

Back to readme

The <PingPongPlane /> component will create a WebGL PingPongPlane (using a Plane object), acting as a wrapper for the curtains.js PingPongPlane class.

Usage

import ReactDOM from 'react-dom';
import React from 'react';
import {PingPongPlane} from 'react-curtains';

function BasicPingPongPlane() {
    return (
        <PingPongPlane />
    );
}

Properties & Events

You can refer to both the PingPongPlane curtains.js class and Plane component documentations.

Compared to the <Plane /> component the only additional prop you have to pass to your <PingPongPlane /> component is the sampler name that you'll use in your shader (if not set, will use "uPingPongTexture").

Unmounting

Each time the <PingPongPlane /> component will unmount, the corresponding WebGL plane element will be automatically disposed.