Skip to content

Instantly share code, notes, and snippets.

new Ext.chart.Spark({
store: store1,
renderTo: 'glucose-chart',
series: [{
type: 'line',
xField: 'name',
yField: 'glucose',
fill: true,
style: {
fill: '#777'
<!DOCTYPE html>
<html>
<head>
<title>WebGL Shader Lab</title>
<script id="shader-vs" type="x-shader/x-vertex">
attribute vec3 aPos;
attribute vec2 aTexCoord;
varying vec2 pixel;
void main(void) {
var page = new WebPage(),
fs = require('fs'),
svg, output, size;
if (phantom.args.length < 4 || phantom.args.length > 4) {
console.log('Usage: svg2Image.js svg width height output');
phantom.exit();
} else {
svg = phantom.args[0];
width = phantom.args[1];
/* posible implementation en la creacion del treemap...
onPlaceLabel: function(domElement, node) {
var width = node.getData('width'),
height = tm.leaf(node) ? node.getData('height') : tm.config.titleHeight,
fontStyle = 'Arial',
fontSize = calculateFontSize(node.name, fontStyle, width, height);
domElement.style.font = fontSize + 'px ' + fontStyle;
}
PhiloGL.unpack();
var modelLeft, modelRight, pos, completed, $ = function(d) { return document.getElementById(d); };
document.onreadystatechange = function() {
if (document.readyState == 'complete') {
completed = true;
if (modelLeft) {
init();
}
import sys
import json
import struct
FILES = ['surf_reg_model_both_inflate_high.json',
'surf_reg_model_both_inflate_middle.json',
'surf_reg_model_both_inflate_low.json',
'surf_reg_model_both_normal.json']
def bin():
var fs = require('fs');
var sys = require('sys');
['surf_reg_model_both_inflate_high.obj',
'surf_reg_model_both_inflate_low.obj',
'surf_reg_model_both_inflate_middle.obj',
'surf_reg_model_both_inflate_high.obj',
'surf_reg_model_both_normal.obj'].forEach(function(filename) {
fs.readFile(filename, 'utf-8', function(err, data) {
(function() {
//Unpack PhiloGL modules
PhiloGL.unpack();
var plane = new O3D.Plane({
type: 'x,y',
xlen: 2,
ylen: 2,
offset: 1,
program: 'quat',
//Style objects and properties taken from Sprite properties: http://docs.sencha.com/ext-js/4-0/#/api/Ext.draw.Sprite
chart {
axis {
stroke: #444;
stroke-width: 1;
label {
fill: #444;
font: 12px Arial, Helvetica, sans-serif;
/* SASS like proposal: I'm not sure if this is correct since I didn't have the chance to look at the
new format. I hope this helps. */
.chart#mychart
axis
fill: '#000'
'stroke-width': 1
axisLabelTop