@dcl/ecs 7.16.0 → 7.16.1-20711942479.commit-e3098d9
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
|
+
};
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
export const coreComponentMappings = {
|
|
5
5
|
"core::Transform": 1,
|
|
6
6
|
"core::Animator": 1042,
|
|
7
|
+
"core::AudioAnalysis": 1212,
|
|
7
8
|
"core::AudioEvent": 1105,
|
|
8
9
|
"core::AudioSource": 1020,
|
|
9
10
|
"core::AudioStream": 1021,
|
|
@@ -11,6 +12,7 @@ export const coreComponentMappings = {
|
|
|
11
12
|
"core::AvatarBase": 1087,
|
|
12
13
|
"core::AvatarEmoteCommand": 1088,
|
|
13
14
|
"core::AvatarEquippedData": 1091,
|
|
15
|
+
"core::AvatarLocomotionSettings": 1211,
|
|
14
16
|
"core::AvatarModifierArea": 1070,
|
|
15
17
|
"core::AvatarShape": 1080,
|
|
16
18
|
"core::Billboard": 1090,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { LastWriteWinElementSetComponentDefinition, GrowOnlyValueSetComponentDefinition } from '../../engine/component';
|
|
2
2
|
export * from './index.gen';
|
|
3
|
+
import { PBAudioAnalysis } from './pb/decentraland/sdk/components/audio_analysis.gen';
|
|
3
4
|
import { PBAudioEvent } from './pb/decentraland/sdk/components/audio_event.gen';
|
|
4
5
|
import { PBAudioSource } from './pb/decentraland/sdk/components/audio_source.gen';
|
|
5
6
|
import { PBAudioStream } from './pb/decentraland/sdk/components/audio_stream.gen';
|
|
@@ -7,6 +8,7 @@ import { PBAvatarAttach } from './pb/decentraland/sdk/components/avatar_attach.g
|
|
|
7
8
|
import { PBAvatarBase } from './pb/decentraland/sdk/components/avatar_base.gen';
|
|
8
9
|
import { PBAvatarEmoteCommand } from './pb/decentraland/sdk/components/avatar_emote_command.gen';
|
|
9
10
|
import { PBAvatarEquippedData } from './pb/decentraland/sdk/components/avatar_equipped_data.gen';
|
|
11
|
+
import { PBAvatarLocomotionSettings } from './pb/decentraland/sdk/components/avatar_locomotion_settings.gen';
|
|
10
12
|
import { PBAvatarModifierArea } from './pb/decentraland/sdk/components/avatar_modifier_area.gen';
|
|
11
13
|
import { PBAvatarShape } from './pb/decentraland/sdk/components/avatar_shape.gen';
|
|
12
14
|
import { PBBillboard } from './pb/decentraland/sdk/components/billboard.gen';
|
|
@@ -46,6 +48,7 @@ import { PBVideoEvent } from './pb/decentraland/sdk/components/video_event.gen';
|
|
|
46
48
|
import { PBVideoPlayer } from './pb/decentraland/sdk/components/video_player.gen';
|
|
47
49
|
import { PBVirtualCamera } from './pb/decentraland/sdk/components/virtual_camera.gen';
|
|
48
50
|
import { PBVisibilityComponent } from './pb/decentraland/sdk/components/visibility_component.gen';
|
|
51
|
+
/** @public */ export declare const AudioAnalysis: LastWriteWinElementSetComponentDefinition<PBAudioAnalysis>;
|
|
49
52
|
/** @public */ export declare const AudioEvent: GrowOnlyValueSetComponentDefinition<PBAudioEvent>;
|
|
50
53
|
/** @public */ export declare const AudioSource: LastWriteWinElementSetComponentDefinition<PBAudioSource>;
|
|
51
54
|
/** @public */ export declare const AudioStream: LastWriteWinElementSetComponentDefinition<PBAudioStream>;
|
|
@@ -53,6 +56,7 @@ import { PBVisibilityComponent } from './pb/decentraland/sdk/components/visibili
|
|
|
53
56
|
/** @public */ export declare const AvatarBase: LastWriteWinElementSetComponentDefinition<PBAvatarBase>;
|
|
54
57
|
/** @public */ export declare const AvatarEmoteCommand: GrowOnlyValueSetComponentDefinition<PBAvatarEmoteCommand>;
|
|
55
58
|
/** @public */ export declare const AvatarEquippedData: LastWriteWinElementSetComponentDefinition<PBAvatarEquippedData>;
|
|
59
|
+
/** @public */ export declare const AvatarLocomotionSettings: LastWriteWinElementSetComponentDefinition<PBAvatarLocomotionSettings>;
|
|
56
60
|
/** @public */ export declare const AvatarModifierArea: LastWriteWinElementSetComponentDefinition<PBAvatarModifierArea>;
|
|
57
61
|
/** @public */ export declare const AvatarShape: LastWriteWinElementSetComponentDefinition<PBAvatarShape>;
|
|
58
62
|
/** @public */ export declare const Billboard: LastWriteWinElementSetComponentDefinition<PBBillboard>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { engine } from '../../runtime/initialization';
|
|
2
2
|
import * as components from './index.gen';
|
|
3
3
|
export * from './index.gen';
|
|
4
|
+
/** @public */ export const AudioAnalysis = /* @__PURE__ */ components.AudioAnalysis(engine);
|
|
4
5
|
/** @public */ export const AudioEvent = /* @__PURE__ */ components.AudioEvent(engine);
|
|
5
6
|
/** @public */ export const AudioSource = /* @__PURE__ */ components.AudioSource(engine);
|
|
6
7
|
/** @public */ export const AudioStream = /* @__PURE__ */ components.AudioStream(engine);
|
|
@@ -8,6 +9,7 @@ export * from './index.gen';
|
|
|
8
9
|
/** @public */ export const AvatarBase = /* @__PURE__ */ components.AvatarBase(engine);
|
|
9
10
|
/** @public */ export const AvatarEmoteCommand = /* @__PURE__ */ components.AvatarEmoteCommand(engine);
|
|
10
11
|
/** @public */ export const AvatarEquippedData = /* @__PURE__ */ components.AvatarEquippedData(engine);
|
|
12
|
+
/** @public */ export const AvatarLocomotionSettings = /* @__PURE__ */ components.AvatarLocomotionSettings(engine);
|
|
11
13
|
/** @public */ export const AvatarModifierArea = /* @__PURE__ */ components.AvatarModifierArea(engine);
|
|
12
14
|
/** @public */ export const AvatarShape = /* @__PURE__ */ components.AvatarShape(engine);
|
|
13
15
|
/** @public */ export const Billboard = /* @__PURE__ */ components.Billboard(engine);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { IEngine } from '../../engine/types';
|
|
2
2
|
import { LastWriteWinElementSetComponentDefinition, GrowOnlyValueSetComponentDefinition } from '../../engine/component';
|
|
3
3
|
import { PBAnimator } from './pb/decentraland/sdk/components/animator.gen';
|
|
4
|
+
import { PBAudioAnalysis } from './pb/decentraland/sdk/components/audio_analysis.gen';
|
|
4
5
|
import { PBAudioEvent } from './pb/decentraland/sdk/components/audio_event.gen';
|
|
5
6
|
import { PBAudioSource } from './pb/decentraland/sdk/components/audio_source.gen';
|
|
6
7
|
import { PBAudioStream } from './pb/decentraland/sdk/components/audio_stream.gen';
|
|
@@ -8,6 +9,7 @@ import { PBAvatarAttach } from './pb/decentraland/sdk/components/avatar_attach.g
|
|
|
8
9
|
import { PBAvatarBase } from './pb/decentraland/sdk/components/avatar_base.gen';
|
|
9
10
|
import { PBAvatarEmoteCommand } from './pb/decentraland/sdk/components/avatar_emote_command.gen';
|
|
10
11
|
import { PBAvatarEquippedData } from './pb/decentraland/sdk/components/avatar_equipped_data.gen';
|
|
12
|
+
import { PBAvatarLocomotionSettings } from './pb/decentraland/sdk/components/avatar_locomotion_settings.gen';
|
|
11
13
|
import { PBAvatarModifierArea } from './pb/decentraland/sdk/components/avatar_modifier_area.gen';
|
|
12
14
|
import { PBAvatarShape } from './pb/decentraland/sdk/components/avatar_shape.gen';
|
|
13
15
|
import { PBBillboard } from './pb/decentraland/sdk/components/billboard.gen';
|
|
@@ -52,6 +54,7 @@ import { PBVideoPlayer } from './pb/decentraland/sdk/components/video_player.gen
|
|
|
52
54
|
import { PBVirtualCamera } from './pb/decentraland/sdk/components/virtual_camera.gen';
|
|
53
55
|
import { PBVisibilityComponent } from './pb/decentraland/sdk/components/visibility_component.gen';
|
|
54
56
|
export * from './pb/decentraland/sdk/components/animator.gen';
|
|
57
|
+
export * from './pb/decentraland/sdk/components/audio_analysis.gen';
|
|
55
58
|
export * from './pb/decentraland/sdk/components/audio_event.gen';
|
|
56
59
|
export * from './pb/decentraland/sdk/components/audio_source.gen';
|
|
57
60
|
export * from './pb/decentraland/sdk/components/audio_stream.gen';
|
|
@@ -59,6 +62,7 @@ export * from './pb/decentraland/sdk/components/avatar_attach.gen';
|
|
|
59
62
|
export * from './pb/decentraland/sdk/components/avatar_base.gen';
|
|
60
63
|
export * from './pb/decentraland/sdk/components/avatar_emote_command.gen';
|
|
61
64
|
export * from './pb/decentraland/sdk/components/avatar_equipped_data.gen';
|
|
65
|
+
export * from './pb/decentraland/sdk/components/avatar_locomotion_settings.gen';
|
|
62
66
|
export * from './pb/decentraland/sdk/components/avatar_modifier_area.gen';
|
|
63
67
|
export * from './pb/decentraland/sdk/components/avatar_shape.gen';
|
|
64
68
|
export * from './pb/decentraland/sdk/components/billboard.gen';
|
|
@@ -105,6 +109,7 @@ export * from './pb/decentraland/sdk/components/visibility_component.gen';
|
|
|
105
109
|
export type LwwComponentGetter<T extends LastWriteWinElementSetComponentDefinition<any>> = (engine: Pick<IEngine, 'defineComponentFromSchema'>) => T;
|
|
106
110
|
export type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<any>> = (engine: Pick<IEngine, 'defineValueSetComponentFromSchema'>) => T;
|
|
107
111
|
/** @public */ export declare const Animator: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAnimator>>;
|
|
112
|
+
/** @public */ export declare const AudioAnalysis: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioAnalysis>>;
|
|
108
113
|
/** @public */ export declare const AudioEvent: GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBAudioEvent>>;
|
|
109
114
|
/** @public */ export declare const AudioSource: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioSource>>;
|
|
110
115
|
/** @public */ export declare const AudioStream: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioStream>>;
|
|
@@ -112,6 +117,7 @@ export type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<an
|
|
|
112
117
|
/** @public */ export declare const AvatarBase: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarBase>>;
|
|
113
118
|
/** @public */ export declare const AvatarEmoteCommand: GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBAvatarEmoteCommand>>;
|
|
114
119
|
/** @public */ export declare const AvatarEquippedData: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarEquippedData>>;
|
|
120
|
+
/** @public */ export declare const AvatarLocomotionSettings: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarLocomotionSettings>>;
|
|
115
121
|
/** @public */ export declare const AvatarModifierArea: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarModifierArea>>;
|
|
116
122
|
/** @public */ export declare const AvatarShape: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarShape>>;
|
|
117
123
|
/** @public */ export declare const Billboard: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBBillboard>>;
|
|
@@ -158,6 +164,7 @@ export type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<an
|
|
|
158
164
|
/** public */
|
|
159
165
|
export declare const componentDefinitionByName: {
|
|
160
166
|
"core::Animator": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAnimator>>;
|
|
167
|
+
"core::AudioAnalysis": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioAnalysis>>;
|
|
161
168
|
"core::AudioEvent": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBAudioEvent>>;
|
|
162
169
|
"core::AudioSource": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioSource>>;
|
|
163
170
|
"core::AudioStream": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioStream>>;
|
|
@@ -165,6 +172,7 @@ export declare const componentDefinitionByName: {
|
|
|
165
172
|
"core::AvatarBase": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarBase>>;
|
|
166
173
|
"core::AvatarEmoteCommand": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBAvatarEmoteCommand>>;
|
|
167
174
|
"core::AvatarEquippedData": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarEquippedData>>;
|
|
175
|
+
"core::AvatarLocomotionSettings": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarLocomotionSettings>>;
|
|
168
176
|
"core::AvatarModifierArea": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarModifierArea>>;
|
|
169
177
|
"core::AvatarShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarShape>>;
|
|
170
178
|
"core::Billboard": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBBillboard>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AnimatorSchema } from './Animator.gen';
|
|
2
|
+
import { AudioAnalysisSchema } from './AudioAnalysis.gen';
|
|
2
3
|
import { AudioEventSchema } from './AudioEvent.gen';
|
|
3
4
|
import { AudioSourceSchema } from './AudioSource.gen';
|
|
4
5
|
import { AudioStreamSchema } from './AudioStream.gen';
|
|
@@ -6,6 +7,7 @@ import { AvatarAttachSchema } from './AvatarAttach.gen';
|
|
|
6
7
|
import { AvatarBaseSchema } from './AvatarBase.gen';
|
|
7
8
|
import { AvatarEmoteCommandSchema } from './AvatarEmoteCommand.gen';
|
|
8
9
|
import { AvatarEquippedDataSchema } from './AvatarEquippedData.gen';
|
|
10
|
+
import { AvatarLocomotionSettingsSchema } from './AvatarLocomotionSettings.gen';
|
|
9
11
|
import { AvatarModifierAreaSchema } from './AvatarModifierArea.gen';
|
|
10
12
|
import { AvatarShapeSchema } from './AvatarShape.gen';
|
|
11
13
|
import { BillboardSchema } from './Billboard.gen';
|
|
@@ -50,6 +52,7 @@ import { VideoPlayerSchema } from './VideoPlayer.gen';
|
|
|
50
52
|
import { VirtualCameraSchema } from './VirtualCamera.gen';
|
|
51
53
|
import { VisibilityComponentSchema } from './VisibilityComponent.gen';
|
|
52
54
|
export * from './pb/decentraland/sdk/components/animator.gen';
|
|
55
|
+
export * from './pb/decentraland/sdk/components/audio_analysis.gen';
|
|
53
56
|
export * from './pb/decentraland/sdk/components/audio_event.gen';
|
|
54
57
|
export * from './pb/decentraland/sdk/components/audio_source.gen';
|
|
55
58
|
export * from './pb/decentraland/sdk/components/audio_stream.gen';
|
|
@@ -57,6 +60,7 @@ export * from './pb/decentraland/sdk/components/avatar_attach.gen';
|
|
|
57
60
|
export * from './pb/decentraland/sdk/components/avatar_base.gen';
|
|
58
61
|
export * from './pb/decentraland/sdk/components/avatar_emote_command.gen';
|
|
59
62
|
export * from './pb/decentraland/sdk/components/avatar_equipped_data.gen';
|
|
63
|
+
export * from './pb/decentraland/sdk/components/avatar_locomotion_settings.gen';
|
|
60
64
|
export * from './pb/decentraland/sdk/components/avatar_modifier_area.gen';
|
|
61
65
|
export * from './pb/decentraland/sdk/components/avatar_shape.gen';
|
|
62
66
|
export * from './pb/decentraland/sdk/components/billboard.gen';
|
|
@@ -102,6 +106,8 @@ export * from './pb/decentraland/sdk/components/virtual_camera.gen';
|
|
|
102
106
|
export * from './pb/decentraland/sdk/components/visibility_component.gen';
|
|
103
107
|
/** @public */ export const Animator = engine =>
|
|
104
108
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::Animator", AnimatorSchema);
|
|
109
|
+
/** @public */ export const AudioAnalysis = engine =>
|
|
110
|
+
/* @__PURE__ */ engine.defineComponentFromSchema("core::AudioAnalysis", AudioAnalysisSchema);
|
|
105
111
|
/** @public */ export const AudioEvent = (engine) => /* @__PURE__ */ engine.defineValueSetComponentFromSchema("core::AudioEvent", AudioEventSchema, {
|
|
106
112
|
timestampFunction: (t) => t.timestamp,
|
|
107
113
|
maxElements: 100
|
|
@@ -120,6 +126,8 @@ export * from './pb/decentraland/sdk/components/visibility_component.gen';
|
|
|
120
126
|
});
|
|
121
127
|
/** @public */ export const AvatarEquippedData = engine =>
|
|
122
128
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::AvatarEquippedData", AvatarEquippedDataSchema);
|
|
129
|
+
/** @public */ export const AvatarLocomotionSettings = engine =>
|
|
130
|
+
/* @__PURE__ */ engine.defineComponentFromSchema("core::AvatarLocomotionSettings", AvatarLocomotionSettingsSchema);
|
|
123
131
|
/** @public */ export const AvatarModifierArea = engine =>
|
|
124
132
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::AvatarModifierArea", AvatarModifierAreaSchema);
|
|
125
133
|
/** @public */ export const AvatarShape = engine =>
|
|
@@ -215,6 +223,7 @@ export * from './pb/decentraland/sdk/components/visibility_component.gen';
|
|
|
215
223
|
/** public */
|
|
216
224
|
export const componentDefinitionByName = /* @__PURE__ */ {
|
|
217
225
|
"core::Animator": Animator,
|
|
226
|
+
"core::AudioAnalysis": AudioAnalysis,
|
|
218
227
|
"core::AudioEvent": AudioEvent,
|
|
219
228
|
"core::AudioSource": AudioSource,
|
|
220
229
|
"core::AudioStream": AudioStream,
|
|
@@ -222,6 +231,7 @@ export const componentDefinitionByName = /* @__PURE__ */ {
|
|
|
222
231
|
"core::AvatarBase": AvatarBase,
|
|
223
232
|
"core::AvatarEmoteCommand": AvatarEmoteCommand,
|
|
224
233
|
"core::AvatarEquippedData": AvatarEquippedData,
|
|
234
|
+
"core::AvatarLocomotionSettings": AvatarLocomotionSettings,
|
|
225
235
|
"core::AvatarModifierArea": AvatarModifierArea,
|
|
226
236
|
"core::AvatarShape": AvatarShape,
|
|
227
237
|
"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
|
+
}
|