CommunityProgramación y desarrollogithub.com

pixijs/pixijs-crear

Utiliza esta habilidad al crear un nuevo proyecto PixiJS v8 con la CLI create-pixi o al agregar PixiJS a un proyecto existente. Cubre comandos de creación con npm/yarn/pnpm/bun, flujos interactivos y no interactivos, categorías de plantillas (bundler vs creación), plantillas disponibles, requisitos de Node.js, instalación en proyectos existentes, flujo de desarrollo post-generación y el problema de producción con Vite y top-level-await.

¿Qué es pixijs-crear?

Esta habilidad te guía en el proceso de arrancar un nuevo proyecto PixiJS v8 utilizando la herramienta oficial create-pixi, compatible con los gestores de paquetes npm, yarn, pnpm y bun. Soporta tanto flujos interactivos como no interactivos (modo script), y organiza las plantillas en dos categorías: **bundler** (que configuran un empaquetador como Vite, Webpack, esbuild o import-map) y **creation** (que ofrecen configuraciones directas como 'creation-web' o 'framework-react'), además de la plantilla por defecto 'extension-default'. También cubre la instalación de `pixi.js` en proyectos existentes que no usan el CLI, los requisitos de versión de Node.js, el flujo de desarrollo posterior al scaffold (dev, build, preview) y una advertencia crítica sobre el error de producción en Vite relacionado con el uso de top-level-await en el navegador. Es ideal para desarrolladores que inician un proyecto con PixiJS o lo integran en uno ya existente.

Compatible con~Claude Code~Codex CLI~Cursor
Part ofReact
npx skills add https://github.com/pixijs/pixijs-skills/tree/main/skills/pixijs-create

Installed? Explore more Programación y desarrollo skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

Preguntar en tu IA favorita

Abre un nuevo chat con esta habilidad de agente ya precargada.

Documentación

¿Qué hace pixijs-crear?

Utiliza esta habilidad al crear un nuevo proyecto PixiJS v8 con la CLI create-pixi o al agregar PixiJS a un proyecto existente. Cubre comandos de creación con npm/yarn/pnpm/bun, flujos interactivos y no interactivos, categorías de plantillas (bundler vs creación), plantillas disponibles (bundler-vite, bundler-webpack, bundler-esbuild, bundler-import-map, creation-web, framework-react, extension-default), requisitos de versión de Node.js, npm install pixi.js para proyectos existentes, flujo de desarrollo posterior al scaffold y el problema de producción con Vite y top-level-await. Se activa con: create pixi.js, npm create, npm install pixi.js, scaffold, template, bundler-vite, bundler-webpack, creation-web, framework-react, new project, existing project, getting started, quick start.

Crear un nuevo proyecto

Comandos básicos

Para crear un nuevo proyecto PixiJS v8, ejecuta uno de los siguientes comandos (elige el gestor de paquetes que prefieras):

# npm
npm create pixi.js@latest

# yarn
yarn create pixi.js

# pnpm
pnpm create pixi.js

# bun
bun create pixi.js

Flujo interactivo

Ejecutar el comando sin argumentos iniciará un asistente interactivo que te guiará por los pasos de configuración del proyecto. Necesitarás seleccionar una plantilla, un nombre de proyecto y otras opciones.

Flujo no interactivo (modo script)

Puedes proporcionar el nombre del proyecto y la plantilla directamente para una ejecución automatizada:

npm create pixi.js@latest -- my-pixi-project --template bundler-vite

Plantillas disponibles

Las plantillas se organizan en dos categorías:

  • bundler: Configuran un proyecto con un empaquetador.
  • creation: Proyectos que no requieren empaquetador o son configuraciones específicas.
CategoríaPlantillaDescripción
bundlerbundler-viteProyecto con Vite como empaquetador (recomendado)
bundlerbundler-webpackProyecto con Webpack
bundlerbundler-esbuildProyecto con esbuild
bundlerbundler-import-mapProyecto con mapa de importaciones
creationcreation-webProyecto web básico (sin empaquetador)
creationframework-reactProyecto con React y PixiJS
creationextension-defaultExtensión por defecto para PixiJS

Ejemplos de uso

# Proyecto con Vite
npm create pixi.js@latest -- --template bundler-vite

# Proyecto con React
npm create pixi.js@latest -- --template framework-react

Requisitos de Node.js

Asegúrate de tener instalada una versión de Node.js compatible (generalmente Node.js 18 o superior para create-pixi v8). Verifica tu versión con:

node --version

Agregar PixiJS a un proyecto existente

Si ya tienes un proyecto y deseas agregar PixiJS, instala el paquete directamente:

npm install pixi.js

O con otros gestores:

yarn add pixi.js
pnpm add pixi.js
bun add pixi.js

Flujo de desarrollo posterior al scaffold

Una vez creado el proyecto (por ejemplo, con la plantilla bundler-vite), puedes iniciar el servidor de desarrollo y construir para producción:

cd my-pixi-project
npm run dev      # Inicia servidor de desarrollo
npm run build    # Construye para producción
npm run preview  # Previsualiza la build de producción

Problema conocido: Vite y top-level-await

Si usas bundler-vite, ten en cuenta que el uso de top-level-await en el código fuente puede provocar un error en la build de producción. Para evitarlo, envuelve el código asíncrono en una función async o ajusta la configuración de Vite (build.target y build.modulePreload).

Solución recomendada:

// En lugar de:
await someAsyncFunction();

// Usa:
(async () => {
  await someAsyncFunction();
})();

Soporte adicional

Para más información, consulta la documentación oficial de PixiJS.

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

pixijs/pixijs

Use this skill first for ANY PixiJS v8 task; it routes to the right specialized skill for the job. Covers the full PixiJS surface: Application setup, the scene graph (Container, Sprite, Graphics, Text, Mesh, ParticleContainer, DOMContainer, GifSprite), rendering (WebGL/WebGPU/Canvas, render loop, custom shaders, filters, blend modes), assets, events, color, math, ticker, accessibility, performance, environments, migration from v7, and project scaffolding. Triggers on: pixi, pixi.js, pixijs, PixiJS, v8, Application, app.init, Sprite, Container, Graphics, Text, Mesh, ParticleContainer, DOMContainer, GifSprite, Assets, Ticker, renderer, WebGL, WebGPU, scene graph, filter, shader, blend mode, texture, BitmapText, create-pixi, how do I draw, how do I render, how do I animate in pixi.

pixijs/pixijs-accessibility

Use this skill when adding screen reader and keyboard navigation to PixiJS v8 apps. Covers AccessibilitySystem options (enabledByDefault, debug, activateOnTab, deactivateOnMouseMove), per-container accessibility properties, shadow DOM overlay, mobile touch-hook activation. Triggers on: accessibility, a11y, screen reader, ARIA, keyboard navigation, tab order, AccessibilitySystem, accessibleTitle, accessibleHint, tabIndex, accessibleChildren.

pixijs/pixijs-application

Use this skill when creating and configuring a PixiJS v8 Application. Covers new Application() + async app.init() options (width, height, background, antialias, resolution, autoDensity, preference, resizeTo, autoStart, sharedTicker, canvas, useBackBuffer, powerPreference, eventFeatures, accessibilityOptions, gcActive, bezierSmoothness, webgl/webgpu/canvasOptions per-renderer overrides), app.stage/renderer/canvas/screen/domContainerRoot access, ResizePlugin, TickerPlugin, CullerPlugin (cullable, cullArea), custom ApplicationPlugin creation via ExtensionType.Application, start/stop lifecycle, and app.destroy() with releaseGlobalResources. Triggers on: Application, app.init, app.stage, app.renderer, app.canvas, app.screen, app.domContainerRoot, ApplicationOptions, ApplicationPlugin, ExtensionType.Application, resizeTo, preference, autoStart, sharedTicker, useBackBuffer, powerPreference, skipExtensionImports, preferWebGLVersion, preserveDrawingBuffer, cullable, CullerPlugin, app.start, app.stop, app.destroy, rele

pixijs/pixijs-assets

Use this skill when loading and managing resources in PixiJS v8. Covers Assets.init, Assets.load/add/unload, bundles, manifests, background loading, onProgress, caching, spritesheets, video textures, web fonts, bitmap fonts, animated GIFs, compressed textures, SVG as texture or Graphics, resolution detection, per-asset data options, and forcing a specific loader with the parser field (for extension-less URLs). Triggers on: Assets, Assets.load, Assets.init, loadBundle, manifest, backgroundLoad, Spritesheet, Cache, LoadOptions, unload, parser, loadParser, loadWebFont, loadBitmapFont, loadVideoTextures, GifSource, VideoSourceOptions.

pixijs/pixijs-blend-modes

Use this skill when compositing display objects with blend modes in PixiJS v8. Covers standard modes (normal, add, multiply, screen, erase, min, max), advanced modes via pixi.js/advanced-blend-modes (color-burn, overlay, hard-light, etc.), batch-friendly ordering. Triggers on: blendMode, additive, multiply, screen, overlay, color-burn, color-dodge, advanced-blend-modes, glow, erase.

pixijs/pixijs-color

Use this skill when creating, converting, or manipulating colors in PixiJS v8. Covers Color class input formats (hex, CSS names, RGB/HSL objects, arrays, Uint8Array), conversion methods (toHex, toNumber, toArray, toRgba), component access, setAlpha/multiply/premultiply, Color.shared singleton. Triggers on: Color, ColorSource, hex, rgb, hsl, tint, premultiply, Color.shared, color conversion.

pixijs/pixijs-core-concepts

Use this skill when understanding how PixiJS v8 renders frames: the systems-and-pipes renderer, the render loop, and how the library adapts to different environments. Covers WebGLRenderer/WebGPURenderer/CanvasRenderer selection, renderer.render() pipeline, environment detection, and pointers to per-topic deep dives. Triggers on: renderer, WebGL, WebGPU, Canvas, render loop, render pipeline, systems, environments, autoDetectRenderer.

pixijs/pixijs-custom-rendering

Use this skill when writing custom shaders, uniforms, filters, or batchers in PixiJS v8. Covers Shader.from({gl, gpu, resources}), GlProgram/GpuProgram, UniformGroup with typed uniforms (f32, vec2, mat4x4), UBO mode, textures as resources, custom Filter via Filter.from, GLSL ES 3.0 conventions (in/out, finalColor, texture()), uBackTexture sampling, pixi.js/unsafe-eval for strict CSP, custom Batcher via extensions. Triggers on: Shader, GlProgram, GpuProgram, UniformGroup, Batcher, Filter, Filter.from, GLSL, WGSL, UBO, uniform, custom shader, finalColor, uBackTexture, blendRequired, unsafe-eval.

pixijs/pixijs-environments

Use this skill when running PixiJS v8 outside a standard browser: Web Workers, OffscreenCanvas, Node/SSR, or CSP-restricted contexts. Covers DOMAdapter.set, BrowserAdapter, WebWorkerAdapter, custom Adapter interface, pixi.js/unsafe-eval for strict CSP. Triggers on: DOMAdapter, BrowserAdapter, WebWorkerAdapter, Web Worker, OffscreenCanvas, Node, headless, SSR, CSP, unsafe-eval, Adapter.

pixijs/pixijs-events

Use this skill when handling pointer, mouse, touch, or wheel input in PixiJS v8. Covers eventMode (none, passive, auto, static, dynamic), FederatedEvent types, propagation and capture phase, hitArea, interactiveChildren, cursor and cursorStyles, global move events for drag, eventFeatures config. Triggers on: eventMode, FederatedPointerEvent, pointerdown, click, tap, globalpointermove, drag, hitArea, cursor, stopPropagation.

pixijs/pixijs-filters

Use this skill when applying visual effects to PixiJS v8 containers via the filter pipeline. Covers built-in filters (AlphaFilter, BlurFilter, ColorMatrixFilter, DisplacementFilter, NoiseFilter), custom Filter.from() with GLSL/WGSL, options (resolution, padding, antialias, blendRequired), filterArea optimization, pixi-filters community package. Triggers on: filters, BlurFilter, ColorMatrixFilter, DisplacementFilter, NoiseFilter, Filter.from, GLSL filter, pixi-filters, filterArea.

pixijs/pixijs-math

Use this skill when working with coordinates, vectors, matrices, shapes, hit testing, or layout rectangles in PixiJS v8. Covers Point/ObservablePoint, Matrix (2D affine, decompose, apply, applyInverse), shapes (Rectangle, Circle, Ellipse, Polygon, RoundedRectangle, Triangle), Rectangle layout helpers (pad, fit, enlarge, ceil, scale, getBounds), strokeContains hit tests, Polygon isClockwise/containsPolygon, toGlobal/toLocal, PointData/PointLike/Size types, DEG_TO_RAD, and pixi.js/math-extras vector and intersection helpers. Triggers on: Point, ObservablePoint, Matrix, Rectangle, Circle, Polygon, Triangle, RoundedRectangle, toGlobal, toLocal, hitArea, strokeContains, pad, fit, enlarge, ceil, getBounds, containsRect, intersects, isClockwise, math-extras, lineIntersection, segmentIntersection, DEG_TO_RAD, PointData.

pixijs/pixijs-migration-v8

Use this skill when upgrading to PixiJS v8 from v7 or diagnosing broken v7 code after an upgrade. Covers async app.init, single pixi.js package (deprecated @pixi/* sub-packages), Graphics shape-then-fill, BaseTexture → TextureSource, shader/uniform rework, ParticleContainer+Particle, constructor options objects, DisplayObject removal, settings/utils removal, Ticker signature, events rewrite. Triggers on: migrate v7, v8 breaking changes, @pixi/ import, DisplayObject, beginFill, endFill, cacheAsBitmap, BaseTexture, deprecated.

pixijs/pixijs-performance

Use this skill when profiling or optimizing a PixiJS v8 app for FPS, draw calls, or GPU memory. Covers destroy patterns (cacheAsTexture(false), releaseGlobalResources), GCSystem and TextureGCSystem, PrepareSystem, object pooling, batching rules, BitmapText for dynamic text, culling (Culler, CullerPlugin, cullable, cullArea), resolution/antialias tradeoffs. Triggers on: FPS, jank, draw calls, batching, object pool, GCSystem, PrepareSystem, Culler, cacheAsTexture, memory leak, destroy patterns.

pixijs/pixijs-scene-container

Use this skill when grouping, positioning, or transforming display objects in PixiJS v8. Covers Container constructor options (isRenderGroup, sortableChildren, boundsArea), addChild/removeChild/addChildAt/swapChildren/setChildIndex, position/scale/rotation/pivot/skew/alpha/tint, getBounds/getGlobalPosition/toLocal/toGlobal, zIndex sorting, cullable, onRender per-frame callback, destroy. Triggers on: Container, addChild, removeChild, addChildAt, swapChildren, sortableChildren, zIndex, position, scale, rotation, pivot, getBounds, toGlobal, toLocal, onRender, destroy, constructor options, ContainerOptions.

pixijs/pixijs-scene-core-concepts

Use this skill when reasoning about the PixiJS v8 scene graph as a whole: how containers, leaves, transforms, and render order fit together. Covers leaf vs container distinction, local/world coordinates, culling, render groups, sortable children, masking, RenderLayer, constructor options shared by every scene node, and which leaf skill covers which display object. Triggers on: scene graph, display list, Container, Sprite, Graphics, Text, Mesh, ParticleContainer, DOMContainer, GifSprite, masking, render group, RenderLayer, world transform, constructor options, ContainerOptions.

pixijs/pixijs-scene-dom-container

Use this skill when overlaying HTML elements on the PixiJS v8 canvas. Covers DOMContainer with element, anchor, and scene-graph-driven CSS transforms, the pixi.js/dom side-effect import, DOMPipe registration, visibility sync, pointer-events handling. Triggers on: DOMContainer, pixi.js/dom, DOMPipe, HTML overlay, input on canvas, iframe overlay, DOMContainerOptions, element, anchor, constructor options.

pixijs/pixijs-scene-gif

Use this skill when displaying animated GIFs in PixiJS v8. Covers the pixi.js/gif side-effect import, Assets.load returning a GifSource, GifSprite playback (play/stop/currentFrame/animationSpeed), autoPlay/loop options, onComplete/onLoop/onFrameChange callbacks, GifSource sharing, clone, destroy. Triggers on: GifSprite, GifSource, pixi.js/gif, animationSpeed, currentFrame, autoPlay, onComplete, onFrameChange, constructor options, GifSpriteOptions.

pixijs/pixijs-scene-graphics

Use this skill when drawing vector shapes and paths in PixiJS v8. Covers the Graphics API: shape-then-fill methods (rect/circle/ellipse/poly/roundRect/star/regularPoly/roundPoly/roundShape/filletRect/chamferRect), path methods (moveTo/lineTo/bezierCurveTo/quadraticCurveTo/arc/arcTo/arcToSvg/closePath), fill/stroke/cut, holes, FillGradient (linear/radial), FillPattern, GraphicsContext sharing, svg import/export, containsPoint hit testing, cloning, clearing, bounds, fillStyle/strokeStyle, draw-time transforms (rotateTransform/scaleTransform/translateTransform/setTransform/save/restore), default styles, GraphicsPath reuse. Triggers on: Graphics, GraphicsContext, rect, circle, poly, roundRect, fill, stroke, cut, hole, beginHole, FillGradient, FillPattern, moveTo, bezierCurveTo, svg, graphicsContextToSvg, svg export, GraphicsOptions, containsPoint, clone, clear, bounds, rotateTransform, translateTransform, setFillStyle, setStrokeStyle, GraphicsPath.

pixijs/pixijs-scene-mesh

Use this skill when rendering custom geometry in PixiJS v8. Covers Mesh with MeshGeometry (positions, uvs, indices, topology), MeshSimple for per-frame vertex animation, MeshPlane for subdivided deformation, MeshRope for path-following textures, PerspectiveMesh for 2.5D corners. Triggers on: Mesh, MeshGeometry, MeshSimple, MeshPlane, MeshRope, PerspectiveMesh, positions, uvs, indices, topology, setCorners, constructor options, MeshOptions, MeshPlaneOptions, MeshRopeOptions, SimpleMeshOptions, PerspectivePlaneOptions.

Skills relacionados