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
| HXML ?= $(shell find . -name "*.hxml" -print -quit) | |
| SOURCES ?= $(shell find . -name "*.hx") | |
| # Determine output file or directory from target arguments in HXML | |
| OUTPUT ?= $(shell echo ' \ | |
| class M { static function main() { \ | |
| var r = ~/^\s*-?-(js|lua|swf|as3|neko|php|cpp|cppia|cs|java|python|hl)\s+([^\\n]+)/im; \ | |
| if (r.match(sys.io.File.getContent(Sys.args()[0]))) \ | |
| Sys.print(r.matched(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
| # Global State | |
| [select object] | |
| - activeTexture(unit:TextureUnit) | |
| - bindBuffer(target:BufferTarget, buffer:GLBuffer) | |
| - bindFramebuffer(target:FramebufferTarget, framebuffer:GLFramebuffer) | |
| - bindRenderbuffer(target:RenderbufferTarget, renderbuffer:GLRenderbuffer) | |
| - bindTexture(target:TextureTarget, texture:GLTexture) | |
| - useProgram(program:GLProgram) | |
| [primtive draw state] |
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 scopePreservingSplit(str: String, by: String) { | |
| var scopePairs = ['()', '[]', '{}', '<>']; | |
| var scopeState = [0, 0, 0, 0]; | |
| var parts = new Array<String>(); | |
| var buffer = ''; | |
| inline function handleScope(c) { | |
| for (i in 0...scopePairs.length) { | |
| var open = scopePairs[i].charAt(0); | |
| var close = scopePairs[i].charAt(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
| #ifdef GL_ES | |
| precision mediump float; | |
| #endif | |
| uniform vec2 u_resolution; | |
| uniform vec2 u_mouse; | |
| uniform float u_time; | |
| vec2 rotate(vec2 p, float radians) { | |
| float c = cos(radians); |
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
| #folders should be named like: haxe-3.1.3, and the regular haxe folder should be removed | |
| alias setHaxeVersion=_set_haxe_version | |
| function _set_haxe_version(){ | |
| HAXE_PARENT="$(dirname "$HAXE_HOME")" | |
| FIND_RESULT="`find $HAXE_PARENT -maxdepth 1 -name "haxe-*$1"`" | |
| NUM_RESULTS=`echo "$FIND_RESULT" | wc -l` | |
| if [[ $NUM_RESULTS -eq 1 ]] && [[ -n $FIND_RESULT ]] ; then |
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
| // Author: @patriciogv | |
| // Title: Simple Voronoi | |
| #ifdef GL_ES | |
| precision mediump float; | |
| #endif | |
| uniform vec2 u_resolution; | |
| uniform vec2 u_mouse; | |
| uniform float u_time; |
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
| static function relativePath(relativeTo: String, path: String) { | |
| // make both absolute | |
| path = Path.removeTrailingSlashes(FileSystem.absolutePath(path)); | |
| relativeTo = Path.removeTrailingSlashes(FileSystem.absolutePath(relativeTo)); | |
| var aPath = path.split('/'); | |
| var aRelativeTo = relativeTo.split('/'); | |
| // find shared part of path | |
| var matchesUpToIndex = 0; |
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
| // https://www.shadertoy.com/view/dlfXDN | |
| // 2023 myth0genesis | |
| // 4D Simplex Noise Gradient | |
| // I saw that Stefan Gustavson didn't seem to have published any shader | |
| // with an analytic solution for the gradients of his variant | |
| // of 4D simplex noise, so I thought I'd try solving it myself | |
| // and publish it here for anyone who finds it useful. | |
| // Compares the analytic solution to the numerically approximated one (for a sanity check) | |
| // and shows the results of all four derivatives with respect to each dimension. | |
| // Top : Analytic gradient | Bottom: Forward differences approximated gradient |
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
| /*============================================================================ | |
| NVIDIA FXAA 3.11 by TIMOTHY LOTTES | |
| ------------------------------------------------------------------------------ | |
| COPYRIGHT (C) 2010, 2011 NVIDIA CORPORATION. ALL RIGHTS RESERVED. | |
| ------------------------------------------------------------------------------ | |
| TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED |
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
| * thread #2, stop reason = EXC_BAD_ACCESS (code=2, address=0x700000897ca0) | |
| frame #0: 0x0000000100004df4 StandaloneMain-debug`hx::ObjectPtr<hx::Object>::ObjectPtr(this=0x0000700000897ca0, inObj=0x0000000103ea850c) at Object.h:333:36 | |
| 330 typedef OBJ_ *Ptr; | |
| 331 | |
| 332 inline ObjectPtr() : mPtr(0) { } | |
| -> 333 inline ObjectPtr(OBJ_ *inObj) : mPtr(inObj) { } | |
| 334 inline ObjectPtr(const null &inNull) : mPtr(0) { } | |
| 335 inline ObjectPtr(const ObjectPtr<OBJ_> &inOther) : mPtr( inOther.mPtr ) { } | |
| 336 template<typename T> | |
| Target 0: (StandaloneMain-debug) stopped. |