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
import haxe.macro.Context; | |
import haxe.macro.Expr; | |
import haxe.macro.TypeTools; | |
#if !macro | |
@:genericBuild(PartialMacro.build()) | |
#end | |
class Partial<T> {} | |
class PartialMacro { |
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
(function(URL, parent){ | |
var initialConstructor = parent.URL; | |
var urlPattern = new RegExp( | |
"^" + | |
//protocol | |
"(?:((?:\\w+):)?/?/?)" + | |
//user:pass | |
"(?:(?:([^:]*)(?::([^@]*))?)?@)?" + |
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
window.TimeLord = (function(){ | |
/* | |
# Time accounted for | |
Date.now() | |
window.performance.now() | |
window.setInterval(...) | |
window.setTimeout(...) | |
window.requestAnimationFrame(...) | |
# Not accounted for |
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
import haxe.macro.ComplexTypeTools; | |
import haxe.macro.Context; | |
import haxe.macro.Expr; | |
import haxe.macro.ExprTools; | |
import haxe.macro.Type.TInst; | |
import haxe.macro.TypeTools; | |
class ClassBuild{ | |
//the entire contents of a class is contained in the class's fields |
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
import haxe.macro.Context; | |
import haxe.macro.Expr; | |
import haxe.macro.ExprTools; | |
class ClassBuild{ | |
//the entire contents of a class is contained in the class's fields | |
//a class-building-macro's job is to return an array of fields | |
static function saveClass():Array<Field>{ |
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
# Installing Alchemy Control and Player | |
- Download an android file transfer tool if you've not got one | |
### With oculus.zip | |
- Open the oculus.zip and copy the Oculus folder to the sd card. Copy the Bikini Atoll.mp4 video to Oculus/360Videos. | |
- Open a file manager app on the android (search file manager on store). Navigate to Oculus/Alchemy/Apps Tap on the two apk files individually and it should prompt to install. Once installed, go to your app launcher, find Alchemy Control and open it. | |
- It should say "Service Running" in green and above "Autoplay Video Bikini Atoll.mp4". If service isn't running hit enable. If the autoplay video name isn't grey, it can't find the video file. Make sure it's in the right place (should be Oculus/360Videos/Bikini Atoll.mp4). If it says "not set" it can't find the autoplay.txt, make sure that is Oculus/Alchemy/autoplay.txt and contains the video name. |
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
function createSliceTexture(vox:Vox, axis:Int = 0, ?params:TextureParams, maxW:Null<Int> = 4096, POT:Bool = true):SliceTexture{ | |
if(params == null) params = {}; | |
var defaultParams = { | |
channelType: GL.RGBA, | |
dataType: GL.UNSIGNED_BYTE, | |
filter: GL.LINEAR, | |
wrapS: GL.CLAMP_TO_EDGE, | |
wrapT: GL.CLAMP_TO_EDGE, | |
unpackAlignment: TextureTools.defaultParams.unpackAlignment |
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
import luxe.Color; | |
import luxe.Input; | |
import luxe.Screen; | |
class Main extends luxe.Game { | |
var colors:Array<Color>; | |
override function config(config:luxe.AppConfig) { |
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
<style> | |
.column,.columns{ | |
background: #DDD; | |
text-align: center; | |
border-radius: 4px; | |
font-size: 1rem; | |
text-transform: uppercase; | |
height: 30px; | |
line-height: 30px; | |
margin-bottom: .75rem; |
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
//THREE.hx r68 | |
import js.html.*; | |
typedef HTMLElement = js.html.Element; | |
typedef HTMLCanvasElement = js.html.CanvasElement; | |
typedef HTMLImageElement = js.html.ImageElement; | |
typedef WebGLRenderingContext = js.html.webgl.RenderingContext; | |
/* Auto-generated using ts2hx */ | |
@:enum @:native("THREE.CullFace") abstract CullFace(Int) { |