Skip to content

Instantly share code, notes, and snippets.

//JSON used for the theme constructor (all sections are optional):
//all style attributes are the same as the ones used for
//Ext.draw.Sprite: http://docs.sencha.com/ext-js/4-0/#/api/Ext.draw.Sprite
var config = {
//general configuration on axes
axis: {
fill: '#000',
'stroke-width': 1
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Stack Simulator</title>
<link rel="stylesheet" type="text/css" href="../../../resources/css/ext-all.css" />
<script type="text/javascript" src="../../../bootstrap.js"></script>
<script>
Ext.require(['Ext.chart.*', 'Ext.data.*']);
Ext.define('mynamespace.MySeries', {
alias: 'series.myseries',
extend: 'Ext.chart.series.Area',
type: 'myseries'
});
var mySeriesInstance = Ext.createByAlias('series.myseries', {
axis: 'left',
xField: 'name',
yField: ['data1', 'data2', 'data3'],
//Create application
PhiloGL('canvasId', {
camera: {
position: {
x: 0, y: 0, z: -7
}
},
scene: {
lights: {
enable: true,
function webGLStart() {
var $id = function(d) { return document.getElementById(d); };
//unpack modules
PhiloGL.unpack();
//create all models
var models = {};
//Create moon
models.moon = new O3D.Sphere({
function webGLStart() {
var $id = function(d) { return document.getElementById(d); };
//Create moon
var earth = new PhiloGL.O3D.Sphere({
nlat: 30,
nlong: 30,
radius: 2,
uniforms: {
shininess: 32
function webGLStart() {
var $id = function(d) { return document.getElementById(d); };
//Get Model
new PhiloGL.IO.XHR({
url: 'Teapot.json',
onSuccess: function(text) {
var json = JSON.parse(text);
json.colors = [1, 1, 1, 1];
json.textures = 'arroway.de_metal+structure+06_d100_flat.jpg';
function webGLStart() {
var $id = function(d) { return document.getElementById(d); };
//Create moon
var moon = new PhiloGL.O3D.Sphere({
nlat: 30,
nlong: 30,
radius: 2,
textures: 'moon.gif',
program: 'vertex',
function webGLStart() {
var pos, $id = function(d) { return document.getElementById(d); };
//Create moon
var moon = new PhiloGL.O3D.Sphere({
nlat: 30,
nlong: 30,
radius: 2,
textures: 'moon.gif'
});
function webGLStart() {
var pos, $id = function(d) { return document.getElementById(d); };
//Create moon
var moon = new PhiloGL.O3D.Sphere({
nlat: 30,
nlong: 30,
radius: 2,
textures: 'moon.gif'
});