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
| <ScrollControls pages={3} damping={0.1} horizontal> | |
| {/* Canvas contents in here will *not* scroll, but receive useScroll! */} | |
| <Scroll> | |
| {/* Canvas contents in here will scroll along */} | |
| </Scroll> | |
| <Scroll html> | |
| {/* DOM contents in here will scroll along */} | |
| </Scroll> | |
| </ScrollControls> |
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
| uniform float time; | |
| uniform vec2 resolution; | |
| uniform vec2 mouse; | |
| uniform vec3 spectrum; | |
| uniform sampler2D startImage; | |
| in VertexData | |
| { | |
| vec4 v_position; |
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
| mport "../libs/gsap/gsap.min"; | |
| import ScrollMagic from "../libs/smooth/ScrollMagic"; | |
| import Scrollbar from "../libs/smooth/smooth-scrollbar"; | |
| export default class SmoothScroll { | |
| constructor() { | |
| this.init(); | |
| } | |
| init() { |
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
| html, body, div, span, applet, object, iframe, | |
| h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
| a, abbr, acronym, address, big, cite, code, | |
| del, dfn, em, img, ins, kbd, q, s, samp, | |
| small, strike, strong, sub, sup, tt, var, | |
| b, u, i, center, | |
| dl, dt, dd, ol, ul, li, | |
| fieldset, form, label, legend, | |
| table, caption, tbody, tfoot, thead, tr, th, td, | |
| article, aside, canvas, details, embed, |
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 mainTag = document.querySelector("main") | |
| const bodyTag = document.querySelector("body") | |
| const cursorTag = document.querySelector("div.cursor") | |
| const cursorInnerTag = document.querySelector("div.cursor-inner") | |
| const captions = document.querySelectorAll("figcaption") | |
| const motion = window.matchMedia('(prefers-reduced-motion: no-preference)') | |
| const large = window.matchMedia('(min-width: 600px)') |
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
| rgbKineticSlider = new rgbKineticSlider({ | |
| slideImages: images, | |
| backgroundDisplacementSprite: "https://i.ibb.co/N246LxD/map-9.jpg", | |
| cursorDisplacementSprite: "https://i.ibb.co/KrVr51f/displace-circle.png", | |
| cursorImgEffect: true, | |
| cursorTextEffect: true, | |
| cursorScaleIntensity: 0.65, | |
| cursorMomentum: 0.14, | |
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
| let speed = 0; | |
| let position = 0; | |
| let rounded = 0; | |
| let block = document.getElementById("block"); | |
| window.addEventListener("wheel", (e) => { | |
| speed += e.deltaY * 0.0003; | |
| }); |
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
| let images = [...document.querySelectorAll(".img")]; | |
| let slider = document.querySelector(".slider"); | |
| let sliderWidth; | |
| let imageWidth; | |
| let current = 0; | |
| let target = 0; | |
| let ease = 0.05; | |
| images.forEach((img, idx) => { | |
| img.style.backgroundImage = `url(./images/${idx + 1}.jpg)`; |
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 canvasSketch = require("canvas-sketch"); | |
| const { lerp } = require("canvas-sketch-util/math"); | |
| const settings = { | |
| dimensions: [2048, 2048], | |
| }; | |
| const sketch = () => { | |
| //create local state | |
| //this fucntion returns points on the grid. |
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 canvasSketch = require("canvas-sketch"); | |
| const settings = { | |
| dimensions: [2048, 2048], | |
| }; | |
| const sketch = () => { | |
| return ({ context, width, height }) => { | |
| context.fillStyle = "orange"; | |
| context.fillRect(0, 0, width, height); |
NewerOlder