forked from xeolabs/scenejs
/
examples.html
195 lines (181 loc) · 8.04 KB
/
examples.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/html" xmlns="http://www.w3.org/1999/html">
<head>
<title>SceneJS Examples</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<script src="lib/jquery-1.8.3.min.js"></script>
</head>
<body>
<style>
html, body {
height: 100%;
}
body {
margin: 0px;
overflow: hidden;
}
</style>
<script>
var legacyIDs = {
"configuration_pluginPath": "configs_pluginPath",
"configuration_disableStatusPopups": "configs_disableStatusPopups",
"firstExample": "scenegraph_firstExample",
"scenegraph_nodes_moving": "scenegraph_nodes_moving",
"canvas_transparent": "canvas_transparent",
"canvas_external_transparent": "canvas_external_transparent",
"backfaceLightingFlag": "scenegraph_flags_backfaceLighting",
"diffuseFlag": "scenegraph_flags_diffuse",
"specularFlag": "scenegraph_flags_specular",
"ambientFlag": "scenegraph_flags_ambient",
"reflectionFlag": "scenegraph_flags_reflection",
"flagsToggleBackfaces": "scenegraph_flags_backfaces",
"basicTransparency": "scenegraph_flags_transparent",
"transparencySorting": "layers_transparencySort",
"enableDisableLayers": "layers_enableDisable",
"styleLineWidth": "styles_lineWidth",
"depthbufEnableDisable": "depthBuf_enableDisable",
"depthbufClearDepth": "depthBuf_clearDepth",
"depthbufDepthFunc": "depthBuf_depthFunc",
"customTriangles": "geometry_triangles",
"customLines": "geometry_lines",
"customVertexColors": "geometry_vertexColors",
"customTrianglesTypedArrays": "geometry_typedArrays",
"autoNormals": "geometry_autoNormals",
"geometryMorphing": "geometry_morphTargets",
"geometryMorphingTypedArrays": "geometry_morphTargets_typedArrays",
"planePrim": "geometry_plane",
"boxPrim": "geometry_box",
"spherePrim": "geometry_sphere",
"torusPrim": "geometry_torus",
"teapotPrim": "geometry_teapot",
"vectorText": "geometry_vectorText",
"colorMap": "texture_color",
"videoColorMap": "texture_video_color",
"bumpMap": "texture_bump",
"videoBumpMap": "texture_video_bump",
"alphaMap": "texture_alpha",
"videoAlphaMap": "texture_video_alpha",
"specularMap": "texture_specular",
"videoSpecularMap": "texture_video_specular",
"glowMap": "texture_emit",
"videoGlowMap": "texture_video_emit",
"colorMapAnimation": "texture_color_animated",
"multitexturing": "texture_multiTexture",
"uvLayers": "texture_uvLayers",
"colorMapAnimation2": "texture_animation",
"cubeMap": "reflections_custom",
"reflectionIntensity": "reflections_intensity",
"reflectionWithVaryingSpecularity": "reflections_withSpecularMaterial",
"reflectionWithControlMap": "reflections_withSpecularMap",
"reflectionWithLayers": "reflections_multipleCombined",
"reflectionWithOBJImport": "reflections_shinyRaptor",
"reflectionMultipleObjects": "reflections_manyObjects",
"defaultLightAndMaterial": "lighting_defaults",
"ambientLight": "lighting_ambient",
"directionalWorldLight": "lighting_directional_world",
"pointWorldLight": "lighting_point_world",
"perspectiveProjection": "transforms_projection_perspective",
"orthoProjection": "transforms_projection_ortho",
"frustumProjection": "transforms_projection_frustum",
"viewTransform": "transforms_viewing",
"rotateTransform": "transforms_modelling_rotate",
"translateTransform": "transforms_modelling_translate",
"scaleTransform": "transforms_modelling_scale",
"matrixTransform": "transforms_modelling_matrix",
"transformHierarchy": "transforms_modelling_hierarchy",
"vertexDisplaceShader": "shaders_vertexDisplacement",
"xrayShader": "shaders_xray",
"crtShader": "shaders_scanline",
"customNodesWobble": "shaders_vertexDisplacement",
"pluginsXRay": "shaders_xray",
"customNodesCRT": "postprocessing_scanlines",
"customNodesFog": "shaders_fog",
"customNodesCameraOrbit": "cameras_orbit",
"cameraPickFlyOrbit": "cameras_pickFlyOrbit_city",
"cameraPickFlyOrbitTerrain": "cameras_pickFlyOrbit_terrain",
"picking": "picking_basic",
"disablePicking": "picking_disabling",
"pickThroughTransparentObject": "picking_throughTransparency",
"namePaths": "picking_names",
"rayPicking": "picking_rayPicking",
"canvasCapture": "canvas_capture",
"importObj": "importing_obj_raptor",
"importDuckObj": "importing_obj_duck",
"import3ds": "importing_3ds_lexus",
"importMd2": "importing_md2_lion",
"physicsBouncingSpheres": "physics_balls",
"physicsBouncingSpheresMultiSystems": "physics_multithreaded",
"physicsBouncingBoxes": "physics_boxes",
"vertexSharing": "optimization_vertexSharing",
"textureAtlas": "optimization_textureAtlas",
"sharedNodeCores": "optimization_instancing",
"frustumVisibilityCulling": "optimization_frustumClipping",
"frustumDetailCulling": "optimization_discreteLOD",
"basicCustomNodeDef": "extending_nodes_custom",
"anotherCustomNodeDef": "extending_nodes_custom",
"animatedCustomNodeDef": "extending_nodes_custom_animation",
"customNodeDefWithTasks": "extending_nodes_custom_tasks",
"customNodeDefWithPublications": "extending_nodes_custom_pubSub",
"gradientBackground": "models_backgrounds_gradient",
"customSkybox": "skyboxes_custom",
"cloudsSkybox": "skyboxes_clouds",
"cloudySeaSkybox": "skyboxes_cloudySea",
"grimmNightSkyBox": "skyboxes_grimmNight",
"interstellarCloudsSkyBox": "skyboxes_interstellarClouds",
"miramarCloudsSkyBox": "skyboxes_miramarClouds",
"stormyDaysCloudsSkyBox": "skyboxes_stormyDays",
"violentDaysCloudsSkyBox": "skyboxes_violentDays",
"customHeightmap": "geometry_heightmap",
"texturedHeightmap": "geometry_heightmap_texture",
"customNodesEarth": "models_space_earth",
"customNodesTank": "models_vehicles_tank",
"webglContextLost": "scenegraph_webglContextRecovery",
"secondExample": "scenegraph_secondExample",
"tronTank": "showcase_tank",
"city": "models_buildings_city",
"funTerrain": "geometry_heightmap",
"earth": "models_space_earth",
"ghostTrees": "models_plants_ghostTree",
"bubbles": "scenegraph_webglContextRecovery"
};
var testLinks = false;
if (testLinks) {
for (var key in legacyIDs) {
if (legacyIDs.hasOwnProperty(key)) {
var button = document.createElement('div');
button.id = 'button';
button.textContent = legacyIDs[key];
button.addEventListener('click', (function () {
var id = legacyIDs[key];
return function (event) {
window.location = "examples/index.html#" + id;
};
})(), false);
document.body.appendChild(button);
}
}
} else {
var examplesPage = "examples/index.html";
var page = gup("page");
if (page) {
var path = legacyIDs[page];
if (path) {
examplesPage += "#" + path
}
}
window.location = examplesPage;
function gup(name) {
name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
var regexS = "[\\?&]" + name + "=([^&#]*)";
var regex = new RegExp(regexS);
var results = regex.exec(window.location.href);
if (results == null)
return null;
else
return results[1];
}
}
</script>
</body>
</html>