├── .eslintrc.json ├── .gitignore ├── README.md ├── dist ├── bundle.js └── bundle.js.map ├── index.html ├── package-lock.json ├── package.json ├── preview.jpg ├── rollup.config.js ├── src ├── lib │ ├── PaintRenderer.js │ └── Projector.js └── main.js └── style.css /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "es6": true 5 | }, 6 | "extends": "eslint:recommended", 7 | "parserOptions": { 8 | "sourceType": "module", 9 | "ecmaVersion": 2017 10 | }, 11 | "rules": { 12 | "no-console": "off", 13 | "accessor-pairs": [ 14 | "error", 15 | { 16 | "getWithoutSet": false, 17 | "setWithoutGet": false 18 | } 19 | ], 20 | "array-bracket-newline": "off", 21 | "array-bracket-spacing": [ 22 | "error", 23 | "never" 24 | ], 25 | "array-callback-return": "off", 26 | "array-element-newline": "off", 27 | "arrow-body-style": "error", 28 | "arrow-parens": [ 29 | "error", 30 | "as-needed" 31 | ], 32 | "arrow-spacing": "off", 33 | "block-scoped-var": "off", 34 | "block-spacing": "off", 35 | "brace-style": [ 36 | "error", 37 | "1tbs", 38 | { 39 | "allowSingleLine": true 40 | } 41 | ], 42 | "callback-return": "error", 43 | "camelcase": "error", 44 | "capitalized-comments": "off", 45 | "class-methods-use-this": "off", 46 | "comma-dangle": "error", 47 | "comma-spacing": "off", 48 | "comma-style": [ 49 | "error", 50 | "last" 51 | ], 52 | "complexity": "off", 53 | "computed-property-spacing": [ 54 | "error", 55 | "never" 56 | ], 57 | "consistent-return": "off", 58 | "consistent-this": "off", 59 | "curly": "off", 60 | "default-case": "off", 61 | "dot-location": [ 62 | "error", 63 | "property" 64 | ], 65 | "dot-notation": [ 66 | "error", 67 | { 68 | "allowKeywords": true 69 | } 70 | ], 71 | "eol-last": "off", 72 | "eqeqeq": "off", 73 | "for-direction": "error", 74 | "func-call-spacing": "error", 75 | "func-name-matching": "off", 76 | "func-names": "off", 77 | "func-style": "off", 78 | "function-paren-newline": "off", 79 | "generator-star-spacing": "off", 80 | "getter-return": "error", 81 | "global-require": "error", 82 | "guard-for-in": "off", 83 | "handle-callback-err": "error", 84 | "id-blacklist": "error", 85 | "id-length": "off", 86 | "id-match": "error", 87 | "implicit-arrow-linebreak": [ 88 | "error", 89 | "beside" 90 | ], 91 | "indent": "off", 92 | "indent-legacy": "off", 93 | "init-declarations": "off", 94 | "jsx-quotes": "error", 95 | "key-spacing": "off", 96 | "keyword-spacing": "off", 97 | "line-comment-position": "off", 98 | "linebreak-style": [ 99 | "error", 100 | "unix" 101 | ], 102 | "lines-around-comment": "off", 103 | "lines-around-directive": "off", 104 | "lines-between-class-members": [ 105 | "error", 106 | "always", 107 | { 108 | "exceptAfterSingleLine": true 109 | } 110 | ], 111 | "max-depth": "error", 112 | "max-len": "off", 113 | "max-lines": "off", 114 | "max-nested-callbacks": "error", 115 | "max-params": "off", 116 | "max-statements": "off", 117 | "max-statements-per-line": "off", 118 | "multiline-comment-style": [ 119 | "error", 120 | "separate-lines" 121 | ], 122 | "multiline-ternary": [ 123 | "error", 124 | "always-multiline" 125 | ], 126 | "new-parens": "error", 127 | "newline-after-var": "off", 128 | "newline-before-return": "off", 129 | "newline-per-chained-call": "error", 130 | "no-alert": "error", 131 | "no-array-constructor": "error", 132 | "no-await-in-loop": "error", 133 | "no-bitwise": "error", 134 | "no-buffer-constructor": "error", 135 | "no-caller": "error", 136 | "no-catch-shadow": "error", 137 | "no-cond-assign": [ 138 | "error", 139 | "except-parens" 140 | ], 141 | "no-confusing-arrow": "error", 142 | "no-continue": "off", 143 | "no-div-regex": "error", 144 | "no-duplicate-imports": "error", 145 | "no-else-return": "error", 146 | "no-empty-function": "off", 147 | "no-eq-null": "error", 148 | "no-eval": "error", 149 | "no-extend-native": "error", 150 | "no-extra-bind": "error", 151 | "no-extra-label": "error", 152 | "no-extra-parens": "off", 153 | "no-floating-decimal": "error", 154 | "no-implicit-coercion": [ 155 | "error", 156 | { 157 | "boolean": false, 158 | "number": false, 159 | "string": false 160 | } 161 | ], 162 | "no-implicit-globals": "error", 163 | "no-implied-eval": "error", 164 | "no-inline-comments": "off", 165 | "no-inner-declarations": [ 166 | "error", 167 | "functions" 168 | ], 169 | "no-invalid-this": "off", 170 | "no-iterator": "error", 171 | "no-label-var": "error", 172 | "no-labels": "error", 173 | "no-lone-blocks": "error", 174 | "no-lonely-if": "off", 175 | "no-loop-func": "error", 176 | "no-magic-numbers": "off", 177 | "no-mixed-operators": "off", 178 | "no-mixed-requires": "error", 179 | "no-multi-assign": "off", 180 | "no-multi-spaces": "error", 181 | "no-multi-str": "error", 182 | "no-multiple-empty-lines": "error", 183 | "no-native-reassign": "error", 184 | "no-negated-condition": "off", 185 | "no-negated-in-lhs": "error", 186 | "no-nested-ternary": "off", 187 | "no-new": "error", 188 | "no-new-func": "off", 189 | "no-new-object": "error", 190 | "no-new-require": "error", 191 | "no-new-wrappers": "error", 192 | "no-octal-escape": "error", 193 | "no-param-reassign": "off", 194 | "no-path-concat": "error", 195 | "no-plusplus": "off", 196 | "no-process-env": "error", 197 | "no-process-exit": "error", 198 | "no-proto": "error", 199 | "no-prototype-builtins": "error", 200 | "no-restricted-globals": "error", 201 | "no-restricted-imports": "error", 202 | "no-restricted-modules": "error", 203 | "no-restricted-properties": "error", 204 | "no-restricted-syntax": "error", 205 | "no-return-assign": "off", 206 | "no-return-await": "error", 207 | "no-script-url": "error", 208 | "no-self-compare": "error", 209 | "no-sequences": "off", 210 | "no-shadow": "off", 211 | "no-shadow-restricted-names": "error", 212 | "no-spaced-func": "error", 213 | "no-sync": "error", 214 | "no-tabs": "off", 215 | "no-template-curly-in-string": "error", 216 | "no-ternary": "off", 217 | "no-throw-literal": "error", 218 | "no-trailing-spaces": "off", 219 | "no-undef-init": "error", 220 | "no-undefined": "off", 221 | "no-underscore-dangle": "off", 222 | "no-unmodified-loop-condition": "error", 223 | "no-unneeded-ternary": "error", 224 | "no-unused-expressions": "off", 225 | "no-use-before-define": "off", 226 | "no-useless-call": "error", 227 | "no-useless-computed-key": "error", 228 | "no-useless-concat": "error", 229 | "no-useless-constructor": "off", 230 | "no-useless-rename": "error", 231 | "no-useless-return": "off", 232 | "no-var": "off", 233 | "no-void": "off", 234 | "no-warning-comments": "error", 235 | "no-whitespace-before-property": "error", 236 | "no-with": "error", 237 | "nonblock-statement-body-position": "error", 238 | "object-curly-newline": "off", 239 | "object-curly-spacing": "off", 240 | "object-shorthand": "off", 241 | "one-var": "off", 242 | "one-var-declaration-per-line": "off", 243 | "operator-assignment": "off", 244 | "operator-linebreak": "off", 245 | "padded-blocks": "off", 246 | "padding-line-between-statements": "error", 247 | "prefer-arrow-callback": "off", 248 | "prefer-const": "off", 249 | "prefer-destructuring": "off", 250 | "prefer-numeric-literals": "error", 251 | "prefer-promise-reject-errors": "error", 252 | "prefer-reflect": "off", 253 | "prefer-rest-params": "off", 254 | "prefer-spread": "error", 255 | "prefer-template": "off", 256 | "quote-props": "off", 257 | "quotes": "off", 258 | "radix": [ 259 | "error", 260 | "always" 261 | ], 262 | "require-await": "error", 263 | "require-jsdoc": "off", 264 | "rest-spread-spacing": [ 265 | "error", 266 | "never" 267 | ], 268 | "semi": "off", 269 | "semi-spacing": [ 270 | "error", 271 | { 272 | "after": true, 273 | "before": false 274 | } 275 | ], 276 | "semi-style": [ 277 | "error", 278 | "last" 279 | ], 280 | "sort-imports": "error", 281 | "sort-keys": "off", 282 | "sort-vars": "off", 283 | "space-before-blocks": "off", 284 | "space-before-function-paren": "off", 285 | "space-in-parens": [ 286 | "error", 287 | "never" 288 | ], 289 | "space-infix-ops": "off", 290 | "space-unary-ops": "error", 291 | "spaced-comment": "off", 292 | "strict": "off", 293 | "switch-colon-spacing": "error", 294 | "symbol-description": "error", 295 | "template-curly-spacing": [ 296 | "error", 297 | "never" 298 | ], 299 | "template-tag-spacing": [ 300 | "error", 301 | "never" 302 | ], 303 | "unicode-bom": [ 304 | "error", 305 | "never" 306 | ], 307 | "valid-jsdoc": "off", 308 | "vars-on-top": "off", 309 | "wrap-iife": "off", 310 | "wrap-regex": "off", 311 | "yield-star-spacing": "off", 312 | "yoda": "off" 313 | } 314 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Using THREE.js in a Houdini Paint 2 | 3 | This is weird and terrible. 4 | 5 | We use a THREE.js Canvas Renderer in a paint worklet!! 6 | 7 | The worklet code is in [main.js](https://github.com/AdaRoseCannon/three-paint/blob/master/src/main.js) 8 | 9 | Use `npm run start` to build it. 10 | 11 | Use it in HTML like so: 12 | 13 | 14 | ```html 15 | 16 | 26 | 27 | 28 |
Three.js in a Paint Worklet Demo Source: Three Paint on Github.
30 |
© MIT License, Ada Rose Cannon 2018.