0.1.72 • Published 5 days ago

seeso_test v0.1.72

Weekly downloads
-
License
MIT
Repository
github
Last release
5 days ago

SeeSo SDK Web - NPM Module

Supported Environment

  • Browser Support
chromefirefoxedgesafari
80+ ✔︎ᅠLatest ✔︎︎ᅠLatest ✔︎︎15.2+ ✔︎︎

Environment Set-ups

  • Download SDK files directly. The Following files should exist:

    1. Go to the path where you downloaded the SDK files. There should be the following files below.
      • SeeSo
        • dist
          • seeso.js
        • easy-seeso.js
  • Using npm:

$ npm install seeso
  • Using CDN: It will be available soon.
<script src="https://cdn.seeso.io/seeso.js"></script>

Issue License key (Required)

Get a license key from the SeeSo Console

SIMD Setting (Chrome Optional)

* Using this setting improves the performance of the SDK.
* If SIMD option is off, high fps setting (ex: `30`) may drop CPU performance.  
  1. in chrome://flags/
  2. WebAssembly SIMD support set Enabled SIMD setting

Sample App Implemetation

Import SDK module and Check SDK status

  • If "afterInitialized" function is called, it means SDK is ready to use.

    // when SDK files download
    import EasySeeSo from './seeso/easy-seeso.js'  
    
    // when npm or cdn import
    import EasySeeSo from 'seeso/easy-seeso';
    
    (async () => {
      const seeso = new EasySeeSo();
      // Don't forget to enter your license key.
      await seeso.init('YOUR_LICENSE_KEY', afterInitialized, afterFailed)
    })()
    
    function afterInitialized () {
      console.log('sdk init success!')
    }
    
    function afterFailed () {
      console.log('sdk init fail!')
    }

    Call Calibration Page

    ...
    
    function callCalibrationPage() {
        // static function. 
        // Because the web page is moved. (https://calibration.seeso.io/#/service)
        EasySeeSo.openCalibrationPage('YOUR_LICENSE_KEY', 'YOUR_USER_ID', 'YOUR_REDIRECT_URL', 5); // 5 is number of calibration points
    }
    

Set Calibration Data

    ...

    // in redirected page
    function parseCalibrationDataInQueryString () {
      const href = window.location.href
      const decodedURI = decodeURI(href)
      const queryString = decodedURI.split('?')[1];

      if (!queryString) return undefined
      const jsonString = queryString.slice("calibrationData=".length, queryString.length)
      return jsonString
    }
    
    function setCalibrationDataOnSeeSoSDK() {
        const calibrationData = parseCalibrationDataInQueryString();
        seeso.setCalibrationData(calibrationData)
    }
    

Show Gaze Point

    import { TrackingState } from 'seeso';
    ... 

    //GazeCallback implementation
    function onGaze (gazeInfo) {
        if (gazeInfo.trackingState === TrackingState.SUCCESS){
            let canvas = document.getElementById("output")
            canvas.width = window.innerWidth
            canvas.height = window.innerHeight
            let ctx = canvas.getContext("2d");
            ctx.fillStyle = '#FF0000'
            ctx.clearRect(0, 0, canvas.width, canvas.height )
            ctx.beginPath();
            ctx.arc(gazeInfo.x, gazeInfo.y, 10, 0, Math.PI * 2, true);
            ctx.fill();
        }
    }
    

Sample Project

Here is a sample VanillaJS Demo

Caution when deploying : Enable Cross-Origin Isolation

  • The content of this part is not necessary for development. However, it is required for deployment. seeso.js uses SharedArrayBuffer Object.

Cross-Origin Isolation must be enabled to use SharedArrayBuffer in some browsers.

0.1.71

5 days ago

0.1.72

5 days ago

0.1.71-beta1

2 months ago

0.1.52

2 months ago

0.1.53

2 months ago

0.1.54

2 months ago

0.1.55

2 months ago

0.1.56

2 months ago

0.1.57

2 months ago

0.1.58

2 months ago

0.1.59

2 months ago

0.0.62

2 months ago

0.0.63

2 months ago

0.0.64

2 months ago

0.0.65

2 months ago

0.0.66

2 months ago

0.0.67

2 months ago

0.0.68

2 months ago

0.0.69

2 months ago

0.1.70

2 months ago

0.1.61

2 months ago

0.1.62

2 months ago

0.1.50

2 months ago

0.1.51

2 months ago

0.1.41

2 months ago

0.1.42

2 months ago

0.1.43

2 months ago

0.1.44

2 months ago

0.1.45

2 months ago

0.1.40

2 months ago

0.1.38

2 months ago

0.1.39

2 months ago

0.1.30

2 months ago

0.1.31

2 months ago

0.1.32

2 months ago

0.1.33

2 months ago

0.1.34

2 months ago

0.1.35

2 months ago

0.1.36

2 months ago

0.1.37

2 months ago

0.1.27

2 months ago

0.1.28

2 months ago

0.1.29

2 months ago

0.1.20

3 months ago

0.1.21

3 months ago

0.1.22

3 months ago

0.1.23

3 months ago

0.1.24

3 months ago

0.1.25

2 months ago

0.1.26

2 months ago

0.1.17

3 months ago

0.1.18

3 months ago

0.1.19

3 months ago

0.1.16

3 months ago

0.1.10

3 months ago

0.1.11

3 months ago

0.1.12

3 months ago

0.1.13

3 months ago

0.1.14

3 months ago

0.1.15

3 months ago

0.1.8

3 months ago

0.1.7

3 months ago

0.1.9

3 months ago

0.1.6

3 months ago

0.1.5

3 months ago

0.1.4

3 months ago

0.1.2

3 months ago

0.1.3

3 months ago

0.1.0

4 months ago

0.1.1

4 months ago

0.0.30

2 years ago

0.0.31

2 years ago

0.0.20

3 years ago

0.0.21

3 years ago

0.0.22

3 years ago

0.0.23

3 years ago

0.0.24

3 years ago

0.0.25

3 years ago

0.0.26

3 years ago

0.0.27

3 years ago

0.0.28

3 years ago

0.0.29

3 years ago

0.0.15

3 years ago

0.0.17

3 years ago

0.0.18

3 years ago

0.0.19

3 years ago

0.0.10

3 years ago

0.0.11

3 years ago

0.0.12

3 years ago

0.0.13

3 years ago

0.0.14

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago

2.3.10

3 years ago

2.3.9

3 years ago

2.3.8

3 years ago

2.3.7

3 years ago

2.3.5

3 years ago

2.3.4

3 years ago

2.3.3

3 years ago

2.3.2

3 years ago

2.3.1

3 years ago

2.3.0

3 years ago