Skip to content

Instantly share code, notes, and snippets.

View KeanW's full-sized avatar

Kean Walmsley KeanW

View GitHub Profile
@KeanW
KeanW / MainActivity.java
Last active October 16, 2017 17:02
Primary file for using the Oculus Mobile SDK with the stereoscopic A360 web samples
package oculus;
import android.os.Bundle;
import android.util.Log;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.Window;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
@KeanW
KeanW / MainActivity.java
Last active September 30, 2015 15:38
Primary file for using the Cardboard SDK for Android with the stereoscopic A360 web samples
package com.autodesk.a360cardboard;
import com.google.vrtoolkit.cardboard.CardboardActivity;
import android.annotation.SuppressLint;
import android.content.Context;
import android.os.Build;
import android.os.Bundle;
import android.os.Vibrator;
import android.util.Log;
@KeanW
KeanW / bb8-ollie-cylon-keyboard.js
Last active February 15, 2016 04:10
JavaScript code using Cylon.js to drive an Ollie and a BB-8 via the keyboard
var Cylon = require('cylon');
Cylon.robot({
connections: {
bluetooth_ollie: { adaptor: 'central', uuid: '1259a8ff5b694bf39c77d235fa8ade26', module: 'cylon-ble'},
bluetooth_bb8: { adaptor: 'central', uuid: '971cf6561dec4974ab9d266927873778', module: 'cylon-ble'},
keyboard: {adaptor: 'keyboard'}
},
@KeanW
KeanW / bb8-ollie-cylon-controller.js
Last active April 22, 2016 04:05
JavaScript code using Cylon.js to drive an Ollie and a BB-8 behind a web-service
var Cylon = require('cylon');
var cyrob = Cylon.robot({
connections: {
bluetooth_ollie: { adaptor: 'central', uuid: '1259a8ff5b694bf39c77d235fa8ade26', module: 'cylon-ble'},
bluetooth_bb8: { adaptor: 'central', uuid: '971cf6561dec4974ab9d266927873778', module: 'cylon-ble'}
},
devices: {
@KeanW
KeanW / robots-server.js
Last active January 8, 2016 07:59
Node web-service to control Ollie and BB-8 robots using Cylon.js
// robots-server.js
var express = require('express');
var app = express();
var robots = require('./bb8-ollie-cylon-controller');
var port = process.env.PORT || 8080;
var router = express.Router();
@KeanW
KeanW / drive-robot.cs
Created January 8, 2016 15:13
C# file to drive robots from within AutoCAD via our Node/Cylon.js web-service
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.EditorInput;
using Autodesk.AutoCAD.Runtime;
using System.Globalization;
using System.Net;
using System.Web.Script.Serialization;
namespace DriveRobots
{
public static class Extensions
/// <reference path='../../types/three.d.ts' />
import { Logger } from '../../core/Logger';
let logger = Logger.getInstance();
import { ShowableExtension } from '../../core/ShowableExtension';
export class SkeletonExtension extends ShowableExtension {
private _lineMaterial: any = null;
private _vertexMaterial: any = null;
private _overlayScene = "DasherSkeletonOverlay";
/// <reference path='../../types/three.d.ts' />
import { Logger } from '../../core/Logger';
let logger = Logger.getInstance();
import { ShowableExtension } from '../../core/ShowableExtension';
import { DasherModel } from '../../core/DasherModel';
export class SkeletonExtension extends ShowableExtension {
private _skeletons: { [key: number]: [THREE.SkinnedMesh, THREE.Bone, THREE.SkeletonHelper] };
private _skeletonMaterial: any = null;
/// <reference path='../../types/three.d.ts' />
import { Logger } from '../../core/Logger';
let logger = Logger.getInstance();
import { ShowableExtension } from '../../core/ShowableExtension';
import { DasherModel } from '../../core/DasherModel';
export class SkeletonExtension extends ShowableExtension {
private _skeletons: { [key: number]: [THREE.SkinnedMesh, THREE.Bone, THREE.SkeletonHelper] };
private _skeletonMaterial: any = null;
import * as MeshLine from './THREE.MeshLine.js'
export class SkeletonHelper2 extends THREE.Group {
private root: THREE.Object3D;
private bones: THREE.Bone[];
private meshLines: any[];
private meshes: any[];
private fakeGeometry: any[];