feat: add edutainment drawing and visual package flows

This commit is contained in:
2026-05-14 14:17:10 +08:00
parent 10e8beea80
commit e444266e1e
109 changed files with 8788 additions and 996 deletions

View File

@@ -87,6 +87,12 @@ describe('parseMocapPacket', () => {
body: {
center_norm: [0.34, 0.58],
},
limb_nodes: [
{ name: 'left_shoulder', x: 0.28, y: 0.42 },
{ name: 'left_elbow', x: 0.24, y: 0.5 },
{ name: 'right_shoulder', x: 0.72, y: 0.42 },
{ name: 'right_elbow', x: 0.76, y: 0.5 },
],
},
actions: [{ gesture: 'wave-left-hand' }],
hands: [
@@ -111,11 +117,21 @@ describe('parseMocapPacket', () => {
});
expect(command.bodyCenter).toEqual({x: 0.34, y: 0.58});
expect(command.bodyJoints).toEqual({
leftShoulder: {x: 0.28, y: 0.42},
leftElbow: {x: 0.24, y: 0.5},
rightShoulder: {x: 0.72, y: 0.42},
rightElbow: {x: 0.76, y: 0.5},
});
expect(command.actions).toEqual(
expect.arrayContaining(['wave_left_hand', 'open_palm']),
);
expect(command.leftHand).toEqual(
expect.objectContaining({side: 'left', source: 'palm_center'}),
expect.objectContaining({
side: 'left',
source: 'palm_center',
wrist: {x: 0.21, y: 0.31},
}),
);
expect(command.rightHand).toEqual(
expect.objectContaining({x: 0.72, y: 0.32, side: 'right'}),