Skip to content

Instantly share code, notes, and snippets.

{
"style": {
"color": {
"BG": {
"0": {
"type": "SOLID",
"value": "#0c0f10"
},
"1": {
"type": "SOLID",
<div class="p-summary">
<h1>Hello</h1>
</div>
<canvas class="p-canvas-webgl" id="canvas-webgl"></canvas>
@davidbwaters
davidbwaters / filter-goo-4
Created July 23, 2021 13:46
filter-goo-4
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" class="svg-filters">
<defs>
<filter id="filter-goo-4">
<feGaussianBlur in="SourceGraphic" stdDeviation="7" result="blur" />
<feColorMatrix in="blur" mode="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 19 -9" result="goo" />
</filter>
</defs>
</svg>
/*
* Scripts - Utilities - Preload Images
*/
export function imagesPreload(imageUrls) {
let images = []
let count = 0
@davidbwaters
davidbwaters / index.html
Created December 31, 2020 20:36
Simple Radial Mouse Cursor
<h2>
Simple Radial Mouse Cursor
<br><small>25 lines of JavaScript</small>
</h2>
<div id="mouse-circle"></div>
<script type="text/javascript">
$('.lecture_complete_button').click((evt) => {
const progBar = document.querySelector('.progressbar')
if (progBar.style.minWidth !== '50%') {
progBar.style.minWidth = '50%'
document.querySelector('span.percentage').innerText = '50%'
}
})
</script>
@davidbwaters
davidbwaters / io.js
Last active December 22, 2020 03:38
intersection observer direction helpers
let previousY = 0
let previousRatio = 0
function getObserverEntryInfo(entry, previousY, previousRatio) {
let direction
let approach
const hasLargerRatio =
entry.intersectionRatio > previousRatio
@davidbwaters
davidbwaters / horizontal-website.markdown
Created September 28, 2020 21:08
Horizontal Website
@davidbwaters
davidbwaters / index.pug
Created July 23, 2020 12:48
Single line waveform formulas
canvas#canvas Your browser doesn't support the HTML5 Canvas element :(