Skip to content

Commit ec25d50

Browse files
feat: locomotion settings (#1389)
* feat: locomotion settings (#1238) * set locomotion settings protocol branch and rebuilt * serialization tests * fix: update @dcl/protocol version * feat: add AudioAnalysis and AvatarLocomotionSettings components to playground-assets API * fix: export empty object in ReactEcs namespace to resolve documentation warning * fix: update snapshot files --------- Co-authored-by: Rocío Mena <rociocmena@gmail.com>
1 parent b6da827 commit ec25d50

19 files changed

Lines changed: 182 additions & 94 deletions

package-lock.json

Lines changed: 28 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"bugs": "https://github.com/decentraland/js-sdk-toolchain/issues",
77
"dependencies": {
88
"@actions/core": "^1.10.0",
9-
"@dcl/protocol": "1.0.0-24513367586.commit-0ed6dc3",
9+
"@dcl/protocol": "1.0.0-25337665839.commit-834aaf3",
1010
"@dcl/quickjs-emscripten": "^0.21.0-3680274614.commit-1808aa1",
1111
"@dcl/ts-proto": "1.153.0",
1212
"@types/fs-extra": "^9.0.12",

packages/@dcl/playground-assets/etc/playground-assets.api.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ export const assetLoadLoadingStateSystem: AssetLoadLoadingStateSystem;
7070
// @public (undocumented)
7171
export type AssetLoadLoadingStateSystemCallback = (event: DeepReadonlyObject<PBAssetLoadLoadingState>) => void;
7272

73+
// @public (undocumented)
74+
export const AudioAnalysis: LastWriteWinElementSetComponentDefinition<PBAudioAnalysis>;
75+
7376
// @public (undocumented)
7477
export const AudioEvent: GrowOnlyValueSetComponentDefinition<PBAudioEvent>;
7578

@@ -162,6 +165,9 @@ export const AvatarEmoteCommand: GrowOnlyValueSetComponentDefinition<PBAvatarEmo
162165
// @public (undocumented)
163166
export const AvatarEquippedData: LastWriteWinElementSetComponentDefinition<PBAvatarEquippedData>;
164167

168+
// @public (undocumented)
169+
export const AvatarLocomotionSettings: LastWriteWinElementSetComponentDefinition<PBAvatarLocomotionSettings>;
170+
165171
// @public (undocumented)
166172
export const AvatarModifierArea: LastWriteWinElementSetComponentDefinition<PBAvatarModifierArea>;
167173

@@ -660,13 +666,15 @@ export const componentDefinitionByName: {
660666
"core::Animator": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAnimator>>;
661667
"core::AssetLoad": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAssetLoad>>;
662668
"core::AssetLoadLoadingState": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBAssetLoadLoadingState>>;
669+
"core::AudioAnalysis": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioAnalysis>>;
663670
"core::AudioEvent": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBAudioEvent>>;
664671
"core::AudioSource": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioSource>>;
665672
"core::AudioStream": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioStream>>;
666673
"core::AvatarAttach": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarAttach>>;
667674
"core::AvatarBase": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarBase>>;
668675
"core::AvatarEmoteCommand": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBAvatarEmoteCommand>>;
669676
"core::AvatarEquippedData": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarEquippedData>>;
677+
"core::AvatarLocomotionSettings": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarLocomotionSettings>>;
670678
"core::AvatarModifierArea": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarModifierArea>>;
671679
"core::AvatarShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarShape>>;
672680
"core::Billboard": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBBillboard>>;
@@ -1537,6 +1545,7 @@ export const enum InputAction {
15371545
IA_JUMP = 8,
15381546
// (undocumented)
15391547
IA_LEFT = 7,
1548+
IA_MODIFIER = 14,
15401549
// (undocumented)
15411550
IA_POINTER = 0,
15421551
// (undocumented)
@@ -2351,6 +2360,46 @@ export namespace PBAssetLoadLoadingState {
23512360
export function encode(message: PBAssetLoadLoadingState, writer?: _m0.Writer): _m0.Writer;
23522361
}
23532362

2363+
// @public (undocumented)
2364+
export interface PBAudioAnalysis {
2365+
amplitude: number;
2366+
amplitudeGain?: number | undefined;
2367+
// Warning: (tsdoc-escape-greater-than) The ">" character should be escaped using a backslash to avoid confusion with an HTML tag
2368+
band0: number;
2369+
// (undocumented)
2370+
band1: number;
2371+
// (undocumented)
2372+
band2: number;
2373+
// (undocumented)
2374+
band3: number;
2375+
// (undocumented)
2376+
band4: number;
2377+
// (undocumented)
2378+
band5: number;
2379+
// (undocumented)
2380+
band6: number;
2381+
// (undocumented)
2382+
band7: number;
2383+
bandsGain?: number | undefined;
2384+
mode: PBAudioAnalysisMode;
2385+
}
2386+
2387+
// @public (undocumented)
2388+
export namespace PBAudioAnalysis {
2389+
// (undocumented)
2390+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAudioAnalysis;
2391+
// (undocumented)
2392+
export function encode(message: PBAudioAnalysis, writer?: _m0.Writer): _m0.Writer;
2393+
}
2394+
2395+
// @public (undocumented)
2396+
export const enum PBAudioAnalysisMode {
2397+
// (undocumented)
2398+
MODE_LOGARITHMIC = 1,
2399+
// (undocumented)
2400+
MODE_RAW = 0
2401+
}
2402+
23542403
// @public (undocumented)
23552404
export interface PBAudioEvent {
23562405
// (undocumented)
@@ -2472,6 +2521,24 @@ export namespace PBAvatarEquippedData {
24722521
export function encode(message: PBAvatarEquippedData, writer?: _m0.Writer): _m0.Writer;
24732522
}
24742523

2524+
// @public (undocumented)
2525+
export interface PBAvatarLocomotionSettings {
2526+
hardLandingCooldown?: number | undefined;
2527+
jogSpeed?: number | undefined;
2528+
jumpHeight?: number | undefined;
2529+
runJumpHeight?: number | undefined;
2530+
runSpeed?: number | undefined;
2531+
walkSpeed?: number | undefined;
2532+
}
2533+
2534+
// @public (undocumented)
2535+
export namespace PBAvatarLocomotionSettings {
2536+
// (undocumented)
2537+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarLocomotionSettings;
2538+
// (undocumented)
2539+
export function encode(message: PBAvatarLocomotionSettings, writer?: _m0.Writer): _m0.Writer;
2540+
}
2541+
24752542
// @public (undocumented)
24762543
export interface PBAvatarModifierArea {
24772544
area: PBVector3 | undefined;

packages/@dcl/sdk-commands/package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@dcl/sdk-commands/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"@dcl/inspector": "7.25.0",
1515
"@dcl/linker-dapp": "0.15.2",
1616
"@dcl/mini-comms": "1.0.1-20230216163137.commit-a4c75be",
17-
"@dcl/protocol": "1.0.0-24513367586.commit-0ed6dc3",
17+
"@dcl/protocol": "1.0.0-25337665839.commit-834aaf3",
1818
"@dcl/quests-client": "^1.0.3",
1919
"@dcl/quests-manager": "^0.1.4",
2020
"@dcl/rpc": "^1.1.1",
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { Engine, components } from '../../../packages/@dcl/ecs/src'
2+
import { testComponentSerialization } from './assertion'
3+
4+
describe('Generated AvatarLocomotionSettings ProtoBuf', () => {
5+
it('should serialize/deserialize AvatarLocomotionSettings', () => {
6+
const newEngine = Engine()
7+
const AvatarLocomotionSettings = components.AvatarLocomotionSettings(newEngine)
8+
9+
testComponentSerialization(AvatarLocomotionSettings, {
10+
walkSpeed: 1,
11+
jogSpeed: 2,
12+
runSpeed: 3,
13+
jumpHeight: 4,
14+
runJumpHeight: 5,
15+
hardLandingCooldown: 6
16+
})
17+
})
18+
})

test/snapshots/development-bundles/static-scene.test.ts.crdt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
SCENE_COMPILED_JS_SIZE_PROD=552.5k bytes
1+
SCENE_COMPILED_JS_SIZE_PROD=561.4k bytes
22
THE BUNDLE HAS SOURCEMAPS
33
(start empty vm 0.21.0-3680274614.commit-1808aa1)
44
OPCODES ~= 0k
@@ -10,9 +10,9 @@ EVAL test/snapshots/development-bundles/static-scene.test.js
1010
REQUIRE: ~system/Testing
1111
REQUIRE: ~system/EngineApi
1212
REQUIRE: ~system/EngineApi
13-
OPCODES ~= 65k
14-
MALLOC_COUNT = 15843
15-
ALIVE_OBJS_DELTA ~= 3.14k
13+
OPCODES ~= 66k
14+
MALLOC_COUNT = 16028
15+
ALIVE_OBJS_DELTA ~= 3.18k
1616
CALL onStart()
1717
main.crdt: PUT_COMPONENT e=0x200 c=1 t=0 data={"position":{"x":5.880000114440918,"y":2.7916901111602783,"z":7.380000114440918},"rotation":{"x":0,"y":0,"z":0,"w":1},"scale":{"x":1,"y":1,"z":1},"parent":0}
1818
main.crdt: PUT_COMPONENT e=0x202 c=1 t=0 data={"position":{"x":4,"y":0.800000011920929,"z":8},"rotation":{"x":0,"y":0,"z":0,"w":1},"scale":{"x":1,"y":1,"z":1},"parent":0}
@@ -47,7 +47,7 @@ CALL onStart()
4747
CALL onUpdate(0)
4848
~system/Testing: plan {"tests":[{"name":"ensure that cubes are in the scene on the first frame"}]}
4949
OPCODES ~= 18k
50-
MALLOC_COUNT = 43
50+
MALLOC_COUNT = 41
5151
ALIVE_OBJS_DELTA ~= -0.00k
5252
CALL onUpdate(0.1)
5353
LOG: ["🧪 Running test ensure that cubes are in the scene on the first frame"]
@@ -56,4 +56,4 @@ CALL onUpdate(0.1)
5656
OPCODES ~= 4k
5757
MALLOC_COUNT = -5
5858
ALIVE_OBJS_DELTA ~= 0.00k
59-
MEMORY_USAGE_COUNT ~= 1399.84k bytes
59+
MEMORY_USAGE_COUNT ~= 1414.97k bytes

test/snapshots/development-bundles/testing-fw.test.ts.crdt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
SCENE_COMPILED_JS_SIZE_PROD=553k bytes
1+
SCENE_COMPILED_JS_SIZE_PROD=561.9k bytes
22
THE BUNDLE HAS SOURCEMAPS
33
(start empty vm 0.21.0-3680274614.commit-1808aa1)
44
OPCODES ~= 0k
@@ -10,9 +10,9 @@ EVAL test/snapshots/development-bundles/testing-fw.test.js
1010
REQUIRE: ~system/Testing
1111
REQUIRE: ~system/EngineApi
1212
REQUIRE: ~system/EngineApi
13-
OPCODES ~= 74k
14-
MALLOC_COUNT = 16395
15-
ALIVE_OBJS_DELTA ~= 3.30k
13+
OPCODES ~= 75k
14+
MALLOC_COUNT = 16580
15+
ALIVE_OBJS_DELTA ~= 3.33k
1616
CALL onStart()
1717
LOG: ["Adding one to position.y=0"]
1818
Renderer: PUT_COMPONENT e=0x0 c=1 t=1 data={"position":{"x":1,"y":0,"z":0},"rotation":{"x":0,"y":0,"z":0,"w":1},"scale":{"x":9,"y":9,"z":9},"parent":0}
@@ -62,4 +62,4 @@ CALL onUpdate(0.1)
6262
OPCODES ~= 6k
6363
MALLOC_COUNT = -53
6464
ALIVE_OBJS_DELTA ~= -0.01k
65-
MEMORY_USAGE_COUNT ~= 1406.25k bytes
65+
MEMORY_USAGE_COUNT ~= 1421.44k bytes

test/snapshots/development-bundles/two-way-crdt.test.ts.crdt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
SCENE_COMPILED_JS_SIZE_PROD=553k bytes
1+
SCENE_COMPILED_JS_SIZE_PROD=561.9k bytes
22
THE BUNDLE HAS SOURCEMAPS
33
(start empty vm 0.21.0-3680274614.commit-1808aa1)
44
OPCODES ~= 0k
@@ -10,9 +10,9 @@ EVAL test/snapshots/development-bundles/two-way-crdt.test.js
1010
REQUIRE: ~system/Testing
1111
REQUIRE: ~system/EngineApi
1212
REQUIRE: ~system/EngineApi
13-
OPCODES ~= 74k
14-
MALLOC_COUNT = 16395
15-
ALIVE_OBJS_DELTA ~= 3.30k
13+
OPCODES ~= 75k
14+
MALLOC_COUNT = 16580
15+
ALIVE_OBJS_DELTA ~= 3.33k
1616
CALL onStart()
1717
LOG: ["Adding one to position.y=0"]
1818
Renderer: PUT_COMPONENT e=0x0 c=1 t=1 data={"position":{"x":1,"y":0,"z":0},"rotation":{"x":0,"y":0,"z":0,"w":1},"scale":{"x":9,"y":9,"z":9},"parent":0}
@@ -62,4 +62,4 @@ CALL onUpdate(0.1)
6262
OPCODES ~= 6k
6363
MALLOC_COUNT = -53
6464
ALIVE_OBJS_DELTA ~= -0.01k
65-
MEMORY_USAGE_COUNT ~= 1406.25k bytes
65+
MEMORY_USAGE_COUNT ~= 1421.45k bytes

test/snapshots/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)