@dcl/ecs 7.20.1 → 7.20.2-22104870534.commit-0df3cc0
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/extended/AudioAnalysis.d.ts +55 -0
- package/dist/components/extended/AudioAnalysis.js +66 -0
- package/dist/components/generated/AudioAnalysis.gen.d.ts +1 -0
- package/dist/components/generated/AudioAnalysis.gen.js +25 -0
- package/dist/components/generated/AvatarLocomotionSettings.gen.d.ts +1 -0
- package/dist/components/generated/AvatarLocomotionSettings.gen.js +25 -0
- package/dist/components/generated/component-names.gen.js +2 -0
- package/dist/components/generated/global.gen.d.ts +4 -0
- package/dist/components/generated/global.gen.js +2 -0
- package/dist/components/generated/index.gen.d.ts +8 -0
- package/dist/components/generated/index.gen.js +10 -0
- package/dist/components/generated/pb/decentraland/sdk/components/audio_analysis.gen.d.ts +37 -0
- package/dist/components/generated/pb/decentraland/sdk/components/audio_analysis.gen.js +161 -0
- package/dist/components/generated/pb/decentraland/sdk/components/avatar_locomotion_settings.gen.d.ts +29 -0
- package/dist/components/generated/pb/decentraland/sdk/components/avatar_locomotion_settings.gen.js +93 -0
- package/dist/components/generated/pb/decentraland/sdk/components/common/input_action.gen.d.ts +2 -1
- package/dist/components/generated/pb/decentraland/sdk/components/common/input_action.gen.js +1 -0
- package/dist/components/generated/pb/decentraland/sdk/components/virtual_camera.gen.d.ts +3 -0
- package/dist/components/generated/pb/decentraland/sdk/components/virtual_camera.gen.js +10 -1
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.js +3 -0
- package/dist/components/types.d.ts +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -0
- package/dist-cjs/components/extended/AudioAnalysis.d.ts +55 -0
- package/dist-cjs/components/extended/AudioAnalysis.js +70 -0
- package/dist-cjs/components/generated/AudioAnalysis.gen.d.ts +1 -0
- package/dist-cjs/components/generated/AudioAnalysis.gen.js +28 -0
- package/dist-cjs/components/generated/AvatarLocomotionSettings.gen.d.ts +1 -0
- package/dist-cjs/components/generated/AvatarLocomotionSettings.gen.js +28 -0
- package/dist-cjs/components/generated/component-names.gen.js +2 -0
- package/dist-cjs/components/generated/global.gen.d.ts +4 -0
- package/dist-cjs/components/generated/global.gen.js +3 -1
- package/dist-cjs/components/generated/index.gen.d.ts +8 -0
- package/dist-cjs/components/generated/index.gen.js +14 -2
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/audio_analysis.gen.d.ts +37 -0
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/audio_analysis.gen.js +167 -0
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/avatar_locomotion_settings.gen.d.ts +29 -0
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/avatar_locomotion_settings.gen.js +99 -0
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/common/input_action.gen.d.ts +2 -1
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/common/input_action.gen.js +1 -0
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/virtual_camera.gen.d.ts +3 -0
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/virtual_camera.gen.js +10 -1
- package/dist-cjs/components/index.d.ts +4 -0
- package/dist-cjs/components/index.js +5 -1
- package/dist-cjs/components/types.d.ts +1 -0
- package/dist-cjs/index.d.ts +2 -1
- package/dist-cjs/index.js +2 -1
- package/package.json +2 -2
|
@@ -0,0 +1,55 @@
|
|
|
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;
|
|
@@ -0,0 +1,66 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
};
|
|
@@ -6,6 +6,7 @@ export const coreComponentMappings = {
|
|
|
6
6
|
"core::Animator": 1042,
|
|
7
7
|
"core::AssetLoad": 1213,
|
|
8
8
|
"core::AssetLoadLoadingState": 1214,
|
|
9
|
+
"core::AudioAnalysis": 1212,
|
|
9
10
|
"core::AudioEvent": 1105,
|
|
10
11
|
"core::AudioSource": 1020,
|
|
11
12
|
"core::AudioStream": 1021,
|
|
@@ -13,6 +14,7 @@ export const coreComponentMappings = {
|
|
|
13
14
|
"core::AvatarBase": 1087,
|
|
14
15
|
"core::AvatarEmoteCommand": 1088,
|
|
15
16
|
"core::AvatarEquippedData": 1091,
|
|
17
|
+
"core::AvatarLocomotionSettings": 1211,
|
|
16
18
|
"core::AvatarModifierArea": 1070,
|
|
17
19
|
"core::AvatarShape": 1080,
|
|
18
20
|
"core::Billboard": 1090,
|
|
@@ -2,6 +2,7 @@ import { LastWriteWinElementSetComponentDefinition, GrowOnlyValueSetComponentDef
|
|
|
2
2
|
export * from './index.gen';
|
|
3
3
|
import { PBAssetLoad } from './pb/decentraland/sdk/components/asset_load.gen';
|
|
4
4
|
import { PBAssetLoadLoadingState } from './pb/decentraland/sdk/components/asset_load_loading_state.gen';
|
|
5
|
+
import { PBAudioAnalysis } from './pb/decentraland/sdk/components/audio_analysis.gen';
|
|
5
6
|
import { PBAudioEvent } from './pb/decentraland/sdk/components/audio_event.gen';
|
|
6
7
|
import { PBAudioSource } from './pb/decentraland/sdk/components/audio_source.gen';
|
|
7
8
|
import { PBAudioStream } from './pb/decentraland/sdk/components/audio_stream.gen';
|
|
@@ -9,6 +10,7 @@ import { PBAvatarAttach } from './pb/decentraland/sdk/components/avatar_attach.g
|
|
|
9
10
|
import { PBAvatarBase } from './pb/decentraland/sdk/components/avatar_base.gen';
|
|
10
11
|
import { PBAvatarEmoteCommand } from './pb/decentraland/sdk/components/avatar_emote_command.gen';
|
|
11
12
|
import { PBAvatarEquippedData } from './pb/decentraland/sdk/components/avatar_equipped_data.gen';
|
|
13
|
+
import { PBAvatarLocomotionSettings } from './pb/decentraland/sdk/components/avatar_locomotion_settings.gen';
|
|
12
14
|
import { PBAvatarModifierArea } from './pb/decentraland/sdk/components/avatar_modifier_area.gen';
|
|
13
15
|
import { PBAvatarShape } from './pb/decentraland/sdk/components/avatar_shape.gen';
|
|
14
16
|
import { PBBillboard } from './pb/decentraland/sdk/components/billboard.gen';
|
|
@@ -50,6 +52,7 @@ import { PBVirtualCamera } from './pb/decentraland/sdk/components/virtual_camera
|
|
|
50
52
|
import { PBVisibilityComponent } from './pb/decentraland/sdk/components/visibility_component.gen';
|
|
51
53
|
/** @public */ export declare const AssetLoad: LastWriteWinElementSetComponentDefinition<PBAssetLoad>;
|
|
52
54
|
/** @public */ export declare const AssetLoadLoadingState: GrowOnlyValueSetComponentDefinition<PBAssetLoadLoadingState>;
|
|
55
|
+
/** @public */ export declare const AudioAnalysis: LastWriteWinElementSetComponentDefinition<PBAudioAnalysis>;
|
|
53
56
|
/** @public */ export declare const AudioEvent: GrowOnlyValueSetComponentDefinition<PBAudioEvent>;
|
|
54
57
|
/** @public */ export declare const AudioSource: LastWriteWinElementSetComponentDefinition<PBAudioSource>;
|
|
55
58
|
/** @public */ export declare const AudioStream: LastWriteWinElementSetComponentDefinition<PBAudioStream>;
|
|
@@ -57,6 +60,7 @@ import { PBVisibilityComponent } from './pb/decentraland/sdk/components/visibili
|
|
|
57
60
|
/** @public */ export declare const AvatarBase: LastWriteWinElementSetComponentDefinition<PBAvatarBase>;
|
|
58
61
|
/** @public */ export declare const AvatarEmoteCommand: GrowOnlyValueSetComponentDefinition<PBAvatarEmoteCommand>;
|
|
59
62
|
/** @public */ export declare const AvatarEquippedData: LastWriteWinElementSetComponentDefinition<PBAvatarEquippedData>;
|
|
63
|
+
/** @public */ export declare const AvatarLocomotionSettings: LastWriteWinElementSetComponentDefinition<PBAvatarLocomotionSettings>;
|
|
60
64
|
/** @public */ export declare const AvatarModifierArea: LastWriteWinElementSetComponentDefinition<PBAvatarModifierArea>;
|
|
61
65
|
/** @public */ export declare const AvatarShape: LastWriteWinElementSetComponentDefinition<PBAvatarShape>;
|
|
62
66
|
/** @public */ export declare const Billboard: LastWriteWinElementSetComponentDefinition<PBBillboard>;
|
|
@@ -3,6 +3,7 @@ import * as components from './index.gen';
|
|
|
3
3
|
export * from './index.gen';
|
|
4
4
|
/** @public */ export const AssetLoad = /* @__PURE__ */ components.AssetLoad(engine);
|
|
5
5
|
/** @public */ export const AssetLoadLoadingState = /* @__PURE__ */ components.AssetLoadLoadingState(engine);
|
|
6
|
+
/** @public */ export const AudioAnalysis = /* @__PURE__ */ components.AudioAnalysis(engine);
|
|
6
7
|
/** @public */ export const AudioEvent = /* @__PURE__ */ components.AudioEvent(engine);
|
|
7
8
|
/** @public */ export const AudioSource = /* @__PURE__ */ components.AudioSource(engine);
|
|
8
9
|
/** @public */ export const AudioStream = /* @__PURE__ */ components.AudioStream(engine);
|
|
@@ -10,6 +11,7 @@ export * from './index.gen';
|
|
|
10
11
|
/** @public */ export const AvatarBase = /* @__PURE__ */ components.AvatarBase(engine);
|
|
11
12
|
/** @public */ export const AvatarEmoteCommand = /* @__PURE__ */ components.AvatarEmoteCommand(engine);
|
|
12
13
|
/** @public */ export const AvatarEquippedData = /* @__PURE__ */ components.AvatarEquippedData(engine);
|
|
14
|
+
/** @public */ export const AvatarLocomotionSettings = /* @__PURE__ */ components.AvatarLocomotionSettings(engine);
|
|
13
15
|
/** @public */ export const AvatarModifierArea = /* @__PURE__ */ components.AvatarModifierArea(engine);
|
|
14
16
|
/** @public */ export const AvatarShape = /* @__PURE__ */ components.AvatarShape(engine);
|
|
15
17
|
/** @public */ export const Billboard = /* @__PURE__ */ components.Billboard(engine);
|
|
@@ -3,6 +3,7 @@ import { LastWriteWinElementSetComponentDefinition, GrowOnlyValueSetComponentDef
|
|
|
3
3
|
import { PBAnimator } from './pb/decentraland/sdk/components/animator.gen';
|
|
4
4
|
import { PBAssetLoad } from './pb/decentraland/sdk/components/asset_load.gen';
|
|
5
5
|
import { PBAssetLoadLoadingState } from './pb/decentraland/sdk/components/asset_load_loading_state.gen';
|
|
6
|
+
import { PBAudioAnalysis } from './pb/decentraland/sdk/components/audio_analysis.gen';
|
|
6
7
|
import { PBAudioEvent } from './pb/decentraland/sdk/components/audio_event.gen';
|
|
7
8
|
import { PBAudioSource } from './pb/decentraland/sdk/components/audio_source.gen';
|
|
8
9
|
import { PBAudioStream } from './pb/decentraland/sdk/components/audio_stream.gen';
|
|
@@ -10,6 +11,7 @@ import { PBAvatarAttach } from './pb/decentraland/sdk/components/avatar_attach.g
|
|
|
10
11
|
import { PBAvatarBase } from './pb/decentraland/sdk/components/avatar_base.gen';
|
|
11
12
|
import { PBAvatarEmoteCommand } from './pb/decentraland/sdk/components/avatar_emote_command.gen';
|
|
12
13
|
import { PBAvatarEquippedData } from './pb/decentraland/sdk/components/avatar_equipped_data.gen';
|
|
14
|
+
import { PBAvatarLocomotionSettings } from './pb/decentraland/sdk/components/avatar_locomotion_settings.gen';
|
|
13
15
|
import { PBAvatarModifierArea } from './pb/decentraland/sdk/components/avatar_modifier_area.gen';
|
|
14
16
|
import { PBAvatarShape } from './pb/decentraland/sdk/components/avatar_shape.gen';
|
|
15
17
|
import { PBBillboard } from './pb/decentraland/sdk/components/billboard.gen';
|
|
@@ -56,6 +58,7 @@ import { PBVisibilityComponent } from './pb/decentraland/sdk/components/visibili
|
|
|
56
58
|
export * from './pb/decentraland/sdk/components/animator.gen';
|
|
57
59
|
export * from './pb/decentraland/sdk/components/asset_load.gen';
|
|
58
60
|
export * from './pb/decentraland/sdk/components/asset_load_loading_state.gen';
|
|
61
|
+
export * from './pb/decentraland/sdk/components/audio_analysis.gen';
|
|
59
62
|
export * from './pb/decentraland/sdk/components/audio_event.gen';
|
|
60
63
|
export * from './pb/decentraland/sdk/components/audio_source.gen';
|
|
61
64
|
export * from './pb/decentraland/sdk/components/audio_stream.gen';
|
|
@@ -63,6 +66,7 @@ export * from './pb/decentraland/sdk/components/avatar_attach.gen';
|
|
|
63
66
|
export * from './pb/decentraland/sdk/components/avatar_base.gen';
|
|
64
67
|
export * from './pb/decentraland/sdk/components/avatar_emote_command.gen';
|
|
65
68
|
export * from './pb/decentraland/sdk/components/avatar_equipped_data.gen';
|
|
69
|
+
export * from './pb/decentraland/sdk/components/avatar_locomotion_settings.gen';
|
|
66
70
|
export * from './pb/decentraland/sdk/components/avatar_modifier_area.gen';
|
|
67
71
|
export * from './pb/decentraland/sdk/components/avatar_shape.gen';
|
|
68
72
|
export * from './pb/decentraland/sdk/components/billboard.gen';
|
|
@@ -111,6 +115,7 @@ export type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<an
|
|
|
111
115
|
/** @public */ export declare const Animator: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAnimator>>;
|
|
112
116
|
/** @public */ export declare const AssetLoad: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAssetLoad>>;
|
|
113
117
|
/** @public */ export declare const AssetLoadLoadingState: GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBAssetLoadLoadingState>>;
|
|
118
|
+
/** @public */ export declare const AudioAnalysis: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioAnalysis>>;
|
|
114
119
|
/** @public */ export declare const AudioEvent: GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBAudioEvent>>;
|
|
115
120
|
/** @public */ export declare const AudioSource: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioSource>>;
|
|
116
121
|
/** @public */ export declare const AudioStream: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioStream>>;
|
|
@@ -118,6 +123,7 @@ export type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<an
|
|
|
118
123
|
/** @public */ export declare const AvatarBase: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarBase>>;
|
|
119
124
|
/** @public */ export declare const AvatarEmoteCommand: GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBAvatarEmoteCommand>>;
|
|
120
125
|
/** @public */ export declare const AvatarEquippedData: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarEquippedData>>;
|
|
126
|
+
/** @public */ export declare const AvatarLocomotionSettings: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarLocomotionSettings>>;
|
|
121
127
|
/** @public */ export declare const AvatarModifierArea: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarModifierArea>>;
|
|
122
128
|
/** @public */ export declare const AvatarShape: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarShape>>;
|
|
123
129
|
/** @public */ export declare const Billboard: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBBillboard>>;
|
|
@@ -166,6 +172,7 @@ export declare const componentDefinitionByName: {
|
|
|
166
172
|
"core::Animator": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAnimator>>;
|
|
167
173
|
"core::AssetLoad": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAssetLoad>>;
|
|
168
174
|
"core::AssetLoadLoadingState": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBAssetLoadLoadingState>>;
|
|
175
|
+
"core::AudioAnalysis": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioAnalysis>>;
|
|
169
176
|
"core::AudioEvent": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBAudioEvent>>;
|
|
170
177
|
"core::AudioSource": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioSource>>;
|
|
171
178
|
"core::AudioStream": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioStream>>;
|
|
@@ -173,6 +180,7 @@ export declare const componentDefinitionByName: {
|
|
|
173
180
|
"core::AvatarBase": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarBase>>;
|
|
174
181
|
"core::AvatarEmoteCommand": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBAvatarEmoteCommand>>;
|
|
175
182
|
"core::AvatarEquippedData": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarEquippedData>>;
|
|
183
|
+
"core::AvatarLocomotionSettings": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarLocomotionSettings>>;
|
|
176
184
|
"core::AvatarModifierArea": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarModifierArea>>;
|
|
177
185
|
"core::AvatarShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarShape>>;
|
|
178
186
|
"core::Billboard": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBBillboard>>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AnimatorSchema } from './Animator.gen';
|
|
2
2
|
import { AssetLoadSchema } from './AssetLoad.gen';
|
|
3
3
|
import { AssetLoadLoadingStateSchema } from './AssetLoadLoadingState.gen';
|
|
4
|
+
import { AudioAnalysisSchema } from './AudioAnalysis.gen';
|
|
4
5
|
import { AudioEventSchema } from './AudioEvent.gen';
|
|
5
6
|
import { AudioSourceSchema } from './AudioSource.gen';
|
|
6
7
|
import { AudioStreamSchema } from './AudioStream.gen';
|
|
@@ -8,6 +9,7 @@ import { AvatarAttachSchema } from './AvatarAttach.gen';
|
|
|
8
9
|
import { AvatarBaseSchema } from './AvatarBase.gen';
|
|
9
10
|
import { AvatarEmoteCommandSchema } from './AvatarEmoteCommand.gen';
|
|
10
11
|
import { AvatarEquippedDataSchema } from './AvatarEquippedData.gen';
|
|
12
|
+
import { AvatarLocomotionSettingsSchema } from './AvatarLocomotionSettings.gen';
|
|
11
13
|
import { AvatarModifierAreaSchema } from './AvatarModifierArea.gen';
|
|
12
14
|
import { AvatarShapeSchema } from './AvatarShape.gen';
|
|
13
15
|
import { BillboardSchema } from './Billboard.gen';
|
|
@@ -54,6 +56,7 @@ import { VisibilityComponentSchema } from './VisibilityComponent.gen';
|
|
|
54
56
|
export * from './pb/decentraland/sdk/components/animator.gen';
|
|
55
57
|
export * from './pb/decentraland/sdk/components/asset_load.gen';
|
|
56
58
|
export * from './pb/decentraland/sdk/components/asset_load_loading_state.gen';
|
|
59
|
+
export * from './pb/decentraland/sdk/components/audio_analysis.gen';
|
|
57
60
|
export * from './pb/decentraland/sdk/components/audio_event.gen';
|
|
58
61
|
export * from './pb/decentraland/sdk/components/audio_source.gen';
|
|
59
62
|
export * from './pb/decentraland/sdk/components/audio_stream.gen';
|
|
@@ -61,6 +64,7 @@ export * from './pb/decentraland/sdk/components/avatar_attach.gen';
|
|
|
61
64
|
export * from './pb/decentraland/sdk/components/avatar_base.gen';
|
|
62
65
|
export * from './pb/decentraland/sdk/components/avatar_emote_command.gen';
|
|
63
66
|
export * from './pb/decentraland/sdk/components/avatar_equipped_data.gen';
|
|
67
|
+
export * from './pb/decentraland/sdk/components/avatar_locomotion_settings.gen';
|
|
64
68
|
export * from './pb/decentraland/sdk/components/avatar_modifier_area.gen';
|
|
65
69
|
export * from './pb/decentraland/sdk/components/avatar_shape.gen';
|
|
66
70
|
export * from './pb/decentraland/sdk/components/billboard.gen';
|
|
@@ -112,6 +116,8 @@ export * from './pb/decentraland/sdk/components/visibility_component.gen';
|
|
|
112
116
|
timestampFunction: (t) => t.timestamp,
|
|
113
117
|
maxElements: 100
|
|
114
118
|
});
|
|
119
|
+
/** @public */ export const AudioAnalysis = engine =>
|
|
120
|
+
/* @__PURE__ */ engine.defineComponentFromSchema("core::AudioAnalysis", AudioAnalysisSchema);
|
|
115
121
|
/** @public */ export const AudioEvent = (engine) => /* @__PURE__ */ engine.defineValueSetComponentFromSchema("core::AudioEvent", AudioEventSchema, {
|
|
116
122
|
timestampFunction: (t) => t.timestamp,
|
|
117
123
|
maxElements: 100
|
|
@@ -130,6 +136,8 @@ export * from './pb/decentraland/sdk/components/visibility_component.gen';
|
|
|
130
136
|
});
|
|
131
137
|
/** @public */ export const AvatarEquippedData = engine =>
|
|
132
138
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::AvatarEquippedData", AvatarEquippedDataSchema);
|
|
139
|
+
/** @public */ export const AvatarLocomotionSettings = engine =>
|
|
140
|
+
/* @__PURE__ */ engine.defineComponentFromSchema("core::AvatarLocomotionSettings", AvatarLocomotionSettingsSchema);
|
|
133
141
|
/** @public */ export const AvatarModifierArea = engine =>
|
|
134
142
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::AvatarModifierArea", AvatarModifierAreaSchema);
|
|
135
143
|
/** @public */ export const AvatarShape = engine =>
|
|
@@ -227,6 +235,7 @@ export const componentDefinitionByName = /* @__PURE__ */ {
|
|
|
227
235
|
"core::Animator": Animator,
|
|
228
236
|
"core::AssetLoad": AssetLoad,
|
|
229
237
|
"core::AssetLoadLoadingState": AssetLoadLoadingState,
|
|
238
|
+
"core::AudioAnalysis": AudioAnalysis,
|
|
230
239
|
"core::AudioEvent": AudioEvent,
|
|
231
240
|
"core::AudioSource": AudioSource,
|
|
232
241
|
"core::AudioStream": AudioStream,
|
|
@@ -234,6 +243,7 @@ export const componentDefinitionByName = /* @__PURE__ */ {
|
|
|
234
243
|
"core::AvatarBase": AvatarBase,
|
|
235
244
|
"core::AvatarEmoteCommand": AvatarEmoteCommand,
|
|
236
245
|
"core::AvatarEquippedData": AvatarEquippedData,
|
|
246
|
+
"core::AvatarLocomotionSettings": AvatarLocomotionSettings,
|
|
237
247
|
"core::AvatarModifierArea": AvatarModifierArea,
|
|
238
248
|
"core::AvatarShape": AvatarShape,
|
|
239
249
|
"core::Billboard": Billboard,
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import _m0 from "protobufjs/minimal";
|
|
3
|
+
const protobufPackageSarasa = "decentraland.sdk.components";
|
|
4
|
+
/**
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export var PBAudioAnalysisMode;
|
|
8
|
+
(function (PBAudioAnalysisMode) {
|
|
9
|
+
PBAudioAnalysisMode[PBAudioAnalysisMode["MODE_RAW"] = 0] = "MODE_RAW";
|
|
10
|
+
PBAudioAnalysisMode[PBAudioAnalysisMode["MODE_LOGARITHMIC"] = 1] = "MODE_LOGARITHMIC";
|
|
11
|
+
})(PBAudioAnalysisMode || (PBAudioAnalysisMode = {}));
|
|
12
|
+
function createBasePBAudioAnalysis() {
|
|
13
|
+
return {
|
|
14
|
+
mode: 0,
|
|
15
|
+
amplitudeGain: undefined,
|
|
16
|
+
bandsGain: undefined,
|
|
17
|
+
amplitude: 0,
|
|
18
|
+
band0: 0,
|
|
19
|
+
band1: 0,
|
|
20
|
+
band2: 0,
|
|
21
|
+
band3: 0,
|
|
22
|
+
band4: 0,
|
|
23
|
+
band5: 0,
|
|
24
|
+
band6: 0,
|
|
25
|
+
band7: 0,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
export var PBAudioAnalysis;
|
|
32
|
+
(function (PBAudioAnalysis) {
|
|
33
|
+
function encode(message, writer = _m0.Writer.create()) {
|
|
34
|
+
if (message.mode !== 0) {
|
|
35
|
+
writer.uint32(8).int32(message.mode);
|
|
36
|
+
}
|
|
37
|
+
if (message.amplitudeGain !== undefined) {
|
|
38
|
+
writer.uint32(805).float(message.amplitudeGain);
|
|
39
|
+
}
|
|
40
|
+
if (message.bandsGain !== undefined) {
|
|
41
|
+
writer.uint32(813).float(message.bandsGain);
|
|
42
|
+
}
|
|
43
|
+
if (message.amplitude !== 0) {
|
|
44
|
+
writer.uint32(1605).float(message.amplitude);
|
|
45
|
+
}
|
|
46
|
+
if (message.band0 !== 0) {
|
|
47
|
+
writer.uint32(1613).float(message.band0);
|
|
48
|
+
}
|
|
49
|
+
if (message.band1 !== 0) {
|
|
50
|
+
writer.uint32(1621).float(message.band1);
|
|
51
|
+
}
|
|
52
|
+
if (message.band2 !== 0) {
|
|
53
|
+
writer.uint32(1629).float(message.band2);
|
|
54
|
+
}
|
|
55
|
+
if (message.band3 !== 0) {
|
|
56
|
+
writer.uint32(1637).float(message.band3);
|
|
57
|
+
}
|
|
58
|
+
if (message.band4 !== 0) {
|
|
59
|
+
writer.uint32(1645).float(message.band4);
|
|
60
|
+
}
|
|
61
|
+
if (message.band5 !== 0) {
|
|
62
|
+
writer.uint32(1653).float(message.band5);
|
|
63
|
+
}
|
|
64
|
+
if (message.band6 !== 0) {
|
|
65
|
+
writer.uint32(1661).float(message.band6);
|
|
66
|
+
}
|
|
67
|
+
if (message.band7 !== 0) {
|
|
68
|
+
writer.uint32(1669).float(message.band7);
|
|
69
|
+
}
|
|
70
|
+
return writer;
|
|
71
|
+
}
|
|
72
|
+
PBAudioAnalysis.encode = encode;
|
|
73
|
+
function decode(input, length) {
|
|
74
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
75
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
76
|
+
const message = createBasePBAudioAnalysis();
|
|
77
|
+
while (reader.pos < end) {
|
|
78
|
+
const tag = reader.uint32();
|
|
79
|
+
switch (tag >>> 3) {
|
|
80
|
+
case 1:
|
|
81
|
+
if (tag !== 8) {
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
message.mode = reader.int32();
|
|
85
|
+
continue;
|
|
86
|
+
case 100:
|
|
87
|
+
if (tag !== 805) {
|
|
88
|
+
break;
|
|
89
|
+
}
|
|
90
|
+
message.amplitudeGain = reader.float();
|
|
91
|
+
continue;
|
|
92
|
+
case 101:
|
|
93
|
+
if (tag !== 813) {
|
|
94
|
+
break;
|
|
95
|
+
}
|
|
96
|
+
message.bandsGain = reader.float();
|
|
97
|
+
continue;
|
|
98
|
+
case 200:
|
|
99
|
+
if (tag !== 1605) {
|
|
100
|
+
break;
|
|
101
|
+
}
|
|
102
|
+
message.amplitude = reader.float();
|
|
103
|
+
continue;
|
|
104
|
+
case 201:
|
|
105
|
+
if (tag !== 1613) {
|
|
106
|
+
break;
|
|
107
|
+
}
|
|
108
|
+
message.band0 = reader.float();
|
|
109
|
+
continue;
|
|
110
|
+
case 202:
|
|
111
|
+
if (tag !== 1621) {
|
|
112
|
+
break;
|
|
113
|
+
}
|
|
114
|
+
message.band1 = reader.float();
|
|
115
|
+
continue;
|
|
116
|
+
case 203:
|
|
117
|
+
if (tag !== 1629) {
|
|
118
|
+
break;
|
|
119
|
+
}
|
|
120
|
+
message.band2 = reader.float();
|
|
121
|
+
continue;
|
|
122
|
+
case 204:
|
|
123
|
+
if (tag !== 1637) {
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
126
|
+
message.band3 = reader.float();
|
|
127
|
+
continue;
|
|
128
|
+
case 205:
|
|
129
|
+
if (tag !== 1645) {
|
|
130
|
+
break;
|
|
131
|
+
}
|
|
132
|
+
message.band4 = reader.float();
|
|
133
|
+
continue;
|
|
134
|
+
case 206:
|
|
135
|
+
if (tag !== 1653) {
|
|
136
|
+
break;
|
|
137
|
+
}
|
|
138
|
+
message.band5 = reader.float();
|
|
139
|
+
continue;
|
|
140
|
+
case 207:
|
|
141
|
+
if (tag !== 1661) {
|
|
142
|
+
break;
|
|
143
|
+
}
|
|
144
|
+
message.band6 = reader.float();
|
|
145
|
+
continue;
|
|
146
|
+
case 208:
|
|
147
|
+
if (tag !== 1669) {
|
|
148
|
+
break;
|
|
149
|
+
}
|
|
150
|
+
message.band7 = reader.float();
|
|
151
|
+
continue;
|
|
152
|
+
}
|
|
153
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
154
|
+
break;
|
|
155
|
+
}
|
|
156
|
+
reader.skipType(tag & 7);
|
|
157
|
+
}
|
|
158
|
+
return message;
|
|
159
|
+
}
|
|
160
|
+
PBAudioAnalysis.decode = decode;
|
|
161
|
+
})(PBAudioAnalysis || (PBAudioAnalysis = {}));
|
package/dist/components/generated/pb/decentraland/sdk/components/avatar_locomotion_settings.gen.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import _m0 from "protobufjs/minimal";
|
|
2
|
+
/**
|
|
3
|
+
* The PBAvatarLocomotionSettings component allows scenes to modify locomotion settings defining things such
|
|
4
|
+
* as the avatar movement speed, jump height etc.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export interface PBAvatarLocomotionSettings {
|
|
10
|
+
/** Maximum speed when walking (in meters per second) */
|
|
11
|
+
walkSpeed?: number | undefined;
|
|
12
|
+
/** Maximum speed when jogging (in meters per second) */
|
|
13
|
+
jogSpeed?: number | undefined;
|
|
14
|
+
/** Maximum speed when running (in meters per second) */
|
|
15
|
+
runSpeed?: number | undefined;
|
|
16
|
+
/** Height of a regular jump (in meters) */
|
|
17
|
+
jumpHeight?: number | undefined;
|
|
18
|
+
/** Height of a jump while running (in meters) */
|
|
19
|
+
runJumpHeight?: number | undefined;
|
|
20
|
+
/** Cooldown time after a hard landing before the avatar can move again (in seconds) */
|
|
21
|
+
hardLandingCooldown?: number | undefined;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
26
|
+
export declare namespace PBAvatarLocomotionSettings {
|
|
27
|
+
function encode(message: PBAvatarLocomotionSettings, writer?: _m0.Writer): _m0.Writer;
|
|
28
|
+
function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarLocomotionSettings;
|
|
29
|
+
}
|