Playground
Playground.js is a framework for your javascript based games. It gives you out-of-box access to essentials like mouse, keyboard, sound and well designed architecture that you can expand to your needs.
Install / Use
/learn @rezoner/PlaygroundREADME
Playground.js
Out-of-box access to essentials like mouse, keyboard, sound and well designed architecture that you can expand to your needs.
Need instant help? Join our official slack
Core feature
Playground lets you establish a new application and bind essential events in one shot.
var app = playground({
width: 640, /* force width */
height: 480, /* force height */
scale: 2, /* force scale */
smoothing: false, /* antialiasing */
/* silently preload assets before main loader */
preload: function() { },
/* assets from preloader available, push some more for main loader */
create: function() { },
/* called when main loader has finished - you want to setState here */
ready: function() { },
/* called after container/window has been resized */
resize: function() { },
/* called each frame to update logic */
step: function(dt) { },
/* called each frame to update rendering */
render: function(dt) { },
/* states related events (called only for application */
createstate: function() { },
enterstate: function() { },
leavestate: function() { },
/* keyboard events */
keydown: function(data) { },
keyup: function(data) { },
/* pointer events (mouse + touch) */
pointerdown: function(data) { },
pointerup: function(data) { },
pointermove: function(data) { },
pointerwheel: function(data) { },
/* mouse trap */
mousedown: function(data) { },
mouseup: function(data) { },
mousemove: function(data) { },
/* finger trap */
touchstart: function(data) { },
touchend: function(data) { },
touchmove: function(data) { },
/* gamepad events */
gamepaddown: function(data) { },
gamepadup: function(data) { },
gamepadmove: function(data) { }
});
Loaders
create: function() {
this.loadData("maps", "units");
this.loadImages("soldier", "tank", "base");
this.loadSounds("fire", "medikit", "music");
}
States
ready: function() {
this.setState(Game);
}
Read more in documentation.
Related Skills
diffs
341.2kUse the diffs tool to produce real, shareable diffs (viewer URL, file artifact, or both) instead of manual edit summaries.
clearshot
Structured screenshot analysis for UI implementation and critique. Analyzes every UI screenshot with a 5×5 spatial grid, full element inventory, and design system extraction — facts and taste together, every time. Escalates to full implementation blueprint when building. Trigger on any digital interface image file (png, jpg, gif, webp — websites, apps, dashboards, mockups, wireframes) or commands like 'analyse this screenshot,' 'rebuild this,' 'match this design,' 'clone this.' Skip for non-UI images (photos, memes, charts) unless the user explicitly wants to build a UI from them. Does NOT trigger on HTML source code, CSS, SVGs, or any code pasted as text.
openpencil
1.9kThe world's first open-source AI-native vector design tool and the first to feature concurrent Agent Teams. Design-as-Code. Turn prompts into UI directly on the live canvas. A modern alternative to Pencil.
HappyColorBlend
HappyColorBlendVibe Project Guidelines Project Overview HappyColorBlendVibe is a Figma plugin for color palette generation with advanced tint/shade blending capabilities. It allows designers to
