const sound = new Audio("./sa.mp3");
sound.currentTime = 0;//start time (do not have to enter)
sound.play().catch(()=>{});
sound.volume = 1;
sound.loop = true;
(android, macos, windows, linux) for those other than
To prevent sudden sound in browsers: if you do play() directly, it will give an erorr. the user will not give an error when the user presses a key or clicks somewhere. (you can do something like press a key to start the game).
more information:
Add
autocomponentsound(
true,//add or remove
sound,//example: const sound = new Audio("./sa.mp3");
player1.name,//Enter the name of 1 obje
player2.name,//Enter the name of 2 obje
area//you choose how much area you want to have, manually 1.5 is set (you don't have to enter it)
)
Remove
autocomponentsound(false,sound)
Shaders
You may need to turn this feature on onload
onload.js
{
autoshaders:20000//One hour advances in a game every 20 minutes
autoshaders:0//if you do this, you will shut down the system
}