npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@trakout/wagner

v0.0.3

Published

Effects composer for three.js

Downloads

23

Readme

Wagner

Effects composer for three.js

This is a WIP version of a new proposal for an effect composer for three.js

There's a demo with the latest-ish version of the code here demo. Here's a snapshot to give you an idea of what it can achieve:

Image

Please use it only for review and test purposes. Don't hesitate to add issues or open a conversation about design decisions.

Basic usage

/*
Include the libs
<script src="Wagner.js"></script>
*/

var composer = new WAGNER.Composer( renderer );
composer.setSize( window.innerWidth, window.innerHeight ); // or whatever resolution

var zoomBlurPass = new WAGNER.ZoomBlurPass();
var multiPassBloomPass = new WAGNER.MultiPassBloomPass();

renderer.autoClearColor = true;
composer.reset();
composer.render( scene, camera );
composer.pass( multiPassBloomPass );
composer.pass( zoomBlurPass );
composer.toScreen();

What works

  • Passes are by default RGBA
  • Ping-pong buffers when chaining passes
  • ShaderLoader is being replaced, but you can use it to load .glsl files. It hides all the XHR stuff
  • Composing with Wagner for effects that run chained with the same resolution (e.g. full-screen effects)
  • Basic effects implemented in the new WAGNER.Pass class:
    • Blend pass: all single pass. Current blend modes implemented: normal, darken, multiply, lighten, screen, overlay, soft light, hard light
    • Invert: single pass, inverts colours
    • Box Blur: single pass, blur in one direction specified in vec2 delta uniform
    • Full Box Blur: multipass, 2 box blur in two directions
    • Zoom Blur: single pass
    • Sepia, Noise, Denoise, Vignette, edge detection
    • Multi Pass Bloom: multipass, applies blur and blends with Screen mode
    • DOF (simple)
    • SSAO (simple)
  • uniform reflection from GLSL source is working enough to be usable for most cases
  • settings different path for shader loading

What still doesn't work / needs work

  • ~~ShaderLoader will probably be removed, or be transparent to the user~~
  • ~~Passing parameters to WAGNER.ShaderPass from main code~~
  • ~~Correct use of textures of different dimensions along the chain~~
  • Resizing correctly all render targets
  • ~~Multiple Composers working at the same time~~
  • Shaders that are not ported to WAGNER.Pass: ~~pixelate~~, ~~rgb split~~, different single-pass bloom
  • Shaders that haven't even been ported to WAGNER: camera motion blur, directional blur, gamma, levels,
  • Alias definition of passes (previously loadPass()) legacy
  • uniform reflection from GLSL source doesn't support structures (I don't even know if WebGL supports structures)

Credits

Composer following the work of alteredq's THREE.EffectComposer

Most of the shaders are from https://github.com/evanw/glfx.js. Others are from different sources and forums, papers, or my own.

License

MIT licensed

Copyright (C) 2014 Jaume Sanchez Elias - All shaders are copyright of their respective authors.

I'm trying to trace the original source for some of the common shaders. If your code is featured in the shaders folders, and wish to be correctly credited, or the code removed, please open an issue.

http://www.clicktorelease.com