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
// Vertex shader | |
/** | |
* This is for rendering colored liquid/particles using LiquidFun etc | |
*/ | |
uniform mat4 u_view_projection_matrix; | |
uniform float u_depth; | |
attribute vec4 a_Position; | |
attribute vec4 a_color; |
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
#ifndef ANDROID_NDK | |
#include <GL/glew.h> | |
#endif | |
#include "Logging.h" | |
#include "GLIncludes.h" | |
#include "GLHelpers.h" | |
//***************************************************************************** |
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
[merge] | |
tool = vimdiff | |
[diff] | |
tool = vimdiff | |
[color] | |
ui = auto | |
[core] | |
excludesfile = /home/kyle2/.gitignore_global | |
editor = vim -c \"setlocal spell spelllang=en_us\" | |
[user] |
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
#***************************************************************** | |
func _ready(): | |
var child_count = get_tree().get_root().get_child_count() | |
var scene = get_tree().get_root().get_child(child_count-1) | |
print("current scene" + str(scene) + "child count: "+ \ | |
str(scene.get_child_count())) | |
pass | |
# Output: | |
# |
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
#***************************************************************** | |
func _input(event): | |
if(event.is_action_pressed("jump") && | |
!event.is_echo() && event.is_action("jump")): | |
handleJumpAction() | |
pass |
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
const STATIC = 0 | |
const SPINNING = 1 | |
var spin_state = STATIC | |
#***************************************************************** | |
func _process(delta): | |
if(spin_state == SPINNING): | |
for i in range(5): | |
doStuff() | |
spin_state = STATIC |
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
#***************************************************************** | |
# | |
func _ready(); | |
# .. Do a bunch of other stuff you want before this | |
ground_ray = get_node("ground_ray_cast") | |
ground_ray.add_exception(self) | |
#***************************************************************** |
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
float PI = 3.1415926535; | |
uniform float aperture = 178.0; | |
float apertureHalf = 0.5 * aperture * (PI / 180.0); | |
float maxFactor = sin(apertureHalf); | |
vec2 uv; | |
vec2 xy; | |
xy.x = 2.0 * SCREEN_UV.x - 1.0; | |
xy.y = 2.0 * SCREEN_UV.y - 1.0; |
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
extends Spatial | |
func _ready(): | |
set_process(true) | |
pass | |
func _process(delta): | |
# Raw epoc time (in utc) |
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
extends RigidBody | |
# member variables here, example: | |
# var a=2 | |
# var b="textvar" | |
const DEFAULT_LIFE_TIME = 5 | |
var life_timeout = DEFAULT_LIFE_TIME | |
var life_timer |