https://github.com/stegu/webgl-noise
Worley (cellular noise) exported as npm module: https://github.com/Erkaman/glsl-worley
https://github.com/stegu/webgl-noise
Worley (cellular noise) exported as npm module: https://github.com/Erkaman/glsl-worley
const Image = () => { | |
const ref = useRef() | |
// add webgl component to global canvas while mounted | |
useCanvas(<WebGlImage image={ref} />) | |
return <img ref={ref} src={...} /> | |
} |
export const wrapRootElement = ({ element }) => ( | |
<> | |
{element} | |
<GlobalCanvas/> | |
</> | |
) |
import React, { useEffect, useState } from 'react' | |
import PropTypes from 'prop-types' | |
import Helmet from 'react-helmet' | |
import classNames from 'classnames/bind' | |
import s from './WistiaEmbed.module.scss' | |
const cn = classNames.bind(s) | |
const WistiaEmbed = ({ id, play = false, style, options }) => { | |
// const el = useRef() |
footer { | |
// only include 1x size image for 'non-retina' screens | |
@include if-max-resolution(1.49) { | |
background-image: url('img/[email protected]'); | |
} | |
// only include 2x size image for 'retina' screens | |
@include if-min-resolution(1.5) { | |
background-image: url('img/[email protected]'); | |
background-size: 10.5625rem 1.5625rem; | |
} |
/* @author 14islands.com | |
* SASS mixins for future proof resolution media query | |
*/ | |
@mixin if-min-resolution($dppx) { | |
@include if-resolution(min, $dppx) { | |
@content; | |
} | |
} |
/** | |
* Causes the browser to reflow all elements on the page. | |
* Fix for the iOS5 bug where fixed positioned elements are | |
* unavailable after programmatically calling window.scrollTo() | |
* | |
* @autor [email protected] | |
*/ | |
reflowFixedPositions: function () { | |
document.documentElement.style.paddingRight = '1px'; |