A variation on an older pen: https://codepen.io/carolineartz/pen/VwYwZaP
beyond the obvious differences, this version uses gsap vs the linked pen animates via css.
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 750 500" preserveAspectRatio="xMidYMax slice"> | |
<defs> | |
<!-- Scene 1 Gradient --> | |
<linearGradient id="grad1" x1="-154.32" y1="263.27" x2="-154.32" y2="374.3" | |
gradientTransform="matrix(-1, 0, 0, 1.36, 231.36, -100.14)" gradientUnits="userSpaceOnUse"> | |
<stop offset="0.07" stop-color="#9c536b" /> | |
<stop offset="0.98" stop-color="#d98981" /> | |
</linearGradient> | |
<radialGradient id="bg_grad" cx="375" cy="-35" r="318.69" gradientUnits="userSpaceOnUse"> | |
<stop offset="0.1" stop-color="#F5C54E" id="sun" /> |
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 750 500" preserveAspectRatio="xMidYMax slice"> | |
<defs> | |
<!-- Scene 1 Gradient --> | |
<linearGradient id="grad1" x1="-154.32" y1="263.27" x2="-154.32" y2="374.3" | |
gradientTransform="matrix(-1, 0, 0, 1.36, 231.36, -100.14)" gradientUnits="userSpaceOnUse"> | |
<stop offset="0.07" stop-color="#9c536b" /> | |
<stop offset="0.98" stop-color="#d98981" /> | |
</linearGradient> | |
<radialGradient id="bg_grad" cx="375" cy="-35" r="318.69" gradientUnits="userSpaceOnUse"> | |
<stop offset="0.1" stop-color="#F5C54E" id="sun" /> |
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 750 500" preserveAspectRatio="xMidYMax slice"> | |
<defs> | |
<!-- Scene 1 Gradient --> | |
<linearGradient id="grad1" x1="-154.32" y1="263.27" x2="-154.32" y2="374.3" | |
gradientTransform="matrix(-1, 0, 0, 1.36, 231.36, -100.14)" gradientUnits="userSpaceOnUse"> | |
<stop offset="0.07" stop-color="#9c536b" /> | |
<stop offset="0.98" stop-color="#d98981" /> | |
</linearGradient> | |
<radialGradient id="bg_grad" cx="375" cy="-35" r="318.69" gradientUnits="userSpaceOnUse"> | |
<stop offset="0.1" stop-color="#F5C54E" id="sun" /> |
<script id="vertexShader" type="x-shader/x-vertex"> | |
#include <fog_pars_vertex> | |
uniform float uTime; | |
uniform float uBigWavesElevation; | |
uniform vec2 uBigWavesFrequency; | |
uniform float uBigWaveSpeed; | |
uniform float uSmallWavesElevation; |
<script id="vertexShader" type="x-shader/x-vertex"> | |
#include <fog_pars_vertex> | |
uniform float uTime; | |
uniform float uBigWavesElevation; | |
uniform vec2 uBigWavesFrequency; | |
uniform float uBigWaveSpeed; | |
uniform float uSmallWavesElevation; |
<div id="main"> | |
<h1>something</h1> | |
<div class="content"> | |
<p>You can press <kbd>▲</kbd> <kbd>▼</kbd> on your keyboard or swipe up/down to navigate. Mouse wheel works too.</p> | |
<p><a href="https://codepen.io/theseventh" target="_blank">codepen</a> // <a href="https://twitter.com/the_seventh_kek" target="_blank">twitter</a> | |
</div> | |
<div class="buttons"> | |
<button class="next" onclick="go(-1)"></button> | |
<button class="prev" onclick="go(1)"></button> | |
</div> |
<div id="main"> | |
<h1>something</h1> | |
<div class="content"> | |
<p>You can press <kbd>▲</kbd> <kbd>▼</kbd> on your keyboard or swipe up/down to navigate. Mouse wheel works too.</p> | |
<p><a href="https://codepen.io/theseventh" target="_blank">codepen</a> // <a href="https://twitter.com/the_seventh_kek" target="_blank">twitter</a> | |
</div> | |
<div class="buttons"> | |
<button class="next" onclick="go(-1)"></button> | |
<button class="prev" onclick="go(1)"></button> | |
</div> |
<div id="canvas_container"></div> | |
<button id="fullscr">Go Fullscreen</button> |
<div id="canvas_container"></div> | |
<button id="fullscr">Go Fullscreen</button> |
A variation on an older pen: https://codepen.io/carolineartz/pen/VwYwZaP
beyond the obvious differences, this version uses gsap vs the linked pen animates via css.