Coder Social home page Coder Social logo

webgl-css-shaders's Introduction

CSS Shaders through WebGL

For more information and demos, please read the introduction here.

Usage

To have the script parse all the CSS automatically (very experimental), just call:

CSSshaders.init();

To manually add a shader:

CSSshaders.add( element, shaderParameters ); - returns shader element

Example:

CSSshaders.add( "#content","url(shaders/flag.vs) url(shaders/grayscale.fs), 20 20, phase 50.0, amplitude 100.0, txf rotateX(45deg), amount 1")

Shader element methods:

  • transition( duration, function); - adds transition with specified duration and function, returns Shader element
  • state( shaderParameters ); - creates CSS state with specified parameters, returns Shader state

Shader state methods:

  • enable() - enable state
  • disable() - disable state
  • toggle() - toggle state

webgl-css-shaders's People

Contributors

niklasvh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

webgl-css-shaders's Issues

Current status?

Thanks for creating this, it's been over three years already!

I have to admit that at first I rejected the implementation because I felt the browser vendors would be fast to support CSS shaders, and a polyfil-type library didn't seem necessary...

I was wrong. 2016 is coming and full support for CSS shaders is still a distant reality.

Obviously not enough people have bumped into this limitation to make it a priority; although that may change soon, as the browser is used more like a game engine viewport.

Having said that, what is your take on the issue based on your experience and how do you feel about using your library today? Any missing features you'd like to see PRs for?

Cheers

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.