This file contains hidden or 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
| How To Gulp Basics | |
| # Crée un dossier projet et go dedans | |
| mkdir myProject && cd myProject | |
| # Crée un fichier config npm pour sauvegarder le nom des paquets installés. | |
| touch packages.json | |
| # Installe Gulp globalement |
This file contains hidden or 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
| How To Gulp + Sass Basics | |
| # Crée un dossier projet et go dedans | |
| mkdir myProject && cd myProject | |
| # Crée un fichier config npm pour sauvegarder le nom des paquets installés. | |
| touch package.json | |
| # Installe Gulp globalement |
This file contains hidden or 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
| export const getWorldVisibleHeight = (camera) => { | |
| const vFOV = camera.fov * Math.PI / 180; | |
| return 2 * Math.tan(vFOV / 2) * (camera.position.z) | |
| } | |
| export const worldToPx = (value, camera) => { | |
| const worldHeight = getWorldVisibleHeight(camera) | |
| return value * worldHeight * window.innerHeight | |
| } |
This file contains hidden or 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 matcapTexture = new THREE.TextureLoader().load(matcap); | |
| const material = new THREE.MeshMatcapMaterial({ | |
| color: 0xFFFFFF, | |
| matcap: matcapTexture | |
| }); | |
| const uniforms = { | |
| uTime: { value: 0 } | |
| }; |