Skip to content

Instantly share code, notes, and snippets.

View SamGondelman's full-sized avatar

Sam Gondelman SamGondelman

  • Blimp Development, LLC
View GitHub Profile
5344 4646 0200 5469 6d65 6c65 7373 2052
6567 756c 6172 007d 3f63 4200 002a 42f4
fd64 4100 0084 41e6 004d 0000 007d 4300
0000 0000 003c 4200 0024 4200 0080 3f00
001b 4200 0043 420d 0000 00a2 4200 00c2
4200 0000 4200 0054 4200 00bc 4000 802c
4200 801f 4245 0000 0052 4300 8081 4300
00f0 4100 0024 4262 1088 3f00 001b 4200
00f6 4105 0000 80ce 4300 007d 4300 0090
4100 0030 41c5 2070 bf00 801a 4200 007a
(function() { // BEGIN LOCAL_SCOPE
print("test");
Script.stop();
}()); // END LOCAL_SCOPE
(function() { // BEGIN LOCAL_SCOPE
var TOTAL_TIME = 30;
var TIME_STEP = 0.1;
var KEEP_ACTIVE = true
var t = 0;
var i = 0;
var totalSamples = TOTAL_TIME / TIME_STEP;
float getProceduralColors(inout vec3 diffuse, inout vec3 specular, inout float shininess) {
TransformCamera cam = getTransformCamera();
vec4 position = cam._viewInverse * _positionES;
if (mod(position.y + cos(iGlobalTime), 0.25) < 0.125 + 0.05 * cos(iGlobalTime * 1.5)) {
discard;
}
diffuse = 0.5 * (normalize(_normalWS) + vec3(1.0));
return 0.0;
}
(function() { // BEGIN LOCAL_SCOPE
var entities = [];
function getPos(x, y) {
return Vec3.sum(MyAvatar.position, Vec3.sum(Vec3.multiply(x, Quat.getRight(MyAvatar.orientation)),
Vec3.sum(Vec3.multiply(y, Quat.getUp(MyAvatar.orientation)),
Vec3.multiply(3, Quat.getForward(MyAvatar.orientation)))));
}
(function() { // BEGIN LOCAL_SCOPE
var entities = [];
function getPos(x, y) {
var center = Vec3.sum(MyAvatar.position, Vec3.multiply(0, Quat.getFront(MyAvatar.orientation)));
return Vec3.sum(Vec3.sum(center, Vec3.multiply(Quat.getRight(MyAvatar.orientation), x)), Vec3.multiply(Quat.getUp(MyAvatar.orientation), y));
}
var NUM_ZONES = 6;
(function() { // BEGIN LOCAL_SCOPE
var entities = [];
function getPos(x, y) {
var center = Vec3.sum(MyAvatar.position, Vec3.multiply(0, Quat.getFront(MyAvatar.orientation)));
return Vec3.sum(Vec3.sum(center, Vec3.multiply(Quat.getRight(MyAvatar.orientation), x)), Vec3.multiply(Quat.getUp(MyAvatar.orientation), y));
}
var NUM_ZONES = 6;
(function() { // BEGIN LOCAL_SCOPE
var entities = [];
function getPos(x, y) {
var center = Vec3.sum(MyAvatar.position, Vec3.multiply(6, Quat.getFront(MyAvatar.orientation)));
return Vec3.sum(Vec3.sum(center, Vec3.multiply(Quat.getRight(MyAvatar.orientation), x)), Vec3.multiply(Quat.getUp(MyAvatar.orientation), y));
}
entities.push(Entities.addEntity({
(function() { // BEGIN LOCAL_SCOPE
var entities = [];
function getPos(x, y) {
var center = Vec3.sum(MyAvatar.position, Vec3.multiply(6, Quat.getFront(MyAvatar.orientation)));
return Vec3.sum(Vec3.sum(center, Vec3.multiply(Quat.getRight(MyAvatar.orientation), x)), Vec3.multiply(Quat.getUp(MyAvatar.orientation), y));
}
entities.push(Entities.addEntity({
(function() { // BEGIN LOCAL_SCOPE
var entities = [];
function getPos(x, y) {
var center = Vec3.sum(MyAvatar.position, Vec3.multiply(3, Quat.getFront(MyAvatar.orientation)));
return Vec3.sum(Vec3.sum(center, Vec3.multiply(Quat.getRight(MyAvatar.orientation), x)), Vec3.multiply(Quat.getUp(MyAvatar.orientation), y));
}
entities.push(Entities.addEntity({