Skip to content

Some useful shaders you can use in three.js project

Notifications You must be signed in to change notification settings

joe20182/shaka-shader-lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Install

npm install shaka-shader-lib

Usage

import { UnderwaterEffect } from "shaka-shader-lib";

// Other codes...

const underwaterEffect = new UnderwaterEffect(renderer, scene, camera);

function animate() {
  requestAnimationFrame(animate);

  // Update any animations or state...

  underwaterEffect.render();
}

// Handle resize
window.addEventListener("resize", onWindowResize, false);
function onWindowResize() {
  camera.aspect = window.innerWidth / window.innerHeight;
  camera.updateProjectionMatrix();
  renderer.setSize(window.innerWidth, window.innerHeight);

  underwaterEffect.resize(window.innerWidth, window.innerHeight);
}

About

Some useful shaders you can use in three.js project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published