
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
@fernforestgames/godot-resource-parser
Advanced tools
A TypeScript/JavaScript library for parsing Godot 4's .tscn (scene) and .tres (resource) files.
npm install @fernforestgames/godot-resource-parser
import { parse, parseScene, parseResource } from '@fernforestgames/godot-resource-parser';
import * as fs from 'fs';
// Auto-detect file type (scene or resource)
const content = fs.readFileSync('scene.tscn', 'utf8');
const parsed = parse(content);
// Parse scene file (.tscn)
const scene = parseScene(content);
console.log(scene.nodes); // Access scene nodes
console.log(scene.connections); // Access signal connections
// Parse resource file (.tres)
const resourceContent = fs.readFileSync('material.tres', 'utf8');
const resource = parseResource(resourceContent);
console.log(resource.resource?.properties); // Access resource properties
import { isGodotScene, isVector3, isColor } from '@fernforestgames/godot-resource-parser';
const result = parse(content);
if (isGodotScene(result)) {
// TypeScript knows this is a GodotScene
result.nodes.forEach(node => {
console.log(node.name, node.type);
});
}
// Check value types
const position = node.properties.position;
if (isVector3(position)) {
console.log(`Position: ${position.x}, ${position.y}, ${position.z}`);
}
The package includes a command-line tool for parsing Godot files into an AST. You can run it using npx or install it globally:
# Parse a file
npx @fernforestgames/godot-resource-parser scene.tscn > output.json
# Parse from stdin
cat scene.tscn | godot-resource-parser > output.json
// Auto-detects and parses either a scene or resource file.
parse(content: string): ParsedGodotFile;
// Parses a Godot scene file (`.tscn`). Throws error if file is not a scene.
parseScene(content: string): GodotScene;
// Parses a Godot resource file (`.tres`). Throws error if file is not a resource.
parseResource(content: string): GodotResource;
interface GodotScene {
header: GdSceneHeader
extResources: ExtResource[]
subResources: SubResource[]
nodes: Node[]
connections: Connection[]
editables: Editable[]
}
interface Node {
name: string
type: string
parent?: string
instance?: ExtResourceRef
owner?: string
index?: number
groups?: string[]
properties: Record<string, GodotValue>
}
interface Connection {
signal: string
from: string
to: string
callable?: string
method?: string // Legacy support
flags?: number
binds?: GodotValue[]
unbinds?: number
}
interface GodotResource {
header: GdResourceHeader
extResources: ExtResource[]
subResources: SubResource[]
resource?: ResourceSection
}
interface ResourceSection {
properties: Record<string, GodotValue>
}
// File type guards
isGodotScene(value): value is GodotScene
isGodotResource(value): value is GodotResource
// Value type guards
isVector2(value): value is Vector2
isVector3(value): value is Vector3
isColor(value): value is Color
isExtResourceRef(value): value is ExtResourceRef
isSubResourceRef(value): value is SubResourceRef
Released under the MIT License. See the LICENSE file for details.
FAQs
Parser for Godot 4 .tscn and .tres files
We found that @fernforestgames/godot-resource-parser demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.