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

@haiyue/extensions

v0.2.2

Published

Stable optional HaiYue runtimes for 2D/3D animation, glTF, Spine, tilemaps, text, tweening, and grids.

Readme

@haiyue/extensions

Optional runtime capabilities for @haiyue/engine.

@haiyue/extensions/controls adds configurable fixed/floating virtual joystick input, per-frame events, Entity movement/heading and optional Engine GUI presentation. See the guide and runnable example. It is part of the reviewed stable surface of the current 0.2.x candidate.

Stable entrypoints

  • @haiyue/extensions/gltf — glTF loading, runtime components, compatibility reports, materials, and the engine plugin.
  • @haiyue/extensions/animation3d — source-independent 3D clips, mixers, pose buffers, layers, masks, events, state machines, and the HYA adapter.
  • @haiyue/extensions/gltf-animation3d — adapts glTF clips to the source-independent Animation3D runtime.
  • @haiyue/extensions/animation — HYA Animation2D components, systems, loading, rendering, and state-machine integration.
  • @haiyue/extensions/deformable-animation — source-neutral HYA deformable-mesh sampling, dynamic geometry, texture and alpha-mask runtime; it has no Live2D/Cubism dependency.
  • @haiyue/extensions/hya-state-machine — the focused HYA 2D state-machine runtime.
  • @haiyue/extensions/spine — Spine component, render system, plugin, and the stable worker interface seam.
  • @haiyue/extensions/tilemap — Tilemap2D component, render system, and plugin.
  • @haiyue/extensions/canvas-text — Canvas text component and render system.
  • @haiyue/extensions/tween — Tween2D component and update system.
  • @haiyue/extensions/grid — Grid2D component contract.
  • @haiyue/extensions/controls — virtual joystick input, movement and optional GUI presentation.
  • @haiyue/extensions/i18n — language packs, text/plural formatting and optional GUI bindings.
  • @haiyue/extensions/narrative — branching stories, save/restore, host actions and optional GUI presentation.
import { HaiyueEngine } from '@haiyue/engine';
import { createGltfPlugin } from '@haiyue/extensions/gltf';
import { Animation3DMixer } from '@haiyue/extensions/animation3d';
import { createGltfAnimation3DRuntime } from '@haiyue/extensions/gltf-animation3d';

const engine = new HaiyueEngine({ canvas: '#app' });
engine.installPlugin(createGltfPlugin());

The package root remains a minimal experimental authoring base. Worker transport and low-level parsing are explicitly available from @haiyue/extensions/experimental/gltf-worker and @haiyue/extensions/experimental/spine-worker; they may change without stable-API compatibility guarantees.

@haiyue/extensions/ray-tracing is also experimental despite its unprefixed name. Private samplers, renderers and resource owners are implementation details of the focused runtimes, not additional stable entrypoints. Import the capability you need; headless narrative consumers can use NarrativeRuntime without retaining NarrativeGui in a tree-shaken bundle.

The glTF, Spine and Tilemap plugin factories own the systems they create. Scene uninstall, installation rollback and scene destruction release those systems; one plugin object can serve independent scenes. Editor viewport contributions destroy systems they create and leave borrowed systems under their existing owner.

The source-neutral indexed-sprite renderer is available from @haiyue/extensions/experimental/indexed-sprite. It stores index planes and palette rows separately, so changing a palette does not duplicate sprite pixels. It also accepts RGB/RGBA planes, batches atlas pages, supports nearest or palette-aware linear filtering, and owns bounded upload/recovery/disposal:

import { IndexedSpriteRenderer } from '@haiyue/extensions/experimental/indexed-sprite';

const renderer = new IndexedSpriteRenderer(device, [{
  id: 'idle-0', width: 2, height: 2, format: 'indexed8',
  pixels: new Uint8Array([0, 1, 1, 0]),
}], [{
  id: 'default', colorCount: 2,
  rgba: new Uint8Array([0, 0, 0, 0, 255, 255, 255, 255]),
}], { targetFormat: navigator.gpu.getPreferredCanvasFormat() });

renderer.uploadAll();
renderer.render(pass, [{ spriteId: 'idle-0', paletteId: 'default', x: 320, y: 180 }], 1280, 720);
renderer.dispose();

WebGPU is required by the runtime; there is no WebGL fallback.

Animation text fonts

Animation2D and HYA state machines load the OpenType parser only when preparing a materialized text component's font resource. Importing the animation entrypoints, playing animations without text, or using only system fonts does not request it. Keep ES module code splitting enabled and deploy the complete output directory; single-file builds using inlineDynamicImports still include the parser.

Font preparation is included in runtimeStats.pendingResourceCount. Check failedResourceCount as well: a failed parser download is a resource failure. Browser-loadable font containers unsupported by OpenType retain Canvas shaping. Removing the player during preparation prevents late font registration and releases its asset handles. See the asset lifecycle guide.

Internationalization

@haiyue/extensions/i18n provides portable JSON language packs, text/plural formatting and optional GUI text/image bindings. See the guide and example.

Narrative

@haiyue/extensions/narrative provides JSON branching stories, transactional execution, save/restore, GPU GUI presentation and host-state action adapters. See the guide and example.

Share content

@haiyue/extensions/share-content generates localized score cards, PNG/JPEG captures and versioned challenge links. It produces plain data for a platform share adapter, without depending on Native or social SDKs. See the guide and example.

Achievements

@haiyue/extensions/achievements provides persistent event rules, bounded deduplication and optional localized GPU GUI. Inject a platform port; the extension imports no SDK. See the guide and example.

HYA composition (0.2.2)

The focused hya-player, hya-text, hya-layout, hya-data, and hya-audio subpaths share the original runtime owners. They keep host resources borrowed and publish a complete frame after data, text/layout and drawing are ready. See the API guide and public-package example. The package root remains lightweight.