{"id":21326961,"url":"https://github.com/tkomde/jinsmemelib-controller-javascript","last_synced_at":"2025-03-16T00:12:28.065Z","repository":{"id":179766568,"uuid":"137965195","full_name":"tkomde/JinsMemeLib-Controller-JavaScript","owner":"tkomde","description":"Controll somthing by eye movements or head move with JINS MEME!","archived":false,"fork":false,"pushed_at":"2018-07-12T11:18:43.000Z","size":471,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-22T12:45:32.977Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tkomde.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2018-06-20T01:39:12.000Z","updated_at":"2018-07-12T11:18:45.000Z","dependencies_parsed_at":"2024-03-21T07:44:49.990Z","dependency_job_id":null,"html_url":"https://github.com/tkomde/JinsMemeLib-Controller-JavaScript","commit_stats":null,"previous_names":["jins-tkomoda/jinsmemelib-controller-javascript","tkomde/jinsmemelib-controller-javascript"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkomde%2FJinsMemeLib-Controller-JavaScript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkomde%2FJinsMemeLib-Controller-JavaScript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkomde%2FJinsMemeLib-Controller-JavaScript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkomde%2FJinsMemeLib-Controller-JavaScript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tkomde","download_url":"https://codeload.github.com/tkomde/JinsMemeLib-Controller-JavaScript/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243806072,"owners_count":20350775,"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-11-21T21:12:39.021Z","updated_at":"2025-03-16T00:12:28.039Z","avatar_url":"https://github.com/tkomde.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JINS MEME Controller Library\r\n====\r\n\r\n## Overview\r\n\r\n- Event detection of the first orientation and the number of consecutive times when the neck is swung right and left or up and down in short intervals\r\n- Event detection of the first orientation and the number of consecutive times when the line of sight is moved right and left or up and down in short intervals\r\n- Measurement of absolute value of neck angle (needs no calibration)\r\n\r\n- 短い間隔で首を左右、または上下に振った時の最初の向きとその連続回数のイベント検出\r\n- 短い間隔で視線を左右、または上下に動かした時の最初の向きとその連続回数のイベント検出\r\n- 首の角度の絶対値の計測\r\n\r\n## Description\r\n\r\nYou can use this library to forward a page, send an intent to  some other application, or issue a WebHook.\r\n Of course, the number of consecutive times == 1 frequently occurs in everyday life, use more than 2 as a trigger. \r\nThe point is to move continuously at short intervals. This behavior is not usually done in everyday life,\r\n so it can be extracted with less misjudgment. \r\n\r\nポイントは短い間隔で 連続して 動かす、というところです。この動作は日常生活で通常あまり行わないため誤判定を抑えて抽出できます。\r\nこれを利用して例えば文書のページを送ったり、何か他アプリにインテントを送ったり、WebHook発行したりすることができます。\r\n当然ながら連続回数==1は日常生活で頻繁に発生するので2以上をトリガとしてご使用ください。\r\n\r\n## Requirement\r\n\r\n- cordova \u003e= 6.5\r\n- com.jins_jp.meme.plugin \u003e= 1.2 (or monaca-plugin-jins-meme \u003e= 1.3)\r\n\r\n## Usage\r\n\r\n- A client_id and secret in index.html are needed for JINS MEME SDK verification.\r\n- Include following line.\r\n\r\n- JINS MEME SDK の有効確認に必要な client_id と secret を[開発者サイト](https://jins-meme.com/ja/developers/) から取得しセットしてください。 \r\n- 以下の行を追加してください。\r\n\r\n\u003e \u003cscript src=\"jmctrllib.js\"\u003e\u003c/script\u003e\r\n\r\n### Swing and Eye move events\r\n\r\n- Put methods that fire controll events.\r\n- コントロールイベント発火メソッド\r\n\r\nPut following lines in cordova.plugins.JinsMemePlugin.startDataReport() callback.\r\n以下のメソッドを cordova.plugins.JinsMemePlugin.startDataReport() callback 内に記述してください。\r\n\r\n```\r\n jmctrllib.getSequentialSwing(data); \r\n jmctrllib.getSequentialEyeMove(data);\r\n```\r\n\r\n- Listen the controll events\r\n- コントロールイベントのリスナ設定\r\n\r\nPut following lines in somewhere.\r\n適切な場所に以下のコードを記載してください。\r\n\r\n```\r\n// Lateral swings\r\ndocument.addEventListener('jmctrllib_swing_lat', function(e) {\r\n    // do something\r\n    //console.log(\"lat directoin:\" + e.detail.direction + \" times:\" + e.detail.count);\r\n});\r\n// Longitudinal swings\r\ndocument.addEventListener('jmctrllib_swing_long', function(e) {\r\n    // do something\r\n    //console.log(\"lng directoin:\" + e.detail.direction + \" times:\" + e.detail.count);\r\n});\r\n// Lateral eye movements\r\ndocument.addEventListener('jmctrllib_eyemove_lat', function(e) {\r\n    // do something\r\n    //console.log(\"lat directoin:\" + e.detail.direction + \" times:\" + e.detail.count);\r\n});\r\n// Lateral eye movements\r\ndocument.addEventListener('jmctrllib_eyemove_long', function(e) {\r\n    // do something\r\n    //console.log(\"lng directoin:\" + e.detail.direction + \" times:\" + e.detail.count);\r\n});\r\n```\r\n\r\nThese events have CustomEvent interface ('e').\r\nこれらのイベントはカスタムイベントインターフェース('e')を有します。\r\n\r\n- e.detail.direction: Which direction did it occur at first time? (right/up == 1, left/down == -1) \r\n- e.detail.count: How many times did it occur?\r\n- e.detail.direction: 最初にどちらに動かしたか？(右上 == 1, 左下 == -1)\r\n- e.detail.count: 何回連続で動かしたか？\r\n\r\n### Tilt calculation\r\n- Put following lines in cordova.plugins.JinsMemePlugin.startDataReport() callback.\r\n- 以下のメソッドを cordova.plugins.JinsMemePlugin.startDataReport() callback 内に記述してください。\r\n\r\n ```\r\n var tilt = jmctrllib.calcTilt(data);\r\n ```\r\n\r\n## Licence\r\n\r\nMIT\r\n\r\n## Author\r\n\r\n[jins-tkomoda](https://github.com/jins-tkomoda)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkomde%2Fjinsmemelib-controller-javascript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftkomde%2Fjinsmemelib-controller-javascript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkomde%2Fjinsmemelib-controller-javascript/lists"}