Skip to content

Commit 2f70ffe

Browse files
committed
move scripts to bottom
1 parent 2c0d1ec commit 2f70ffe

File tree

98 files changed

+1007
-1005
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+1007
-1005
lines changed

webgl/frustum-diagram.html

+18-18
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,24 @@
1414
background-color: rgba(255, 255, 255, 0.6) !important;
1515
}
1616
</style>
17+
</head>
18+
<body>
19+
<div class="description">
20+
Drag sliders to change the frustum.
21+
</div>
22+
<div style="position:absolute;">
23+
<canvas id="canvas" width="400" height="600" style="width: 400px; height: 600px"></canvas>
24+
<img src="resources/eye-icon.png" style="position: absolute; z-index:2; left: 10px; top: 275px; width: 32px; height: auto;"/>
25+
</div>
26+
<div id="uiContainerLeft">
27+
<div id="ui">
28+
<div id="fieldOfView"></div>
29+
<div id="zNear"></div>
30+
<div id="zFar"></div>
31+
<div id="zPosition"></div>
32+
</div>
33+
</div>
34+
</body>
1735
<script src="resources/webgl-utils.js"></script>
1836
<script src="resources/jquery-1.7.1.min.js"></script>
1937
<script src="resources/jquery-ui-1.8.16.custom.min.js"></script>
@@ -470,24 +488,6 @@
470488
gl_FragColor = v_color * u_color * blendColor;
471489
}
472490
</script>
473-
</head>
474-
<body>
475-
<div class="description">
476-
Drag sliders to change the frustum.
477-
</div>
478-
<div style="position:absolute;">
479-
<canvas id="canvas" width="400" height="600" style="width: 400px; height: 600px"></canvas>
480-
<img src="resources/eye-icon.png" style="position: absolute; z-index:2; left: 10px; top: 275px; width: 32px; height: auto;"/>
481-
</div>
482-
<div id="uiContainerLeft">
483-
<div id="ui">
484-
<div id="fieldOfView"></div>
485-
<div id="zNear"></div>
486-
<div id="zFar"></div>
487-
<div id="zPosition"></div>
488-
</div>
489-
</div>
490-
</body>
491491
</html>
492492

493493

webgl/resources/webgl-utils.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,13 @@
2828
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2929
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3030
*/
31-
"use strict";
3231

3332
(function (root, factory) {
3433
if (typeof define === 'function' && define.amd) {
3534
// AMD. Register as an anonymous module.
36-
define([], factory);
35+
define([], function() {
36+
return factory.call(root);
37+
});
3738
} else {
3839
// Browser globals
3940
var lib = factory.call(root);
@@ -42,7 +43,7 @@
4243
});
4344
}
4445
}(this, function () {
45-
46+
"use strict";
4647
var topWindow = this;
4748

4849
/** @module webgl-utils */

webgl/unit-circle.html

+7-7
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@
1111
width: 200px;
1212
}
1313
</style>
14+
</head>
15+
<body>
16+
<div class="description">
17+
Drag Circle
18+
</div>
19+
<div id="example"></div>
20+
</body>
1421
<script src="resources/jquery-1.7.1.min.js"></script>
1522
<script src="resources/jquery-ui-1.8.16.custom.min.js"></script>
1623
<script src="resources/jquery.mousecapture.js"></script>
@@ -29,13 +36,6 @@
2936
});
3037
});
3138
</script>
32-
</head>
33-
<body>
34-
<div class="description">
35-
Drag Circle
36-
</div>
37-
<div id="example"></div>
38-
</body>
3939
</html>
4040

4141

webgl/webgl-10x15-canvas-400x300-css.html

+7-7
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@
1414
background-color: rgba(255, 255, 255, 0.6) !important;
1515
}
1616
</style>
17+
</head>
18+
<body>
19+
<div class="description">
20+
A 10x15 canvas displayed 400x300 pixels
21+
</div>
22+
<canvas id="canvas" width="10" height="15" style="width: 400px; height: 300px;"></canvas>
23+
</body>
1724
<script src="resources/jquery-1.7.1.min.js"></script>
1825
<script src="resources/jquery-ui-1.8.16.custom.min.js"></script>
1926
<script src="resources/jquery.gman.ui.js"></script>
@@ -119,13 +126,6 @@
119126
gl_FragColor = u_color;
120127
}
121128
</script>
122-
</head>
123-
<body>
124-
<div class="description">
125-
A 10x15 canvas displayed 400x300 pixels
126-
</div>
127-
<canvas id="canvas" width="10" height="15" style="width: 400px; height: 300px;"></canvas>
128-
</body>
129129
</html>
130130

131131

webgl/webgl-2-textures.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
<meta charset="utf-8">
66
<title>WebGL - 2 Textures</title>
77
<link type="text/css" href="resources/webgl-tutorials.css" rel="stylesheet" />
8+
</head>
9+
<body>
10+
<canvas id="canvas" width="400" height="300"></canvas>
11+
</body>
812
<script src="resources/webgl-utils.js"></script>
913
<script>
1014
"use strict";
@@ -187,10 +191,6 @@
187191
gl_FragColor = color0 * color1;
188192
}
189193
</script>
190-
</head>
191-
<body>
192-
<canvas id="canvas" width="400" height="300"></canvas>
193-
</body>
194194
</html>
195195

196196

webgl/webgl-2d-drawimage-01.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
background-color: rgba(255, 255, 255, 0.6) !important;
1515
}
1616
</style>
17+
</head>
18+
<body>
19+
<canvas id="canvas" width="400" height="300"></canvas>
20+
</body>
1721
<script src="resources/jquery-1.7.1.min.js"></script>
1822
<script src="resources/jquery-ui-1.8.16.custom.min.js"></script>
1923
<script src="resources/jquery.gman.ui.js"></script>
@@ -343,10 +347,6 @@
343347
gl_FragColor = texture2D(texture, v_texcoord);
344348
}
345349
</script>
346-
</head>
347-
<body>
348-
<canvas id="canvas" width="400" height="300"></canvas>
349-
</body>
350350
</html>
351351

352352

webgl/webgl-2d-drawimage-02.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
background-color: rgba(255, 255, 255, 0.6) !important;
1515
}
1616
</style>
17+
</head>
18+
<body>
19+
<canvas id="canvas" width="400" height="300"></canvas>
20+
</body>
1721
<script src="resources/jquery-1.7.1.min.js"></script>
1822
<script src="resources/jquery-ui-1.8.16.custom.min.js"></script>
1923
<script src="resources/jquery.gman.ui.js"></script>
@@ -357,10 +361,6 @@
357361
gl_FragColor = texture2D(texture, v_texcoord);
358362
}
359363
</script>
360-
</head>
361-
<body>
362-
<canvas id="canvas" width="400" height="300"></canvas>
363-
</body>
364364
</html>
365365

366366

webgl/webgl-2d-drawimage-03.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
background-color: rgba(255, 255, 255, 0.6) !important;
1515
}
1616
</style>
17+
</head>
18+
<body>
19+
<canvas id="canvas" width="400" height="300"></canvas>
20+
</body>
1721
<script src="resources/jquery-1.7.1.min.js"></script>
1822
<script src="resources/jquery-ui-1.8.16.custom.min.js"></script>
1923
<script src="resources/jquery.gman.ui.js"></script>
@@ -396,10 +400,6 @@
396400
gl_FragColor = texture2D(texture, v_texcoord);
397401
}
398402
</script>
399-
</head>
400-
<body>
401-
<canvas id="canvas" width="400" height="300"></canvas>
402-
</body>
403403
</html>
404404

405405

webgl/webgl-2d-drawimage-04.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
background-color: rgba(255, 255, 255, 0.6) !important;
1515
}
1616
</style>
17+
</head>
18+
<body>
19+
<canvas id="canvas" width="400" height="300"></canvas>
20+
</body>
1721
<script src="resources/jquery-1.7.1.min.js"></script>
1822
<script src="resources/jquery-ui-1.8.16.custom.min.js"></script>
1923
<script src="resources/jquery.gman.ui.js"></script>
@@ -408,10 +412,6 @@
408412
gl_FragColor = texture2D(texture, v_texcoord);
409413
}
410414
</script>
411-
</head>
412-
<body>
413-
<canvas id="canvas" width="400" height="300"></canvas>
414-
</body>
415415
</html>
416416

417417

webgl/webgl-2d-drawimage-05.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
background-color: rgba(255, 255, 255, 0.6) !important;
1515
}
1616
</style>
17+
</head>
18+
<body>
19+
<canvas id="canvas" width="400" height="300"></canvas>
20+
</body>
1721
<script src="resources/jquery-1.7.1.min.js"></script>
1822
<script src="resources/jquery-ui-1.8.16.custom.min.js"></script>
1923
<script src="resources/jquery.gman.ui.js"></script>
@@ -435,10 +439,6 @@
435439
gl_FragColor = texture2D(texture, v_texcoord);
436440
}
437441
</script>
438-
</head>
439-
<body>
440-
<canvas id="canvas" width="400" height="300"></canvas>
441-
</body>
442442
</html>
443443

444444

webgl/webgl-2d-drawimage-06.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
background-color: rgba(255, 255, 255, 0.6) !important;
1515
}
1616
</style>
17+
</head>
18+
<body>
19+
<canvas id="canvas" width="400" height="300"></canvas>
20+
</body>
1721
<script src="resources/jquery-1.7.1.min.js"></script>
1822
<script src="resources/jquery-ui-1.8.16.custom.min.js"></script>
1923
<script src="resources/jquery.gman.ui.js"></script>
@@ -441,10 +445,6 @@
441445
gl_FragColor = texture2D(texture, v_texcoord);
442446
}
443447
</script>
444-
</head>
445-
<body>
446-
<canvas id="canvas" width="400" height="300"></canvas>
447-
</body>
448448
</html>
449449

450450

webgl/webgl-2d-drawimage-07.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
background-color: rgba(255, 255, 255, 0.6) !important;
1515
}
1616
</style>
17+
</head>
18+
<body>
19+
<canvas id="canvas" width="400" height="300"></canvas>
20+
</body>
1721
<script src="resources/jquery-1.7.1.min.js"></script>
1822
<script src="resources/jquery-ui-1.8.16.custom.min.js"></script>
1923
<script src="resources/jquery.gman.ui.js"></script>
@@ -442,10 +446,6 @@
442446
gl_FragColor = texture2D(texture, v_texcoord);
443447
}
444448
</script>
445-
</head>
446-
<body>
447-
<canvas id="canvas" width="400" height="300"></canvas>
448-
</body>
449449
</html>
450450

451451

webgl/webgl-2d-drawimage-08.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
background-color: rgba(255, 255, 255, 0.6) !important;
1515
}
1616
</style>
17+
</head>
18+
<body>
19+
<canvas id="canvas" width="400" height="300"></canvas>
20+
</body>
1721
<script src="resources/jquery-1.7.1.min.js"></script>
1822
<script src="resources/jquery-ui-1.8.16.custom.min.js"></script>
1923
<script src="resources/jquery.gman.ui.js"></script>
@@ -423,10 +427,6 @@
423427
gl_FragColor = texture2D(texture, v_texcoord);
424428
}
425429
</script>
426-
</head>
427-
<body>
428-
<canvas id="canvas" width="400" height="300"></canvas>
429-
</body>
430430
</html>
431431

432432

webgl/webgl-2d-geometry-matrix-transform-center-f.html

+16-16
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,22 @@
1414
background-color: rgba(255, 255, 255, 0.6) !important;
1515
}
1616
</style>
17+
</head>
18+
<body>
19+
<div class="description">
20+
Drag sliders to translate, rotate, and scale.
21+
</div>
22+
<canvas id="canvas" width="400" height="300"></canvas>
23+
<div id="uiContainer">
24+
<div id="ui">
25+
<div id="x"></div>
26+
<div id="y"></div>
27+
<div id="angle"></div>
28+
<div id="scaleX"></div>
29+
<div id="scaleY"></div>
30+
</div>
31+
</div>
32+
</body>
1733
<script src="resources/jquery-1.7.1.min.js"></script>
1834
<script src="resources/jquery-ui-1.8.16.custom.min.js"></script>
1935
<script src="resources/jquery.gman.ui.js"></script>
@@ -238,22 +254,6 @@
238254
gl_FragColor = u_color;
239255
}
240256
</script>
241-
</head>
242-
<body>
243-
<div class="description">
244-
Drag sliders to translate, rotate, and scale.
245-
</div>
246-
<canvas id="canvas" width="400" height="300"></canvas>
247-
<div id="uiContainer">
248-
<div id="ui">
249-
<div id="x"></div>
250-
<div id="y"></div>
251-
<div id="angle"></div>
252-
<div id="scaleX"></div>
253-
<div id="scaleY"></div>
254-
</div>
255-
</div>
256-
</body>
257257
</html>
258258

259259

0 commit comments

Comments
 (0)