Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/romgerman/gdx
Godot Script XML (parody of JSX)
https://github.com/romgerman/gdx
godot godot-engine godot4
Last synced: about 1 month ago
JSON representation
Godot Script XML (parody of JSX)
- Host: GitHub
- URL: https://github.com/romgerman/gdx
- Owner: romgerman
- License: mit
- Created: 2024-09-02T17:52:51.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-09-29T12:24:55.000Z (3 months ago)
- Last Synced: 2024-10-20T03:42:13.834Z (2 months ago)
- Topics: godot, godot-engine, godot4
- Language: GDScript
- Homepage:
- Size: 871 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Godot Script XML
Just a proof of concept
# Installation
Place contents of `addons/gdx` folder into your `addons/gdx` folder.
# Usage
Use `GdxRender.render_text` to "render" nodes.
Example:
```gdscript
var output = GdxRender.render_text('
', self, {
"pos": Vector2(100, 100),
"pos2": Vector2(200, 200),
"text": "No hello"
})
````output.refs` contains refs you defined inside the code. It's a `Dictionary` with nodes.
Example:
```gdscript
var ref := output.refs.texture_ref as TextureRect
var tween = create_tween().set_trans(Tween.TRANS_SINE).set_loops()
tween.tween_property(ref, "scale", Vector2(1.2, 1.2), 0.25).set_delay(0.1)
tween.tween_property(ref, "scale", Vector2.ONE, 0.25).set_delay(0.1)
tween.play()
```See full example inside `test_node.gd`.