Skip to content

Instantly share code, notes, and snippets.

View johnshaughnessy's full-sized avatar

John Shaughnessy johnshaughnessy

View GitHub Profile
@johnshaughnessy
johnshaughnessy / KinectAvateering.cs
Last active February 5, 2022 01:23
KinectAvateering.cs
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class KinectAvateering : MonoBehaviour {
Dictionary<Windows.Kinect.JointType, HumanBodyBones> kinectJointTypeToHumanBodyBone = new Dictionary<Windows.Kinect.JointType, HumanBodyBones>()
{
{Windows.Kinect.JointType.SpineBase, HumanBodyBones.Hips},
{Windows.Kinect.JointType.SpineMid, HumanBodyBones.Spine},
/**
* Prevent click events after a touchend.
*
* Inspired/copy-paste from this article of Google by Ryan Fioravanti
* https://web.archive.org/web/20130215000000*/https://developers.google.com/mobile/articles/fast_buttons
*
* USAGE:
* Prevent the click event for an certain element
* ````
* PreventGhostClick(myElement);
@johnshaughnessy
johnshaughnessy / re: short, helpful hubs vids
Created November 6, 2018 23:19
I think creating short helpful hubs is a good idea and I think the userinput system can help make sure the vids don't need to be recreated often
To me these videos make a lot of sense as long as we are careful to leave specific information about bindings that are subject to change _out_ of them, so that updating the bindings does not require updating the videos. I think what is both desireable and feasible in the short term is implementing something like the Steam Controller API's GetDigitalActionOrigins() and GetAnalogActionOrigins(), which we can do because we build up the required data structure each time active devices change anyway, just to put them in order. (These apis essentially let you get device-specific glyphs to show the user how to do something in your app. See http://www.gamasutra.com/blogs/LarsDoucet/20161012/283057/Steam_Dev_Days_Steam_Controller.php or https://partner.steamgames.com/doc/api/ISteamController (search page for https://partner.steamgames.com/doc/api/ISteamController )
So what it _would_ take to display device-specific glyphs without needing to update the copy / face / video help system?
We can create a handful of thes
@johnshaughnessy
johnshaughnessy / gist:2054ba493cf02eed392f5e1c3760e8e4
Created November 6, 2019 22:01
foo component initialization
// Assume some networked template:
// <template id="foo-template"><a-entity foo></a-entity></template>
//
// And some initialization elsewhere:
// const el = document.createElement("a-entity");
// el.setAttribute("networked", {
// template: "#foo-template",
// attachTemplateToLocal: false
// });
// el.setAttribute("foo", { someSchemaProp: true });
[jomb@jlomb2 ~]$ http https://video-weaver.sea01.hls.ttvnw.net/v1/playlist/CskDfX1HRRpIvE0egdQUif0Tj7VBRgRjw40T8SwMmIP5y4d2O7w5ReORIu_XbvXZKyQr21eBn4ycntwP8ySK1gJP8R26wNvbuaG7QLG-8XMgBxy9EYOC9sx-64DcdL-pcvGKDxalZ-CQsO-JxdL-ESzhT7DYDMIoKzty3JnGkg7-OJoWqkJS1FQu_ewEe4rOSoo-CQByF9gaaK_7AbL4YgfoAWb1X0LDpIwPetZ1eCDpwsjY0omERLbRYBvzBAcLaoKtwDcRVqMQu0e4-y28TfzZQliXfP0klr4XfhfXHaGbHu8UZ_59V4ENKQ_h6i4telQLqhNRn4IDI67NJgrnZnK-8ZdensNU2UBxmkpQinAAyuJbYqkHAov6kePmqoKexMgWz8AytENo1EnAxLswwJ5TdC8VI_4p548sQKVoxovwp63732CKsaQgM2QMGVQdS1IlR1f4nO313IpdvWXtavWoSSdvzVTg7jKO4EGjZ1tlGFXxf3nPzGW3b6NbQZbrKVb_BJI2er0DRk0jBLTyhQM9KpjnELKeRJcSGLIuJAbdqCXvBZkY95NUjcW14dai7vLXtJPSQww1NoMu11GT3GEgwT1_42P-LE6w0RIQatiJFd4Cd8H40XKtVUsoFBoMfI-Tzm1V3Pkhy4Ir.m3u8
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Cache-Control: no-cache, no-store, private
Content-Encoding: gzip
Content-Type: application/vnd.apple.mpegurl
Date: Tue, 17 Mar 2020 22:44:20 GMT
Transfer-Encoding: chunked
Vary: Accept-Encoding