@needle-tools/engine 2.35.5-pre → 2.37.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 +31 -0
- package/dist/needle-engine.d.ts +312 -232
- package/dist/needle-engine.js +456 -437
- package/dist/needle-engine.js.map +4 -4
- package/dist/needle-engine.min.js +81 -76
- package/dist/needle-engine.min.js.map +4 -4
- package/lib/engine/api.d.ts +1 -0
- package/lib/engine/api.js +1 -0
- package/lib/engine/api.js.map +1 -1
- package/lib/engine/debug/debug.d.ts +1 -0
- package/lib/engine/debug/debug.js +3 -0
- package/lib/engine/debug/debug.js.map +1 -1
- 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 +15 -2
- 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 +49 -57
- package/lib/engine/engine_physics.js +464 -417
- package/lib/engine/engine_physics.js.map +1 -1
- package/lib/engine/engine_physics.types.d.ts +16 -0
- package/lib/engine/engine_physics.types.js +19 -0
- package/lib/engine/engine_physics.types.js.map +1 -0
- package/lib/engine/engine_serialization_core.d.ts +3 -0
- package/lib/engine/engine_serialization_core.js +19 -6
- package/lib/engine/engine_serialization_core.js.map +1 -1
- package/lib/engine/engine_setup.js +4 -2
- 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 +46 -26
- package/lib/engine/engine_types.js +24 -37
- 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_util_decorator.d.ts +6 -0
- package/lib/engine/engine_util_decorator.js +54 -0
- package/lib/engine/engine_util_decorator.js.map +1 -0
- package/lib/engine/engine_utils.d.ts +1 -1
- package/lib/engine/engine_utils.js +2 -2
- 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_gameobject_data.js +2 -0
- package/lib/engine/extensions/NEEDLE_gameobject_data.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 -0
- package/lib/engine-components/Animation.js +14 -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 +28 -9
- package/lib/engine-components/BoxHelperComponent.js.map +1 -1
- package/lib/engine-components/Collider.d.ts +7 -2
- package/lib/engine-components/Collider.js +27 -15
- package/lib/engine-components/Collider.js.map +1 -1
- package/lib/engine-components/Component.d.ts +8 -16
- package/lib/engine-components/Component.js +18 -117
- package/lib/engine-components/Component.js.map +1 -1
- package/lib/engine-components/DragControls.js +9 -6
- package/lib/engine-components/DragControls.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/NavMesh.d.ts +0 -5
- package/lib/engine-components/NavMesh.js +100 -10
- package/lib/engine-components/NavMesh.js.map +1 -1
- package/lib/engine-components/NestedGltf.js +2 -0
- package/lib/engine-components/NestedGltf.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/RigidBody.d.ts +40 -25
- package/lib/engine-components/RigidBody.js +253 -142
- package/lib/engine-components/RigidBody.js.map +1 -1
- package/lib/engine-components/SpatialTrigger.js +1 -1
- package/lib/engine-components/SpatialTrigger.js.map +1 -1
- package/lib/engine-components/SpectatorCamera.d.ts +1 -0
- package/lib/engine-components/SpectatorCamera.js +9 -2
- package/lib/engine-components/SpectatorCamera.js.map +1 -1
- package/lib/engine-components/SpringJoint.d.ts +0 -13
- package/lib/engine-components/SpringJoint.js +42 -41
- package/lib/engine-components/SpringJoint.js.map +1 -1
- package/lib/engine-components/VideoPlayer.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 +10 -8
- package/lib/engine-components/WebXR.js +50 -26
- 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 +90 -68
- 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 +2 -3
- package/lib/engine-components/codegen/components.js +2 -3
- 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 +3 -4
- package/src/engine/api.ts +2 -1
- package/src/engine/codegen/register_types.js +291 -6
- package/src/engine/debug/debug.ts +4 -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 +19 -6
- 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 +508 -469
- package/src/engine/engine_physics.types.ts +19 -0
- package/src/engine/engine_serialization_core.ts +22 -8
- package/src/engine/engine_setup.ts +6 -2
- package/src/engine/engine_time.ts +2 -0
- package/src/engine/engine_types.ts +82 -55
- package/src/engine/engine_typestore.ts +2 -0
- package/src/engine/engine_util_decorator.ts +69 -0
- package/src/engine/engine_utils.ts +6 -5
- 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_gameobject_data.ts +2 -0
- package/src/engine/extensions/NEEDLE_techniques_webgl.ts +7 -0
- package/src/engine-components/Animation.ts +14 -1
- package/src/engine-components/AnimatorController.ts +19 -9
- package/src/engine-components/BoxHelperComponent.ts +30 -9
- package/src/engine-components/Collider.ts +29 -29
- package/src/engine-components/Component.ts +26 -135
- package/src/engine-components/DragControls.ts +9 -5
- package/src/engine-components/GroundProjection.ts +22 -7
- package/src/engine-components/NavMesh.ts +114 -115
- package/src/engine-components/NestedGltf.ts +2 -0
- package/src/engine-components/ReflectionProbe.ts +141 -0
- package/src/engine-components/Renderer.ts +796 -737
- package/src/engine-components/RigidBody.ts +258 -149
- package/src/engine-components/SpatialTrigger.ts +1 -1
- package/src/engine-components/SpectatorCamera.ts +10 -2
- package/src/engine-components/SpringJoint.ts +41 -41
- package/src/engine-components/VideoPlayer.ts +1 -2
- package/src/engine-components/WebARSessionRoot.ts +16 -16
- package/src/engine-components/WebXR.ts +65 -50
- package/src/engine-components/WebXRAvatar.ts +16 -16
- package/src/engine-components/WebXRController.ts +143 -112
- package/src/engine-components/WebXRGrabRendering.ts +6 -6
- package/src/engine-components/WebXRSync.ts +20 -20
- package/src/engine-components/codegen/components.ts +2 -3
- package/src/engine-components/ui/EventSystem.ts +26 -3
|
@@ -1,150 +1,436 @@
|
|
|
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
|
+
|
|
53
|
+
import { MeshCollider } from "../../engine-components/Collider.ts";
|
|
54
|
+
MeshCollider[$BuiltInTypeFlag] = true;
|
|
55
|
+
|
|
20
56
|
import { DeleteBox } from "../../engine-components/DeleteBox.ts";
|
|
57
|
+
DeleteBox[$BuiltInTypeFlag] = true;
|
|
58
|
+
|
|
21
59
|
import { Deletable } from "../../engine-components/DeleteBox.ts";
|
|
60
|
+
Deletable[$BuiltInTypeFlag] = true;
|
|
61
|
+
|
|
22
62
|
import { DeviceFlag } from "../../engine-components/DeviceFlag.ts";
|
|
63
|
+
DeviceFlag[$BuiltInTypeFlag] = true;
|
|
64
|
+
|
|
23
65
|
import { DragControls } from "../../engine-components/DragControls.ts";
|
|
66
|
+
DragControls[$BuiltInTypeFlag] = true;
|
|
67
|
+
|
|
24
68
|
import { DropListener } from "../../engine-components/DropListener.ts";
|
|
69
|
+
DropListener[$BuiltInTypeFlag] = true;
|
|
70
|
+
|
|
25
71
|
import { Duplicatable } from "../../engine-components/Duplicatable.ts";
|
|
72
|
+
Duplicatable[$BuiltInTypeFlag] = true;
|
|
73
|
+
|
|
26
74
|
import { CallInfo } from "../../engine-components/EventList.ts";
|
|
75
|
+
CallInfo[$BuiltInTypeFlag] = true;
|
|
76
|
+
|
|
27
77
|
import { EventListEvent } from "../../engine-components/EventList.ts";
|
|
78
|
+
EventListEvent[$BuiltInTypeFlag] = true;
|
|
79
|
+
|
|
28
80
|
import { EventList } from "../../engine-components/EventList.ts";
|
|
81
|
+
EventList[$BuiltInTypeFlag] = true;
|
|
82
|
+
|
|
29
83
|
import { EventTrigger } from "../../engine-components/EventTrigger.ts";
|
|
84
|
+
EventTrigger[$BuiltInTypeFlag] = true;
|
|
85
|
+
|
|
30
86
|
import { FlyControls } from "../../engine-components/FlyControls.ts";
|
|
87
|
+
FlyControls[$BuiltInTypeFlag] = true;
|
|
88
|
+
|
|
31
89
|
import { BoxGizmo } from "../../engine-components/Gizmos.ts";
|
|
90
|
+
BoxGizmo[$BuiltInTypeFlag] = true;
|
|
91
|
+
|
|
32
92
|
import { GltfExportBox } from "../../engine-components/GltfExport.ts";
|
|
93
|
+
GltfExportBox[$BuiltInTypeFlag] = true;
|
|
94
|
+
|
|
33
95
|
import { GltfExport } from "../../engine-components/GltfExport.ts";
|
|
96
|
+
GltfExport[$BuiltInTypeFlag] = true;
|
|
97
|
+
|
|
34
98
|
import { GridHelper } from "../../engine-components/GridHelper.ts";
|
|
99
|
+
GridHelper[$BuiltInTypeFlag] = true;
|
|
100
|
+
|
|
35
101
|
import { GroundProjectedEnv } from "../../engine-components/GroundProjection.ts";
|
|
102
|
+
GroundProjectedEnv[$BuiltInTypeFlag] = true;
|
|
103
|
+
|
|
36
104
|
import { Interactable } from "../../engine-components/Interactable.ts";
|
|
105
|
+
Interactable[$BuiltInTypeFlag] = true;
|
|
106
|
+
|
|
37
107
|
import { UsageMarker } from "../../engine-components/Interactable.ts";
|
|
108
|
+
UsageMarker[$BuiltInTypeFlag] = true;
|
|
109
|
+
|
|
38
110
|
import { Light } from "../../engine-components/Light.ts";
|
|
111
|
+
Light[$BuiltInTypeFlag] = true;
|
|
112
|
+
|
|
39
113
|
import { LODModel } from "../../engine-components/LODGroup.ts";
|
|
114
|
+
LODModel[$BuiltInTypeFlag] = true;
|
|
115
|
+
|
|
40
116
|
import { LODGroup } from "../../engine-components/LODGroup.ts";
|
|
117
|
+
LODGroup[$BuiltInTypeFlag] = true;
|
|
118
|
+
|
|
41
119
|
import { LookAtConstraint } from "../../engine-components/LookAtConstraint.ts";
|
|
42
|
-
|
|
43
|
-
|
|
120
|
+
LookAtConstraint[$BuiltInTypeFlag] = true;
|
|
121
|
+
|
|
44
122
|
import { NestedGltf } from "../../engine-components/NestedGltf.ts";
|
|
123
|
+
NestedGltf[$BuiltInTypeFlag] = true;
|
|
124
|
+
|
|
45
125
|
import { Networking } from "../../engine-components/Networking.ts";
|
|
126
|
+
Networking[$BuiltInTypeFlag] = true;
|
|
127
|
+
|
|
46
128
|
import { OffsetConstraint } from "../../engine-components/OffsetConstraint.ts";
|
|
129
|
+
OffsetConstraint[$BuiltInTypeFlag] = true;
|
|
130
|
+
|
|
47
131
|
import { OrbitControls } from "../../engine-components/OrbitControls.ts";
|
|
132
|
+
OrbitControls[$BuiltInTypeFlag] = true;
|
|
133
|
+
|
|
48
134
|
import { ParticleSystemRenderer } from "../../engine-components/ParticleSystem.ts";
|
|
135
|
+
ParticleSystemRenderer[$BuiltInTypeFlag] = true;
|
|
136
|
+
|
|
49
137
|
import { ParticleSystem } from "../../engine-components/ParticleSystem.ts";
|
|
138
|
+
ParticleSystem[$BuiltInTypeFlag] = true;
|
|
139
|
+
|
|
50
140
|
import { MainModule } from "../../engine-components/ParticleSystemModules.ts";
|
|
141
|
+
MainModule[$BuiltInTypeFlag] = true;
|
|
142
|
+
|
|
51
143
|
import { EmissionModule } from "../../engine-components/ParticleSystemModules.ts";
|
|
144
|
+
EmissionModule[$BuiltInTypeFlag] = true;
|
|
145
|
+
|
|
52
146
|
import { ShapeModule } from "../../engine-components/ParticleSystemModules.ts";
|
|
147
|
+
ShapeModule[$BuiltInTypeFlag] = true;
|
|
148
|
+
|
|
53
149
|
import { PlayerColor } from "../../engine-components/PlayerColor.ts";
|
|
150
|
+
PlayerColor[$BuiltInTypeFlag] = true;
|
|
151
|
+
|
|
152
|
+
import { ReflectionProbe } from "../../engine-components/ReflectionProbe.ts";
|
|
153
|
+
ReflectionProbe[$BuiltInTypeFlag] = true;
|
|
154
|
+
|
|
54
155
|
import { FieldWithDefault } from "../../engine-components/Renderer.ts";
|
|
156
|
+
FieldWithDefault[$BuiltInTypeFlag] = true;
|
|
157
|
+
|
|
55
158
|
import { Renderer } from "../../engine-components/Renderer.ts";
|
|
159
|
+
Renderer[$BuiltInTypeFlag] = true;
|
|
160
|
+
|
|
56
161
|
import { MeshRenderer } from "../../engine-components/Renderer.ts";
|
|
162
|
+
MeshRenderer[$BuiltInTypeFlag] = true;
|
|
163
|
+
|
|
57
164
|
import { SkinnedMeshRenderer } from "../../engine-components/Renderer.ts";
|
|
165
|
+
SkinnedMeshRenderer[$BuiltInTypeFlag] = true;
|
|
166
|
+
|
|
58
167
|
import { RendererLightmap } from "../../engine-components/RendererLightmap.ts";
|
|
168
|
+
RendererLightmap[$BuiltInTypeFlag] = true;
|
|
169
|
+
|
|
59
170
|
import { Rigidbody } from "../../engine-components/RigidBody.ts";
|
|
171
|
+
Rigidbody[$BuiltInTypeFlag] = true;
|
|
172
|
+
|
|
60
173
|
import { ScreenCapture } from "../../engine-components/ScreenCapture.ts";
|
|
174
|
+
ScreenCapture[$BuiltInTypeFlag] = true;
|
|
175
|
+
|
|
61
176
|
import { ShadowCatcher } from "../../engine-components/ShadowCatcher.ts";
|
|
177
|
+
ShadowCatcher[$BuiltInTypeFlag] = true;
|
|
178
|
+
|
|
62
179
|
import { RemoteSkybox } from "../../engine-components/Skybox.ts";
|
|
180
|
+
RemoteSkybox[$BuiltInTypeFlag] = true;
|
|
181
|
+
|
|
63
182
|
import { SmoothFollow } from "../../engine-components/SmoothFollow.ts";
|
|
183
|
+
SmoothFollow[$BuiltInTypeFlag] = true;
|
|
184
|
+
|
|
64
185
|
import { SpatialTriggerReceiver } from "../../engine-components/SpatialTrigger.ts";
|
|
186
|
+
SpatialTriggerReceiver[$BuiltInTypeFlag] = true;
|
|
187
|
+
|
|
65
188
|
import { SpatialTrigger } from "../../engine-components/SpatialTrigger.ts";
|
|
189
|
+
SpatialTrigger[$BuiltInTypeFlag] = true;
|
|
190
|
+
|
|
66
191
|
import { SpectatorCamera } from "../../engine-components/SpectatorCamera.ts";
|
|
67
|
-
|
|
192
|
+
SpectatorCamera[$BuiltInTypeFlag] = true;
|
|
193
|
+
|
|
68
194
|
import { Sprite } from "../../engine-components/SpriteRenderer.ts";
|
|
195
|
+
Sprite[$BuiltInTypeFlag] = true;
|
|
196
|
+
|
|
69
197
|
import { SpriteRenderer } from "../../engine-components/SpriteRenderer.ts";
|
|
198
|
+
SpriteRenderer[$BuiltInTypeFlag] = true;
|
|
199
|
+
|
|
70
200
|
import { SyncedCamera } from "../../engine-components/SyncedCamera.ts";
|
|
201
|
+
SyncedCamera[$BuiltInTypeFlag] = true;
|
|
202
|
+
|
|
71
203
|
import { SyncedRoom } from "../../engine-components/SyncedRoom.ts";
|
|
204
|
+
SyncedRoom[$BuiltInTypeFlag] = true;
|
|
205
|
+
|
|
72
206
|
import { SyncedTransform } from "../../engine-components/SyncedTransform.ts";
|
|
207
|
+
SyncedTransform[$BuiltInTypeFlag] = true;
|
|
208
|
+
|
|
73
209
|
import { TestRunner } from "../../engine-components/TestRunner.ts";
|
|
210
|
+
TestRunner[$BuiltInTypeFlag] = true;
|
|
211
|
+
|
|
74
212
|
import { TestSimulateUserData } from "../../engine-components/TestRunner.ts";
|
|
213
|
+
TestSimulateUserData[$BuiltInTypeFlag] = true;
|
|
214
|
+
|
|
75
215
|
import { TransformGizmo } from "../../engine-components/TransformGizmo.ts";
|
|
216
|
+
TransformGizmo[$BuiltInTypeFlag] = true;
|
|
217
|
+
|
|
76
218
|
import { VideoPlayer } from "../../engine-components/VideoPlayer.ts";
|
|
219
|
+
VideoPlayer[$BuiltInTypeFlag] = true;
|
|
220
|
+
|
|
77
221
|
import { Voip } from "../../engine-components/Voip.ts";
|
|
222
|
+
Voip[$BuiltInTypeFlag] = true;
|
|
223
|
+
|
|
78
224
|
import { VolumeParameter } from "../../engine-components/Volume.ts";
|
|
225
|
+
VolumeParameter[$BuiltInTypeFlag] = true;
|
|
226
|
+
|
|
79
227
|
import { VolumeComponent } from "../../engine-components/Volume.ts";
|
|
228
|
+
VolumeComponent[$BuiltInTypeFlag] = true;
|
|
229
|
+
|
|
80
230
|
import { ToneMapping } from "../../engine-components/Volume.ts";
|
|
231
|
+
ToneMapping[$BuiltInTypeFlag] = true;
|
|
232
|
+
|
|
81
233
|
import { ColorAdjustments } from "../../engine-components/Volume.ts";
|
|
234
|
+
ColorAdjustments[$BuiltInTypeFlag] = true;
|
|
235
|
+
|
|
82
236
|
import { VolumeProfile } from "../../engine-components/Volume.ts";
|
|
237
|
+
VolumeProfile[$BuiltInTypeFlag] = true;
|
|
238
|
+
|
|
83
239
|
import { Volume } from "../../engine-components/Volume.ts";
|
|
240
|
+
Volume[$BuiltInTypeFlag] = true;
|
|
241
|
+
|
|
84
242
|
import { WebARSessionRoot } from "../../engine-components/WebARSessionRoot.ts";
|
|
243
|
+
WebARSessionRoot[$BuiltInTypeFlag] = true;
|
|
244
|
+
|
|
85
245
|
import { WebXR } from "../../engine-components/WebXR.ts";
|
|
246
|
+
WebXR[$BuiltInTypeFlag] = true;
|
|
247
|
+
|
|
86
248
|
import { WebAR } from "../../engine-components/WebXR.ts";
|
|
249
|
+
WebAR[$BuiltInTypeFlag] = true;
|
|
250
|
+
|
|
87
251
|
import { AvatarMarker } from "../../engine-components/WebXRAvatar.ts";
|
|
252
|
+
AvatarMarker[$BuiltInTypeFlag] = true;
|
|
253
|
+
|
|
88
254
|
import { WebXRAvatar } from "../../engine-components/WebXRAvatar.ts";
|
|
255
|
+
WebXRAvatar[$BuiltInTypeFlag] = true;
|
|
256
|
+
|
|
89
257
|
import { TeleportTarget } from "../../engine-components/WebXRController.ts";
|
|
258
|
+
TeleportTarget[$BuiltInTypeFlag] = true;
|
|
259
|
+
|
|
90
260
|
import { WebXRController } from "../../engine-components/WebXRController.ts";
|
|
261
|
+
WebXRController[$BuiltInTypeFlag] = true;
|
|
262
|
+
|
|
91
263
|
import { AttachedObject } from "../../engine-components/WebXRController.ts";
|
|
264
|
+
AttachedObject[$BuiltInTypeFlag] = true;
|
|
265
|
+
|
|
92
266
|
import { XRGrabModel } from "../../engine-components/WebXRGrabRendering.ts";
|
|
267
|
+
XRGrabModel[$BuiltInTypeFlag] = true;
|
|
268
|
+
|
|
93
269
|
import { XRGrabRendering } from "../../engine-components/WebXRGrabRendering.ts";
|
|
270
|
+
XRGrabRendering[$BuiltInTypeFlag] = true;
|
|
271
|
+
|
|
94
272
|
import { XRRig } from "../../engine-components/WebXRRig.ts";
|
|
273
|
+
XRRig[$BuiltInTypeFlag] = true;
|
|
274
|
+
|
|
95
275
|
import { VRUserState } from "../../engine-components/WebXRSync.ts";
|
|
276
|
+
VRUserState[$BuiltInTypeFlag] = true;
|
|
277
|
+
|
|
96
278
|
import { WebXRSync } from "../../engine-components/WebXRSync.ts";
|
|
279
|
+
WebXRSync[$BuiltInTypeFlag] = true;
|
|
280
|
+
|
|
97
281
|
import { XRState } from "../../engine-components/XRFlag.ts";
|
|
282
|
+
XRState[$BuiltInTypeFlag] = true;
|
|
283
|
+
|
|
98
284
|
import { XRFlag } from "../../engine-components/XRFlag.ts";
|
|
285
|
+
XRFlag[$BuiltInTypeFlag] = true;
|
|
286
|
+
|
|
99
287
|
import { AvatarBlink_Simple } from "../../engine-components/avatar/AvatarBlink_Simple.ts";
|
|
288
|
+
AvatarBlink_Simple[$BuiltInTypeFlag] = true;
|
|
289
|
+
|
|
100
290
|
import { AvatarEyeLook_Rotation } from "../../engine-components/avatar/AvatarEyeLook_Rotation.ts";
|
|
291
|
+
AvatarEyeLook_Rotation[$BuiltInTypeFlag] = true;
|
|
292
|
+
|
|
101
293
|
import { Avatar_POI } from "../../engine-components/avatar/Avatar_Brain_LookAt.ts";
|
|
294
|
+
Avatar_POI[$BuiltInTypeFlag] = true;
|
|
295
|
+
|
|
102
296
|
import { Avatar_Brain_LookAt } from "../../engine-components/avatar/Avatar_Brain_LookAt.ts";
|
|
297
|
+
Avatar_Brain_LookAt[$BuiltInTypeFlag] = true;
|
|
298
|
+
|
|
103
299
|
import { Avatar_MouthShapes } from "../../engine-components/avatar/Avatar_MouthShapes.ts";
|
|
300
|
+
Avatar_MouthShapes[$BuiltInTypeFlag] = true;
|
|
301
|
+
|
|
104
302
|
import { Avatar_MustacheShake } from "../../engine-components/avatar/Avatar_MustacheShake.ts";
|
|
303
|
+
Avatar_MustacheShake[$BuiltInTypeFlag] = true;
|
|
304
|
+
|
|
105
305
|
import { __Ignore } from "../../engine-components/codegen/components.ts";
|
|
306
|
+
__Ignore[$BuiltInTypeFlag] = true;
|
|
307
|
+
|
|
106
308
|
import { LogStats } from "../../engine-components/debug/LogStats.ts";
|
|
309
|
+
LogStats[$BuiltInTypeFlag] = true;
|
|
310
|
+
|
|
107
311
|
import { RGBAColor } from "../../engine-components/js-extensions/RGBAColor.ts";
|
|
312
|
+
RGBAColor[$BuiltInTypeFlag] = true;
|
|
313
|
+
|
|
108
314
|
import { PlayableDirector } from "../../engine-components/timeline/PlayableDirector.ts";
|
|
315
|
+
PlayableDirector[$BuiltInTypeFlag] = true;
|
|
316
|
+
|
|
109
317
|
import { SignalAsset } from "../../engine-components/timeline/SignalAsset.ts";
|
|
318
|
+
SignalAsset[$BuiltInTypeFlag] = true;
|
|
319
|
+
|
|
110
320
|
import { SignalReceiverEvent } from "../../engine-components/timeline/SignalAsset.ts";
|
|
321
|
+
SignalReceiverEvent[$BuiltInTypeFlag] = true;
|
|
322
|
+
|
|
111
323
|
import { SignalReceiver } from "../../engine-components/timeline/SignalAsset.ts";
|
|
324
|
+
SignalReceiver[$BuiltInTypeFlag] = true;
|
|
325
|
+
|
|
112
326
|
import { AnimationTrackHandler } from "../../engine-components/timeline/TimelineTracks.ts";
|
|
327
|
+
AnimationTrackHandler[$BuiltInTypeFlag] = true;
|
|
328
|
+
|
|
113
329
|
import { AudioTrackHandler } from "../../engine-components/timeline/TimelineTracks.ts";
|
|
330
|
+
AudioTrackHandler[$BuiltInTypeFlag] = true;
|
|
331
|
+
|
|
114
332
|
import { SignalTrackHandler } from "../../engine-components/timeline/TimelineTracks.ts";
|
|
333
|
+
SignalTrackHandler[$BuiltInTypeFlag] = true;
|
|
334
|
+
|
|
115
335
|
import { ControlTrackHandler } from "../../engine-components/timeline/TimelineTracks.ts";
|
|
336
|
+
ControlTrackHandler[$BuiltInTypeFlag] = true;
|
|
337
|
+
|
|
116
338
|
import { BaseUIComponent } from "../../engine-components/ui/BaseUIComponent.ts";
|
|
339
|
+
BaseUIComponent[$BuiltInTypeFlag] = true;
|
|
340
|
+
|
|
117
341
|
import { UIRootComponent } from "../../engine-components/ui/BaseUIComponent.ts";
|
|
342
|
+
UIRootComponent[$BuiltInTypeFlag] = true;
|
|
343
|
+
|
|
118
344
|
import { Button } from "../../engine-components/ui/Button.ts";
|
|
345
|
+
Button[$BuiltInTypeFlag] = true;
|
|
346
|
+
|
|
119
347
|
import { Canvas } from "../../engine-components/ui/Canvas.ts";
|
|
348
|
+
Canvas[$BuiltInTypeFlag] = true;
|
|
349
|
+
|
|
120
350
|
import { CanvasGroup } from "../../engine-components/ui/CanvasGroup.ts";
|
|
351
|
+
CanvasGroup[$BuiltInTypeFlag] = true;
|
|
352
|
+
|
|
121
353
|
import { EventSystem } from "../../engine-components/ui/EventSystem.ts";
|
|
354
|
+
EventSystem[$BuiltInTypeFlag] = true;
|
|
355
|
+
|
|
122
356
|
import { Graphic } from "../../engine-components/ui/Graphic.ts";
|
|
357
|
+
Graphic[$BuiltInTypeFlag] = true;
|
|
358
|
+
|
|
123
359
|
import { MaskableGraphic } from "../../engine-components/ui/Graphic.ts";
|
|
360
|
+
MaskableGraphic[$BuiltInTypeFlag] = true;
|
|
361
|
+
|
|
124
362
|
import { Image } from "../../engine-components/ui/Image.ts";
|
|
363
|
+
Image[$BuiltInTypeFlag] = true;
|
|
364
|
+
|
|
125
365
|
import { RawImage } from "../../engine-components/ui/Image.ts";
|
|
366
|
+
RawImage[$BuiltInTypeFlag] = true;
|
|
367
|
+
|
|
126
368
|
import { InputField } from "../../engine-components/ui/InputField.ts";
|
|
369
|
+
InputField[$BuiltInTypeFlag] = true;
|
|
370
|
+
|
|
127
371
|
import { Keyboard } from "../../engine-components/ui/Keyboard.ts";
|
|
372
|
+
Keyboard[$BuiltInTypeFlag] = true;
|
|
373
|
+
|
|
128
374
|
import { LayoutGroup } from "../../engine-components/ui/Layout.ts";
|
|
375
|
+
LayoutGroup[$BuiltInTypeFlag] = true;
|
|
376
|
+
|
|
129
377
|
import { VerticalLayoutGroup } from "../../engine-components/ui/Layout.ts";
|
|
378
|
+
VerticalLayoutGroup[$BuiltInTypeFlag] = true;
|
|
379
|
+
|
|
130
380
|
import { HorizontalLayoutGroup } from "../../engine-components/ui/Layout.ts";
|
|
381
|
+
HorizontalLayoutGroup[$BuiltInTypeFlag] = true;
|
|
382
|
+
|
|
131
383
|
import { GridLayoutGroup } from "../../engine-components/ui/Layout.ts";
|
|
384
|
+
GridLayoutGroup[$BuiltInTypeFlag] = true;
|
|
385
|
+
|
|
132
386
|
import { PointerEventData } from "../../engine-components/ui/PointerEvents.ts";
|
|
387
|
+
PointerEventData[$BuiltInTypeFlag] = true;
|
|
388
|
+
|
|
133
389
|
import { Raycaster } from "../../engine-components/ui/Raycaster.ts";
|
|
390
|
+
Raycaster[$BuiltInTypeFlag] = true;
|
|
391
|
+
|
|
134
392
|
import { ObjectRaycaster } from "../../engine-components/ui/Raycaster.ts";
|
|
393
|
+
ObjectRaycaster[$BuiltInTypeFlag] = true;
|
|
394
|
+
|
|
135
395
|
import { GraphicRaycaster } from "../../engine-components/ui/Raycaster.ts";
|
|
396
|
+
GraphicRaycaster[$BuiltInTypeFlag] = true;
|
|
397
|
+
|
|
136
398
|
import { UIRaycastUtils } from "../../engine-components/ui/RaycastUtils.ts";
|
|
399
|
+
UIRaycastUtils[$BuiltInTypeFlag] = true;
|
|
400
|
+
|
|
137
401
|
import { Size } from "../../engine-components/ui/RectTransform.ts";
|
|
402
|
+
Size[$BuiltInTypeFlag] = true;
|
|
403
|
+
|
|
138
404
|
import { Rect } from "../../engine-components/ui/RectTransform.ts";
|
|
405
|
+
Rect[$BuiltInTypeFlag] = true;
|
|
406
|
+
|
|
139
407
|
import { RectTransform } from "../../engine-components/ui/RectTransform.ts";
|
|
408
|
+
RectTransform[$BuiltInTypeFlag] = true;
|
|
409
|
+
|
|
140
410
|
import { SpatialHtml } from "../../engine-components/ui/SpatialHtml.ts";
|
|
411
|
+
SpatialHtml[$BuiltInTypeFlag] = true;
|
|
412
|
+
|
|
141
413
|
import { Text } from "../../engine-components/ui/Text.ts";
|
|
414
|
+
Text[$BuiltInTypeFlag] = true;
|
|
415
|
+
|
|
142
416
|
import { PresentationMode } from "../../engine-components-experimental/Presentation.ts";
|
|
417
|
+
PresentationMode[$BuiltInTypeFlag] = true;
|
|
418
|
+
|
|
143
419
|
import { LinesDrawer } from "../../engine-components-experimental/annotation/LineDrawer.ts";
|
|
420
|
+
LinesDrawer[$BuiltInTypeFlag] = true;
|
|
421
|
+
|
|
144
422
|
import { LineInstanceHandler } from "../../engine-components-experimental/annotation/LinesManager.ts";
|
|
423
|
+
LineInstanceHandler[$BuiltInTypeFlag] = true;
|
|
424
|
+
|
|
145
425
|
import { LinesManager } from "../../engine-components-experimental/annotation/LinesManager.ts";
|
|
426
|
+
LinesManager[$BuiltInTypeFlag] = true;
|
|
427
|
+
|
|
146
428
|
import { PlayerSync } from "../../engine-components-experimental/networking/PlayerSync.ts";
|
|
429
|
+
PlayerSync[$BuiltInTypeFlag] = true;
|
|
430
|
+
|
|
147
431
|
import { PlayerState } from "../../engine-components-experimental/networking/PlayerSync.ts";
|
|
432
|
+
PlayerState[$BuiltInTypeFlag] = true;
|
|
433
|
+
|
|
148
434
|
|
|
149
435
|
// Register types
|
|
150
436
|
TypeStore.add("AlignmentConstraint", AlignmentConstraint);
|
|
@@ -163,6 +449,7 @@ TypeStore.add("Camera", Camera);
|
|
|
163
449
|
TypeStore.add("Collider", Collider);
|
|
164
450
|
TypeStore.add("SphereCollider", SphereCollider);
|
|
165
451
|
TypeStore.add("BoxCollider", BoxCollider);
|
|
452
|
+
TypeStore.add("MeshCollider", MeshCollider);
|
|
166
453
|
TypeStore.add("DeleteBox", DeleteBox);
|
|
167
454
|
TypeStore.add("Deletable", Deletable);
|
|
168
455
|
TypeStore.add("DeviceFlag", DeviceFlag);
|
|
@@ -185,8 +472,6 @@ TypeStore.add("Light", Light);
|
|
|
185
472
|
TypeStore.add("LODModel", LODModel);
|
|
186
473
|
TypeStore.add("LODGroup", LODGroup);
|
|
187
474
|
TypeStore.add("LookAtConstraint", LookAtConstraint);
|
|
188
|
-
TypeStore.add("NavMesh", NavMesh);
|
|
189
|
-
TypeStore.add("NavMeshAgent", NavMeshAgent);
|
|
190
475
|
TypeStore.add("NestedGltf", NestedGltf);
|
|
191
476
|
TypeStore.add("Networking", Networking);
|
|
192
477
|
TypeStore.add("OffsetConstraint", OffsetConstraint);
|
|
@@ -197,6 +482,7 @@ TypeStore.add("MainModule", MainModule);
|
|
|
197
482
|
TypeStore.add("EmissionModule", EmissionModule);
|
|
198
483
|
TypeStore.add("ShapeModule", ShapeModule);
|
|
199
484
|
TypeStore.add("PlayerColor", PlayerColor);
|
|
485
|
+
TypeStore.add("ReflectionProbe", ReflectionProbe);
|
|
200
486
|
TypeStore.add("FieldWithDefault", FieldWithDefault);
|
|
201
487
|
TypeStore.add("Renderer", Renderer);
|
|
202
488
|
TypeStore.add("MeshRenderer", MeshRenderer);
|
|
@@ -210,7 +496,6 @@ TypeStore.add("SmoothFollow", SmoothFollow);
|
|
|
210
496
|
TypeStore.add("SpatialTriggerReceiver", SpatialTriggerReceiver);
|
|
211
497
|
TypeStore.add("SpatialTrigger", SpatialTrigger);
|
|
212
498
|
TypeStore.add("SpectatorCamera", SpectatorCamera);
|
|
213
|
-
TypeStore.add("SpringJoint", SpringJoint);
|
|
214
499
|
TypeStore.add("Sprite", Sprite);
|
|
215
500
|
TypeStore.add("SpriteRenderer", SpriteRenderer);
|
|
216
501
|
TypeStore.add("SyncedCamera", SyncedCamera);
|
|
@@ -6,4 +6,8 @@ export function showBalloonMessage(text: string, logType: LogType = LogType.Log)
|
|
|
6
6
|
addLog(logType, text);
|
|
7
7
|
// addLog(LogType.Error, text);
|
|
8
8
|
// addLog(LogType.Log, text);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function showBalloonWarning(text: string) {
|
|
12
|
+
showBalloonMessage(text, LogType.Warn);
|
|
9
13
|
}
|
|
@@ -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);
|
|
@@ -8,6 +8,7 @@ import { getParam, tryFindObject } from "./engine_utils";
|
|
|
8
8
|
import { apply } from "../engine-components/js-extensions/Object3D";
|
|
9
9
|
import { InstancingUtil } from "./engine_instancing";
|
|
10
10
|
import { activeInHierarchyFieldName } from "./engine_constants";
|
|
11
|
+
import { assign } from "./engine_serialization_core";
|
|
11
12
|
|
|
12
13
|
const debug = getParam("debuggetcomponent");
|
|
13
14
|
|
|
@@ -51,8 +52,19 @@ export class InstantiateOptions {
|
|
|
51
52
|
// main.processStart(Context.Current, go);
|
|
52
53
|
// }
|
|
53
54
|
|
|
55
|
+
const $isActive = Symbol("isActive");
|
|
56
|
+
|
|
54
57
|
export function isActiveSelf(go: Object3D): boolean {
|
|
55
|
-
|
|
58
|
+
const visible = go.visible || isUsingInstancing(go);
|
|
59
|
+
if (go[$isActive] === undefined) {
|
|
60
|
+
go[$isActive] = visible;
|
|
61
|
+
}
|
|
62
|
+
return go[$isActive] && visible;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function setActive(go: Object3D, active: boolean, setVisible = true) {
|
|
66
|
+
go[$isActive] = active;
|
|
67
|
+
if (setVisible) go.visible = active;
|
|
56
68
|
}
|
|
57
69
|
|
|
58
70
|
export function isActiveInHierarchy(go: Object3D): boolean {
|
|
@@ -74,6 +86,7 @@ export function findByGuid(guid: string, hierarchy: THREE.Object3D): GameObject
|
|
|
74
86
|
export function destroy(instance: Object3D | Component, recursive: boolean = true, isRoot: boolean = true) {
|
|
75
87
|
const comp = instance as Component;
|
|
76
88
|
if (comp.isComponent) {
|
|
89
|
+
comp.__internalDisable();
|
|
77
90
|
comp.__internalDestroy();
|
|
78
91
|
return;
|
|
79
92
|
}
|
|
@@ -92,6 +105,7 @@ export function destroy(instance: Object3D | Component, recursive: boolean = tru
|
|
|
92
105
|
let lastLength = components.length;
|
|
93
106
|
for (let i = 0; i < components.length; i++) {
|
|
94
107
|
const comp: Component = components[i];
|
|
108
|
+
comp.__internalDisable();
|
|
95
109
|
comp.__internalDestroy();
|
|
96
110
|
// if (comp.destroy) {
|
|
97
111
|
// if (debug) console.log("destroying", comp);
|
|
@@ -111,7 +125,7 @@ export function destroy(instance: Object3D | Component, recursive: boolean = tru
|
|
|
111
125
|
|
|
112
126
|
export function foreachComponent(instance: THREE.Object3D, cb: (comp: Component) => any, recursive: boolean = true): any {
|
|
113
127
|
if (!instance) return;
|
|
114
|
-
if(!instance.isObject3D){
|
|
128
|
+
if (!instance.isObject3D) {
|
|
115
129
|
new Error("Expected Object3D but got " + instance);
|
|
116
130
|
}
|
|
117
131
|
if (instance.userData?.components) {
|
|
@@ -306,12 +320,11 @@ function internalInstantiate(
|
|
|
306
320
|
for (let i = 0; i < components.length; i++) {
|
|
307
321
|
const comp = components[i];
|
|
308
322
|
const copy = Object.create(comp);
|
|
309
|
-
|
|
323
|
+
assign(copy, comp);
|
|
310
324
|
newComponents.push(copy);
|
|
311
325
|
copy.gameObject = clone;
|
|
312
326
|
// copy.transform = clone;
|
|
313
327
|
componentsList.push(copy);
|
|
314
|
-
|
|
315
328
|
}
|
|
316
329
|
}
|
|
317
330
|
|
|
@@ -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
|
|