@needle-tools/engine 2.65.2-pre → 2.67.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.
Files changed (289) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/dist/needle-engine.js +34490 -26304
  3. package/dist/needle-engine.umd.cjs +748 -303
  4. package/lib/engine/api.d.ts +4 -0
  5. package/lib/engine/api.js +10 -0
  6. package/lib/engine/api.js.map +1 -1
  7. package/lib/engine/codegen/register_types.js +23 -7
  8. package/lib/engine/codegen/register_types.js.map +1 -1
  9. package/lib/engine/debug/debug_overlay.js +11 -2
  10. package/lib/engine/debug/debug_overlay.js.map +1 -1
  11. package/lib/engine/engine_addressables.js +4 -4
  12. package/lib/engine/engine_addressables.js.map +1 -1
  13. package/lib/engine/engine_assetdatabase.d.ts +17 -51
  14. package/lib/engine/engine_assetdatabase.js +252 -126
  15. package/lib/engine/engine_assetdatabase.js.map +1 -1
  16. package/lib/engine/engine_components.js +13 -1
  17. package/lib/engine/engine_components.js.map +1 -1
  18. package/lib/engine/engine_components_internal.d.ts +8 -0
  19. package/lib/engine/engine_components_internal.js +29 -0
  20. package/lib/engine/engine_components_internal.js.map +1 -0
  21. package/lib/engine/engine_constants.d.ts +1 -0
  22. package/lib/engine/engine_constants.js +1 -0
  23. package/lib/engine/engine_constants.js.map +1 -1
  24. package/lib/engine/engine_context_registry.d.ts +2 -0
  25. package/lib/engine/engine_context_registry.js +6 -0
  26. package/lib/engine/engine_context_registry.js.map +1 -1
  27. package/lib/engine/engine_editor-sync.d.ts +9 -0
  28. package/lib/engine/engine_editor-sync.js +8 -0
  29. package/lib/engine/engine_editor-sync.js.map +1 -0
  30. package/lib/engine/engine_element.d.ts +1 -0
  31. package/lib/engine/engine_element.js +4 -1
  32. package/lib/engine/engine_element.js.map +1 -1
  33. package/lib/engine/engine_element_loading.d.ts +3 -2
  34. package/lib/engine/engine_element_loading.js +19 -15
  35. package/lib/engine/engine_element_loading.js.map +1 -1
  36. package/lib/engine/engine_gameobject.js +21 -23
  37. package/lib/engine/engine_gameobject.js.map +1 -1
  38. package/lib/engine/engine_gizmos.js +3 -1
  39. package/lib/engine/engine_gizmos.js.map +1 -1
  40. package/lib/engine/engine_gltf_builtin_components.d.ts +2 -3
  41. package/lib/engine/engine_gltf_builtin_components.js +23 -6
  42. package/lib/engine/engine_gltf_builtin_components.js.map +1 -1
  43. package/lib/engine/engine_networking.d.ts +3 -1
  44. package/lib/engine/engine_networking.js +10 -8
  45. package/lib/engine/engine_networking.js.map +1 -1
  46. package/lib/engine/engine_networking_auto.d.ts +1 -0
  47. package/lib/engine/engine_networking_auto.js +42 -9
  48. package/lib/engine/engine_networking_auto.js.map +1 -1
  49. package/lib/engine/engine_patcher.d.ts +8 -0
  50. package/lib/engine/engine_patcher.js +98 -0
  51. package/lib/engine/engine_patcher.js.map +1 -0
  52. package/lib/engine/engine_physics.d.ts +34 -2
  53. package/lib/engine/engine_physics.js +110 -11
  54. package/lib/engine/engine_physics.js.map +1 -1
  55. package/lib/engine/engine_scenetools.js +0 -1
  56. package/lib/engine/engine_scenetools.js.map +1 -1
  57. package/lib/engine/engine_serialization_core.js +4 -0
  58. package/lib/engine/engine_serialization_core.js.map +1 -1
  59. package/lib/engine/engine_setup.d.ts +1 -1
  60. package/lib/engine/engine_setup.js +12 -5
  61. package/lib/engine/engine_setup.js.map +1 -1
  62. package/lib/engine/engine_texture.d.ts +6 -1
  63. package/lib/engine/engine_texture.js +39 -1
  64. package/lib/engine/engine_texture.js.map +1 -1
  65. package/lib/engine/engine_types.d.ts +4 -0
  66. package/lib/engine/engine_types.js.map +1 -1
  67. package/lib/engine/engine_utils.js +3 -2
  68. package/lib/engine/engine_utils.js.map +1 -1
  69. package/lib/engine/extensions/NEEDLE_progressive.d.ts +0 -1
  70. package/lib/engine/extensions/NEEDLE_progressive.js +24 -26
  71. package/lib/engine/extensions/NEEDLE_progressive.js.map +1 -1
  72. package/lib/engine/extensions/NEEDLE_render_objects.js +9 -0
  73. package/lib/engine/extensions/NEEDLE_render_objects.js.map +1 -1
  74. package/lib/engine/extensions/extensions.d.ts +4 -1
  75. package/lib/engine/extensions/extensions.js +16 -0
  76. package/lib/engine/extensions/extensions.js.map +1 -1
  77. package/lib/engine/extensions/usage_tracker.d.ts +12 -0
  78. package/lib/engine/extensions/usage_tracker.js +59 -0
  79. package/lib/engine/extensions/usage_tracker.js.map +1 -0
  80. package/lib/engine-components/Animator.js +0 -1
  81. package/lib/engine-components/Animator.js.map +1 -1
  82. package/lib/engine-components/AnimatorController.js +4 -0
  83. package/lib/engine-components/AnimatorController.js.map +1 -1
  84. package/lib/engine-components/AudioSource.js +2 -1
  85. package/lib/engine-components/AudioSource.js.map +1 -1
  86. package/lib/engine-components/Camera.d.ts +6 -0
  87. package/lib/engine-components/Camera.js +70 -31
  88. package/lib/engine-components/Camera.js.map +1 -1
  89. package/lib/engine-components/CharacterController.d.ts +1 -0
  90. package/lib/engine-components/CharacterController.js +14 -9
  91. package/lib/engine-components/CharacterController.js.map +1 -1
  92. package/lib/engine-components/Collider.js +14 -1
  93. package/lib/engine-components/Collider.js.map +1 -1
  94. package/lib/engine-components/Component.d.ts +52 -0
  95. package/lib/engine-components/Component.js +55 -14
  96. package/lib/engine-components/Component.js.map +1 -1
  97. package/lib/engine-components/Networking.js +19 -0
  98. package/lib/engine-components/Networking.js.map +1 -1
  99. package/lib/engine-components/OrbitControls.d.ts +2 -0
  100. package/lib/engine-components/OrbitControls.js +9 -0
  101. package/lib/engine-components/OrbitControls.js.map +1 -1
  102. package/lib/engine-components/ParticleSystem.d.ts +5 -1
  103. package/lib/engine-components/ParticleSystem.js +52 -7
  104. package/lib/engine-components/ParticleSystem.js.map +1 -1
  105. package/lib/engine-components/ParticleSystemModules.d.ts +2 -0
  106. package/lib/engine-components/ParticleSystemModules.js +26 -0
  107. package/lib/engine-components/ParticleSystemModules.js.map +1 -1
  108. package/lib/engine-components/ParticleSystemSubEmitter.js +5 -2
  109. package/lib/engine-components/ParticleSystemSubEmitter.js.map +1 -1
  110. package/lib/engine-components/ReflectionProbe.js +18 -6
  111. package/lib/engine-components/ReflectionProbe.js.map +1 -1
  112. package/lib/engine-components/Renderer.d.ts +1 -1
  113. package/lib/engine-components/Renderer.js +33 -11
  114. package/lib/engine-components/Renderer.js.map +1 -1
  115. package/lib/engine-components/ScreenCapture.js +3 -3
  116. package/lib/engine-components/ScreenCapture.js.map +1 -1
  117. package/lib/engine-components/Skybox.js +2 -0
  118. package/lib/engine-components/Skybox.js.map +1 -1
  119. package/lib/engine-components/SmoothFollow.js +1 -2
  120. package/lib/engine-components/SmoothFollow.js.map +1 -1
  121. package/lib/engine-components/SpectatorCamera.js +3 -3
  122. package/lib/engine-components/SpectatorCamera.js.map +1 -1
  123. package/lib/engine-components/SyncedCamera.js +1 -1
  124. package/lib/engine-components/SyncedCamera.js.map +1 -1
  125. package/lib/engine-components/SyncedTransform.js +2 -2
  126. package/lib/engine-components/SyncedTransform.js.map +1 -1
  127. package/lib/engine-components/TestRunner.js +1 -1
  128. package/lib/engine-components/TestRunner.js.map +1 -1
  129. package/lib/engine-components/WebARCameraBackground.d.ts +19 -0
  130. package/lib/engine-components/WebARCameraBackground.js +185 -0
  131. package/lib/engine-components/WebARCameraBackground.js.map +1 -0
  132. package/lib/engine-components/WebARSessionRoot.js +3 -2
  133. package/lib/engine-components/WebARSessionRoot.js.map +1 -1
  134. package/lib/engine-components/WebXR.d.ts +4 -0
  135. package/lib/engine-components/WebXR.js +11 -8
  136. package/lib/engine-components/WebXR.js.map +1 -1
  137. package/lib/engine-components/WebXRAvatar.js +1 -0
  138. package/lib/engine-components/WebXRAvatar.js.map +1 -1
  139. package/lib/engine-components/WebXRGrabRendering.js +2 -2
  140. package/lib/engine-components/WebXRGrabRendering.js.map +1 -1
  141. package/lib/engine-components/WebXRSync.js +2 -2
  142. package/lib/engine-components/WebXRSync.js.map +1 -1
  143. package/lib/engine-components/codegen/components.d.ts +14 -6
  144. package/lib/engine-components/codegen/components.js +14 -6
  145. package/lib/engine-components/codegen/components.js.map +1 -1
  146. package/lib/engine-components/js-extensions/Object3D.js +4 -1
  147. package/lib/engine-components/js-extensions/Object3D.js.map +1 -1
  148. package/lib/engine-components/postprocessing/Effects/Antialiasing.d.ts +13 -0
  149. package/lib/engine-components/postprocessing/Effects/Antialiasing.js +46 -0
  150. package/lib/engine-components/postprocessing/Effects/Antialiasing.js.map +1 -0
  151. package/lib/engine-components/postprocessing/Effects/Bloom.d.ts +12 -0
  152. package/lib/engine-components/postprocessing/Effects/Bloom.js +76 -0
  153. package/lib/engine-components/postprocessing/Effects/Bloom.js.map +1 -0
  154. package/lib/engine-components/postprocessing/Effects/ChromaticAberration.d.ts +8 -0
  155. package/lib/engine-components/postprocessing/Effects/ChromaticAberration.js +39 -0
  156. package/lib/engine-components/postprocessing/Effects/ChromaticAberration.js.map +1 -0
  157. package/lib/engine-components/postprocessing/Effects/ColorAdjustments.d.ts +12 -0
  158. package/lib/engine-components/postprocessing/Effects/ColorAdjustments.js +96 -0
  159. package/lib/engine-components/postprocessing/Effects/ColorAdjustments.js.map +1 -0
  160. package/lib/engine-components/postprocessing/Effects/DepthOfField.d.ts +21 -0
  161. package/lib/engine-components/postprocessing/Effects/DepthOfField.js +87 -0
  162. package/lib/engine-components/postprocessing/Effects/DepthOfField.js.map +1 -0
  163. package/lib/engine-components/postprocessing/Effects/Pixelation.d.ts +7 -0
  164. package/lib/engine-components/postprocessing/Effects/Pixelation.js +30 -0
  165. package/lib/engine-components/postprocessing/Effects/Pixelation.js.map +1 -0
  166. package/lib/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusion.d.ts +11 -0
  167. package/lib/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusion.js +70 -0
  168. package/lib/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusion.js.map +1 -0
  169. package/lib/engine-components/postprocessing/Effects/Tonemapping.d.ts +16 -0
  170. package/lib/engine-components/postprocessing/Effects/Tonemapping.js +52 -0
  171. package/lib/engine-components/postprocessing/Effects/Tonemapping.js.map +1 -0
  172. package/lib/engine-components/postprocessing/Effects/Vignette.d.ts +11 -0
  173. package/lib/engine-components/postprocessing/Effects/Vignette.js +57 -0
  174. package/lib/engine-components/postprocessing/Effects/Vignette.js.map +1 -0
  175. package/lib/engine-components/postprocessing/PostProcessingEffect.d.ts +29 -0
  176. package/lib/engine-components/postprocessing/PostProcessingEffect.js +89 -0
  177. package/lib/engine-components/postprocessing/PostProcessingEffect.js.map +1 -0
  178. package/lib/engine-components/postprocessing/PostProcessingHandler.d.ts +13 -0
  179. package/lib/engine-components/postprocessing/PostProcessingHandler.js +119 -0
  180. package/lib/engine-components/postprocessing/PostProcessingHandler.js.map +1 -0
  181. package/lib/engine-components/postprocessing/Volume.d.ts +23 -0
  182. package/lib/engine-components/postprocessing/Volume.js +176 -0
  183. package/lib/engine-components/postprocessing/Volume.js.map +1 -0
  184. package/lib/engine-components/postprocessing/VolumeParameter.d.ts +21 -0
  185. package/lib/engine-components/postprocessing/VolumeParameter.js +75 -0
  186. package/lib/engine-components/postprocessing/VolumeParameter.js.map +1 -0
  187. package/lib/engine-components/postprocessing/VolumeProfile.d.ts +7 -0
  188. package/lib/engine-components/postprocessing/VolumeProfile.js +42 -0
  189. package/lib/engine-components/postprocessing/VolumeProfile.js.map +1 -0
  190. package/lib/engine-components/timeline/TimelineTracks.js +14 -15
  191. package/lib/engine-components/timeline/TimelineTracks.js.map +1 -1
  192. package/lib/engine-components/ui/Text.js +28 -170
  193. package/lib/engine-components/ui/Text.js.map +1 -1
  194. package/lib/engine-components-experimental/networking/PlayerSync.d.ts +18 -0
  195. package/lib/engine-components-experimental/networking/PlayerSync.js +62 -8
  196. package/lib/engine-components-experimental/networking/PlayerSync.js.map +1 -1
  197. package/lib/include/three/ARButton.d.ts +1 -1
  198. package/lib/include/three/ARButton.js +11 -19
  199. package/lib/include/three/ARButton.js.map +1 -1
  200. package/lib/include/three/VRButton.js +1 -4
  201. package/lib/include/three/VRButton.js.map +1 -1
  202. package/package.json +3 -2
  203. package/plugins/vite/drop-client.js +77 -0
  204. package/plugins/vite/drop.js +81 -0
  205. package/plugins/vite/editor-connection.js +121 -0
  206. package/plugins/vite/index.js +9 -4
  207. package/plugins/vite/meta.js +3 -0
  208. package/plugins/vite/poster-client.js +6 -4
  209. package/src/engine/api.ts +30 -1
  210. package/src/engine/codegen/register_types.js +25 -9
  211. package/src/engine/debug/debug_overlay.ts +11 -2
  212. package/src/engine/engine_addressables.ts +4 -4
  213. package/src/engine/engine_assetdatabase.ts +291 -184
  214. package/src/engine/engine_components.ts +20 -1
  215. package/src/engine/engine_components_internal.ts +30 -0
  216. package/src/engine/engine_constants.ts +4 -1
  217. package/src/engine/engine_context_registry.ts +7 -0
  218. package/src/engine/engine_editor-sync.ts +21 -0
  219. package/src/engine/engine_element.ts +8 -1
  220. package/src/engine/engine_element_loading.ts +19 -15
  221. package/src/engine/engine_gameobject.ts +579 -583
  222. package/src/engine/engine_gizmos.ts +3 -2
  223. package/src/engine/engine_gltf_builtin_components.ts +30 -15
  224. package/src/engine/engine_networking.ts +10 -8
  225. package/src/engine/engine_networking_auto.ts +48 -11
  226. package/src/engine/engine_patcher.ts +113 -0
  227. package/src/engine/engine_physics.ts +128 -12
  228. package/src/engine/engine_scenetools.ts +0 -1
  229. package/src/engine/engine_serialization_core.ts +6 -0
  230. package/src/engine/engine_setup.ts +15 -5
  231. package/src/engine/engine_texture.ts +54 -5
  232. package/src/engine/engine_types.ts +6 -1
  233. package/src/engine/engine_utils.ts +6 -5
  234. package/src/engine/extensions/NEEDLE_progressive.ts +32 -32
  235. package/src/engine/extensions/NEEDLE_render_objects.ts +10 -1
  236. package/src/engine/extensions/extensions.ts +22 -1
  237. package/src/engine/extensions/usage_tracker.ts +91 -0
  238. package/src/engine-components/Animator.ts +0 -1
  239. package/src/engine-components/AnimatorController.ts +2 -0
  240. package/src/engine-components/AudioSource.ts +1 -1
  241. package/src/engine-components/Camera.ts +77 -37
  242. package/src/engine-components/CharacterController.ts +12 -9
  243. package/src/engine-components/Collider.ts +16 -2
  244. package/src/engine-components/Component.ts +74 -30
  245. package/src/engine-components/Networking.ts +9 -1
  246. package/src/engine-components/OrbitControls.ts +11 -2
  247. package/src/engine-components/ParticleSystem.ts +54 -10
  248. package/src/engine-components/ParticleSystemModules.ts +28 -1
  249. package/src/engine-components/ParticleSystemSubEmitter.ts +5 -3
  250. package/src/engine-components/ReflectionProbe.ts +17 -7
  251. package/src/engine-components/Renderer.ts +36 -16
  252. package/src/engine-components/ScreenCapture.ts +3 -3
  253. package/src/engine-components/Skybox.ts +2 -0
  254. package/src/engine-components/SmoothFollow.ts +4 -4
  255. package/src/engine-components/SpectatorCamera.ts +3 -3
  256. package/src/engine-components/SyncedCamera.ts +1 -1
  257. package/src/engine-components/SyncedTransform.ts +2 -2
  258. package/src/engine-components/TestRunner.ts +1 -1
  259. package/src/engine-components/WebARCameraBackground.ts +215 -0
  260. package/src/engine-components/WebARSessionRoot.ts +3 -2
  261. package/src/engine-components/WebXR.ts +12 -8
  262. package/src/engine-components/WebXRAvatar.ts +1 -1
  263. package/src/engine-components/WebXRGrabRendering.ts +2 -2
  264. package/src/engine-components/WebXRSync.ts +2 -2
  265. package/src/engine-components/codegen/components.ts +14 -6
  266. package/src/engine-components/js-extensions/Object3D.ts +6 -1
  267. package/src/engine-components/postprocessing/Effects/Antialiasing.ts +52 -0
  268. package/src/engine-components/postprocessing/Effects/Bloom.ts +75 -0
  269. package/src/engine-components/postprocessing/Effects/ChromaticAberration.ts +36 -0
  270. package/src/engine-components/postprocessing/Effects/ColorAdjustments.ts +114 -0
  271. package/src/engine-components/postprocessing/Effects/DepthOfField.ts +90 -0
  272. package/src/engine-components/postprocessing/Effects/Pixelation.ts +28 -0
  273. package/src/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusion.ts +71 -0
  274. package/src/engine-components/postprocessing/Effects/Tonemapping.ts +55 -0
  275. package/src/engine-components/postprocessing/Effects/Vignette.ts +55 -0
  276. package/src/engine-components/postprocessing/PostProcessingEffect.ts +112 -0
  277. package/src/engine-components/postprocessing/PostProcessingHandler.ts +148 -0
  278. package/src/engine-components/postprocessing/Volume.ts +194 -0
  279. package/src/engine-components/postprocessing/VolumeParameter.ts +85 -0
  280. package/src/engine-components/postprocessing/VolumeProfile.ts +40 -0
  281. package/src/engine-components/timeline/TimelineTracks.ts +16 -17
  282. package/src/engine-components/ui/Text.ts +37 -174
  283. package/src/engine-components-experimental/networking/PlayerSync.ts +69 -8
  284. package/src/include/three/ARButton.js +13 -24
  285. package/src/include/three/VRButton.js +1 -7
  286. package/lib/engine-components/Volume.d.ts +0 -34
  287. package/lib/engine-components/Volume.js +0 -140
  288. package/lib/engine-components/Volume.js.map +0 -1
  289. package/src/engine-components/Volume.ts +0 -141
@@ -1,5 +1,4 @@
1
1
 
2
-
3
2
  async function generatePoster() {
4
3
  const { screenshot } = await import("@needle-tools/engine/src/engine/engine_utils_screenshot");
5
4
 
@@ -7,12 +6,15 @@ async function generatePoster() {
7
6
  const needleEngine = document.querySelector("needle-engine");
8
7
  if (!needleEngine) return null;
9
8
 
10
- const width = 1920;
11
- const height = 1920;
9
+ // Keep in sync with og:image:width meta tags
10
+ // https://developers.facebook.com/docs/sharing/best-practices/
11
+ const width = 1080;
12
+ const height = 1080;
12
13
  const context = await needleEngine.getContext();
13
14
 
14
15
  // wait a fixed time for e.g. fonts to load
15
- await new Promise((resolve) => setTimeout(resolve, 200));
16
+ while(context.time.frameCount < 2)
17
+ await new Promise((resolve) => setTimeout(resolve, 200));
16
18
 
17
19
  const mimeType = "image/webp";
18
20
  console.log("Generating poster...");
package/src/engine/api.ts CHANGED
@@ -1,4 +1,7 @@
1
+
1
2
  export { TypeStore } from "./engine_typestore";
3
+ export * from "./engine_context_registry";
4
+ export * from "./extensions/extensions"
2
5
  export { InstancingUtil } from "./engine_instancing";
3
6
  export * from "./engine_gameobject";
4
7
  export * from "./engine_components"
@@ -9,4 +12,30 @@ export { validate } from "./engine_util_decorator"
9
12
  export { Gizmos } from "./engine_gizmos"
10
13
  export * from "./engine_scenetools";
11
14
  export * from "./engine_math"
12
- export * from "./js-extensions"
15
+ export * from "./js-extensions"
16
+
17
+
18
+ export {
19
+ // url params
20
+ getParam,
21
+ setParamWithoutReload,
22
+ setParam,
23
+ setOrAddParamsToUrl,
24
+
25
+ // timing
26
+ delay,
27
+
28
+ // device checks
29
+ isMobileDevice,
30
+ isMozillaXR,
31
+ isiOS,
32
+ isSafari,
33
+ isQuest,
34
+ } from "./engine_utils";
35
+
36
+ export {
37
+ setUsageTrackingEnabled,
38
+ isUsageTrackingEnabled,
39
+ findUsers,
40
+ getUserCount
41
+ } from "./engine_assetdatabase"
@@ -1,5 +1,5 @@
1
1
  import { TypeStore } from "./../engine_typestore"
2
-
2
+
3
3
  // Import types
4
4
  import { __Ignore } from "../../engine-components/codegen/components";
5
5
  import { AlignmentConstraint } from "../../engine-components/AlignmentConstraint";
@@ -9,6 +9,7 @@ import { AnimationExtension } from "../../engine-components/export/usdz/extensio
9
9
  import { AnimationTrackHandler } from "../../engine-components/timeline/TimelineTracks";
10
10
  import { Animator } from "../../engine-components/Animator";
11
11
  import { AnimatorController } from "../../engine-components/AnimatorController";
12
+ import { Antialiasing } from "../../engine-components/postprocessing/Effects/Antialiasing";
12
13
  import { AttachedObject } from "../../engine-components/WebXRController";
13
14
  import { AudioListener } from "../../engine-components/AudioListener";
14
15
  import { AudioSource } from "../../engine-components/AudioSource";
@@ -25,6 +26,7 @@ import { AvatarModel } from "../../engine-components/AvatarLoader";
25
26
  import { AxesHelper } from "../../engine-components/AxesHelper";
26
27
  import { BaseUIComponent } from "../../engine-components/ui/BaseUIComponent";
27
28
  import { BasicIKConstraint } from "../../engine-components/BasicIKConstraint";
29
+ import { Bloom } from "../../engine-components/postprocessing/Effects/Bloom";
28
30
  import { BoxCollider } from "../../engine-components/Collider";
29
31
  import { BoxGizmo } from "../../engine-components/Gizmos";
30
32
  import { BoxHelperComponent } from "../../engine-components/BoxHelperComponent";
@@ -36,13 +38,15 @@ import { CanvasGroup } from "../../engine-components/ui/CanvasGroup";
36
38
  import { CapsuleCollider } from "../../engine-components/Collider";
37
39
  import { CharacterController } from "../../engine-components/CharacterController";
38
40
  import { CharacterControllerInput } from "../../engine-components/CharacterController";
41
+ import { ChromaticAberration } from "../../engine-components/postprocessing/Effects/ChromaticAberration";
39
42
  import { Collider } from "../../engine-components/Collider";
40
- import { ColorAdjustments } from "../../engine-components/Volume";
43
+ import { ColorAdjustments } from "../../engine-components/postprocessing/Effects/ColorAdjustments";
41
44
  import { ColorBySpeedModule } from "../../engine-components/ParticleSystemModules";
42
45
  import { ColorOverLifetimeModule } from "../../engine-components/ParticleSystemModules";
43
46
  import { ControlTrackHandler } from "../../engine-components/timeline/TimelineTracks";
44
47
  import { Deletable } from "../../engine-components/DeleteBox";
45
48
  import { DeleteBox } from "../../engine-components/DeleteBox";
49
+ import { DepthOfField } from "../../engine-components/postprocessing/Effects/DepthOfField";
46
50
  import { DeviceFlag } from "../../engine-components/DeviceFlag";
47
51
  import { DragControls } from "../../engine-components/DragControls";
48
52
  import { DropListener } from "../../engine-components/DropListener";
@@ -94,11 +98,13 @@ import { ParticleBurst } from "../../engine-components/ParticleSystemModules";
94
98
  import { ParticleSubEmitter } from "../../engine-components/ParticleSystemSubEmitter";
95
99
  import { ParticleSystem } from "../../engine-components/ParticleSystem";
96
100
  import { ParticleSystemRenderer } from "../../engine-components/ParticleSystem";
101
+ import { PixelationEffect } from "../../engine-components/postprocessing/Effects/Pixelation";
97
102
  import { PlayableDirector } from "../../engine-components/timeline/PlayableDirector";
98
103
  import { PlayerColor } from "../../engine-components/PlayerColor";
99
104
  import { PlayerState } from "../../engine-components-experimental/networking/PlayerSync";
100
105
  import { PlayerSync } from "../../engine-components-experimental/networking/PlayerSync";
101
106
  import { PointerEventData } from "../../engine-components/ui/PointerEvents";
107
+ import { PostProcessingHandler } from "../../engine-components/postprocessing/PostProcessingHandler";
102
108
  import { PresentationMode } from "../../engine-components-experimental/Presentation";
103
109
  import { RawImage } from "../../engine-components/ui/Image";
104
110
  import { Raycaster } from "../../engine-components/ui/Raycaster";
@@ -114,6 +120,7 @@ import { Rigidbody } from "../../engine-components/RigidBody";
114
120
  import { RotationBySpeedModule } from "../../engine-components/ParticleSystemModules";
115
121
  import { RotationOverLifetimeModule } from "../../engine-components/ParticleSystemModules";
116
122
  import { ScreenCapture } from "../../engine-components/ScreenCapture";
123
+ import { ScreenSpaceAmbientOcclusion } from "../../engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusion";
117
124
  import { ShadowCatcher } from "../../engine-components/ShadowCatcher";
118
125
  import { ShapeModule } from "../../engine-components/ParticleSystemModules";
119
126
  import { SignalAsset } from "../../engine-components/timeline/SignalAsset";
@@ -142,7 +149,7 @@ import { TestRunner } from "../../engine-components/TestRunner";
142
149
  import { TestSimulateUserData } from "../../engine-components/TestRunner";
143
150
  import { Text } from "../../engine-components/ui/Text";
144
151
  import { TextureSheetAnimationModule } from "../../engine-components/ParticleSystemModules";
145
- import { ToneMapping } from "../../engine-components/Volume";
152
+ import { ToneMapping } from "../../engine-components/postprocessing/Effects/Tonemapping";
146
153
  import { TrailModule } from "../../engine-components/ParticleSystemModules";
147
154
  import { TransformData } from "../../engine-components/export/usdz/extensions/Animation";
148
155
  import { TransformGizmo } from "../../engine-components/TransformGizmo";
@@ -153,13 +160,14 @@ import { USDZExporter } from "../../engine-components/export/usdz/USDZExporter";
153
160
  import { VelocityOverLifetimeModule } from "../../engine-components/ParticleSystemModules";
154
161
  import { VerticalLayoutGroup } from "../../engine-components/ui/Layout";
155
162
  import { VideoPlayer } from "../../engine-components/VideoPlayer";
163
+ import { Vignette } from "../../engine-components/postprocessing/Effects/Vignette";
156
164
  import { Voip } from "../../engine-components/Voip";
157
- import { Volume } from "../../engine-components/Volume";
158
- import { VolumeComponent } from "../../engine-components/Volume";
159
- import { VolumeParameter } from "../../engine-components/Volume";
160
- import { VolumeProfile } from "../../engine-components/Volume";
165
+ import { Volume } from "../../engine-components/postprocessing/Volume";
166
+ import { VolumeParameter } from "../../engine-components/postprocessing/VolumeParameter";
167
+ import { VolumeProfile } from "../../engine-components/postprocessing/VolumeProfile";
161
168
  import { VRUserState } from "../../engine-components/WebXRSync";
162
169
  import { WebAR } from "../../engine-components/WebXR";
170
+ import { WebARCameraBackground } from "../../engine-components/WebARCameraBackground";
163
171
  import { WebARSessionRoot } from "../../engine-components/WebARSessionRoot";
164
172
  import { WebXR } from "../../engine-components/WebXR";
165
173
  import { WebXRAvatar } from "../../engine-components/WebXRAvatar";
@@ -170,7 +178,7 @@ import { XRGrabModel } from "../../engine-components/WebXRGrabRendering";
170
178
  import { XRGrabRendering } from "../../engine-components/WebXRGrabRendering";
171
179
  import { XRRig } from "../../engine-components/WebXRRig";
172
180
  import { XRState } from "../../engine-components/XRFlag";
173
-
181
+
174
182
  // Register types
175
183
  TypeStore.add("__Ignore", __Ignore);
176
184
  TypeStore.add("AlignmentConstraint", AlignmentConstraint);
@@ -180,6 +188,7 @@ TypeStore.add("AnimationExtension", AnimationExtension);
180
188
  TypeStore.add("AnimationTrackHandler", AnimationTrackHandler);
181
189
  TypeStore.add("Animator", Animator);
182
190
  TypeStore.add("AnimatorController", AnimatorController);
191
+ TypeStore.add("Antialiasing", Antialiasing);
183
192
  TypeStore.add("AttachedObject", AttachedObject);
184
193
  TypeStore.add("AudioListener", AudioListener);
185
194
  TypeStore.add("AudioSource", AudioSource);
@@ -196,6 +205,7 @@ TypeStore.add("AvatarModel", AvatarModel);
196
205
  TypeStore.add("AxesHelper", AxesHelper);
197
206
  TypeStore.add("BaseUIComponent", BaseUIComponent);
198
207
  TypeStore.add("BasicIKConstraint", BasicIKConstraint);
208
+ TypeStore.add("Bloom", Bloom);
199
209
  TypeStore.add("BoxCollider", BoxCollider);
200
210
  TypeStore.add("BoxGizmo", BoxGizmo);
201
211
  TypeStore.add("BoxHelperComponent", BoxHelperComponent);
@@ -207,6 +217,7 @@ TypeStore.add("CanvasGroup", CanvasGroup);
207
217
  TypeStore.add("CapsuleCollider", CapsuleCollider);
208
218
  TypeStore.add("CharacterController", CharacterController);
209
219
  TypeStore.add("CharacterControllerInput", CharacterControllerInput);
220
+ TypeStore.add("ChromaticAberration", ChromaticAberration);
210
221
  TypeStore.add("Collider", Collider);
211
222
  TypeStore.add("ColorAdjustments", ColorAdjustments);
212
223
  TypeStore.add("ColorBySpeedModule", ColorBySpeedModule);
@@ -214,6 +225,7 @@ TypeStore.add("ColorOverLifetimeModule", ColorOverLifetimeModule);
214
225
  TypeStore.add("ControlTrackHandler", ControlTrackHandler);
215
226
  TypeStore.add("Deletable", Deletable);
216
227
  TypeStore.add("DeleteBox", DeleteBox);
228
+ TypeStore.add("DepthOfField", DepthOfField);
217
229
  TypeStore.add("DeviceFlag", DeviceFlag);
218
230
  TypeStore.add("DragControls", DragControls);
219
231
  TypeStore.add("DropListener", DropListener);
@@ -265,11 +277,13 @@ TypeStore.add("ParticleBurst", ParticleBurst);
265
277
  TypeStore.add("ParticleSubEmitter", ParticleSubEmitter);
266
278
  TypeStore.add("ParticleSystem", ParticleSystem);
267
279
  TypeStore.add("ParticleSystemRenderer", ParticleSystemRenderer);
280
+ TypeStore.add("PixelationEffect", PixelationEffect);
268
281
  TypeStore.add("PlayableDirector", PlayableDirector);
269
282
  TypeStore.add("PlayerColor", PlayerColor);
270
283
  TypeStore.add("PlayerState", PlayerState);
271
284
  TypeStore.add("PlayerSync", PlayerSync);
272
285
  TypeStore.add("PointerEventData", PointerEventData);
286
+ TypeStore.add("PostProcessingHandler", PostProcessingHandler);
273
287
  TypeStore.add("PresentationMode", PresentationMode);
274
288
  TypeStore.add("RawImage", RawImage);
275
289
  TypeStore.add("Raycaster", Raycaster);
@@ -285,6 +299,7 @@ TypeStore.add("Rigidbody", Rigidbody);
285
299
  TypeStore.add("RotationBySpeedModule", RotationBySpeedModule);
286
300
  TypeStore.add("RotationOverLifetimeModule", RotationOverLifetimeModule);
287
301
  TypeStore.add("ScreenCapture", ScreenCapture);
302
+ TypeStore.add("ScreenSpaceAmbientOcclusion", ScreenSpaceAmbientOcclusion);
288
303
  TypeStore.add("ShadowCatcher", ShadowCatcher);
289
304
  TypeStore.add("ShapeModule", ShapeModule);
290
305
  TypeStore.add("SignalAsset", SignalAsset);
@@ -324,13 +339,14 @@ TypeStore.add("USDZExporter", USDZExporter);
324
339
  TypeStore.add("VelocityOverLifetimeModule", VelocityOverLifetimeModule);
325
340
  TypeStore.add("VerticalLayoutGroup", VerticalLayoutGroup);
326
341
  TypeStore.add("VideoPlayer", VideoPlayer);
342
+ TypeStore.add("Vignette", Vignette);
327
343
  TypeStore.add("Voip", Voip);
328
344
  TypeStore.add("Volume", Volume);
329
- TypeStore.add("VolumeComponent", VolumeComponent);
330
345
  TypeStore.add("VolumeParameter", VolumeParameter);
331
346
  TypeStore.add("VolumeProfile", VolumeProfile);
332
347
  TypeStore.add("VRUserState", VRUserState);
333
348
  TypeStore.add("WebAR", WebAR);
349
+ TypeStore.add("WebARCameraBackground", WebARCameraBackground);
334
350
  TypeStore.add("WebARSessionRoot", WebARSessionRoot);
335
351
  TypeStore.add("WebXR", WebXR);
336
352
  TypeStore.add("WebXRAvatar", WebXRAvatar);
@@ -36,12 +36,21 @@ export function makeErrorsVisibleForDevelopment() {
36
36
  };
37
37
  window.addEventListener("error", (event) => {
38
38
  if (!event) return;
39
- addLog(LogType.Error, event.error, event.filename, event.lineno);
39
+ let message = event.error;
40
+ if (message === undefined) {
41
+ if (isLocalNetwork())
42
+ console.warn("Received unknown error", event, event.target);
43
+ return;
44
+ }
45
+ addLog(LogType.Error, message, event.filename, event.lineno);
40
46
  onReceivedError();
41
47
  }, true);
42
48
  window.addEventListener("unhandledrejection", (event) => {
43
49
  if (!event) return;
44
- addLog(LogType.Error, event.reason.message, event.reason.stack);
50
+ if (event.reason)
51
+ addLog(LogType.Error, event.reason.message, event.reason.stack);
52
+ else
53
+ addLog(LogType.Error, "unhandled rejection");
45
54
  onReceivedError();
46
55
  });
47
56
  }
@@ -121,8 +121,8 @@ export class AssetReference {
121
121
  if (debug) console.log("Unload", this.asset);
122
122
  // TODO: we need a way to remove objects from the context (including components) without actually "destroying" them
123
123
  if (this.asset.scene)
124
- destroy(this.asset.scene, true);
125
- else destroy(this.asset, true);
124
+ destroy(this.asset.scene, true, true);
125
+ else destroy(this.asset, true, true);
126
126
  }
127
127
  this.asset = null;
128
128
  this._rawBinary = undefined;
@@ -237,8 +237,8 @@ export class AssetReference {
237
237
  }
238
238
 
239
239
  let count = AssetReference.currentlyInstantiating.get(this.uri);
240
- // allow up to 100 instantiations of the same prefab in the same frame
241
- if (count !== undefined && count >= 100) {
240
+ // allow up to 10000 instantiations of the same prefab in the same frame
241
+ if (count !== undefined && count >= 10000) {
242
242
  console.error("Recursive or too many instantiations of " + this.uri + " in the same frame (" + count + ")");
243
243
  return null;
244
244
  }