material-maker/material_maker/nodes/audio.tscn

75 lines
1.9 KiB
Plaintext
Raw Normal View History

2020-02-24 08:32:11 +01:00
[gd_scene load_steps=5 format=2]
[ext_resource path="res://material_maker/nodes/audio.gd" type="Script" id=1]
[sub_resource type="AudioStreamGenerator" id=1]
buffer_length = 0.1
[sub_resource type="Shader" id=2]
resource_local_to_scene = true
[sub_resource type="ShaderMaterial" id=3]
resource_local_to_scene = true
shader = SubResource( 2 )
[node name="Audio" type="GraphNode"]
margin_right = 96.0
margin_bottom = 115.0
title = "Audio"
show_close = true
slot/0/left_enabled = true
slot/0/left_type = 4
slot/0/left_color = Color( 1, 1, 0, 1 )
slot/0/right_enabled = false
slot/0/right_type = 0
slot/0/right_color = Color( 1, 1, 1, 1 )
slot/1/left_enabled = false
slot/1/left_type = 0
slot/1/left_color = Color( 1, 1, 1, 1 )
slot/1/right_enabled = false
slot/1/right_type = 0
slot/1/right_color = Color( 1, 1, 1, 1 )
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false,
"_editor_description_": ""
}
[node name="Button" type="Button" parent="."]
margin_left = 16.0
margin_top = 24.0
margin_right = 80.0
margin_bottom = 44.0
text = "Play"
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
stream = SubResource( 1 )
[node name="ViewportContainer" type="ViewportContainer" parent="."]
margin_left = 16.0
margin_top = 45.0
margin_right = 80.0
margin_bottom = 109.0
rect_min_size = Vector2( 64, 64 )
mouse_filter = 2
[node name="Viewport" type="Viewport" parent="ViewportContainer"]
size = Vector2( 64, 64 )
transparent_bg = true
handle_input_locally = false
usage = 0
render_target_v_flip = true
render_target_update_mode = 3
[node name="ColorRect" type="ColorRect" parent="ViewportContainer/Viewport"]
material = SubResource( 3 )
margin_right = 64.0
margin_bottom = 64.0
rect_min_size = Vector2( 64, 64 )
[node name="Timer" type="Timer" parent="."]
wait_time = 0.1
one_shot = true
[connection signal="pressed" from="Button" to="." method="_on_Button_pressed"]
[connection signal="timeout" from="Timer" to="." method="update_shader"]