pn-threejs-core

pn-threejs-core is a skill for Cursor from perniemann/pnCore. It costs 59 tokens per session (1,444 once invoked), scanned A, original, MIT.

A guide to building interactive 3D scenes with Three.js, a JavaScript library for graphics in the browser. It covers cameras, lighting, materials, imported models and textures, animation, physics, and performance.

In plain words
What is it for?
Use it to build or refactor Three.js scenes, load GLTF models and textures, add animation or physics, use React Three Fiber, or migrate scenes toward WebGPU.
Why use it?
It helps organize complex scenes, manage graphics resources correctly, and avoid common performance problems such as unnecessary rendering work.

Skill for Cursor

Written for Cursor: shipped in a Cursor plugin.

Part of the pn-core plugin — 133 skills, 19 commands, 9 agents, 1 MCP server shipped together

Good fit Use it to build or refactor Three.js scenes, load GLTF models and textures, add animation or physics, use React Three Fiber, or migrate scenes toward WebGPU.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/perniemann/pncore/pn-threejs-core
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.

Any agent
npx skills add perniemann/pnCore --skill pn-threejs-core
Clone the repo
git clone --depth 1 https://github.com/perniemann/pnCore

Made for: Cursor.

Or install pn-core, the plugin that ships this one along with the rest of its 133 skills, 19 commands, 9 agents, 1 MCP server.

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 pn-threejs-core

README.md
[![agentmods](https://agentmods.dev/badge/skills/perniemann/pncore/pn-threejs-core/github.svg)](https://agentmods.dev/skills/perniemann/pncore/pn-threejs-core)
Your own site
<a href="https://agentmods.dev/skills/perniemann/pncore/pn-threejs-core"><img src="https://agentmods.dev/badge/skills/perniemann/pncore/pn-threejs-core/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 pn-threejs-core

Your own site · 80×15
<a href="https://agentmods.dev/skills/perniemann/pncore/pn-threejs-core"><img src="https://agentmods.dev/badge/skills/perniemann/pncore/pn-threejs-core.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,444 The whole file, excluding the scripts and references it only reads on demand.
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.00059 $0.01444
Opus 5 $0.00030 $0.00722
Sonnet 5 $0.00012 $0.00289
Haiku 4.5 $0.00006 $0.00144

Measured 5d ago against content hash e2cccf1e5e3e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

pn-threejs-core 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 5d 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/pn-core-mcp/content/skills/gamedev/pn-threejs-core/SKILL.md · 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.

Three.js core skill

When to use

  • Structuring or refactoring a Three.js scene
  • Adding or configuring cameras, lights, or materials
  • Loading and managing assets (GLTF, textures, Draco, KTX2)
  • Implementing or tuning animations
  • Integrating physics (Rapier, Cannon-es)
  • Optimizing draw calls, LOD, or culling
  • Migrating to WebGPU (Three.js r171+)
  • Using React Three Fiber (R3F) or Drei

Scene structure

  1. Hierarchy: Group objects logically (e.g. scene.add(group)) with clear names. Use groups for: environment, characters, UI overlays, effects. Ensures correct transforms and makes dispose/visibility easier.
  2. Naming: Use consistent prefixes or suffixes (e.g. env_ground, char_player, fx_particles) so objects can be found and disposed correctly.
  3. Disposal: When removing meshes or switching scenes, dispose of geometries, materials, and textures. Reuse where it avoids repeated allocation (e.g. instanced meshes, shared materials). Call dispose() on resources before removing references.

Camera management

  • Orbit: Use OrbitControls for editor-style or exploration cameras. Set enableDamping, dampingFactor, and minDistance/maxDistance for smooth feel.
  • Follow: For third-person games, interpolate camera position toward a target (lerp or smooth damp). Keep camera behind and above the player; handle wall clipping.
  • Cinematic: Use keyframe-based paths or splines for cutscenes. Separate camera logic from gameplay camera.

Lighting

  • Baked vs realtime: Prefer baked lighting (lightmaps) for static scenes when possible. Use realtime lights sparingly; limit count for mobile.
  • Light probes: Use LightProbe or ReflectionProbe for ambient/reflection when available. Reduces per-object setup.
  • Shadows: Limit shadow-casting lights; use castShadow/receiveShadow only where needed. Tune shadowMapSize, bias, and radius to avoid artifacts.

Asset loading

  • GLTF/GLB: Use GLTFLoader; prefer GLB for single-file. Use Draco compression (DRACOLoader) for large meshes.
  • Textures: Use KTX2 (KTX2Loader) for compressed textures when supported. Set colorSpace (e.g. SRGBColorSpace) and flipY correctly.
  • Loading managers: Use LoadingManager for progress UI. Centralize loaders to avoid duplicate fetches.
  • Caching: Reuse loaded assets across instances; avoid loading the same model multiple times.

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. 5d ago First seen · 93 lines · 59 tokens per session scan A e2cccf1e5e3e

Subscribe to this mod's changes

pn-threejs-core is a skill published in the GitHub repository perniemann/pnCore (0 stars, last pushed 2d ago), licensed MIT. It adds 59 tokens to every session and 1,444 once invoked, about $0.0003 per session on Opus 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-09-03.

Related

Other skills, from other repositories

decocms-ui

Build or style React UI with the decocms product design system (@decocms/ui). Use when creating interfaces, pages, or components in a project that should look like decocms products, when the user mentions "design system", "@decocms/ui", "decocms style", or asks to make UI consistent with Studio. Covers installation…

decocms/studio · 91 tokens

deepseek-harness

Use when building AI agent applications with a plugin-based architecture — Web UI, CLI, Python SDK, Cordis plugin system, multi-model orchestration. DeepSeek Harness (dsh): open-source agent harness by DeepSeek AI where everything is a plugin, powered by Cordis for spatiotemporal composability.

znlgis/opengis-skills · 68 tokens

react-change-review

Review recent React, Next.js, or TypeScript UI code changes for hardening before merge or commit. Use when asked to review recent React code changes, audit a React diff, harden a feature, check a PR or branch for React issues, or produce a stack-ranked list of nonredundant findings and a recommended fix plan using…

petekp/claude-code-setup · 95 tokens

cali

Use when working in the Cali repository or when you need to run, extend, or debug the Cali CLI for mobile React Native and Expo workflows. Covers Cali commands (qa, review, perf-review, dev), the shared cali-context.json contract, local mode selection, required local CLIs, provider setup, and CI integration patterns.

callstackincubator/cali · 76 tokens

typescript-style

Validate TypeScript/React code against style and architectural conventions.

peteski22/agent-pragma · 14 tokens

expo-app-design

Build beautiful cross-platform mobile apps with Expo Router, NativeWind, and React Native.

myths-labs/muse · 21 tokens