This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Tested on https://thebookofshaders.com/edit.php | |
// bezier function from https://www.shadertoy.com/view/sdjBRy | |
// if more control point needed : https://github.com/yiwenl/glsl-bezier-curve/blob/master/index.glsl | |
#ifdef GL_ES | |
precision mediump float; | |
#endif | |
uniform vec2 u_resolution; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const frustumHeight = 2.0 * dist * Math.tan(camera.fov * 0.5 * (Math.PI / 180)) | |
const frustumWidth = frustumHeight * aspect |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
feat: A new feature | |
fix: A bug fix | |
docs: Documentation only changes | |
style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) | |
refactor: A code change that neither fixes a bug nor adds a feature | |
perf: A code change that improves performance | |
test: Adding missing or correcting existing tests | |
chore: Changes to the build process or auxiliary tools and libraries such as documentation generation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
current -= ( target + current ) * friction | |
current += ( target - current ) * friction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ 'method1', 'method2' ] | |
.forEach( ( fn ) => this[ fn ] = this[ fn ].bind( this ) ); |