curtainsjs | lightweight vanilla WebGL javascript library | Canvas library
kandi X-RAY | curtainsjs Summary
kandi X-RAY | curtainsjs Summary
Shaders are the new front-end web developpment big thing, with the ability to create very powerful 3D interactions and animations. A lot of very good javascript libraries already handle WebGL but with most of them it's kind of a headache to position your meshes relative to the DOM elements of your web page. curtains.js was created with just that issue in mind. It is a small vanilla WebGL javascript library that converts HTML elements containing images and videos into 3D WebGL textured planes, allowing you to animate them via shaders. You can define each plane size and position via CSS, which makes it super easy to add WebGL responsive planes all over your pages.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of curtainsjs
curtainsjs Key Features
curtainsjs Examples and Code Snippets
Community Discussions
Trending Discussions on curtainsjs
QUESTION
I'm trying to integrate a WebGL animation on list items: images who give place to a video on mouseover.
The transitions are same as http://taotajima.jp/ and I'm inspired of the frag and vertex from https://github.com/watab0shi/taotajimajp-transition
For this, I work with Angular and CurtainsJS with GSAP.
My problem is the first textures hides the video at the end of animation (more details at end of this post)
I created a TS class after my component (home.page.ts):
...ANSWER
Answered 2021-Feb-01 at 09:28There are a couple errors in your fragment shader.
- You're using the fractional value of your uProgress uniform, but when uProgress equals to 1, its fractional value equals to 0 and your mix operation then falls back to color0 again.
- Your
translate1
value needs to be multiplied byprogress1
so whenuProgress
equals1
, the second texture is not translated anymore.
This fragment shader should fix your issue:
QUESTION
I'm attempting to add a fragment shader to plane created via curtains. I've used this fragment shader with other libraries before — namely, canvas-sketch — however I can't seem to get the shader to run as the console prompts me with the error: Program: Unable to initialize the shader program.
ANSWER
Answered 2020-Oct-10 at 10:11curtains doesn't have a varying called vUv
. It has one called vTextureCoord
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install curtainsjs
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page