MCPcopy Create free account
hub / github.com/codemistic/Web-Development / updateGround

Function updateGround

JS - Chrome Dino Game Clone/ground.js:15–23  ·  view source on GitHub ↗
(delta, speedScale)

Source from the content-addressed store, hash-verified

13}
14
15export function updateGround(delta, speedScale) {
16 groundElems.forEach(ground => {
17 incrementCustomProperty(ground, "--left", delta * speedScale * SPEED * -1)
18
19 if (getCustomProperty(ground, "--left") <= -300) {
20 incrementCustomProperty(ground, "--left", 600)
21 }
22 })
23}

Callers 1

updateFunction · 0.90

Calls 2

incrementCustomPropertyFunction · 0.90
getCustomPropertyFunction · 0.90

Tested by

no test coverage detected