This file contains hidden or 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.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.XR; | |
public class DebugInputs : MonoBehaviour { | |
private List<InputDevice> devicesWithTrigger; |
This file contains hidden or 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
// This class lives on the avatar root | |
public class Blarpatar : MonoBehaviour{ | |
private RealtimeView _realtimeView; | |
public Human human; | |
public PullTowardsHand blarpL; | |
public PullTowardsHand blarpR; | |
public GameObject blarpPrefab; | |
void Start() { | |
_realtimeView = GetComponent<RealtimeView>(); |
This file contains hidden or 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
Glacier.prototype.Get3DPosition = function(x,y){ | |
// if(!offset){ offset = 0} | |
// offset = 0; | |
var x2 = Math.floor(x * this.imageData.width); | |
var y2 = Math.floor(y * this.imageData.height); | |
var color = getPixel( this.imageData, x2,y2); | |
var h = color.r; |
This file contains hidden or 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
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' | |
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' | |
Shader "Unlit/PrettyCrystalTris" | |
{ | |
Properties { | |
_BaseColor ("BaseColor", Color) = (1,1,1,1) |
This file contains hidden or 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
// Setting bounds because your packed flaot will go from 0->1 | |
const float BOUNDS = 1000.0; | |
float unnormalizeCoordinate(float x) { | |
return (x * 2.0 - 1.0) * BOUNDS; | |
} | |
float normalizeCoordinate(float x) { | |
return (x / BOUNDS) * 0.5 + 0.5; | |
} |
OlderNewer