Skip to content

Commit

Permalink
New logic, added avatar example
Browse files Browse the repository at this point in the history
New logic, now it sends float with value from -1 to 1 for precise work over network.
  • Loading branch information
Vard committed Feb 23, 2022
1 parent fa429ea commit 12bd810
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Binary file added Example_OSC_HRM_Avatar.unitypackage
Binary file not shown.
4 changes: 2 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ console.log("Waiting for connection from browser...");
server.on('connection', ws => {
console.log("Connected. Waiting for data...");
ws.on('message', function message(data) {
console.log('Got heartrate: %s bpm', data);
console.log('Got heart rate: %s bpm', data);
let heartrate = {
address: "/avatar/parameters/Heartrate",
args:
{
type: "f",
value: data/255
value: data/127-1
}
};
vrchatOSC.send(heartrate);
Expand Down
2 changes: 1 addition & 1 deletion html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
/>
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Mi Band HRM</title>
<title>VRC OSC HRM</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
Expand Down

0 comments on commit 12bd810

Please sign in to comment.