Skip to content

Commit 3281097

Browse files
author
Phil Taylor
committed
* Adjusted colors and formatting to match new color scheme.
1 parent 9ddbabe commit 3281097

File tree

8 files changed

+336
-310
lines changed

8 files changed

+336
-310
lines changed

Apps/Sample/BasicDemos/CharacterSkeleton.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@
126126
size_z: 40.0,
127127
sections_x: 20,
128128
sections_z: 20 }),
129-
materialNode: scene.constructNode('FlatMaterial')
129+
materialNode: scene.constructNode('FlatMaterial', {
130+
color: new FABRIC.RT.rgb(0.3,0.3,0.3,1.0)
131+
} )
130132
});
131133

132134
assetNodes.Biped_Nulls_UpperBodyController.setTimeRange(new FABRIC.RT.Vec2(0, 2.5));

Apps/Sample/BasicDemos/CharacterSkinning.html

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,15 @@
9898

9999
// create the scene grid
100100
scene.constructNode('Instance', {
101-
geometryNode: scene.constructNode('Grid', {
102-
size_x: 40.0,
103-
size_z: 40.0,
104-
sections_x: 20,
105-
sections_z: 20 }),
106-
materialNode: scene.constructNode('FlatMaterial')
107-
});
101+
geometryNode: scene.constructNode('Grid', {
102+
size_x: 40.0,
103+
size_z: 40.0,
104+
sections_x: 20,
105+
sections_z: 20 }),
106+
materialNode: scene.constructNode('FlatMaterial', {
107+
color: new FABRIC.RT.rgb(0.3,0.3,0.3,1.0)
108+
} )
109+
});
108110

109111
var assetNodes = scene.importAssetFile('Models/envelope.dae');
110112

Apps/Sample/BasicDemos/KeyframeAnimation.html

Lines changed: 74 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,13 @@
6161

6262

6363
<script type="text/javascript">
64-
$(document).ready(function() { var $globalTimeSlider = $('#globalTime').slider({
65-
min: 0.0,
66-
max: 100.0,
67-
step: 0.01
68-
});
64+
$(document).ready(function() {
65+
66+
var $globalTimeSlider = $('#globalTime').slider({
67+
min: 0.0,
68+
max: 100.0,
69+
step: 0.01
70+
});
6971

7072
$('#curveEditor').button();
7173

@@ -100,6 +102,20 @@
100102
diffuseColor: FABRIC.RT.rgb(0, 0.8, 0, 1),
101103
lightNode: light
102104
});
105+
106+
// create the scene grid
107+
scene.constructNode('Instance', {
108+
geometryNode: scene.constructNode('Grid', {
109+
size_x: 140.0,
110+
size_z: 140.0,
111+
sections_x: 20,
112+
sections_z: 20
113+
}),
114+
materialNode: scene.constructNode('FlatMaterial', {
115+
color: new FABRIC.RT.rgb(0.3,0.3,0.3,1.0)
116+
} )
117+
});
118+
103119
var cube = scene.constructNode('Cuboid', {
104120
length: 15,
105121
width: 15,
@@ -123,14 +139,16 @@
123139
} );
124140
linearPosKeyframeTrackNode.setTrackCount(2);
125141
var key = FABRIC.Animation.linearKeyframe;
126-
linearPosKeyframeTrackNode.setTrackData(1, { name: 'PosX',
127-
color: FABRIC.RT.rgb(1, 0, 0),
128-
keys: [key(0, 0), key(10, 20), key(20, -5), key(50, -5), key(75, 50), key(100, 0)]
129-
});
130-
linearPosKeyframeTrackNode.setTrackData(0, { name: 'PosY',
131-
color: FABRIC.RT.rgb(1, 0, 0),
132-
keys: [key(0, 0), key(50, 0), key(75, 20), key(100, 0)]
133-
});
142+
linearPosKeyframeTrackNode.setTrackData(1, {
143+
name: 'PosX',
144+
color: FABRIC.RT.rgb(1, 0, 0),
145+
keys: [key(0, 0), key(10, 20), key(20, -5), key(50, -5), key(75, 50), key(100, 0)]
146+
});
147+
linearPosKeyframeTrackNode.setTrackData(0, {
148+
name: 'PosY',
149+
color: FABRIC.RT.rgb(1, 0, 0),
150+
keys: [key(0, 0), key(50, 0), key(75, 20), key(100, 0)]
151+
});
134152

135153
var linearAnimationEvaluatorNode = scene.constructNode('AnimationEvaluator', {
136154
name:'LinearPosAnimationEvaluator' ,
@@ -160,26 +178,28 @@
160178
} );
161179
bezierPosKeyframeTrackNode.setTrackCount(2);
162180
var key = FABRIC.Animation.bezierKeyframe;
163-
bezierPosKeyframeTrackNode.setTrackData(0, { name: 'PosX',
164-
color: FABRIC.RT.rgb(1, 0, 0),
165-
keys: [
166-
key(0, -20, null, new FABRIC.RT.Vec2(3, 0)),
167-
key(10, 0, new FABRIC.RT.Vec2(-3, 0), new FABRIC.RT.Vec2(3, 0)),
168-
key(20, 20, new FABRIC.RT.Vec2(-3, 0), new FABRIC.RT.Vec2(10, 0)),
169-
key(50, 0, new FABRIC.RT.Vec2(-10, 0), new FABRIC.RT.Vec2(7, 0)),
170-
key(75, -20, new FABRIC.RT.Vec2(-7, 0), null)
171-
]
172-
});
173-
bezierPosKeyframeTrackNode.setTrackData(1, { name: 'PosY',
174-
color: FABRIC.RT.rgb(1, 0, 0),
175-
keys: [
176-
key(0, 0, null, new FABRIC.RT.Vec2(3, 0)),
177-
key(10, 20, new FABRIC.RT.Vec2(-3, 0), new FABRIC.RT.Vec2(3, 0)),
178-
key(20, 0, new FABRIC.RT.Vec2(-3, 0), new FABRIC.RT.Vec2(10, 0)),
179-
key(50, -20, new FABRIC.RT.Vec2(-10, 0), new FABRIC.RT.Vec2(7, 0)),
180-
key(75, 0, new FABRIC.RT.Vec2(-7, 0), null)
181-
]
182-
});
181+
bezierPosKeyframeTrackNode.setTrackData(0, {
182+
name: 'PosX',
183+
color: FABRIC.RT.rgb(1, 0, 0),
184+
keys: [
185+
key(0, -20, null, new FABRIC.RT.Vec2(3, 0)),
186+
key(10, 0, new FABRIC.RT.Vec2(-3, 0), new FABRIC.RT.Vec2(3, 0)),
187+
key(20, 20, new FABRIC.RT.Vec2(-3, 0), new FABRIC.RT.Vec2(10, 0)),
188+
key(50, 0, new FABRIC.RT.Vec2(-10, 0), new FABRIC.RT.Vec2(7, 0)),
189+
key(75, -20, new FABRIC.RT.Vec2(-7, 0), null)
190+
]
191+
});
192+
bezierPosKeyframeTrackNode.setTrackData(1, {
193+
name: 'PosY',
194+
color: FABRIC.RT.rgb(1, 0, 0),
195+
keys: [
196+
key(0, 0, null, new FABRIC.RT.Vec2(3, 0)),
197+
key(10, 20, new FABRIC.RT.Vec2(-3, 0), new FABRIC.RT.Vec2(3, 0)),
198+
key(20, 0, new FABRIC.RT.Vec2(-3, 0), new FABRIC.RT.Vec2(10, 0)),
199+
key(50, -20, new FABRIC.RT.Vec2(-10, 0), new FABRIC.RT.Vec2(7, 0)),
200+
key(75, 0, new FABRIC.RT.Vec2(-7, 0), null)
201+
]
202+
});
183203

184204
var bezierAnimationEvaluatorNode = scene.constructNode('AnimationEvaluator', {
185205
name:'BezierPosKeyAnimationTrack' ,
@@ -209,25 +229,27 @@
209229
} );
210230
bezierEulerKeyframeTrackNode.setTrackCount(2);
211231
var key = FABRIC.Animation.bezierKeyframe;
212-
bezierEulerKeyframeTrackNode.setTrackData(0, { name: 'EulerX',
213-
color: FABRIC.RT.rgb(1, 0, 0),
214-
keys: [
215-
key(0, 0, null, new FABRIC.RT.Vec2(3, 0)),
216-
key(10, 0, new FABRIC.RT.Vec2(-3, 0), new FABRIC.RT.Vec2(3, 0)),
217-
key(20, 2, new FABRIC.RT.Vec2(-3, 0), new FABRIC.RT.Vec2(10, 0)),
218-
key(50, 2, new FABRIC.RT.Vec2(-10, 0), new FABRIC.RT.Vec2(7, 0)),
219-
key(75, 0, new FABRIC.RT.Vec2(-7, 0), null)
220-
]
221-
});
222-
bezierEulerKeyframeTrackNode.setTrackData(1, { name: 'EulerY',
223-
color: FABRIC.RT.rgb(0, 1, 0),
224-
keys: [
225-
key(0, 0, null, new FABRIC.RT.Vec2(3, 0)),
226-
key(20, 0, new FABRIC.RT.Vec2(-3, 0), new FABRIC.RT.Vec2(10, 0)),
227-
key(50, -2, new FABRIC.RT.Vec2(-10, 0), new FABRIC.RT.Vec2(7, 0)),
228-
key(75, 0, new FABRIC.RT.Vec2(-7, 0), null)
229-
]
230-
});
232+
bezierEulerKeyframeTrackNode.setTrackData(0, {
233+
name: 'EulerX',
234+
color: FABRIC.RT.rgb(1, 0, 0),
235+
keys: [
236+
key(0, 0, null, new FABRIC.RT.Vec2(3, 0)),
237+
key(10, 0, new FABRIC.RT.Vec2(-3, 0), new FABRIC.RT.Vec2(3, 0)),
238+
key(20, 2, new FABRIC.RT.Vec2(-3, 0), new FABRIC.RT.Vec2(10, 0)),
239+
key(50, 2, new FABRIC.RT.Vec2(-10, 0), new FABRIC.RT.Vec2(7, 0)),
240+
key(75, 0, new FABRIC.RT.Vec2(-7, 0), null)
241+
]
242+
});
243+
bezierEulerKeyframeTrackNode.setTrackData(1, {
244+
name: 'EulerY',
245+
color: FABRIC.RT.rgb(0, 1, 0),
246+
keys: [
247+
key(0, 0, null, new FABRIC.RT.Vec2(3, 0)),
248+
key(20, 0, new FABRIC.RT.Vec2(-3, 0), new FABRIC.RT.Vec2(10, 0)),
249+
key(50, -2, new FABRIC.RT.Vec2(-10, 0), new FABRIC.RT.Vec2(7, 0)),
250+
key(75, 0, new FABRIC.RT.Vec2(-7, 0), null)
251+
]
252+
});
231253

232254
var bezierAnimationEvaluatorNode = scene.constructNode('AnimationEvaluator', {
233255
name:'EulerBezierKeyAnimationTrack' ,

Apps/Sample/BasicDemos/Materials.html

Lines changed: 75 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@
7272

7373
// Create a camera to draw the scene from
7474
var camera = scene.constructNode('TargetCamera', {
75-
position: new FABRIC.RT.Vec3(40, 70, 100),
76-
target: new FABRIC.RT.Vec3(0, 0, 0)
77-
});
75+
position: new FABRIC.RT.Vec3(40, 70, 100),
76+
target: new FABRIC.RT.Vec3(0, 0, 0)
77+
});
7878

7979
scene.constructNode("CameraManipulator", { targetNode:camera } );
8080

@@ -85,108 +85,108 @@
8585

8686
// Flat Shader
8787
var flatMaterial = scene.constructNode('FlatMaterial', {
88-
color: FABRIC.RT.rgb(0.8, 0, 0, 1)
89-
});
88+
color: FABRIC.RT.rgb(0.8, 0, 0, 1)
89+
});
9090

9191
var inst = scene.constructNode('Instance', {
92-
transformNode: scene.constructNode('Transform', {
93-
hierarchical: false,
94-
globalXfo: new FABRIC.RT.Xfo({ tr: new FABRIC.RT.Vec3(-30, 0, 0) })
95-
}),
96-
geometryNode: sphere,
97-
materialNode: flatMaterial
98-
});
99-
92+
transformNode: scene.constructNode('Transform', {
93+
hierarchical: false,
94+
globalXfo: new FABRIC.RT.Xfo({ tr: new FABRIC.RT.Vec3(-30, 0, 0) })
95+
}),
96+
geometryNode: sphere,
97+
materialNode: flatMaterial
98+
});
99+
100100
inst.setMaterialNode( scene.constructNode('WireframeMaterial', {
101-
color: FABRIC.RT.rgb(0.8, 0.6, 0.6, 1)
102-
}) );
101+
color: FABRIC.RT.rgb(0.3, 0.3, 0.3, 1)
102+
}));
103103

104104
// Phong Shader
105105
var phongMaterial = scene.constructNode('PhongMaterial', {
106-
diffuseColor: FABRIC.RT.rgb(0.8, 0, 0, 1),
107-
lightNode: light
108-
});
106+
diffuseColor: FABRIC.RT.rgb(0.8, 0, 0, 1),
107+
lightNode: light
108+
});
109109

110110
scene.constructNode('Instance', {
111-
transformNode: scene.constructNode('Transform', {
112-
hierarchical: false,
113-
globalXfo: new FABRIC.RT.Xfo({ tr: new FABRIC.RT.Vec3(-10, 0, 0) })
114-
}),
115-
geometryNode: sphere,
116-
materialNode: phongMaterial
117-
});
111+
transformNode: scene.constructNode('Transform', {
112+
hierarchical: false,
113+
globalXfo: new FABRIC.RT.Xfo({ tr: new FABRIC.RT.Vec3(-10, 0, 0) })
114+
}),
115+
geometryNode: sphere,
116+
materialNode: phongMaterial
117+
});
118118

119119
// Flat Textured Shader
120120
var flatTexturedMaterial = scene.constructNode('FlatTextureMaterial', {
121-
textureNode: scene.constructNode('Image', { url: 'Resources/earth.png' })
122-
});
121+
textureNode: scene.constructNode('Image', { url: 'Resources/earth.png' })
122+
});
123123
scene.constructNode('Instance', {
124-
transformNode: scene.constructNode('Transform', {
125-
hierarchical: false,
126-
globalXfo: new FABRIC.RT.Xfo({ tr: new FABRIC.RT.Vec3(10, 0, 0) })
127-
}),
128-
geometryNode: sphere,
129-
materialNode: flatTexturedMaterial
130-
});
124+
transformNode: scene.constructNode('Transform', {
125+
hierarchical: false,
126+
globalXfo: new FABRIC.RT.Xfo({ tr: new FABRIC.RT.Vec3(10, 0, 0) })
127+
}),
128+
geometryNode: sphere,
129+
materialNode: flatTexturedMaterial
130+
});
131131

132132
// Normal Mapped Shader
133133
var phongBumpReflectMaterial = scene.constructNode('PhongBumpReflectMaterial', {
134-
diffuseTextureNode: scene.constructNode('Image', { url: 'Resources/brick_d.png' }),
135-
specularTextureNode: scene.constructNode('Image', { url: 'Resources/brick_s.png' }),
136-
normalTextureNode: scene.constructNode('Image', { url: 'Resources/brick_n.png' }),
137-
lightNode: light
138-
});
134+
diffuseTextureNode: scene.constructNode('Image', { url: 'Resources/brick_d.png' }),
135+
specularTextureNode: scene.constructNode('Image', { url: 'Resources/brick_s.png' }),
136+
normalTextureNode: scene.constructNode('Image', { url: 'Resources/brick_n.png' }),
137+
lightNode: light
138+
});
139139

140140
scene.constructNode('Instance', {
141-
transformNode: scene.constructNode('Transform', {
142-
hierarchical: false,
143-
globalXfo: new FABRIC.RT.Xfo({ tr: new FABRIC.RT.Vec3(30, 0, 0) })
144-
}),
145-
geometryNode: sphere,
146-
materialNode: phongBumpReflectMaterial
147-
});
141+
transformNode: scene.constructNode('Transform', {
142+
hierarchical: false,
143+
globalXfo: new FABRIC.RT.Xfo({ tr: new FABRIC.RT.Vec3(30, 0, 0) })
144+
}),
145+
geometryNode: sphere,
146+
materialNode: phongBumpReflectMaterial
147+
});
148148

149149
// Normal Geometry Shader
150150
// The Normal Material uses geometry shaders to generate
151151
// lines from the polygon mesh. This material will not render
152152
// on machines that do not support geometry shaders.
153153
scene.constructNode('Instance', {
154-
transformNode: scene.constructNode('Transform', {
155-
hierarchical: false,
156-
globalXfo: new FABRIC.RT.Xfo({ tr: new FABRIC.RT.Vec3(30, 0, 0) })
157-
}),
158-
geometryNode: sphere,
159-
materialNode: scene.constructNode('NormalMaterial', {
160-
color: FABRIC.RT.rgb(0.8, .8, 0.8, 1)
161-
})
162-
});
154+
transformNode: scene.constructNode('Transform', {
155+
hierarchical: false,
156+
globalXfo: new FABRIC.RT.Xfo({ tr: new FABRIC.RT.Vec3(30, 0, 0) })
157+
}),
158+
geometryNode: sphere,
159+
materialNode: scene.constructNode('NormalMaterial', {
160+
color: FABRIC.RT.rgb(0.3, .3, 0.3, 1)
161+
})
162+
});
163163

164164
// Transparency Shader
165165
var cubeTextureMap = scene.constructNode('CubeMap', {
166-
urls: [
167-
'Resources/cubemap_opensea/opensea_positive_x.png',
168-
'Resources/cubemap_opensea/opensea_negative_x.png',
169-
'Resources/cubemap_opensea/opensea_positive_y.png',
170-
'Resources/cubemap_opensea/opensea_negative_y.png',
171-
'Resources/cubemap_opensea/opensea_positive_z.png',
172-
'Resources/cubemap_opensea/opensea_negative_z.png'
173-
]
174-
});
166+
urls: [
167+
'Resources/cubemap_opensea/opensea_positive_x.png',
168+
'Resources/cubemap_opensea/opensea_negative_x.png',
169+
'Resources/cubemap_opensea/opensea_positive_y.png',
170+
'Resources/cubemap_opensea/opensea_negative_y.png',
171+
'Resources/cubemap_opensea/opensea_positive_z.png',
172+
'Resources/cubemap_opensea/opensea_negative_z.png'
173+
]
174+
});
175175

176176
var transparentMaterial = scene.constructNode('GlassMaterial', {
177-
diffuseColor: FABRIC.RT.rgba(0.0, 0.75, 1, 0.25),
178-
cubeMapTextureNode: cubeTextureMap,
179-
lightNode: light
180-
});
177+
diffuseColor: FABRIC.RT.rgba(0.0, 0.75, 1, 0.25),
178+
cubeMapTextureNode: cubeTextureMap,
179+
lightNode: light
180+
});
181181

182182
scene.constructNode('Instance', {
183-
transformNode: scene.constructNode('Transform', {
184-
hierarchical: false,
185-
globalXfo: new FABRIC.RT.Xfo({ tr: new FABRIC.RT.Vec3(50, 0, 0) })
186-
}),
187-
geometryNode: sphere,
188-
materialNode: transparentMaterial
189-
});
183+
transformNode: scene.constructNode('Transform', {
184+
hierarchical: false,
185+
globalXfo: new FABRIC.RT.Xfo({ tr: new FABRIC.RT.Vec3(50, 0, 0) })
186+
}),
187+
geometryNode: sphere,
188+
materialNode: transparentMaterial
189+
});
190190

191191

192192
$('#loadingDialog').dialog({

Apps/Sample/BasicDemos/MouseEvents.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@
8787
];
8888

8989
var outlineMaterial = scene.constructNode('OutlineShader', {
90-
color: FABRIC.RT.rgb(0.8, 0.8, 0.8, 1),
91-
thickness: 0.3
90+
color: FABRIC.RT.rgb(0.0, 0.0, 0.0, 1),
91+
thickness: 0.4
9292
})
9393

9494

0 commit comments

Comments
 (0)