import { Environment2dOpts, IVisualScene2dComponent, RendererOptions } from '@gg-web-engine/core'; import { ApplicationOptions, Container, Texture } from 'pixi.js'; import type { PixiParallaxLayerComponent } from './pixi-parallax-layer.component'; import { PixiFactory } from '../pixi-factory'; import { PixiCameraComponent } from './pixi-camera.component'; import { PixiRendererComponent } from './pixi-renderer.component'; import { PixiVisualTypeDocRepo2D } from '../types'; /** * The pixi.js (v8) visual scene of a `Gg2dWorld`: pass a new one as `visualScene`. Its `factory` * creates shapes, sprites, text and the camera; the pixi `Container` holding the world is * `nativeContainer` once the world is initialized. * * @example * ```ts * import { Gg2dWorld } from '@gg-web-engine/core'; * import { PixiGgWorld, PixiSceneComponent } from '@gg-web-engine/pixi'; * * const world: PixiGgWorld = new Gg2dWorld({ visualScene: new PixiSceneComponent() }); // rendering only * await world.init(); * world.visualScene.setEnvironment({ background: 0x203040 }); * const label = world.visualScene.factory.createText('Hello', { fontSize: 32, color: 0xffffff }); * ``` */ export declare class PixiSceneComponent implements IVisualScene2dComponent { readonly backendName: string; private _nativeContainer; get nativeContainer(): Container | null; /** * The native world container, for code that needs it to exist: throws an error naming the fix * (await `world.init()`) instead of silently dropping whatever was meant to go into it before * `init()`. */ requireNativeContainer(action: string): Container; readonly factory: PixiFactory; /** The renderers currently drawing this scene - what `PixiFactory.prepare` uploads to. */ readonly renderers: Set; constructor(); /** Parallax layers currently in this scene - each renderer positions them for its own camera. */ readonly parallaxLayers: Set; init(): Promise; private _environment; /** Applied by each renderer when it draws - see `PixiRendererComponent.render`. */ get environment(): Readonly>; setEnvironment(environment: Partial>): void; createRenderer(camera: PixiCameraComponent, canvas?: HTMLCanvasElement, rendererOptions?: Partial): PixiRendererComponent; dispose(): void; }