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

com.koiusa.stereoview

v2.0.0

Published

Head-tracked off-axis projection and screen visualization for Unity.

Readme

Stereo View

Unity向けの、視点追跡付き非対称投影(off-axis projection)パッケージです。物理スクリーンを仮想空間への「窓」として扱い、観察者の目の位置に合わせてCameraの投影行列を更新します。

ランタイムAPIはKoiusa.StereoView名前空間で提供されます。

要件

  • Unity 6000.3以降
  • Input System 1.18.0
  • AR Foundation 6.3.5
  • Universal Render Pipeline 17.3.0

セットアップ

  1. CameraへPortalViewControllerを追加します。
  2. スクリーンの物理幅・高さをメートル単位で設定します。
  3. Screen PositionScreen Rotationで仮想スクリーン面を配置します。Screen Rotation.forwardがシーンの奥方向です。
  4. FaceTrackerGyroTracker、または独自のITracker実装を割り当てます。
  5. CameraのNear Clip PlaneFar Clip Planeで描画範囲を設定します。

モデルが1 unit = 1 cmの場合は、World Scaleを100に設定します。トラッカー入力と物理スクリーン寸法はメートル単位です。

独自トラッカー

視点入力はITrackerを実装したMonoBehaviourとして差し替えられます。

using Koiusa.StereoView;
using UnityEngine;

public sealed class CustomTracker : MonoBehaviour, ITracker
{
    public bool IsActive => true;

    // スクリーン基準。X=右、Y=上、Z=スクリーンから視聴者までの距離。単位はメートル。
    public Vector3 EyePositionMeters => new(0f, 0f, 0.4f);
}
portalView.Tracker = customTracker;

スクリーン自体の位置・回転を追跡する場合はIScreenTrackerを使用します。顔・ジャイロ固有の差し替えにはIFaceTrackerIGyroTrackerを使用できます。

Cameraと投影行列

PortalViewControllerは毎フレーム、CameraのprojectionMatrixworldToCameraMatrixを更新します。クリップ距離にはCameraのnearClipPlanefarClipPlaneを使用します。コンポーネントを無効化すると両方の行列をリセットします。

行列計算だけが必要な場合はStereoView.CoreOffAxisProjectionを直接使用できます。

アセンブリ

  • StereoView.Core: Off-axis投影行列の計算
  • StereoView.Tracking: 顔・ジャイロ追跡
  • StereoView.Runtime: Camera制御とスクリーン可視化
  • StereoView.URP: URPのシャドウ距離連携
  • StereoView.Editor: Editor入力とGizmo表示

IL2CPPビルドではStereoView.URPを確実に含めるため、起動処理からUrpPortalViewRegistration.Register()を呼び出してください。Editorでは自動登録されます。

ライセンス

MIT License。詳細はLICENSE.mdを参照してください。