Skip to content

Instantly share code, notes, and snippets.

View sirkitree's full-sized avatar

Jerad Bitner sirkitree

View GitHub Profile
@sirkitree
sirkitree / log_pos.js
Created October 31, 2014 00:48
log position in janus with a new text object
room.update = function(delta_time) {
global_update_val++;
global_time_passed += delta_time;
var secs_passed = global_time_passed * 0.001;
var sin_secs = Math.sin(secs_passed);
var sin_secs2 = Math.sin(secs_passed * 3.14159 * 2);
room.objects["new_text1"].text = "up/down = 1 & 7: " + (updown / 4);
room.objects["new_text1"].pos.y = 1.5 + 0.25*sin_secs;
@sirkitree
sirkitree / janus-rand.php
Last active August 29, 2015 14:09
Generate a random room from the vrsites subreddit for janusvr
<?php
/**
* Generate a random link from vrsites subreddit.
* Original author: http://www.reddit.com/user/MrM0bius
*/
$options = array('http' => array('user_agent' => 'JanusVR random site (v0.1)'));
$context = stream_context_create($options);
$rvrsites1 = file_get_contents('http://reddit.com/r/vrsites/.json?limit=100', false, $context);
<?php
$options = array('http' => array('user_agent' => 'JanusVR random site (v0.1)'));
$context = stream_context_create($options);
/**
* Should be able to use a more typical cache pattern here.
*
* Something like:
function _cache_get($var) {
static $cache_objects;
@sirkitree
sirkitree / index.html
Created November 19, 2014 05:11
Change websurface_id in Janus VR
<html>
<head>
<title>Lullabot loves you!</title>
</head>
<body>
This is an example of using the AssetWebSurface tag in Janus VR to insert a website as a texture on an object.
<FireBoxRoom>
<Assets>
<AssetObject id="plane" src="plane.obj" />
<AssetWebSurface id="lullabot" src="https://www.lullabot.com" width="1920" height="1080" />
@sirkitree
sirkitree / home.html
Created November 23, 2014 02:58
user homes janus vr
<html>
<head>
<title>Janus VR - Initial Home</title>
<body>
<FireBoxRoom>
<Assets>
<AssetImage src="http://www.dgp.toronto.edu/~mccrae/projects/firebox/img/instructions.jpg" id="instr1" />
@sirkitree
sirkitree / index.js
Created January 21, 2015 15:29
coordinate generator
var points = [];
var x = y = z = this.constraint;
var constraintDecrement = this.constraint * -1;
for (var x = this.constraint; x >= constraintDecrement; x--) {
points.push({
'pos': {'x' : x, 'y' : y, 'z' : z}
});
for (var y = this.constraint; y > constraintDecrement; y--) {
points.push({
@sirkitree
sirkitree / README.md
Last active August 29, 2015 14:26
npm watch can run background commands as though they were in the foreground

You can run this command with npm watch and it will run both the watchify command and the gulp watch command in two separate background processes but both process's output will still show up in the foreground. Since they're run through npm, you can hit ctrl+c to cancel the main process which in turn cancels the two background processes.

img

@sirkitree
sirkitree / Starter Drush Make
Created July 28, 2010 18:01 — forked from q0rban/Starter Drush Make
Starter Drush Make
core = 6.x
projects[pressflow][type] = "core"
projects[pressflow][download][type] = "get"
projects[pressflow][download][url] = "http://launchpad.net/pressflow/6.x/6.17.83/+download/pressflow-6.17.83.tar.gz"
; INSTALL PROFILES
projects[profiler] = 1.0
; DEVELOPMENT
@sirkitree
sirkitree / Simple panels 'block' (php, drupal, panels)
Created August 20, 2010 14:54
Simple panels 'block' (php, drupal, panels) #
<?php
/**
* Plugins are described by creating a $plugin array which will be used
* by the system that includes this file.
*/
$plugin = array(
'title' => t('Work Wizard Menu'),
'description' => t('This is the menu for the work wizard.'),
'single' => TRUE,
'content_types' => array('work_wizard_menu'),