pixijs-environments

Configure PixiJS v8 adapters and CSP-safe imports for non-browser environments.

302|15|Updated Apr 1, 2026
One-click install
npx skills add https://github.com/pixijs/pixijs-skills --skill pixijs-environments
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pixijs-environments
Source: https://github.com/pixijs/pixijs-skills/tree/main/skills/pixijs-environments
Command: npx skills add https://github.com/pixijs/pixijs-skills --skill pixijs-environments

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Configure and run PixiJS v8 in non-browser environments by providing adapter patterns and CSP-safe imports, enabling reliable cross-environment initialization.

Core Features & Use Cases

  • Guides on swapping DOMAdapter to WebWorkerAdapter or a custom adapter to run PixiJS outside the browser.
  • Covers CSP-safe imports like pixi.js/unsafe-eval and loadEnvironmentExtensions usage for environment-specific setups.
  • Use Case: Deploy PixiJS in a Node server-side rendering context or a web worker where DOM access is restricted.

Quick Start

Choose the appropriate environment adapter (e.g., DOMAdapter.set(WebWorkerAdapter) or a custom adapter) and import the CSP-safe module before initializing the PixiJS application.

Frequently Asked Questions about pixijs-environments

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run PixiJS v8 in a Web Worker?

To run PixiJS v8 in a Web Worker, swap the default DOMAdapter to WebWorkerAdapter using DOMAdapter.set(WebWorkerAdapter) before initializing your application to ensure reliable startup without DOM access.

What are CSP-safe imports for PixiJS v8?

CSP-safe imports for PixiJS v8 involve using the pixi.js/unsafe-eval module and loadEnvironmentExtensions to configure environment-specific setups, bypassing strict Content Security Policy restrictions during initialization.

Why does PixiJS v8 fail to initialize in restricted environments?

PixiJS v8 fails in restricted environments because the default adapter requires DOM access; resolving this requires setting the appropriate environment adapter and using CSP-safe imports before application initialization.

What is the required initialization order for PixiJS v8 adapters?

The required initialization order for PixiJS v8 adapters involves importing the CSP-safe module first, then setting the adapter via DOMAdapter.set, and finally initializing the PixiJS application to ensure reliable startup.