I’ve imported the chromakey code into my project but keep getting an error when trying to run it in the simulator.
This is the error message: App Build Failed:
Hash: 933c67dcc9601c969793
Version: webpack 4.44.1
Time: 4620ms
Built at: 01/25/2025 7:41:16 AM
Asset Size Chunks Chunk Names
…/…/…/src/focusedarts.mapping-okemah/THREE.d.ts 11 bytes
…/…/…/src/focusedarts.mapping-okemah/portal.d.ts 11 bytes
asset-manifest-457339687083e9dcf1cba70b3cc68a63d22faed8-291c591080533607955a4ce62b8872f0.json 436 bytes
Entrypoint main =
[0] ./node_modules/@8thwall/ecs/index.js 27 bytes {0} [built]
[1] ./_scene.json 9.07 KiB {0} [built]
[2] ./_asset-manifest.json 392 bytes {0} [built]
[3] ./THREE.ts 355 bytes {0} [built]
[4] ./portal.ts 1010 bytes {0} [built]
[5] ./_entry.js + 1 modules 1.92 KiB {0} [built]
| ./_entry.js 296 bytes [built]
| ./chromakey.js 1.61 KiB [built]
ERROR in ./chromakey.js
Module not found: Error: Can’t resolve ‘./chromakey-material’ in ‘/tmp/src/focusedarts.mapping-okemah’
@ ./chromakey.js 5:0-57 41:34-51
@ ./_entry.js
ERROR in chunk main [entry]
bundle-457339687083e9dcf1cba70b3cc68a63d22faed8-291c591080533607955a4ce62b8872f0.js
/var/task/node_modules/babel-loader/lib/index.js??ref–4!/tmp/src/focusedarts.mapping-okemah/_entry.js 220132c73a127bd2720a2f1191426328260126fb6bce670c4feeeed95badf86a
Unexpected token (42:34)
| var object3d = world.three.entityToObject.get(component.eid);
| var keyColor = new THREE.Color(“rgb(”.concat(r, ", ").concat(g, ", ").concat(b, “)”));
| var greenScreenMaterial = new !(function webpackMissingModule() { var e = new Error(“Cannot find module ‘./chromakey-material’”); e.code = ‘MODULE_NOT_FOUND’; throw e; }())(video, keyColor, width, height, similarity, smoothness, spill);
| setTimeout(function () {
| object3d.material = greenScreenMaterial;