This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tool | |
extends EditorPlugin | |
var ray_length = 1000 | |
var position3d_node_name = "Pos3D" | |
func handles(object): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# original: https://godotengine.org/asset-library/asset/701 | |
extends Camera | |
export(float, 0.0, 1.0) var sensitivity = 0.25 | |
# Mouse state | |
var _mouse_position = Vector2(0.0, 0.0) | |
var _total_pitch = 0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static func get_files_by_ext(dir:String, extension:String, recursive=false)->Array: | |
var files = get_files(dir, recursive) | |
var res = [] | |
for i in files: | |
if i.get_extension() == extension: | |
res.push_back(i) | |
return res | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static func set_bit_vals(dict:Dictionary): | |
var i = 1 | |
for key in dict: | |
dict[key] = i | |
i += i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tool | |
extends EditorPlugin | |
func _enter_tree(): | |
var base = get_editor_interface().get_base_control() | |
var expand_button:ToolButton = get_expand_bottom_panel_button(base) | |
expand_button.pressed = not expand_button.pressed | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# not reusable/ abstraction needed | |
tabcont.connect("tab_changed", self, 'on_signal_tab_changed') | |
connect("tab_changed__last_in_frame", self, "on_tab_changed__last_in_frame") | |
signal tab_changed__last_in_frame | |
var started: = false | |
var result:int | |
func on_signal_tab_changed(tab:int): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# not tested!! | |
extends Object | |
class_name CodeUtils | |
static func code_line_split(s:String)->PoolStringArray: | |
var res: PoolStringArray |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extends ImmediateGeometry | |
export var offset = 0.01 | |
export var grid_step = 1 | |
export var grid_size = 10 | |
func _ready(): | |
begin(Mesh.PRIMITIVE_LINES) | |
var half_grid_size = grid_size/2.0 | |
for i in range(-half_grid_size, half_grid_size+1): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func _ready(): | |
pass |
NewerOlder