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

@openheart/tavio-player-react

v1.0.6

Published

React components for Tavio viewer

Readme

tavio-player-react

tavio-player-react は、tavio の 3D ビューワーを React アプリケーションに簡単に組み込むためのコンポーネントライブラリです。

tavio-rendererについて

このライブラリは、内部で @openheart/tavio-renderer ライブラリに依存していますが、ライブラリ内にバンドルせずに外部依存の形になっています。

tavio-rendererがworkerやwasmを利用している関係で、コアライブラリをバンドルするとビルドに失敗したため、このような形式を採用しています。

基本的な使い方

1. パッケージのインストール

$ npm install @openheart/tavio-player-react @openheart/tavio-renderer

2. HTTP ヘッダーの設定

tavio-player-react は、3Dの描画を高速化するために内部でSharedArrayBufferを利用します。 デフォルトでは利用がオフになっていますが、快適に動作するために利用を有効化する必要があります。SharedArrayBufferの利用には、特定の HTTP ヘッダーを必要とします。お使いのフレームワークやサーバーの設定で、以下のヘッダーを追加してください。

  • Cross-Origin-Opener-Policy: same-origin
  • Cross-Origin-Embedder-Policy: require-corp

Next.js をお使いの場合は、next.config.js に以下のように記述します。
詳細は fix-shared-array-buffer-not-defined-nextjs-react を参照。

const nextConfig = {
  async headers() {
    return [
      {
        source: "/:path*",
        headers: [
          {
            key: "Cross-Origin-Opener-Policy",
            value: "same-origin",
          },
          {
            key: "Cross-Origin-Embedder-Policy",
            value: "require-corp",
          },
        ],
      },
    ];
  },
};

module.exports = nextConfig;

3. コンポーネントの利用

上記の設定が完了したら、TavioPlayer コンポーネントをアプリケーションに組み込むことができます。

import { TavioPlayer } from "@openheart/tavio-player-react";

export default function MyPage() {
  return (
    <TavioPlayer
      url="/path/to/your/model.tavio"
      // 必要に応じてカメラパラメータなどを指定
    />
  );
}

開発環境のセットアップ

  1. リポジトリをクローンします。
git clone https://github.com/openheart-inc/tavio-player-react.git
  1. pnpm を使って依存パッケージをインストールします。
$ pnpm install

環境によってはcorepackpnpmを有効化する必要があります。

$ corepack enable pnpm

開発

ウォッチモードでビルド

ライブラリをウォッチモードでビルドします。

$ pnpm dev

アイコン生成

svgr/icons にある SVG ファイルから、React コンポーネントを自動生成します。アイコンを追加・変更した際に実行してください。

$ pnpm gen:icons

型チェック

型チェックを実行します。

$ pnpm type-check

ビルド

pnpm build
ライブラリをビルドします。

$ pnpm build

リリース作業

tavio-rendererのアップデート

tavio-player-reactがアップデートされている場合は、package.jsonのpeerDependenciesdevDependenciesのバージョンをアップデートしてください。

リリースプルリクエストを作成

  1. Actions > "Create release pull request" へ移動
  2. "Run workflow" ボタンをクリック
  3. "Release tag" を入力して "Run workflow" ボタンをクリック

※ Release tagタグはセマンティックバージョンの形式で入力してください。(v 接頭辞は必須) 例: v1.0.0

リリースを実行

  1. 作成されたリリースプルリクエストを確認してマージする
  2. リリースプルリクエストがマージされたら、自動でnpmレジストリへのリリースが開始されます。