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
// Insert into some kind of 'focus' action | |
var parent = $(this).parent().parent('.fieldWrap'); // Target a wrapper | |
// Reset active state | |
$('.fieldWrap').removeClass('active'); | |
// Add active state to current field | |
parent.addClass('active'); |
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
in vec2 v_texcoord; // texture coords | |
in vec3 v_normal; // normal | |
in vec3 v_binormal; // binormal (for TBN basis calc) | |
in vec3 v_pos; // pixel view space position | |
out vec4 color; | |
layout(std140) uniform Transforms | |
{ | |
mat4x4 world_matrix; // object's world position |
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
package com.dango_itimi.utils; | |
import haxe.rtti.Meta; | |
using com.dango_itimi.utils.MetaUtil; | |
class MetaField | |
{ | |
public var name(default, null):String; | |
public var value(default, null):Array<Dynamic>; | |
public function new(name:String, value:Array<Dynamic>) |
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
import luxe.Input; | |
class Main extends luxe.Game { | |
override function config(config:luxe.AppConfig) { | |
config.web.prevent_default_keys.push(Key.space); | |
return config; |
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
package ; | |
import luxe.Component; | |
import luxe.Rectangle; | |
import luxe.Vector; | |
class PhysBody { | |
public var rect:Rectangle; | |
public var vel:Vector; | |
public var acc:Vector; |
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
package macros; | |
import sys.FileSystem; | |
import sys.io.File; | |
/** | |
* Can copy files in two ways: | |
* A) Provide only the first argument, where each elements specifies [sourceFile1, destFile1, sourceFile2, destFile2, ...], or; | |
* B) Provide a list of files to move (1st argument), and specify a common directory to copy them to; | |
* | |
* @usage: |
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
package macros; | |
import haxe.io.Path; | |
import haxe.Json; | |
import sys.FileSystem; | |
import sys.io.File; | |
/** | |
* This script finds Haxe-files in a directory and compiles them to individual JS files. | |
* A JSON file must be supplied to indicate the CWD, outputDir, fileNamePattern to find the files, | |
* and the compiler-arguments to apply to all files. |
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
package; | |
import luxe.Mesh; | |
import haxe.io.StringInput; | |
import luxe.options.MeshOptions; | |
import luxe.Vector; | |
import phoenix.Batcher; | |
import phoenix.geometry.Geometry; | |
import PlyParser; | |
import phoenix.geometry.Vertex; | |
/** |
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
// Reference: http://lea.verou.me/2011/10/easily-keep-gh-pages-in-sync-with-master/ | |
$ git add . | |
$ git status // to see what changes are going to be commited | |
$ git commit -m 'Some descriptive commit message' | |
$ git push origin master | |
$ git checkout gh-pages // go to the gh-pages branch | |
$ git rebase master // bring gh-pages up to date with master | |
$ git push origin gh-pages // commit the changes |
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
// Live video stream management for HTML5 video. Uses FFMPEG to connect to H.264 camera stream, | |
// Camera stream is remuxed to a MP4 stream for HTML5 video compatibility and segments are recorded for later playback | |
var liveStream = function (req, resp) { // handle each client request by instantiating a new FFMPEG instance | |
// For live streaming, create a fragmented MP4 file with empty moov (no seeking possible). | |
var reqUrl = url.parse(req.url, true) | |
var cameraName = typeof reqUrl.pathname === "string" ? reqUrl.pathname.substring(1) : undefined; | |
if (cameraName) { | |
try { | |
cameraName = decodeURIComponent(cameraName); |