Skip to content

Instantly share code, notes, and snippets.

Vadim Dyachenko YellowAfterlife

Block or report user

Report or block YellowAfterlife

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@beepdavid
beepdavid / gist:b72f7494f84bd52f82c12beedaaf2c72
Last active Jan 14, 2017
Dynamic mesh triangulation of curved path shapes
View gist:b72f7494f84bd52f82c12beedaaf2c72
Very quick overview of how this works: https://twitter.com/beepdavid/status/814869295524155392
1) Custom path tool that supports line, quad and bezier sections
2) On path change, create a polygon (Vector3 array) by sampling points along the path
3) Curves are sampled evenly by estimating the curve length first, then sampling at the required curve resolution
4) Feed polygon into https://triangle.codeplex.com/ to get triangle data (this needs some work to use in Unity)
5) Create procedural mesh using output triangle data
6) Profit!
Any questions, comment or tweet me @beepdavid :)
@underscorediscovery
underscorediscovery / haxe-unzip-example.hx
Created Jun 7, 2014
Unzip a file with haxe - example
View haxe-unzip-example.hx
public static function unzip( _path:String, _dest:String, ignoreRootFolder:String = "" ) {
var _in_file = sys.io.File.read( _path );
var _entries = haxe.zip.Reader.readZip( _in_file );
_in_file.close();
for(_entry in _entries) {
var fileName = _entry.fileName;
@AxGord
AxGord / FastSignalsExample.hx
Created Apr 2, 2014
Ultra fast and small strict typed simple signals.
View FastSignalsExample.hx
package ;
class FastSignalsExample {
static function main() {
var o = new Signal1<String>();
o.add(function(v) trace(v));
o.dispatch('Hello');
}
}
@profelis
profelis / HxWorker.hx
Last active Aug 29, 2015
Create flash Worker from single class (inspired by https://github.com/makc/worker-from-class)
View HxWorker.hx
package worker;
import flash.display.Sprite;
import flash.system.*;
import haxe.io.*;
import format.swf.*;
/**
* usage:
* -lib format
You can’t perform that action at this time.