@relu-interactives/spatial-ecs 0.2.11 → 0.2.13
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/dist/{System-KTHuWc-i.d.cts → System-CTTwEGn1.d.cts} +312 -3
- package/dist/{System-KTHuWc-i.d.ts → System-CTTwEGn1.d.ts} +312 -3
- package/dist/{Video-Ds_0Aj66.d.ts → Video-BMWPYc3q.d.cts} +2 -241
- package/dist/{Video-BnrYbbzu.d.cts → Video-CV1-u6hL.d.ts} +2 -241
- package/dist/{chunk-OIOUWDOS.js → chunk-27RBPOVO.js} +40 -4
- package/dist/chunk-27RBPOVO.js.map +1 -0
- package/dist/{chunk-YLRCC4EK.js → chunk-7QBONTBW.js} +4 -4
- package/dist/{chunk-YLRCC4EK.js.map → chunk-7QBONTBW.js.map} +1 -1
- package/dist/{chunk-XPCVEXMY.js → chunk-FTIQQK62.js} +2 -2
- package/dist/chunk-FTIQQK62.js.map +1 -0
- package/dist/{chunk-UU6VYCIO.js → chunk-KDZ6VBRO.js} +4 -4
- package/dist/{chunk-UU6VYCIO.js.map → chunk-KDZ6VBRO.js.map} +1 -1
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +2 -2
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.js +1 -1
- package/dist/docs/api/Behaviour/classes/Behaviour.md +29 -29
- package/dist/docs/api/Component/classes/Component.md +1 -1
- package/dist/docs/api/components/classes/AnimationComponent.md +26 -26
- package/dist/docs/api/components/classes/AudioComponent.md +19 -19
- package/dist/docs/api/components/classes/CameraComponent.md +14 -14
- package/dist/docs/api/components/classes/EntityType.md +3 -3
- package/dist/docs/api/components/classes/Environment.md +7 -3
- package/dist/docs/api/components/classes/ImageComponent.md +7 -7
- package/dist/docs/api/components/classes/ImageTarget.md +7 -7
- package/dist/docs/api/components/classes/ImageTargetAnchor.md +4 -4
- package/dist/docs/api/components/classes/InstanceSlotComponent.md +4 -4
- package/dist/docs/api/components/classes/InstancedMeshComponent.md +10 -10
- package/dist/docs/api/components/classes/LightComponent.md +6 -6
- package/dist/docs/api/components/classes/MaterialComponent.md +11 -11
- package/dist/docs/api/components/classes/MeshComponent.md +3 -3
- package/dist/docs/api/components/classes/MeshGeometryComponent.md +9 -9
- package/dist/docs/api/components/classes/ModelComponent.md +4 -4
- package/dist/docs/api/components/classes/Name.md +3 -3
- package/dist/docs/api/components/classes/Object3DRef.md +4 -4
- package/dist/docs/api/components/classes/ParentId.md +3 -3
- package/dist/docs/api/components/classes/PhysicsComponent.md +6 -6
- package/dist/docs/api/components/classes/Postprocessing.md +7 -3
- package/dist/docs/api/components/classes/ScriptComponent.md +5 -5
- package/dist/docs/api/components/classes/Selectable.md +3 -3
- package/dist/docs/api/components/classes/SelectionTransformState.md +5 -5
- package/dist/docs/api/components/classes/SpriteComponent.md +7 -7
- package/dist/docs/api/components/classes/TransformComponent.md +12 -12
- package/dist/docs/api/components/classes/VideoComponent.md +28 -28
- package/dist/docs/api/components/functions/normalizePhysicsState.md +1 -1
- package/dist/docs/api/components/index.md +1 -1
- package/dist/docs/api/components/type-aliases/AnimationComponentOptions.md +9 -9
- package/dist/docs/api/components/type-aliases/CameraComponentOptions.md +13 -13
- package/dist/docs/api/components/type-aliases/CameraProjection.md +1 -1
- package/dist/docs/api/components/type-aliases/CameraRuntimeType.md +1 -1
- package/dist/docs/api/components/type-aliases/ColliderShape.md +1 -1
- package/dist/docs/api/components/type-aliases/ColliderState.md +20 -20
- package/dist/docs/api/components/type-aliases/CubeMeshParameters.md +4 -4
- package/dist/docs/api/components/type-aliases/EditableMeshObjectKind.md +1 -1
- package/dist/docs/api/components/type-aliases/EnvironmentFogState.md +8 -8
- package/dist/docs/api/components/type-aliases/EnvironmentFogType.md +1 -1
- package/dist/docs/api/components/type-aliases/EnvironmentGradientEffect.md +1 -1
- package/dist/docs/api/components/type-aliases/EnvironmentSkyboxState.md +7 -7
- package/dist/docs/api/components/type-aliases/EnvironmentSkyboxType.md +1 -1
- package/dist/docs/api/components/type-aliases/EnvironmentState.md +5 -5
- package/dist/docs/api/components/type-aliases/ImageTargetAnchorOptions.md +3 -3
- package/dist/docs/api/components/type-aliases/ImageTargetReference.md +7 -7
- package/dist/docs/api/components/type-aliases/InstanceTransform.md +13 -13
- package/dist/docs/api/components/type-aliases/InstancedMeshKind.md +1 -1
- package/dist/docs/api/components/type-aliases/LightValueState.md +11 -11
- package/dist/docs/api/components/type-aliases/MaterialTypeValue.md +1 -1
- package/dist/docs/api/components/type-aliases/MaterialValueState.md +28 -28
- package/dist/docs/api/components/type-aliases/MeshGeometryParameters.md +1 -1
- package/dist/docs/api/components/type-aliases/MeshGeometryParametersByKind.md +7 -7
- package/dist/docs/api/components/type-aliases/PhysicsState.md +3 -3
- package/dist/docs/api/components/type-aliases/PlaneMeshParameters.md +3 -3
- package/dist/docs/api/components/type-aliases/PostprocessingState.md +62 -62
- package/dist/docs/api/components/type-aliases/RadiusHeightMeshParameters.md +3 -3
- package/dist/docs/api/components/type-aliases/RadiusMeshParameters.md +2 -2
- package/dist/docs/api/components/type-aliases/RigidbodyState.md +17 -17
- package/dist/docs/api/components/type-aliases/RigidbodyType.md +1 -1
- package/dist/docs/api/components/type-aliases/ScriptEntry.md +9 -9
- package/dist/docs/api/components/type-aliases/TextureFilteringValue.md +1 -1
- package/dist/docs/api/components/type-aliases/TransformData.md +4 -4
- package/dist/docs/api/components/type-aliases/TransformModeValue.md +1 -1
- package/dist/docs/api/components/type-aliases/TransformSpaceValue.md +1 -1
- package/dist/docs/api/components/type-aliases/Vec3.md +4 -4
- package/dist/docs/api/components/variables/DEFAULT_COLLIDER_STATE.md +1 -1
- package/dist/docs/api/components/variables/DEFAULT_ENVIRONMENT_STATE.md +1 -1
- package/dist/docs/api/components/variables/DEFAULT_INSTANCED_MESH_PARAMETERS.md +1 -1
- package/dist/docs/api/components/variables/DEFAULT_INSTANCE_TRANSFORM.md +1 -1
- package/dist/docs/api/components/variables/DEFAULT_MESH_GEOMETRY_PARAMETERS.md +1 -1
- package/dist/docs/api/components/variables/DEFAULT_PHYSICS_STATE.md +1 -1
- package/dist/docs/api/components/variables/DEFAULT_POSTPROCESSING_STATE.md +1 -1
- package/dist/docs/api/components/variables/DEFAULT_RIGIDBODY_STATE.md +1 -1
- package/dist/docs/api/index/classes/AnimationStateMachine.md +16 -16
- package/dist/docs/api/index/classes/AnimationStateManager.md +13 -13
- package/dist/docs/api/index/classes/AnimationSystem.md +3 -3
- package/dist/docs/api/index/classes/AudioSystem.md +4 -4
- package/dist/docs/api/index/classes/CameraSyncSystem.md +2 -2
- package/dist/docs/api/index/classes/EnvironmentSyncSystem.md +4 -4
- package/dist/docs/api/index/classes/InputSystem.md +33 -33
- package/dist/docs/api/index/classes/InstancedMeshSystem.md +2 -2
- package/dist/docs/api/index/classes/LightSyncSystem.md +2 -2
- package/dist/docs/api/index/classes/MaterialSyncSystem.md +3 -3
- package/dist/docs/api/index/classes/MeshGeometrySystem.md +2 -2
- package/dist/docs/api/index/classes/ObjectManagementSystem.md +39 -19
- package/dist/docs/api/index/classes/ObjectVisibilitySystem.md +2 -2
- package/dist/docs/api/index/classes/PhysicsSyncSystem.md +4 -4
- package/dist/docs/api/index/classes/PostprocessingSyncSystem.md +4 -4
- package/dist/docs/api/index/classes/RenderSystem.md +3 -3
- package/dist/docs/api/index/classes/ScriptBehaviourSystem.md +4 -4
- package/dist/docs/api/index/classes/TransformSyncSystem.md +2 -2
- package/dist/docs/api/index/classes/VideoSystem.md +4 -4
- package/dist/docs/api/index/classes/World.md +146 -82
- package/dist/docs/api/index/functions/createAnimationComponent.md +1 -1
- package/dist/docs/api/index/functions/createAudioComponent.md +1 -1
- package/dist/docs/api/index/functions/createCameraComponent.md +1 -1
- package/dist/docs/api/index/functions/createEntityTypeComponent.md +1 -1
- package/dist/docs/api/index/functions/createEnvironmentComponent.md +1 -1
- package/dist/docs/api/index/functions/createImageComponent.md +1 -1
- package/dist/docs/api/index/functions/createImageTargetAnchorComponent.md +1 -1
- package/dist/docs/api/index/functions/createImageTargetComponent.md +1 -1
- package/dist/docs/api/index/functions/createInstanceSlotComponent.md +1 -1
- package/dist/docs/api/index/functions/createInstancedMeshComponent.md +1 -1
- package/dist/docs/api/index/functions/createLightComponent.md +1 -1
- package/dist/docs/api/index/functions/createMaterialComponent.md +1 -1
- package/dist/docs/api/index/functions/createMeshComponent.md +1 -1
- package/dist/docs/api/index/functions/createMeshGeometryComponent.md +1 -1
- package/dist/docs/api/index/functions/createModelComponent.md +1 -1
- package/dist/docs/api/index/functions/createNameComponent.md +1 -1
- package/dist/docs/api/index/functions/createObject3DRefComponent.md +1 -1
- package/dist/docs/api/index/functions/createParentIdComponent.md +1 -1
- package/dist/docs/api/index/functions/createPhysicsComponent.md +1 -1
- package/dist/docs/api/index/functions/createPostprocessingComponent.md +1 -1
- package/dist/docs/api/index/functions/createScriptComponent.md +1 -1
- package/dist/docs/api/index/functions/createSelectableComponent.md +1 -1
- package/dist/docs/api/index/functions/createSelectionTransformStateComponent.md +1 -1
- package/dist/docs/api/index/functions/createSpriteComponent.md +1 -1
- package/dist/docs/api/index/functions/createTransformComponent.md +1 -1
- package/dist/docs/api/index/functions/createVideoComponent.md +1 -1
- package/dist/docs/api/index/functions/hydrateWorldFromSnapshot.md +1 -1
- package/dist/docs/api/index/functions/hydrateWorldFromSnapshotDetailed.md +1 -1
- package/dist/docs/api/index/functions/registerDefaultComponentFactories.md +1 -1
- package/dist/docs/api/index/functions/registerDefaultFactories.md +1 -1
- package/dist/docs/api/index/interfaces/EcsSystem.md +3 -3
- package/dist/docs/api/index/interfaces/StateMachine.md +13 -13
- package/dist/docs/api/index/type-aliases/AnimationStateCallbacks.md +4 -4
- package/dist/docs/api/index/type-aliases/ComponentFactory.md +1 -1
- package/dist/docs/api/index/type-aliases/EcsComponentFactoryKind.md +1 -1
- package/dist/docs/api/index/type-aliases/EcsWorldComponentSnapshot.md +3 -3
- package/dist/docs/api/index/type-aliases/EcsWorldStateSnapshotLike.md +4 -4
- package/dist/docs/api/index/type-aliases/HydrateWorldFromSnapshotResult.md +3 -3
- package/dist/docs/api/index/type-aliases/KeyboardKey.md +1 -1
- package/dist/docs/api/index/type-aliases/MouseButton.md +1 -1
- package/dist/docs/api/index/type-aliases/SelectionContext.md +4 -4
- package/dist/docs/api/index/variables/HYDRATABLE_ENTITY_KINDS.md +1 -1
- package/dist/docs/api/index/variables/KeyboardKeys.md +89 -89
- package/dist/docs/api/types/type-aliases/AssetInput.md +3 -3
- package/dist/docs/api/types/type-aliases/CheckboxInput.md +12 -2
- package/dist/docs/api/types/type-aliases/ColorInput.md +1 -1
- package/dist/docs/api/types/type-aliases/ComponentInput.md +4 -4
- package/dist/docs/api/types/type-aliases/ComponentKind.md +1 -1
- package/dist/docs/api/types/type-aliases/DropdownInput.md +3 -3
- package/dist/docs/api/types/type-aliases/DropdownOption.md +3 -3
- package/dist/docs/api/types/type-aliases/EcsEntityEditorKind.md +1 -1
- package/dist/docs/api/types/type-aliases/EcsEntityKind.md +1 -1
- package/dist/docs/api/types/type-aliases/EntityId.md +1 -1
- package/dist/docs/api/types/type-aliases/EntityInput.md +3 -3
- package/dist/docs/api/types/type-aliases/FloatInput.md +1 -1
- package/dist/docs/api/types/type-aliases/IntersectionResult.md +3 -3
- package/dist/docs/api/types/type-aliases/ParentLookup.md +3 -3
- package/dist/docs/api/types/type-aliases/SelectionListener.md +1 -1
- package/dist/docs/api/types/type-aliases/SliderInput.md +5 -5
- package/dist/docs/api/types/type-aliases/TextInput.md +1 -1
- package/dist/docs/api/types/type-aliases/ToggleInput.md +1 -1
- package/dist/docs/api/types/type-aliases/Vec3.md +1 -1
- package/dist/docs/api/types/type-aliases/Vector2Input.md +3 -3
- package/dist/docs/api/types/type-aliases/Vector3Input.md +4 -4
- package/dist/docs/api/types/type-aliases/WorldEntityView.md +1 -1
- package/dist/docs/guide/accessing-components.md +135 -1
- package/dist/docs/guide/authoring-a-behaviour.md +1 -1
- package/dist/docs/guide/behaviour-data-binding/asset-input.md +54 -0
- package/dist/docs/guide/behaviour-data-binding/checkbox-input.md +38 -0
- package/dist/docs/guide/behaviour-data-binding/color-input.md +38 -0
- package/dist/docs/guide/behaviour-data-binding/component-input.md +79 -0
- package/dist/docs/guide/behaviour-data-binding/dropdown-input.md +53 -0
- package/dist/docs/guide/behaviour-data-binding/entity-input.md +100 -0
- package/dist/docs/guide/behaviour-data-binding/float-input.md +35 -0
- package/dist/docs/guide/behaviour-data-binding/index.md +158 -0
- package/dist/docs/guide/behaviour-data-binding/slider-input.md +37 -0
- package/dist/docs/guide/behaviour-data-binding/text-input.md +35 -0
- package/dist/docs/guide/behaviour-data-binding/toggle-input.md +36 -0
- package/dist/docs/guide/behaviour-data-binding/vector2-input.md +36 -0
- package/dist/docs/guide/behaviour-data-binding/vector3-input.md +41 -0
- package/dist/docs/guide/component-catalog.md +2 -0
- package/dist/docs/guide/components/animation.md +40 -1
- package/dist/docs/guide/components/instanced-mesh.md +1 -4
- package/dist/docs/guide/runtime-entity-management.md +302 -0
- package/dist/docs/guide/scene/environment.md +5 -6
- package/dist/docs/guide/scene/index.md +5 -10
- package/dist/docs/guide/scene/postprocessing.md +5 -6
- package/dist/docs/guide/spawning/audio.md +29 -7
- package/dist/docs/guide/systems/object-management-system.md +70 -0
- package/dist/docs/guide/world-api.md +3 -1
- package/dist/factories/index.cjs.map +1 -1
- package/dist/factories/index.d.cts +2 -2
- package/dist/factories/index.d.ts +2 -2
- package/dist/factories/index.js +3 -3
- package/dist/{index-D-gUELQS.d.ts → index-ByX7502C.d.ts} +2 -2
- package/dist/{index-ComEYKYI.d.cts → index-D7q4SRCp.d.cts} +2 -2
- package/dist/index.cjs +84 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +55 -8
- package/dist/index.js.map +1 -1
- package/dist/systems/index.cjs +37 -1
- package/dist/systems/index.cjs.map +1 -1
- package/dist/systems/index.d.cts +2 -2
- package/dist/systems/index.d.ts +2 -2
- package/dist/systems/index.js +3 -3
- package/dist/types.d.cts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/worldSnapshotUtils.d.cts +1 -1
- package/dist/worldSnapshotUtils.d.ts +1 -1
- package/package.json +1 -1
- package/dist/chunk-OIOUWDOS.js.map +0 -1
- package/dist/chunk-XPCVEXMY.js.map +0 -1
- package/dist/docs/guide/inspector-data-binding.md +0 -367
|
@@ -16,6 +16,253 @@ import * as RAPIER from '@dimforge/rapier3d-compat';
|
|
|
16
16
|
declare class Component {
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
/** Skybox rendering modes. `none` disables skybox rendering entirely. */
|
|
20
|
+
type EnvironmentSkyboxType = "gradient" | "color" | "image" | "none";
|
|
21
|
+
/** Gradient distribution applied when {@link EnvironmentSkyboxState.type} is `"gradient"`. */
|
|
22
|
+
type EnvironmentGradientEffect = "radial" | "linear" | "angular";
|
|
23
|
+
/** Fog distance models. `none` disables fog. */
|
|
24
|
+
type EnvironmentFogType = "linear" | "exponential" | "none";
|
|
25
|
+
/** Skybox configuration. Only the fields relevant to {@link type} are read at render time. */
|
|
26
|
+
type EnvironmentSkyboxState = {
|
|
27
|
+
/** Active skybox mode. */
|
|
28
|
+
type: EnvironmentSkyboxType;
|
|
29
|
+
/** Solid color used when {@link type} is `"color"`. `#rrggbb`. */
|
|
30
|
+
color: string;
|
|
31
|
+
/** URL or `localasset://` path of the equirectangular image used when {@link type} is `"image"`. */
|
|
32
|
+
imageUrl?: string;
|
|
33
|
+
/** Gradient parameters used when {@link type} is `"gradient"`. */
|
|
34
|
+
gradient: {
|
|
35
|
+
/** Ordered list of color stops as `#rrggbb` strings. */
|
|
36
|
+
colors: string[];
|
|
37
|
+
/** Gradient distribution. */
|
|
38
|
+
effect: EnvironmentGradientEffect;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
/** Fog configuration. Mirrors three.js `Fog` / `FogExp2`. */
|
|
42
|
+
type EnvironmentFogState = {
|
|
43
|
+
/** Active fog model. */
|
|
44
|
+
type: EnvironmentFogType;
|
|
45
|
+
/** Fog color as `#rrggbb`. */
|
|
46
|
+
color: string;
|
|
47
|
+
/** Linear-fog parameters used when {@link type} is `"linear"`. */
|
|
48
|
+
linear: {
|
|
49
|
+
/** Distance at which fog begins to take effect. */
|
|
50
|
+
near: number;
|
|
51
|
+
/** Distance at which fog reaches full opacity. */
|
|
52
|
+
far: number;
|
|
53
|
+
};
|
|
54
|
+
/** Exponential-fog parameters used when {@link type} is `"exponential"`. */
|
|
55
|
+
exponential: {
|
|
56
|
+
/** Density coefficient. Higher values produce thicker fog. */
|
|
57
|
+
density: number;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
/** World gravity vector applied by the physics system, in world units per second squared. */
|
|
61
|
+
type EnvironmentGravityState = {
|
|
62
|
+
/** Gravity along world X. */
|
|
63
|
+
x: number;
|
|
64
|
+
/** Gravity along world Y (negative pulls objects down). */
|
|
65
|
+
y: number;
|
|
66
|
+
/** Gravity along world Z. */
|
|
67
|
+
z: number;
|
|
68
|
+
};
|
|
69
|
+
/** Aggregated authoring state owned by {@link Environment}. */
|
|
70
|
+
type EnvironmentState = {
|
|
71
|
+
/** Skybox configuration. */
|
|
72
|
+
skybox: EnvironmentSkyboxState;
|
|
73
|
+
/** Fog configuration. */
|
|
74
|
+
fog: EnvironmentFogState;
|
|
75
|
+
/** World gravity. */
|
|
76
|
+
gravity: EnvironmentGravityState;
|
|
77
|
+
/**
|
|
78
|
+
* Fixed timestep (seconds) used by the physics accumulator loop.
|
|
79
|
+
* Physics is stepped in fixed increments of this size each frame.
|
|
80
|
+
* Default is `0.02` (50 Hz).
|
|
81
|
+
*/
|
|
82
|
+
fixedTimeStep: number;
|
|
83
|
+
};
|
|
84
|
+
declare const DEFAULT_ENVIRONMENT_STATE: EnvironmentState;
|
|
85
|
+
/**
|
|
86
|
+
* Scene environment settings: skybox (gradient/color/image), fog
|
|
87
|
+
* (linear/exponential), and gravity vector for the physics world.
|
|
88
|
+
* Singleton-style — attached to one environment entity per scene.
|
|
89
|
+
*
|
|
90
|
+
* Use `world.getEnvironmentComponent()` to access this component directly
|
|
91
|
+
* from a Behaviour script. Mutate `values` to change settings at runtime;
|
|
92
|
+
* `EnvironmentSyncSystem` applies the changes on the next frame.
|
|
93
|
+
*
|
|
94
|
+
* @category Components
|
|
95
|
+
*/
|
|
96
|
+
declare class Environment extends Component {
|
|
97
|
+
/** Aggregated environment authoring state (skybox, fog, gravity). Saved with the project. */
|
|
98
|
+
values: EnvironmentState;
|
|
99
|
+
constructor(values?: Partial<EnvironmentState>);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/** Aggregated post-processing effect chain authored on the scene environment. Each sub-effect has its own `enabled` flag plus per-effect parameters. */
|
|
103
|
+
type PostprocessingState = {
|
|
104
|
+
/** Master toggle. When `false` no post-processing is applied even if individual effects are enabled. */
|
|
105
|
+
postEnabled: boolean;
|
|
106
|
+
/** Depth-of-field (bokeh) effect. */
|
|
107
|
+
dof: {
|
|
108
|
+
/** Enable the effect. */
|
|
109
|
+
enabled: boolean;
|
|
110
|
+
/** Distance to the focal plane in world units. */
|
|
111
|
+
focusDistance: number;
|
|
112
|
+
/** Lens focal length controlling depth-of-field strength. */
|
|
113
|
+
focalLength: number;
|
|
114
|
+
/** Bokeh blur kernel scale. */
|
|
115
|
+
bokehScale: number;
|
|
116
|
+
};
|
|
117
|
+
/** Bloom (HDR glow) effect. */
|
|
118
|
+
bloom: {
|
|
119
|
+
/** Enable the effect. */
|
|
120
|
+
enabled: boolean;
|
|
121
|
+
/** Strength of the bloom contribution. */
|
|
122
|
+
intensity: number;
|
|
123
|
+
/** Luminance threshold above which pixels bloom. */
|
|
124
|
+
threshold: number;
|
|
125
|
+
/** Blur radius applied to the bloom buffer. */
|
|
126
|
+
radius: number;
|
|
127
|
+
};
|
|
128
|
+
/** Vignette (corner darkening) effect. */
|
|
129
|
+
vignette: {
|
|
130
|
+
/** Enable the effect. */
|
|
131
|
+
enabled: boolean;
|
|
132
|
+
/** Distance from screen center where the vignette begins. */
|
|
133
|
+
offset: number;
|
|
134
|
+
/** Maximum darkness applied at screen edges. */
|
|
135
|
+
darkness: number;
|
|
136
|
+
};
|
|
137
|
+
/** Chromatic aberration (RGB channel offset) effect. */
|
|
138
|
+
chromAberration: {
|
|
139
|
+
/** Enable the effect. */
|
|
140
|
+
enabled: boolean;
|
|
141
|
+
/** Horizontal channel offset. */
|
|
142
|
+
offsetX: number;
|
|
143
|
+
/** Vertical channel offset. */
|
|
144
|
+
offsetY: number;
|
|
145
|
+
};
|
|
146
|
+
/** Film-noise overlay. */
|
|
147
|
+
noise: {
|
|
148
|
+
/** Enable the effect. */
|
|
149
|
+
enabled: boolean;
|
|
150
|
+
/** Opacity of the noise layer in `[0, 1]`. */
|
|
151
|
+
opacity: number;
|
|
152
|
+
};
|
|
153
|
+
/** Pixelation (mosaic) effect. */
|
|
154
|
+
pixelation: {
|
|
155
|
+
/** Enable the effect. */
|
|
156
|
+
enabled: boolean;
|
|
157
|
+
/** Pixel block size in screen pixels. */
|
|
158
|
+
granularity: number;
|
|
159
|
+
};
|
|
160
|
+
/** Tone-mapping exposure control. */
|
|
161
|
+
toneMapping: {
|
|
162
|
+
/** Enable the effect. */
|
|
163
|
+
enabled: boolean;
|
|
164
|
+
/** Exposure multiplier applied before tone-mapping. */
|
|
165
|
+
exposure: number;
|
|
166
|
+
};
|
|
167
|
+
/** Hue/saturation color grading. */
|
|
168
|
+
hueSaturation: {
|
|
169
|
+
/** Enable the effect. */
|
|
170
|
+
enabled: boolean;
|
|
171
|
+
/** Hue rotation in radians. */
|
|
172
|
+
hue: number;
|
|
173
|
+
/** Saturation offset (`0` = unchanged, `>0` = more saturated). */
|
|
174
|
+
saturation: number;
|
|
175
|
+
};
|
|
176
|
+
/** Sepia color grade. */
|
|
177
|
+
sepia: {
|
|
178
|
+
/** Enable the effect. */
|
|
179
|
+
enabled: boolean;
|
|
180
|
+
/** Blend strength between original and sepia in `[0, 1]`. */
|
|
181
|
+
intensity: number;
|
|
182
|
+
};
|
|
183
|
+
/** SMAA antialiasing pass. */
|
|
184
|
+
smaa: {
|
|
185
|
+
/** Enable the effect. */
|
|
186
|
+
enabled: boolean;
|
|
187
|
+
};
|
|
188
|
+
/** Screen-space ambient occlusion. */
|
|
189
|
+
ssao: {
|
|
190
|
+
/** Enable the effect. */
|
|
191
|
+
enabled: boolean;
|
|
192
|
+
/** Strength of the AO contribution. */
|
|
193
|
+
intensity: number;
|
|
194
|
+
/** Sampling radius in world units. */
|
|
195
|
+
radius: number;
|
|
196
|
+
};
|
|
197
|
+
/** Dot-screen (halftone) effect. */
|
|
198
|
+
dotScreen: {
|
|
199
|
+
/** Enable the effect. */
|
|
200
|
+
enabled: boolean;
|
|
201
|
+
/** Pattern scale (legacy field; use {@link scale} where available). */
|
|
202
|
+
dotScreenScale: number;
|
|
203
|
+
/** Pattern rotation in radians (legacy field; use {@link angle} where available). */
|
|
204
|
+
dotScreenAngle: number;
|
|
205
|
+
/** Pattern rotation in radians. */
|
|
206
|
+
angle?: number;
|
|
207
|
+
/** Pattern scale. */
|
|
208
|
+
scale?: number;
|
|
209
|
+
/** Three.js blend function override. */
|
|
210
|
+
blendFunction?: number;
|
|
211
|
+
/** Effect opacity in `[0, 1]`. */
|
|
212
|
+
opacity?: number;
|
|
213
|
+
};
|
|
214
|
+
/** Glitch effect (digital corruption simulation). */
|
|
215
|
+
glitch: {
|
|
216
|
+
/** Enable the effect. */
|
|
217
|
+
enabled: boolean;
|
|
218
|
+
/** Three.js blend function override. */
|
|
219
|
+
blendFunction?: number;
|
|
220
|
+
/** RGB channel offset applied during a glitch burst. */
|
|
221
|
+
chromaticAberrationOffset?: {
|
|
222
|
+
x: number;
|
|
223
|
+
y: number;
|
|
224
|
+
} | [number, number];
|
|
225
|
+
/** `[min, max]` delay (seconds) between glitch bursts. */
|
|
226
|
+
delay?: [number, number];
|
|
227
|
+
/** `[min, max]` duration (seconds) of each glitch burst. */
|
|
228
|
+
duration?: [number, number];
|
|
229
|
+
/** Glitch displacement strength (scalar or per-axis). */
|
|
230
|
+
strength?: number | {
|
|
231
|
+
x: number;
|
|
232
|
+
y: number;
|
|
233
|
+
};
|
|
234
|
+
/** Size of the displacement texture sampled by the glitch shader. */
|
|
235
|
+
dtSize?: number;
|
|
236
|
+
/** Fraction of columns affected during a glitch burst. */
|
|
237
|
+
columns?: number;
|
|
238
|
+
/** Ratio between weak and strong glitch bursts. */
|
|
239
|
+
ratio?: number;
|
|
240
|
+
/** Glitch mode label (matches the postprocessing library's mode enum). */
|
|
241
|
+
mode?: string;
|
|
242
|
+
/** Force the glitch to remain active. */
|
|
243
|
+
active?: boolean;
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
declare const DEFAULT_POSTPROCESSING_STATE: PostprocessingState;
|
|
247
|
+
/**
|
|
248
|
+
* Postprocessing stack settings (depth-of-field, bloom, vignette, chromatic
|
|
249
|
+
* aberration, noise, pixelation, tone mapping, hue/saturation, sepia, SMAA,
|
|
250
|
+
*
|
|
251
|
+
* Use `world.getPostprocessingComponent()` to access this component directly
|
|
252
|
+
* from a Behaviour script. Mutate `values` to toggle effects or adjust
|
|
253
|
+
* parameters at runtime; `PostprocessingSyncSystem` applies changes next frame.
|
|
254
|
+
* SSAO, dot-screen, glitch). The render system applies enabled effects in a
|
|
255
|
+
* `postprocessing`-library composer when `postEnabled` is `true`. Singleton-
|
|
256
|
+
* style — attached to one entity per scene.
|
|
257
|
+
*
|
|
258
|
+
* @category Components
|
|
259
|
+
*/
|
|
260
|
+
declare class Postprocessing extends Component {
|
|
261
|
+
/** Aggregated post-processing state. Saved with the project. */
|
|
262
|
+
values: PostprocessingState;
|
|
263
|
+
constructor(values?: Partial<PostprocessingState>);
|
|
264
|
+
}
|
|
265
|
+
|
|
19
266
|
/**
|
|
20
267
|
* Records the parent entity id for hierarchical scene graphs. `null` means
|
|
21
268
|
* the entity is at the world root. The `ObjectManagementSystem` reconciles
|
|
@@ -117,7 +364,10 @@ type DropdownInput = {
|
|
|
117
364
|
options: DropdownOption[];
|
|
118
365
|
value: string | any;
|
|
119
366
|
};
|
|
120
|
-
type CheckboxInput =
|
|
367
|
+
type CheckboxInput = {
|
|
368
|
+
type: "checkbox";
|
|
369
|
+
value: boolean;
|
|
370
|
+
};
|
|
121
371
|
type ToggleInput = boolean;
|
|
122
372
|
type AssetInput = {
|
|
123
373
|
path: string;
|
|
@@ -253,7 +503,29 @@ declare class ObjectManagementSystem implements EcsSystem {
|
|
|
253
503
|
createComponentNow(kind: EcsComponentFactoryKind, world: World, entityId: EntityId, ...args: any[]): unknown;
|
|
254
504
|
requestCreate(kind: EcsEntityKind, payload?: CreatePayload, onCreated?: (entityId: EntityId) => void): void;
|
|
255
505
|
createNow(kind: EcsEntityKind, world: World, payload?: CreatePayload): EntityId;
|
|
256
|
-
|
|
506
|
+
/**
|
|
507
|
+
* Removes an entity from the ECS world and its associated `Object3D` from the
|
|
508
|
+
* THREE.js scene graph.
|
|
509
|
+
*
|
|
510
|
+
* @param world - The world the entity belongs to.
|
|
511
|
+
* @param entityId - The entity to remove.
|
|
512
|
+
* @param dispose - When `true`, traverses the entity's `Object3D` subtree and
|
|
513
|
+
* calls `.dispose()` on every `BufferGeometry` and `Material` found. Pass
|
|
514
|
+
* `true` when the entity will not be reused and you want to free GPU memory
|
|
515
|
+
* immediately (e.g. dynamically spawned objects). Defaults to `false`.
|
|
516
|
+
* @returns `true` if the entity existed and was removed; `false` if the entity
|
|
517
|
+
* was not found.
|
|
518
|
+
*
|
|
519
|
+
* @example
|
|
520
|
+
* ```ts
|
|
521
|
+
* // Remove from scene, keep GPU resources (safe if geometry is shared)
|
|
522
|
+
* objects.deleteEntity(world, entityId);
|
|
523
|
+
*
|
|
524
|
+
* // Remove from scene and free GPU memory (use for one-off spawned objects)
|
|
525
|
+
* objects.deleteEntity(world, entityId, true);
|
|
526
|
+
* ```
|
|
527
|
+
*/
|
|
528
|
+
deleteEntity(world: World, entityId: EntityId, dispose?: boolean): boolean;
|
|
257
529
|
setParent(world: World, entityId: EntityId, parentId: EntityId | null, options?: {
|
|
258
530
|
preserveWorldTransform?: boolean;
|
|
259
531
|
}): boolean;
|
|
@@ -465,6 +737,8 @@ declare class World {
|
|
|
465
737
|
private components;
|
|
466
738
|
private inputSystem;
|
|
467
739
|
private objectManagementSystem;
|
|
740
|
+
private environmentSyncSystem;
|
|
741
|
+
private postprocessingSyncSystem;
|
|
468
742
|
private rapierModule;
|
|
469
743
|
private rapierModulePromise;
|
|
470
744
|
private physicsWorld;
|
|
@@ -592,6 +866,41 @@ declare class World {
|
|
|
592
866
|
getEntityByName(name: string): WorldEntityView | null;
|
|
593
867
|
getEntityById(entityId: number): WorldEntityView | null;
|
|
594
868
|
getObjectManagementSystem(): ObjectManagementSystem;
|
|
869
|
+
/**
|
|
870
|
+
* Returns the singleton {@link Environment} component for the scene, or
|
|
871
|
+
* `undefined` if no environment entity exists yet.
|
|
872
|
+
*
|
|
873
|
+
* Mutate `component.values` directly to change skybox, fog, or gravity at
|
|
874
|
+
* runtime — `EnvironmentSyncSystem` picks up the changes next frame.
|
|
875
|
+
*
|
|
876
|
+
* @example
|
|
877
|
+
* ```ts
|
|
878
|
+
* const env = this.world.getEnvironmentComponent();
|
|
879
|
+
* if (env) {
|
|
880
|
+
* env.values.fog.type = "exponential";
|
|
881
|
+
* env.values.fog.exponential.density = 0.01;
|
|
882
|
+
* }
|
|
883
|
+
* ```
|
|
884
|
+
*/
|
|
885
|
+
getEnvironmentComponent(): Environment | undefined;
|
|
886
|
+
/**
|
|
887
|
+
* Returns the singleton {@link Postprocessing} component for the scene, or
|
|
888
|
+
* `undefined` if no postprocessing entity exists yet.
|
|
889
|
+
*
|
|
890
|
+
* Mutate `component.values` directly to enable/disable effects or tweak
|
|
891
|
+
* parameters at runtime — `PostprocessingSyncSystem` picks up the changes
|
|
892
|
+
* next frame.
|
|
893
|
+
*
|
|
894
|
+
* @example
|
|
895
|
+
* ```ts
|
|
896
|
+
* const pp = this.world.getPostprocessingComponent();
|
|
897
|
+
* if (pp) {
|
|
898
|
+
* pp.values.bloom.enabled = true;
|
|
899
|
+
* pp.values.bloom.intensity = 2.0;
|
|
900
|
+
* }
|
|
901
|
+
* ```
|
|
902
|
+
*/
|
|
903
|
+
getPostprocessingComponent(): Postprocessing | undefined;
|
|
595
904
|
/**
|
|
596
905
|
* Cast a ray from `origin` along `direction` and return every intersected
|
|
597
906
|
* entity-bound mesh, sorted by distance. Each result is a standard
|
|
@@ -658,4 +967,4 @@ interface EcsSystem {
|
|
|
658
967
|
dispose?(world: World): void;
|
|
659
968
|
}
|
|
660
969
|
|
|
661
|
-
export { type AssetInput as A, type
|
|
970
|
+
export { cloneHistoryValue as $, type AssetInput as A, type IntersectionResult as B, Component as C, DEFAULT_ENVIRONMENT_STATE as D, Environment as E, type FloatInput as F, KeyboardKeys as G, type SliderInput as H, InputSystem as I, type TextInput as J, type KeyboardKey as K, type ToggleInput as L, type MouseButton as M, TransformSyncSystem as N, ObjectManagementSystem as O, ParentId as P, type Vec3 as Q, RenderSystem as R, type SelectionListener as S, TransformComponent as T, type Vector2Input as U, type Vec3$1 as V, type WorldEntityView$1 as W, type Vector3Input as X, type AnyComponent as Y, DEBUG_CHANGE_IGNORED_SYSTEMS as Z, type WorldHistorySnapshot as _, DEFAULT_POSTPROCESSING_STATE as a, normalizeDebugValue as a0, type EnvironmentFogState as b, type EnvironmentFogType as c, type EnvironmentGradientEffect as d, type EnvironmentSkyboxState as e, type EnvironmentSkyboxType as f, type EnvironmentState as g, Postprocessing as h, type PostprocessingState as i, type TransformData as j, type EcsSystem as k, World as l, type ComponentClass as m, type ParentLookup as n, type EcsEntityKind as o, type CheckboxInput as p, type ColorInput as q, type ComponentFactory as r, type ComponentInput as s, type ComponentKind as t, type DropdownInput as u, type DropdownOption as v, type EcsComponentFactoryKind as w, type EcsEntityEditorKind as x, type EntityId as y, type EntityInput as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
|
-
import { C as Component,
|
|
2
|
+
import { C as Component, o as EcsEntityKind, x as EcsEntityEditorKind, y as EntityId } from './System-CTTwEGn1.cjs';
|
|
3
3
|
import * as RAPIER from '@dimforge/rapier3d-compat';
|
|
4
4
|
|
|
5
5
|
interface StateMachine {
|
|
@@ -313,245 +313,6 @@ declare class AudioComponent extends Component {
|
|
|
313
313
|
stop(): void;
|
|
314
314
|
}
|
|
315
315
|
|
|
316
|
-
/** Skybox rendering modes. `none` disables skybox rendering entirely. */
|
|
317
|
-
type EnvironmentSkyboxType = "gradient" | "color" | "image" | "none";
|
|
318
|
-
/** Gradient distribution applied when {@link EnvironmentSkyboxState.type} is `"gradient"`. */
|
|
319
|
-
type EnvironmentGradientEffect = "radial" | "linear" | "angular";
|
|
320
|
-
/** Fog distance models. `none` disables fog. */
|
|
321
|
-
type EnvironmentFogType = "linear" | "exponential" | "none";
|
|
322
|
-
/** Skybox configuration. Only the fields relevant to {@link type} are read at render time. */
|
|
323
|
-
type EnvironmentSkyboxState = {
|
|
324
|
-
/** Active skybox mode. */
|
|
325
|
-
type: EnvironmentSkyboxType;
|
|
326
|
-
/** Solid color used when {@link type} is `"color"`. `#rrggbb`. */
|
|
327
|
-
color: string;
|
|
328
|
-
/** URL or `localasset://` path of the equirectangular image used when {@link type} is `"image"`. */
|
|
329
|
-
imageUrl?: string;
|
|
330
|
-
/** Gradient parameters used when {@link type} is `"gradient"`. */
|
|
331
|
-
gradient: {
|
|
332
|
-
/** Ordered list of color stops as `#rrggbb` strings. */
|
|
333
|
-
colors: string[];
|
|
334
|
-
/** Gradient distribution. */
|
|
335
|
-
effect: EnvironmentGradientEffect;
|
|
336
|
-
};
|
|
337
|
-
};
|
|
338
|
-
/** Fog configuration. Mirrors three.js `Fog` / `FogExp2`. */
|
|
339
|
-
type EnvironmentFogState = {
|
|
340
|
-
/** Active fog model. */
|
|
341
|
-
type: EnvironmentFogType;
|
|
342
|
-
/** Fog color as `#rrggbb`. */
|
|
343
|
-
color: string;
|
|
344
|
-
/** Linear-fog parameters used when {@link type} is `"linear"`. */
|
|
345
|
-
linear: {
|
|
346
|
-
/** Distance at which fog begins to take effect. */
|
|
347
|
-
near: number;
|
|
348
|
-
/** Distance at which fog reaches full opacity. */
|
|
349
|
-
far: number;
|
|
350
|
-
};
|
|
351
|
-
/** Exponential-fog parameters used when {@link type} is `"exponential"`. */
|
|
352
|
-
exponential: {
|
|
353
|
-
/** Density coefficient. Higher values produce thicker fog. */
|
|
354
|
-
density: number;
|
|
355
|
-
};
|
|
356
|
-
};
|
|
357
|
-
/** World gravity vector applied by the physics system, in world units per second squared. */
|
|
358
|
-
type EnvironmentGravityState = {
|
|
359
|
-
/** Gravity along world X. */
|
|
360
|
-
x: number;
|
|
361
|
-
/** Gravity along world Y (negative pulls objects down). */
|
|
362
|
-
y: number;
|
|
363
|
-
/** Gravity along world Z. */
|
|
364
|
-
z: number;
|
|
365
|
-
};
|
|
366
|
-
/** Aggregated authoring state owned by {@link Environment}. */
|
|
367
|
-
type EnvironmentState = {
|
|
368
|
-
/** Skybox configuration. */
|
|
369
|
-
skybox: EnvironmentSkyboxState;
|
|
370
|
-
/** Fog configuration. */
|
|
371
|
-
fog: EnvironmentFogState;
|
|
372
|
-
/** World gravity. */
|
|
373
|
-
gravity: EnvironmentGravityState;
|
|
374
|
-
/**
|
|
375
|
-
* Fixed timestep (seconds) used by the physics accumulator loop.
|
|
376
|
-
* Physics is stepped in fixed increments of this size each frame.
|
|
377
|
-
* Default is `0.02` (50 Hz).
|
|
378
|
-
*/
|
|
379
|
-
fixedTimeStep: number;
|
|
380
|
-
};
|
|
381
|
-
declare const DEFAULT_ENVIRONMENT_STATE: EnvironmentState;
|
|
382
|
-
/**
|
|
383
|
-
* Scene environment settings: skybox (gradient/color/image), fog
|
|
384
|
-
* (linear/exponential), and gravity vector for the physics world.
|
|
385
|
-
* Singleton-style — attached to one environment entity per scene.
|
|
386
|
-
*
|
|
387
|
-
* @category Components
|
|
388
|
-
*/
|
|
389
|
-
declare class Environment extends Component {
|
|
390
|
-
/** Aggregated environment authoring state (skybox, fog, gravity). Saved with the project. */
|
|
391
|
-
values: EnvironmentState;
|
|
392
|
-
constructor(values?: Partial<EnvironmentState>);
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
/** Aggregated post-processing effect chain authored on the scene environment. Each sub-effect has its own `enabled` flag plus per-effect parameters. */
|
|
396
|
-
type PostprocessingState = {
|
|
397
|
-
/** Master toggle. When `false` no post-processing is applied even if individual effects are enabled. */
|
|
398
|
-
postEnabled: boolean;
|
|
399
|
-
/** Depth-of-field (bokeh) effect. */
|
|
400
|
-
dof: {
|
|
401
|
-
/** Enable the effect. */
|
|
402
|
-
enabled: boolean;
|
|
403
|
-
/** Distance to the focal plane in world units. */
|
|
404
|
-
focusDistance: number;
|
|
405
|
-
/** Lens focal length controlling depth-of-field strength. */
|
|
406
|
-
focalLength: number;
|
|
407
|
-
/** Bokeh blur kernel scale. */
|
|
408
|
-
bokehScale: number;
|
|
409
|
-
};
|
|
410
|
-
/** Bloom (HDR glow) effect. */
|
|
411
|
-
bloom: {
|
|
412
|
-
/** Enable the effect. */
|
|
413
|
-
enabled: boolean;
|
|
414
|
-
/** Strength of the bloom contribution. */
|
|
415
|
-
intensity: number;
|
|
416
|
-
/** Luminance threshold above which pixels bloom. */
|
|
417
|
-
threshold: number;
|
|
418
|
-
/** Blur radius applied to the bloom buffer. */
|
|
419
|
-
radius: number;
|
|
420
|
-
};
|
|
421
|
-
/** Vignette (corner darkening) effect. */
|
|
422
|
-
vignette: {
|
|
423
|
-
/** Enable the effect. */
|
|
424
|
-
enabled: boolean;
|
|
425
|
-
/** Distance from screen center where the vignette begins. */
|
|
426
|
-
offset: number;
|
|
427
|
-
/** Maximum darkness applied at screen edges. */
|
|
428
|
-
darkness: number;
|
|
429
|
-
};
|
|
430
|
-
/** Chromatic aberration (RGB channel offset) effect. */
|
|
431
|
-
chromAberration: {
|
|
432
|
-
/** Enable the effect. */
|
|
433
|
-
enabled: boolean;
|
|
434
|
-
/** Horizontal channel offset. */
|
|
435
|
-
offsetX: number;
|
|
436
|
-
/** Vertical channel offset. */
|
|
437
|
-
offsetY: number;
|
|
438
|
-
};
|
|
439
|
-
/** Film-noise overlay. */
|
|
440
|
-
noise: {
|
|
441
|
-
/** Enable the effect. */
|
|
442
|
-
enabled: boolean;
|
|
443
|
-
/** Opacity of the noise layer in `[0, 1]`. */
|
|
444
|
-
opacity: number;
|
|
445
|
-
};
|
|
446
|
-
/** Pixelation (mosaic) effect. */
|
|
447
|
-
pixelation: {
|
|
448
|
-
/** Enable the effect. */
|
|
449
|
-
enabled: boolean;
|
|
450
|
-
/** Pixel block size in screen pixels. */
|
|
451
|
-
granularity: number;
|
|
452
|
-
};
|
|
453
|
-
/** Tone-mapping exposure control. */
|
|
454
|
-
toneMapping: {
|
|
455
|
-
/** Enable the effect. */
|
|
456
|
-
enabled: boolean;
|
|
457
|
-
/** Exposure multiplier applied before tone-mapping. */
|
|
458
|
-
exposure: number;
|
|
459
|
-
};
|
|
460
|
-
/** Hue/saturation color grading. */
|
|
461
|
-
hueSaturation: {
|
|
462
|
-
/** Enable the effect. */
|
|
463
|
-
enabled: boolean;
|
|
464
|
-
/** Hue rotation in radians. */
|
|
465
|
-
hue: number;
|
|
466
|
-
/** Saturation offset (`0` = unchanged, `>0` = more saturated). */
|
|
467
|
-
saturation: number;
|
|
468
|
-
};
|
|
469
|
-
/** Sepia color grade. */
|
|
470
|
-
sepia: {
|
|
471
|
-
/** Enable the effect. */
|
|
472
|
-
enabled: boolean;
|
|
473
|
-
/** Blend strength between original and sepia in `[0, 1]`. */
|
|
474
|
-
intensity: number;
|
|
475
|
-
};
|
|
476
|
-
/** SMAA antialiasing pass. */
|
|
477
|
-
smaa: {
|
|
478
|
-
/** Enable the effect. */
|
|
479
|
-
enabled: boolean;
|
|
480
|
-
};
|
|
481
|
-
/** Screen-space ambient occlusion. */
|
|
482
|
-
ssao: {
|
|
483
|
-
/** Enable the effect. */
|
|
484
|
-
enabled: boolean;
|
|
485
|
-
/** Strength of the AO contribution. */
|
|
486
|
-
intensity: number;
|
|
487
|
-
/** Sampling radius in world units. */
|
|
488
|
-
radius: number;
|
|
489
|
-
};
|
|
490
|
-
/** Dot-screen (halftone) effect. */
|
|
491
|
-
dotScreen: {
|
|
492
|
-
/** Enable the effect. */
|
|
493
|
-
enabled: boolean;
|
|
494
|
-
/** Pattern scale (legacy field; use {@link scale} where available). */
|
|
495
|
-
dotScreenScale: number;
|
|
496
|
-
/** Pattern rotation in radians (legacy field; use {@link angle} where available). */
|
|
497
|
-
dotScreenAngle: number;
|
|
498
|
-
/** Pattern rotation in radians. */
|
|
499
|
-
angle?: number;
|
|
500
|
-
/** Pattern scale. */
|
|
501
|
-
scale?: number;
|
|
502
|
-
/** Three.js blend function override. */
|
|
503
|
-
blendFunction?: number;
|
|
504
|
-
/** Effect opacity in `[0, 1]`. */
|
|
505
|
-
opacity?: number;
|
|
506
|
-
};
|
|
507
|
-
/** Glitch effect (digital corruption simulation). */
|
|
508
|
-
glitch: {
|
|
509
|
-
/** Enable the effect. */
|
|
510
|
-
enabled: boolean;
|
|
511
|
-
/** Three.js blend function override. */
|
|
512
|
-
blendFunction?: number;
|
|
513
|
-
/** RGB channel offset applied during a glitch burst. */
|
|
514
|
-
chromaticAberrationOffset?: {
|
|
515
|
-
x: number;
|
|
516
|
-
y: number;
|
|
517
|
-
} | [number, number];
|
|
518
|
-
/** `[min, max]` delay (seconds) between glitch bursts. */
|
|
519
|
-
delay?: [number, number];
|
|
520
|
-
/** `[min, max]` duration (seconds) of each glitch burst. */
|
|
521
|
-
duration?: [number, number];
|
|
522
|
-
/** Glitch displacement strength (scalar or per-axis). */
|
|
523
|
-
strength?: number | {
|
|
524
|
-
x: number;
|
|
525
|
-
y: number;
|
|
526
|
-
};
|
|
527
|
-
/** Size of the displacement texture sampled by the glitch shader. */
|
|
528
|
-
dtSize?: number;
|
|
529
|
-
/** Fraction of columns affected during a glitch burst. */
|
|
530
|
-
columns?: number;
|
|
531
|
-
/** Ratio between weak and strong glitch bursts. */
|
|
532
|
-
ratio?: number;
|
|
533
|
-
/** Glitch mode label (matches the postprocessing library's mode enum). */
|
|
534
|
-
mode?: string;
|
|
535
|
-
/** Force the glitch to remain active. */
|
|
536
|
-
active?: boolean;
|
|
537
|
-
};
|
|
538
|
-
};
|
|
539
|
-
declare const DEFAULT_POSTPROCESSING_STATE: PostprocessingState;
|
|
540
|
-
/**
|
|
541
|
-
* Postprocessing stack settings (depth-of-field, bloom, vignette, chromatic
|
|
542
|
-
* aberration, noise, pixelation, tone mapping, hue/saturation, sepia, SMAA,
|
|
543
|
-
* SSAO, dot-screen, glitch). The render system applies enabled effects in a
|
|
544
|
-
* `postprocessing`-library composer when `postEnabled` is `true`. Singleton-
|
|
545
|
-
* style — attached to one entity per scene.
|
|
546
|
-
*
|
|
547
|
-
* @category Components
|
|
548
|
-
*/
|
|
549
|
-
declare class Postprocessing extends Component {
|
|
550
|
-
/** Aggregated post-processing state. Saved with the project. */
|
|
551
|
-
values: PostprocessingState;
|
|
552
|
-
constructor(values?: Partial<PostprocessingState>);
|
|
553
|
-
}
|
|
554
|
-
|
|
555
316
|
/** Editable primitive kinds the mesh-geometry system can rebuild on the fly. `model` is a passthrough placeholder for entities that own a loaded GLTF/GLB instead. */
|
|
556
317
|
type EditableMeshObjectKind = "capsule" | "cube" | "cylinder" | "model" | "plane" | "sphere";
|
|
557
318
|
/** Box geometry parameters in world units. */
|
|
@@ -1352,4 +1113,4 @@ declare class VideoComponent extends Component {
|
|
|
1352
1113
|
stop(): void;
|
|
1353
1114
|
}
|
|
1354
1115
|
|
|
1355
|
-
export { type
|
|
1116
|
+
export { type TransformSpaceValue as $, AnimationComponent as A, MeshGeometryComponent as B, CameraComponent as C, DEFAULT_COLLIDER_STATE as D, type EditableMeshObjectKind as E, type MeshGeometryParameters as F, type MeshGeometryParametersByKind as G, ModelComponent as H, ImageComponent as I, type PhysicsState as J, type PlaneMeshParameters as K, LightComponent as L, MaterialComponent as M, Name as N, Object3DRef as O, PhysicsComponent as P, type RadiusMeshParameters as Q, type RadiusHeightMeshParameters as R, type RigidbodyState as S, type RigidbodyType as T, ScriptComponent as U, type ScriptEntry as V, Selectable as W, SelectionTransformState as X, SpriteComponent as Y, type TextureFilteringValue as Z, type TransformModeValue as _, type AnimationComponentOptions as a, VideoComponent as a0, normalizePhysicsState as a1, type AnimationStateCallbacks as a2, AnimationStateMachine as a3, AnimationStateManager as a4, type StateMachine as a5, AudioComponent as b, type CameraComponentOptions as c, type CameraProjection as d, type CameraRuntimeType as e, type ColliderShape as f, type ColliderState as g, type CubeMeshParameters as h, DEFAULT_INSTANCED_MESH_PARAMETERS as i, DEFAULT_INSTANCE_TRANSFORM as j, DEFAULT_MESH_GEOMETRY_PARAMETERS as k, DEFAULT_PHYSICS_STATE as l, DEFAULT_RIGIDBODY_STATE as m, EntityType as n, ImageTarget as o, ImageTargetAnchor as p, type ImageTargetAnchorOptions as q, type ImageTargetReference as r, InstanceSlotComponent as s, type InstanceTransform as t, InstancedMeshComponent as u, type InstancedMeshKind as v, type LightValueState as w, type MaterialTypeValue as x, type MaterialValueState as y, MeshComponent as z };
|