burnage
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
extends Sprite3D
|
||||
@onready var animation_player: AnimationPlayer = $AnimationPlayer
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
animation_player.seek(randf_range(0.,.4))
|
||||
animation_player.speed_scale = randf_range(0.7,1.3)
|
||||
@@ -0,0 +1 @@
|
||||
uid://btmcmchyhipdy
|
||||
@@ -0,0 +1,21 @@
|
||||
shader_type spatial;
|
||||
render_mode cull_disabled;
|
||||
|
||||
uniform sampler2D tex : source_color, filter_nearest;
|
||||
uniform float intensity = 1;
|
||||
|
||||
void vertex() {
|
||||
// Called for every vertex the material is visible on.
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
vec4 color = texture(tex,UV);
|
||||
ALBEDO = vec3(0,0,0);
|
||||
EMISSION = color.rgb * intensity;
|
||||
ALPHA = color.a;
|
||||
}
|
||||
|
||||
//void light() {
|
||||
// // Called for every pixel for every light affecting the material.
|
||||
// // Uncomment to replace the default light processing function with this one.
|
||||
//}
|
||||
@@ -0,0 +1 @@
|
||||
uid://bw1w2dsdolhw
|
||||
@@ -0,0 +1,66 @@
|
||||
[gd_scene load_steps=8 format=3 uid="uid://dwd7bdnc82anm"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://cqgmd4n3v8vpo" path="res://models/T_Fire.png" id="1_qjpos"]
|
||||
[ext_resource type="Shader" uid="uid://bw1w2dsdolhw" path="res://prefabs/firesprite.gdshader" id="1_xelca"]
|
||||
[ext_resource type="Script" uid="uid://btmcmchyhipdy" path="res://prefabs/firesprite.gd" id="2_ftlo4"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_5fcrl"]
|
||||
render_priority = 0
|
||||
shader = ExtResource("1_xelca")
|
||||
shader_parameter/tex = ExtResource("1_qjpos")
|
||||
shader_parameter/intensity = 1.98
|
||||
|
||||
[sub_resource type="Animation" id="Animation_xelca"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath(".:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [0]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_ftlo4"]
|
||||
resource_name = "fire"
|
||||
length = 0.4015
|
||||
loop_mode = 1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath(".:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.1, 0.20165114, 0.29820445),
|
||||
"transitions": PackedFloat32Array(1, 1, 1, 1),
|
||||
"update": 1,
|
||||
"values": [0, 1, 2, 3]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_5fcrl"]
|
||||
_data = {
|
||||
&"RESET": SubResource("Animation_xelca"),
|
||||
&"fire": SubResource("Animation_ftlo4")
|
||||
}
|
||||
|
||||
[node name="Firesprite" type="Sprite3D"]
|
||||
transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0)
|
||||
material_override = SubResource("ShaderMaterial_5fcrl")
|
||||
cast_shadow = 0
|
||||
texture_filter = 0
|
||||
texture = ExtResource("1_qjpos")
|
||||
hframes = 4
|
||||
region_enabled = true
|
||||
region_rect = Rect2(0, 0, 128, 20.214777)
|
||||
script = ExtResource("2_ftlo4")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
libraries = {
|
||||
&"": SubResource("AnimationLibrary_5fcrl")
|
||||
}
|
||||
autoplay = "fire"
|
||||
Reference in New Issue
Block a user