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

@screenjoy/fishtank

v0.1.0

Published

A calm Three.js aquarium screensaver with hand-editable GLB fish.

Readme

@screenjoy/fishtank

A seeded Three.js reef aquarium in one custom element. Seven sculpted, Blender-editable fish species swim among coral, swaying sea grass, and anemones. Tetras school together, fish avoid the reef and each other, and a crab and pearl clam animate on the sand. Water shafts, moving caustics, soft fish shadows, and suspended particles give the scene depth.

// Bundler entry, such as src/main.js
import "@screenjoy/fishtank";

<fish-tank seed="728" speed="0.8" population="11" style="width: 100%; height: 360px;"></fish-tank>

Give the element a width and height. It pauses when hidden or offscreen and honors reduced-motion preferences by default.

Attributes

  • seed: any deterministic scene seed
  • speed: current and swimming speed from 0.2 to 3
  • population: number of fish from 4 to 18
  • fps: animation target from 12 to 60
  • paused: pauses the aquarium while present
  • motion="allow": keeps moving when reduced motion is enabled

Feeding

Tap or click the water to drop food. Nearby fish approach and eat the sinking pellets. For a keyboard-accessible control, call feed() from a button:

document.querySelector("fish-tank").feed();

feed(x, y) accepts normalized element coordinates from 0 to 1. The default is near the surface center. Meals are rate-limited and the scene keeps at most 24 pellets; uneaten food disappears at the sand. Feeding is disabled while paused.

Rendering

Static reef meshes are merged by material. Plant sway, water light, and dust run in shaders; bubbles, food, and fish shadows use instanced geometry. Embedded canvases render up to 1280 × 800, with the shared runtime's 1080p fullscreen budget. The camera fits the reef to the element's aspect ratio. Seed and population changes rebuild the scene, and disconnection releases scene and model resources.

Editing the fish in Blender

The source models live in models/:

  • angel.glb
  • tang.glb
  • clown.glb
  • butterfly.glb
  • mint.glb
  • ruby.glb
  • tetra.glb

Import any file with Blender's File → Import → glTF 2.0 command. Blender handles the glTF Y-up conversion automatically; in the exported model, each fish faces +X.

You can freely change meshes, topology, materials, markings, and object counts. Keep these animation nodes and their pivots:

  • Tail — origin at the tail/body joint
  • FinPectoralL — origin at the left fin root
  • FinPectoralR — origin at the right fin root

They may be Blender empties or ordinary object parents; the runtime only relies on their exact names and transform pivots, not a specific Three.js node class.

FinDorsal and FinVentral are optional animated parts. Body, Eyes, and Mouth are descriptive names only and can be replaced.

Export the edited root and its children as glTF Binary (.glb) over the same file in models/. The regular package build copies those source assets into dist/models/ without regenerating them:

npm run build --workspace=@screenjoy/fishtank

To intentionally restore every starter model from the code-native model factory, run:

npm run export:starter-models --workspace=@screenjoy/fishtank

That reset command overwrites all seven source GLBs in models/.

Installation notes

Use a bundler such as Vite to resolve the npm import. The package is ESM and ships TypeScript declarations. For server rendering, register on the client after mount. Give the element explicit dimensions. The root entry registers the custom element; /element exposes manual registration.

paused is a boolean HTML attribute: paused="false" still pauses. Remove it or set the property to false. The runtime respects reduced motion and pauses when offscreen or the document is hidden. motion="allow" explicitly overrides reduced motion; leave it unset by default.

Licensed under MIT. Copyright 2026 Steven Partridge.