
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
choppy2d-js
Advanced tools
**The ultra-lightweight game orchestration scenes and layers managers for Graphics Frameworks.**
An Scene and Layer manager for games and demos.
Choppy2d-js is a high-level logic orchestrator designed to manage scene complexity and multitasking through a robust Layer System. It is completely framework-agnostic, making it the perfect "Director" for any rendering engine.
| Feature | Description |
|---|---|
| Multitasking Z-Stack | Run multiple active layers simultaneously (Background, World, UI). |
| Instance Encapsulation | Every layer is a ChScene instance with its own private this context. |
| Auto-Management | Scenes can pause(), run(), reset(), or kill() themselves internally. |
| Safe Time-Step | Built-in protection against lag spikes (Time Clamping) to keep physics stable. |
Choppy2D-js v2.1 introduces Self-Healing Logic, a feature designed for high-precision games (Platformers, Rhythm games, etc.).
When a browser lag spike occurs, traditional engines often process a huge deltaTime, causing objects to clip through walls or bypass collision triggers. Choppy2D-js solves this with clampPause:
clampPause enabled will temporarily suspend their sceneScript.clampPause for Network/Socket layers to maintain real-time synchronization with a server while keeping your local physics safe.clampPause): Implemented a per-layer safety mechanism that prevents logical corruption during extreme frame-rate fluctuations (Lag Spikes).clampPause if deltaTime exceeds 100ms, effectively preventing "tunnelling" or physics clipping.initScript execution is never bypassed by the clamping logic, maintaining object lifecycle consistency.window.deltaTime) while shielding sensitive logic layers.Choppy2d-js v2.0 works perfectly as a Logic Controller for OpenFL's rendering engine.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Choppy2D v2.0 + OpenFL Demo</title>
<!-- 1. OpenFL Library via CDN -->
<script src="https://cdn.jsdelivr.net/npm/openfl@9.5.0/dist/openfl.min.js"></script>
<!-- 2. Your Engine (choppy.js) -->
<script src="choppy.js"></script>
<style>
body { margin: 0; overflow: hidden; background: #111; }
canvas { display: block; margin: 0 auto; }
</style>
</head>
<body>
<script>
// --- OPENFL SETUP ---
const stage = new openfl.display.Stage(800, 600, 0xFFFFFF);
document.body.appendChild(stage.element);
// --- CHOPPY 2.0 LOGIC ---
const engine = new Choppy();
// Player Layer
engine.addLayer(
function(self) {
if (this.sprite.x > 800) {
this.sprite.x = -50;
} else {
this.sprite.x += 200 * deltaTime;
}
this.sprite.rotation += 2;
},
"Player",
function(self) {
this.sprite = new openfl.display.Sprite();
this.sprite.graphics.beginFill(0x22AABB);
this.sprite.graphics.drawRect(-25, -25, 50, 50);
this.sprite.x = 100;
this.sprite.y = 300;
stage.addChild(this.sprite);
},
function(self) {
stage.removeChild(this.sprite);
}
);
// Run Engine
engine.play();
</script>
</body>
</html>
This project is licensed under the MIT License. You are free to use, modify, and distribute it as long as the copyright notice in the source code remains intact. Made with passion for the gamedev community with help of AI. Go build something fast! 🚀
FAQs
**The ultra-lightweight game orchestration scenes and layers managers for Graphics Frameworks.**
The npm package choppy2d-js receives a total of 9 weekly downloads. As such, choppy2d-js popularity was classified as not popular.
We found that choppy2d-js demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.