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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@blakron/core

v0.6.0

Published

Modern rewrite of the Egret game engine — WebGL multi-texture batching, instruction-driven render pipeline, strict TypeScript, Egret-compatible API

Readme

@blakron/core

A modern rewrite of the Egret game engine. Maintains Egret-compatible display object and event APIs while upgrading the rendering architecture, type safety, and tooling.

Features

Rendering Engine

  • WebGL-first with automatic Canvas 2D fallback
  • InstructionSet-driven pipeline (Build → Execute two-phase, inspired by Pixi.js 8)
  • Multi-texture batching (up to 8 textures per draw call)
  • RenderGroup layers — zero traversal cost for static subtrees
  • Filters: Blur (ping-pong dual-pass), Glow, DropShadow, ColorMatrix, custom shaders
  • Masks: automatic selection between scissor / stencil / offscreen compositing
  • WebGL Context Lost recovery

Display Objects

  • Full scene graph: DisplayObject → Container → Sprite → Stage
  • Bitmap (with scale9Grid), Shape, Mesh, TextField, BitmapText, Video
  • Graphics vector drawing (rect, circle, ellipse, arc, bezier, gradients, dashed lines)
  • cacheAsBitmap, tint, skew, zIndex sorting

Event System

  • Egret-compatible event classes: Event, TouchEvent, TimerEvent, ProgressEvent, etc.
  • Capture / bubble two-phase dispatch, object pooling, once() built-in
  • Unified touch + mouse handling, multi-touch support

Other

  • 7 screen scale modes (showAll / noScale / exactFit / noBorder, etc.)
  • Resource manager — async/await loading, group-based batching, 5 built-in parsers (Image / Json / Text / Sound / Sheet)
  • HttpRequest / ImageLoader networking
  • Sound (Web Audio + HTML Audio fallback) / Video playback
  • ByteArray / Timer / Logger / FontManager / LocalStorage
  • Full strict: true TypeScript, zero any

vs. Egret

| Aspect | Egret | Blakron | | ---------- | ----------------- | --------------------- | | Code size | 42,340 lines | ~13,000 lines | | Modules | namespace egret | ES Module | | Type safety| pervasive any | strict: true | | Target | ES5 | ES2022 | | Pipeline | RenderNode tree | Flat InstructionSet | | Batching | same-texture | multi-texture (8/batch) |

Design Credits

The rendering pipeline borrows concepts from Pixi.js 8 while keeping the Egret display object model and API intact:

| Aspect | Source | Notes | | -------------------------------------- | --------- | -------------------------------------------------------------- | | InstructionSet + RenderPipe two-phase | Pixi.js 8 | Build → flat instructions, Execute → dispatch by renderPipeId| | RenderGroup layers | Pixi.js 8 | isRenderGroup isolates subtree instruction sets | | Multi-texture batching | Pixi.js | aTextureId per vertex, up to 8 textures per draw call | | Tint | Pixi.js | displayObject.tint passed as premultiplied vertex color | | Dirty flag separation | Pixi.js 8 | structureDirty (rebuild) vs renderDirty (patch) | | Display objects / events / API | Egret | Fully preserved for minimal migration cost | | Filter shaders | Egret | Original GLSL, blur upgraded to ping-pong dual-pass | | WebGL state management | Egret | DrawCmdManager batching command queue | | Mask strategies | Egret | scissor / stencil / offscreen compositing |

Quick Start

import { createPlayer, Sprite, Shape } from '@blakron/core';

const app = createPlayer({
	canvas: document.getElementById('game-canvas') as HTMLCanvasElement,
	frameRate: 60,
	scaleMode: 'showAll',
	contentWidth: 640,
	contentHeight: 1136,
});

const root = new Sprite();
app.start(root);

const rect = new Shape();
rect.graphics.beginFill(0xff0000);
rect.graphics.drawRect(0, 0, 100, 100);
rect.graphics.endFill();
rect.x = 100;
rect.y = 100;
root.addChild(rect);

Development

pnpm install
pnpm run build        # compile
pnpm run test         # run tests (225 cases)
pnpm run dev          # watch mode

Documentation

Test Pages

Interactive test pages in examples/ require an HTTP dev server (ES Modules don't work over file://):

pnpm benchmark

| Page | Description | | -------------- | ------------------------------------------------------------------------- | | Visual Test| 18 cases: Shape, Graphics, Filters, Mask, RenderGroup, Animation | | Bitmap Test| Bitmap rendering: scale, rotation, SpriteSheet, scale9Grid, batching | | Mesh Test | Mesh deformation: Quad / Fan / Grid presets, Wave / Ripple / Twist | | Sound Test | Sound / SoundChannel: load, play, volume, loop, error handling | | Video Test | Video: load, play/pause, seek, volume, resize | | Net Test | HttpRequest / ImageLoader: GET / POST, responseType, timeout, abort | | Benchmark | WebGL perf: 5 stress scenes with FPS / Draw Calls / Batch Efficiency |

License

MIT