@dcl/ecs 7.22.2-23601767788.commit-ff97f2f → 7.22.3-23869239837.commit-39ea50a
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/components/generated/component-names.gen.js +0 -2
- package/dist/components/generated/global.gen.d.ts +0 -4
- package/dist/components/generated/global.gen.js +0 -2
- package/dist/components/generated/index.gen.d.ts +0 -8
- package/dist/components/generated/index.gen.js +0 -10
- package/dist/components/generated/pb/decentraland/sdk/components/common/input_action.gen.d.ts +1 -2
- package/dist/components/generated/pb/decentraland/sdk/components/common/input_action.gen.js +0 -1
- package/dist/components/generated/pb/decentraland/sdk/components/virtual_camera.gen.d.ts +0 -3
- package/dist/components/generated/pb/decentraland/sdk/components/virtual_camera.gen.js +1 -10
- package/dist/components/index.d.ts +0 -4
- package/dist/components/index.js +0 -3
- package/dist/components/types.d.ts +0 -1
- package/dist/engine/lww-element-set-component-definition.d.ts +2 -2
- package/dist/engine/lww-element-set-component-definition.js +24 -7
- package/dist/index.d.ts +1 -2
- package/dist/index.js +0 -1
- package/dist-cjs/components/generated/component-names.gen.js +0 -2
- package/dist-cjs/components/generated/global.gen.d.ts +0 -4
- package/dist-cjs/components/generated/global.gen.js +1 -4
- package/dist-cjs/components/generated/index.gen.d.ts +0 -8
- package/dist-cjs/components/generated/index.gen.js +2 -14
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/common/input_action.gen.d.ts +1 -2
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/common/input_action.gen.js +0 -1
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/virtual_camera.gen.d.ts +0 -3
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/virtual_camera.gen.js +1 -10
- package/dist-cjs/components/index.d.ts +0 -4
- package/dist-cjs/components/index.js +1 -5
- package/dist-cjs/components/types.d.ts +0 -1
- package/dist-cjs/engine/lww-element-set-component-definition.d.ts +2 -2
- package/dist-cjs/engine/lww-element-set-component-definition.js +24 -7
- package/dist-cjs/index.d.ts +1 -2
- package/dist-cjs/index.js +1 -2
- package/package.json +2 -2
- package/dist/components/extended/AudioAnalysis.d.ts +0 -55
- package/dist/components/extended/AudioAnalysis.js +0 -66
- package/dist/components/generated/AudioAnalysis.gen.d.ts +0 -1
- package/dist/components/generated/AudioAnalysis.gen.js +0 -25
- package/dist/components/generated/AvatarLocomotionSettings.gen.d.ts +0 -1
- package/dist/components/generated/AvatarLocomotionSettings.gen.js +0 -25
- package/dist/components/generated/pb/decentraland/sdk/components/audio_analysis.gen.d.ts +0 -37
- package/dist/components/generated/pb/decentraland/sdk/components/audio_analysis.gen.js +0 -161
- package/dist/components/generated/pb/decentraland/sdk/components/avatar_locomotion_settings.gen.d.ts +0 -35
- package/dist/components/generated/pb/decentraland/sdk/components/avatar_locomotion_settings.gen.js +0 -123
- package/dist-cjs/components/extended/AudioAnalysis.d.ts +0 -55
- package/dist-cjs/components/extended/AudioAnalysis.js +0 -70
- package/dist-cjs/components/generated/AudioAnalysis.gen.d.ts +0 -1
- package/dist-cjs/components/generated/AudioAnalysis.gen.js +0 -28
- package/dist-cjs/components/generated/AvatarLocomotionSettings.gen.d.ts +0 -1
- package/dist-cjs/components/generated/AvatarLocomotionSettings.gen.js +0 -28
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/audio_analysis.gen.d.ts +0 -37
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/audio_analysis.gen.js +0 -167
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/avatar_locomotion_settings.gen.d.ts +0 -35
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/avatar_locomotion_settings.gen.js +0 -129
|
@@ -14,12 +14,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.UiInput = exports.UiDropdownResult = exports.UiDropdown = exports.UiCanvasInformation = exports.UiBackground = exports.TweenState = exports.TweenSequence = exports.Tween = exports.TriggerAreaResult = exports.TriggerArea = exports.TextShape = exports.SkyboxTime = exports.RealmInfo = exports.RaycastResult = exports.Raycast = exports.PrimaryPointerInfo = exports.PointerLock = exports.PointerEventsResult = exports.PointerEvents = exports.PlayerIdentityData = exports.PhysicsCombinedImpulse = exports.PhysicsCombinedForce = exports.NftShape = exports.MeshRenderer = exports.MeshCollider = exports.Material = exports.MainCamera = exports.LightSource = exports.InputModifier = exports.GltfNodeModifiers = exports.GltfContainerLoadingState = exports.GltfContainer = exports.EngineInfo = exports.CameraModeArea = exports.CameraMode = exports.Billboard = exports.AvatarShape = exports.AvatarModifierArea = exports.
|
|
18
|
-
exports.componentDefinitionByName = exports.VisibilityComponent = exports.VirtualCamera = exports.VideoPlayer = exports.VideoEvent = exports.UiTransform =
|
|
17
|
+
exports.UiText = exports.UiInputResult = exports.UiInput = exports.UiDropdownResult = exports.UiDropdown = exports.UiCanvasInformation = exports.UiBackground = exports.TweenState = exports.TweenSequence = exports.Tween = exports.TriggerAreaResult = exports.TriggerArea = exports.TextShape = exports.SkyboxTime = exports.RealmInfo = exports.RaycastResult = exports.Raycast = exports.PrimaryPointerInfo = exports.PointerLock = exports.PointerEventsResult = exports.PointerEvents = exports.PlayerIdentityData = exports.PhysicsCombinedImpulse = exports.PhysicsCombinedForce = exports.NftShape = exports.MeshRenderer = exports.MeshCollider = exports.Material = exports.MainCamera = exports.LightSource = exports.InputModifier = exports.GltfNodeModifiers = exports.GltfContainerLoadingState = exports.GltfContainer = exports.EngineInfo = exports.CameraModeArea = exports.CameraMode = exports.Billboard = exports.AvatarShape = exports.AvatarModifierArea = exports.AvatarEquippedData = exports.AvatarEmoteCommand = exports.AvatarBase = exports.AvatarAttach = exports.AudioStream = exports.AudioSource = exports.AudioEvent = exports.AssetLoadLoadingState = exports.AssetLoad = exports.Animator = void 0;
|
|
18
|
+
exports.componentDefinitionByName = exports.VisibilityComponent = exports.VirtualCamera = exports.VideoPlayer = exports.VideoEvent = exports.UiTransform = void 0;
|
|
19
19
|
const Animator_gen_1 = require("./Animator.gen");
|
|
20
20
|
const AssetLoad_gen_1 = require("./AssetLoad.gen");
|
|
21
21
|
const AssetLoadLoadingState_gen_1 = require("./AssetLoadLoadingState.gen");
|
|
22
|
-
const AudioAnalysis_gen_1 = require("./AudioAnalysis.gen");
|
|
23
22
|
const AudioEvent_gen_1 = require("./AudioEvent.gen");
|
|
24
23
|
const AudioSource_gen_1 = require("./AudioSource.gen");
|
|
25
24
|
const AudioStream_gen_1 = require("./AudioStream.gen");
|
|
@@ -27,7 +26,6 @@ const AvatarAttach_gen_1 = require("./AvatarAttach.gen");
|
|
|
27
26
|
const AvatarBase_gen_1 = require("./AvatarBase.gen");
|
|
28
27
|
const AvatarEmoteCommand_gen_1 = require("./AvatarEmoteCommand.gen");
|
|
29
28
|
const AvatarEquippedData_gen_1 = require("./AvatarEquippedData.gen");
|
|
30
|
-
const AvatarLocomotionSettings_gen_1 = require("./AvatarLocomotionSettings.gen");
|
|
31
29
|
const AvatarModifierArea_gen_1 = require("./AvatarModifierArea.gen");
|
|
32
30
|
const AvatarShape_gen_1 = require("./AvatarShape.gen");
|
|
33
31
|
const Billboard_gen_1 = require("./Billboard.gen");
|
|
@@ -76,7 +74,6 @@ const VisibilityComponent_gen_1 = require("./VisibilityComponent.gen");
|
|
|
76
74
|
__exportStar(require("./pb/decentraland/sdk/components/animator.gen"), exports);
|
|
77
75
|
__exportStar(require("./pb/decentraland/sdk/components/asset_load.gen"), exports);
|
|
78
76
|
__exportStar(require("./pb/decentraland/sdk/components/asset_load_loading_state.gen"), exports);
|
|
79
|
-
__exportStar(require("./pb/decentraland/sdk/components/audio_analysis.gen"), exports);
|
|
80
77
|
__exportStar(require("./pb/decentraland/sdk/components/audio_event.gen"), exports);
|
|
81
78
|
__exportStar(require("./pb/decentraland/sdk/components/audio_source.gen"), exports);
|
|
82
79
|
__exportStar(require("./pb/decentraland/sdk/components/audio_stream.gen"), exports);
|
|
@@ -84,7 +81,6 @@ __exportStar(require("./pb/decentraland/sdk/components/avatar_attach.gen"), expo
|
|
|
84
81
|
__exportStar(require("./pb/decentraland/sdk/components/avatar_base.gen"), exports);
|
|
85
82
|
__exportStar(require("./pb/decentraland/sdk/components/avatar_emote_command.gen"), exports);
|
|
86
83
|
__exportStar(require("./pb/decentraland/sdk/components/avatar_equipped_data.gen"), exports);
|
|
87
|
-
__exportStar(require("./pb/decentraland/sdk/components/avatar_locomotion_settings.gen"), exports);
|
|
88
84
|
__exportStar(require("./pb/decentraland/sdk/components/avatar_modifier_area.gen"), exports);
|
|
89
85
|
__exportStar(require("./pb/decentraland/sdk/components/avatar_shape.gen"), exports);
|
|
90
86
|
__exportStar(require("./pb/decentraland/sdk/components/billboard.gen"), exports);
|
|
@@ -141,9 +137,6 @@ exports.AssetLoad = AssetLoad;
|
|
|
141
137
|
maxElements: 100
|
|
142
138
|
});
|
|
143
139
|
exports.AssetLoadLoadingState = AssetLoadLoadingState;
|
|
144
|
-
/** @public */ const AudioAnalysis = engine =>
|
|
145
|
-
/* @__PURE__ */ engine.defineComponentFromSchema("core::AudioAnalysis", AudioAnalysis_gen_1.AudioAnalysisSchema);
|
|
146
|
-
exports.AudioAnalysis = AudioAnalysis;
|
|
147
140
|
/** @public */ const AudioEvent = (engine) => /* @__PURE__ */ engine.defineValueSetComponentFromSchema("core::AudioEvent", AudioEvent_gen_1.AudioEventSchema, {
|
|
148
141
|
timestampFunction: (t) => t.timestamp,
|
|
149
142
|
maxElements: 100
|
|
@@ -169,9 +162,6 @@ exports.AvatarEmoteCommand = AvatarEmoteCommand;
|
|
|
169
162
|
/** @public */ const AvatarEquippedData = engine =>
|
|
170
163
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::AvatarEquippedData", AvatarEquippedData_gen_1.AvatarEquippedDataSchema);
|
|
171
164
|
exports.AvatarEquippedData = AvatarEquippedData;
|
|
172
|
-
/** @public */ const AvatarLocomotionSettings = engine =>
|
|
173
|
-
/* @__PURE__ */ engine.defineComponentFromSchema("core::AvatarLocomotionSettings", AvatarLocomotionSettings_gen_1.AvatarLocomotionSettingsSchema);
|
|
174
|
-
exports.AvatarLocomotionSettings = AvatarLocomotionSettings;
|
|
175
165
|
/** @public */ const AvatarModifierArea = engine =>
|
|
176
166
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::AvatarModifierArea", AvatarModifierArea_gen_1.AvatarModifierAreaSchema);
|
|
177
167
|
exports.AvatarModifierArea = AvatarModifierArea;
|
|
@@ -318,7 +308,6 @@ exports.componentDefinitionByName = {
|
|
|
318
308
|
"core::Animator": exports.Animator,
|
|
319
309
|
"core::AssetLoad": exports.AssetLoad,
|
|
320
310
|
"core::AssetLoadLoadingState": exports.AssetLoadLoadingState,
|
|
321
|
-
"core::AudioAnalysis": exports.AudioAnalysis,
|
|
322
311
|
"core::AudioEvent": exports.AudioEvent,
|
|
323
312
|
"core::AudioSource": exports.AudioSource,
|
|
324
313
|
"core::AudioStream": exports.AudioStream,
|
|
@@ -326,7 +315,6 @@ exports.componentDefinitionByName = {
|
|
|
326
315
|
"core::AvatarBase": exports.AvatarBase,
|
|
327
316
|
"core::AvatarEmoteCommand": exports.AvatarEmoteCommand,
|
|
328
317
|
"core::AvatarEquippedData": exports.AvatarEquippedData,
|
|
329
|
-
"core::AvatarLocomotionSettings": exports.AvatarLocomotionSettings,
|
|
330
318
|
"core::AvatarModifierArea": exports.AvatarModifierArea,
|
|
331
319
|
"core::AvatarShape": exports.AvatarShape,
|
|
332
320
|
"core::Billboard": exports.Billboard,
|
package/dist-cjs/components/generated/pb/decentraland/sdk/components/common/input_action.gen.js
CHANGED
|
@@ -22,7 +22,6 @@ var InputAction;
|
|
|
22
22
|
InputAction[InputAction["IA_ACTION_4"] = 11] = "IA_ACTION_4";
|
|
23
23
|
InputAction[InputAction["IA_ACTION_5"] = 12] = "IA_ACTION_5";
|
|
24
24
|
InputAction[InputAction["IA_ACTION_6"] = 13] = "IA_ACTION_6";
|
|
25
|
-
InputAction[InputAction["IA_MODIFIER"] = 14] = "IA_MODIFIER";
|
|
26
25
|
})(InputAction = exports.InputAction || (exports.InputAction = {}));
|
|
27
26
|
/** PointerEventType is a kind of interaction that can be detected. */
|
|
28
27
|
/**
|
package/dist-cjs/components/generated/pb/decentraland/sdk/components/virtual_camera.gen.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ import { CameraTransition } from "./common/camera_transition.gen";
|
|
|
6
6
|
* an 'instant' transition (like using speed/time = 0)
|
|
7
7
|
* * The lookAtEntity defines to which entity the Camera has to look at constantly (independent from
|
|
8
8
|
* the holding entity transform).
|
|
9
|
-
* * The fov defines the Field of View of the virtual camera
|
|
10
9
|
*/
|
|
11
10
|
/**
|
|
12
11
|
* @public
|
|
@@ -14,8 +13,6 @@ import { CameraTransition } from "./common/camera_transition.gen";
|
|
|
14
13
|
export interface PBVirtualCamera {
|
|
15
14
|
defaultTransition?: CameraTransition | undefined;
|
|
16
15
|
lookAtEntity?: number | undefined;
|
|
17
|
-
/** default: 60 */
|
|
18
|
-
fov?: number | undefined;
|
|
19
16
|
}
|
|
20
17
|
/**
|
|
21
18
|
* @public
|
|
@@ -9,7 +9,7 @@ const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
|
9
9
|
const camera_transition_gen_1 = require("./common/camera_transition.gen");
|
|
10
10
|
const protobufPackageSarasa = "decentraland.sdk.components";
|
|
11
11
|
function createBasePBVirtualCamera() {
|
|
12
|
-
return { defaultTransition: undefined, lookAtEntity: undefined
|
|
12
|
+
return { defaultTransition: undefined, lookAtEntity: undefined };
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* @public
|
|
@@ -23,9 +23,6 @@ var PBVirtualCamera;
|
|
|
23
23
|
if (message.lookAtEntity !== undefined) {
|
|
24
24
|
writer.uint32(16).uint32(message.lookAtEntity);
|
|
25
25
|
}
|
|
26
|
-
if (message.fov !== undefined) {
|
|
27
|
-
writer.uint32(29).float(message.fov);
|
|
28
|
-
}
|
|
29
26
|
return writer;
|
|
30
27
|
}
|
|
31
28
|
PBVirtualCamera.encode = encode;
|
|
@@ -48,12 +45,6 @@ var PBVirtualCamera;
|
|
|
48
45
|
}
|
|
49
46
|
message.lookAtEntity = reader.uint32();
|
|
50
47
|
continue;
|
|
51
|
-
case 3:
|
|
52
|
-
if (tag !== 29) {
|
|
53
|
-
break;
|
|
54
|
-
}
|
|
55
|
-
message.fov = reader.float();
|
|
56
|
-
continue;
|
|
57
48
|
}
|
|
58
49
|
if ((tag & 7) === 4 || tag === 0) {
|
|
59
50
|
break;
|
|
@@ -2,8 +2,6 @@ import { GrowOnlyValueSetComponentDefinition, LastWriteWinElementSetComponentDef
|
|
|
2
2
|
import { IEngine } from '../engine/types';
|
|
3
3
|
import { AnimatorComponentDefinitionExtended } from './extended/Animator';
|
|
4
4
|
import { AudioSourceComponentDefinitionExtended } from './extended/AudioSource';
|
|
5
|
-
import { AudioAnalysisComponentDefinitionExtended } from './extended/AudioAnalysis';
|
|
6
|
-
import type { AudioAnalysisView } from './extended/AudioAnalysis';
|
|
7
5
|
import { MaterialComponentDefinitionExtended } from './extended/Material';
|
|
8
6
|
import { MeshColliderComponentDefinitionExtended } from './extended/MeshCollider';
|
|
9
7
|
import { MeshRendererComponentDefinitionExtended } from './extended/MeshRenderer';
|
|
@@ -27,7 +25,6 @@ export declare const Transform: LwwComponentGetter<TransformComponentExtended>;
|
|
|
27
25
|
export declare const Material: LwwComponentGetter<MaterialComponentDefinitionExtended>;
|
|
28
26
|
export declare const Animator: LwwComponentGetter<AnimatorComponentDefinitionExtended>;
|
|
29
27
|
export declare const AudioSource: LwwComponentGetter<AudioSourceComponentDefinitionExtended>;
|
|
30
|
-
export declare const AudioAnalysis: LwwComponentGetter<AudioAnalysisComponentDefinitionExtended>;
|
|
31
28
|
export declare const AudioStream: (engine: Pick<IEngine, 'defineComponentFromSchema' | 'defineValueSetComponentFromSchema'>) => AudioStreamComponentDefinitionExtended;
|
|
32
29
|
export declare const MeshRenderer: LwwComponentGetter<MeshRendererComponentDefinitionExtended>;
|
|
33
30
|
export declare const MeshCollider: LwwComponentGetter<MeshColliderComponentDefinitionExtended>;
|
|
@@ -54,4 +51,3 @@ export declare const NetworkEntity: (engine: Pick<IEngine, 'defineComponent'>) =
|
|
|
54
51
|
*/
|
|
55
52
|
export declare const NetworkParent: (engine: Pick<IEngine, 'defineComponent'>) => LastWriteWinElementSetComponentDefinition<INetowrkParentType>;
|
|
56
53
|
export { MediaState };
|
|
57
|
-
export type { AudioAnalysisView };
|
|
@@ -17,10 +17,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.MediaState = exports.NetworkParent = exports.NetworkEntity = exports.SyncComponents = exports.Tags = exports.Name = exports.TriggerArea = exports.LightSource = exports.InputModifier = exports.VirtualCamera = exports.Tween = exports.MeshCollider = exports.MeshRenderer = exports.AudioStream = exports.
|
|
20
|
+
exports.MediaState = exports.NetworkParent = exports.NetworkEntity = exports.SyncComponents = exports.Tags = exports.Name = exports.TriggerArea = exports.LightSource = exports.InputModifier = exports.VirtualCamera = exports.Tween = exports.MeshCollider = exports.MeshRenderer = exports.AudioStream = exports.AudioSource = exports.Animator = exports.Material = exports.Transform = void 0;
|
|
21
21
|
const Animator_1 = require("./extended/Animator");
|
|
22
22
|
const AudioSource_1 = require("./extended/AudioSource");
|
|
23
|
-
const AudioAnalysis_1 = require("./extended/AudioAnalysis");
|
|
24
23
|
const Material_1 = require("./extended/Material");
|
|
25
24
|
const MeshCollider_1 = require("./extended/MeshCollider");
|
|
26
25
|
const MeshRenderer_1 = require("./extended/MeshRenderer");
|
|
@@ -52,9 +51,6 @@ exports.Animator = Animator;
|
|
|
52
51
|
const AudioSource = (engine) => (0, AudioSource_1.defineAudioSourceComponent)(engine);
|
|
53
52
|
exports.AudioSource = AudioSource;
|
|
54
53
|
/* @__PURE__ */
|
|
55
|
-
const AudioAnalysis = (engine) => (0, AudioAnalysis_1.defineAudioAnalysisComponent)(engine);
|
|
56
|
-
exports.AudioAnalysis = AudioAnalysis;
|
|
57
|
-
/* @__PURE__ */
|
|
58
54
|
const AudioStream = (engine) => (0, AudioStream_1.defineAudioStreamComponent)(engine);
|
|
59
55
|
exports.AudioStream = AudioStream;
|
|
60
56
|
/* @__PURE__ */
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export type { AnimatorComponentDefinitionExtended } from './extended/Animator';
|
|
2
2
|
export type { AudioSourceComponentDefinitionExtended } from './extended/AudioSource';
|
|
3
|
-
export type { AudioAnalysisComponentDefinitionExtended, AudioAnalysisView } from './extended/AudioAnalysis';
|
|
4
3
|
export type { AudioStreamComponentDefinitionExtended } from './extended/AudioStream';
|
|
5
4
|
export type { MeshRendererComponentDefinitionExtended } from './extended/MeshRenderer';
|
|
6
5
|
export type { MeshColliderComponentDefinitionExtended } from './extended/MeshCollider';
|
|
@@ -4,5 +4,5 @@ import { PutComponentMessageBody, DeleteComponentMessageBody, CrdtMessageBody }
|
|
|
4
4
|
import { Entity } from './entity';
|
|
5
5
|
export declare function incrementTimestamp(entity: Entity, timestamps: Map<Entity, number>): number;
|
|
6
6
|
export declare function createDumpLwwFunctionFromCrdt(componentId: number, timestamps: Map<Entity, number>, schema: Pick<ISchema<any>, 'serialize' | 'deserialize'>, data: Map<Entity, unknown>): (buffer: ByteBuffer, filterEntity?: ((entity: Entity) => boolean) | undefined) => void;
|
|
7
|
-
export declare function createUpdateLwwFromCrdt(componentId: number, timestamps: Map<Entity, number>, schema: Pick<ISchema<any>, 'serialize' | 'deserialize'>, data: Map<Entity, unknown>): (msg: CrdtMessageBody) => [null | PutComponentMessageBody | DeleteComponentMessageBody, any];
|
|
8
|
-
export declare function createGetCrdtMessagesForLww(componentId: number, timestamps: Map<Entity, number>, dirtyIterator: Set<Entity>, schema: Pick<ISchema<any>, 'serialize'>, data: Map<Entity, unknown>): () => Generator<PutComponentMessageBody | DeleteComponentMessageBody, void, unknown>;
|
|
7
|
+
export declare function createUpdateLwwFromCrdt(componentId: number, timestamps: Map<Entity, number>, schema: Pick<ISchema<any>, 'serialize' | 'deserialize'>, data: Map<Entity, unknown>, lastSentData: Map<Entity, Uint8Array>): (msg: CrdtMessageBody) => [null | PutComponentMessageBody | DeleteComponentMessageBody, any];
|
|
8
|
+
export declare function createGetCrdtMessagesForLww(componentId: number, timestamps: Map<Entity, number>, dirtyIterator: Set<Entity>, schema: Pick<ISchema<any>, 'serialize'>, data: Map<Entity, unknown>, lastSentData: Map<Entity, Uint8Array>): () => Generator<PutComponentMessageBody | DeleteComponentMessageBody, void, unknown>;
|
|
@@ -35,7 +35,7 @@ function createDumpLwwFunctionFromCrdt(componentId, timestamps, schema, data) {
|
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
exports.createDumpLwwFunctionFromCrdt = createDumpLwwFunctionFromCrdt;
|
|
38
|
-
function createUpdateLwwFromCrdt(componentId, timestamps, schema, data) {
|
|
38
|
+
function createUpdateLwwFromCrdt(componentId, timestamps, schema, data, lastSentData) {
|
|
39
39
|
/**
|
|
40
40
|
* Process the received message only if the lamport number recieved is higher
|
|
41
41
|
* than the stored one. If its lower, we spread it to the network to correct the peer.
|
|
@@ -101,9 +101,11 @@ function createUpdateLwwFromCrdt(componentId, timestamps, schema, data) {
|
|
|
101
101
|
if (msg.type === crdt_1.CrdtMessageType.PUT_COMPONENT || msg.type === crdt_1.CrdtMessageType.PUT_COMPONENT_NETWORK) {
|
|
102
102
|
const buf = new ByteBuffer_1.ReadWriteByteBuffer(msg.data);
|
|
103
103
|
data.set(entity, schema.deserialize(buf));
|
|
104
|
+
lastSentData.set(entity, new Uint8Array(msg.data));
|
|
104
105
|
}
|
|
105
106
|
else {
|
|
106
107
|
data.delete(entity);
|
|
108
|
+
lastSentData.delete(entity);
|
|
107
109
|
}
|
|
108
110
|
return [null, data.get(entity)];
|
|
109
111
|
}
|
|
@@ -140,23 +142,34 @@ function createUpdateLwwFromCrdt(componentId, timestamps, schema, data) {
|
|
|
140
142
|
};
|
|
141
143
|
}
|
|
142
144
|
exports.createUpdateLwwFromCrdt = createUpdateLwwFromCrdt;
|
|
143
|
-
function createGetCrdtMessagesForLww(componentId, timestamps, dirtyIterator, schema, data) {
|
|
145
|
+
function createGetCrdtMessagesForLww(componentId, timestamps, dirtyIterator, schema, data, lastSentData) {
|
|
144
146
|
return function* () {
|
|
147
|
+
const writeBuffer = new ByteBuffer_1.ReadWriteByteBuffer();
|
|
145
148
|
for (const entity of dirtyIterator) {
|
|
146
|
-
const newTimestamp = incrementTimestamp(entity, timestamps);
|
|
147
149
|
if (data.has(entity)) {
|
|
148
|
-
|
|
150
|
+
writeBuffer.resetBuffer();
|
|
149
151
|
schema.serialize(data.get(entity), writeBuffer);
|
|
152
|
+
// Compare against last-sent snapshot using the zero-copy subarray view.
|
|
153
|
+
// Only allocate a copy when bytes actually differ.
|
|
154
|
+
const previousBytes = lastSentData.get(entity);
|
|
155
|
+
if (previousBytes && (0, utils_1.dataCompare)(writeBuffer.toBinary(), previousBytes) === 0) {
|
|
156
|
+
continue;
|
|
157
|
+
}
|
|
158
|
+
const currentBytes = writeBuffer.toCopiedBinary();
|
|
159
|
+
const newTimestamp = incrementTimestamp(entity, timestamps);
|
|
160
|
+
lastSentData.set(entity, currentBytes);
|
|
150
161
|
const msg = {
|
|
151
162
|
type: crdt_1.CrdtMessageType.PUT_COMPONENT,
|
|
152
163
|
componentId,
|
|
153
164
|
entityId: entity,
|
|
154
|
-
data:
|
|
165
|
+
data: currentBytes,
|
|
155
166
|
timestamp: newTimestamp
|
|
156
167
|
};
|
|
157
168
|
yield msg;
|
|
158
169
|
}
|
|
159
170
|
else {
|
|
171
|
+
lastSentData.delete(entity);
|
|
172
|
+
const newTimestamp = incrementTimestamp(entity, timestamps);
|
|
160
173
|
const msg = {
|
|
161
174
|
type: crdt_1.CrdtMessageType.DELETE_COMPONENT,
|
|
162
175
|
componentId,
|
|
@@ -177,6 +190,7 @@ function createComponentDefinitionFromSchema(componentName, componentId, schema)
|
|
|
177
190
|
const data = new Map();
|
|
178
191
|
const dirtyIterator = new Set();
|
|
179
192
|
const timestamps = new Map();
|
|
193
|
+
const lastSentData = new Map();
|
|
180
194
|
const onChangeCallbacks = new Map();
|
|
181
195
|
return {
|
|
182
196
|
get componentId() {
|
|
@@ -198,12 +212,14 @@ function createComponentDefinitionFromSchema(componentName, componentId, schema)
|
|
|
198
212
|
if (data.delete(entity) && markAsDirty) {
|
|
199
213
|
dirtyIterator.add(entity);
|
|
200
214
|
}
|
|
215
|
+
lastSentData.delete(entity);
|
|
201
216
|
return component || null;
|
|
202
217
|
},
|
|
203
218
|
entityDeleted(entity, markAsDirty) {
|
|
204
219
|
if (data.delete(entity) && markAsDirty) {
|
|
205
220
|
dirtyIterator.add(entity);
|
|
206
221
|
}
|
|
222
|
+
lastSentData.delete(entity);
|
|
207
223
|
},
|
|
208
224
|
getOrNull(entity) {
|
|
209
225
|
const component = data.get(entity);
|
|
@@ -230,6 +246,7 @@ function createComponentDefinitionFromSchema(componentName, componentId, schema)
|
|
|
230
246
|
const usedValue = value === undefined ? schema.create() : schema.extend ? schema.extend(value) : value;
|
|
231
247
|
data.set(entity, usedValue);
|
|
232
248
|
dirtyIterator.add(entity);
|
|
249
|
+
lastSentData.delete(entity);
|
|
233
250
|
return usedValue;
|
|
234
251
|
},
|
|
235
252
|
getMutableOrNull(entity) {
|
|
@@ -267,8 +284,8 @@ function createComponentDefinitionFromSchema(componentName, componentId, schema)
|
|
|
267
284
|
yield entity;
|
|
268
285
|
}
|
|
269
286
|
},
|
|
270
|
-
getCrdtUpdates: createGetCrdtMessagesForLww(componentId, timestamps, dirtyIterator, schema, data),
|
|
271
|
-
updateFromCrdt: createUpdateLwwFromCrdt(componentId, timestamps, schema, data),
|
|
287
|
+
getCrdtUpdates: createGetCrdtMessagesForLww(componentId, timestamps, dirtyIterator, schema, data, lastSentData),
|
|
288
|
+
updateFromCrdt: createUpdateLwwFromCrdt(componentId, timestamps, schema, data, lastSentData),
|
|
272
289
|
dumpCrdtStateToBuffer: createDumpLwwFunctionFromCrdt(componentId, timestamps, schema, data),
|
|
273
290
|
onChange(entity, cb) {
|
|
274
291
|
const cbs = onChangeCallbacks.get(entity) ?? [];
|
package/dist-cjs/index.d.ts
CHANGED
|
@@ -15,13 +15,12 @@ export * from './systems/triggerArea';
|
|
|
15
15
|
export * from './systems/physics';
|
|
16
16
|
export * from './engine/entity';
|
|
17
17
|
export * from './components/types';
|
|
18
|
-
import { MaterialComponentDefinitionExtended, MeshColliderComponentDefinitionExtended, MeshRendererComponentDefinitionExtended, TransformComponentExtended, AnimatorComponentDefinitionExtended, AudioSourceComponentDefinitionExtended,
|
|
18
|
+
import { MaterialComponentDefinitionExtended, MeshColliderComponentDefinitionExtended, MeshRendererComponentDefinitionExtended, TransformComponentExtended, AnimatorComponentDefinitionExtended, AudioSourceComponentDefinitionExtended, AudioStreamComponentDefinitionExtended, ISyncComponents, TweenComponentDefinitionExtended, INetowrkEntity, INetowrkParent, VirtualCameraComponentDefinitionExtended, InputModifierComponentDefinitionExtended, LightSourceComponentDefinitionExtended, TriggerAreaComponentDefinitionExtended } from './components/types';
|
|
19
19
|
import { NameComponent } from './components/manual/Name';
|
|
20
20
|
import { TagsComponentDefinitionExtended } from './components/manual/Tags';
|
|
21
21
|
export declare const Transform: TransformComponentExtended;
|
|
22
22
|
export declare const Animator: AnimatorComponentDefinitionExtended;
|
|
23
23
|
export declare const AudioSource: AudioSourceComponentDefinitionExtended;
|
|
24
|
-
export declare const AudioAnalysis: AudioAnalysisComponentDefinitionExtended;
|
|
25
24
|
export declare const AudioStream: AudioStreamComponentDefinitionExtended;
|
|
26
25
|
export declare const Material: MaterialComponentDefinitionExtended;
|
|
27
26
|
export declare const MeshRenderer: MeshRendererComponentDefinitionExtended;
|
package/dist-cjs/index.js
CHANGED
|
@@ -26,7 +26,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
26
26
|
return result;
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.NetworkParent = exports.NetworkEntity = exports.SyncComponents = exports.TriggerArea = exports.LightSource = exports.InputModifier = exports.VirtualCamera = exports.Tween = exports.Tags = exports.Name = exports.MeshCollider = exports.MeshRenderer = exports.Material = exports.AudioStream = exports.
|
|
29
|
+
exports.NetworkParent = exports.NetworkEntity = exports.SyncComponents = exports.TriggerArea = exports.LightSource = exports.InputModifier = exports.VirtualCamera = exports.Tween = exports.Tags = exports.Name = exports.MeshCollider = exports.MeshRenderer = exports.Material = exports.AudioStream = exports.AudioSource = exports.Animator = exports.Transform = exports.components = exports.cyclicParentingChecker = void 0;
|
|
30
30
|
// The order of the following imports matters. Please do not auto-sort
|
|
31
31
|
__exportStar(require("./engine"), exports);
|
|
32
32
|
__exportStar(require("./schemas"), exports);
|
|
@@ -54,7 +54,6 @@ const initialization_1 = require("./runtime/initialization");
|
|
|
54
54
|
exports.Transform = components.Transform(initialization_1.engine);
|
|
55
55
|
exports.Animator = components.Animator(initialization_1.engine);
|
|
56
56
|
exports.AudioSource = components.AudioSource(initialization_1.engine);
|
|
57
|
-
exports.AudioAnalysis = components.AudioAnalysis(initialization_1.engine);
|
|
58
57
|
exports.AudioStream = components.AudioStream(initialization_1.engine);
|
|
59
58
|
exports.Material = components.Material(initialization_1.engine);
|
|
60
59
|
exports.MeshRenderer = components.MeshRenderer(initialization_1.engine);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl/ecs",
|
|
3
3
|
"description": "Decentraland ECS",
|
|
4
|
-
"version": "7.22.
|
|
4
|
+
"version": "7.22.3-23869239837.commit-39ea50a",
|
|
5
5
|
"author": "DCL",
|
|
6
6
|
"bugs": "https://github.com/decentraland/ecs/issues",
|
|
7
7
|
"files": [
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"dependencies": {},
|
|
35
35
|
"types": "./dist/index.d.ts",
|
|
36
36
|
"typings": "./dist/index.d.ts",
|
|
37
|
-
"commit": "
|
|
37
|
+
"commit": "39ea50ab3f0b3b45ee9c369a5d76b83e2d597590"
|
|
38
38
|
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { Entity, IEngine } from '../../engine';
|
|
2
|
-
import { LastWriteWinElementSetComponentDefinition } from '../../engine/component';
|
|
3
|
-
import { PBAudioAnalysis, PBAudioAnalysisMode } from '../generated/pb/decentraland/sdk/components/audio_analysis.gen';
|
|
4
|
-
export interface AudioAnalysisComponentDefinitionExtended extends LastWriteWinElementSetComponentDefinition<PBAudioAnalysis> {
|
|
5
|
-
/**
|
|
6
|
-
* Reads the component data of `entity` into the provided `out` view.
|
|
7
|
-
*
|
|
8
|
-
* @throws Error if the entity does not have an AudioAnalysis component.
|
|
9
|
-
* @param entity - The entity whose AudioAnalysis data will be read.
|
|
10
|
-
* @param out - An existing AudioAnalysisView to populate with the latest values.
|
|
11
|
-
*/
|
|
12
|
-
readIntoView(entity: Entity, out: AudioAnalysisView): void;
|
|
13
|
-
/**
|
|
14
|
-
* Attempts to read the component data of `entity` into the provided `out` view.
|
|
15
|
-
*
|
|
16
|
-
* @returns `true` if the component exists and data was written into `out`,
|
|
17
|
-
* `false` if the entity does not have an AudioAnalysis component.
|
|
18
|
-
* @param entity - The entity whose AudioAnalysis data will be read.
|
|
19
|
-
* @param out - An existing AudioAnalysisView to populate.
|
|
20
|
-
*/
|
|
21
|
-
tryReadIntoView(entity: Entity, out: AudioAnalysisView): boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Creates an AudioAnalysis component for the given `entity`.
|
|
24
|
-
*
|
|
25
|
-
* If a component already exists on the entity, this call fails (does not replace).
|
|
26
|
-
*
|
|
27
|
-
* @param entity - The entity to attach the component to.
|
|
28
|
-
* @param mode - Analysis mode. Defaults to `PBAudioAnalysisMode.MODE_LOGARITHMIC`.
|
|
29
|
-
* @param amplitudeGain - Optional amplitude gain multiplier.
|
|
30
|
-
* @param bandsGain - Optional gain multiplier applied to all frequency bands.
|
|
31
|
-
*/
|
|
32
|
-
createAudioAnalysis(entity: Entity, mode?: PBAudioAnalysisMode, // default is PBAudioAnalysisMode.MODE_LOGARITHMIC
|
|
33
|
-
amplitudeGain?: number, bandsGain?: number): void;
|
|
34
|
-
/**
|
|
35
|
-
* Creates the AudioAnalysis component if missing, or replaces the existing one.
|
|
36
|
-
*
|
|
37
|
-
* @param entity - The target entity.
|
|
38
|
-
* @param mode - Analysis mode. Defaults to `PBAudioAnalysisMode.MODE_LOGARITHMIC`.
|
|
39
|
-
* @param amplitudeGain - Optional amplitude gain multiplier.
|
|
40
|
-
* @param bandsGain - Optional gain multiplier applied to the frequency bands.
|
|
41
|
-
*/
|
|
42
|
-
createOrReplaceAudioAnalysis(entity: Entity, mode?: PBAudioAnalysisMode, // default is PBAudioAnalysisMode.MODE_LOGARITHMIC
|
|
43
|
-
amplitudeGain?: number, bandsGain?: number): void;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* A read-only JavaScript-friendly view of AudioAnalysis ECS data.
|
|
47
|
-
*
|
|
48
|
-
* `amplitude` represents the aggregated signal strength.
|
|
49
|
-
* `bands` represents the processed frequency bands.
|
|
50
|
-
*/
|
|
51
|
-
export type AudioAnalysisView = {
|
|
52
|
-
amplitude: number;
|
|
53
|
-
bands: number[];
|
|
54
|
-
};
|
|
55
|
-
export declare function defineAudioAnalysisComponent(engine: Pick<IEngine, 'defineComponentFromSchema'>): AudioAnalysisComponentDefinitionExtended;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { AudioAnalysis } from '../generated/index.gen';
|
|
2
|
-
export function defineAudioAnalysisComponent(engine) {
|
|
3
|
-
const theComponent = AudioAnalysis(engine);
|
|
4
|
-
return {
|
|
5
|
-
...theComponent,
|
|
6
|
-
readIntoView(entity, out) {
|
|
7
|
-
const audioAnalysis = theComponent.get(entity);
|
|
8
|
-
out.amplitude = audioAnalysis.amplitude;
|
|
9
|
-
out.bands[0] = audioAnalysis.band0;
|
|
10
|
-
out.bands[1] = audioAnalysis.band1;
|
|
11
|
-
out.bands[2] = audioAnalysis.band2;
|
|
12
|
-
out.bands[3] = audioAnalysis.band3;
|
|
13
|
-
out.bands[4] = audioAnalysis.band4;
|
|
14
|
-
out.bands[5] = audioAnalysis.band5;
|
|
15
|
-
out.bands[6] = audioAnalysis.band6;
|
|
16
|
-
out.bands[7] = audioAnalysis.band7;
|
|
17
|
-
},
|
|
18
|
-
tryReadIntoView(entity, out) {
|
|
19
|
-
const audioAnalysis = theComponent.getOrNull(entity);
|
|
20
|
-
if (!audioAnalysis)
|
|
21
|
-
return false;
|
|
22
|
-
out.amplitude = audioAnalysis.amplitude;
|
|
23
|
-
out.bands[0] = audioAnalysis.band0;
|
|
24
|
-
out.bands[1] = audioAnalysis.band1;
|
|
25
|
-
out.bands[2] = audioAnalysis.band2;
|
|
26
|
-
out.bands[3] = audioAnalysis.band3;
|
|
27
|
-
out.bands[4] = audioAnalysis.band4;
|
|
28
|
-
out.bands[5] = audioAnalysis.band5;
|
|
29
|
-
out.bands[6] = audioAnalysis.band6;
|
|
30
|
-
out.bands[7] = audioAnalysis.band7;
|
|
31
|
-
return true;
|
|
32
|
-
},
|
|
33
|
-
createAudioAnalysis(entity, mode, amplitudeGain, bandsGain) {
|
|
34
|
-
theComponent.create(entity, {
|
|
35
|
-
mode: mode || 1 /* PBAudioAnalysisMode.MODE_LOGARITHMIC */,
|
|
36
|
-
amplitudeGain: amplitudeGain ?? undefined,
|
|
37
|
-
bandsGain: bandsGain ?? undefined,
|
|
38
|
-
amplitude: 0,
|
|
39
|
-
band0: 0,
|
|
40
|
-
band1: 0,
|
|
41
|
-
band2: 0,
|
|
42
|
-
band3: 0,
|
|
43
|
-
band4: 0,
|
|
44
|
-
band5: 0,
|
|
45
|
-
band6: 0,
|
|
46
|
-
band7: 0
|
|
47
|
-
});
|
|
48
|
-
},
|
|
49
|
-
createOrReplaceAudioAnalysis(entity, mode, amplitudeGain, bandsGain) {
|
|
50
|
-
theComponent.createOrReplace(entity, {
|
|
51
|
-
mode: mode || 1 /* PBAudioAnalysisMode.MODE_LOGARITHMIC */,
|
|
52
|
-
amplitudeGain: amplitudeGain ?? undefined,
|
|
53
|
-
bandsGain: bandsGain ?? undefined,
|
|
54
|
-
amplitude: 0,
|
|
55
|
-
band0: 0,
|
|
56
|
-
band1: 0,
|
|
57
|
-
band2: 0,
|
|
58
|
-
band3: 0,
|
|
59
|
-
band4: 0,
|
|
60
|
-
band5: 0,
|
|
61
|
-
band6: 0,
|
|
62
|
-
band7: 0
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { PBAudioAnalysis } from './pb/decentraland/sdk/components/audio_analysis.gen';
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
*/
|
|
5
|
-
export const AudioAnalysisSchema = {
|
|
6
|
-
COMPONENT_ID: 1212,
|
|
7
|
-
serialize(value, builder) {
|
|
8
|
-
const writer = PBAudioAnalysis.encode(value);
|
|
9
|
-
const buffer = new Uint8Array(writer.finish(), 0, writer.len);
|
|
10
|
-
builder.writeBuffer(buffer, false);
|
|
11
|
-
},
|
|
12
|
-
deserialize(reader) {
|
|
13
|
-
return PBAudioAnalysis.decode(reader.buffer(), reader.remainingBytes());
|
|
14
|
-
},
|
|
15
|
-
create() {
|
|
16
|
-
// TODO: this is a hack.
|
|
17
|
-
return PBAudioAnalysis.decode(new Uint8Array());
|
|
18
|
-
},
|
|
19
|
-
jsonSchema: {
|
|
20
|
-
type: "object",
|
|
21
|
-
properties: {},
|
|
22
|
-
serializationType: "protocol-buffer",
|
|
23
|
-
protocolBuffer: "PBAudioAnalysis"
|
|
24
|
-
}
|
|
25
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { PBAvatarLocomotionSettings } from './pb/decentraland/sdk/components/avatar_locomotion_settings.gen';
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
*/
|
|
5
|
-
export const AvatarLocomotionSettingsSchema = {
|
|
6
|
-
COMPONENT_ID: 1211,
|
|
7
|
-
serialize(value, builder) {
|
|
8
|
-
const writer = PBAvatarLocomotionSettings.encode(value);
|
|
9
|
-
const buffer = new Uint8Array(writer.finish(), 0, writer.len);
|
|
10
|
-
builder.writeBuffer(buffer, false);
|
|
11
|
-
},
|
|
12
|
-
deserialize(reader) {
|
|
13
|
-
return PBAvatarLocomotionSettings.decode(reader.buffer(), reader.remainingBytes());
|
|
14
|
-
},
|
|
15
|
-
create() {
|
|
16
|
-
// TODO: this is a hack.
|
|
17
|
-
return PBAvatarLocomotionSettings.decode(new Uint8Array());
|
|
18
|
-
},
|
|
19
|
-
jsonSchema: {
|
|
20
|
-
type: "object",
|
|
21
|
-
properties: {},
|
|
22
|
-
serializationType: "protocol-buffer",
|
|
23
|
-
protocolBuffer: "PBAvatarLocomotionSettings"
|
|
24
|
-
}
|
|
25
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import _m0 from "protobufjs/minimal";
|
|
2
|
-
/**
|
|
3
|
-
* @public
|
|
4
|
-
*/
|
|
5
|
-
export declare const enum PBAudioAnalysisMode {
|
|
6
|
-
MODE_RAW = 0,
|
|
7
|
-
MODE_LOGARITHMIC = 1
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* @public
|
|
11
|
-
*/
|
|
12
|
-
export interface PBAudioAnalysis {
|
|
13
|
-
/** Parameters section */
|
|
14
|
-
mode: PBAudioAnalysisMode;
|
|
15
|
-
/** Used only when mode == MODE_LOGARITHMIC */
|
|
16
|
-
amplitudeGain?: number | undefined;
|
|
17
|
-
/** End when mode == MODE_LOGARITHMIC */
|
|
18
|
-
bandsGain?: number | undefined;
|
|
19
|
-
/** Result section */
|
|
20
|
-
amplitude: number;
|
|
21
|
-
/** Protobuf doesn't support fixed arrays -> 8 band fields */
|
|
22
|
-
band0: number;
|
|
23
|
-
band1: number;
|
|
24
|
-
band2: number;
|
|
25
|
-
band3: number;
|
|
26
|
-
band4: number;
|
|
27
|
-
band5: number;
|
|
28
|
-
band6: number;
|
|
29
|
-
band7: number;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* @public
|
|
33
|
-
*/
|
|
34
|
-
export declare namespace PBAudioAnalysis {
|
|
35
|
-
function encode(message: PBAudioAnalysis, writer?: _m0.Writer): _m0.Writer;
|
|
36
|
-
function decode(input: _m0.Reader | Uint8Array, length?: number): PBAudioAnalysis;
|
|
37
|
-
}
|