Some experimental rain and water drop effects in different scenarios using WebGL, by Lucas Bebber.

Related tags

Effect RainEffect
Overview
Comments
  • Can't run locally.

    Can't run locally.

    WebGL: INVALID_VALUE: texImage2D: no image data
    Uncaught (in promise) DOMException: Failed to execute 'texImage2D' on 'WebGLRenderingContext': Tainted canvases may not be loaded.
    
    opened by AntiMoron 10
  • No longer works in Chrome

    No longer works in Chrome

    Error: Uncaught (in promise) TypeError: Failed to execute 'texImage2D' on 'WebGLRenderingContext': No function was found that matched the signature provided. Shows a black background.

    Chrome version: 56.0.2924.87 (64-bit) OS: OSX 10.9.5 Confirmed does not work on windows.

    opened by roshansachan 9
  • No longer working on Firefox

    No longer working on Firefox

    Hello,

    I just seen that the effect is no longer working on Firefox ( I get a black screen )

    Console error : TypeError: Argument 6 is not valid for any of the 6-argument overloads of WebGLRenderingContext.texImage2D.

    opened by Le-future 5
  • Chrome Extension

    Chrome Extension

    Hey guys, Thank you for this spectacular thing))

    So, why not create New-tab Chrome extension with real weather data and possibility to change background?

    If you'll create a project for that I'll be glad to contribute.

    opened by uoziod 2
  • Question

    Question

    Dear Lucas:

    First of all, let me congratulation you for such an excellent concept and implementation.

    I'd like to use your code in a development in the way shown in the Demo 2. The point would be to have the webgl-engine running the water animations at the main screen.

    The case is that my development is done with the help of jQuery Mobile, using a multi-page schema, that is, I have only one html document with all the pages in it (including the referred main page).

    Due to this architecture I'm concerned about if "raineffect" will keep on running even when not shown (and so using valuable resources). If that is the case, is there any API which I can call in order to stop resume the water animation?

    Best regards.

    opened by vortice3D 0
  • [Question]how glsl work? shaders is different with js file.

    [Question]how glsl work? shaders is different with js file.

    why they are different?

    src/shaders/simple.vert

    precision mediump float;
    
    attribute vec2 a_position;
    
    void main() {
       gl_Position = vec4(a_position,0.0,1.0);
    }
    

    but demo/js/index.js

    #define GLSLIFY 1
    precision mediump float;
    
    attribute vec2 a_position;
    attribute vec2 a_texCoord;
    
    uniform vec2 u_resolution;
    
    varying vec2 v_texCoord;
    varying vec2 v_resolution;
    
    void main() {
       // convert the rectangle from pixels to 0.0 to 1.0
       vec2 zeroToOne = a_position / u_resolution;
    
       // convert from 0->1 to 0->2
       vec2 zeroToTwo = zeroToOne * 2.0;
    
       // convert from 0->2 to -1->+1 (clipspace)
       vec2 clipSpace = zeroToTwo - 1.0;
    
       gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1);
    
       // pass the texCoord to the fragment shader
       // The GPU will interpolate this value between points.
       v_texCoord = a_texCoord;
       v_resolution = u_resolution;
    }
    
    opened by kaisawind 0
  • Bugfix: Updated createTexture function in index*.js

    Bugfix: Updated createTexture function in index*.js

    createTexture(gl, source, i) has a responsibility of creating GL Texture object with source data. creating texture object can be done even if the source is null, except calling texImage2D which is for uploading the buffer data to gpu memory.

    Fix solving this issue: https://github.com/codrops/RainEffect/issues/11

    opened by artrointel 0
  • [Question] How to change the image background ? Where to learn about web gl to master this project ?

    [Question] How to change the image background ? Where to learn about web gl to master this project ?

    I'd like to know how one could change the background image from the rain example Could you help with that. I've tried to by modifying the index.js file where textureRainBg and textureRainFg are created like so in the loadTextures function:

    { name: "textureRainFg", src: "img/weather/doc1.png" }

    Doing so, i'm ending up with an error : "Failed to execute 'texImage2D' on 'WebGLRenderingContext': No function was found that matched the signature provided." I assumed the image i chose does not meet the requirements to use this function as its a jpeg transformed in a png by just changing the extension. Therefore, I've tried with proper png images, still same errors. Also I don't manage to see where this texImage2D function is called in the canvas creation process. Anyway, what one should use as an image to get it to work ? Where to learn about web gl to master this project ?

    Many thanks.

    opened by mystermiam 0
  • Non-minified js files don't work and cause errors

    Non-minified js files don't work and cause errors

    Hello and thanks for this amazing experiment. One small problem: if I change the js files to the non-minified version to play around, the code doesn't work. For example, if I change index3.html to load index3.js instead of index3.min.js, there is an error thrown in Chrome (below).

    webgl.js:96 Uncaught (in promise) TypeError: Failed to execute 'texImage2D' on 'WebGLRenderingContext': No function was found that matched the signature provided. at updateTexture (webgl.js:96) at Object.createTexture (webgl.js:84) at GL.createTexture (gl-obj.js:31) at RainRenderer.init (rain-renderer.js:65) at new RainRenderer (rain-renderer.js:27) at init (index3.js:74) at index3.js:39

    opened by mishawagon 8
  • Background resolution

    Background resolution

    Hi Guys!

    I'm wondering how to increase the resolution of the background picture, because it's pixelated for now.

    I remember have found the solution last year but I can't find it anymore...

    Thanks a lot!

    opened by Le-future 0
The famous Matrix rain effect of falling green characters in a terminal

Matrix Rain The famous Matrix rain effect of falling green characters in a terminal with node. Installation npm install -g matrix-rain Usage usage: m

Noj Vek 423 Dec 12, 2022
The incredible effect of rain of letters in the style of the Matrix trilogy.

O Efeito Matrix O incrível efeito da chuva de letras no estilo da trilogia Matrix. "Cedo ou tarde, você vai aprender, assim como eu aprendi, que exist

Jeferson Lucas 138 Dec 12, 2022
A JavaScript library for advanced 2D slideshow with WebGL, that provides variety of beautiful effects

gl-slideshow An advanced 2D slideshow with WebGL, provides a variety of beautiful effects with GLSL power. Shaders are forked from https://gl-transiti

Akihiro Oyamada 68 Nov 28, 2022
A JavaScript library for advanced 2D slideshow with WebGL, that provides variety of beautiful effects

gl-slideshow An advanced 2D slideshow with WebGL, provides a variety of beautiful effects with GLSL power. Shaders are forked from https://gl-transiti

Akihiro Oyamada 69 Jan 1, 2023
Some ideas for decorative link distortion effects using SVG filters.

Distorted Link Effects A couple of ideas for decorative link distortion effects using SVG filters on lines, circles and squares. Article on Codrops De

Codrops 122 Dec 4, 2022
Some shape morphing hover effects on images using SVG clipPath.

Organic Shape Animations with SVG clipPath Some shape morphing hover effects using SVG clipPath on an image. Article on Codrops Demo Credits Anime.js

Codrops 197 Oct 16, 2022
A lightweight, efficient and easy-to-use Canvas library for building some cool particle effects.

JParticles · 中文 | English 官网:jparticles.js.org 特效列表 粒子运动 波纹运动 波纹进度条 雪花飘落 线条动画 介绍 JParticles(JavaScript Particles 的缩写)是一款基于 Canvas 的不依赖于其他库的轻量级 JavaScr

花祁 466 Dec 27, 2022
Loading effects for assets including some built in animated reveals

Asset loading effects This is a library to show the loading progress of given assets and reveal them using various animations. Please give feedback, r

Zach Saucier 97 Dec 8, 2022
Demonstration of different animation effects with AngularJS ngView directive.

ngView-animation-effects This is a simple demonstration of how easy you can make your ngView directive transition pages with nice animations. All you

Aliaksandr Astashenkau 184 Dec 31, 2022
A set of playful dragging effects for images using various techniques.

Image Dragging Effects A set of playful effects for dragging images. Article on Codrops Demo Installation Install dependencies: npm install Compile t

Codrops 71 Dec 4, 2022
Animated haze distortion effect for images and text, with WebGL.

Animated Heat Distortion Effects with WebGL A tutorial on how to use fragment shaders in WebGL to create an animated heat haze distortion effect on im

Lucas Bebber 289 Nov 1, 2022
sync CSS 3D transformations to a WebGL scene

gl-css3d Synchronize CSS 3D transformations to a WebGL scene Usage: var createCSS3D = require('gl-css3d'); // pass an HTML DOM element node, such as

null 30 Oct 17, 2022
🧞‍♂️ Your magic WebGL carpet

⚠️ ⚠️ BETA! ⚠️ ⚠️ (Most likely I won't maintain this...) ??‍♂️ Aladino – your magic WebGL carpet Aladino is a tiny (around ~5kb gzipped) and dependenc

Luigi De Rosa 822 Dec 30, 2022
Codrops 135 Dec 12, 2022
image/video/content slideshow engine providing high quality animation effects including Kenburns Effect and GLSL Transitions.

Diaporama Diaporama is an image/video/content slideshow engine providing high quality animation effects including Kenburns effect and GLSL Transitions

Gaëtan Renaudeau 797 Nov 26, 2022
Simple styles and effects for enhancing text input interactions.

Text Input Effects Simple styles and effects for enhancing text input interactions. Article on Codrops Demo Integrate or build upon it for free in you

Codrops 966 Jan 4, 2023
A little library that can be used for bursting particles effects on buttons and other elements

Particle Effects for Buttons Bursting particles effects for buttons. By Luis Manuel. Article on Codrops Demo Credits anime.js Basic usage The Particle

Codrops 1.2k Jan 1, 2023
A set of effects for mouse-following image trails that show a random series of images.

Image Trail Effects A set of effects for mouse-following image trails that show a random series of images. Inspired by the effect seen on VLNC Studio.

Codrops 177 Dec 28, 2022
Only 90's kids remember... well not really, but these beloved effects that would follow your mouse around will always be classic reminders of the old, beloved internet.

90's Cursor Effects "Knowing the codes" used to be all the rage, I want to bring a few back. A repo of the old effects that inspired creativity and th

Tim Holman 2.6k Jan 9, 2023