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 _process(delta:float) -> void: | |
#we = WorldEnvironment | |
var current:Environment = environments[environment] | |
var d:float = delta * lerp_speed | |
for data in we.get_property_list(): | |
var key = data.name | |
var value = we.get(data.name) | |
match data.type: |
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 AnimationPlayer | |
tool | |
#put all your downloaded fbx files from mixamo into scenes | |
export(Array,PackedScene) var scenes = [] | |
func process_file(packed:PackedScene): | |
var scene = packed.instance() | |
var ap2:AnimationPlayer = scene.get_node('RootNode/AnimationPlayer') | |
for anim in ap2.get_animation_list(): |
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 screenshot(): | |
var img = get_viewport().get_texture().get_data() | |
img.flip_y() | |
var dir:Directory = Directory.new() | |
var now = OS.get_date() | |
var folder:String = 'user://screenshots/%s-%s-%s' % [now.year,now.month,now.day] | |
dir.make_dir_recursive(folder) | |
img.save_png(folder+'/%d.png' % OS.get_unix_time()) |
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
function pad(d){ | |
d = d.toString(); | |
while(d.length < 2){ | |
d = '0'+d; | |
} | |
return d; | |
} | |
function td(){ |
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
var dir:Directory = Directory.new() | |
var now = OS.get_date() | |
var folder:String = 'user://screenshots/%s-%s-%s' % [now.year,now.month,now.day] | |
dir.make_dir_recursive(folder) | |
img.save_png(folder+'/%d.png' % OS.get_unix_time()) |
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 Spatial | |
tool | |
var time:float = 0.0 | |
export var time_scale:float = 1.0 | |
export var distance_from_object:float = 6.0 | |
export var look_at_position:Vector3 = Vector3(0,0,0) | |
func _process(delta): |