Just joined, been experimenting with Babylon.js for a month or so now. I tried to copy some code from the playground ( https://playground.babylonjs.com/#AY28VL#4 ) to my machine and run it but the GUI.js file doesn’t seem to be loading correctly.
Here’s the code where it blows up:
var advancedTexture = BABYLON.GUI.AdvancedDynamicTexture.CreateFullscreenUI("UI"); var colorArray = ["white", "blue", "green", "black", "red"]; // Activate the clipboard events listener advancedTexture.registerClipboardEvents();
With the error:
“Uncaught TypeError: advancedTexture.registerClipboardEvents is not a function”
Do I have to use npm and install BABYLON.GUI.js to use the GUI library?
Do I have to install webpack too?
What I tried was
which works for babylon.max.js but not the GUI…
(Been trying to learn npm and import/export but haven’t got there yet.)
thanks in advance