@openfairygui/core
v0.6.3
Published
FairyGUI Headless Authoring SDK — core property graph, Document, and I/O.
Maintainers
Readme
@openfairygui/core
Core SDK for OpenFairyGUI, providing the document model, property graph, project I/O, and binary I/O.
Install
npm install --save @openfairygui/coreUsage
Browser-safe root entry:
import { Document } from '@openfairygui/core';Node project I/O:
import { NodeIO } from '@openfairygui/core/node';
const io = new NodeIO();
const doc = await io.readProject('./MyProject/MyProject.fairy');Use readProjectDetailed(..., { hydrateResourceBytes: true }) when a caller must retain parse, skipped-file, and source-read diagnostics instead of failing or silently omitting partial content.
Browser project I/O:
import { WebIO } from '@openfairygui/core/web';
const io = new WebIO({ root: projectDirectoryHandle });
const doc = await io.readProject('Project.fairy');Shared project I/O types without platform adapters:
import { ProjectReader, ProjectWriter, type FileSystem } from '@openfairygui/core/project-io';@openfairygui/core/web only reads and writes FairyGUI project trees. Publishing, restoring, and Node filesystem defaults stay outside the browser entrypoint.
See the repository README for broader examples and workflow guidance:
- https://github.com/OpenFairyGUI/OpenFairyGUI
