Skip to content
Back to skills

Threejs Voxel Block System

ASecurity

Use when building Minecraft-style voxel block systems in Three.js — block registry, chunked voxel world, instanced rendering, Rapier physics, serialization. Triggers on "threejs voxel system", "threejs minecraft blocks", "threejs block registry", "threejs instanced mesh blocks", "threejs voxel blocks".

  • 2 stars
  • 0 votes
  • 0 copies
  • 37 views
  • Added September 19, 2026
ai-agentsjavascriptgojavagitapi

Works with

  • cursor
  • cli
  • api

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned September 19, 2026

npx -y skills add majinmagros/magros.ai-skills --skill threejs-voxel-block-system --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Threejs Voxel Block System?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Threejs Voxel Block System
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majinmagros-threejs-voxel-block-system/badge)](https://www.skillsdirectory.com/skills/majinmagros-threejs-voxel-block-system)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: threejs-voxel-block-system
description: Use when building Minecraft-style voxel block systems in Three.js — block registry, chunked voxel world, instanced rendering, Rapier physics, serialization. Triggers on "threejs voxel system", "threejs minecraft blocks", "threejs block registry", "threejs instanced mesh blocks", "threejs voxel blocks".
metadata:
  origin: AUTORAL
  source_docs:
    - https://threejs.org/docs/#api/en/objects/InstancedMesh
    - https://threejs.org/docs/#api/en/geometries/BoxGeometry
    - https://github.com/mrdoob/three.js/tree/dev/examples/webgl_instancing
    - https://github.com/mrdoob/three.js/tree/dev/examples/webgl_voxel
  platforms: [claude-code, opencode, cursor, codex, gemini-cli, hermes, openclaw]
  requires_adapters: []
---

# Three.js Voxel Block System — Blocos Estilo Minecraft

Sistema de **blocos voxel estilo Minecraft**: registry de tipos, mundo com chunks, instanced rendering, física opcional, serialização. Código em `scripts/`.

## Quando usar (gatilhos concretos)

- "Sistema de blocos voxel Three.js"
- "Three.js Minecraft blocks"
- "Three.js block registry"
- "Three.js instanced mesh blocks"
- "Blocos estilo Minecraft Three.js"

## Quando NÃO usar

- Composição geral de cena → use `threejs-scene-composer`
- Shaders customizados → use `threejs-shader-effects`
- Deploy → use `threejs-deploy-pipeline`
- Patterns responsivos → use `threejs-responsive-patterns`
- Config constants → use `threejs-config-constants`

## Os 5 Módulos (resumo — código em `scripts/`)

**1. BlockRegistry** (`block-registry.js`) — `registerBlockType(id, {geometry, material, solid/transparent/collidable, tint/emissive, isFluid/isPlant/isTileEntity, states, renderType, drops, harvestTool/Level, onPlace/onBreak/onInteract/onTick, tags})` + filtros (`getByTag`, `getSolidBlocks`, `getTransparentBlocks`) + ~30 defaults: sólidos (grass, stone, dirt, obsidian, bedrock), minérios (coal/iron/gold/diamond/emerald), madeira, plantas, fluidos (water/lava), funcionais (crafting/furnace/chest), portal (frame/block), decorativos (torch/lantern/glowstone).

```javascript
import { BlockRegistry } from './scripts/block-registry.js';
const registry = new BlockRegistry();
registry.registerBlockType('grass_block', { color: 0x4a7c2e, tags: ['natural'] });
```

**2. VoxelWorld** (`voxel-world.js`) — chunks 16×256 (`getOrCreateChunk`, terreno procedural + ores), `setBlock/getBlock/removeBlock` (com callbacks onPlace/onBreak), raycast voxel com face atingida, mesh por chunk via InstancedMesh agrupado por tipo, `getVisibleChunks` + `render` (rebuild dirty, remove distantes), `serialize/deserialize` JSON.

**3. InstancedBlockManager** (`instanced-blocks.js`) — até 100k instâncias por tipo, `addBlock/removeBlock` (swap-remove O(1)), `setBlockBatch`, `clear` (dispose geometry/material).

**4. VoxelPhysics** (`voxel-physics.js`, opcional Rapier.js) — rigid bodies dinâmicos/kinemáticos, cuboid collider 1×1×1 (restitution/friction, `bouncy` tag), `step(delta)`, raycast Rapier. Degrada graciosamente sem Rapier.

**5. VoxelSerializer** (`serialization.js`) — `serialize/deserialize`, `saveToFile/loadFromFile` (download JSON), `compress/decompress` (LZ-string).

## Checklist de Entrega

- [ ] `BlockRegistry` com 50+ tipos padrão
- [ ] `VoxelWorld` com chunks (16x256) + raycast voxel-preciso
- [ ] `InstancedBlockManager` para rendering massivo
- [ ] `VoxelPhysics` com Rapier.js (opcional)
- [ ] `VoxelSerializer` com save/load + compressão
- [ ] Block states + tile entities + InstancedMesh otimizado

## Adapters (Por Plataforma)

```
adapters/

Files in this skill

  • SKILL.md3.6 KB
  • scripts/block-registry.js12.7 KB
  • scripts/instanced-blocks.js3.1 KB
  • scripts/serialization.js1.3 KB
  • scripts/voxel-physics.js2.9 KB
  • scripts/voxel-world.js10.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.