@evenrealities/evenhub-simulator 0.1.0
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/README.md +63 -0
- package/bin/index.js +20 -0
- package/package.json +19 -0
package/README.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# EvenHub Simulator
|
|
2
|
+
|
|
3
|
+
A development tool for rapid iteration and early-stage debugging of evenhub applications. This simulator allows developers to preview UI layouts and logic before running on physical hardware.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g evenhub-simulator
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
EvenHub glasses app simulator
|
|
15
|
+
|
|
16
|
+
Usage: evenhub-simulator [OPTIONS] [targetUrl]
|
|
17
|
+
|
|
18
|
+
Arguments:
|
|
19
|
+
[targetUrl] The URL to load on startup
|
|
20
|
+
|
|
21
|
+
Options:
|
|
22
|
+
-g, --glow... Enable glow effect on glasses display
|
|
23
|
+
--anim-spring... Use spring bounce animation instead of default
|
|
24
|
+
-h, --help Print help (see more with '--help')
|
|
25
|
+
-V, --version Print version
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Options
|
|
29
|
+
|
|
30
|
+
| Option | Description |
|
|
31
|
+
|--------|-------------|
|
|
32
|
+
| `-g`, `--glow` | Adds a glow effect to the display. Disabled by default as it can appear overly bold. |
|
|
33
|
+
| `--anim-spring` | Replaces bounce animations with spring-style motion. Simulator-only feature. |
|
|
34
|
+
|
|
35
|
+
## Caveats
|
|
36
|
+
|
|
37
|
+
### Display & UI Rendering
|
|
38
|
+
|
|
39
|
+
The firmware runs LVGL v9, while the simulator uses v8 (via `lvgl-sys` in Rust).
|
|
40
|
+
|
|
41
|
+
Due to library differences and other implementation differences, the overall display characteristics, like font rendering, may not perfectly mirror the hardware. However, the current fidelity is sufficient for layout validation and logic testing.
|
|
42
|
+
|
|
43
|
+
### List Behavior
|
|
44
|
+
|
|
45
|
+
List scrolling mechanics, specifically the screen positioning of focused items, vary across environments. This is because the simulator re-implements drawing logic rather than sharing the embedded source code directly.
|
|
46
|
+
|
|
47
|
+
### Error Handling
|
|
48
|
+
|
|
49
|
+
Under normal conditions, the simulator behaves nearly identically to the hardware. Error response handling (e.g., invalid inputs) may diverge but will converge as the codebase matures.
|
|
50
|
+
|
|
51
|
+
### Image Processing
|
|
52
|
+
|
|
53
|
+
The simulator processes images faster and currently does not impose constraints on image size or similar limitations. Future versions may introduce stricter checks to simulate hardware behavior.
|
|
54
|
+
|
|
55
|
+
### Audio & Events
|
|
56
|
+
|
|
57
|
+
- **Audio:** Not currently supported. Planned for a future release.
|
|
58
|
+
- **Status Events:** Not emitted; user profiles and device statuses are hardcoded.
|
|
59
|
+
- **Supported Inputs:** Up, Down, Click, Double-click.
|
|
60
|
+
|
|
61
|
+
## Final Note
|
|
62
|
+
|
|
63
|
+
This simulator is a supplement to, not a replacement for, hardware testing. Always validate on actual hardware before deployment.
|
package/bin/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const { execFileSync } = require("child_process");
|
|
3
|
+
|
|
4
|
+
const platform = process.platform;
|
|
5
|
+
const arch = process.arch;
|
|
6
|
+
const binName = platform === "win32" ? "evenhub-simulator.exe" : "evenhub-simulator";
|
|
7
|
+
|
|
8
|
+
let binPath;
|
|
9
|
+
try {
|
|
10
|
+
binPath = require.resolve(`@evenrealities/sim-${platform}-${arch}/bin/${binName}`);
|
|
11
|
+
} catch {
|
|
12
|
+
console.error(`Unsupported platform: ${platform}-${arch}`);
|
|
13
|
+
process.exit(1);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
try {
|
|
17
|
+
execFileSync(binPath, process.argv.slice(2), { stdio: "inherit" });
|
|
18
|
+
} catch (e) {
|
|
19
|
+
process.exit(e.status || 1);
|
|
20
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@evenrealities/evenhub-simulator",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "EvenHub glasses app simulator",
|
|
5
|
+
"bin": {
|
|
6
|
+
"evenhub-simulator": "bin/index.js"
|
|
7
|
+
},
|
|
8
|
+
"optionalDependencies": {
|
|
9
|
+
"@evenrealities/sim-darwin-arm64": "0.1.0",
|
|
10
|
+
"@evenrealities/sim-darwin-x64": "0.1.0",
|
|
11
|
+
"@evenrealities/sim-linux-x64": "0.1.0",
|
|
12
|
+
"@evenrealities/sim-win32-x64": "0.1.0"
|
|
13
|
+
},
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "https://github.com/even-realities/evenhub-simulator"
|
|
17
|
+
},
|
|
18
|
+
"license": "MIT"
|
|
19
|
+
}
|