https://github.com/exios66/gazetracker
https://github.com/exios66/gazetracker
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/exios66/gazetracker
- Owner: Exios66
- Created: 2025-02-15T05:15:33.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-29T02:32:56.000Z (about 1 year ago)
- Last Synced: 2025-05-05T22:57:51.384Z (about 1 year ago)
- Language: TypeScript
- Homepage: https://exios66.github.io/GazeTracker/
- Size: 1.07 MB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Real-Time online Eye-Tracking
## Quick Start
To start the development environment with all necessary services:
```bash
npm run start:dev
```
This command will:
1. Install all dependencies (both client and server)
2. Start the server with auto-reload
3. Start the client development server
4. Handle automatic port selection if default ports are in use
## Development Commands
- `npm run dev` - Start both client and server in development mode
- `npm run dev:server` - Start only the server with auto-reload
- `npm run dev:client` - Start only the client development server
- `npm run dev:setup` - Install all dependencies
- `npm run dev:clean` - Remove all node_modules
- `npm run dev:reset` - Clean and reinstall all dependencies
- `npm run build` - Build the client for production
## Port Configuration
The application automatically handles port selection:
- Server default port: 3001 (will automatically find next available port if in use)
- Client default port: 3000
You can configure the ports using environment variables:
- Server: `PORT` environment variable
- Client: `PORT` environment variable (when starting the client)
## GazeCloudAPI Integration details
Register origin domain address of your web page:
### Include JavaScript
Start eye tracking GazeCloudAPI.StartEyeTracking();
#### Define your results data
callback GazeCloudAPI.OnResult = function (GazeData) { GazeData.state // 0: valid gaze data; -1 : face tracking lost, 1 : gaze data uncalibrated GazeData.docX // gaze x in document coordinates GazeData.docY // gaze y in document coordinates GazeData.time // timestamp }
#### After you finish your test stop eye tracking GazeCloudAPI.StopEyeTracking()
optional callbacks: GazeCloudAPI.OnCalibrationComplete =function(){ console.log('gaze Calibration Complete') }
GazeCloudAPI.OnCamDenied = function(){ console.log('camera access denied') }
GazeCloudAPI.OnError = function(msg){ console.log('err: ' + msg) }
Disable/Enable click recalibration GazeCloudAPI.UseClickRecalibration = true;
Simple Example:
#### Supported browsers: Chrome 53+ | Edge 12+ | Firefox 42+ | Opera 40+ | Safari 11+
##### Read More: