summaryrefslogtreecommitdiff
path: root/godot/particles
diff options
context:
space:
mode:
authorAnson Bridges <bridges.anson@gmail.com>2022-09-07 14:07:30 -0400
committerAnson Bridges <bridges.anson@gmail.com>2022-09-07 14:07:30 -0400
commitc232b92e2dde1277324d1f89d0e75ae641e4ac3b (patch)
treee11a5dd52f259c1cc7345baa40b372b304417f00 /godot/particles
parenta0967ebe815cd229b69fb9578f2288b95b2ddb28 (diff)
reorganized, ladders, vehicle control
Diffstat (limited to 'godot/particles')
-rw-r--r--godot/particles/RocketTrail.tscn42
-rw-r--r--godot/particles/p_Explosion.gd31
-rw-r--r--godot/particles/p_Explosion.tscn193
3 files changed, 266 insertions, 0 deletions
diff --git a/godot/particles/RocketTrail.tscn b/godot/particles/RocketTrail.tscn
new file mode 100644
index 0000000..5da672a
--- /dev/null
+++ b/godot/particles/RocketTrail.tscn
@@ -0,0 +1,42 @@
+[gd_scene load_steps=8 format=2]
+
+[sub_resource type="Gradient" id=6]
+offsets = PoolRealArray( 0, 0.180645, 0.554839, 1 )
+colors = PoolColorArray( 1, 0.140625, 0, 1, 1, 0.906855, 0.148387, 1, 1, 1, 1, 1, 0, 0, 0, 1 )
+
+[sub_resource type="GradientTexture" id=7]
+gradient = SubResource( 6 )
+
+[sub_resource type="Curve" id=4]
+_data = [ Vector2( 0, 0 ), 0.0, 0.0, 0, 0, Vector2( 0.140449, 0.409091 ), 0.0, 0.0, 0, 0 ]
+
+[sub_resource type="CurveTexture" id=5]
+curve = SubResource( 4 )
+
+[sub_resource type="ParticlesMaterial" id=1]
+spread = 2.23
+gravity = Vector3( 0, 1, 0 )
+initial_velocity = 19.8
+damping = 13.78
+scale_curve = SubResource( 5 )
+color_ramp = SubResource( 7 )
+
+[sub_resource type="SpatialMaterial" id=3]
+flags_unshaded = true
+flags_do_not_receive_shadows = true
+vertex_color_use_as_albedo = true
+params_cull_mode = 2
+params_billboard_mode = 3
+particles_anim_h_frames = 1
+particles_anim_v_frames = 1
+particles_anim_loop = false
+
+[sub_resource type="QuadMesh" id=2]
+material = SubResource( 3 )
+
+[node name="RocketTrail" type="Particles"]
+amount = 256
+visibility_aabb = AABB( -21.1601, -4, -4, 42.3202, 8, 8 )
+local_coords = false
+process_material = SubResource( 1 )
+draw_pass_1 = SubResource( 2 )
diff --git a/godot/particles/p_Explosion.gd b/godot/particles/p_Explosion.gd
new file mode 100644
index 0000000..f0cbd96
--- /dev/null
+++ b/godot/particles/p_Explosion.gd
@@ -0,0 +1,31 @@
+extends Spatial
+
+
+# Declare member variables here. Examples:
+# var a = 2
+# var b = "text"
+var timer = 0
+#Vector3
+# Called when the node enters the scene tree for the first time.
+func _ready():
+ pass # Replace with function body.
+
+func init(position, norm):
+ global_transform.origin = position+norm*.1
+ $outer_flash2.translate(norm*.3)
+ $debris1.process_material.direction = norm
+ $debris2.process_material.direction = norm
+
+ $shock.restart()
+ $flame1.restart()
+ $outer_flash.restart()
+ $outer_flash2.restart()
+ #$smoke.restart()
+ $debris1.restart()
+ $debris2.restart()
+
+#Called every frame. 'delta' is the elapsed time since the previous frame.
+func _process(delta):
+ if timer > 1:
+ queue_free()
+ timer += delta
diff --git a/godot/particles/p_Explosion.tscn b/godot/particles/p_Explosion.tscn
new file mode 100644
index 0000000..d478c6a
--- /dev/null
+++ b/godot/particles/p_Explosion.tscn
@@ -0,0 +1,193 @@
+[gd_scene load_steps=26 format=2]
+
+[ext_resource path="res://particles/p_Explosion.gd" type="Script" id=1]
+
+[sub_resource type="SpatialMaterial" id=1]
+flags_use_shadow_to_opacity = true
+vertex_color_use_as_albedo = true
+params_blend_mode = 1
+params_billboard_mode = 3
+particles_anim_h_frames = 1
+particles_anim_v_frames = 1
+particles_anim_loop = false
+
+[sub_resource type="Curve" id=2]
+max_value = 7.0
+_data = [ Vector2( 0, 0 ), 0.0, 0.0, 0, 0, Vector2( 0.424528, 1.60682 ), 0.0, 0.0, 0, 0, Vector2( 1, 7 ), 0.0, 0.0, 0, 0 ]
+
+[sub_resource type="CurveTexture" id=3]
+curve = SubResource( 2 )
+
+[sub_resource type="ParticlesMaterial" id=4]
+gravity = Vector3( 0, 0, 0 )
+scale_curve = SubResource( 3 )
+color = Color( 0.0941176, 0.188235, 0.227451, 1 )
+
+[sub_resource type="QuadMesh" id=5]
+
+[sub_resource type="SpatialMaterial" id=6]
+flags_transparent = true
+flags_unshaded = true
+vertex_color_use_as_albedo = true
+params_billboard_mode = 3
+particles_anim_h_frames = 1
+particles_anim_v_frames = 1
+particles_anim_loop = false
+
+[sub_resource type="Gradient" id=7]
+offsets = PoolRealArray( 0, 0.634921, 1 )
+colors = PoolColorArray( 1, 0.835294, 0.701961, 0.513726, 1, 0.639216, 0.172549, 0.501961, 1, 0.105882, 0.105882, 0 )
+
+[sub_resource type="GradientTexture" id=8]
+gradient = SubResource( 7 )
+
+[sub_resource type="Curve" id=9]
+max_value = 5.0
+_data = [ Vector2( 0, 0 ), 0.0, 0.0, 0, 0, Vector2( 0.849057, 5 ), 0.0, 0.0, 0, 0, Vector2( 1, 1 ), 0.0, 0.0, 0, 0 ]
+
+[sub_resource type="CurveTexture" id=10]
+curve = SubResource( 9 )
+
+[sub_resource type="ParticlesMaterial" id=11]
+flag_align_y = true
+gravity = Vector3( 0, 0, 0 )
+angle = 360.0
+angle_random = 1.0
+scale_random = 1.0
+scale_curve = SubResource( 10 )
+color_ramp = SubResource( 8 )
+
+[sub_resource type="QuadMesh" id=12]
+
+[sub_resource type="SpatialMaterial" id=13]
+flags_transparent = true
+flags_unshaded = true
+vertex_color_use_as_albedo = true
+params_billboard_mode = 3
+particles_anim_h_frames = 1
+particles_anim_v_frames = 1
+particles_anim_loop = false
+
+[sub_resource type="Gradient" id=14]
+offsets = PoolRealArray( 0.0793651, 0.529101, 0.851852, 0.989418, 1 )
+colors = PoolColorArray( 0.956543, 0.831057, 0.246609, 1, 0.919448, 0.46755, 0.219383, 0.935294, 0.882353, 0.580392, 0.192157, 0.870588, 0.941176, 0.193723, 0.113725, 0, 0.407843, 0.368627, 0.368627, 0 )
+
+[sub_resource type="GradientTexture" id=15]
+gradient = SubResource( 14 )
+
+[sub_resource type="Curve" id=16]
+max_value = 7.0
+_data = [ Vector2( 0, 0 ), 0.0, 6.13549, 0, 0, Vector2( 1, 7 ), 8.30534, 0.0, 0, 0 ]
+
+[sub_resource type="CurveTexture" id=17]
+curve = SubResource( 16 )
+
+[sub_resource type="ParticlesMaterial" id=18]
+spread = 180.0
+gravity = Vector3( 0, 0, 0 )
+linear_accel = -10.0
+angle = 360.0
+angle_random = 1.0
+scale_random = 0.43
+scale_curve = SubResource( 17 )
+color_ramp = SubResource( 15 )
+
+[sub_resource type="QuadMesh" id=19]
+
+[sub_resource type="SpatialMaterial" id=20]
+flags_transparent = true
+flags_unshaded = true
+vertex_color_use_as_albedo = true
+params_billboard_mode = 3
+particles_anim_h_frames = 1
+particles_anim_v_frames = 1
+particles_anim_loop = false
+
+[sub_resource type="Gradient" id=21]
+offsets = PoolRealArray( 0.00529101, 0.0529101, 0.179894, 0.719577, 0.989418 )
+colors = PoolColorArray( 0.910156, 0.0888824, 0.0888824, 1, 0.789063, 0.40609, 0.0986328, 1, 0.0649414, 0.0421104, 0.0421104, 1, 0.0666667, 0.0431373, 0.0431373, 1, 0.0627451, 0.0431373, 0.0431373, 0 )
+
+[sub_resource type="GradientTexture" id=22]
+gradient = SubResource( 21 )
+
+[sub_resource type="ParticlesMaterial" id=23]
+lifetime_randomness = 0.03
+direction = Vector3( 0, 1, 0 )
+spread = 90.0
+initial_velocity = 13.0
+initial_velocity_random = 1.0
+angular_velocity = 164.21
+angular_velocity_random = 0.5
+angle = 360.0
+angle_random = 1.0
+scale = 0.3
+scale_random = 0.1
+color_ramp = SubResource( 22 )
+
+[sub_resource type="QuadMesh" id=24]
+
+[node name="p_Explosion" type="Spatial"]
+script = ExtResource( 1 )
+
+[node name="shock" type="Particles" parent="."]
+material_override = SubResource( 1 )
+emitting = false
+amount = 1
+lifetime = 0.26
+one_shot = true
+explosiveness = 1.0
+visibility_aabb = AABB( -15, -15, -15, 30, 30, 30 )
+draw_order = 2
+process_material = SubResource( 4 )
+draw_pass_1 = SubResource( 5 )
+
+[node name="flame1" type="Particles" parent="."]
+material_override = SubResource( 6 )
+emitting = false
+lifetime = 0.12
+one_shot = true
+explosiveness = 1.0
+draw_order = 2
+process_material = SubResource( 11 )
+draw_pass_1 = SubResource( 12 )
+
+[node name="outer_flash" type="Particles" parent="."]
+material_override = SubResource( 13 )
+emitting = false
+amount = 1
+lifetime = 0.23
+one_shot = true
+explosiveness = 1.0
+draw_order = 2
+process_material = SubResource( 18 )
+draw_pass_1 = SubResource( 19 )
+
+[node name="outer_flash2" type="Particles" parent="."]
+material_override = SubResource( 13 )
+emitting = false
+amount = 1
+lifetime = 0.23
+one_shot = true
+explosiveness = 1.0
+process_material = SubResource( 18 )
+draw_pass_1 = SubResource( 19 )
+
+[node name="debris1" type="Particles" parent="."]
+material_override = SubResource( 20 )
+emitting = false
+amount = 4
+lifetime = 1.5
+one_shot = true
+explosiveness = 1.0
+process_material = SubResource( 23 )
+draw_pass_1 = SubResource( 24 )
+
+[node name="debris2" type="Particles" parent="."]
+material_override = SubResource( 20 )
+emitting = false
+amount = 7
+lifetime = 1.5
+one_shot = true
+explosiveness = 1.0
+process_material = SubResource( 23 )
+draw_pass_1 = SubResource( 24 )