import { Texture } from 'pixi.js'; import { RigDocument } from '@energy8platform/golem/runtime'; export { AnimationState, PlayOptions, RigDocument, RigPlayer, RigSymbol, RigSymbolOptions, SymbolSize, createTextures, parse } from '@energy8platform/golem/runtime'; /** * `@energy8platform/game-engine/golem` — golem rigs (`@energy8platform/golem`) in a game. * * Optional peer, like Spine: only games with rigs import this entry. A rig is a `rig.json` plus the PNGs * beside it under `public/`; `loadRig` fetches both through pixi `Assets`, and the result instantiates as a * `RigSymbol` in a reel cell (it IS a `SymbolView`, checked below) or a `RigPlayer` anywhere on stage. * * @example * ```ts * const rigs = await loadRigs({ h1: 'assets/rigs/h1/rig.json' }); * const resolveSymbol: SymbolResolver = (id) => * rigs[id] ? new RigSymbol(rigs[id].doc, rigs[id].textures, { size: 110 }) : new AnimatedSymbol(...); * ``` */ /** A rig ready to instantiate: the parsed document and one Texture per asset. */ interface Rig { doc: RigDocument; textures: Map; } /** Load `url` (a rig.json) and every asset beside it through pixi Assets (cached by URL, so repeats are free). */ declare function loadRig(url: string): Promise; /** `loadRig` for each entry, keyed the same way. A missing file rejects — a rig the game names must exist. */ declare function loadRigs(urls: Record): Promise>; export { loadRig, loadRigs }; export type { Rig };