{"id":13904617,"url":"https://github.com/intel/generic-sensor-demos","last_synced_at":"2025-07-18T02:32:00.538Z","repository":{"id":48560049,"uuid":"101445719","full_name":"intel/generic-sensor-demos","owner":"intel","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-12T08:17:06.000Z","size":56224,"stargazers_count":189,"open_issues_count":16,"forks_count":93,"subscribers_count":14,"default_branch":"main","last_synced_at":"2024-11-12T09:22:45.554Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/intel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-08-25T22:13:02.000Z","updated_at":"2024-11-12T08:17:08.000Z","dependencies_parsed_at":"2024-03-31T07:46:14.616Z","dependency_job_id":null,"html_url":"https://github.com/intel/generic-sensor-demos","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intel%2Fgeneric-sensor-demos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intel%2Fgeneric-sensor-demos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intel%2Fgeneric-sensor-demos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intel%2Fgeneric-sensor-demos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/intel","download_url":"https://codeload.github.com/intel/generic-sensor-demos/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226336358,"owners_count":17608820,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-06T23:00:58.933Z","updated_at":"2024-11-25T13:30:33.495Z","avatar_url":"https://github.com/intel.png","language":"HTML","readme":"# Demos for Generic Sensor API\n\nThis repository contains applications that demonstrate how to use the\n[Generic Sensor API](https://www.w3.org/TR/generic-sensor/).\n\nThe [Generic Sensor API](https://www.w3.org/TR/generic-sensor/) is a set of\ninterfaces which expose sensor devices to the web platform. The API consists\nof the base [Sensor](https://w3c.github.io/sensors/#the-sensor-interface)\ninterface and a set of concrete sensor classes built on top, such as\n[Accelerometer](https://w3c.github.io/accelerometer/#accelerometer-interface),\n[LinearAccelerationSensor](https://w3c.github.io/accelerometer/#linearaccelerationsensor-interface),\n[Gyroscope](https://w3c.github.io/gyroscope/#gyroscope-interface),\n[AbsoluteOrientationSensor](https://w3c.github.io/orientation-sensor/#absoluteorientationsensor-interface)\nand [RelativeOrientationSensor](https://w3c.github.io/orientation-sensor/#relativeorientationsensor-interface).\n\nThe Generic Sensor API is very simple and easy-to-use! The Sensor interface has\n[`start()`](https://w3c.github.io/sensors/#sensor-start) and\n[`stop()`](https://w3c.github.io/sensors/#sensor-stop) methods to control sensor state\nand several event handlers for receiving notifications about sensor activation, errors and newly\navailable readings. The concrete sensor classes usually add their specific reading attributes to\nthe base class.\n\n## Launch instructions\n\nThe demo apps work with Chrome 63 or later. If you have an older version of Chrome, please enable\nthe [chrome://flags/#enable-generic-sensor](chrome://flags/#enable-generic-sensor) flag, before\nrunning the demos.\n\nIf the demo is using environmental sensors, such as,\n[Magnetometer](https://w3c.github.io/magnetometer/#magnetometer-interface) or\n[AmbientLightSensor](https://w3c.github.io/ambient-light/#ambient-light-sensor-interface),\nplease also enable\n[chrome://flags/#enable-generic-sensor-extra-classes](chrome://flags/#enable-generic-sensor-extra-classes)\nflag.\n\nYou could run demos from [GitHub Pages for this repository.](https://intel.github.io/generic-sensor-demos/)\n\n## Demos description\n\n### [Punchmeter](https://intel.github.io/generic-sensor-demos/punchmeter/) ([code](https://github.com/intel/generic-sensor-demos/tree/main/punchmeter))\n\nPunchmeter is a simple application that calculates user's punch speed using\nLinearAcceleration sensor. To try it the user should make a punch holding\nmobile device in his/her hand.\n\n\u003cimg src=\"images/punchmeter.gif\" alt=\"Punchmeter demo\"\u003e\n\n---\n\n### [Orientation phone](https://intel.github.io/generic-sensor-demos/orientation-phone/) ([code](https://github.com/intel/generic-sensor-demos/tree/main/orientation-phone))\n\nThis simple demo illustrates how an absolute orientation sensor can be used to\nmodify rotation quaternion of a 3D model. The \u003ccode\u003emodel\u003c/code\u003e is a three.js\n[`Object3D`](https://threejs.org/docs/index.html#api/core/Object3D) class instance\nthat has [`quaternion`](https://threejs.org/docs/index.html#api/core/Object3D.quaternion)\nproperty.\n\n\u003cimg src=\"images/orientation-phone.png\" alt=\"Orientation sensor demo\"\u003e\n\n---\n\n### [360 degree beach panorama demo](https://intel.github.io/generic-sensor-demos/websensor-panorama/) ([code](https://github.com/intel/generic-sensor-demos/tree/main/websensor-panorama))\n\nThe demo presents a 360 degree panorama view of a beach with an added sound effect.\nThe user can look around the scene by moving their device.\nThe demo uses the orientation sensor to enable the user to look around.\n\n\u003cimg src=\"websensor-panorama/websensor-panorama.gif?raw=true\" alt=\"360 Panorama\"\u003e\n\n---\n\n### [360 degree video demo](https://intel.github.io/generic-sensor-demos/websensor-video/) ([code](https://github.com/intel/generic-sensor-demos/tree/main/websensor-video))\n\nThis demo presents a 360 degree video that the user can look around by moving their device.\nThe user can also play the video in both forward and reverse by holding the device and walking\nforward and backward, respectively.\nThe demo uses the orientation sensor to enable the user to look around and the accelerometer for\nwalking detection to enable the user to control video playback by walking.\n\n---\n\n### [Ambient Map demo](https://intel.github.io/generic-sensor-demos/ambient-map/build/bundled/) ([code](https://github.com/intel/generic-sensor-demos/tree/main/ambient-map/build/bundled))\n\nThis web application demonstrates how Ambient light sensor can be used to control style of a map widget.\nWhen ambient illuminance level is less than 10 lumen, night mode style will be used.\n\n**Note:** this demo requires\n[chrome://flags/#enable-generic-sensor-extra-classes](chrome://flags/#enable-generic-sensor-extra-classes)\nflag set.\n\n\u003cimg width=\"40%\" src=\"ambient-map/ambient-map.gif?raw=true\" alt=\"Ambient Map demo\"\u003e\n\n---\n\n### [Sensor Info demo](https://intel.github.io/generic-sensor-demos/sensor-info/build/bundled/) ([code](https://github.com/intel/generic-sensor-demos/tree/main/sensor-info/build/bundled))\n\nThis web application presents information about device sensors and their reading values.\n\n**Note:** this demo requires\n[chrome://flags/#enable-generic-sensor-extra-classes](chrome://flags/#enable-generic-sensor-extra-classes)\nflag set.\n\n\u003cimg width=\"40%\" src=\"sensor-info/sensor-info.gif?raw=true\" alt=\"Sensor Info demo\"\u003e\n\n---\n\n### [VR Button demo](https://intel.github.io/generic-sensor-demos/vr-button/build/bundled/) ([code](https://github.com/intel/generic-sensor-demos/tree/main/vr-button/build/bundled))\n\nThis web application demonstrates how Magnetometer sensor can be used to provide user input for WebVR\ncontent. If you have VR enclosure with magnet button, you can interact with objects in the scene by\nsliding button down.\n\n**Note:** this demo requires\n[chrome://flags/#enable-generic-sensor-extra-classes](chrome://flags/#enable-generic-sensor-extra-classes)\nflag set.\n\n\u003cimg width=\"40%\" src=\"vr-button/vr-button.gif?raw=true\" alt=\"VR Button demo\"\u003e\n\n---\n\n### [Sensor tester](https://intel.github.io/generic-sensor-demos/sensor-tester/build/bundled/) ([code](https://github.com/intel/generic-sensor-demos/tree/main/sensor-tester))\n\nThis web application allows to test functionality of the sensors, correctness of their models in correspondence with respective specification.\n\n**Note:** this demo requires\n[chrome://flags/#enable-generic-sensor-extra-classes](chrome://flags/#enable-generic-sensor-extra-classes)\nflag set.\n\n\u003cimg src=\"images/sensor-tester.png?raw=true\" alt=\"Sensor tester\"\u003e\n\n## Development environment\n\nIf you would like to modify the existing code and experiment with the sensors API\nyour code must be hosted on a web server that supports HTTPS.\nThe simplest way is to fork this repository and enable\n[GitHub Pages](https://help.github.com/articles/configuring-a-publishing-source-for-github-pages/)\nfor your fork. Alternatevely, you can serve your web application locally, for this, we recommend to use\n[Web Server for Chrome](https://chrome.google.com/webstore/detail/web-server-for-chrome/ofhbbkphhbklhfoeikjpcbhemlocgigb).\nIf you are developing for mobile devices,set up\n[port forwarding](https://developers.google.com/web/tools/chrome-devtools/remote-debugging/local-server)\nfor your local server, and you are good to go!\n\n## Reporting a security issue\nSee Intel's [Security Center](https://www.intel.com/content/www/us/en/security-center/default.html)\nfor information on how to report a potential security issue or vulnerability.\n\nSee also: [Security Policy](SECURITY.md)\n","funding_links":[],"categories":["HTML"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintel%2Fgeneric-sensor-demos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fintel%2Fgeneric-sensor-demos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintel%2Fgeneric-sensor-demos/lists"}