@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
@@ -90,6 +90,8 @@ class SharedMaterialArray implements ISharedMaterials {
90
90
  if (!target) continue;
91
91
  const mat = target.material as Material;
92
92
  if (!mat) continue;
93
+ // set the shadow side to the same as the side of the material, three flips this for some reason
94
+ mat.shadowSide = mat.side;
93
95
  for (let k = 0; k < originalMaterials.length; k++) {
94
96
  const orig = originalMaterials[k];
95
97
  if (!orig) {
@@ -110,7 +112,7 @@ class SharedMaterialArray implements ISharedMaterials {
110
112
  this._indexMap = indexMap;
111
113
  const warningMessage = `Renderer ${renderer.name} was initialized with missing materials - this may lead to unexpected behaviour when trying to access sharedMaterials by index.`;
112
114
  console.warn(warningMessage);
113
- if(isLocalNetwork()) showBalloonWarning("Found renderer with missing materials: please check the console for details.");
115
+ if (isLocalNetwork()) showBalloonWarning("Found renderer with missing materials: please check the console for details.");
114
116
  }
115
117
 
116
118
  // this lets us override the javascript indexer, only works in ES6 tho
@@ -243,18 +245,37 @@ export class Renderer extends Behaviour implements IRenderer {
243
245
  }
244
246
 
245
247
  private _sharedMaterials!: SharedMaterialArray;
246
- private _originalMaterials: Material[] = [];
248
+ private _originalMaterials?: Material[];
247
249
 
248
250
  // this is just available during deserialization
249
251
  private set sharedMaterials(_val: Array<Material | null>) {
250
252
  // TODO: elements in the array might be missing at the moment which leads to problems if an index is serialized
251
- this._originalMaterials = _val as Material[];
253
+ if (!this._originalMaterials) {
254
+ this._originalMaterials = _val as Material[];
255
+ }
256
+ else if (_val) {
257
+ let didWarn = false;
258
+ for (let i = 0; i < this._sharedMaterials.length; i++) {
259
+ const mat = i < _val.length ? _val[i] : null;
260
+ if (mat && mat instanceof Material) {
261
+ this.sharedMaterials[i] = mat as Material;
262
+ }
263
+ else {
264
+ if (!didWarn) {
265
+ didWarn = true;
266
+ console.warn("Can not assign null as material: " + this.name, mat);
267
+ }
268
+ }
269
+ }
270
+ }
252
271
  }
253
272
 
254
273
  //@ts-ignore
255
274
  get sharedMaterials(): SharedMaterialArray {
256
- if (!this._sharedMaterials || !this._sharedMaterials.is(this))
275
+ if (!this._sharedMaterials || !this._sharedMaterials.is(this)) {
276
+ if (!this._originalMaterials) this._originalMaterials = [];
257
277
  this._sharedMaterials = new SharedMaterialArray(this, this._originalMaterials);
278
+ }
258
279
  return this._sharedMaterials!;
259
280
  }
260
281
 
@@ -503,7 +524,7 @@ export class Renderer extends Behaviour implements IRenderer {
503
524
  // console.log(this.name, this.gameObject.matrixWorldNeedsUpdate);
504
525
  const needsUpdate: boolean = this.gameObject[NEED_UPDATE_INSTANCE_KEY] === true;// || this.gameObject.matrixWorldNeedsUpdate;
505
526
  if (needsUpdate) {
506
- if(debugInstancing)
527
+ if (debugInstancing)
507
528
  console.log("UPDATE INSTANCED MATRICES", this.context.time.frame);
508
529
  this.gameObject[NEED_UPDATE_INSTANCE_KEY] = false;
509
530
  const remove = false;// Math.random() < .01;
@@ -607,8 +628,6 @@ export class Renderer extends Behaviour implements IRenderer {
607
628
  loadProgressiveTextures(material: THREE.Material) {
608
629
  // progressive load before rendering so we only load textures for visible materials
609
630
  if (!suppressProgressiveLoading && material) {
610
- if (debugProgressiveLoading && material["_didRequestTextureLOD"] === undefined)
611
- console.warn("Progressive?", this)
612
631
 
613
632
  if (material["_didRequestTextureLOD"] === undefined && this.allowProgressiveLoading) {
614
633
  material["_didRequestTextureLOD"] = 0;
@@ -712,7 +731,7 @@ class InstancingHandler {
712
731
 
713
732
  public objs: InstancedMeshRenderer[] = [];
714
733
 
715
- public setup(renderer:Renderer, obj: THREE.Object3D, context: Context, handlesArray: InstanceHandle[] | null, args: InstancingSetupArgs, level: number = 0)
734
+ public setup(renderer: Renderer, obj: THREE.Object3D, context: Context, handlesArray: InstanceHandle[] | null, args: InstancingSetupArgs, level: number = 0)
716
735
  : InstanceHandle[] | null {
717
736
 
718
737
  const res = this.tryCreateOrAddInstance(obj, context, args);
@@ -729,6 +748,14 @@ class InstancingHandler {
729
748
  handlesArray = this.setup(renderer, ch, context, handlesArray, args, nextLevel);
730
749
  }
731
750
  }
751
+
752
+ if (level === 0) {
753
+ // For multi material objects we only want to track the root object's matrix
754
+ if (args.useMatrixWorldAutoUpdate && handlesArray && handlesArray.length >= 0) {
755
+ this.autoUpdateInstanceMatrix(obj);
756
+ }
757
+ }
758
+
732
759
  return handlesArray;
733
760
  }
734
761
 
@@ -755,8 +782,6 @@ class InstancingHandler {
755
782
  if (i.isFull()) continue;
756
783
  if (i.geo === geo && i.material === mat) {
757
784
  const handle = i.addInstance(mesh);
758
- if (args.useMatrixWorldAutoUpdate && handle)
759
- this.autoUpdateInstanceMatrix(mesh, i, handle);
760
785
  return handle;
761
786
  }
762
787
  }
@@ -764,17 +789,14 @@ class InstancingHandler {
764
789
  const i = new InstancedMeshRenderer(obj.name, geo, mat, 200, context);
765
790
  this.objs.push(i);
766
791
  const handle = i.addInstance(mesh);
767
- if (args.useMatrixWorldAutoUpdate && handle)
768
- this.autoUpdateInstanceMatrix(mesh, i, handle);
769
792
  return handle;
770
793
  }
771
794
  return null;
772
795
  }
773
796
 
774
- private autoUpdateInstanceMatrix(obj: Object3D, _renderer: InstancedMeshRenderer, _handle: InstanceHandle) {
797
+ private autoUpdateInstanceMatrix(obj: Object3D) {
775
798
  const original = obj.matrixWorld["multiplyMatrices"].bind(obj.matrixWorld);
776
799
  let previousMatrix: THREE.Matrix4 = obj.matrixWorld.clone();
777
-
778
800
  const matrixChangeWrapper = (a: Matrix4, b: Matrix4) => {
779
801
  const newMatrixWorld = original(a, b);
780
802
  // console.warn("MULT", obj.matrixWorldNeedsUpdate);
@@ -786,7 +808,6 @@ class InstancingHandler {
786
808
  return newMatrixWorld;
787
809
  };
788
810
  obj.matrixWorld["multiplyMatrices"] = matrixChangeWrapper;
789
-
790
811
  // wrap matrixWorldNeedsUpdate
791
812
  // let originalMatrixWorldNeedsUpdate = obj.matrixWorldNeedsUpdate;
792
813
  // Object.defineProperty(obj, "matrixWorldNeedsUpdate", {
@@ -798,7 +819,6 @@ class InstancingHandler {
798
819
  // originalMatrixWorldNeedsUpdate = value;
799
820
  // }
800
821
  // });
801
-
802
822
  }
803
823
  }
804
824
  const instancing: InstancingHandler = new InstancingHandler();
@@ -409,9 +409,9 @@ class PeerHandle extends EventDispatcher {
409
409
  disable() {
410
410
  if (!this._enabled) return;
411
411
  this._enabled = false;
412
- this.context.connection.stopListening(RoomEvents.JoinedRoom, this.onConnectRoomFn);
413
- this.context.connection.stopListening(RoomEvents.UserJoinedRoom, this.onUserJoinedOrLeftRoomFn);
414
- this.context.connection.stopListening(RoomEvents.UserLeftRoom, this.onUserJoinedOrLeftRoomFn);
412
+ this.context.connection.stopListen(RoomEvents.JoinedRoom, this.onConnectRoomFn);
413
+ this.context.connection.stopListen(RoomEvents.UserJoinedRoom, this.onUserJoinedOrLeftRoomFn);
414
+ this.context.connection.stopListen(RoomEvents.UserLeftRoom, this.onUserJoinedOrLeftRoomFn);
415
415
  this.unsubscribePeerEvents();
416
416
  }
417
417
 
@@ -43,6 +43,8 @@ export class RemoteSkybox extends Behaviour {
43
43
  this._prevLoadedEnvironment = undefined;
44
44
  }
45
45
  this.unregisterDropEvents();
46
+ // Re-apply the skybox/background settings of the main camera
47
+ this.context.mainCameraComponent?.applyClearFlags();
46
48
  }
47
49
 
48
50
  async setSkybox(url: string | undefined | null) {
@@ -20,15 +20,11 @@ export class SmoothFollow extends Behaviour {
20
20
  @serializable()
21
21
  positionAxes : Axes = Axes.All;
22
22
 
23
- // @serializable()
24
- // rotationAxes : Axes = Axes.All;
25
-
26
23
  flipForward: boolean = false;
27
24
 
28
25
  private static _invertForward: THREE.Quaternion = new THREE.Quaternion().setFromAxisAngle(new THREE.Vector3(0, 1, 0), Math.PI);
29
26
  private _firstUpdate = true;
30
27
 
31
-
32
28
  onBeforeRender(): void {
33
29
  this.updateNow(false);
34
30
  }
@@ -39,9 +35,13 @@ export class SmoothFollow extends Behaviour {
39
35
  const wp = getWorldPosition(this.target);
40
36
  const fpos = this._firstUpdate || hard ? 1 : Mathf.clamp01(this.context.time.deltaTime * this.followFactor);
41
37
  const currentPosition = this.worldPosition;
38
+
42
39
  if(this.positionAxes & Axes.X) currentPosition.x = Mathf.lerp(currentPosition.x, wp.x, fpos);
43
40
  if(this.positionAxes & Axes.Y) currentPosition.y = Mathf.lerp(currentPosition.y, wp.y, fpos);
44
41
  if(this.positionAxes & Axes.Z) currentPosition.z = Mathf.lerp(currentPosition.z, wp.z, fpos);
42
+
43
+ // TODO lerp distance from target as well
44
+
45
45
  this.worldPosition = currentPosition;
46
46
  }
47
47
  if (this.rotateFactor > 0) {
@@ -562,9 +562,9 @@ class SpectatorCamNetworking {
562
562
  }
563
563
 
564
564
  destroy() {
565
- this.context.connection.stopListening("spectator-follower-changed", this._followerEventMethod);
566
- this.context.connection.stopListening("spectator-request-follow", this._requestFollowMethod);
567
- this.context.connection.stopListening(RoomEvents.JoinedRoom, this._joinedRoomMethod);
565
+ this.context.connection.stopListen("spectator-follower-changed", this._followerEventMethod);
566
+ this.context.connection.stopListen("spectator-request-follow", this._requestFollowMethod);
567
+ this.context.connection.stopListen(RoomEvents.JoinedRoom, this._joinedRoomMethod);
568
568
  }
569
569
 
570
570
  onSpectatedObjectChanged(target: PlayerView | undefined, _prevId?: string) {
@@ -102,7 +102,7 @@ export class SyncedCamera extends Behaviour {
102
102
  }
103
103
 
104
104
  onEnable(): void {
105
- this._receiveCallback = this.context.connection.beginListenBinrary(SyncedCameraModelIdentifier, this.onReceivedRemoteCameraInfoBin.bind(this));
105
+ this._receiveCallback = this.context.connection.beginListenBinary(SyncedCameraModelIdentifier, this.onReceivedRemoteCameraInfoBin.bind(this));
106
106
  }
107
107
 
108
108
  onDisable(): void {
@@ -105,7 +105,7 @@ export class SyncedTransform extends Behaviour {
105
105
  this.joinedRoomCallback = this.tryGetLastState.bind(this);
106
106
  this.context.connection.beginListen(RoomEvents.JoinedRoom, this.joinedRoomCallback);
107
107
  this.receivedDataCallback = this.onReceivedData.bind(this);
108
- this.context.connection.beginListenBinrary(SyncedTransformIdentifier, this.receivedDataCallback);
108
+ this.context.connection.beginListenBinary(SyncedTransformIdentifier, this.receivedDataCallback);
109
109
  }
110
110
 
111
111
  onDestroy(): void {
@@ -113,7 +113,7 @@ export class SyncedTransform extends Behaviour {
113
113
  if (this.syncDestroy)
114
114
  sendDestroyed(this.guid, this.context.connection);
115
115
  this._model = null;
116
- this.context.connection.stopListening(RoomEvents.JoinedRoom, this.joinedRoomCallback);
116
+ this.context.connection.stopListen(RoomEvents.JoinedRoom, this.joinedRoomCallback);
117
117
  this.context.connection.stopListenBinary(SyncedTransformIdentifier, this.receivedDataCallback);
118
118
  }
119
119
 
@@ -21,7 +21,7 @@ export class TestSimulateUserData extends Behaviour {
21
21
 
22
22
  awake(): void {
23
23
  if (this.useFlatbuffers) {
24
- this.context.connection.beginListenBinrary(SyncedTransformIdentifier, (_mod: SyncedTransformModel) => {
24
+ this.context.connection.beginListenBinary(SyncedTransformIdentifier, (_mod: SyncedTransformModel) => {
25
25
  // console.log("Received transform");
26
26
  // const sc = SyncedTransformModel.getRootAsSyncedTransformModel(bin);
27
27
  // console.log(mod.guid());
@@ -0,0 +1,215 @@
1
+ import { Behaviour } from "./Component";
2
+ import { serializable } from "../engine/engine_serialization_decorator";
3
+ import { RGBAColor } from "../engine-components/js-extensions/RGBAColor"
4
+ import { WebXR } from "../engine-components/WebXR";
5
+ import {
6
+ Camera as ThreeCamera,
7
+ Scene,
8
+ Texture,
9
+ Mesh, MeshBasicMaterial,
10
+ UniformsUtils,
11
+ PlaneGeometry,
12
+ ShaderLib,
13
+ ShaderMaterial,
14
+ DoubleSide
15
+ } from "three";
16
+
17
+ export class WebARCameraBackground extends Behaviour {
18
+
19
+ awake(): void {
20
+ WebXR.OptionalFeatures_AR.push('camera-access');
21
+ }
22
+
23
+ @serializable()
24
+ public backgroundTint: RGBAColor = new RGBAColor(1,1,1,1);
25
+
26
+ public get background() {
27
+ return this.backgroundPlane;
28
+ }
29
+
30
+ private _preRender;
31
+
32
+ onEnable(): void {
33
+ this._preRender = this.preRender.bind(this);
34
+ this.context.pre_render_callbacks.push(this._preRender);
35
+
36
+ if (this.backgroundPlane) {
37
+ this.gameObject.add(this.backgroundPlane);
38
+ this.backgroundPlane.visible = false;
39
+ }
40
+ }
41
+
42
+ onDisable(): void {
43
+ this.context.pre_render_callbacks = this.context.pre_render_callbacks.filter(cb => cb !== this._preRender);
44
+
45
+ if (this.backgroundPlane)
46
+ this.gameObject.remove(this.backgroundPlane);
47
+ }
48
+
49
+ private backgroundPlane?: Mesh;
50
+ private threeTexture?: Texture;
51
+ private forceTextureInitialization = function() {
52
+ const material = new MeshBasicMaterial();
53
+ const geometry = new PlaneGeometry();
54
+ const scene = new Scene();
55
+ scene.add(new Mesh(geometry, material));
56
+ const camera = new ThreeCamera();
57
+
58
+ return function forceTextureInitialization(renderer, texture) {
59
+ material.map = texture;
60
+ renderer.render(scene, camera);
61
+ };
62
+ }();
63
+
64
+ // TODO should only attach on session start, and detach on session end
65
+ private preRender() {
66
+ if (!this || !this.gameObject) return;
67
+
68
+ const xr = this.context.renderer.xr;
69
+ const frame = xr.getFrame();
70
+
71
+ if (frame) {
72
+
73
+ // We're generating a new texture here, and force three to initialize it
74
+ // from https://stackoverflow.com/a/55084367 to inject a custom texture into three.js
75
+ if (!this.threeTexture && this.context.renderer) {
76
+ this.threeTexture = new Texture();
77
+ // this.threeTexture.encoding = LinearEncoding;
78
+ this.forceTextureInitialization(this.context.renderer, this.threeTexture);
79
+ }
80
+
81
+ // simple mesh and fullscreen shader to display the camera texture
82
+ // from three: WebGLBackground
83
+ if (this.backgroundPlane === undefined) {
84
+ this.backgroundPlane = makeFullscreenPlane(this.backgroundTint);
85
+ this.gameObject.add(this.backgroundPlane);
86
+ }
87
+
88
+ // WebXR Raw Camera Access -
89
+ // we composite the camera texture into the scene background by rendering it first.
90
+ this.updateFromFrame(frame);
91
+ }
92
+
93
+ /*
94
+ if (this.planeMesh) {
95
+ this.planeMesh.visible = frame != null;
96
+ }
97
+ */
98
+ }
99
+
100
+ onBeforeRender(frame: XRFrame | null) {
101
+ this.updateFromFrame(frame);
102
+ }
103
+
104
+ updateFromFrame(frame: XRFrame | null) {
105
+ if (!frame) return;
106
+
107
+ // https://chromium.googlesource.com/chromium/src/+/7c5ac3c0f95b97cf12be95a5c1c0a8ff163246d8/third_party/webxr_test_pages/webxr-samples/proposals/camera-access-barebones.html
108
+ const pose = frame.getViewerPose(this.context.renderer.xr.getReferenceSpace()!);
109
+ if (pose) {
110
+ for( const view of pose.views) {
111
+ // @ts-ignore
112
+ if ('camera' in view && view.camera) {
113
+ const xrManager = this.context.renderer.xr;
114
+ let binding = xrManager.getBinding();
115
+ // not sure how / why this can be null, but we can recreate it here
116
+ if (!binding) binding = new XRWebGLBinding( frame.session, this.context.renderer.getContext() );
117
+
118
+ if (binding) {
119
+ let glImage: WebGLTexture | null = null;
120
+ if ('getCameraImage' in binding) {
121
+ // @ts-ignore
122
+ glImage = binding.getCameraImage(view.camera);
123
+
124
+ // discussion on exactly this:
125
+ // https://discourse.threejs.org/t/using-a-webgltexture-as-texture-for-three-js/46245/8
126
+ // HACK from https://stackoverflow.com/a/55084367 to inject a custom texture into three.js
127
+ const texProps = this.context.renderer.properties.get(this.threeTexture);
128
+ texProps.__webglTexture = glImage;
129
+
130
+ if (this.backgroundPlane) {
131
+ //@ts-ignore
132
+ this.backgroundPlane.setTexture(this.threeTexture);
133
+ this.backgroundPlane.visible = true;
134
+ }
135
+ }
136
+ }
137
+ else {
138
+ // console.error(view.camera, xrManager)
139
+ }
140
+ }
141
+ else {
142
+ // console.error("NO CAMERA IN VIEW")
143
+ }
144
+ }
145
+ }
146
+ else {
147
+ // console.error(this.context.renderer.xr.getReferenceSpace(), frame);
148
+ }
149
+ }
150
+ }
151
+ // TODO tint could be an uniform
152
+ let backgroundFragment: string = /* glsl */`
153
+ uniform sampler2D t2D;
154
+
155
+ varying vec2 vUv;
156
+
157
+ void main() {
158
+
159
+ vec4 texColor = texture2D( t2D, vUv );
160
+ texColor.w = 1.0;
161
+
162
+ // inline sRGB decode
163
+ texColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );
164
+
165
+ gl_FragColor = texColor * <backgroundTint>;
166
+
167
+ #include <tonemapping_fragment>
168
+ #include <encodings_fragment>
169
+
170
+ }
171
+ `;
172
+
173
+ // not sure where we want to move this and in which form is best (extends Object3D?)
174
+ export function makeFullscreenPlane(tint: RGBAColor ) {
175
+ const replacementTint = "vec4(" + tint.r.toFixed(3) + "," + tint.g.toFixed(3) + "," + tint.b.toFixed(3) + "," + tint.a.toFixed(3) + ")";
176
+ console.log(replacementTint);
177
+ const planeMesh = new Mesh(
178
+ new PlaneGeometry(2, 2),
179
+ // @ts-ignore
180
+ new ShaderMaterial({
181
+ name: 'BackgroundMaterial',
182
+ uniforms: UniformsUtils.clone( ShaderLib.background.uniforms ),
183
+ vertexShader: ShaderLib.background.vertexShader,
184
+ fragmentShader: backgroundFragment.replace("<backgroundTint>", replacementTint), // ShaderLib.background.fragmentShader,
185
+ side: DoubleSide,
186
+ depthTest: false,
187
+ depthWrite: false,
188
+ fog: false
189
+ })
190
+ );
191
+
192
+ planeMesh.geometry.deleteAttribute( 'normal' );
193
+
194
+ // add "map" material property so the renderer can evaluate it like for built-in materials
195
+ Object.defineProperty( planeMesh.material, 'map', {
196
+ get: function () {
197
+ return this.threeTexture;
198
+ }
199
+ } );
200
+
201
+ // Option 1: add the planeMesh to our scene for rendering.
202
+ // This is useful for applying custom shader effects on the background (instead of using the system composite)
203
+ planeMesh.renderOrder = -10000; // render first
204
+ planeMesh.layers.disableAll();
205
+ planeMesh.layers.enable(2); // ignore raycasts
206
+ planeMesh.frustumCulled = false;
207
+
208
+ // should be a class, for now lets just define a method for the weird way the texture needs to be set
209
+ // @ts-ignore
210
+ planeMesh.setTexture = function(texture) {
211
+ planeMesh.material.uniforms.t2D.value = texture;
212
+ }
213
+
214
+ return planeMesh;
215
+ }
@@ -84,10 +84,11 @@ export class WebARSessionRoot extends Behaviour {
84
84
 
85
85
  if (this._isTouching) {
86
86
  // callbacks
87
- this.dispatchEvent(new CustomEvent('placedSession', { detail: { pose: pose } }));
87
+ const poseMatrix = new Matrix4().fromArray(pose.transform.matrix).invert();
88
+ this.dispatchEvent(new CustomEvent('placedSession', { detail: { pose, poseMatrix } }));
88
89
 
89
90
  if (this.webAR) this.webAR.setReticleActive(false);
90
- this.placeAt(rig, new Matrix4().fromArray(pose.transform.matrix).invert());
91
+ this.placeAt(rig, poseMatrix);
91
92
  return true;
92
93
  }
93
94
  }
@@ -78,6 +78,11 @@ export class WebXR extends Behaviour {
78
78
  public static get IsARSupported(): boolean { return arSupported; }
79
79
  public static get IsVRSupported(): boolean { return vrSupported; }
80
80
 
81
+ private static _optionalFeatures_VR: string[] = ['local-floor', 'bounded-floor', 'hand-tracking', 'high-fixed-foveation-level', 'layers'];
82
+ private static _optionalFeatures_AR: string[] = ['plane-detection', 'anchors', 'local-floor', 'hand-tracking', 'layers'];
83
+ public static get OptionalFeatures_VR(): string[] { return this._optionalFeatures_VR; }
84
+ public static get OptionalFeatures_AR(): string[] { return this._optionalFeatures_AR; }
85
+
81
86
  public static addEventListener(type: string, listener: any): any {
82
87
  this.events.addEventListener(type, listener);
83
88
  return listener;
@@ -93,7 +98,8 @@ export class WebXR extends Behaviour {
93
98
  }
94
99
  else
95
100
  webXR.__internalAwake();
96
- const vrButton = VRButton.createButton(webXR.context.renderer);
101
+ const options = { optionalFeatures: WebXR.OptionalFeatures_VR };
102
+ const vrButton = VRButton.createButton(webXR.context.renderer, options);
97
103
  vrButton.classList.add('webxr-ar-button');
98
104
  vrButton.classList.add('webxr-button');
99
105
  this.resetButtonStyles(vrButton);
@@ -106,19 +112,17 @@ export class WebXR extends Behaviour {
106
112
  public static createARButton(webXR: WebXR, opts?: CreateButtonOptions): HTMLButtonElement | HTMLAnchorElement {
107
113
  webXR.__internalAwake();
108
114
  const domOverlayRoot = webXR.webAR?.getAROverlayContainer();
109
- const features: any = {};
115
+ const options: any = { optionalFeatures: [...this.OptionalFeatures_AR] };
110
116
  if (domOverlayRoot) {
111
- features.domOverlay = { root: domOverlayRoot };
112
- features.optionalFeatures = ['hit-test', 'dom-overlay'];
117
+ options.domOverlay = { root: domOverlayRoot };
118
+ options.optionalFeatures.push('dom-overlay')
119
+ options.optionalFeatures.push('hit-test');
113
120
  }
114
121
  else {
115
122
  console.warn("No dom overlay root found, HTML overlays on top of screen-based AR will not work.");
116
123
  }
117
- features.optionalFeatures.push('plane-detection');
118
- // features.optionalFeatures.push('light-estimation');
119
- features.optionalFeatures.push('anchors');
120
124
 
121
- const arButton = ARButton.createButton(webXR.context.renderer, features);
125
+ const arButton = ARButton.createButton(webXR.context.renderer, options);
122
126
  arButton.classList.add('webxr-ar-button');
123
127
  arButton.classList.add('webxr-button');
124
128
  WebXR.resetButtonStyles(arButton);
@@ -9,7 +9,6 @@ import { AssetReference } from "../engine/engine_addressables";
9
9
  import { Object3D } from "three";
10
10
  import { VRUserState } from "./WebXRSync";
11
11
  import { getParam } from "../engine/engine_utils";
12
- import { serializable } from "../engine/engine_serialization_decorator";
13
12
  import { ViewDevice } from "../engine/engine_playerview";
14
13
  import { InstancingUtil } from "../engine/engine_instancing";
15
14
 
@@ -332,6 +331,7 @@ export class WebXRAvatar {
332
331
  if (this.flags.length <= 0) {
333
332
  if (this.head) {
334
333
  const flag = GameObject.addNewComponent(this.head, XRFlag) as XRFlag;
334
+ // TODO: the defaults are wrong? should be Desktop | ThirdPerson ?
335
335
  flag.visibleIn = XRStateFlag.ThirdPerson | XRStateFlag.VR;
336
336
  this.flags.push(flag);
337
337
  if (debug)
@@ -54,8 +54,8 @@ export class XRGrabRendering extends Behaviour {
54
54
  }
55
55
 
56
56
  onDisable(): void {
57
- this.context.connection.stopListening(XRGrabEvent.StartOrUpdate, this._addOrUpdateSub);
58
- this.context.connection.stopListening(XRGrabEvent.End, this._endSub);
57
+ this.context.connection.stopListen(XRGrabEvent.StartOrUpdate, this._addOrUpdateSub);
58
+ this.context.connection.stopListen(XRGrabEvent.End, this._endSub);
59
59
  AttachedObject.RemoveEventListener(AttachedObjectEvents.WillFree, this._freeSub);
60
60
  }
61
61
 
@@ -253,7 +253,7 @@ export class WebXRSync extends Behaviour {
253
253
  this.avatars[evt.id] = undefined;
254
254
  }
255
255
  });
256
- this.context.connection.beginListenBinrary(VRUserStateBufferIdentifier, (state: VrUserStateBuffer) => {
256
+ this.context.connection.beginListenBinary(VRUserStateBufferIdentifier, (state: VrUserStateBuffer) => {
257
257
  // console.log("BUFFER", state);
258
258
  const guid = state.guid();
259
259
  if (!guid) return;
@@ -299,7 +299,7 @@ export class WebXRSync extends Behaviour {
299
299
 
300
300
  onDisable() {
301
301
  if (this.eventSub_ConnectionEvent)
302
- this.context.connection.stopListening(RoomEvents.JoinedRoom, this.eventSub_ConnectionEvent);
302
+ this.context.connection.stopListen(RoomEvents.JoinedRoom, this.eventSub_ConnectionEvent);
303
303
  WebXR.removeEventListener(WebXREvent.XRStarted, this.eventSub_WebXRStartEvent);
304
304
  WebXR.removeEventListener(WebXREvent.XRUpdate, this.eventSub_WebXRUpdateEvent);
305
305
  WebXR.removeEventListener(WebXREvent.XRStopped, this.eventSub_WebXREndEvent);
@@ -7,6 +7,7 @@ export { AnimationExtension } from "../export/usdz/extensions/Animation";
7
7
  export { AnimationTrackHandler } from "../timeline/TimelineTracks";
8
8
  export { Animator } from "../Animator";
9
9
  export { AnimatorController } from "../AnimatorController";
10
+ export { Antialiasing } from "../postprocessing/Effects/Antialiasing";
10
11
  export { AttachedObject } from "../WebXRController";
11
12
  export { AudioListener } from "../AudioListener";
12
13
  export { AudioSource } from "../AudioSource";
@@ -23,6 +24,7 @@ export { AvatarModel } from "../AvatarLoader";
23
24
  export { AxesHelper } from "../AxesHelper";
24
25
  export { BaseUIComponent } from "../ui/BaseUIComponent";
25
26
  export { BasicIKConstraint } from "../BasicIKConstraint";
27
+ export { Bloom } from "../postprocessing/Effects/Bloom";
26
28
  export { BoxCollider } from "../Collider";
27
29
  export { BoxGizmo } from "../Gizmos";
28
30
  export { BoxHelperComponent } from "../BoxHelperComponent";
@@ -34,13 +36,15 @@ export { CanvasGroup } from "../ui/CanvasGroup";
34
36
  export { CapsuleCollider } from "../Collider";
35
37
  export { CharacterController } from "../CharacterController";
36
38
  export { CharacterControllerInput } from "../CharacterController";
39
+ export { ChromaticAberration } from "../postprocessing/Effects/ChromaticAberration";
37
40
  export { Collider } from "../Collider";
38
- export { ColorAdjustments } from "../Volume";
41
+ export { ColorAdjustments } from "../postprocessing/Effects/ColorAdjustments";
39
42
  export { ColorBySpeedModule } from "../ParticleSystemModules";
40
43
  export { ColorOverLifetimeModule } from "../ParticleSystemModules";
41
44
  export { ControlTrackHandler } from "../timeline/TimelineTracks";
42
45
  export { Deletable } from "../DeleteBox";
43
46
  export { DeleteBox } from "../DeleteBox";
47
+ export { DepthOfField } from "../postprocessing/Effects/DepthOfField";
44
48
  export { DeviceFlag } from "../DeviceFlag";
45
49
  export { DragControls } from "../DragControls";
46
50
  export { DropListener } from "../DropListener";
@@ -92,9 +96,11 @@ export { ParticleBurst } from "../ParticleSystemModules";
92
96
  export { ParticleSubEmitter } from "../ParticleSystemSubEmitter";
93
97
  export { ParticleSystem } from "../ParticleSystem";
94
98
  export { ParticleSystemRenderer } from "../ParticleSystem";
99
+ export { PixelationEffect } from "../postprocessing/Effects/Pixelation";
95
100
  export { PlayableDirector } from "../timeline/PlayableDirector";
96
101
  export { PlayerColor } from "../PlayerColor";
97
102
  export { PointerEventData } from "../ui/PointerEvents";
103
+ export { PostProcessingHandler } from "../postprocessing/PostProcessingHandler";
98
104
  export { RawImage } from "../ui/Image";
99
105
  export { Raycaster } from "../ui/Raycaster";
100
106
  export { Rect } from "../ui/RectTransform";
@@ -109,6 +115,7 @@ export { Rigidbody } from "../RigidBody";
109
115
  export { RotationBySpeedModule } from "../ParticleSystemModules";
110
116
  export { RotationOverLifetimeModule } from "../ParticleSystemModules";
111
117
  export { ScreenCapture } from "../ScreenCapture";
118
+ export { ScreenSpaceAmbientOcclusion } from "../postprocessing/Effects/ScreenspaceAmbientOcclusion";
112
119
  export { ShadowCatcher } from "../ShadowCatcher";
113
120
  export { ShapeModule } from "../ParticleSystemModules";
114
121
  export { SignalAsset } from "../timeline/SignalAsset";
@@ -137,7 +144,7 @@ export { TestRunner } from "../TestRunner";
137
144
  export { TestSimulateUserData } from "../TestRunner";
138
145
  export { Text } from "../ui/Text";
139
146
  export { TextureSheetAnimationModule } from "../ParticleSystemModules";
140
- export { ToneMapping } from "../Volume";
147
+ export { ToneMapping } from "../postprocessing/Effects/Tonemapping";
141
148
  export { TrailModule } from "../ParticleSystemModules";
142
149
  export { TransformData } from "../export/usdz/extensions/Animation";
143
150
  export { TransformGizmo } from "../TransformGizmo";
@@ -148,13 +155,14 @@ export { USDZExporter } from "../export/usdz/USDZExporter";
148
155
  export { VelocityOverLifetimeModule } from "../ParticleSystemModules";
149
156
  export { VerticalLayoutGroup } from "../ui/Layout";
150
157
  export { VideoPlayer } from "../VideoPlayer";
158
+ export { Vignette } from "../postprocessing/Effects/Vignette";
151
159
  export { Voip } from "../Voip";
152
- export { Volume } from "../Volume";
153
- export { VolumeComponent } from "../Volume";
154
- export { VolumeParameter } from "../Volume";
155
- export { VolumeProfile } from "../Volume";
160
+ export { Volume } from "../postprocessing/Volume";
161
+ export { VolumeParameter } from "../postprocessing/VolumeParameter";
162
+ export { VolumeProfile } from "../postprocessing/VolumeProfile";
156
163
  export { VRUserState } from "../WebXRSync";
157
164
  export { WebAR } from "../WebXR";
165
+ export { WebARCameraBackground } from "../WebARCameraBackground";
158
166
  export { WebARSessionRoot } from "../WebARSessionRoot";
159
167
  export { WebXR } from "../WebXR";
160
168
  export { WebXRAvatar } from "../WebXRAvatar";