smithery/Bbeierle12

performance-at-scale

Spatial indexing and world streaming for Three.js building games with thousands of pieces. Use when optimizing building games, implementing spatial queries, chunk loading, or profiling performance. Includes spatial hash grids, octrees, chunk managers, and benchmarking tools.

Installation

$ npx skills add smithery/Bbeierle12 --skill performance-at-scale

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery/Bbeierle12 · top by installs.

npx skills add smithery/Bbeierle12

Browse all from smithery/Bbeierle12

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,585 B
  • docs SUMMARY.md 303 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

Performance at Scale

Spatial indexing and world streaming for large-scale building systems.

Quick Start

import { SpatialHashGrid } from './scripts/spatial-hash-grid.js';
import { Octree } from './scripts/octree.js';

// Uniform distribution - use hash grid
const grid = new SpatialHashGrid(10);
grid.insert(piece, piece.position);
const nearby = grid.queryRadius(position, 15);

// Clustered bases - use octree
const octree = new Octree(bounds, { maxDepth: 8 });
octree.insert(piece);
const inBox = octree.queryBox(min, max);

Reference

See references/performance-at-scale.md for detailed guidance on:

  • Spatial partitioning selection (when to use grid vs octree)
  • Chunk loading strategies
  • Instancing and LOD
  • Memory management

Scripts

  • scripts/spatial-hash-grid.js - O(1) queries for uniform distribution
  • scripts/octree.js - Adaptive queries for clustered objects
  • scripts/chunk-manager.js - World streaming for large maps
  • scripts/performance-profiler.js - Benchmarking utilities

Selection Guide

Pieces Distribution Use
<1,000 Any Array
1-5k Uniform SpatialHashGrid
1-5k Clustered Octree
5k+ Any ChunkManager + Octree per chunk