Code Monkey home page Code Monkey logo

threex.badtvpproc's Introduction

threex.badtv

threex.badtv is a three.js extension which provide an badtv effect. It is a post processing cumulating various effects. It is from the excelent badtv demo of @felixturner. You can see more of the good stuff what he does on his blog.

Show Don't Tell

How To Install It

You can install it via script tag

<script src='threex.badtv.js'></script>

Or you can install with bower, as you wish.

bower install threex.badtv

How To Use It

Here is the split out of each javascript files

threex.badtvpasses.js

It build the passes for the badTV effect. It exposes badtvpasses.passes for a THREE.EffectComposer instance.

Create an instance

var badTVPasses	= new THREEx.BadTVPasses();

Everytime you render the scene, be sure to update it

badTVPasses.update(delta, now)		

Then you add those passes to an THREE.EffectComposer like that

badTVPasses.addPassesTo(composer)

threex.badtvjamming.js

It provides a bad tv jamming effect with sound. It depends on threex.badtvsound.js for the sound. First create the object.

var context   = new AudioContext()
var badTVJamming  = new THREEx.BadTVJamming(badTVPasses, context)

When you want to trigger the effect, just do

badTVJamming.trigger()

threex.badtvsound.js

It plays a electical sound thru Web Audio API. It is used to simulate the noise made by a broken cathod ray tube. First create the object.

var context		= new AudioContext()
var badTVSound		= new THREEx.BadTVSound(context, context.destination)

When you want to play it, do

badTVSound.play()

threex.badtvdatgui.js

It provide an easy way to fine tune threex.badtvpasses parameters thanks to Dat.GUI. It is interactive and simple! The typical usage is just:

THREEx.addBadTVPasses2DatGui(badTVPasses)

TODO

  • some shader are the same as in three.js distribution. DO NOT DUPLICATE code
    • RGBShiftShader
    • FilmShader

threex.badtvpproc's People

Contributors

jeromeetienne avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.