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

glowfield

v0.2.0

Published

A dynamic aurora background component for React / Next.js, powered by Three.js and GLSL shaders.

Readme

glowfield

npm version

WebGL / Three.js と GLSL シェーダーでオーロラのような光の揺らぎを描画する React コンポーネントです。ヒーローセクションやフルスクリーン背景にドロップインで導入できます。

特徴

  • Three.js ベースのフラグメントシェーダーで滑らかなグラデーションアニメーションを実現
  • colors / speed / intensity を変えるだけで雰囲気を簡単に調整
  • className でレイアウトやブレンドモードを柔軟に制御
  • TypeScript 型定義を同梱。AuroraCanvas の Props も補完されます。

インストール

npm install glowfield

peerDependencies として react / react-dom が 17 以上必要です。Next.js 14 で動作確認済みです。


クイックスタート

"use client";
import { AuroraCanvas } from "glowfield";

export default function Hero() {
  return (
    <section className="relative h-[480px] overflow-hidden bg-slate-950">
      <AuroraCanvas
        colors={["#38bdf8", "#9333ea", "#f472b6"]}
        speed={0.35}
        intensity={0.8}
        className="pointer-events-none mix-blend-screen"
      />
      <div className="relative z-10 flex h-full items-center justify-center">
        <h1 className="text-4xl font-semibold text-white drop-shadow">
          Glowfield Aurora
        </h1>
      </div>
    </section>
  );
}

AuroraCanvasposition: absolute のラッパー要素と WebGL キャンバスを返します。背景オーバーレイとして使う場合は、親要素に position: relativeoverflow-hidden を指定すると扱いやすくなります。

Next.js app ルーターなどで利用する場合は、上記のように呼び出しファイルの冒頭で "use client"; を宣言してください。


プロパティ

| プロパティ | 型 | 既定値 | 説明 | | ----------- | ---------- | ----------------------------------- | --------------------------------------------------------------------------------------- | | colors | string[] | ["#7dd3fc", "#93c5fd", "#c4b5fd"] | グラデーションに使用する 3 色。ベース → 中間 → ハイライトの順で混色されます。 | | speed | number | 0.2 | アニメーション速度。値を上げると揺らぎが速くなります。 | | intensity | number | 0.7 | 発光の強さ。1.0 以上で鮮やかに、0.4 以下で落ち着いた雰囲気になります。 | | className | string | — | ラッパー要素に付与するクラス。Tailwind CSS などでサイズやブレンドモードを調整できます。 |


カスタマイズ例

<AuroraCanvas
  colors={["#9deafe", "#6366f1", "#f0abfc"]}
  speed={0.25}
  intensity={1.1}
  className="mix-blend-lighten opacity-80 blur-[1px]"
/>
  • ハイライトカラーをピンク系に変更し、mix-blend-lighten で背景と柔らかく合成しています。
  • ほんのりブラーをかけると UI との境界が自然になります。

よくある質問

Q. SSR (Next.js) でエラーが出ます。 A. WebGL 描画はクライアント側で行うため、必ずクライアントコンポーネント内でレンダーしてください。"use client"; の付与と、サーバーコンポーネントからの直接レンダーを避けることがポイントです。

Q. Canvas のサイズを固定したい。 A. ラッパー要素のサイズに追従するため、親要素に height / width / min-height を指定します。フルスクリーンの場合は className="fixed inset-0" のように指定してください。

Q. パフォーマンスを抑えたい。 A. speedintensity を下げるほか、配色を暗めにすると描画コストが下がります。さらに制御したい場合は GitHub リポジトリをフォークし、AuroraCanvas.tsx 内のレンダラー設定を変更してください。


変更履歴

詳細な差分は GitHub (https://github.com/Aquner-Dev/glowfield) のリリース・コミットをご確認ください。Issue や Pull Request での改善提案も歓迎しています。


ライセンス

MIT