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

@threejson/media-kit

v0.1.0-alpha.4

Published

Optional deterministic ThreeJSON composition, image, GIF and video export.

Readme

@threejson/media-kit

Opt-in deterministic scene/composition playback and offline image/GIF/video export. Uses threejson/timeline, optional audio-kit, Mediabunny/WebCodecs and gifenc. Ordinary ThreeJSON scenes do not import this package.

import { renderVideo, renderImage } from '@threejson/media-kit';
const video = await renderVideo(sceneJson, { end: 8, width: 1920, height: 1080, fps: 30, format: 'mp4' });
const image = await renderImage(sceneJson, { time: 2, type: 'image/png' });

Inputs: scene/composition object, JSON text/URL, Blob, .tjz bytes. A browser canvas is required; Node users can use the installed-browser adapter in @threejson/scene-tools/media.

createMediaProject shares replay and resources between preview and encoding. renderVideo supports a seekable StreamTarget-compatible WritableStream; MP4 uses H.264/AAC, WebM uses VP9/Opus. Actual encoder availability is checked, not assumed. GIF is silent and palette-limited. Cancellation releases runtimes and encoders.

createMediaProjectSession / createMediaOperationService support revision-checked, atomic storyboard/shot/timeline edits, undo/redo, compact queries and injected frame-capture/export/narration adapters. threejson/ai can drive this service through runVideoAgent without depending on this package. Ordinary scene generation is unchanged.

NLE operations: media.clip.insert/update/split/remove/roll/reorder, media.item.duplicate, media.asset.put, media.lanes.set and explicit media.document.replace. Clips reference scene sources (copy-on-write when edited) or {type:"media",assetId} entries in mediaAssets. Split/trim/rate changes map linked audio/captions via linkedClipId; locked or overlapping ripple targets reject atomically. timeline.lanes describes editing layers, not animation bindings. Root automation follows NLE edits; exact JSON timeline.edit upserts opt in using retimeAutomation:true. Changes that cannot preserve automation exactly reject rather than corrupt the project.

probeMediaAsset checks browser decodability; extractMediaAudio produces a bounded WAV asset from imported media. createMediaProject composites images and timestamp-decoded video alongside procedural scenes. OpenMediaDocument.getPackedAssets() exposes archive Blobs for durable host storage; the host owns persistence and object-URL lifetime.

Compositions support cross-dissolves, wipe and seeded dissolve reveals, CJK-safe captions with highlights/typewriter effects, and bounded next-shot preloading. Narration uses actual PCM sentence duration; packMediaDocument turns existing inline audio into deduplicated binary assets without downloading remote dependencies. Runtime resource resolution preserves host gateway/cache policies.

/reconstruction is a separate phase-two interface for host-injected analysis, not a video-to-3D implementation. It never uploads media or calls AI implicitly.

中文指南 · English guide