File tree Expand file tree Collapse file tree 3 files changed +5
-17
lines changed
Expand file tree Collapse file tree 3 files changed +5
-17
lines changed Original file line number Diff line number Diff line change 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 },
Original file line number Diff line number Diff 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
7665const app = new BitmapAnimationDemo ( ) ;
7766app . start ( ) . catch ( console . error ) ;
78-
You can’t perform that action at this time.
0 commit comments