Skip to content

Latest commit

 

History

History
74 lines (55 loc) · 1.28 KB

README.md

File metadata and controls

74 lines (55 loc) · 1.28 KB

https://godothin.herokuapp.com/

Built-in Functions

You can use this functions directly on scope of your script

func getNode(node: String) -> Node

bind to this.get_node()

Ex: getNode("Sprite").position = Vector2(200, 200)

scope variables

this

Reference for get_parent() and root functions

func echo(msg: Any) -> void

Ex: this.echo(getNode("Sprite")) this.echo(getNode("Sprite").position)

gt

Reference for all godothin classes

gt.core     //core functions
gt.image    //image functions

gtCore

Run GDScript on Node

console (optional) Text element to output errors

static func _eval(input:String, target:Node, console=false) -> any

gtImage

Set Node target to append HTTPRequest

func setTarget(node:Node) -> any

Download Image and apply as texture

ps.: running on html can be cors error

func downloadPng(url:String) -> any

Example:

var src = "https://i.imgur.com/BUnYvol.png"
var img = gtImage.new()
img.setTarget(getNode("Sprite"))
img.downloadPng(src)

Object Functions - gtObject

func setX(x: float) -> void
func setY(x: float) -> void
func setPos(x: float) -> void

Ex: getNode("Sprite").setX(250) getNode("Sprite").setPos(250, 500)