.splat-viewer

.splat-viewer is a cursor rule for Cursor from playcanvas/react. It costs 608 tokens per session, scanned A, original, MIT.

Rules for using a SplatViewer component, which displays interactive 3D Gaussian-splat scenes in a web page. They specify the source asset, required controls and buttons, layout behavior, and supported interaction and loading options.

In plain words
What is it for?
Use them when creating SplatViewer examples with camera controls, loading states, menus, downloads, full-screen actions, overlays, or large lazily loaded assets.
Why use it?
They keep examples consistent with the component's expected structure and prevent controls or layout from being wired up incorrectly.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use them when creating SplatViewer examples with camera controls, loading states, menus, downloads, full-screen actions, overlays, or large lazily loaded assets.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/playcanvas/react/splat-viewer
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/playcanvas/react

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for .splat-viewer

README.md
[![agentmods](https://agentmods.dev/badge/rules/playcanvas/react/splat-viewer/github.svg)](https://agentmods.dev/rules/playcanvas/react/splat-viewer)
Your own site
<a href="https://agentmods.dev/rules/playcanvas/react/splat-viewer"><img src="https://agentmods.dev/badge/rules/playcanvas/react/splat-viewer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for .splat-viewer

Your own site · 80×15
<a href="https://agentmods.dev/rules/playcanvas/react/splat-viewer"><img src="https://agentmods.dev/badge/rules/playcanvas/react/splat-viewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 608 This file is loaded in full into every session.
When invoked 608 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00608 $0.00608
Opus 5.5 $0.00243 $0.00243
Sonnet 5.5 $0.00122 $0.00122
Haiku 4.5 $0.00061 $0.00061

Measured 1mo ago against content hash 60a2608833e1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

.splat-viewer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/blocks/src/.splat-viewer.mdc · 93 lines

How it starts

The opening of the file, as written. The whole thing — 93 lines — stays where its author put it; the contents beside it link to each section on GitHub.

SplatViewer Component

A responsive and composable component for displaying Gaussian splats. Includes built-in camera controls, loading states, and optional UI slots for overlays or actions. Supports large assets with lazy loading and automatic framing.

📚 Splat Viewer Docs

Features

  • Orbit and fly controls
  • Keyboard and mouse controls
  • Controlled and uncontrolled mode
  • Suspenseful loading
  • Camera animations (coming soon)
  • Way points (coming soon)

Rules

Example

import * as Splat from '@/components/ui/splat-viewer';
import './viewer.css';

export function SplatViewerDemo() {
  return (
    <Splat.Viewer src={splatUrl} autoPlay className="rounded-t-lg lg:rounded-lg shadow-xl cursor-grab active:cursor-grabbing" >
      <Splat.Controls autoHide >
        <div className="flex gap-1 pointer-events-auto flex-grow">
            <Splat.FullScreenButton />
            <Splat.DownloadButton />
        </div>
        <div className="flex gap-1 pointer-events-auto">
          <Splat.CameraModeToggle />
          <Splat.HelpButton />
          <Splat.MenuButton />
        </div>
      </Splat.Controls>
  </Splat.Viewer>
  )
}

Styling

.splat-viewer {
  background-color: #f0f2e5;
  padding-left: .3rem;
  padding-right: .3rem;
  border-radius: .3rem;
}

Component Parts

import { 
  SplatViewer, 
  FullScreenButton, 
  DownloadButton, 
  MenuButton, 
  Controls 
} from "@/components/ui/splat-viewer";

Props

type SplatViewerProps = {
  src: string;              // URL of the splat file
  autoPlay?: boolean;       // Whether to automatically start playing
  className?: string;       // Additional CSS classes
  children?: React.ReactNode; // UI controls and overlays
}

Read the full file on GitHub · 93 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 93 lines · 608 tokens per session scan A 60a2608833e1

Subscribe to this mod's changes

.splat-viewer is a cursor rule published in the GitHub repository playcanvas/react (541 stars, last pushed 18d ago), licensed MIT. It adds 608 tokens to every session, about $0.0024 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.