npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

frostflake

v0.9.2

Published

FrostFlake is a canvas-rendering game engine written in JavaScript ES6. I originally started FrostFlake in 2014 as a way to have fun while learning the deeper aspects of JavaScript. The goal was to build a simple game engine with the fewest dependencies p

Readme

FrostFlake.js

I originally started FrostFlake in 2014 as a way to have fun while learning the deeper aspects of JavaScript. I wanted to build a game engine with a lean, but functional, feature set and few dependencies. I rewrote the original engine in TypeScript in 2017, and again in ES6 in 2020.

This iteration of the engine has zero dependencies. It uses a canvas renderer, not WebGL. The goal was to make it as simple as possible for a beginner to start playing with the engine.

If you use this, I'd love to know how you're using it and what you think.

Features

  • FrostFlake: the core engine provides a game loop with a GameTime object tracking the time elapsed between game updates and the total time elapsed.
  • Camera: a camera supporting position, velocity, acceleration, drag, and resolution scaling.
  • CanvasRenderer: a simple-but-fast canvas renderer (no WebGL).
  • Render Targets: the renderer can draw with a custom sprite list, camera and unique canvas. A DataUrl can be extracted from the unique canvas and used as a new sprite texture.
  • Input: a class that provides mouse and keyboard input management.
  • View: the entry point for the scene graph, which manages a list of Positionable objects.
  • Positionable: the base class for most game objects, provides basic physics
  • Sprite: a common base class for game objects. Supports spritesheeting, frame-based animation, drawscaling, collision, and parent/child relationships with relative coordinate systems.
  • MathUtil: a utility class that provides some common 2D geometry calculations.
  • Collision: FrostFlake provides two shapes, Circle and (axis-aligned) Rectangle, which support collision testing, repositioning, and simple bounce physics. This is more than enough for most 2D games!

Start using

The easiest way to get started with FrostFlake is to fork the frostflake-template project. The template project demonstrates main engine features and comes with some basic build configuration.

Start contributing

The easiest way to start contributing is to use the frostflake-template project as a starting point. This repo has pre-made Views that make it easy to test engine features. Follow these steps:

  1. Fork and clone this repository
  2. Fork and clone the frostflake-template project.
  3. Modify the template project to reference this repo source instead of the npm package
  4. That will give you a basic project with some existing Views to make sure you have everything wired up correctly
  5. Add features or fix bugs and submit pull requests from your fork!

Todo list

Here are features I'd like to add. This is a good place to start if you want to contribute. Keep in mind that the point of this engine is simplicity for beginners so please reach out if you plan to PR a new feature!

  • [ ] Touch input system (currently only Mouse and Keyboard are supported)
  • [ ] Text rendering system
  • [ ] Improve TMX Tilemap loading/rendering
  • [x] Improve asset loading and texture buffering
  • [x] Change callback-based loading system to use Promises
  • [x] Improved build system (source map generation is not working correctly)
  • [x] Use ES6 modules
  • [x] Add color property to shapes and use it when rendering debug outlines
  • [x] Render target demo
  • [x] Audio playing system
  • [x] Circle vs circle collision with basic physics
  • [x] AAR vs AAR collision with basic physics
  • [x] AAR vs circle collision with basic physics