Skip to content

Commit 5083831

Browse files
committed
update
1 parent a5e56c6 commit 5083831

File tree

3 files changed

+5
-17
lines changed

3 files changed

+5
-17
lines changed

bun.lock

Lines changed: 2 additions & 2 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
@@ -10,7 +10,7 @@
1010
"license": "ISC",
1111
"description": "",
1212
"dependencies": {
13-
"@mentra/sdk": "^2.1.10",
13+
"@mentra/sdk": "^2.1.11",
1414
"express": "^4.21.2",
1515
"ws": "^8.18.1"
1616
},

src/index.ts

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,9 @@ class BitmapAnimationDemo extends AppServer {
3535
console.log(`Session started for user: ${userId}, sessionId: ${sessionId}`);
3636

3737
try {
38+
const frame = await BitmapUtils.fileToBase64("./assets/bitmap-test2.bmp");
3839

39-
const frameBase64 = await BitmapUtils.loadBmpFromFileAsBase64(
40-
"./assets/bitmap-test2.bmp"
41-
);
42-
const validation = BitmapUtils.validateBmpBase64(frameBase64);
43-
if (!validation.isValid) {
44-
console.error(
45-
`❌ Frame validation failed: ${validation.errors.join(", ")}`
46-
);
47-
session.layouts.showTextWall("❌ Error: Invalid bitmap data");
48-
return;
49-
}
50-
51-
session.layouts.showBitmapView(frameBase64, { view: ViewType.MAIN });
40+
session.layouts.showBitmapView(frame, { view: ViewType.MAIN });
5241
} catch (error) {
5342
console.error("Demo error:", error);
5443
}
@@ -75,4 +64,3 @@ class BitmapAnimationDemo extends AppServer {
7564
// Start the MentraOS Bitmap Animation Demo
7665
const app = new BitmapAnimationDemo();
7766
app.start().catch(console.error);
78-

0 commit comments

Comments
 (0)