Skip to content

Instantly share code, notes, and snippets.

@ruby0x1
ruby0x1 / Test.hx
Created March 11, 2014 02:22
Haxe 3.1 string VC++ compiler error
//Adapted from http://haxe.org/doc/start/cpp
class Test {
static function main() {
//The following trace should reproduce the error regardless of haxe version 3+
// trace("
// Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World!
// Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World!
package enhaxe.resource.impl;
import enhaxe.math.Aabb;
import enhaxe.math.DualQuat;
import enhaxe.math.Mat44;
import enhaxe.math.Quat;
import enhaxe.math.Vec3;
import enhaxe.rendering.IGeometry;
import enhaxe.resource.Resource.IResourceData;
import enhaxe.resource.Resource.ResourceContext;
@ruby0x1
ruby0x1 / cube_test.hx
Created October 4, 2014 20:31
unofficial code from the 3D test case demo for luxeengine.com
import phoenix.Texture;
import phoenix.Batcher;
import phoenix.Camera;
import phoenix.geometry.LineGeometry;
import phoenix.geometry.QuadGeometry;
import phoenix.geometry.Geometry;
import phoenix.geometry.Vertex;
import phoenix.geometry.TextureCoord;
import phoenix.Quaternion;
@ruby0x1
ruby0x1 / CameraDrag.hx
Last active August 29, 2015 14:09
luxeengine : Simple camera drag + zoom script
import luxe.Component;
import luxe.Input.MouseButton;
import luxe.Input.MouseEvent;
import luxe.Vector;
/*
for : http://luxeengine.com
author : underscorediscovery
@ruby0x1
ruby0x1 / HoverAlpha.hx
Last active August 29, 2015 14:12
Basic hover alpha button component
import luxe.Input;
import luxe.Sprite;
import luxe.Color;
import luxe.Component;
import luxe.tween.Actuate;
class HoverAlpha extends Component {
public var amount : Float = 0.3;
@ruby0x1
ruby0x1 / alp.py
Last active August 29, 2015 14:12
modo area light to polygon
# python
import lx
import traceback
from math import atan2, sqrt, pi
# WIP, will tidy when it's done
# Modo Area light -> Polygon
# https://github.com/underscorediscovery
# To install, see the modo docs, but in short:
@ruby0x1
ruby0x1 / Test.hx
Created January 14, 2015 06:40
mint wip quick example code
//create the list view
list = new mint.List({
parent: window,
name: 'list1',
bounds: new Rect(4,28,248,400-28-4)
});
//populate it with children
import luxe.collision.ShapeDrawerLuxe;
import luxe.collision.shapes.Shape;
import luxe.collision.Collision;
import luxe.collision.CollisionData;
import luxe.Entity;
import luxe.Color;
class CollisionManager {
@ruby0x1
ruby0x1 / test.mint.css
Last active August 29, 2015 14:14
mint file markup and layout example
/*
notes :
- set to css for highlighting only, does not equate to css.
- wip, etc
----
control markup
----
*/
@ruby0x1
ruby0x1 / thisisnotcss.css
Created January 28, 2015 19:13
stay example
base width will expand,
because of the last rule,
and not clamp to 100 from the second
:base {
left: >= 100;
width: >= 100;
right: screen.right;
}