this wasn't working:
const { override, addExternalBabelPlugin } = require('customize-cra');
module.exports = override(addExternalBabelPlugin('babel-plugin-react-engine'))
this instead worked:
export const createNewPhysicsLoopWebWorker = (stepRate: number) => { | |
return new Worker('data:application/javascript,' + | |
encodeURIComponent(` | |
var start = performance.now(); | |
var updateRate = ${stepRate}; | |
function getNow() { | |
return start + performance.now(); | |
} |
this wasn't working:
const { override, addExternalBabelPlugin } = require('customize-cra');
module.exports = override(addExternalBabelPlugin('babel-plugin-react-engine'))
this instead worked:
Just chucking up a random gist to document that if you're trying to create a positional audio
in threejs via a stream that's passed in remotely (i.e. not initiated within the current browser)
then you will need to create a new Audio (not threejs Audio, the native browser Audio) object and set the srcObject
to the stream.
I suspect this activates the stream. Whereas a locally initiated stream is already active, hence why some of the examples I
found demo'ing setMediaStreamSource
worked, because the stream was local.
So here's my code to demonstrate this.