@woosh/meep-engine 2.41.0 → 2.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/geom/3d/apply_mat4_transform_to_v3_array.js +2 -4
- package/core/geom/3d/sphere/sphere_radius_sqr_from_v3_array_transformed.js +28 -0
- package/core/geom/Quaternion.js +14 -0
- package/engine/EngineHarness.js +9 -3
- package/engine/ecs/transform/Transform.js +23 -3
- package/engine/graphics/ecs/decal/v2/Decal.d.ts +11 -0
- package/engine/graphics/ecs/decal/v2/Decal.js +50 -0
- package/engine/graphics/ecs/decal/v2/FPDecalSystem.d.ts +8 -0
- package/engine/graphics/ecs/decal/v2/FPDecalSystem.js +213 -0
- package/engine/graphics/ecs/decal/v2/prototypeDecalSystem.js +237 -0
- package/engine/graphics/ecs/mesh-v2/ShadedGeometry.js +8 -1
- package/engine/graphics/ecs/mesh-v2/build_three_object.js +4 -0
- package/engine/graphics/geometry/MikkT/MikkTSpace.js +466 -305
- package/engine/graphics/geometry/buffered/computeGeometryEquality.js +1 -1
- package/engine/graphics/geometry/buffered/computeGeometryHash.js +1 -1
- package/engine/graphics/impostors/octahedral/ImpostorBaker.js +27 -14
- package/engine/graphics/impostors/octahedral/ImpostorDescription.js +6 -0
- package/engine/graphics/impostors/octahedral/README.md +1 -0
- package/engine/graphics/impostors/octahedral/bake/compute_bounding_sphere.js +25 -22
- package/engine/graphics/impostors/octahedral/bake/compute_bounding_sphere_radius_only.js +37 -0
- package/engine/graphics/impostors/octahedral/bake/prepare_bake_material.js +30 -1
- package/engine/graphics/impostors/octahedral/grid/HemiOctahedralUvEncoder.js +1 -1
- package/engine/graphics/impostors/octahedral/prototypeBaker.js +121 -22
- package/engine/graphics/impostors/octahedral/shader/BakeShaderStandard.js +46 -7
- package/engine/graphics/impostors/octahedral/shader/ImpostorShaderV0.js +349 -0
- package/engine/graphics/impostors/octahedral/shader/ImpostorShaderV1.js +74 -0
- package/engine/graphics/impostors/octahedral/shader/glsl/v1/common.glsl +209 -0
- package/engine/graphics/impostors/octahedral/shader/glsl/v1/flagment.glsl +80 -0
- package/engine/graphics/impostors/octahedral/shader/glsl/v1/vertex.glsl +350 -0
- package/engine/graphics/micron/render/v1/getTransformedPositionsCached.js +1 -1
- package/engine/graphics/render/forward_plus/LightManager.js +1 -1
- package/engine/graphics/render/forward_plus/materials/FP_SHADER_CHUNK_ACCUMULATION.js +1 -3
- package/engine/graphics/render/forward_plus/materials/FP_SHADER_CHUNK_PREAMBLE.js +2 -1
- package/engine/graphics/render/forward_plus/model/Decal.js +19 -2
- package/engine/graphics/texture/sampler/Sampler2D.js +10 -10
- package/engine/graphics/texture/sampler/prototypeSamplerFiltering.js +117 -11
- package/engine/graphics/texture/sampler/resize/sampler2d_downsample_mipmap.js +66 -0
- package/engine/graphics/texture/sampler/sampler2_d_scale_down_lanczos.js +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import { EngineHarness } from "../../../../EngineHarness.js";
|
|
2
|
+
import { FPDecalSystem } from "./FPDecalSystem.js";
|
|
3
|
+
import EntityBuilder from "../../../../ecs/EntityBuilder.js";
|
|
4
|
+
import { Decal } from "./Decal.js";
|
|
5
|
+
import { Transform } from "../../../../ecs/transform/Transform.js";
|
|
6
|
+
import { randomFloatBetween } from "../../../../../core/math/random/randomFloatBetween.js";
|
|
7
|
+
import { seededRandom } from "../../../../../core/math/random/seededRandom.js";
|
|
8
|
+
import Quaternion from "../../../../../core/geom/Quaternion.js";
|
|
9
|
+
import { randomFromArray } from "../../../../../core/math/random/randomFromArray.js";
|
|
10
|
+
import { BehaviorComponent } from "../../../../intelligence/behavior/ecs/BehaviorComponent.js";
|
|
11
|
+
import { RotationBehavior } from "../../../../../../model/game/util/behavior/RotationBehavior.js";
|
|
12
|
+
import { BehaviorSystem } from "../../../../intelligence/behavior/ecs/BehaviorSystem.js";
|
|
13
|
+
|
|
14
|
+
const decal_urls = `data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/staff_13_t.png
|
|
15
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/artifact_01_t.png
|
|
16
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/artifact_02_t.png
|
|
17
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/artifact_03_t.png
|
|
18
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/artifact_04_t.png
|
|
19
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/artifact_05_t.png
|
|
20
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/artifact_06_t.png
|
|
21
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/artifact_07_t.png
|
|
22
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/artifact_08_t.png
|
|
23
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/artifact_09_t.png
|
|
24
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/artifact_10_t.png
|
|
25
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/artifact_11_t.png
|
|
26
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/artifact_12_t.png
|
|
27
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/artifact_13_t.png
|
|
28
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/artifact_14_t.png
|
|
29
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/bag_01_t.png
|
|
30
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/bag_02_t.png
|
|
31
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/bag_03_t.png
|
|
32
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/bag_04_t.png
|
|
33
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/bag_05_t.png
|
|
34
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/bag_06_t.png
|
|
35
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/bag_07_t.png
|
|
36
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/bag_08_t.png
|
|
37
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/bag_09_t.png
|
|
38
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/bag_10_b.png
|
|
39
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/bag_11_t.png
|
|
40
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/bag_12_t.png
|
|
41
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/book_01_t.png
|
|
42
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/book_02_t.png
|
|
43
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/book_03_t.png
|
|
44
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/book_04_t.png
|
|
45
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/book_05_t.png
|
|
46
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/book_06_t.png
|
|
47
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/book_07_t.png
|
|
48
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/book_08_t.png
|
|
49
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/book_09_t.png
|
|
50
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/book_10_t.png
|
|
51
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/book_11_t.png
|
|
52
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/book_12_t.png
|
|
53
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/book_13_t.png
|
|
54
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/book_14_t.png
|
|
55
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/book_15_t.png
|
|
56
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/book_16_t.png
|
|
57
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/book_17_t.png
|
|
58
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/orb_01_t.png
|
|
59
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/orb_02_t.png
|
|
60
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/orb_03_t.png
|
|
61
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/orb_04_t.png
|
|
62
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/orb_05_t.png
|
|
63
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/orb_06_t.png
|
|
64
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/orb_07_t.png
|
|
65
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/orb_08_t.png
|
|
66
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/orb_09_t.png
|
|
67
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/orb_10_t.png
|
|
68
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/orb_11_t.png
|
|
69
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/orb_12_t.png
|
|
70
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/potion_01_t.png
|
|
71
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/potion_02_t.png
|
|
72
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/potion_03_t.png
|
|
73
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/potion_04_t.png
|
|
74
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/potion_05_t.png
|
|
75
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/potion_06_t.png
|
|
76
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/potion_07_t.png
|
|
77
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/potion_08_t.png
|
|
78
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/potion_09_t.png
|
|
79
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/potion_10_t.png
|
|
80
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/potion_11_t.png
|
|
81
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/potion_12_t.png
|
|
82
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/rune_01_t.png
|
|
83
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/rune_02_t.png
|
|
84
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/rune_03_t.png
|
|
85
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/rune_04_t.png
|
|
86
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/rune_05_t.png
|
|
87
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/rune_06_t.png
|
|
88
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/rune_07_t.png
|
|
89
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/rune_08_t.png
|
|
90
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/rune_09_t.png
|
|
91
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/rune_10_t.png
|
|
92
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/rune_11_t.png
|
|
93
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/rune_12_t.png
|
|
94
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/scroll_01_t.png
|
|
95
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/scroll_02_t.png
|
|
96
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/scroll_03_t.png
|
|
97
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/scroll_04_t.png
|
|
98
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/scroll_05_t.png
|
|
99
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/scroll_06_t.png
|
|
100
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/scroll_07_t.png
|
|
101
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/scroll_08_t.png
|
|
102
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/scroll_09_t.png
|
|
103
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/scroll_10_t.png
|
|
104
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/scroll_11_t.png
|
|
105
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/scroll_12_t.png
|
|
106
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/scroll_13_t.png
|
|
107
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/staff_01_t.png
|
|
108
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/staff_02_t.png
|
|
109
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/staff_03_t.png
|
|
110
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/staff_04_t.png
|
|
111
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/staff_05_t.png
|
|
112
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/staff_06_t.png
|
|
113
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/staff_07_t.png
|
|
114
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/staff_08_t.png
|
|
115
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/staff_09_t.png
|
|
116
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/staff_10_t.png
|
|
117
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/staff_11_t.png
|
|
118
|
+
data/textures/icons/FantasyIconsMegaPack/MagicItems/MagicItems_png/transparent/x64/staff_12_t.png
|
|
119
|
+
data/textures/icons/sci-fi-nathan/v6/Proc normal_3.png
|
|
120
|
+
data/textures/icons/sci-fi-nathan/v6/Proc strong_1.png
|
|
121
|
+
data/textures/icons/sci-fi-nathan/v6/Proc strong_2.png
|
|
122
|
+
data/textures/icons/sci-fi-nathan/v6/Proc strong_3.png
|
|
123
|
+
data/textures/icons/sci-fi-nathan/v6/Proc very strong_1.png
|
|
124
|
+
data/textures/icons/sci-fi-nathan/v6/Proc very strong_2.png
|
|
125
|
+
data/textures/icons/sci-fi-nathan/v6/Proc very strong_3.png
|
|
126
|
+
data/textures/icons/sci-fi-nathan/v6/Proc very weak_1.png
|
|
127
|
+
data/textures/icons/sci-fi-nathan/v6/Proc very weak_2.png
|
|
128
|
+
data/textures/icons/sci-fi-nathan/v6/Proc very weak_3.png
|
|
129
|
+
data/textures/icons/sci-fi-nathan/v6/Proc weak_1.png
|
|
130
|
+
data/textures/icons/sci-fi-nathan/v6/Proc weak_2.png
|
|
131
|
+
data/textures/icons/sci-fi-nathan/v6/Proc weak_3.png
|
|
132
|
+
data/textures/icons/sci-fi-nathan/v6/Core normal_1.png
|
|
133
|
+
data/textures/icons/sci-fi-nathan/v6/Core normal_2.png
|
|
134
|
+
data/textures/icons/sci-fi-nathan/v6/Core normal_3.png
|
|
135
|
+
data/textures/icons/sci-fi-nathan/v6/Core strong_1.png
|
|
136
|
+
data/textures/icons/sci-fi-nathan/v6/Core strong_2.png
|
|
137
|
+
data/textures/icons/sci-fi-nathan/v6/Core strong_3.png
|
|
138
|
+
data/textures/icons/sci-fi-nathan/v6/Core very strong_1.png
|
|
139
|
+
data/textures/icons/sci-fi-nathan/v6/Core very strong_2.png
|
|
140
|
+
data/textures/icons/sci-fi-nathan/v6/Core very strong_3.png
|
|
141
|
+
data/textures/icons/sci-fi-nathan/v6/Core very weak_1.png
|
|
142
|
+
data/textures/icons/sci-fi-nathan/v6/Core very weak_2.png
|
|
143
|
+
data/textures/icons/sci-fi-nathan/v6/Core very weak_3.png
|
|
144
|
+
data/textures/icons/sci-fi-nathan/v6/Core weak_1.png
|
|
145
|
+
data/textures/icons/sci-fi-nathan/v6/Core weak_2.png
|
|
146
|
+
data/textures/icons/sci-fi-nathan/v6/Core weak_3.png
|
|
147
|
+
data/textures/icons/sci-fi-nathan/v6/Memory normal_1.png
|
|
148
|
+
data/textures/icons/sci-fi-nathan/v6/Memory normal_2.png
|
|
149
|
+
data/textures/icons/sci-fi-nathan/v6/Memory normal_3.png
|
|
150
|
+
data/textures/icons/sci-fi-nathan/v6/Memory strong_1.png
|
|
151
|
+
data/textures/icons/sci-fi-nathan/v6/Memory strong_2.png
|
|
152
|
+
data/textures/icons/sci-fi-nathan/v6/Memory strong_3.png
|
|
153
|
+
data/textures/icons/sci-fi-nathan/v6/Memory very strong_1.png
|
|
154
|
+
data/textures/icons/sci-fi-nathan/v6/Memory very strong_2.png
|
|
155
|
+
data/textures/icons/sci-fi-nathan/v6/Memory very strong_3.png
|
|
156
|
+
data/textures/icons/sci-fi-nathan/v6/Memory very weak_1.png
|
|
157
|
+
data/textures/icons/sci-fi-nathan/v6/Memory very weak_2.png
|
|
158
|
+
data/textures/icons/sci-fi-nathan/v6/Memory very weak_3.png
|
|
159
|
+
data/textures/icons/sci-fi-nathan/v6/Memory weak_1.png
|
|
160
|
+
data/textures/icons/sci-fi-nathan/v6/Memory weak_2.png
|
|
161
|
+
data/textures/icons/sci-fi-nathan/v6/Memory weak_3.png
|
|
162
|
+
data/textures/icons/sci-fi-nathan/v6/Module normal_1.png
|
|
163
|
+
data/textures/icons/sci-fi-nathan/v6/Module normal_2.png
|
|
164
|
+
data/textures/icons/sci-fi-nathan/v6/Module normal_3.png
|
|
165
|
+
data/textures/icons/sci-fi-nathan/v6/Module strong_1.png
|
|
166
|
+
data/textures/icons/sci-fi-nathan/v6/Module strong_2.png
|
|
167
|
+
data/textures/icons/sci-fi-nathan/v6/Module strong_3.png
|
|
168
|
+
data/textures/icons/sci-fi-nathan/v6/Module very strong_1.png
|
|
169
|
+
data/textures/icons/sci-fi-nathan/v6/Module very strong_2.png
|
|
170
|
+
data/textures/icons/sci-fi-nathan/v6/Module very strong_3.png
|
|
171
|
+
data/textures/icons/sci-fi-nathan/v6/Module very weak_1.png
|
|
172
|
+
data/textures/icons/sci-fi-nathan/v6/Module very weak_2.png
|
|
173
|
+
data/textures/icons/sci-fi-nathan/v6/Module very weak_3.png
|
|
174
|
+
data/textures/icons/sci-fi-nathan/v6/Module weak_1.png
|
|
175
|
+
data/textures/icons/sci-fi-nathan/v6/Module weak_2.png
|
|
176
|
+
data/textures/icons/sci-fi-nathan/v6/Module weak_3.png
|
|
177
|
+
data/textures/icons/sci-fi-nathan/v6/Power normal_1.png
|
|
178
|
+
data/textures/icons/sci-fi-nathan/v6/Power normal_2.png
|
|
179
|
+
data/textures/icons/sci-fi-nathan/v6/Power normal_3.png
|
|
180
|
+
data/textures/icons/sci-fi-nathan/v6/Power strong_1.png
|
|
181
|
+
data/textures/icons/sci-fi-nathan/v6/Power strong_2.png
|
|
182
|
+
data/textures/icons/sci-fi-nathan/v6/Power strong_3.png
|
|
183
|
+
data/textures/icons/sci-fi-nathan/v6/Power very strong_1.png
|
|
184
|
+
data/textures/icons/sci-fi-nathan/v6/Power very strong_2.png
|
|
185
|
+
data/textures/icons/sci-fi-nathan/v6/Power very strong_3.png
|
|
186
|
+
data/textures/icons/sci-fi-nathan/v6/Power very weak_1.png
|
|
187
|
+
data/textures/icons/sci-fi-nathan/v6/Power very weak_2.png
|
|
188
|
+
data/textures/icons/sci-fi-nathan/v6/Power very weak_3.png
|
|
189
|
+
data/textures/icons/sci-fi-nathan/v6/Power weak_1.png
|
|
190
|
+
data/textures/icons/sci-fi-nathan/v6/Power weak_2.png
|
|
191
|
+
data/textures/icons/sci-fi-nathan/v6/Power weak_3.png
|
|
192
|
+
data/textures/icons/sci-fi-nathan/v6/Proc normal_1.png
|
|
193
|
+
data/textures/icons/sci-fi-nathan/v6/Proc normal_2.png
|
|
194
|
+
data/textures/utility/sampling-test.png`
|
|
195
|
+
.split('\n')
|
|
196
|
+
.map(a => a.trim());
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
*
|
|
200
|
+
* @param {Engine} engine
|
|
201
|
+
*/
|
|
202
|
+
async function main(engine) {
|
|
203
|
+
|
|
204
|
+
await EngineHarness.buildBasics({
|
|
205
|
+
engine
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
const random = seededRandom();
|
|
209
|
+
|
|
210
|
+
for (let i = 0; i < 100; i++) {
|
|
211
|
+
const decal = new Decal();
|
|
212
|
+
|
|
213
|
+
decal.uri = randomFromArray(random, decal_urls);
|
|
214
|
+
|
|
215
|
+
new EntityBuilder()
|
|
216
|
+
.add(Transform.fromJSON({
|
|
217
|
+
position: { x: randomFloatBetween(random, 0, 10), y: 0, z: randomFloatBetween(random, 0, 10) },
|
|
218
|
+
rotation: Quaternion.random(random)
|
|
219
|
+
}))
|
|
220
|
+
.add(decal)
|
|
221
|
+
.add(BehaviorComponent.fromOne(RotationBehavior.fromJSON({
|
|
222
|
+
speed: 1
|
|
223
|
+
})))
|
|
224
|
+
.build(engine.entityManager.dataset);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
new EngineHarness()
|
|
230
|
+
.initialize({
|
|
231
|
+
configuration(config, engine) {
|
|
232
|
+
|
|
233
|
+
config.addSystem(new FPDecalSystem(engine));
|
|
234
|
+
config.addSystem(new BehaviorSystem(engine))
|
|
235
|
+
|
|
236
|
+
}
|
|
237
|
+
}).then(main);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { LeafNode } from "../../../../core/bvh2/LeafNode.js";
|
|
2
1
|
import { AABB3 } from "../../../../core/bvh2/aabb3/AABB3.js";
|
|
3
2
|
import { DrawMode } from "./DrawMode.js";
|
|
4
3
|
import { ShadedGeometryFlags } from "./ShadedGeometryFlags.js";
|
|
@@ -49,6 +48,12 @@ export class ShadedGeometry {
|
|
|
49
48
|
*/
|
|
50
49
|
this.material = null;
|
|
51
50
|
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
* @type {THREE.Material|null}
|
|
54
|
+
*/
|
|
55
|
+
this.depth_material = null;
|
|
56
|
+
|
|
52
57
|
/**
|
|
53
58
|
*
|
|
54
59
|
* @type {number}
|
|
@@ -175,6 +180,7 @@ export class ShadedGeometry {
|
|
|
175
180
|
&& this.draw_method === other.draw_method
|
|
176
181
|
&& this.mode === other.mode
|
|
177
182
|
&& (this.flags & FLAG_SET_EQUALITY) === (other.flags & FLAG_SET_EQUALITY)
|
|
183
|
+
&& this.depth_material === other.depth_material
|
|
178
184
|
;
|
|
179
185
|
}
|
|
180
186
|
|
|
@@ -185,6 +191,7 @@ export class ShadedGeometry {
|
|
|
185
191
|
copy(other) {
|
|
186
192
|
this.geometry = other.geometry;
|
|
187
193
|
this.material = other.material;
|
|
194
|
+
this.depth_material = other.depth_material;
|
|
188
195
|
this.draw_method = other.draw_method;
|
|
189
196
|
this.mode = other.mode;
|
|
190
197
|
this.flags = other.flags;
|
|
@@ -37,5 +37,9 @@ export function build_three_object(sg) {
|
|
|
37
37
|
object.castShadow = sg.getFlag(ShadedGeometryFlags.CastShadow);
|
|
38
38
|
object.receiveShadow = sg.getFlag(ShadedGeometryFlags.ReceiveShadow);
|
|
39
39
|
|
|
40
|
+
if (sg.depth_material !== null) {
|
|
41
|
+
object.customDepthMaterial = sg.depth_material;
|
|
42
|
+
}
|
|
43
|
+
|
|
40
44
|
return object;
|
|
41
45
|
}
|