MCPcopy Create free account
hub / github.com/NianBroken/Firework_Simulator / togglePause

Function togglePause

js/script.js:230–242  ·  view source on GitHub ↗
(toggle)

Source from the content-addressed store, hash-verified

228// ---------
229
230function togglePause(toggle) {
231 const paused = store.state.paused;
232 let newValue;
233 if (typeof toggle === "boolean") {
234 newValue = toggle;
235 } else {
236 newValue = !paused;
237 }
238
239 if (paused !== newValue) {
240 store.setState({ paused: newValue });
241 }
242}
243
244function toggleSound(toggle) {
245 if (typeof toggle === "boolean") {

Callers 3

initFunction · 0.85
handlePointerStartFunction · 0.85
handleKeydownFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected