forked from GoldenThumbs/GD_LensFlares
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.tscn
70 lines (53 loc) · 2.37 KB
/
test.tscn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
[gd_scene load_steps=10 format=3 uid="uid://7qh8j4068sfr"]
[ext_resource type="Script" path="res://src/cam.gd" id="1_blv34"]
[ext_resource type="Script" path="res://addons/lensflares/src/lens_flare.gd" id="2_bq81h"]
[ext_resource type="MultiMesh" uid="uid://ckquwgvl1wdsc" path="res://assets/test_flare.multimesh" id="3_ap8y4"]
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_nwpby"]
sky_horizon_color = Color(0.64625, 0.65575, 0.67075, 1)
ground_horizon_color = Color(0.64625, 0.65575, 0.67075, 1)
[sub_resource type="Sky" id="Sky_dctwn"]
sky_material = SubResource("ProceduralSkyMaterial_nwpby")
[sub_resource type="Environment" id="Environment_jy1em"]
background_mode = 2
sky = SubResource("Sky_dctwn")
tonemap_mode = 2
glow_enabled = true
[sub_resource type="BoxOccluder3D" id="BoxOccluder3D_3t8mb"]
size = Vector3(3, 3, 1)
[sub_resource type="GDScript" id="GDScript_ltcu2"]
script/source = "extends OccluderInstance3D
@export var travel_dist := 6.0
@export var travel_axis := Vector3(1, 0, 0)
var _side := true
var _origin := Vector3.ZERO
var _travel := Vector3.ZERO
func _ready() -> void:
_origin = position
func _physics_process(delta: float) -> void:
_travel += travel_axis * (delta * 3.0) * (2.0 * float(_side) - 1.0)
position = _origin + _travel
if (_side):
_side = _travel.dot(travel_axis) < travel_dist
else:
_side = -_travel.dot(travel_axis) > travel_dist
"
[sub_resource type="BoxMesh" id="BoxMesh_p7vsq"]
size = Vector3(3, 3, 1)
[node name="Node3D" type="Node3D"]
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_jy1em")
[node name="OmniLight3D" type="OmniLight3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0)
[node name="LensFlare" type="VisibleOnScreenNotifier3D" parent="OmniLight3D"]
aabb = AABB(-0.05, -0.05, -0.05, 0.1, 0.1, 0.1)
script = ExtResource("2_bq81h")
flare_multimesh = ExtResource("3_ap8y4")
[node name="Camera3D" type="Camera3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 8)
script = ExtResource("1_blv34")
[node name="OccluderInstance3D" type="OccluderInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 4)
occluder = SubResource("BoxOccluder3D_3t8mb")
script = SubResource("GDScript_ltcu2")
[node name="MeshInstance3D" type="MeshInstance3D" parent="OccluderInstance3D"]
mesh = SubResource("BoxMesh_p7vsq")