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
export function createDomain(values, symmetrical, includeZero) { | |
const dMax = d3.max(values); | |
const dMin = d3.min(values); | |
if (symmetrical) { | |
const largest = d3.max([Math.abs(dMax), Math.abs(dMin)]); | |
return [-largest, largest]; | |
} | |
if (includeZero) { | |
if (dMin <= 0 && dMax <= 0) { | |
return [dMin, 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
// Draw a line out of multiple paths crossing upper and lower bounds. | |
// The path definitions ensure there are no gaps between segments. | |
const makeLine = (data, style) => { | |
let cx = this.xs(fastMoment(data[0][seriesxMet])); | |
let cv = data[0][seriesyMet]; | |
let coords = [{x: cx, y: this.ys(cv), s: Math.sign(cv)}]; | |
for (let i = 1; i < data.length; i++) { | |
let nx = this.xs(fastMoment(data[i][seriesxMet])); | |
let nv = data[i][seriesyMet]; | |
// Add bound-crossing points. |
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
import React from 'react'; | |
import {isFunction} from 'lodash'; | |
import defaultStyles from './grid.scss'; | |
/** | |
* Implements a generic grid component | |
* @prop data - an array of data items that the grid will render | |
* @prop config - grid configuration object | |
* The configuration object has two sections | |
* table - contains table-wide configuration settings: |
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
from cyclops import * | |
from random import * | |
from math import * | |
l = Light.create() | |
l.setPosition(0, 2, 0) | |
l.setAmbient(Color(0.5, 0.5, 0.5, 1)) | |
s1 = SphereShape.create(0.5, 2) | |
s2 = SphereShape.create(0.5, 2) |
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
config: | |
{ | |
//serverListenIP = "127.0.0.1"; | |
serverPort = "28000"; | |
// VRPN Controller device for CalVR | |
vrpnTrackerName = "Navigation"; | |
vrpnTrackerPort = 3894; | |
checkForDisconnectedClients = false; |
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
pointer: | |
{ | |
type="cylindrical"; | |
radius=3.238; | |
doorWidth = 36; | |
xBias = 0.0278; | |
minY = 0.305; | |
maxY = 2.625; | |
}; |
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
# This example creates a spinning cube every time the user right-clicks on the window. | |
# A custom Actor keeps track of each cube spinning. | |
from math import * | |
from euclid import * | |
from omega import * | |
from omegaToolkit import * | |
from cyclops import * | |
# The actor list is needed to avoid garbage-collecting alive actors. | |
actors = [] |
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
config: | |
{ | |
serverPort = "28000"; | |
// VRPN Controller device for CalVR | |
vrpnTrackerName = "Navigation"; | |
vrpnTrackerPort = 3894; | |
checkForDisconnectedClients = false; | |
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
# Actor dictionary | |
actors = {} | |
# create a custom actor class | |
class Pickable(Actor): | |
node = None | |
def __init__(self): | |
# create something | |
node = SphereNode.create(1,2) | |
node.setSelectable(True) |
NewerOlder