Skip to content

Instantly share code, notes, and snippets.

import gsap from 'gsap'
import { Renderer, Camera, Transform, Post, Vec2 } from '@/lib/ogl'
import { evt, u, store } from '@/app/index'
import Pool from './Pool'
import { Bg } from './components'
import fragment from './shaders/pass/frag.frag'
import Talk from 'talkjs'
const uneeqPackage = require('uneeq-js');
import { evt, u, store } from '@/app/index.js'
const { qs } = u
const { dom } = store
const GET_TOKEN_URL = 'tokenurl'
import {
Mesh,
Plane,
Program,
Texture,
Vec2
} from '@/lib/ogl'
import gsap from 'gsap'
import gsap from 'gsap'
import DrawSVGPlugin from '../lib/DrawSVGPlugin'
import store from '../store'
import { bindAll, qsa } from '../utils'
import { Events } from '../events'
gsap.registerPlugin(DrawSVGPlugin)
export default class {
import gsap from 'gsap'
import { evt, u, store } from '@/app/index'
const { flags, bounds } = store
const { rect, qsa, qs } = u
export default class {
constructor(elems = qsa('[data-smooth-item]')) {
this.elems = elems
import gsap from 'gsap'
import { store, u } from '@/app/index'
import { Transform } from '@/lib/ogl'
import Core from './Core'
const { dom, bounds } = store
const { qs, rect } = u
export default class extends Transform {
import { Events } from '@/events'
import store from '@/store'
const keyCodes = {
LEFT: 37,
UP: 38,
RIGHT: 39,
DOWN: 40,
SPACE: 32
}
import {
Mesh,
PlaneBufferGeometry,
ShaderMaterial,
LinearFilter,
Vector2
} from 'three'
import gsap from 'gsap'
import gsap from 'gsap'
import { qs, qsa, rect } from '@/utils'
import { Events } from '@/events'
import store from '@/store'
export default class {
constructor(elems = qsa('[data-stick]')) {
this.elems = [...elems]
this.cache = null
init() {
this.x = 0
}
updateX(x = 0) {
const pos = x + this.x // this.x is the value from the slider, which is added onto the regular x value
const { left } = this.bounds
this.position.x = -(this.camUnit.width / 2) + (this.scale.x / 2);
this.position.x += ((left + pos) / store.bounds.ww) * this.camUnit.width;