Skip to content

Instantly share code, notes, and snippets.

@DjPale
DjPale / fx_shake.gd
Created January 3, 2017 22:46
Godot Shake Node
extends Node
export(NodePath) var target_path
export(float) var duration = 0.2
export(Vector2) var amplitude = Vector2(5.0, 5.0)
var target = null
var fx_timer = 0
precision mediump float;
uniform sampler2D tex0;
uniform sampler2D tex1;
varying vec2 tcoord;
varying vec4 color;
void main()
{
public static function apply_tile_shader(map: TiledMap, shader: phoenix.Shader)
{
if (map.visual == null) return;
var layers = map.visual.geometry.keys();
for (lname in layers)
{
for (row in map.visual.geometry[lname])
{
@DjPale
DjPale / Compile Neko and Haxe on RPI - Notes.txt
Created November 30, 2015 12:58
Compile Neko 2.0.0 and Haxe 3.2.0 on RPI - Notes only - may not run if followed blindly :)
cd
mkdir dev
## Compile neko 2.0.0
sudo apt-get install libgc-dev
sudo nano /etc/apt/source.list
# append the following lines
deb http://www.cl.cam.ac.uk/~lpw25/ocaml-rpi/ wheezy main
@DjPale
DjPale / Main.hx
Created November 25, 2014 17:27
luxe engine Particle System bug - check Web and Native target for different behavior
// luxe engine Particle System bug - check Web and Native target for different behavior
import luxe.Input;
import luxe.Particles;
import luxe.Color;
import luxe.Vector;
class Main extends luxe.Game {
var particles : ParticleSystem;
@DjPale
DjPale / TextureTest
Created November 8, 2014 19:54
This code gives different behaviors on mac, ios and web on luxeengine
import luxe.Vector;
import luxe.Sprite;
import phoenix.Batcher;
import phoenix.RenderTexture;
// web = OK
// mac = garbled textures
// ios = nothing is displayed