
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
A lightweight game loop written to prioritize updates and fill in with extra renders.
A lightweight game loop written to prioritize updates and fill in with extra renders.
Updates will be called as accurately as possible while render operations will happen as often as possible. If, for some reason, lag has caused more than enough time for more than one update to occur they will be called sequentially until caught up. A render will always happen afterwards upates are done.
Testing and dev are done with babel.
import Powertrain from 'powertrain'
const engine = new Powertrain({
playspeed: 1, // optional, default = 1
fps: 60, // optional, default = 60
update: () => {}, // optional, default = no-op
render: () => {}, // optional, default = no-op
})
engine.start()
engine.stop()
constructor()| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
| obj.playSpeed | number | 1 | A scalar for the speed of play. | |
| obj.fps | number | 60 | The target fraes per second. This is the number of updates per second that should occur. Not the number of renders. | |
| obj.update | function | ()=>{} | The function to update game logic. | |
| obj.render | function | (scalar)=>{} | The function to render the game. Accepts a scalar representing progress towards next frame. Can be used for interpolation. |
start()Starts update loop and sets running flag to true and calls for a requestAnimationFrame (provided by a crossplatform polyfill).
stop()Sets running flag to false. This will stop the loop.
It is greatly appreciated! 🎉
https://github.com/limeandcoconut
Cheers!
ISC, see LICENSE.md for details.
FAQs
A lightweight game loop written to prioritize updates and fill in with extra renders.
We found that powertrain demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.