This file contains hidden or 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
| 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 |
This file contains hidden or 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
| 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({ |
This file contains hidden or 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
| //Create application | |
| PhiloGL('canvasId', { | |
| camera: { | |
| position: { | |
| x: 0, y: 0, z: -7 | |
| } | |
| }, | |
| scene: { | |
| lights: { | |
| enable: true, |
This file contains hidden or 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
| 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'], |
This file contains hidden or 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
| <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.*']); | |
This file contains hidden or 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
| //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 |
This file contains hidden or 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
| /* 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 |
This file contains hidden or 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
| //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; |
This file contains hidden or 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
| (function() { | |
| //Unpack PhiloGL modules | |
| PhiloGL.unpack(); | |
| var plane = new O3D.Plane({ | |
| type: 'x,y', | |
| xlen: 2, | |
| ylen: 2, | |
| offset: 1, | |
| program: 'quat', |
This file contains hidden or 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
| 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) { |