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
#!/bin/bash | |
# | |
# SignAndPackageForMAS.sh v1.0.1 | |
# | |
# Codesign an app bundle and build a signed package ready for submission to the | |
# Mac App Store | |
# | |
# Copyright (c) 2014 Felix Schwarz (@felix_schwarz), IOSPIRIT GmbH (@iospirit) | |
# |
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; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using Random = System.Random; | |
public class InstancedLines : MonoBehaviour | |
{ | |
struct LineInstanceData |
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; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
namespace DictExperiments | |
{ | |
public static class DictExt | |
{ | |
public class SceneObjectParser : IDisposable |
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.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.XR.Interaction.Toolkit.AR; | |
public class CustomPlacementInteractable : ARPlacementInteractable | |
{ | |
ARObjectPlacementEventArgs m_ObjectPlacementEventArgs = new ARObjectPlacementEventArgs(); | |
void Update() |
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
#! /bin/bash | |
# This command converts audio according to the specifications listed in the Spark docs: | |
# https://sparkar.facebook.com/ar-studio/learn/documentation/docs/audio | |
# mono m4a, 44.1kHz sample rate, 16-bit-depth resolution | |
# Usage: | |
# convert-audio.sh myaudio.mp3 converted.m4a | |
# Notes: | |
# Always use m4a for output file type | |
# Change "64k" to a higher value to improve bitrate/quality. e.g. 96k 128k 192k |
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
const D = require('Diagnostics'); | |
const Scene = require('Scene'); | |
const Patches = require('Patches'); | |
const FaceTracking = require('FaceTracking'); | |
const Shaders = require('Shaders'); | |
const R = require('Reactive'); | |
const Patchers = require('Patches'); | |
const face = FaceTracking.face(0); | |
const rect = Scene.root.find("rectangle0"); | |
const cam = Scene.root.find("Camera"); |
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
const Diagnostics = require('Diagnostics'); | |
const Scene = require('Scene'); | |
const Shaders = require('Shaders'); | |
const Materials = require("Materials"); | |
const R = require("Reactive"); | |
const CameraInfo = require('CameraInfo'); | |
const Textures = require('Textures'); | |
const Time = require('Time'); | |
const mat = Materials.get("material0"); | |
const cameraTexture = Textures.get("cameraTexture0"); |
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
const Diagnostics = require('Diagnostics'); | |
const Scene = require('Scene'); | |
const Shaders = require('Shaders'); | |
const Materials = require("Materials"); | |
const R = require("Reactive"); | |
const CameraInfo = require('CameraInfo'); | |
const Textures = require('Textures'); | |
const mat = Materials.get("material0"); | |
const cameraTexture = Textures.get("cameraTexture0"); |
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
// 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 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; |
NewerOlder