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
| // How to load in modules | |
| const FaceTracking = require('FaceTracking'); | |
| const D = require('Diagnostics'); | |
| const Scene = require('Scene'); | |
| const TouchGestures = require('TouchGestures'); | |
| const object = Scene.root.find("object"); | |
| face.mouth.openness.monitor().subscribe(function(event) { | |
| if(event.newValue > 0) { | |
| object.transform.x = FaceTracking.face(0).cameraTransform.applyTo(FaceTracking.face(0).mouth.center).x; |
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
| Vector2 screenPos = camera.WorldToViewportPoint( worldPosition ); | |
| screenPos.x *= guiCanvas.rect.width; | |
| screenPos.y *= guiCanvas.rect.height; | |
| // the element should be anchored bottom/left | |
| uiElement.anchoredPosition = screenPos; |
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
| // Triangle Subdivision based on http://wiki.unity3d.com/index.php?title=MeshHelper | |
| // There is not smoothing of any sort, it will just divide the triangles | |
| // hence the FlatSubdivide name | |
| THREE.FlatSubdivide = function () { | |
| }; | |
| // Applies the "modify" pattern |
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 UnityEngine; | |
| using System; | |
| using System.Collections; | |
| public class AssetPathAttribute : PropertyAttribute { | |
| System.Type type; | |
| string label; | |
| public bool isResource; | |
| public AssetPathAttribute(string l, System.Type t, bool isR) { |
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 com.mindshaft.overtime.collision; | |
| using UnityEngine; | |
| namespace com.mindshaft.overtime.physics { | |
| public class RaycastCollisionDetection : IEntityCollisionDetection { | |
| private BoxCollider _collider; | |
| private Rect _collisionRect; | |
| private LayerMask _collisionMask; | |
| private LayerMask _playerMask; |
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 UnityEngine; | |
| using UnityEditor; | |
| public enum TextureType { | |
| NONE = -1, | |
| GUI = 0, | |
| CHARACTERS = 1 | |
| } | |
| public class AssetProcessing : AssetPostprocessor { |
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.Generic; | |
| using System.Text; | |
| namespace UnityEngine.EventSystems | |
| { | |
| public abstract class PointerInputModule : BaseInputModule | |
| { | |
| public const int kMouseId = -1; | |
| public const int kFakeTouchesId = -2; |
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; | |
| using System.Collections.Generic; | |
| using UnityEngine.Events; | |
| // interface you implement in your MB to receive events | |
| public interface ICustomHandler : IEventSystemHandler | |
| { | |
| void OnCustomCode(CustomEventData eventData); | |
| } |
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
| //#define DEBUG_THREADING | |
| using UnityEngine; | |
| using System.Collections; | |
| using System.Threading; | |
| using System.Reflection; | |
| public delegate IEnumerator MonitorCoroutine<T> (CoroutineData<T> data); |
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 UnityEngine; | |
| using System; | |
| using System.Text; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using System.Text.RegularExpressions; | |
| using System.Globalization; | |
| using System.Security.Cryptography; | |
| using System.IO; |