@@ -56,7 +56,7 @@ godot.register_signal(MySprite, 'game_over');
5656export default class MySprite extends godot .Sprite {
5757 _process (delta ) {
5858 // Yes! We can use operators in JavaScript like GDScript
59- this .position += this .direction * new Vector2 (delta, delta);
59+ this .position += this .direction * new godot. Vector2 (delta, delta);
6060 }
6161};
6262// export 'direction' properties to MySprite godot inspector
@@ -99,6 +99,21 @@ Label.Align.ALIGN_LEFT | godot.Label.Align.ALIGN_LEFT
9999 - ` godot.register_property(cls, name, default_value) ` to define and export properties
100100 - ` godot.register_class(cls, name) ` to register named class manually
101101 - ` godot.set_class_tags(tooled, icon) ` to set ` tool ` and ` icon ` of the class
102+ - ` godot.requestAnimationFrame(callbacl) ` to add a callback function to be called every frame
103+ - ` godot.cancelAnimationFrame(request_id) ` to cancel an frame request previously scheduled
104+ - ` godot.get_type(val) ` Returns the internal type of the given ` Variant ` object, using the ` godot.TYPE_* `
105+ - Using signals in the ECMAScript way
106+ - Allow passing functions for ` godot.Object.connect ` , ` godot.Object.disconnect ` and ` godot.Object.is_connected `
107+ ```js
108+ this.panel.connect(godot.Control.resized, (size) => {
109+ console.log('The size of the panel changed to:', size);
110+ });
111+ ```
112+ - Using ` await ` to wait signals
113+ ```js
114+ await godot.yield(this.get_tree().create_timer(1), godot.SceneTreeTimer.timeout);
115+ console.log('After one second to show');
116+ ```
102117
103118You can run the menu command from godot editor to dump the api declearations.
104119```
0 commit comments