π’Sounds and Shaders
Who wants to listen to rickroll?
Sounds
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:https://goo.gl/xX8pDD
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
Shaders
You may need to turn this feature on onload
The character must have shadow.status = true. and as a suggestion, do not assign blur to the character
Last updated