This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@rapidajs/postprocessing
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

@rapidajs/postprocessing

@rapidajs/postprocessing is a thin wrapper around vanruesc/postprocessing with typed methods for creating effects. This package is used in @rapidajs/rapida, but can also be used standalone.


rapida is under active alpha development and is not yet battle-tested and stable. We don't recommend using rapida in production just yet, but watch this space!


See the vanruesc/postprocessing docs for more documentation on the post processing effects included in this package - vanruesc/postprocessing

Over time this package will become simpler - this primarily hinges on types being added to vanruesc/postprocessing.

Usage with @rapidajs/three

Install @rapidajs/three, three and this package:

$ yarn add @rapidajs/three @rapidajs/postprocessing three

Use @rapidajs/postprocessing to add post processing effects to rapida views

  1. Gather necessary imports
import { WebGLRenderer } from '@rapidajs/three';
import { Scene, PerspectiveCamera } from 'three';
import { Effects } from '@rapidajs/postprocessing';
  1. Create a @rapidajs/three webgl renderer and append it to the dom
const renderer = new WebGLRenderer();
document.getElementById('app').appendChild(renderer.domElement);
  1. Create a scene
const scene = new Scene();
  1. Create a camera and a view
const camera = new PerspectiveCamera();
const view = renderer.create.view({
  scene,
  camera,
  useEffectComposer: true, // make sure to include `useEffectComposer: true`
});
  1. Add a post processing effect with Effects
view.composer.add.effects(Effects.bloom({ ... bloom effect params ... }));
  1. Render your scene
renderer.render(timeElapsed);

Readme

Keywords

none

Package Sidebar

Install

npm i @rapidajs/postprocessing

Weekly Downloads

4

Version

0.1.1

License

MIT

Unpacked Size

273 kB

Total Files

96

Last publish

Collaborators

  • isaacmason