This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// inspired by https://github.com/d3/d3-zoom/blob/main/src/transform.js | |
class Transform() { | |
static identity = new Transform(0,0,1) | |
// https://stackoverflow.com/questions/70890280/d3-js-how-to-get-value-of-transform-attr | |
static fromSelection(selection) { | |
const translation = selection.node().transform.baseVal.getItem(0).matrix | |
const scale = selection.node().transform.baseVal.getItem(1).matrix | |
return new Transform(translation.e, translation.f, scale.a, scale.d) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Patch for Myo Unity package for SDK Windows 0.8.0 to access EMG raw data. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// PluginUpdateCheck.cs | |
// Check for new releases of repositories on GitHub. | |
// By Adrienne Lombardo (@charblar) | |
using System; | |
using System.Linq; | |
using System.Text.RegularExpressions; | |
using UnityEngine; | |
using UnityEditor; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
/// <summary> | |
/// TODO generic-like? | |
/// -Warning- use Time.deltaTime | |
/// </summary> | |
public class LowPassFilter { | |
readonly float _rc; | |
float _lastValue; | |
public float Value { get; private set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AFRAME.registerComponent('outline-geometry', { | |
schema : { | |
margin : { default : 1.025 }, | |
color: { default : 'red' }, | |
}, | |
init : function () { | |
var p = this.el; | |
var p_prime = p.cloneNode(true); | |
p_prime.removeAttribute('outline-geometry') | |
p_prime.setAttribute('material', 'color', this.data.color) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! peerjs build:0.3.13, development. Copyright(c) 2013 Michelle Bu <michelle@michellebu.com> */(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | |
module.exports.RTCSessionDescription = window.RTCSessionDescription || | |
window.mozRTCSessionDescription; | |
module.exports.RTCPeerConnection = window.RTCPeerConnection || | |
window.mozRTCPeerConnection || window.webkitRTCPeerConnection; | |
module.exports.RTCIceCandidate = window.RTCIceCandidate || | |
window.mozRTCIceCandidate; | |
},{}],2:[function(require,module,exports){ | |
var util = require('./util'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public class NestedPrefab : MonoBehaviour | |
{ | |
#if UNITY_EDITOR | |
[SerializeField] | |
protected GameObject prefabTarget; | |
[ContextMenu("Apply nested Prefab")] | |
public virtual void ApplyNestedPrefab() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# = ref | |
- = note | |
( = explored | |
> = todo | |
? = unknown | |
TODO | |
------------ | |
"adhérence":{}, | |
"acceptabilité":{}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Reflection; | |
using Gvr.Internal; | |
using UnityEngine; | |
public class GvrControllerWifiConfig : MonoBehaviour { | |
public string IP = "192.168.43.1"; | |
void Awake() { | |
typeof(EmulatorConfig) | |
.GetField("WIFI_SERVER_IP", BindingFlags.Static | BindingFlags.Public) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public class AlwaysLookAt : MonoBehaviour { | |
[SerializeField] Transform _transformToLookAt; | |
void Update() { | |
Vector3 v = _transformToLookAt.position - transform.position; | |
v.x = v.z = 0.0f; | |
transform.LookAt(_transformToLookAt.position - v); | |
transform.Rotate(0,180,0); | |
} |
NewerOlder