@textscene/tscn
v0.3.0
Published
Parser for Godot .tscn scenes, with no React, no three.js and no peer dependencies. Runs in Node and in a browser.
Maintainers
Readme
@textscene/tscn
@textscene/tscn parses Godot .tscn scenes. It is the parser of the
TextScene Inspector, bundled into one ES module
with no dependency, no peer dependency, no React and no three.js. It runs in Node and in a browser.
The parser reads the current .tscn format (format=3). The repository's
glossary defines the format's terms,
and REFERENCES.md links Godot's
format documentation.
Install
npm install @textscene/tscnUse
import { TscnParser } from '@textscene/tscn';
const scene = new TscnParser().parse(source);
console.log(scene.nodes[0]?.name);The package exports TscnParser and the types of the scene it returns: TscnScene, TscnNode,
RawNode, TscnExternalResource, TscnInternalResource and TscnMainResource.
Licence
MIT. The package ships LICENSE and THIRD-PARTY-NOTICES.md. The build writes the notices from the
modules it bundles: the Godot Engine MIT notice covers the Godot code in the parser.
