hydra-synth / hydra

Livecoding networked visuals in the browser
https://hydra.ojack.xyz
GNU Affero General Public License v3.0
2.12k stars 255 forks source link

Hydra three.js integration needs updating (+workaround) #293

Open crcdng opened 4 months ago

crcdng commented 4 months ago

three.js has deprecated and removed their 'vanilla' JavaScript build in favour of ESM / Modules. Therefore in the Hydra -> external libraries -> three.js example

await loadScript("https://threejs.org/build/three.js")

does not work anymore. A workaround is to load an older version of three.js < r160 from a CDN.

Example

await loadScript("https://cdn.jsdelivr.net/gh/mrdoob/three.js@r159/build/three.js")