This file contains 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
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' |
This file contains 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
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' |
This file contains 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
import { | |
Mesh, | |
Plane, | |
Program, | |
Texture, | |
Vec2 | |
} from '@/lib/ogl' | |
import gsap from 'gsap' |
This file contains 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
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 { |
This file contains 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
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 |
This file contains 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
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 { |
This file contains 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
import { Events } from '@/events' | |
import store from '@/store' | |
const keyCodes = { | |
LEFT: 37, | |
UP: 38, | |
RIGHT: 39, | |
DOWN: 40, | |
SPACE: 32 | |
} |
This file contains 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
import { | |
Mesh, | |
PlaneBufferGeometry, | |
ShaderMaterial, | |
LinearFilter, | |
Vector2 | |
} from 'three' | |
import gsap from 'gsap' |
This file contains 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
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 |
This file contains 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
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; |