Skip to content

Commit

Permalink
Example tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
xeolabs committed May 23, 2013
1 parent d15afaa commit 2518560
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 49 deletions.
4 changes: 2 additions & 2 deletions examples/ex/demos/bubbles.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
{
id:"grid-floor",
type:"material",
baseColor:{ r:0.3, g:0.3, b:0.3 },
color:{ r:0.3, g:0.3, b:0.3 },
emit:1,
nodes:[
{
Expand Down Expand Up @@ -243,7 +243,7 @@

{
type:"material",
baseColor:{ r:0, g:0, b:0 },
color:{ r:0, g:0, b:0 },
emit:0.0,
nodes:[
// Clouds texture
Expand Down
28 changes: 18 additions & 10 deletions examples/ex/demos/firstExample.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,30 @@
var scene = SceneJS.createScene({
nodes:[
{
type:"material",
baseColor:{ r:0.3, g:0.3, b:0.1 },
type:"lookAt",
eye:{ y:5, z:7 },
look:{ x:0, y:1, z:0 },

nodes:[
{
type:"rotate",
id:"myRotate",
y:1.0,
angle:0,
type:"material",
color:{ r:0.3, g:0.3, b:1.0 },

nodes:[
{
type:"geometry",
source:{
type:"teapot"
}
type:"rotate",
id:"myRotate",
y:1.0,
angle:0,

nodes:[
{
type:"geometry",
source:{
type:"teapot"
}
}
]
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion examples/ex/demos/tronTank.html
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
nodes:[
{
type:"material",
baseColor:{ r:1, g:1, b:1 },
color:{ r:1, g:1, b:1 },
emit:0.0,
nodes:[
{
Expand Down
2 changes: 1 addition & 1 deletion examples/ex/flags/diffuse.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
// Demonstrates how to enable and disable diffuse lighting for geometry.
//
// Diffuse lighting is governed by light nodes working in conjunction with
// diffuse surface color ('baseColor') defined by material nodes.
// diffuse surface color ('color') defined by material nodes.
//
// With SceneJS' default lighting in effect, the 'diffuse' attribute
// of the flags node in the example below will govern whether or not diffuse
Expand Down
2 changes: 1 addition & 1 deletion examples/ex/misc/webglContextRestore.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
{
id:"grid-floor",
type:"material",
baseColor:{ r:0.9, g:0.9, b:1.0 },
color:{ r:0.9, g:0.9, b:1.0 },
emit:1,
nodes:[
{
Expand Down
4 changes: 2 additions & 2 deletions examples/ex/scene/objects/objects.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
translate:{ x:-2 },
scale:{ x:1.5, y: 1, z: 1 },
rotate:{ angle:0, x:0, y:1, z:0 },
material:{ baseColor:{ r:1, g:0, b:0 } },
material:{ color:{ r:1, g:0, b:0 } },
nodes:[
{
type:"object",
Expand All @@ -47,7 +47,7 @@
type:"object",
translate:{ x:2 },
scale:{x: 1,y:1.5, Z: 1 },
material:{ baseColor:{ r:0, g:0, b:1 } },
material:{ color:{ r:0, g:0, b:1 } },
nodes:[
{
type:"object",
Expand Down
4 changes: 2 additions & 2 deletions examples/ex/shaders/vertex/skybox.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@

{
type:"material",
baseColor:{ r:0.3, g:0.3, b:0.3 },
color:{ r:0.3, g:0.3, b:0.3 },
emit:0,
nodes:[
{
Expand Down Expand Up @@ -137,7 +137,7 @@
nodes:[
{
type:"material",
baseColor:{ r:1, g:1, b:1 },
color:{ r:1, g:1, b:1 },
emit:0.0,
nodes:[
{
Expand Down
25 changes: 0 additions & 25 deletions examples/features.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"title":"Lights",
"nodes":[
{
"title":"",
"nodes":[
{
"title":"Ambient",
Expand All @@ -25,7 +24,6 @@
"title":"Cameras",
"nodes":[
{
"title":"Cameras",
"nodes":[
{
"title":"Orthographic",
Expand All @@ -47,7 +45,6 @@
"title":"Geometry",
"nodes":[
{
"title":"Custom",
"nodes":[
{
"title":"Triangles",
Expand All @@ -64,7 +61,6 @@
]
},
{
"title":"Primitives",
"nodes":[
{
"title":"Plane",
Expand All @@ -89,7 +85,6 @@
]
},
{
"title":"",
"nodes":[
{
"title":"Vector text",
Expand All @@ -98,7 +93,6 @@
]
},
{
"title":"",
"nodes":[
{
"title":"Vertex coloring",
Expand All @@ -107,7 +101,6 @@
]
},
{
"title":"Plugins",
"nodes":[
{
"title":"Geometry plugin API",
Expand All @@ -121,7 +114,6 @@
"title":"Texture",
"nodes":[
{
"title":"Texture maps",
"nodes":[
{
"title":"Color map",
Expand All @@ -142,7 +134,6 @@
]
},
{
"title":"",
"nodes":[
{
"title":"Multitexturing",
Expand All @@ -151,7 +142,6 @@
]
},
{
"title":"",
"nodes":[
{
"title":"UV layers",
Expand All @@ -160,7 +150,6 @@
]
},
{
"title":"Animation",
"nodes":[
{
"title":"Texture animation",
Expand All @@ -169,7 +158,6 @@
]
},
{
"title":"Video texture",
"nodes":[
{
"title":"Video texture",
Expand All @@ -178,7 +166,6 @@
]
},
{
"title":"Plugins",
"nodes":[
{
"title":"Texture plugin API",
Expand All @@ -195,7 +182,6 @@
"title":"Effects",
"nodes":[
{
"title":"",
"nodes":[
{
"title":"Custom fragment shaders",
Expand All @@ -204,7 +190,6 @@
]
},
{
"title":"",
"nodes":[
{
"title":"Custom vertex shaders",
Expand All @@ -213,7 +198,6 @@
]
},
{
"title":"",
"nodes":[
{
"title":"Transparency sorting",
Expand All @@ -227,7 +211,6 @@
"title":"Interaction",
"nodes":[
{
"title":"",
"nodes":[
{
"title":"Picking",
Expand All @@ -236,7 +219,6 @@
]
},
{
"title":"",
"nodes":[
{
"title":"Ray picking",
Expand All @@ -250,7 +232,6 @@
"title":"Scenes",
"nodes":[
{
"title":"Modelling",
"nodes":[
{
"title":"Transform hierarchies",
Expand All @@ -259,17 +240,14 @@
]
},
{
"title":"",
"nodes":[
{
"title":"Multiple scenes",
"page":"multipleScenes"
}
]
},

{
"title":"WebGL",
"nodes":[
{
"title":"WebGLContextLost recovery",
Expand All @@ -283,7 +261,6 @@
"title":"Optimization",
"nodes":[
{
"title":"",
"nodes":[
{
"title":"Instancing",
Expand All @@ -292,7 +269,6 @@
]
},
{
"title":"",
"nodes":[
{
"title":"Vertex sharing",
Expand All @@ -301,7 +277,6 @@
]
},
{
"title":"Optimization",
"nodes":[
{
"title":"Texture atlases",
Expand Down
Binary file added images/firstExample.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 4 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
nodes:[
{
type:"material",
baseColor: { r: 0.3, g: 0.3, b: 0.1 },
color: { r: 0.3, g: 0.3, b: 1.0 },

nodes:[
{
Expand All @@ -165,8 +165,8 @@
<p>And voilà, one blue teapot:</p><br>
<a href="examples.html?page=firstExample"
target="other"> <img
style="display: block; margin-left: auto; margin-right: auto;" src="images/firstExample.jpg"/></a>

style="display: block; margin-left: auto; margin-right: auto;" src="images/firstExample.png"/></a>
<br>
<p>Now let's start the teapot spinning:</p>
<pre class="prettyprint lang-javascript">
var angle = 0;
Expand All @@ -186,7 +186,7 @@


<br>
<a href="https://github.com/scenejs" target="_blank"><img
<a href="https://github.com/xeolabs/scenejs" target="_blank"><img
style="position: absolute; top: 0; left: 0; border: 0;"
src="https://s3.amazonaws.com/github/ribbons/forkme_left_red_aa0000.png" alt="Fork me on GitHub"></a>

Expand Down Expand Up @@ -235,7 +235,6 @@
subCategory = category.nodes[i];
subCategoryElem = $('<li/>')
.addClass('feature-subcategory')
// .text(subCategory.title + ": ")
.appendTo(ul);

var nodes = subCategory.nodes;
Expand Down

0 comments on commit 2518560

Please sign in to comment.