miniplex
Use Miniplex for minimalistic Entity Component System with TypeScript support.
от verekia★ 31 звезда на GitHub
Установить miniplex в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Miniplex ECS
Use Miniplex for minimalistic Entity Component System with TypeScript support.
When setting up or undertaking important changes with Miniplex, fetch the documentations:
Core: https://raw.githubusercontent.com/hmans/miniplex/refs/heads/main/packages/core/README.md React bindings: https://raw.githubusercontent.com/hmans/miniplex/refs/heads/main/packages/react/README.md
Technique
Define an entity type with optional properties, create a world, and query entities based on their properties. Use miniplex-react for React bindings with the Entities component.
Key Concepts
- Entity type defines all possible components as optional properties
world.with('prop1', 'prop2')creates typed queriesworld.add()andworld.remove()for entity lifecycleworld.addComponent()andworld.removeComponent()for component lifecycle<Entities in={query}>{Component}</Entities>renders entities reactively- Entity props are passed directly to child components
What NOT to Use
onEntityAdded/onEntityRemoved- Prefer using data and systems to trigger things (e.g., timers, flags).where()- Don't use predicate-based filtering
Preferred Methods
Only use these world methods:
world.add(entity)- Add a new entityworld.remove(entity)- Remove an entityworld.addComponent(entity, 'component', value)- Add component to existing entityworld.removeComponent(entity, 'component')- Remove component from entityworld.with('prop1', 'prop2')- Create queries
Queries
Declare queries at module level and import them where needed:
// ecs/queries.ts
export const characterQuery = world.with('position', 'isCharacter')
export const enemyQuery = world.with('position', 'isEnemy')
export const movingEntities = world.with('position', 'velocity')
// In a system file
import { movingEntities } from './ecs/queries'
Usage
type Entity = {
position?: { x: number; y: number }
isCharacter?: true
}
const world = new World<Entity>()
const characters = world.with('position', 'isCharacter')
// Add entity
world.add({ position: { x: 0, y: 0 }, isCharacter: true })
// Render
<Entities in={characters}>{Character}</Entities>
Note: Miniplex is feature-complete but no longer maintained.
This skill is part of verekia's r3f-gamedev.
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл miniplex?
Use Miniplex for minimalistic Entity Component System with TypeScript support.
Как установить скилл miniplex?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл miniplex запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…