@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.
- package/CHANGELOG.md +43 -0
- package/dist/needle-engine.js +34490 -26304
- package/dist/needle-engine.umd.cjs +748 -303
- package/lib/engine/api.d.ts +4 -0
- package/lib/engine/api.js +10 -0
- package/lib/engine/api.js.map +1 -1
- package/lib/engine/codegen/register_types.js +23 -7
- package/lib/engine/codegen/register_types.js.map +1 -1
- package/lib/engine/debug/debug_overlay.js +11 -2
- package/lib/engine/debug/debug_overlay.js.map +1 -1
- package/lib/engine/engine_addressables.js +4 -4
- package/lib/engine/engine_addressables.js.map +1 -1
- package/lib/engine/engine_assetdatabase.d.ts +17 -51
- package/lib/engine/engine_assetdatabase.js +252 -126
- package/lib/engine/engine_assetdatabase.js.map +1 -1
- package/lib/engine/engine_components.js +13 -1
- package/lib/engine/engine_components.js.map +1 -1
- package/lib/engine/engine_components_internal.d.ts +8 -0
- package/lib/engine/engine_components_internal.js +29 -0
- package/lib/engine/engine_components_internal.js.map +1 -0
- package/lib/engine/engine_constants.d.ts +1 -0
- package/lib/engine/engine_constants.js +1 -0
- package/lib/engine/engine_constants.js.map +1 -1
- package/lib/engine/engine_context_registry.d.ts +2 -0
- package/lib/engine/engine_context_registry.js +6 -0
- package/lib/engine/engine_context_registry.js.map +1 -1
- package/lib/engine/engine_editor-sync.d.ts +9 -0
- package/lib/engine/engine_editor-sync.js +8 -0
- package/lib/engine/engine_editor-sync.js.map +1 -0
- package/lib/engine/engine_element.d.ts +1 -0
- package/lib/engine/engine_element.js +4 -1
- package/lib/engine/engine_element.js.map +1 -1
- package/lib/engine/engine_element_loading.d.ts +3 -2
- package/lib/engine/engine_element_loading.js +19 -15
- package/lib/engine/engine_element_loading.js.map +1 -1
- package/lib/engine/engine_gameobject.js +21 -23
- package/lib/engine/engine_gameobject.js.map +1 -1
- package/lib/engine/engine_gizmos.js +3 -1
- package/lib/engine/engine_gizmos.js.map +1 -1
- package/lib/engine/engine_gltf_builtin_components.d.ts +2 -3
- package/lib/engine/engine_gltf_builtin_components.js +23 -6
- package/lib/engine/engine_gltf_builtin_components.js.map +1 -1
- package/lib/engine/engine_networking.d.ts +3 -1
- package/lib/engine/engine_networking.js +10 -8
- package/lib/engine/engine_networking.js.map +1 -1
- package/lib/engine/engine_networking_auto.d.ts +1 -0
- package/lib/engine/engine_networking_auto.js +42 -9
- package/lib/engine/engine_networking_auto.js.map +1 -1
- package/lib/engine/engine_patcher.d.ts +8 -0
- package/lib/engine/engine_patcher.js +98 -0
- package/lib/engine/engine_patcher.js.map +1 -0
- package/lib/engine/engine_physics.d.ts +34 -2
- package/lib/engine/engine_physics.js +110 -11
- package/lib/engine/engine_physics.js.map +1 -1
- package/lib/engine/engine_scenetools.js +0 -1
- package/lib/engine/engine_scenetools.js.map +1 -1
- package/lib/engine/engine_serialization_core.js +4 -0
- package/lib/engine/engine_serialization_core.js.map +1 -1
- package/lib/engine/engine_setup.d.ts +1 -1
- package/lib/engine/engine_setup.js +12 -5
- package/lib/engine/engine_setup.js.map +1 -1
- package/lib/engine/engine_texture.d.ts +6 -1
- package/lib/engine/engine_texture.js +39 -1
- package/lib/engine/engine_texture.js.map +1 -1
- package/lib/engine/engine_types.d.ts +4 -0
- package/lib/engine/engine_types.js.map +1 -1
- package/lib/engine/engine_utils.js +3 -2
- package/lib/engine/engine_utils.js.map +1 -1
- package/lib/engine/extensions/NEEDLE_progressive.d.ts +0 -1
- package/lib/engine/extensions/NEEDLE_progressive.js +24 -26
- package/lib/engine/extensions/NEEDLE_progressive.js.map +1 -1
- package/lib/engine/extensions/NEEDLE_render_objects.js +9 -0
- package/lib/engine/extensions/NEEDLE_render_objects.js.map +1 -1
- package/lib/engine/extensions/extensions.d.ts +4 -1
- package/lib/engine/extensions/extensions.js +16 -0
- package/lib/engine/extensions/extensions.js.map +1 -1
- package/lib/engine/extensions/usage_tracker.d.ts +12 -0
- package/lib/engine/extensions/usage_tracker.js +59 -0
- package/lib/engine/extensions/usage_tracker.js.map +1 -0
- package/lib/engine-components/Animator.js +0 -1
- package/lib/engine-components/Animator.js.map +1 -1
- package/lib/engine-components/AnimatorController.js +4 -0
- package/lib/engine-components/AnimatorController.js.map +1 -1
- package/lib/engine-components/AudioSource.js +2 -1
- package/lib/engine-components/AudioSource.js.map +1 -1
- package/lib/engine-components/Camera.d.ts +6 -0
- package/lib/engine-components/Camera.js +70 -31
- package/lib/engine-components/Camera.js.map +1 -1
- package/lib/engine-components/CharacterController.d.ts +1 -0
- package/lib/engine-components/CharacterController.js +14 -9
- package/lib/engine-components/CharacterController.js.map +1 -1
- package/lib/engine-components/Collider.js +14 -1
- package/lib/engine-components/Collider.js.map +1 -1
- package/lib/engine-components/Component.d.ts +52 -0
- package/lib/engine-components/Component.js +55 -14
- package/lib/engine-components/Component.js.map +1 -1
- package/lib/engine-components/Networking.js +19 -0
- package/lib/engine-components/Networking.js.map +1 -1
- package/lib/engine-components/OrbitControls.d.ts +2 -0
- package/lib/engine-components/OrbitControls.js +9 -0
- package/lib/engine-components/OrbitControls.js.map +1 -1
- package/lib/engine-components/ParticleSystem.d.ts +5 -1
- package/lib/engine-components/ParticleSystem.js +52 -7
- package/lib/engine-components/ParticleSystem.js.map +1 -1
- package/lib/engine-components/ParticleSystemModules.d.ts +2 -0
- package/lib/engine-components/ParticleSystemModules.js +26 -0
- package/lib/engine-components/ParticleSystemModules.js.map +1 -1
- package/lib/engine-components/ParticleSystemSubEmitter.js +5 -2
- package/lib/engine-components/ParticleSystemSubEmitter.js.map +1 -1
- package/lib/engine-components/ReflectionProbe.js +18 -6
- package/lib/engine-components/ReflectionProbe.js.map +1 -1
- package/lib/engine-components/Renderer.d.ts +1 -1
- package/lib/engine-components/Renderer.js +33 -11
- package/lib/engine-components/Renderer.js.map +1 -1
- package/lib/engine-components/ScreenCapture.js +3 -3
- package/lib/engine-components/ScreenCapture.js.map +1 -1
- package/lib/engine-components/Skybox.js +2 -0
- package/lib/engine-components/Skybox.js.map +1 -1
- package/lib/engine-components/SmoothFollow.js +1 -2
- package/lib/engine-components/SmoothFollow.js.map +1 -1
- package/lib/engine-components/SpectatorCamera.js +3 -3
- package/lib/engine-components/SpectatorCamera.js.map +1 -1
- package/lib/engine-components/SyncedCamera.js +1 -1
- package/lib/engine-components/SyncedCamera.js.map +1 -1
- package/lib/engine-components/SyncedTransform.js +2 -2
- package/lib/engine-components/SyncedTransform.js.map +1 -1
- package/lib/engine-components/TestRunner.js +1 -1
- package/lib/engine-components/TestRunner.js.map +1 -1
- package/lib/engine-components/WebARCameraBackground.d.ts +19 -0
- package/lib/engine-components/WebARCameraBackground.js +185 -0
- package/lib/engine-components/WebARCameraBackground.js.map +1 -0
- package/lib/engine-components/WebARSessionRoot.js +3 -2
- package/lib/engine-components/WebARSessionRoot.js.map +1 -1
- package/lib/engine-components/WebXR.d.ts +4 -0
- package/lib/engine-components/WebXR.js +11 -8
- package/lib/engine-components/WebXR.js.map +1 -1
- package/lib/engine-components/WebXRAvatar.js +1 -0
- package/lib/engine-components/WebXRAvatar.js.map +1 -1
- package/lib/engine-components/WebXRGrabRendering.js +2 -2
- package/lib/engine-components/WebXRGrabRendering.js.map +1 -1
- package/lib/engine-components/WebXRSync.js +2 -2
- package/lib/engine-components/WebXRSync.js.map +1 -1
- package/lib/engine-components/codegen/components.d.ts +14 -6
- package/lib/engine-components/codegen/components.js +14 -6
- package/lib/engine-components/codegen/components.js.map +1 -1
- package/lib/engine-components/js-extensions/Object3D.js +4 -1
- package/lib/engine-components/js-extensions/Object3D.js.map +1 -1
- package/lib/engine-components/postprocessing/Effects/Antialiasing.d.ts +13 -0
- package/lib/engine-components/postprocessing/Effects/Antialiasing.js +46 -0
- package/lib/engine-components/postprocessing/Effects/Antialiasing.js.map +1 -0
- package/lib/engine-components/postprocessing/Effects/Bloom.d.ts +12 -0
- package/lib/engine-components/postprocessing/Effects/Bloom.js +76 -0
- package/lib/engine-components/postprocessing/Effects/Bloom.js.map +1 -0
- package/lib/engine-components/postprocessing/Effects/ChromaticAberration.d.ts +8 -0
- package/lib/engine-components/postprocessing/Effects/ChromaticAberration.js +39 -0
- package/lib/engine-components/postprocessing/Effects/ChromaticAberration.js.map +1 -0
- package/lib/engine-components/postprocessing/Effects/ColorAdjustments.d.ts +12 -0
- package/lib/engine-components/postprocessing/Effects/ColorAdjustments.js +96 -0
- package/lib/engine-components/postprocessing/Effects/ColorAdjustments.js.map +1 -0
- package/lib/engine-components/postprocessing/Effects/DepthOfField.d.ts +21 -0
- package/lib/engine-components/postprocessing/Effects/DepthOfField.js +87 -0
- package/lib/engine-components/postprocessing/Effects/DepthOfField.js.map +1 -0
- package/lib/engine-components/postprocessing/Effects/Pixelation.d.ts +7 -0
- package/lib/engine-components/postprocessing/Effects/Pixelation.js +30 -0
- package/lib/engine-components/postprocessing/Effects/Pixelation.js.map +1 -0
- package/lib/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusion.d.ts +11 -0
- package/lib/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusion.js +70 -0
- package/lib/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusion.js.map +1 -0
- package/lib/engine-components/postprocessing/Effects/Tonemapping.d.ts +16 -0
- package/lib/engine-components/postprocessing/Effects/Tonemapping.js +52 -0
- package/lib/engine-components/postprocessing/Effects/Tonemapping.js.map +1 -0
- package/lib/engine-components/postprocessing/Effects/Vignette.d.ts +11 -0
- package/lib/engine-components/postprocessing/Effects/Vignette.js +57 -0
- package/lib/engine-components/postprocessing/Effects/Vignette.js.map +1 -0
- package/lib/engine-components/postprocessing/PostProcessingEffect.d.ts +29 -0
- package/lib/engine-components/postprocessing/PostProcessingEffect.js +89 -0
- package/lib/engine-components/postprocessing/PostProcessingEffect.js.map +1 -0
- package/lib/engine-components/postprocessing/PostProcessingHandler.d.ts +13 -0
- package/lib/engine-components/postprocessing/PostProcessingHandler.js +119 -0
- package/lib/engine-components/postprocessing/PostProcessingHandler.js.map +1 -0
- package/lib/engine-components/postprocessing/Volume.d.ts +23 -0
- package/lib/engine-components/postprocessing/Volume.js +176 -0
- package/lib/engine-components/postprocessing/Volume.js.map +1 -0
- package/lib/engine-components/postprocessing/VolumeParameter.d.ts +21 -0
- package/lib/engine-components/postprocessing/VolumeParameter.js +75 -0
- package/lib/engine-components/postprocessing/VolumeParameter.js.map +1 -0
- package/lib/engine-components/postprocessing/VolumeProfile.d.ts +7 -0
- package/lib/engine-components/postprocessing/VolumeProfile.js +42 -0
- package/lib/engine-components/postprocessing/VolumeProfile.js.map +1 -0
- package/lib/engine-components/timeline/TimelineTracks.js +14 -15
- package/lib/engine-components/timeline/TimelineTracks.js.map +1 -1
- package/lib/engine-components/ui/Text.js +28 -170
- package/lib/engine-components/ui/Text.js.map +1 -1
- package/lib/engine-components-experimental/networking/PlayerSync.d.ts +18 -0
- package/lib/engine-components-experimental/networking/PlayerSync.js +62 -8
- package/lib/engine-components-experimental/networking/PlayerSync.js.map +1 -1
- package/lib/include/three/ARButton.d.ts +1 -1
- package/lib/include/three/ARButton.js +11 -19
- package/lib/include/three/ARButton.js.map +1 -1
- package/lib/include/three/VRButton.js +1 -4
- package/lib/include/three/VRButton.js.map +1 -1
- package/package.json +3 -2
- package/plugins/vite/drop-client.js +77 -0
- package/plugins/vite/drop.js +81 -0
- package/plugins/vite/editor-connection.js +121 -0
- package/plugins/vite/index.js +9 -4
- package/plugins/vite/meta.js +3 -0
- package/plugins/vite/poster-client.js +6 -4
- package/src/engine/api.ts +30 -1
- package/src/engine/codegen/register_types.js +25 -9
- package/src/engine/debug/debug_overlay.ts +11 -2
- package/src/engine/engine_addressables.ts +4 -4
- package/src/engine/engine_assetdatabase.ts +291 -184
- package/src/engine/engine_components.ts +20 -1
- package/src/engine/engine_components_internal.ts +30 -0
- package/src/engine/engine_constants.ts +4 -1
- package/src/engine/engine_context_registry.ts +7 -0
- package/src/engine/engine_editor-sync.ts +21 -0
- package/src/engine/engine_element.ts +8 -1
- package/src/engine/engine_element_loading.ts +19 -15
- package/src/engine/engine_gameobject.ts +579 -583
- package/src/engine/engine_gizmos.ts +3 -2
- package/src/engine/engine_gltf_builtin_components.ts +30 -15
- package/src/engine/engine_networking.ts +10 -8
- package/src/engine/engine_networking_auto.ts +48 -11
- package/src/engine/engine_patcher.ts +113 -0
- package/src/engine/engine_physics.ts +128 -12
- package/src/engine/engine_scenetools.ts +0 -1
- package/src/engine/engine_serialization_core.ts +6 -0
- package/src/engine/engine_setup.ts +15 -5
- package/src/engine/engine_texture.ts +54 -5
- package/src/engine/engine_types.ts +6 -1
- package/src/engine/engine_utils.ts +6 -5
- package/src/engine/extensions/NEEDLE_progressive.ts +32 -32
- package/src/engine/extensions/NEEDLE_render_objects.ts +10 -1
- package/src/engine/extensions/extensions.ts +22 -1
- package/src/engine/extensions/usage_tracker.ts +91 -0
- package/src/engine-components/Animator.ts +0 -1
- package/src/engine-components/AnimatorController.ts +2 -0
- package/src/engine-components/AudioSource.ts +1 -1
- package/src/engine-components/Camera.ts +77 -37
- package/src/engine-components/CharacterController.ts +12 -9
- package/src/engine-components/Collider.ts +16 -2
- package/src/engine-components/Component.ts +74 -30
- package/src/engine-components/Networking.ts +9 -1
- package/src/engine-components/OrbitControls.ts +11 -2
- package/src/engine-components/ParticleSystem.ts +54 -10
- package/src/engine-components/ParticleSystemModules.ts +28 -1
- package/src/engine-components/ParticleSystemSubEmitter.ts +5 -3
- package/src/engine-components/ReflectionProbe.ts +17 -7
- package/src/engine-components/Renderer.ts +36 -16
- package/src/engine-components/ScreenCapture.ts +3 -3
- package/src/engine-components/Skybox.ts +2 -0
- package/src/engine-components/SmoothFollow.ts +4 -4
- package/src/engine-components/SpectatorCamera.ts +3 -3
- package/src/engine-components/SyncedCamera.ts +1 -1
- package/src/engine-components/SyncedTransform.ts +2 -2
- package/src/engine-components/TestRunner.ts +1 -1
- package/src/engine-components/WebARCameraBackground.ts +215 -0
- package/src/engine-components/WebARSessionRoot.ts +3 -2
- package/src/engine-components/WebXR.ts +12 -8
- package/src/engine-components/WebXRAvatar.ts +1 -1
- package/src/engine-components/WebXRGrabRendering.ts +2 -2
- package/src/engine-components/WebXRSync.ts +2 -2
- package/src/engine-components/codegen/components.ts +14 -6
- package/src/engine-components/js-extensions/Object3D.ts +6 -1
- package/src/engine-components/postprocessing/Effects/Antialiasing.ts +52 -0
- package/src/engine-components/postprocessing/Effects/Bloom.ts +75 -0
- package/src/engine-components/postprocessing/Effects/ChromaticAberration.ts +36 -0
- package/src/engine-components/postprocessing/Effects/ColorAdjustments.ts +114 -0
- package/src/engine-components/postprocessing/Effects/DepthOfField.ts +90 -0
- package/src/engine-components/postprocessing/Effects/Pixelation.ts +28 -0
- package/src/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusion.ts +71 -0
- package/src/engine-components/postprocessing/Effects/Tonemapping.ts +55 -0
- package/src/engine-components/postprocessing/Effects/Vignette.ts +55 -0
- package/src/engine-components/postprocessing/PostProcessingEffect.ts +112 -0
- package/src/engine-components/postprocessing/PostProcessingHandler.ts +148 -0
- package/src/engine-components/postprocessing/Volume.ts +194 -0
- package/src/engine-components/postprocessing/VolumeParameter.ts +85 -0
- package/src/engine-components/postprocessing/VolumeProfile.ts +40 -0
- package/src/engine-components/timeline/TimelineTracks.ts +16 -17
- package/src/engine-components/ui/Text.ts +37 -174
- package/src/engine-components-experimental/networking/PlayerSync.ts +69 -8
- package/src/include/three/ARButton.js +13 -24
- package/src/include/three/VRButton.js +1 -7
- package/lib/engine-components/Volume.d.ts +0 -34
- package/lib/engine-components/Volume.js +0 -140
- package/lib/engine-components/Volume.js.map +0 -1
- 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
|
-
|
|
11
|
-
|
|
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
|
-
|
|
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/
|
|
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/
|
|
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 {
|
|
159
|
-
import {
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
241
|
-
if (count !== undefined && count >=
|
|
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
|
}
|