~thewhodidthis/hypnotized unlisted

17d8630d9be5e4aaa9a032d1873db96df4d0ea6d — Sotiri Bakagiannis 3 months ago 91ed772
git/package/js: up three, switch to esbuild
4 files changed, 8 insertions(+), 31 deletions(-)

M package.json
M painter.js
D rollup.config.js
D vendor/three.js
M package.json => package.json +7 -10
@@ 28,16 28,16 @@
  "scripts": {
    "prebuild": "mkdir -p public; cp -rp static/* public/",
    "build": "npm run build:js && npm run build:css && npm run build:html",
    "postbuild": "terser -cmo public/service-worker.js service-worker.js",
    "postbuild": "esbuild service-worker.js --bundle --minify --outdir=public",
    "build:css": "postcss -o public/index.css index.css",
    "build:html": "mustache package.json index.mustache public/index.html",
    "build:js": "rollup -c -f iife client.js | terser -cmo public/index.js",
    "build:js": "esbuild client.js --bundle --minify --outfile=public/index.js",
    "lint": "npm run lint:js && npm run lint:css",
    "lint:css": "stylelint *.css",
    "lint:js": "eslint *.js",
    "start": "NODE_ENV=development node server",
    "test": "rollup -c -f iife test.js | kpow",
    "watch": "rollup -w -c -f iife client.js -o public/index.js"
    "test": "esbuild test.js --bundle | kpow",
    "watch": "npm run build:js -- --watch"
  },
  "config": {
    "date": "2012-21",


@@ 62,17 62,16 @@
    }
  },
  "dependencies": {
    "three": "^0.115.0"
    "three": "^0.126.0"
  },
  "devDependencies": {
    "@rollup/plugin-alias": "^3.1.2",
    "@rollup/plugin-node-resolve": "^11.1.1",
    "@thewhodidthis/animation": "^0.1.22",
    "@thewhodidthis/ease": "^1.0.17",
    "@thewhodidthis/eslint-config": "^0.1.7",
    "@thewhodidthis/reset.css": "^0.0.19",
    "cssnano": "^4.1.10",
    "cutaway": "^0.0.11",
    "esbuild": "^0.9.0",
    "eslint": "^7.19.0",
    "fullscream": "^1.0.14",
    "kpow": "^0.1.8",


@@ 80,11 79,9 @@
    "postcss": "^8.2.4",
    "postcss-cli": "^8.3.1",
    "postcss-preset-env": "^6.7.0",
    "rollup": "^2.38.3",
    "stylelint": "^13.9.0",
    "stylelint-config-standard": "^20.0.0",
    "tapeless": "^1.0.3",
    "terser": "^5.5.1"
    "tapeless": "^1.0.3"
  },
  "engines": {
    "node": ">=6.11.0",

M painter.js => painter.js +1 -1
@@ 23,7 23,7 @@ const createPicture = (canvas, cutoff) => {

  scene.add(camera)

  const geometry = new TorusKnotGeometry(5, 10, 2000, 5, 200, 0)
  const geometry = new TorusKnotGeometry(5, 15, 2000, 5, 20, 0)
  const material = new ShaderMaterial({
    fragmentShader,
    vertexShader,

D rollup.config.js => rollup.config.js +0 -14
@@ 1,14 0,0 @@
import find from '@rollup/plugin-node-resolve'

export default {
  onwarn: (message) => {
    if (message.code !== 'CIRCULAR_DEPENDENCY') {
      console.warn('(!)', message.toString())
    }
  },
  plugins: [
    find({
      browser: true
    })
  ]
}

D vendor/three.js => vendor/three.js +0 -6
@@ 1,6 0,0 @@
export { PerspectiveCamera } from '../node_modules/three/src/cameras/PerspectiveCamera'
export { Scene } from '../node_modules/three/src/scenes/Scene'
export { WebGLRenderer } from '../node_modules/three/src/renderers/WebGLRenderer'
export { Mesh } from '../node_modules/three/src/objects/Mesh'
export { ShaderMaterial } from '../node_modules/three/src/materials/ShaderMaterial'
export { TorusKnotGeometry } from '../node_modules/three/src/geometries/TorusKnotGeometry'