@needle-tools/engine 2.35.5-pre → 2.36.0-pre
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/CHANGELOG.md +19 -0
- package/dist/needle-engine.d.ts +160 -110
- package/dist/needle-engine.js +370 -365
- package/dist/needle-engine.js.map +4 -4
- package/dist/needle-engine.min.js +61 -56
- package/dist/needle-engine.min.js.map +4 -4
- package/lib/engine/debug/debug_overlay.js +12 -1
- package/lib/engine/debug/debug_overlay.js.map +1 -1
- package/lib/engine/engine_element_loading.js +1 -1
- package/lib/engine/engine_element_loading.js.map +1 -1
- package/lib/engine/engine_gameobject.d.ts +1 -0
- package/lib/engine/engine_gameobject.js +13 -1
- package/lib/engine/engine_gameobject.js.map +1 -1
- package/lib/engine/engine_gltf_builtin_components.js +4 -0
- package/lib/engine/engine_gltf_builtin_components.js.map +1 -1
- package/lib/engine/engine_mainloop_utils.d.ts +1 -1
- package/lib/engine/engine_mainloop_utils.js +7 -3
- package/lib/engine/engine_mainloop_utils.js.map +1 -1
- package/lib/engine/engine_physics.d.ts +29 -28
- package/lib/engine/engine_physics.js +85 -86
- package/lib/engine/engine_physics.js.map +1 -1
- package/lib/engine/engine_serialization_core.js +14 -6
- package/lib/engine/engine_serialization_core.js.map +1 -1
- package/lib/engine/engine_setup.js +1 -1
- package/lib/engine/engine_setup.js.map +1 -1
- package/lib/engine/engine_time.d.ts +1 -0
- package/lib/engine/engine_time.js +1 -0
- package/lib/engine/engine_time.js.map +1 -1
- package/lib/engine/engine_types.d.ts +1 -0
- package/lib/engine/engine_types.js.map +1 -1
- package/lib/engine/engine_typestore.d.ts +1 -0
- package/lib/engine/engine_typestore.js +1 -0
- package/lib/engine/engine_typestore.js.map +1 -1
- package/lib/engine/engine_utils.js +1 -1
- package/lib/engine/engine_utils.js.map +1 -1
- package/lib/engine/extensions/NEEDLE_animator_controller_model.js.map +1 -1
- package/lib/engine/extensions/NEEDLE_techniques_webgl.js +5 -0
- package/lib/engine/extensions/NEEDLE_techniques_webgl.js.map +1 -1
- package/lib/engine-components/Animation.d.ts +5 -1
- package/lib/engine-components/Animation.js +21 -0
- package/lib/engine-components/Animation.js.map +1 -1
- package/lib/engine-components/AnimatorController.d.ts +1 -0
- package/lib/engine-components/AnimatorController.js +14 -7
- package/lib/engine-components/AnimatorController.js.map +1 -1
- package/lib/engine-components/BoxHelperComponent.d.ts +2 -2
- package/lib/engine-components/BoxHelperComponent.js +27 -9
- package/lib/engine-components/BoxHelperComponent.js.map +1 -1
- package/lib/engine-components/Component.d.ts +2 -1
- package/lib/engine-components/Component.js +11 -5
- package/lib/engine-components/Component.js.map +1 -1
- package/lib/engine-components/GroundProjection.d.ts +2 -0
- package/lib/engine-components/GroundProjection.js +18 -6
- package/lib/engine-components/GroundProjection.js.map +1 -1
- package/lib/engine-components/ReflectionProbe.d.ts +22 -0
- package/lib/engine-components/ReflectionProbe.js +134 -0
- package/lib/engine-components/ReflectionProbe.js.map +1 -0
- package/lib/engine-components/Renderer.d.ts +13 -2
- package/lib/engine-components/Renderer.js +96 -45
- package/lib/engine-components/Renderer.js.map +1 -1
- package/lib/engine-components/WebARSessionRoot.d.ts +7 -7
- package/lib/engine-components/WebARSessionRoot.js +7 -7
- package/lib/engine-components/WebARSessionRoot.js.map +1 -1
- package/lib/engine-components/WebXR.d.ts +9 -8
- package/lib/engine-components/WebXR.js +40 -24
- package/lib/engine-components/WebXR.js.map +1 -1
- package/lib/engine-components/WebXRAvatar.d.ts +4 -5
- package/lib/engine-components/WebXRAvatar.js +9 -8
- package/lib/engine-components/WebXRAvatar.js.map +1 -1
- package/lib/engine-components/WebXRController.d.ts +21 -21
- package/lib/engine-components/WebXRController.js +79 -63
- package/lib/engine-components/WebXRController.js.map +1 -1
- package/lib/engine-components/WebXRGrabRendering.d.ts +3 -3
- package/lib/engine-components/WebXRGrabRendering.js +2 -2
- package/lib/engine-components/WebXRGrabRendering.js.map +1 -1
- package/lib/engine-components/WebXRSync.d.ts +8 -8
- package/lib/engine-components/WebXRSync.js +15 -15
- package/lib/engine-components/WebXRSync.js.map +1 -1
- package/lib/engine-components/codegen/components.d.ts +1 -0
- package/lib/engine-components/codegen/components.js +1 -0
- package/lib/engine-components/codegen/components.js.map +1 -1
- package/lib/engine-components/ui/EventSystem.d.ts +1 -0
- package/lib/engine-components/ui/EventSystem.js +21 -1
- package/lib/engine-components/ui/EventSystem.js.map +1 -1
- package/package.json +1 -1
- package/src/engine/codegen/register_types.js +293 -0
- package/src/engine/debug/debug_overlay.ts +9 -2
- package/src/engine/engine_element_loading.ts +1 -1
- package/src/engine/engine_gameobject.ts +17 -4
- package/src/engine/engine_gltf_builtin_components.ts +5 -1
- package/src/engine/engine_mainloop_utils.ts +7 -3
- package/src/engine/engine_physics.ts +130 -130
- package/src/engine/engine_serialization_core.ts +14 -7
- package/src/engine/engine_setup.ts +1 -1
- package/src/engine/engine_time.ts +2 -0
- package/src/engine/engine_types.ts +1 -0
- package/src/engine/engine_typestore.ts +2 -0
- package/src/engine/engine_utils.ts +3 -2
- package/src/engine/extensions/EXT_texture_exr.js +1 -1
- package/src/engine/extensions/NEEDLE_animator_controller_model.ts +2 -1
- package/src/engine/extensions/NEEDLE_techniques_webgl.ts +7 -0
- package/src/engine-components/Animation.ts +16 -1
- package/src/engine-components/AnimatorController.ts +19 -9
- package/src/engine-components/BoxHelperComponent.ts +29 -9
- package/src/engine-components/Component.ts +11 -5
- package/src/engine-components/GroundProjection.ts +22 -7
- package/src/engine-components/ReflectionProbe.ts +141 -0
- package/src/engine-components/Renderer.ts +796 -737
- package/src/engine-components/WebARSessionRoot.ts +16 -16
- package/src/engine-components/WebXR.ts +53 -48
- package/src/engine-components/WebXRAvatar.ts +16 -16
- package/src/engine-components/WebXRController.ts +129 -107
- package/src/engine-components/WebXRGrabRendering.ts +6 -6
- package/src/engine-components/WebXRSync.ts +20 -20
- package/src/engine-components/codegen/components.ts +1 -0
- package/src/engine-components/ui/EventSystem.ts +26 -3
|
@@ -1,150 +1,442 @@
|
|
|
1
1
|
import { TypeStore } from "./../engine_typestore"
|
|
2
|
+
import {$BuiltInTypeFlag} from "./../engine_typestore"
|
|
2
3
|
|
|
3
4
|
// Import types
|
|
4
5
|
import { AlignmentConstraint } from "../../engine-components/AlignmentConstraint.ts";
|
|
6
|
+
AlignmentConstraint[$BuiltInTypeFlag] = true;
|
|
7
|
+
|
|
5
8
|
import { Animation } from "../../engine-components/Animation.ts";
|
|
9
|
+
Animation[$BuiltInTypeFlag] = true;
|
|
10
|
+
|
|
6
11
|
import { AnimationCurve } from "../../engine-components/AnimationCurve.ts";
|
|
12
|
+
AnimationCurve[$BuiltInTypeFlag] = true;
|
|
13
|
+
|
|
7
14
|
import { Animator } from "../../engine-components/Animator.ts";
|
|
15
|
+
Animator[$BuiltInTypeFlag] = true;
|
|
16
|
+
|
|
8
17
|
import { AnimatorController } from "../../engine-components/AnimatorController.ts";
|
|
18
|
+
AnimatorController[$BuiltInTypeFlag] = true;
|
|
19
|
+
|
|
9
20
|
import { AudioListener } from "../../engine-components/AudioListener.ts";
|
|
21
|
+
AudioListener[$BuiltInTypeFlag] = true;
|
|
22
|
+
|
|
10
23
|
import { AudioSource } from "../../engine-components/AudioSource.ts";
|
|
24
|
+
AudioSource[$BuiltInTypeFlag] = true;
|
|
25
|
+
|
|
11
26
|
import { AvatarModel } from "../../engine-components/AvatarLoader.ts";
|
|
27
|
+
AvatarModel[$BuiltInTypeFlag] = true;
|
|
28
|
+
|
|
12
29
|
import { AvatarLoader } from "../../engine-components/AvatarLoader.ts";
|
|
30
|
+
AvatarLoader[$BuiltInTypeFlag] = true;
|
|
31
|
+
|
|
13
32
|
import { AxesHelper } from "../../engine-components/AxesHelper.ts";
|
|
33
|
+
AxesHelper[$BuiltInTypeFlag] = true;
|
|
34
|
+
|
|
14
35
|
import { BasicIKConstraint } from "../../engine-components/BasicIKConstraint.ts";
|
|
36
|
+
BasicIKConstraint[$BuiltInTypeFlag] = true;
|
|
37
|
+
|
|
15
38
|
import { BoxHelperComponent } from "../../engine-components/BoxHelperComponent.ts";
|
|
39
|
+
BoxHelperComponent[$BuiltInTypeFlag] = true;
|
|
40
|
+
|
|
16
41
|
import { Camera } from "../../engine-components/Camera.ts";
|
|
42
|
+
Camera[$BuiltInTypeFlag] = true;
|
|
43
|
+
|
|
17
44
|
import { Collider } from "../../engine-components/Collider.ts";
|
|
45
|
+
Collider[$BuiltInTypeFlag] = true;
|
|
46
|
+
|
|
18
47
|
import { SphereCollider } from "../../engine-components/Collider.ts";
|
|
48
|
+
SphereCollider[$BuiltInTypeFlag] = true;
|
|
49
|
+
|
|
19
50
|
import { BoxCollider } from "../../engine-components/Collider.ts";
|
|
51
|
+
BoxCollider[$BuiltInTypeFlag] = true;
|
|
52
|
+
|
|
20
53
|
import { DeleteBox } from "../../engine-components/DeleteBox.ts";
|
|
54
|
+
DeleteBox[$BuiltInTypeFlag] = true;
|
|
55
|
+
|
|
21
56
|
import { Deletable } from "../../engine-components/DeleteBox.ts";
|
|
57
|
+
Deletable[$BuiltInTypeFlag] = true;
|
|
58
|
+
|
|
22
59
|
import { DeviceFlag } from "../../engine-components/DeviceFlag.ts";
|
|
60
|
+
DeviceFlag[$BuiltInTypeFlag] = true;
|
|
61
|
+
|
|
23
62
|
import { DragControls } from "../../engine-components/DragControls.ts";
|
|
63
|
+
DragControls[$BuiltInTypeFlag] = true;
|
|
64
|
+
|
|
24
65
|
import { DropListener } from "../../engine-components/DropListener.ts";
|
|
66
|
+
DropListener[$BuiltInTypeFlag] = true;
|
|
67
|
+
|
|
25
68
|
import { Duplicatable } from "../../engine-components/Duplicatable.ts";
|
|
69
|
+
Duplicatable[$BuiltInTypeFlag] = true;
|
|
70
|
+
|
|
26
71
|
import { CallInfo } from "../../engine-components/EventList.ts";
|
|
72
|
+
CallInfo[$BuiltInTypeFlag] = true;
|
|
73
|
+
|
|
27
74
|
import { EventListEvent } from "../../engine-components/EventList.ts";
|
|
75
|
+
EventListEvent[$BuiltInTypeFlag] = true;
|
|
76
|
+
|
|
28
77
|
import { EventList } from "../../engine-components/EventList.ts";
|
|
78
|
+
EventList[$BuiltInTypeFlag] = true;
|
|
79
|
+
|
|
29
80
|
import { EventTrigger } from "../../engine-components/EventTrigger.ts";
|
|
81
|
+
EventTrigger[$BuiltInTypeFlag] = true;
|
|
82
|
+
|
|
30
83
|
import { FlyControls } from "../../engine-components/FlyControls.ts";
|
|
84
|
+
FlyControls[$BuiltInTypeFlag] = true;
|
|
85
|
+
|
|
31
86
|
import { BoxGizmo } from "../../engine-components/Gizmos.ts";
|
|
87
|
+
BoxGizmo[$BuiltInTypeFlag] = true;
|
|
88
|
+
|
|
32
89
|
import { GltfExportBox } from "../../engine-components/GltfExport.ts";
|
|
90
|
+
GltfExportBox[$BuiltInTypeFlag] = true;
|
|
91
|
+
|
|
33
92
|
import { GltfExport } from "../../engine-components/GltfExport.ts";
|
|
93
|
+
GltfExport[$BuiltInTypeFlag] = true;
|
|
94
|
+
|
|
34
95
|
import { GridHelper } from "../../engine-components/GridHelper.ts";
|
|
96
|
+
GridHelper[$BuiltInTypeFlag] = true;
|
|
97
|
+
|
|
35
98
|
import { GroundProjectedEnv } from "../../engine-components/GroundProjection.ts";
|
|
99
|
+
GroundProjectedEnv[$BuiltInTypeFlag] = true;
|
|
100
|
+
|
|
36
101
|
import { Interactable } from "../../engine-components/Interactable.ts";
|
|
102
|
+
Interactable[$BuiltInTypeFlag] = true;
|
|
103
|
+
|
|
37
104
|
import { UsageMarker } from "../../engine-components/Interactable.ts";
|
|
105
|
+
UsageMarker[$BuiltInTypeFlag] = true;
|
|
106
|
+
|
|
38
107
|
import { Light } from "../../engine-components/Light.ts";
|
|
108
|
+
Light[$BuiltInTypeFlag] = true;
|
|
109
|
+
|
|
39
110
|
import { LODModel } from "../../engine-components/LODGroup.ts";
|
|
111
|
+
LODModel[$BuiltInTypeFlag] = true;
|
|
112
|
+
|
|
40
113
|
import { LODGroup } from "../../engine-components/LODGroup.ts";
|
|
114
|
+
LODGroup[$BuiltInTypeFlag] = true;
|
|
115
|
+
|
|
41
116
|
import { LookAtConstraint } from "../../engine-components/LookAtConstraint.ts";
|
|
117
|
+
LookAtConstraint[$BuiltInTypeFlag] = true;
|
|
118
|
+
|
|
42
119
|
import { NavMesh } from "../../engine-components/NavMesh.ts";
|
|
120
|
+
NavMesh[$BuiltInTypeFlag] = true;
|
|
121
|
+
|
|
43
122
|
import { NavMeshAgent } from "../../engine-components/NavMesh.ts";
|
|
123
|
+
NavMeshAgent[$BuiltInTypeFlag] = true;
|
|
124
|
+
|
|
44
125
|
import { NestedGltf } from "../../engine-components/NestedGltf.ts";
|
|
126
|
+
NestedGltf[$BuiltInTypeFlag] = true;
|
|
127
|
+
|
|
45
128
|
import { Networking } from "../../engine-components/Networking.ts";
|
|
129
|
+
Networking[$BuiltInTypeFlag] = true;
|
|
130
|
+
|
|
46
131
|
import { OffsetConstraint } from "../../engine-components/OffsetConstraint.ts";
|
|
132
|
+
OffsetConstraint[$BuiltInTypeFlag] = true;
|
|
133
|
+
|
|
47
134
|
import { OrbitControls } from "../../engine-components/OrbitControls.ts";
|
|
135
|
+
OrbitControls[$BuiltInTypeFlag] = true;
|
|
136
|
+
|
|
48
137
|
import { ParticleSystemRenderer } from "../../engine-components/ParticleSystem.ts";
|
|
138
|
+
ParticleSystemRenderer[$BuiltInTypeFlag] = true;
|
|
139
|
+
|
|
49
140
|
import { ParticleSystem } from "../../engine-components/ParticleSystem.ts";
|
|
141
|
+
ParticleSystem[$BuiltInTypeFlag] = true;
|
|
142
|
+
|
|
50
143
|
import { MainModule } from "../../engine-components/ParticleSystemModules.ts";
|
|
144
|
+
MainModule[$BuiltInTypeFlag] = true;
|
|
145
|
+
|
|
51
146
|
import { EmissionModule } from "../../engine-components/ParticleSystemModules.ts";
|
|
147
|
+
EmissionModule[$BuiltInTypeFlag] = true;
|
|
148
|
+
|
|
52
149
|
import { ShapeModule } from "../../engine-components/ParticleSystemModules.ts";
|
|
150
|
+
ShapeModule[$BuiltInTypeFlag] = true;
|
|
151
|
+
|
|
53
152
|
import { PlayerColor } from "../../engine-components/PlayerColor.ts";
|
|
153
|
+
PlayerColor[$BuiltInTypeFlag] = true;
|
|
154
|
+
|
|
155
|
+
import { ReflectionProbe } from "../../engine-components/ReflectionProbe.ts";
|
|
156
|
+
ReflectionProbe[$BuiltInTypeFlag] = true;
|
|
157
|
+
|
|
54
158
|
import { FieldWithDefault } from "../../engine-components/Renderer.ts";
|
|
159
|
+
FieldWithDefault[$BuiltInTypeFlag] = true;
|
|
160
|
+
|
|
55
161
|
import { Renderer } from "../../engine-components/Renderer.ts";
|
|
162
|
+
Renderer[$BuiltInTypeFlag] = true;
|
|
163
|
+
|
|
56
164
|
import { MeshRenderer } from "../../engine-components/Renderer.ts";
|
|
165
|
+
MeshRenderer[$BuiltInTypeFlag] = true;
|
|
166
|
+
|
|
57
167
|
import { SkinnedMeshRenderer } from "../../engine-components/Renderer.ts";
|
|
168
|
+
SkinnedMeshRenderer[$BuiltInTypeFlag] = true;
|
|
169
|
+
|
|
58
170
|
import { RendererLightmap } from "../../engine-components/RendererLightmap.ts";
|
|
171
|
+
RendererLightmap[$BuiltInTypeFlag] = true;
|
|
172
|
+
|
|
59
173
|
import { Rigidbody } from "../../engine-components/RigidBody.ts";
|
|
174
|
+
Rigidbody[$BuiltInTypeFlag] = true;
|
|
175
|
+
|
|
60
176
|
import { ScreenCapture } from "../../engine-components/ScreenCapture.ts";
|
|
177
|
+
ScreenCapture[$BuiltInTypeFlag] = true;
|
|
178
|
+
|
|
61
179
|
import { ShadowCatcher } from "../../engine-components/ShadowCatcher.ts";
|
|
180
|
+
ShadowCatcher[$BuiltInTypeFlag] = true;
|
|
181
|
+
|
|
62
182
|
import { RemoteSkybox } from "../../engine-components/Skybox.ts";
|
|
183
|
+
RemoteSkybox[$BuiltInTypeFlag] = true;
|
|
184
|
+
|
|
63
185
|
import { SmoothFollow } from "../../engine-components/SmoothFollow.ts";
|
|
186
|
+
SmoothFollow[$BuiltInTypeFlag] = true;
|
|
187
|
+
|
|
64
188
|
import { SpatialTriggerReceiver } from "../../engine-components/SpatialTrigger.ts";
|
|
189
|
+
SpatialTriggerReceiver[$BuiltInTypeFlag] = true;
|
|
190
|
+
|
|
65
191
|
import { SpatialTrigger } from "../../engine-components/SpatialTrigger.ts";
|
|
192
|
+
SpatialTrigger[$BuiltInTypeFlag] = true;
|
|
193
|
+
|
|
66
194
|
import { SpectatorCamera } from "../../engine-components/SpectatorCamera.ts";
|
|
195
|
+
SpectatorCamera[$BuiltInTypeFlag] = true;
|
|
196
|
+
|
|
67
197
|
import { SpringJoint } from "../../engine-components/SpringJoint.ts";
|
|
198
|
+
SpringJoint[$BuiltInTypeFlag] = true;
|
|
199
|
+
|
|
68
200
|
import { Sprite } from "../../engine-components/SpriteRenderer.ts";
|
|
201
|
+
Sprite[$BuiltInTypeFlag] = true;
|
|
202
|
+
|
|
69
203
|
import { SpriteRenderer } from "../../engine-components/SpriteRenderer.ts";
|
|
204
|
+
SpriteRenderer[$BuiltInTypeFlag] = true;
|
|
205
|
+
|
|
70
206
|
import { SyncedCamera } from "../../engine-components/SyncedCamera.ts";
|
|
207
|
+
SyncedCamera[$BuiltInTypeFlag] = true;
|
|
208
|
+
|
|
71
209
|
import { SyncedRoom } from "../../engine-components/SyncedRoom.ts";
|
|
210
|
+
SyncedRoom[$BuiltInTypeFlag] = true;
|
|
211
|
+
|
|
72
212
|
import { SyncedTransform } from "../../engine-components/SyncedTransform.ts";
|
|
213
|
+
SyncedTransform[$BuiltInTypeFlag] = true;
|
|
214
|
+
|
|
73
215
|
import { TestRunner } from "../../engine-components/TestRunner.ts";
|
|
216
|
+
TestRunner[$BuiltInTypeFlag] = true;
|
|
217
|
+
|
|
74
218
|
import { TestSimulateUserData } from "../../engine-components/TestRunner.ts";
|
|
219
|
+
TestSimulateUserData[$BuiltInTypeFlag] = true;
|
|
220
|
+
|
|
75
221
|
import { TransformGizmo } from "../../engine-components/TransformGizmo.ts";
|
|
222
|
+
TransformGizmo[$BuiltInTypeFlag] = true;
|
|
223
|
+
|
|
76
224
|
import { VideoPlayer } from "../../engine-components/VideoPlayer.ts";
|
|
225
|
+
VideoPlayer[$BuiltInTypeFlag] = true;
|
|
226
|
+
|
|
77
227
|
import { Voip } from "../../engine-components/Voip.ts";
|
|
228
|
+
Voip[$BuiltInTypeFlag] = true;
|
|
229
|
+
|
|
78
230
|
import { VolumeParameter } from "../../engine-components/Volume.ts";
|
|
231
|
+
VolumeParameter[$BuiltInTypeFlag] = true;
|
|
232
|
+
|
|
79
233
|
import { VolumeComponent } from "../../engine-components/Volume.ts";
|
|
234
|
+
VolumeComponent[$BuiltInTypeFlag] = true;
|
|
235
|
+
|
|
80
236
|
import { ToneMapping } from "../../engine-components/Volume.ts";
|
|
237
|
+
ToneMapping[$BuiltInTypeFlag] = true;
|
|
238
|
+
|
|
81
239
|
import { ColorAdjustments } from "../../engine-components/Volume.ts";
|
|
240
|
+
ColorAdjustments[$BuiltInTypeFlag] = true;
|
|
241
|
+
|
|
82
242
|
import { VolumeProfile } from "../../engine-components/Volume.ts";
|
|
243
|
+
VolumeProfile[$BuiltInTypeFlag] = true;
|
|
244
|
+
|
|
83
245
|
import { Volume } from "../../engine-components/Volume.ts";
|
|
246
|
+
Volume[$BuiltInTypeFlag] = true;
|
|
247
|
+
|
|
84
248
|
import { WebARSessionRoot } from "../../engine-components/WebARSessionRoot.ts";
|
|
249
|
+
WebARSessionRoot[$BuiltInTypeFlag] = true;
|
|
250
|
+
|
|
85
251
|
import { WebXR } from "../../engine-components/WebXR.ts";
|
|
252
|
+
WebXR[$BuiltInTypeFlag] = true;
|
|
253
|
+
|
|
86
254
|
import { WebAR } from "../../engine-components/WebXR.ts";
|
|
255
|
+
WebAR[$BuiltInTypeFlag] = true;
|
|
256
|
+
|
|
87
257
|
import { AvatarMarker } from "../../engine-components/WebXRAvatar.ts";
|
|
258
|
+
AvatarMarker[$BuiltInTypeFlag] = true;
|
|
259
|
+
|
|
88
260
|
import { WebXRAvatar } from "../../engine-components/WebXRAvatar.ts";
|
|
261
|
+
WebXRAvatar[$BuiltInTypeFlag] = true;
|
|
262
|
+
|
|
89
263
|
import { TeleportTarget } from "../../engine-components/WebXRController.ts";
|
|
264
|
+
TeleportTarget[$BuiltInTypeFlag] = true;
|
|
265
|
+
|
|
90
266
|
import { WebXRController } from "../../engine-components/WebXRController.ts";
|
|
267
|
+
WebXRController[$BuiltInTypeFlag] = true;
|
|
268
|
+
|
|
91
269
|
import { AttachedObject } from "../../engine-components/WebXRController.ts";
|
|
270
|
+
AttachedObject[$BuiltInTypeFlag] = true;
|
|
271
|
+
|
|
92
272
|
import { XRGrabModel } from "../../engine-components/WebXRGrabRendering.ts";
|
|
273
|
+
XRGrabModel[$BuiltInTypeFlag] = true;
|
|
274
|
+
|
|
93
275
|
import { XRGrabRendering } from "../../engine-components/WebXRGrabRendering.ts";
|
|
276
|
+
XRGrabRendering[$BuiltInTypeFlag] = true;
|
|
277
|
+
|
|
94
278
|
import { XRRig } from "../../engine-components/WebXRRig.ts";
|
|
279
|
+
XRRig[$BuiltInTypeFlag] = true;
|
|
280
|
+
|
|
95
281
|
import { VRUserState } from "../../engine-components/WebXRSync.ts";
|
|
282
|
+
VRUserState[$BuiltInTypeFlag] = true;
|
|
283
|
+
|
|
96
284
|
import { WebXRSync } from "../../engine-components/WebXRSync.ts";
|
|
285
|
+
WebXRSync[$BuiltInTypeFlag] = true;
|
|
286
|
+
|
|
97
287
|
import { XRState } from "../../engine-components/XRFlag.ts";
|
|
288
|
+
XRState[$BuiltInTypeFlag] = true;
|
|
289
|
+
|
|
98
290
|
import { XRFlag } from "../../engine-components/XRFlag.ts";
|
|
291
|
+
XRFlag[$BuiltInTypeFlag] = true;
|
|
292
|
+
|
|
99
293
|
import { AvatarBlink_Simple } from "../../engine-components/avatar/AvatarBlink_Simple.ts";
|
|
294
|
+
AvatarBlink_Simple[$BuiltInTypeFlag] = true;
|
|
295
|
+
|
|
100
296
|
import { AvatarEyeLook_Rotation } from "../../engine-components/avatar/AvatarEyeLook_Rotation.ts";
|
|
297
|
+
AvatarEyeLook_Rotation[$BuiltInTypeFlag] = true;
|
|
298
|
+
|
|
101
299
|
import { Avatar_POI } from "../../engine-components/avatar/Avatar_Brain_LookAt.ts";
|
|
300
|
+
Avatar_POI[$BuiltInTypeFlag] = true;
|
|
301
|
+
|
|
102
302
|
import { Avatar_Brain_LookAt } from "../../engine-components/avatar/Avatar_Brain_LookAt.ts";
|
|
303
|
+
Avatar_Brain_LookAt[$BuiltInTypeFlag] = true;
|
|
304
|
+
|
|
103
305
|
import { Avatar_MouthShapes } from "../../engine-components/avatar/Avatar_MouthShapes.ts";
|
|
306
|
+
Avatar_MouthShapes[$BuiltInTypeFlag] = true;
|
|
307
|
+
|
|
104
308
|
import { Avatar_MustacheShake } from "../../engine-components/avatar/Avatar_MustacheShake.ts";
|
|
309
|
+
Avatar_MustacheShake[$BuiltInTypeFlag] = true;
|
|
310
|
+
|
|
105
311
|
import { __Ignore } from "../../engine-components/codegen/components.ts";
|
|
312
|
+
__Ignore[$BuiltInTypeFlag] = true;
|
|
313
|
+
|
|
106
314
|
import { LogStats } from "../../engine-components/debug/LogStats.ts";
|
|
315
|
+
LogStats[$BuiltInTypeFlag] = true;
|
|
316
|
+
|
|
107
317
|
import { RGBAColor } from "../../engine-components/js-extensions/RGBAColor.ts";
|
|
318
|
+
RGBAColor[$BuiltInTypeFlag] = true;
|
|
319
|
+
|
|
108
320
|
import { PlayableDirector } from "../../engine-components/timeline/PlayableDirector.ts";
|
|
321
|
+
PlayableDirector[$BuiltInTypeFlag] = true;
|
|
322
|
+
|
|
109
323
|
import { SignalAsset } from "../../engine-components/timeline/SignalAsset.ts";
|
|
324
|
+
SignalAsset[$BuiltInTypeFlag] = true;
|
|
325
|
+
|
|
110
326
|
import { SignalReceiverEvent } from "../../engine-components/timeline/SignalAsset.ts";
|
|
327
|
+
SignalReceiverEvent[$BuiltInTypeFlag] = true;
|
|
328
|
+
|
|
111
329
|
import { SignalReceiver } from "../../engine-components/timeline/SignalAsset.ts";
|
|
330
|
+
SignalReceiver[$BuiltInTypeFlag] = true;
|
|
331
|
+
|
|
112
332
|
import { AnimationTrackHandler } from "../../engine-components/timeline/TimelineTracks.ts";
|
|
333
|
+
AnimationTrackHandler[$BuiltInTypeFlag] = true;
|
|
334
|
+
|
|
113
335
|
import { AudioTrackHandler } from "../../engine-components/timeline/TimelineTracks.ts";
|
|
336
|
+
AudioTrackHandler[$BuiltInTypeFlag] = true;
|
|
337
|
+
|
|
114
338
|
import { SignalTrackHandler } from "../../engine-components/timeline/TimelineTracks.ts";
|
|
339
|
+
SignalTrackHandler[$BuiltInTypeFlag] = true;
|
|
340
|
+
|
|
115
341
|
import { ControlTrackHandler } from "../../engine-components/timeline/TimelineTracks.ts";
|
|
342
|
+
ControlTrackHandler[$BuiltInTypeFlag] = true;
|
|
343
|
+
|
|
116
344
|
import { BaseUIComponent } from "../../engine-components/ui/BaseUIComponent.ts";
|
|
345
|
+
BaseUIComponent[$BuiltInTypeFlag] = true;
|
|
346
|
+
|
|
117
347
|
import { UIRootComponent } from "../../engine-components/ui/BaseUIComponent.ts";
|
|
348
|
+
UIRootComponent[$BuiltInTypeFlag] = true;
|
|
349
|
+
|
|
118
350
|
import { Button } from "../../engine-components/ui/Button.ts";
|
|
351
|
+
Button[$BuiltInTypeFlag] = true;
|
|
352
|
+
|
|
119
353
|
import { Canvas } from "../../engine-components/ui/Canvas.ts";
|
|
354
|
+
Canvas[$BuiltInTypeFlag] = true;
|
|
355
|
+
|
|
120
356
|
import { CanvasGroup } from "../../engine-components/ui/CanvasGroup.ts";
|
|
357
|
+
CanvasGroup[$BuiltInTypeFlag] = true;
|
|
358
|
+
|
|
121
359
|
import { EventSystem } from "../../engine-components/ui/EventSystem.ts";
|
|
360
|
+
EventSystem[$BuiltInTypeFlag] = true;
|
|
361
|
+
|
|
122
362
|
import { Graphic } from "../../engine-components/ui/Graphic.ts";
|
|
363
|
+
Graphic[$BuiltInTypeFlag] = true;
|
|
364
|
+
|
|
123
365
|
import { MaskableGraphic } from "../../engine-components/ui/Graphic.ts";
|
|
366
|
+
MaskableGraphic[$BuiltInTypeFlag] = true;
|
|
367
|
+
|
|
124
368
|
import { Image } from "../../engine-components/ui/Image.ts";
|
|
369
|
+
Image[$BuiltInTypeFlag] = true;
|
|
370
|
+
|
|
125
371
|
import { RawImage } from "../../engine-components/ui/Image.ts";
|
|
372
|
+
RawImage[$BuiltInTypeFlag] = true;
|
|
373
|
+
|
|
126
374
|
import { InputField } from "../../engine-components/ui/InputField.ts";
|
|
375
|
+
InputField[$BuiltInTypeFlag] = true;
|
|
376
|
+
|
|
127
377
|
import { Keyboard } from "../../engine-components/ui/Keyboard.ts";
|
|
378
|
+
Keyboard[$BuiltInTypeFlag] = true;
|
|
379
|
+
|
|
128
380
|
import { LayoutGroup } from "../../engine-components/ui/Layout.ts";
|
|
381
|
+
LayoutGroup[$BuiltInTypeFlag] = true;
|
|
382
|
+
|
|
129
383
|
import { VerticalLayoutGroup } from "../../engine-components/ui/Layout.ts";
|
|
384
|
+
VerticalLayoutGroup[$BuiltInTypeFlag] = true;
|
|
385
|
+
|
|
130
386
|
import { HorizontalLayoutGroup } from "../../engine-components/ui/Layout.ts";
|
|
387
|
+
HorizontalLayoutGroup[$BuiltInTypeFlag] = true;
|
|
388
|
+
|
|
131
389
|
import { GridLayoutGroup } from "../../engine-components/ui/Layout.ts";
|
|
390
|
+
GridLayoutGroup[$BuiltInTypeFlag] = true;
|
|
391
|
+
|
|
132
392
|
import { PointerEventData } from "../../engine-components/ui/PointerEvents.ts";
|
|
393
|
+
PointerEventData[$BuiltInTypeFlag] = true;
|
|
394
|
+
|
|
133
395
|
import { Raycaster } from "../../engine-components/ui/Raycaster.ts";
|
|
396
|
+
Raycaster[$BuiltInTypeFlag] = true;
|
|
397
|
+
|
|
134
398
|
import { ObjectRaycaster } from "../../engine-components/ui/Raycaster.ts";
|
|
399
|
+
ObjectRaycaster[$BuiltInTypeFlag] = true;
|
|
400
|
+
|
|
135
401
|
import { GraphicRaycaster } from "../../engine-components/ui/Raycaster.ts";
|
|
402
|
+
GraphicRaycaster[$BuiltInTypeFlag] = true;
|
|
403
|
+
|
|
136
404
|
import { UIRaycastUtils } from "../../engine-components/ui/RaycastUtils.ts";
|
|
405
|
+
UIRaycastUtils[$BuiltInTypeFlag] = true;
|
|
406
|
+
|
|
137
407
|
import { Size } from "../../engine-components/ui/RectTransform.ts";
|
|
408
|
+
Size[$BuiltInTypeFlag] = true;
|
|
409
|
+
|
|
138
410
|
import { Rect } from "../../engine-components/ui/RectTransform.ts";
|
|
411
|
+
Rect[$BuiltInTypeFlag] = true;
|
|
412
|
+
|
|
139
413
|
import { RectTransform } from "../../engine-components/ui/RectTransform.ts";
|
|
414
|
+
RectTransform[$BuiltInTypeFlag] = true;
|
|
415
|
+
|
|
140
416
|
import { SpatialHtml } from "../../engine-components/ui/SpatialHtml.ts";
|
|
417
|
+
SpatialHtml[$BuiltInTypeFlag] = true;
|
|
418
|
+
|
|
141
419
|
import { Text } from "../../engine-components/ui/Text.ts";
|
|
420
|
+
Text[$BuiltInTypeFlag] = true;
|
|
421
|
+
|
|
142
422
|
import { PresentationMode } from "../../engine-components-experimental/Presentation.ts";
|
|
423
|
+
PresentationMode[$BuiltInTypeFlag] = true;
|
|
424
|
+
|
|
143
425
|
import { LinesDrawer } from "../../engine-components-experimental/annotation/LineDrawer.ts";
|
|
426
|
+
LinesDrawer[$BuiltInTypeFlag] = true;
|
|
427
|
+
|
|
144
428
|
import { LineInstanceHandler } from "../../engine-components-experimental/annotation/LinesManager.ts";
|
|
429
|
+
LineInstanceHandler[$BuiltInTypeFlag] = true;
|
|
430
|
+
|
|
145
431
|
import { LinesManager } from "../../engine-components-experimental/annotation/LinesManager.ts";
|
|
432
|
+
LinesManager[$BuiltInTypeFlag] = true;
|
|
433
|
+
|
|
146
434
|
import { PlayerSync } from "../../engine-components-experimental/networking/PlayerSync.ts";
|
|
435
|
+
PlayerSync[$BuiltInTypeFlag] = true;
|
|
436
|
+
|
|
147
437
|
import { PlayerState } from "../../engine-components-experimental/networking/PlayerSync.ts";
|
|
438
|
+
PlayerState[$BuiltInTypeFlag] = true;
|
|
439
|
+
|
|
148
440
|
|
|
149
441
|
// Register types
|
|
150
442
|
TypeStore.add("AlignmentConstraint", AlignmentConstraint);
|
|
@@ -197,6 +489,7 @@ TypeStore.add("MainModule", MainModule);
|
|
|
197
489
|
TypeStore.add("EmissionModule", EmissionModule);
|
|
198
490
|
TypeStore.add("ShapeModule", ShapeModule);
|
|
199
491
|
TypeStore.add("PlayerColor", PlayerColor);
|
|
492
|
+
TypeStore.add("ReflectionProbe", ReflectionProbe);
|
|
200
493
|
TypeStore.add("FieldWithDefault", FieldWithDefault);
|
|
201
494
|
TypeStore.add("Renderer", Renderer);
|
|
202
495
|
TypeStore.add("MeshRenderer", MeshRenderer);
|
|
@@ -40,12 +40,18 @@ export function makeErrorsVisibleForDevelopment() {
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
export function addLog(type: LogType, message: string | any[], _file?: string | null, _line?: number | null) {
|
|
43
|
-
|
|
43
|
+
if(hide) return;
|
|
44
44
|
const context = Context.Current;
|
|
45
45
|
const domElement = context?.domElement ?? document.querySelector("needle-engine");
|
|
46
46
|
if (!domElement) return;
|
|
47
47
|
if (Array.isArray(message)) {
|
|
48
|
-
|
|
48
|
+
let newMessage = "";
|
|
49
|
+
for(let i = 0; i < message.length; i++) {
|
|
50
|
+
if(typeof message[i] === "object") continue;
|
|
51
|
+
if(i > 0) newMessage += " ";
|
|
52
|
+
newMessage += message[i];
|
|
53
|
+
}
|
|
54
|
+
message = newMessage;
|
|
49
55
|
}
|
|
50
56
|
showMessage(type, domElement, message);
|
|
51
57
|
}
|
|
@@ -181,6 +187,7 @@ function getMessageContainer(type: LogType, msg: string): HTMLElement {
|
|
|
181
187
|
element.style.borderRadius = "8px";
|
|
182
188
|
element.style.pointerEvents = "all";
|
|
183
189
|
element.style.userSelect = "text";
|
|
190
|
+
element.style.maxWidth = "250px";
|
|
184
191
|
element.style.whiteSpace = "pre-wrap";
|
|
185
192
|
element.style["backdrop-filter"] = "blur(10px)";
|
|
186
193
|
element.style.backgroundColor = "rgba(20,20,20,.8)";
|
|
@@ -45,7 +45,7 @@ export class EngineLoadingView implements ILoadingViewHandler {
|
|
|
45
45
|
if (el.classList.contains("loading")) {
|
|
46
46
|
if (!this._allowCustomLoadingElement) {
|
|
47
47
|
console.warn("Custom loading container is not allowed")
|
|
48
|
-
|
|
48
|
+
this.container.removeChild(el);
|
|
49
49
|
continue;
|
|
50
50
|
}
|
|
51
51
|
this._loadingElement = this.createLoadingElement(el);
|
|
@@ -51,8 +51,19 @@ export class InstantiateOptions {
|
|
|
51
51
|
// main.processStart(Context.Current, go);
|
|
52
52
|
// }
|
|
53
53
|
|
|
54
|
+
const $isActive = Symbol("isActive");
|
|
55
|
+
|
|
54
56
|
export function isActiveSelf(go: Object3D): boolean {
|
|
55
|
-
|
|
57
|
+
const visible = go.visible || isUsingInstancing(go);
|
|
58
|
+
if (go[$isActive] === undefined) {
|
|
59
|
+
go[$isActive] = visible;
|
|
60
|
+
}
|
|
61
|
+
return go[$isActive] && visible;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function setActive(go:Object3D, active:boolean, setVisible = true){
|
|
65
|
+
go[$isActive] = active;
|
|
66
|
+
if(setVisible) go.visible = active;
|
|
56
67
|
}
|
|
57
68
|
|
|
58
69
|
export function isActiveInHierarchy(go: Object3D): boolean {
|
|
@@ -74,6 +85,7 @@ export function findByGuid(guid: string, hierarchy: THREE.Object3D): GameObject
|
|
|
74
85
|
export function destroy(instance: Object3D | Component, recursive: boolean = true, isRoot: boolean = true) {
|
|
75
86
|
const comp = instance as Component;
|
|
76
87
|
if (comp.isComponent) {
|
|
88
|
+
comp.__internalDisable();
|
|
77
89
|
comp.__internalDestroy();
|
|
78
90
|
return;
|
|
79
91
|
}
|
|
@@ -92,6 +104,7 @@ export function destroy(instance: Object3D | Component, recursive: boolean = tru
|
|
|
92
104
|
let lastLength = components.length;
|
|
93
105
|
for (let i = 0; i < components.length; i++) {
|
|
94
106
|
const comp: Component = components[i];
|
|
107
|
+
comp.__internalDisable();
|
|
95
108
|
comp.__internalDestroy();
|
|
96
109
|
// if (comp.destroy) {
|
|
97
110
|
// if (debug) console.log("destroying", comp);
|
|
@@ -111,7 +124,7 @@ export function destroy(instance: Object3D | Component, recursive: boolean = tru
|
|
|
111
124
|
|
|
112
125
|
export function foreachComponent(instance: THREE.Object3D, cb: (comp: Component) => any, recursive: boolean = true): any {
|
|
113
126
|
if (!instance) return;
|
|
114
|
-
if(!instance.isObject3D){
|
|
127
|
+
if (!instance.isObject3D) {
|
|
115
128
|
new Error("Expected Object3D but got " + instance);
|
|
116
129
|
}
|
|
117
130
|
if (instance.userData?.components) {
|
|
@@ -464,8 +477,8 @@ function resolveReferences(newObjectsMap: { [key: string]: NewGameObjectReferenc
|
|
|
464
477
|
|
|
465
478
|
}
|
|
466
479
|
|
|
467
|
-
function postProcessNewInstance(copy: THREE.Object3D, key: string, value
|
|
468
|
-
if(value === null || value === undefined) return;
|
|
480
|
+
function postProcessNewInstance(copy: THREE.Object3D, key: string, value: IComponent | Object3D, newObjectsMap: { [key: string]: NewGameObjectReferenceInfo }) {
|
|
481
|
+
if (value === null || value === undefined) return;
|
|
469
482
|
if ((value as IComponent).isComponent === true) {
|
|
470
483
|
const originalGameObjectReference = value["gameObject"];
|
|
471
484
|
// console.log(key, value, originalGameObjectReference);
|
|
@@ -13,11 +13,13 @@ import { SourceIdentifier } from "./engine_types";
|
|
|
13
13
|
import { UIDProvider } from "./engine_types";
|
|
14
14
|
import { addNewComponentInstance } from "./engine_components";
|
|
15
15
|
import { getParam } from "./engine_utils";
|
|
16
|
+
import { LogType, showBalloonMessage } from "./debug/debug";
|
|
17
|
+
import { isLocalNetwork } from "./engine_networking_utils";
|
|
16
18
|
|
|
17
19
|
|
|
18
20
|
const debug = debugExtension;
|
|
19
21
|
const debugTypeStore = getParam("debugtypestore");
|
|
20
|
-
if(debugTypeStore) console.log(TypeStore);
|
|
22
|
+
if (debugTypeStore) console.log(TypeStore);
|
|
21
23
|
|
|
22
24
|
export function writeBuiltinComponentData(comp: Component, context: SerializationContext): object | null {
|
|
23
25
|
|
|
@@ -172,6 +174,8 @@ async function onCreateBuiltinComponents(context: SerializationContext, obj: THR
|
|
|
172
174
|
const unknown = unknownComponentsBuffer.join(", ");
|
|
173
175
|
console.warn("unknown components: " + unknown);
|
|
174
176
|
unknownComponentsBuffer.length = 0;
|
|
177
|
+
if (isLocalNetwork())
|
|
178
|
+
showBalloonMessage(`<strong>Unknown components in scene</strong>:\n\n${unknown}\n\nThis could mean you forgot to add a npmdef to your ExportInfo\n<a href="https://engine.needle.tools/docs/project_structure.html#creating-and-installing-a-npmdef" target="_blank">documentation</a>`, LogType.Warn);
|
|
175
179
|
}
|
|
176
180
|
}
|
|
177
181
|
|
|
@@ -207,14 +207,16 @@ function removeFromArray(script: any, array: any[]) {
|
|
|
207
207
|
const previousActiveMap: { [key: string]: boolean } = {};
|
|
208
208
|
const previousActiveInHierarchyMap: { [key: string]: boolean } = {};
|
|
209
209
|
|
|
210
|
-
export function updateIsActive() {
|
|
211
|
-
if
|
|
210
|
+
export function updateIsActive(obj? : Object3D) {
|
|
211
|
+
if(!obj) obj = Context.Current.scene;
|
|
212
|
+
if (!obj) {
|
|
212
213
|
console.trace("Invalid call - no current context.");
|
|
213
214
|
return;
|
|
214
215
|
}
|
|
215
|
-
updateIsActiveInHierarchyRecursiveRuntime(
|
|
216
|
+
updateIsActiveInHierarchyRecursiveRuntime(obj, isActiveSelf(obj), true);
|
|
216
217
|
}
|
|
217
218
|
|
|
219
|
+
|
|
218
220
|
function updateIsActiveInHierarchyRecursiveRuntime(go: THREE.Object3D, activeInHierarchy: boolean, allowEventCall: boolean) {
|
|
219
221
|
let activeStateChanged: boolean = false;
|
|
220
222
|
|
|
@@ -247,6 +249,7 @@ function updateIsActiveInHierarchyRecursiveRuntime(go: THREE.Object3D, activeInH
|
|
|
247
249
|
const prevActiveInHierarchy = previousActiveInHierarchyMap[go.uuid];
|
|
248
250
|
if (prevActiveInHierarchy !== undefined) {
|
|
249
251
|
if (prevActiveInHierarchy !== activeInHierarchy) {
|
|
252
|
+
// console.log("CHANGE", go.name, activeInHierarchy);
|
|
250
253
|
if (allowEventCall) {
|
|
251
254
|
perComponent(go, comp => {
|
|
252
255
|
if (activeInHierarchy) {
|
|
@@ -286,6 +289,7 @@ export function updateActiveInHierarchyWithoutEventCall(go: THREE.Object3D) {
|
|
|
286
289
|
console.error("GO is null");
|
|
287
290
|
return;
|
|
288
291
|
}
|
|
292
|
+
previousActiveInHierarchyMap[go.uuid] = activeInHierarchy;
|
|
289
293
|
go[constants.activeInHierarchyFieldName] = activeInHierarchy && foundScene;
|
|
290
294
|
}
|
|
291
295
|
|