diff --git a/.gitignore b/.gitignore index ee1aa36eb..f04d243ba 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ node_modules out package-lock.json +webglfundamentals.check.json diff --git a/README.md b/README.md index 2b6ea14c3..14dddae2c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ WebGL Fundamentals =================== -This is [a series of lessons or tutorials about WebGL](http://webglfundamentals.org/). +This is [a series of lessons or tutorials about WebGL](https://webglfundamentals.org/). Unlike most WebGL lessons these are not based off of OpenGL. OpenGL is 20 years old. The lessons of OpenGL don't match well with WebGL. @@ -60,10 +60,10 @@ Current fields are description: 'Learn WebGL from the ground up. No magic', // Link to the language root. - link: 'http://webglfundamentals.org/webgl/lessons/ja', // replace `ja` with country code + link: 'https://webglfundamentals.org/webgl/lessons/ja', // replace `ja` with country code // html that appears after the article and before the comments - commentSectionHeader: '
Questions? Ask on stackoverflow.
\n
Issue/Bug? Create an issue on github.
', + commentSectionHeader: '
Questions? Ask on stackoverflow.
\n
Issue/Bug? Create an issue on github.
', // markdown that appears for untranslated articles missing: "Sorry this article has not been translated yet. [Translations Welcome](https://github.com/gfxfundamentals/webgl-fundamentals)! 😄\n\n[Here's the original English article for now]({{{origLink}}}).", @@ -159,7 +159,7 @@ Which means you can localize the labels like this For testing reference the sample directly in your browser. For example -[`http://localhost:8080/webgl/lessons/resources/directional-lighting.html?lightDir=光線方向&surface1=オブジェクト&surface2=表面方向&dot=dot(光線反対方向,表面方向)%20%3D%20&ui-rotation=角度`](http://webglfundamentals.org/webgl/lessons/resources/directional-lighting.html?lightDir=光線方向&surface1=オブジェクト&surface2=表面方向&dot=dot(光線反対方向,表面方向)%20%3D%20&ui-rotation=角度) +[`http://localhost:8080/webgl/lessons/resources/directional-lighting.html?lightDir=光線方向&surface1=オブジェクト&surface2=表面方向&dot=dot(光線反対方向,表面方向)%20%3D%20&ui-rotation=角度`](https://webglfundamentals.org/webgl/lessons/resources/directional-lighting.html?lightDir=光線方向&surface1=オブジェクト&surface2=表面方向&dot=dot(光線反対方向,表面方向)%20%3D%20&ui-rotation=角度) ### To build diff --git a/contributors.md b/contributors.md index f7f0f9f06..92820435d 100644 --- a/contributors.md +++ b/contributors.md @@ -3,6 +3,6 @@ WebGLFundamentals.org Contributors WebGLFundamentals is brought to you by: -* Gregg (Greggman) Tavares [games.greggman.com](http://games.greggman.com) +* Gregg (Greggman) Tavares [games.greggman.com](https://games.greggman.com) diff --git a/docs.md b/docs.md index 0a55c46f0..572795fde 100644 --- a/docs.md +++ b/docs.md @@ -2,7 +2,7 @@ WebGLFundamentals API Docs ========================== These docs are an attempt to help explain some of the helper functions -used in the articles on [webglfundamentals.org](http://webglfundamentals.org). +used in the articles on [webglfundamentals.org](https://webglfundamentals.org). WebGL is a very low-level API and so using it is very verbose. To draw a simple lighted cube can easily require 50-100 WebGL calls. Calls to create buffers @@ -29,7 +29,7 @@ for common shapes like spheres, cubes, planes, cones, etc can be found here](/do #JSDoc3 Plea -These docs are generated with [JSDoc3](http://usejsdoc.org/). I find them very confusing to look at +These docs are generated with [JSDoc3](https://usejsdoc.org/). I find them very confusing to look at and in some places frustratingly verbose. If you have any experience with JSDoc3 and know how to make the docs more approachable and useful please [submit a pull request](https://github.com/gfxfundamentals/webgl-fundamentals) or [file an issue with details](https://github.com/gfxfundamentals/webgl-fundamentals/issues). diff --git a/robots.txt b/robots.txt index d2575ff8e..e690c32aa 100644 --- a/robots.txt +++ b/robots.txt @@ -1,3 +1,3 @@ -Sitemap: http://webglfundamentals.org/sitemap.xml +Sitemap: https://webglfundamentals.org/sitemap.xml diff --git a/webgl/frustum-diagram.html b/webgl/frustum-diagram.html index 2bf0a28f4..c91ec2b54 100644 --- a/webgl/frustum-diagram.html +++ b/webgl/frustum-diagram.html @@ -80,8 +80,8 @@ diff --git a/webgl/glyph-texture-atlas-maker.html b/webgl/glyph-texture-atlas-maker.html index be6c699f0..577825478 100644 --- a/webgl/glyph-texture-atlas-maker.html +++ b/webgl/glyph-texture-atlas-maker.html @@ -19,8 +19,8 @@ diff --git a/webgl/lessons/fr/langinfo.hanson b/webgl/lessons/fr/langinfo.hanson index d14f72864..a02a46382 100644 --- a/webgl/lessons/fr/langinfo.hanson +++ b/webgl/lessons/fr/langinfo.hanson @@ -4,8 +4,8 @@ defaultExampleCaption: "Cliquer ici pour ouvrir dans une nouvelle fenêtre", title: 'WebGL - Les bases', description: 'Les bases de WebGL. Sans magie.', - link: 'http://webglfundamentals.org/webgl/lessons/fr', - commentSectionHeader: '
Une question ? Demander sur stackoverflow.
\n
Un problème ? Signaler sur github.
', + link: 'https://webglfundamentals.org/webgl/lessons/fr', + commentSectionHeader: '
Une question ? Demander sur stackoverflow.
\n
Un problème ? Signaler sur github.
', missing: "Sorry this article has not been translated yet. [Translations Welcome](https://github.com/gfxfundamentals/webgl-fundamentals)! 😄\n\n[Here's the original English article for now]({{{origLink}}}).", toc: 'Table des Matières', categoryMapping: { diff --git a/webgl/lessons/fr/toc.html b/webgl/lessons/fr/toc.html index fe420aca8..6cde6e321 100644 --- a/webgl/lessons/fr/toc.html +++ b/webgl/lessons/fr/toc.html @@ -1,6 +1,6 @@ {{{tocHtml}}} \ No newline at end of file diff --git a/webgl/lessons/fr/webgl-3d-perspective.md b/webgl/lessons/fr/webgl-3d-perspective.md index 46442343a..dec626f23 100644 --- a/webgl/lessons/fr/webgl-3d-perspective.md +++ b/webgl/lessons/fr/webgl-3d-perspective.md @@ -282,7 +282,7 @@ Mais il reste quelques soucis. Si on met Z à -100 on se retrouve avec quelque c Quest-ce qu'il se passe ? Pourquoi le F disparaît ? Tout comme WebGL tronque le X et le Y au-delà de -1 et +1 il tronque aussi le Z. Ce qu'on voit c'est le Z < -1. -Je pourrais entrer dans les détails pour résoudre ça mais [vous pouvez déduire la solution](http://stackoverflow.com/a/28301213/128511) comme on l'a fait dans les projections 2D. On a besoin de prendre Z, ajouter du déplacement et du changement d'échelle, et on peut ajuster tout ce qu'on veut entre -1 et +1. +Je pourrais entrer dans les détails pour résoudre ça mais [vous pouvez déduire la solution](https://stackoverflow.com/a/28301213/128511) comme on l'a fait dans les projections 2D. On a besoin de prendre Z, ajouter du déplacement et du changement d'échelle, et on peut ajuster tout ce qu'on veut entre -1 et +1. Ce qui est génial c'est que tout ça peut être fusionné dans une seule matrice ! Mieux, plutôt qu'un 'facteur de fuite' on va plutôt prendre en entrée l'angle du champ de vision désiré et calculer le reste à partir de ça. diff --git a/webgl/lessons/fr/webgl-fundamentals.md b/webgl/lessons/fr/webgl-fundamentals.md index 25c06b5eb..706bf302d 100644 --- a/webgl/lessons/fr/webgl-fundamentals.md +++ b/webgl/lessons/fr/webgl-fundamentals.md @@ -80,7 +80,7 @@ Pour de la 2D on travaillera plutôt en pixels qu'en espace de projection, donc pouvoir fournir des rectangles en pixels et les faire convertir en espace de projection à notre place. Voici le nouveau shader de vertex - - - ` 태그 쌍을 추가해서 외부 스크립트를 참조할 수 있습니다. @@ -26,7 +26,7 @@ WebGL은 이미지를 로딩하는데 Canvas2D보다 더 강력한 제한이 있 ## 작고 간단한 웹 서버 사용하기 다음으로 작은 웹 서버 하나를 설치해야 합니다. -"웹 서버"라는 말이 무섭게 들릴 수도 있지만 [사실 웹 서버는 굉장히 간단합니다](http://games.greggman.com/game/saving-and-loading-files-in-a-web-page/). +"웹 서버"라는 말이 무섭게 들릴 수도 있지만 [사실 웹 서버는 굉장히 간단합니다](https://games.greggman.com/game/saving-and-loading-files-in-a-web-page/). 여기 [Servez](https://greggman.github.io/servez)라는 매우 간단한 인터페이스가 있습니다. diff --git a/webgl/lessons/langinfo.hanson b/webgl/lessons/langinfo.hanson index 6bce9e9f2..a669a72ca 100644 --- a/webgl/lessons/langinfo.hanson +++ b/webgl/lessons/langinfo.hanson @@ -4,10 +4,10 @@ defaultExampleCaption: "click here to open in a separate window", title: 'WebGL Fundamentals', description: 'Learn WebGL from the ground up. No magic', - link: 'http://webglfundamentals.org/', + link: 'https://webglfundamentals.org/', commentSectionHeader: ` -
Questions? Ask on stackoverflow.
-
Issue/Bug? Create an issue on github.
+
Questions? Ask on stackoverflow.
+
Issue/Bug? Create an issue on github.
Use <pre><code>code goes here</code></pre> for code blocks
diff --git a/webgl/lessons/pl/langinfo.hanson b/webgl/lessons/pl/langinfo.hanson index bf87c31aa..e97858f99 100644 --- a/webgl/lessons/pl/langinfo.hanson +++ b/webgl/lessons/pl/langinfo.hanson @@ -4,8 +4,8 @@ defaultExampleCaption: "Kliknij tutaj by otworzyć w nowym oknie", title: 'Podstawy WebGL', description: 'Naucz się WebGL od podstaw. Bez magii.', - link: 'http://webglfundamentals.org/webgl/lessons/pl', - commentSectionHeader: '
Masz pytania odnośnie WebGL? Zapytaj na platformie stackoverflow.
\n
Błędy w tłumaczeniu? Stwórz zgłoszenie na platformie github.
', + link: 'https://webglfundamentals.org/webgl/lessons/pl', + commentSectionHeader: '
Masz pytania odnośnie WebGL? Zapytaj na platformie stackoverflow.
\n
Błędy w tłumaczeniu? Stwórz zgłoszenie na platformie github.
', missing: "Sorry this article has not been translated yet. [Translations Welcome](https://github.com/gfxfundamentals/webgl-fundamentals)! 😄\n\n[Here's the original English article for now]({{{origLink}}}).", toc: 'Spis Treści', categoryMapping: { diff --git a/webgl/lessons/pl/toc.html b/webgl/lessons/pl/toc.html index 24dbe92c4..058e2752f 100644 --- a/webgl/lessons/pl/toc.html +++ b/webgl/lessons/pl/toc.html @@ -1,6 +1,6 @@ {{{tocHtml}}} \ No newline at end of file diff --git a/webgl/lessons/pl/webgl-2d-rotation.md b/webgl/lessons/pl/webgl-2d-rotation.md index ac36a974d..7f00b33b5 100644 --- a/webgl/lessons/pl/webgl-2d-rotation.md +++ b/webgl/lessons/pl/webgl-2d-rotation.md @@ -22,7 +22,7 @@ Będziemy mnożyć przez współrzędne X i Y punktu na okręgu jednostkowym geo Poniżej są aktualizacje wymagane dla naszego cieniowania.
-<script id="2d-vertex-shader" type="x-shader/x-vertex">
+<script id="vertex-shader-2d" type="x-shader/x-vertex">
 attribute vec2 a_position;
 
 uniform vec2 u_resolution;
diff --git a/webgl/lessons/pl/webgl-2d-translation.md b/webgl/lessons/pl/webgl-2d-translation.md
index 50728e83b..9bb42d4dd 100644
--- a/webgl/lessons/pl/webgl-2d-translation.md
+++ b/webgl/lessons/pl/webgl-2d-translation.md
@@ -88,7 +88,7 @@ Istnieje prostsza droga. Zwyczajnie wgrać tą geometrię i wykonać przesunięc
 Oto nowe cieniowanie:
 
 
-<script id="2d-vertex-shader" type="x-shader/x-vertex">
+<script id="vertex-shader-2d" type="x-shader/x-vertex">
 attribute vec2 a_position;
 
 uniform vec2 u_resolution;
diff --git a/webgl/lessons/pl/webgl-fundamentals.md b/webgl/lessons/pl/webgl-fundamentals.md
index 850182fd1..4d7d119cd 100644
--- a/webgl/lessons/pl/webgl-fundamentals.md
+++ b/webgl/lessons/pl/webgl-fundamentals.md
@@ -23,7 +23,7 @@ jest Twoje płótno. Poniżej jest prosty przykład pokazujący WebGL w jego naj
     var gl = canvas.getContext("experimental-webgl");
 
     // skonfiguruj program GLSL
-    var program = createProgramFromScripts(gl, ["2d-vertex-shader", "2d-fragment-shader"]);
+    var program = createProgramFromScripts(gl, ["vertex-shader-2d", "fragment-shader-2d"]);
     gl.useProgram(program);
 
     // sprawdź pozycję wierzchołków.
@@ -51,7 +51,7 @@ jest Twoje płótno. Poniżej jest prosty przykład pokazujący WebGL w jego naj
 
 Poniżej są oba cieniowania
 
-    
 
-    
diff --git a/webgl/lessons/resources/3d-in-webgl.html b/webgl/lessons/resources/3d-in-webgl.html
index ee36af65b..23e108cdf 100644
--- a/webgl/lessons/resources/3d-in-webgl.html
+++ b/webgl/lessons/resources/3d-in-webgl.html
@@ -13,7 +13,7 @@ 

3D in WebGL

compare to 3D in Canvas

- - @@ -73,7 +73,7 @@

3D in WebGL

} var program = webglUtils.createProgramFromScripts( - gl, ["2d-vertex-shader", "2d-fragment-shader"]); + gl, ["vertex-shader-2d", "fragment-shader-2d"]); gl.useProgram(program); var positionLoc = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/lessons/resources/bezier-curve-diagram.html b/webgl/lessons/resources/bezier-curve-diagram.html index 6f5ca5e03..b03fee866 100644 --- a/webgl/lessons/resources/bezier-curve-diagram.html +++ b/webgl/lessons/resources/bezier-curve-diagram.html @@ -24,8 +24,8 @@

Bezier Curve Diagram

diff --git a/webgl/lessons/resources/bezier-curve-edit.html b/webgl/lessons/resources/bezier-curve-edit.html index 998bf04ce..e53a66faa 100644 --- a/webgl/lessons/resources/bezier-curve-edit.html +++ b/webgl/lessons/resources/bezier-curve-edit.html @@ -27,8 +27,8 @@

Two Bezier Curve Edit

diff --git a/webgl/lessons/resources/camera-move-camera.html b/webgl/lessons/resources/camera-move-camera.html index faa476101..1310bb6d8 100644 --- a/webgl/lessons/resources/camera-move-camera.html +++ b/webgl/lessons/resources/camera-move-camera.html @@ -26,8 +26,8 @@

Moving the Camera

diff --git a/webgl/lessons/resources/cube-normals.html b/webgl/lessons/resources/cube-normals.html index 13de80013..f82c2ba81 100644 --- a/webgl/lessons/resources/cube-normals.html +++ b/webgl/lessons/resources/cube-normals.html @@ -25,8 +25,8 @@ diff --git a/webgl/lessons/resources/directional-lighting.html b/webgl/lessons/resources/directional-lighting.html index de2bf6c6e..2b7fad2c6 100644 --- a/webgl/lessons/resources/directional-lighting.html +++ b/webgl/lessons/resources/directional-lighting.html @@ -29,8 +29,8 @@ diff --git a/webgl/lessons/resources/dot-product.html b/webgl/lessons/resources/dot-product.html index 8d9425656..b1da5ee9e 100644 --- a/webgl/lessons/resources/dot-product.html +++ b/webgl/lessons/resources/dot-product.html @@ -178,8 +178,8 @@ diff --git a/webgl/lessons/resources/environment-mapping.html b/webgl/lessons/resources/environment-mapping.html index 6608bdeb2..780aa7fd4 100644 --- a/webgl/lessons/resources/environment-mapping.html +++ b/webgl/lessons/resources/environment-mapping.html @@ -22,8 +22,8 @@ diff --git a/webgl/lessons/resources/fragment-shader-anim.html b/webgl/lessons/resources/fragment-shader-anim.html index e3cb1d842..19f11d22e 100644 --- a/webgl/lessons/resources/fragment-shader-anim.html +++ b/webgl/lessons/resources/fragment-shader-anim.html @@ -15,8 +15,8 @@ diff --git a/webgl/lessons/resources/matrix-space-change.html b/webgl/lessons/resources/matrix-space-change.html index 58f5ab6e5..852a24775 100644 --- a/webgl/lessons/resources/matrix-space-change.html +++ b/webgl/lessons/resources/matrix-space-change.html @@ -18,8 +18,8 @@ diff --git a/webgl/lessons/resources/moon-orbit.html b/webgl/lessons/resources/moon-orbit.html index c02510b7b..685cda2ff 100644 --- a/webgl/lessons/resources/moon-orbit.html +++ b/webgl/lessons/resources/moon-orbit.html @@ -31,8 +31,8 @@ diff --git a/webgl/lessons/resources/normals-scaled.html b/webgl/lessons/resources/normals-scaled.html index 1d5667c33..c4df43b68 100644 --- a/webgl/lessons/resources/normals-scaled.html +++ b/webgl/lessons/resources/normals-scaled.html @@ -104,8 +104,8 @@ diff --git a/webgl/lessons/resources/normals.html b/webgl/lessons/resources/normals.html index 1e107d61b..77eb321b5 100644 --- a/webgl/lessons/resources/normals.html +++ b/webgl/lessons/resources/normals.html @@ -22,8 +22,8 @@ diff --git a/webgl/lessons/resources/person-diagram.html b/webgl/lessons/resources/person-diagram.html index e848bf6c1..3962e3d33 100644 --- a/webgl/lessons/resources/person-diagram.html +++ b/webgl/lessons/resources/person-diagram.html @@ -19,8 +19,8 @@ diff --git a/webgl/lessons/resources/planet-diagram.html b/webgl/lessons/resources/planet-diagram.html index 54572a00e..8170b5859 100644 --- a/webgl/lessons/resources/planet-diagram.html +++ b/webgl/lessons/resources/planet-diagram.html @@ -19,8 +19,8 @@ diff --git a/webgl/lessons/resources/point-lighting.html b/webgl/lessons/resources/point-lighting.html index 33f1ae741..2e455afbe 100644 --- a/webgl/lessons/resources/point-lighting.html +++ b/webgl/lessons/resources/point-lighting.html @@ -30,8 +30,8 @@ diff --git a/webgl/lessons/resources/power-graph.html b/webgl/lessons/resources/power-graph.html index 1fe128cff..5f84d2db2 100644 --- a/webgl/lessons/resources/power-graph.html +++ b/webgl/lessons/resources/power-graph.html @@ -30,8 +30,8 @@ diff --git a/webgl/lessons/resources/specular-lighting.html b/webgl/lessons/resources/specular-lighting.html index 44d7a834e..1d63cbc83 100644 --- a/webgl/lessons/resources/specular-lighting.html +++ b/webgl/lessons/resources/specular-lighting.html @@ -30,8 +30,8 @@ diff --git a/webgl/lessons/resources/spot-lighting.html b/webgl/lessons/resources/spot-lighting.html index 51aae114a..7f8fd5448 100644 --- a/webgl/lessons/resources/spot-lighting.html +++ b/webgl/lessons/resources/spot-lighting.html @@ -32,8 +32,8 @@ diff --git a/webgl/lessons/resources/spot-sphere.html b/webgl/lessons/resources/spot-sphere.html index 9c84c45ea..62fc53cde 100644 --- a/webgl/lessons/resources/spot-sphere.html +++ b/webgl/lessons/resources/spot-sphere.html @@ -209,8 +209,8 @@ diff --git a/webgl/lessons/resources/surface-reflection.html b/webgl/lessons/resources/surface-reflection.html index e460fee93..e321badda 100644 --- a/webgl/lessons/resources/surface-reflection.html +++ b/webgl/lessons/resources/surface-reflection.html @@ -30,8 +30,8 @@ diff --git a/webgl/lessons/resources/webgl-preservedrawingbuffer-true.html b/webgl/lessons/resources/webgl-preservedrawingbuffer-true.html index c0e5c2432..7213d12ff 100644 --- a/webgl/lessons/resources/webgl-preservedrawingbuffer-true.html +++ b/webgl/lessons/resources/webgl-preservedrawingbuffer-true.html @@ -11,7 +11,7 @@

- - @@ -119,7 +119,7 @@ var clock = 0; var program = createProgramFromScripts( - gl, ["2d-vertex-shader", "2d-fragment-shader"]); + gl, ["vertex-shader-2d", "fragment-shader-2d"]); gl.useProgram(program); var positionLoc = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/lessons/ru/langinfo.hanson b/webgl/lessons/ru/langinfo.hanson index 6cb99ad0a..6171b620e 100644 --- a/webgl/lessons/ru/langinfo.hanson +++ b/webgl/lessons/ru/langinfo.hanson @@ -4,7 +4,7 @@ defaultExampleCaption: "нажмите здесь, чтобы открыть в отдельном окне", title: 'Основы WebGL', description: 'Изучение WebGL с нуля. Не прибегая к магии.', - link: 'http://webglfundamentals.org/', + link: 'https://webglfundamentals.org/', commentSectionHeader: '
Вопросы? Спросите на stackoverflow.
\n
Нашли ошибку? Создайте задачу на github.
', missing: "К сожалению, страница ещё не переведена. [Я всегда рад переводчикам](https://github.com/gfxfundamentals/webgl-fundamentals)! 😄\n\n[А пока можете почитать статью на английском языке]({{{origLink}}}).", toc: 'оглавление', diff --git a/webgl/lessons/ru/webgl-2-textures.md b/webgl/lessons/ru/webgl-2-textures.md index 60451b3a3..2d20282a0 100644 --- a/webgl/lessons/ru/webgl-2-textures.md +++ b/webgl/lessons/ru/webgl-2-textures.md @@ -80,7 +80,7 @@ function main() { умножим одну текстуру на другую. ``` - - - ` tag pair if you want to use external scripts. @@ -24,7 +24,7 @@ Unzip the files into some folder. ## Using a small simple easy Web Server Next up you should install a small web server. I know "web server" sounds scary but the truth is [web -servers are actually extremely simple](http://games.greggman.com/game/saving-and-loading-files-in-a-web-page/). +servers are actually extremely simple](https://games.greggman.com/game/saving-and-loading-files-in-a-web-page/). Here's a very simple one with an interface called [Servez](https://greggman.github.io/servez). diff --git a/webgl/lessons/webgl-text-glyphs.md b/webgl/lessons/webgl-text-glyphs.md index 5e69763fd..df3028d5d 100644 --- a/webgl/lessons/webgl-text-glyphs.md +++ b/webgl/lessons/webgl-text-glyphs.md @@ -128,7 +128,7 @@ So to fix that the way this is usually done is to make a texture atlas that contains all the letters. We went over what a texture atlas is when we talked about [texturing the 6 faces of a cube](webgl-3d-textures.html#texture-atlas). -Searching the web I found [this simple open source font texture atlas](http://opengameart.org/content/8x8-font-chomps-wacky-worlds-beta) +Searching the web I found [this simple open source font texture atlas](https://opengameart.org/content/8x8-font-chomps-wacky-worlds-beta) ``` diff --git a/webgl/lessons/webgl-text-texture.md b/webgl/lessons/webgl-text-texture.md index 0562effcd..fa1d3e26d 100644 --- a/webgl/lessons/webgl-text-texture.md +++ b/webgl/lessons/webgl-text-texture.md @@ -67,7 +67,7 @@ We pass in a matrix to rotate it and give us an xy plane unit quad. Next create 2 shaders // setup GLSL programs - var fProgramInfo = createProgramInfo(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var fProgramInfo = createProgramInfo(gl, ["vertex-shader-3d", "fragment-shader-3d"]); var textProgramInfo = createProgramInfo(gl, ["text-vertex-shader", "text-fragment-shader"]); And create our text texture diff --git a/webgl/lessons/webgl-visualizing-the-camera.md b/webgl/lessons/webgl-visualizing-the-camera.md index c67c4a517..360748f2f 100644 --- a/webgl/lessons/webgl-visualizing-the-camera.md +++ b/webgl/lessons/webgl-visualizing-the-camera.md @@ -207,8 +207,8 @@ other scene ```js // setup GLSL programs // compiles shaders, links program, looks up locations --const programInfo = webglUtils.createProgramInfo(gl, ['3d-vertex-shader', '3d-fragment-shader']); -+const vertexColorProgramInfo = webglUtils.createProgramInfo(gl, ['3d-vertex-shader', '3d-fragment-shader']); +-const programInfo = webglUtils.createProgramInfo(gl, ['vertex-shader-3d', 'fragment-shader-3d']); ++const vertexColorProgramInfo = webglUtils.createProgramInfo(gl, ['vertex-shader-3d', 'fragment-shader-3d']); +const solidColorProgramInfo = webglUtils.createProgramInfo(gl, ['solid-color-vertex-shader', 'solid-color-fragment-shader']); // create buffers and fill with data for a 3D 'F' diff --git a/webgl/lessons/zh_cn/langinfo.hanson b/webgl/lessons/zh_cn/langinfo.hanson index b62790a0d..7990686bf 100644 --- a/webgl/lessons/zh_cn/langinfo.hanson +++ b/webgl/lessons/zh_cn/langinfo.hanson @@ -4,7 +4,7 @@ defaultExampleCaption: "点此在新窗口中浏览", title: 'WebGL 理论基础', description: '从理论基础开始学习WebGL, 并不复杂哦~', - link: 'http://webglfundamentals.org/webgl/lessons/zh_cn', + link: 'https://webglfundamentals.org/webgl/lessons/zh_cn', commentSectionHeader: '
有关于WebGL的疑问? 在Stackoverflow提问
\n
有意见或建议? 在GitHub上提issue
', missing: "还没有简体中文版翻译哦 (~ ̄△ ̄)~\n\n[英文原版地址]({{{origLink}}})", toc: '目录', diff --git a/webgl/lessons/zh_cn/webgl-2-textures.md b/webgl/lessons/zh_cn/webgl-2-textures.md index a320b0e3c..0808554b7 100644 --- a/webgl/lessons/zh_cn/webgl-2-textures.md +++ b/webgl/lessons/zh_cn/webgl-2-textures.md @@ -71,7 +71,7 @@ function main() { 接下来修改着色器使用两个纹理,在这个例子中我们将两个纹理相乘。 ``` - - diff --git a/webgl/webgl-10x15-canvas-400x300-css.html b/webgl/webgl-10x15-canvas-400x300-css.html index de54e9e13..6f9e10317 100644 --- a/webgl/webgl-10x15-canvas-400x300-css.html +++ b/webgl/webgl-10x15-canvas-400x300-css.html @@ -14,7 +14,7 @@ - - @@ -56,7 +56,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["2d-vertex-shader", "2d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-2d", "fragment-shader-2d"]); gl.useProgram(program); // look up where the vertex data needs to go. diff --git a/webgl/webgl-2-textures.html b/webgl/webgl-2-textures.html index 13c7736f1..bfe40c08e 100644 --- a/webgl/webgl-2-textures.html +++ b/webgl/webgl-2-textures.html @@ -11,7 +11,7 @@ - - @@ -108,7 +108,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["2d-vertex-shader", "2d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-2d", "fragment-shader-2d"]); gl.useProgram(program); // look up where the vertex data needs to go. diff --git a/webgl/webgl-2d-drawimage-01.html b/webgl/webgl-2d-drawimage-01.html index 1d9614024..28a39b8de 100644 --- a/webgl/webgl-2d-drawimage-01.html +++ b/webgl/webgl-2d-drawimage-01.html @@ -38,8 +38,8 @@ diff --git a/webgl/webgl-2d-drawimage-02.html b/webgl/webgl-2d-drawimage-02.html index 949f84ac0..90d96f07e 100644 --- a/webgl/webgl-2d-drawimage-02.html +++ b/webgl/webgl-2d-drawimage-02.html @@ -38,8 +38,8 @@ diff --git a/webgl/webgl-2d-drawimage-03.html b/webgl/webgl-2d-drawimage-03.html index 5e4fb040d..dac2bc42f 100644 --- a/webgl/webgl-2d-drawimage-03.html +++ b/webgl/webgl-2d-drawimage-03.html @@ -39,8 +39,8 @@ diff --git a/webgl/webgl-2d-drawimage-04.html b/webgl/webgl-2d-drawimage-04.html index 0c0c63a86..53f082104 100644 --- a/webgl/webgl-2d-drawimage-04.html +++ b/webgl/webgl-2d-drawimage-04.html @@ -39,8 +39,8 @@ diff --git a/webgl/webgl-2d-drawimage-05.html b/webgl/webgl-2d-drawimage-05.html index 5d16b6796..ac31dae7f 100644 --- a/webgl/webgl-2d-drawimage-05.html +++ b/webgl/webgl-2d-drawimage-05.html @@ -39,8 +39,8 @@ diff --git a/webgl/webgl-2d-drawimage-06.html b/webgl/webgl-2d-drawimage-06.html index 5cfbe86a3..6be57e6af 100644 --- a/webgl/webgl-2d-drawimage-06.html +++ b/webgl/webgl-2d-drawimage-06.html @@ -45,8 +45,8 @@ diff --git a/webgl/webgl-2d-drawimage-07.html b/webgl/webgl-2d-drawimage-07.html index 7e7ea62bb..f721539b9 100644 --- a/webgl/webgl-2d-drawimage-07.html +++ b/webgl/webgl-2d-drawimage-07.html @@ -46,8 +46,8 @@ diff --git a/webgl/webgl-2d-drawimage-08.html b/webgl/webgl-2d-drawimage-08.html index f584cce57..c20f797eb 100644 --- a/webgl/webgl-2d-drawimage-08.html +++ b/webgl/webgl-2d-drawimage-08.html @@ -45,8 +45,8 @@ diff --git a/webgl/webgl-2d-geometry-matrix-transform-center-f.html b/webgl/webgl-2d-geometry-matrix-transform-center-f.html index bbafdb2a1..9283ac7c3 100644 --- a/webgl/webgl-2d-geometry-matrix-transform-center-f.html +++ b/webgl/webgl-2d-geometry-matrix-transform-center-f.html @@ -23,7 +23,7 @@ - - @@ -77,7 +77,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["2d-vertex-shader", "2d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-2d", "fragment-shader-2d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-2d-geometry-matrix-transform-hierarchical.html b/webgl/webgl-2d-geometry-matrix-transform-hierarchical.html index 9e78a3b60..90defa079 100644 --- a/webgl/webgl-2d-geometry-matrix-transform-hierarchical.html +++ b/webgl/webgl-2d-geometry-matrix-transform-hierarchical.html @@ -23,7 +23,7 @@ - - @@ -77,7 +77,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["2d-vertex-shader", "2d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-2d", "fragment-shader-2d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-2d-geometry-matrix-transform-simpler-functions.html b/webgl/webgl-2d-geometry-matrix-transform-simpler-functions.html index 8051875a3..34aa950fb 100644 --- a/webgl/webgl-2d-geometry-matrix-transform-simpler-functions.html +++ b/webgl/webgl-2d-geometry-matrix-transform-simpler-functions.html @@ -23,7 +23,7 @@ - - @@ -65,7 +65,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["2d-vertex-shader", "2d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-2d", "fragment-shader-2d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-2d-geometry-matrix-transform-trs.html b/webgl/webgl-2d-geometry-matrix-transform-trs.html index d63540977..b25c8b242 100644 --- a/webgl/webgl-2d-geometry-matrix-transform-trs.html +++ b/webgl/webgl-2d-geometry-matrix-transform-trs.html @@ -23,7 +23,7 @@ - - @@ -77,7 +77,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["2d-vertex-shader", "2d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-2d", "fragment-shader-2d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-2d-geometry-matrix-transform-with-projection.html b/webgl/webgl-2d-geometry-matrix-transform-with-projection.html index c4273ecb9..9bd49f94e 100644 --- a/webgl/webgl-2d-geometry-matrix-transform-with-projection.html +++ b/webgl/webgl-2d-geometry-matrix-transform-with-projection.html @@ -23,7 +23,7 @@ - - @@ -65,7 +65,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["2d-vertex-shader", "2d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-2d", "fragment-shader-2d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-2d-geometry-matrix-transform.html b/webgl/webgl-2d-geometry-matrix-transform.html index d7f65dc6d..6c99903b9 100644 --- a/webgl/webgl-2d-geometry-matrix-transform.html +++ b/webgl/webgl-2d-geometry-matrix-transform.html @@ -23,7 +23,7 @@ - - @@ -77,7 +77,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["2d-vertex-shader", "2d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-2d", "fragment-shader-2d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-2d-geometry-rotation-angle.html b/webgl/webgl-2d-geometry-rotation-angle.html index 927e1dd83..f45250844 100644 --- a/webgl/webgl-2d-geometry-rotation-angle.html +++ b/webgl/webgl-2d-geometry-rotation-angle.html @@ -21,7 +21,7 @@ - - @@ -81,7 +81,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["2d-vertex-shader", "2d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-2d", "fragment-shader-2d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-2d-geometry-rotation.html b/webgl/webgl-2d-geometry-rotation.html index 25a9a4422..d2a8c6251 100644 --- a/webgl/webgl-2d-geometry-rotation.html +++ b/webgl/webgl-2d-geometry-rotation.html @@ -30,8 +30,8 @@ @@ -49,7 +49,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["2d-vertex-shader", "2d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-2d", "fragment-shader-2d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); @@ -179,7 +179,7 @@ }); - - - @@ -87,7 +87,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["2d-vertex-shader", "2d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-2d", "fragment-shader-2d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-2d-geometry-translate-better.html b/webgl/webgl-2d-geometry-translate-better.html index c5acead0a..b28260de7 100644 --- a/webgl/webgl-2d-geometry-translate-better.html +++ b/webgl/webgl-2d-geometry-translate-better.html @@ -25,7 +25,7 @@ - - @@ -79,7 +79,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["2d-vertex-shader", "2d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-2d", "fragment-shader-2d"]); gl.useProgram(program); // look up where the vertex data needs to go. diff --git a/webgl/webgl-2d-geometry-translate.html b/webgl/webgl-2d-geometry-translate.html index 14d7140d2..8709d1e40 100644 --- a/webgl/webgl-2d-geometry-translate.html +++ b/webgl/webgl-2d-geometry-translate.html @@ -27,14 +27,14 @@ - - @@ -84,7 +84,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["2d-vertex-shader", "2d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-2d", "fragment-shader-2d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-2d-image-3x3-convolution.html b/webgl/webgl-2d-image-3x3-convolution.html index 36ecc7621..ff395fddb 100644 --- a/webgl/webgl-2d-image-3x3-convolution.html +++ b/webgl/webgl-2d-image-3x3-convolution.html @@ -14,7 +14,7 @@ - - @@ -97,7 +97,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["2d-vertex-shader", "2d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-2d", "fragment-shader-2d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-2d-image-blend.html b/webgl/webgl-2d-image-blend.html index 5e83b137b..a2dc38d29 100644 --- a/webgl/webgl-2d-image-blend.html +++ b/webgl/webgl-2d-image-blend.html @@ -13,13 +13,13 @@ - - @@ -92,7 +92,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["2d-vertex-shader", "2d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-2d", "fragment-shader-2d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-2d-image-processing.html b/webgl/webgl-2d-image-processing.html index fc78fc446..019293336 100644 --- a/webgl/webgl-2d-image-processing.html +++ b/webgl/webgl-2d-image-processing.html @@ -40,7 +40,7 @@ - - @@ -125,7 +125,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["2d-vertex-shader", "2d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-2d", "fragment-shader-2d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-2d-image-red2blue.html b/webgl/webgl-2d-image-red2blue.html index e8ea4763d..1b7772b96 100644 --- a/webgl/webgl-2d-image-red2blue.html +++ b/webgl/webgl-2d-image-red2blue.html @@ -11,7 +11,7 @@ - - @@ -79,7 +79,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["2d-vertex-shader", "2d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-2d", "fragment-shader-2d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-2d-image.html b/webgl/webgl-2d-image.html index 8c26e57d7..75eacdd0a 100644 --- a/webgl/webgl-2d-image.html +++ b/webgl/webgl-2d-image.html @@ -11,7 +11,7 @@ - - @@ -79,7 +79,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["2d-vertex-shader", "2d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-2d", "fragment-shader-2d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-2d-matrixstack-01.html b/webgl/webgl-2d-matrixstack-01.html index f15941f43..87f5a5481 100644 --- a/webgl/webgl-2d-matrixstack-01.html +++ b/webgl/webgl-2d-matrixstack-01.html @@ -39,8 +39,8 @@ diff --git a/webgl/webgl-2d-matrixstack-02.html b/webgl/webgl-2d-matrixstack-02.html index 0549d2fb1..d99dc97cb 100644 --- a/webgl/webgl-2d-matrixstack-02.html +++ b/webgl/webgl-2d-matrixstack-02.html @@ -39,8 +39,8 @@ diff --git a/webgl/webgl-2d-matrixstack-03.html b/webgl/webgl-2d-matrixstack-03.html index 64d50c9c2..4c61d4248 100644 --- a/webgl/webgl-2d-matrixstack-03.html +++ b/webgl/webgl-2d-matrixstack-03.html @@ -39,8 +39,8 @@ diff --git a/webgl/webgl-2d-rectangle-top-left.html b/webgl/webgl-2d-rectangle-top-left.html index f5e95fc3b..c9787f1c6 100644 --- a/webgl/webgl-2d-rectangle-top-left.html +++ b/webgl/webgl-2d-rectangle-top-left.html @@ -13,13 +13,13 @@ - - - @@ -75,7 +75,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["2d-vertex-shader", "2d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-2d", "fragment-shader-2d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-2d-rectangle-with-2-byte-colors.html b/webgl/webgl-2d-rectangle-with-2-byte-colors.html index 9cc47ed18..d40ae7e6d 100644 --- a/webgl/webgl-2d-rectangle-with-2-byte-colors.html +++ b/webgl/webgl-2d-rectangle-with-2-byte-colors.html @@ -23,7 +23,7 @@ - - @@ -72,7 +72,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["2d-vertex-shader", "2d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-2d", "fragment-shader-2d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-2d-rectangle-with-2-colors.html b/webgl/webgl-2d-rectangle-with-2-colors.html index 4f9f57c2d..16ae608c4 100644 --- a/webgl/webgl-2d-rectangle-with-2-colors.html +++ b/webgl/webgl-2d-rectangle-with-2-colors.html @@ -23,7 +23,7 @@ - - @@ -72,7 +72,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["2d-vertex-shader", "2d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-2d", "fragment-shader-2d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-2d-rectangle-with-random-colors.html b/webgl/webgl-2d-rectangle-with-random-colors.html index 6ef488932..bcc7116c5 100644 --- a/webgl/webgl-2d-rectangle-with-random-colors.html +++ b/webgl/webgl-2d-rectangle-with-random-colors.html @@ -23,7 +23,7 @@ - - @@ -72,7 +72,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["2d-vertex-shader", "2d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-2d", "fragment-shader-2d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-2d-rectangle.html b/webgl/webgl-2d-rectangle.html index 98a54f089..bef83963d 100644 --- a/webgl/webgl-2d-rectangle.html +++ b/webgl/webgl-2d-rectangle.html @@ -13,13 +13,13 @@ - - - @@ -60,7 +60,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["2d-vertex-shader", "2d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-2d", "fragment-shader-2d"]); // look up where the vertex data needs to go. var positionAttributeLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-2d-rectangles.html b/webgl/webgl-2d-rectangles.html index b3a1275d4..d593c5294 100644 --- a/webgl/webgl-2d-rectangles.html +++ b/webgl/webgl-2d-rectangles.html @@ -11,7 +11,7 @@ - - @@ -60,7 +60,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["2d-vertex-shader", "2d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-2d", "fragment-shader-2d"]); // look up where the vertex data needs to go. var positionAttributeLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-2d-triangle-with-position-for-color.html b/webgl/webgl-2d-triangle-with-position-for-color.html index bdef12e78..164848981 100644 --- a/webgl/webgl-2d-triangle-with-position-for-color.html +++ b/webgl/webgl-2d-triangle-with-position-for-color.html @@ -23,7 +23,7 @@ - - @@ -73,7 +73,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["2d-vertex-shader", "2d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-2d", "fragment-shader-2d"]); // look up where the vertex data needs to go. var positionAttributeLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-3d-camera-look-at-heads.html b/webgl/webgl-3d-camera-look-at-heads.html index 7197349a4..23fe2696c 100644 --- a/webgl/webgl-3d-camera-look-at-heads.html +++ b/webgl/webgl-3d-camera-look-at-heads.html @@ -20,7 +20,7 @@ - - @@ -70,7 +70,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); gl.useProgram(program); // look up where the vertex data needs to go. diff --git a/webgl/webgl-3d-camera-look-at.html b/webgl/webgl-3d-camera-look-at.html index 6dff98f5f..8f33d691e 100644 --- a/webgl/webgl-3d-camera-look-at.html +++ b/webgl/webgl-3d-camera-look-at.html @@ -19,7 +19,7 @@ - - @@ -68,7 +68,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-3d-camera.html b/webgl/webgl-3d-camera.html index f26596c46..c3870cd2c 100644 --- a/webgl/webgl-3d-camera.html +++ b/webgl/webgl-3d-camera.html @@ -19,7 +19,7 @@ - - @@ -68,7 +68,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-3d-fog-depth-based-gl_FragCoord.html b/webgl/webgl-3d-fog-depth-based-gl_FragCoord.html index 114667ed7..1dd301e09 100644 --- a/webgl/webgl-3d-fog-depth-based-gl_FragCoord.html +++ b/webgl/webgl-3d-fog-depth-based-gl_FragCoord.html @@ -14,7 +14,7 @@ - - @@ -75,7 +75,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-3d-fog-depth-based-issue.html b/webgl/webgl-3d-fog-depth-based-issue.html index 35177936f..901ff2e01 100644 --- a/webgl/webgl-3d-fog-depth-based-issue.html +++ b/webgl/webgl-3d-fog-depth-based-issue.html @@ -14,7 +14,7 @@ - - @@ -83,7 +83,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-3d-fog-depth-based.html b/webgl/webgl-3d-fog-depth-based.html index f4e56bf55..3e1b70255 100644 --- a/webgl/webgl-3d-fog-depth-based.html +++ b/webgl/webgl-3d-fog-depth-based.html @@ -14,7 +14,7 @@ - - @@ -83,7 +83,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-3d-fog-distance-based.html b/webgl/webgl-3d-fog-distance-based.html index fd2d3281b..cdcbe2d1c 100644 --- a/webgl/webgl-3d-fog-distance-based.html +++ b/webgl/webgl-3d-fog-distance-based.html @@ -14,7 +14,7 @@ - - @@ -81,7 +81,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-3d-fog-distance-exp2.html b/webgl/webgl-3d-fog-distance-exp2.html index 7b68bcea4..50e9ee8b7 100644 --- a/webgl/webgl-3d-fog-distance-exp2.html +++ b/webgl/webgl-3d-fog-distance-exp2.html @@ -14,7 +14,7 @@ - - @@ -83,7 +83,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-3d-fog-just-mix.html b/webgl/webgl-3d-fog-just-mix.html index 190df090c..38801b200 100644 --- a/webgl/webgl-3d-fog-just-mix.html +++ b/webgl/webgl-3d-fog-just-mix.html @@ -17,7 +17,7 @@ - - @@ -74,7 +74,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-3d-lathe-step-01.html b/webgl/webgl-3d-lathe-step-01.html index 230a2b95e..75f558e86 100644 --- a/webgl/webgl-3d-lathe-step-01.html +++ b/webgl/webgl-3d-lathe-step-01.html @@ -12,7 +12,7 @@ - - @@ -106,7 +106,7 @@ // setup GLSL program // compiles shaders, links program and looks up locations - const programInfo = webglUtils.createProgramInfo(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + const programInfo = webglUtils.createProgramInfo(gl, ["vertex-shader-3d", "fragment-shader-3d"]); const texInfo = loadImageAndCreateTextureInfo("resources/uv-grid.png", render); diff --git a/webgl/webgl-3d-lathe-step-02.html b/webgl/webgl-3d-lathe-step-02.html index a48399801..d64ce0fec 100644 --- a/webgl/webgl-3d-lathe-step-02.html +++ b/webgl/webgl-3d-lathe-step-02.html @@ -12,7 +12,7 @@ - - @@ -107,7 +107,7 @@ // setup GLSL program // compiles shaders, links program and looks up locations - const programInfo = webglUtils.createProgramInfo(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + const programInfo = webglUtils.createProgramInfo(gl, ["vertex-shader-3d", "fragment-shader-3d"]); const texInfo = loadImageAndCreateTextureInfo("resources/uv-grid.png", render); diff --git a/webgl/webgl-3d-lathe-step-03.html b/webgl/webgl-3d-lathe-step-03.html index 8679f9737..759d1232b 100644 --- a/webgl/webgl-3d-lathe-step-03.html +++ b/webgl/webgl-3d-lathe-step-03.html @@ -137,8 +137,8 @@ diff --git a/webgl/webgl-3d-lighting-directional-world.html b/webgl/webgl-3d-lighting-directional-world.html index 7a8fda1a9..8998fe56c 100644 --- a/webgl/webgl-3d-lighting-directional-world.html +++ b/webgl/webgl-3d-lighting-directional-world.html @@ -19,7 +19,7 @@ - - @@ -84,7 +84,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-3d-lighting-directional-worldinversetranspose.html b/webgl/webgl-3d-lighting-directional-worldinversetranspose.html index d665c791f..91601a814 100644 --- a/webgl/webgl-3d-lighting-directional-worldinversetranspose.html +++ b/webgl/webgl-3d-lighting-directional-worldinversetranspose.html @@ -19,7 +19,7 @@ - - @@ -84,7 +84,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-3d-lighting-directional.html b/webgl/webgl-3d-lighting-directional.html index 480c9143a..ea1201a9e 100644 --- a/webgl/webgl-3d-lighting-directional.html +++ b/webgl/webgl-3d-lighting-directional.html @@ -19,7 +19,7 @@ - - @@ -83,7 +83,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-3d-lighting-point-color.html b/webgl/webgl-3d-lighting-point-color.html index f07f63bef..e13fdbe3f 100644 --- a/webgl/webgl-3d-lighting-point-color.html +++ b/webgl/webgl-3d-lighting-point-color.html @@ -20,7 +20,7 @@ - - @@ -118,7 +118,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-3d-lighting-point-specular-power.html b/webgl/webgl-3d-lighting-point-specular-power.html index 9b7407d6f..d0d18211d 100644 --- a/webgl/webgl-3d-lighting-point-specular-power.html +++ b/webgl/webgl-3d-lighting-point-specular-power.html @@ -20,7 +20,7 @@ - - @@ -116,7 +116,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-3d-lighting-point-specular.html b/webgl/webgl-3d-lighting-point-specular.html index 4459a63ed..4e65a3049 100644 --- a/webgl/webgl-3d-lighting-point-specular.html +++ b/webgl/webgl-3d-lighting-point-specular.html @@ -19,7 +19,7 @@ - - @@ -111,7 +111,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-3d-lighting-point.html b/webgl/webgl-3d-lighting-point.html index 8bdae2ed7..fda2f5cca 100644 --- a/webgl/webgl-3d-lighting-point.html +++ b/webgl/webgl-3d-lighting-point.html @@ -19,7 +19,7 @@ - - @@ -98,7 +98,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-3d-lighting-spot-falloff-using-smoothstep.html b/webgl/webgl-3d-lighting-spot-falloff-using-smoothstep.html index 0335aa210..df04b354f 100644 --- a/webgl/webgl-3d-lighting-spot-falloff-using-smoothstep.html +++ b/webgl/webgl-3d-lighting-spot-falloff-using-smoothstep.html @@ -23,7 +23,7 @@ - - @@ -122,7 +122,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-3d-lighting-spot-falloff.html b/webgl/webgl-3d-lighting-spot-falloff.html index 3b0d57b08..6d94e5c6b 100644 --- a/webgl/webgl-3d-lighting-spot-falloff.html +++ b/webgl/webgl-3d-lighting-spot-falloff.html @@ -23,7 +23,7 @@ - - @@ -123,7 +123,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-3d-lighting-spot-using-step.html b/webgl/webgl-3d-lighting-spot-using-step.html index f7519aae1..7c120c5f2 100644 --- a/webgl/webgl-3d-lighting-spot-using-step.html +++ b/webgl/webgl-3d-lighting-spot-using-step.html @@ -22,7 +22,7 @@ - - @@ -120,7 +120,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-3d-lighting-spot.html b/webgl/webgl-3d-lighting-spot.html index a3bec1a54..f7f9bc84a 100644 --- a/webgl/webgl-3d-lighting-spot.html +++ b/webgl/webgl-3d-lighting-spot.html @@ -22,7 +22,7 @@ - - @@ -125,7 +125,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-3d-perspective-matrix.html b/webgl/webgl-3d-perspective-matrix.html index 9da017ad3..8336f6709 100644 --- a/webgl/webgl-3d-perspective-matrix.html +++ b/webgl/webgl-3d-perspective-matrix.html @@ -25,7 +25,7 @@ - - @@ -74,7 +74,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-3d-perspective-w-matrix.html b/webgl/webgl-3d-perspective-w-matrix.html index 948ac64a1..210ad0102 100644 --- a/webgl/webgl-3d-perspective-w-matrix.html +++ b/webgl/webgl-3d-perspective-w-matrix.html @@ -25,7 +25,7 @@ - - @@ -74,7 +74,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-3d-perspective-w.html b/webgl/webgl-3d-perspective-w.html index 8f082bb33..408962848 100644 --- a/webgl/webgl-3d-perspective-w.html +++ b/webgl/webgl-3d-perspective-w.html @@ -25,7 +25,7 @@ - - @@ -81,7 +81,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-3d-perspective.html b/webgl/webgl-3d-perspective.html index e869b7770..f3776010b 100644 --- a/webgl/webgl-3d-perspective.html +++ b/webgl/webgl-3d-perspective.html @@ -25,7 +25,7 @@ - - @@ -81,7 +81,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-3d-step1.html b/webgl/webgl-3d-step1.html index 470e85ffc..d11a4e380 100644 --- a/webgl/webgl-3d-step1.html +++ b/webgl/webgl-3d-step1.html @@ -27,7 +27,7 @@ - - @@ -69,7 +69,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-3d-step2.html b/webgl/webgl-3d-step2.html index b78db082b..214a09321 100644 --- a/webgl/webgl-3d-step2.html +++ b/webgl/webgl-3d-step2.html @@ -27,7 +27,7 @@ - - @@ -69,7 +69,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-3d-step3.html b/webgl/webgl-3d-step3.html index 0fdf4d34a..43f091940 100644 --- a/webgl/webgl-3d-step3.html +++ b/webgl/webgl-3d-step3.html @@ -27,7 +27,7 @@ - - @@ -76,7 +76,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-3d-step4.html b/webgl/webgl-3d-step4.html index 2d94e37ec..9e4b12367 100644 --- a/webgl/webgl-3d-step4.html +++ b/webgl/webgl-3d-step4.html @@ -27,7 +27,7 @@ - - @@ -76,7 +76,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-3d-step5.html b/webgl/webgl-3d-step5.html index 6ad5ba195..17b05e525 100644 --- a/webgl/webgl-3d-step5.html +++ b/webgl/webgl-3d-step5.html @@ -27,7 +27,7 @@ - - @@ -76,7 +76,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-3d-step6.html b/webgl/webgl-3d-step6.html index 8993e3ed3..aa5bd0adc 100644 --- a/webgl/webgl-3d-step6.html +++ b/webgl/webgl-3d-step6.html @@ -27,7 +27,7 @@ - - @@ -76,7 +76,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-3d-textures-bad-npot.html b/webgl/webgl-3d-textures-bad-npot.html index 98e227a9a..b940f4469 100644 --- a/webgl/webgl-3d-textures-bad-npot.html +++ b/webgl/webgl-3d-textures-bad-npot.html @@ -15,7 +15,7 @@ - - @@ -67,7 +67,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-3d-textures-good-npot.html b/webgl/webgl-3d-textures-good-npot.html index acca0d557..df624cdd4 100644 --- a/webgl/webgl-3d-textures-good-npot.html +++ b/webgl/webgl-3d-textures-good-npot.html @@ -14,7 +14,7 @@ - - @@ -66,7 +66,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-3d-textures-mips-tri-linear.html b/webgl/webgl-3d-textures-mips-tri-linear.html index 0f1639be9..612743122 100644 --- a/webgl/webgl-3d-textures-mips-tri-linear.html +++ b/webgl/webgl-3d-textures-mips-tri-linear.html @@ -37,7 +37,7 @@ - - @@ -83,14 +83,14 @@ function main() { // Get A WebGL context - var canvas = document.querySelector("#canvas", {antialias: false}); - var gl = canvas.getContext("webgl"); + var canvas = document.querySelector("#canvas"); + var gl = canvas.getContext("webgl", {antialias: false}); if (!gl) { return; } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-3d-textures-mips.html b/webgl/webgl-3d-textures-mips.html index e776f4429..f4eff641d 100644 --- a/webgl/webgl-3d-textures-mips.html +++ b/webgl/webgl-3d-textures-mips.html @@ -14,7 +14,7 @@ - - @@ -58,14 +58,14 @@ function main() { // Get A WebGL context - var canvas = document.querySelector("#canvas", {antialias: false}); - var gl = canvas.getContext("webgl"); + var canvas = document.querySelector("#canvas"); + var gl = canvas.getContext("webgl", {antialias: false}); if (!gl) { return; } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-3d-textures-repeat-clamp.html b/webgl/webgl-3d-textures-repeat-clamp.html index 06a25f79d..ddae6c936 100644 --- a/webgl/webgl-3d-textures-repeat-clamp.html +++ b/webgl/webgl-3d-textures-repeat-clamp.html @@ -121,7 +121,7 @@ - - @@ -167,14 +167,14 @@ function main() { // Get A WebGL context - var canvas = document.querySelector("#canvas", {antialias: false}); - var gl = canvas.getContext("webgl"); + var canvas = document.querySelector("#canvas"); + var gl = canvas.getContext("webgl", {antialias: false}); if (!gl) { return; } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-3d-textures-texture-atlas.html b/webgl/webgl-3d-textures-texture-atlas.html index 1d9f9f760..0e33f4fa7 100644 --- a/webgl/webgl-3d-textures-texture-atlas.html +++ b/webgl/webgl-3d-textures-texture-atlas.html @@ -14,7 +14,7 @@ - - @@ -66,7 +66,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-3d-textures-texture-coords-mapped.html b/webgl/webgl-3d-textures-texture-coords-mapped.html index 8fe4049de..94202072e 100644 --- a/webgl/webgl-3d-textures-texture-coords-mapped.html +++ b/webgl/webgl-3d-textures-texture-coords-mapped.html @@ -14,7 +14,7 @@ - - @@ -66,7 +66,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-3d-textures.html b/webgl/webgl-3d-textures.html index 40ef59e1f..5e5a9b16e 100644 --- a/webgl/webgl-3d-textures.html +++ b/webgl/webgl-3d-textures.html @@ -14,7 +14,7 @@ - - @@ -66,7 +66,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-animation-frame-rate-issues.html b/webgl/webgl-animation-frame-rate-issues.html index 855a37e0e..85e66776e 100644 --- a/webgl/webgl-animation-frame-rate-issues.html +++ b/webgl/webgl-animation-frame-rate-issues.html @@ -17,7 +17,7 @@ - - @@ -67,7 +67,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-animation-not-frame-rate-independent.html b/webgl/webgl-animation-not-frame-rate-independent.html index cfe33b69b..4ed8b502e 100644 --- a/webgl/webgl-animation-not-frame-rate-independent.html +++ b/webgl/webgl-animation-not-frame-rate-independent.html @@ -14,7 +14,7 @@ - - @@ -63,7 +63,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-animation.html b/webgl/webgl-animation.html index c156feded..54d69ab06 100644 --- a/webgl/webgl-animation.html +++ b/webgl/webgl-animation.html @@ -14,7 +14,7 @@ - - @@ -63,7 +63,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-attributes-2-shaders-same-data.html b/webgl/webgl-attributes-2-shaders-same-data.html index 269d59477..1e93a2ba7 100644 --- a/webgl/webgl-attributes-2-shaders-same-data.html +++ b/webgl/webgl-attributes-2-shaders-same-data.html @@ -62,8 +62,8 @@ diff --git a/webgl/webgl-canvas-clientwidth-clientheight.html b/webgl/webgl-canvas-clientwidth-clientheight.html index abb3f23ab..b062a6bba 100644 --- a/webgl/webgl-canvas-clientwidth-clientheight.html +++ b/webgl/webgl-canvas-clientwidth-clientheight.html @@ -40,7 +40,7 @@
resize this window tall and thin or short and wide.
Notice the F keeps the correct aspect
- - @@ -84,7 +84,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["2d-vertex-shader", "2d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-2d", "fragment-shader-2d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-canvas-width-height.html b/webgl/webgl-canvas-width-height.html index 75f85976a..ab53630e0 100644 --- a/webgl/webgl-canvas-width-height.html +++ b/webgl/webgl-canvas-width-height.html @@ -40,7 +40,7 @@
resize this window tall and thin or short and wide.
Notice the F does NOT keep the correct aspect
- - @@ -83,7 +83,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["2d-vertex-shader", "2d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-2d", "fragment-shader-2d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-clipspace-rectangles-with-varying-non-1-w-repeat.html b/webgl/webgl-clipspace-rectangles-with-varying-non-1-w-repeat.html index 2952c3932..faecf13ac 100644 --- a/webgl/webgl-clipspace-rectangles-with-varying-non-1-w-repeat.html +++ b/webgl/webgl-clipspace-rectangles-with-varying-non-1-w-repeat.html @@ -14,12 +14,12 @@ - - - - - - - - diff --git a/webgl/webgl-cors-permission-good.html b/webgl/webgl-cors-permission-good.html index faa5598a7..666aced98 100644 --- a/webgl/webgl-cors-permission-good.html +++ b/webgl/webgl-cors-permission-good.html @@ -38,8 +38,8 @@ diff --git a/webgl/webgl-cubemap-environment-map.html b/webgl/webgl-cubemap-environment-map.html index 337b2bd5c..fcb4c68b2 100644 --- a/webgl/webgl-cubemap-environment-map.html +++ b/webgl/webgl-cubemap-environment-map.html @@ -14,7 +14,7 @@ - - @@ -80,7 +80,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-cubemap-faces.html b/webgl/webgl-cubemap-faces.html index e24754f6f..a9f86e85b 100644 --- a/webgl/webgl-cubemap-faces.html +++ b/webgl/webgl-cubemap-faces.html @@ -21,8 +21,8 @@ diff --git a/webgl/webgl-cubemap.html b/webgl/webgl-cubemap.html index 3c2559608..c1f4688b5 100644 --- a/webgl/webgl-cubemap.html +++ b/webgl/webgl-cubemap.html @@ -14,7 +14,7 @@ - - @@ -67,7 +67,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-data-texture-3x2-bad.html b/webgl/webgl-data-texture-3x2-bad.html index 4a0740076..52885cf5c 100644 --- a/webgl/webgl-data-texture-3x2-bad.html +++ b/webgl/webgl-data-texture-3x2-bad.html @@ -14,7 +14,7 @@ - - @@ -66,7 +66,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-data-texture-3x2.html b/webgl/webgl-data-texture-3x2.html index adbd9aa35..1a27c56f4 100644 --- a/webgl/webgl-data-texture-3x2.html +++ b/webgl/webgl-data-texture-3x2.html @@ -14,7 +14,7 @@ - - @@ -66,7 +66,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-environment-map-sphere.html b/webgl/webgl-environment-map-sphere.html index 16fbf7626..b56688e36 100644 --- a/webgl/webgl-environment-map-sphere.html +++ b/webgl/webgl-environment-map-sphere.html @@ -14,7 +14,7 @@ - - @@ -80,7 +80,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-environment-map.html b/webgl/webgl-environment-map.html index 77e5ca580..219d5cdd1 100644 --- a/webgl/webgl-environment-map.html +++ b/webgl/webgl-environment-map.html @@ -14,7 +14,7 @@ - - @@ -80,7 +80,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-fundamentals.html b/webgl/webgl-fundamentals.html index 70b9a3963..26b53aec1 100644 --- a/webgl/webgl-fundamentals.html +++ b/webgl/webgl-fundamentals.html @@ -14,12 +14,12 @@ - - - - - - - - @@ -26,7 +26,7 @@ - - - @@ -117,7 +117,7 @@ var bufferInfo = webglUtils.createBufferInfoFromArrays(gl, arrays); // setup GLSL program - var programInfo = webglUtils.createProgramInfo(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var programInfo = webglUtils.createProgramInfo(gl, ["vertex-shader-3d", "fragment-shader-3d"]); function degToRad(d) { return d * Math.PI / 180; diff --git a/webgl/webgl-less-code-more-fun-quad.html b/webgl/webgl-less-code-more-fun-quad.html index 759facce0..4b7c4e0d1 100644 --- a/webgl/webgl-less-code-more-fun-quad.html +++ b/webgl/webgl-less-code-more-fun-quad.html @@ -14,7 +14,7 @@ - - @@ -117,7 +117,7 @@ var bufferInfo = webglUtils.createBufferInfoFromArrays(gl, arrays); // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); var uniformSetters = webglUtils.createUniformSetters(gl, program); var attribSetters = webglUtils.createAttributeSetters(gl, program); diff --git a/webgl/webgl-less-code-more-fun-triangle.html b/webgl/webgl-less-code-more-fun-triangle.html index d95b7bf6d..61c227121 100644 --- a/webgl/webgl-less-code-more-fun-triangle.html +++ b/webgl/webgl-less-code-more-fun-triangle.html @@ -14,7 +14,7 @@ - - @@ -116,7 +116,7 @@ var bufferInfo = webglUtils.createBufferInfoFromArrays(gl, arrays); // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); var uniformSetters = webglUtils.createUniformSetters(gl, program); var attribSetters = webglUtils.createAttributeSetters(gl, program); diff --git a/webgl/webgl-less-code-more-fun.html b/webgl/webgl-less-code-more-fun.html index 9df418c67..01c4b5c1f 100644 --- a/webgl/webgl-less-code-more-fun.html +++ b/webgl/webgl-less-code-more-fun.html @@ -14,7 +14,7 @@ - - @@ -107,7 +107,7 @@ var buffers = window.primitives.createSphereBuffers(gl, 10, 48, 24); // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); var uniformSetters = webglUtils.createUniformSetters(gl, program); var attribSetters = webglUtils.createAttributeSetters(gl, program); diff --git a/webgl/webgl-multiple-objects-list-optimized-sorted.html b/webgl/webgl-multiple-objects-list-optimized-sorted.html index bcda967a4..5ddc3211e 100644 --- a/webgl/webgl-multiple-objects-list-optimized-sorted.html +++ b/webgl/webgl-multiple-objects-list-optimized-sorted.html @@ -34,15 +34,15 @@ - - @@ -25,7 +25,7 @@ - - - - - - - - @@ -29,7 +29,7 @@ - - @@ -29,7 +29,7 @@ - - - - @@ -29,7 +29,7 @@ - - @@ -29,7 +29,7 @@ - - diff --git a/webgl/webgl-no-data-point-rain-less-repeat.html b/webgl/webgl-no-data-point-rain-less-repeat.html index 39327775c..86ea18a5f 100644 --- a/webgl/webgl-no-data-point-rain-less-repeat.html +++ b/webgl/webgl-no-data-point-rain-less-repeat.html @@ -14,8 +14,8 @@ diff --git a/webgl/webgl-no-data-point-rain-linear.html b/webgl/webgl-no-data-point-rain-linear.html index 031353c5c..90ecd2ffd 100644 --- a/webgl/webgl-no-data-point-rain-linear.html +++ b/webgl/webgl-no-data-point-rain-linear.html @@ -14,8 +14,8 @@ diff --git a/webgl/webgl-no-data-point-rain.html b/webgl/webgl-no-data-point-rain.html index 3d390074b..e44c8dd6c 100644 --- a/webgl/webgl-no-data-point-rain.html +++ b/webgl/webgl-no-data-point-rain.html @@ -14,8 +14,8 @@ diff --git a/webgl/webgl-no-data-triangles-circle.html b/webgl/webgl-no-data-triangles-circle.html index 981ef8e4e..a19540834 100644 --- a/webgl/webgl-no-data-triangles-circle.html +++ b/webgl/webgl-no-data-triangles-circle.html @@ -14,8 +14,8 @@ diff --git a/webgl/webgl-no-data-triangles-circles.html b/webgl/webgl-no-data-triangles-circles.html index 665c86546..d40016602 100644 --- a/webgl/webgl-no-data-triangles-circles.html +++ b/webgl/webgl-no-data-triangles-circles.html @@ -14,8 +14,8 @@ diff --git a/webgl/webgl-non-perspective-correct-cube.html b/webgl/webgl-non-perspective-correct-cube.html index 87dd51eff..dc9cfaa2d 100644 --- a/webgl/webgl-non-perspective-correct-cube.html +++ b/webgl/webgl-non-perspective-correct-cube.html @@ -19,7 +19,7 @@ - - @@ -74,7 +74,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-perspective-correct-cube.html b/webgl/webgl-perspective-correct-cube.html index aa9bab19c..549f95fc7 100644 --- a/webgl/webgl-perspective-correct-cube.html +++ b/webgl/webgl-perspective-correct-cube.html @@ -19,7 +19,7 @@ - - @@ -71,7 +71,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-planar-projection-setup.html b/webgl/webgl-planar-projection-setup.html index 36cc213e5..6bae32786 100644 --- a/webgl/webgl-planar-projection-setup.html +++ b/webgl/webgl-planar-projection-setup.html @@ -20,8 +20,8 @@ @@ -29,7 +29,7 @@ - - @@ -29,7 +29,7 @@ - - @@ -29,7 +29,7 @@ - - @@ -29,7 +29,7 @@ - - @@ -29,7 +29,7 @@ - - - @@ -94,7 +94,7 @@ } // setup GLSL program - const program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + const program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. const posTexIndexLoc = gl.getAttribLocation( diff --git a/webgl/webgl-ramp-texture-issue-confirm.html b/webgl/webgl-ramp-texture-issue-confirm.html index 5f9c665fb..97c8c34df 100644 --- a/webgl/webgl-ramp-texture-issue-confirm.html +++ b/webgl/webgl-ramp-texture-issue-confirm.html @@ -19,7 +19,7 @@ - - @@ -103,7 +103,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-ramp-texture-linear.html b/webgl/webgl-ramp-texture-linear.html index ddefb35a2..77bfb5621 100644 --- a/webgl/webgl-ramp-texture-linear.html +++ b/webgl/webgl-ramp-texture-linear.html @@ -19,7 +19,7 @@ - - @@ -92,7 +92,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-ramp-texture.html b/webgl/webgl-ramp-texture.html index 06c98cc4e..0d557b190 100644 --- a/webgl/webgl-ramp-texture.html +++ b/webgl/webgl-ramp-texture.html @@ -19,7 +19,7 @@ - - @@ -92,7 +92,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-ramp-textures.html b/webgl/webgl-ramp-textures.html index 05329cc5d..90e708465 100644 --- a/webgl/webgl-ramp-textures.html +++ b/webgl/webgl-ramp-textures.html @@ -19,7 +19,7 @@ - - @@ -101,7 +101,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-render-to-texture-3-cubes-no-depth-buffer.html b/webgl/webgl-render-to-texture-3-cubes-no-depth-buffer.html index f43355964..31d575165 100644 --- a/webgl/webgl-render-to-texture-3-cubes-no-depth-buffer.html +++ b/webgl/webgl-render-to-texture-3-cubes-no-depth-buffer.html @@ -14,7 +14,7 @@ - - @@ -67,7 +67,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-render-to-texture-3-cubes-with-depth-buffer.html b/webgl/webgl-render-to-texture-3-cubes-with-depth-buffer.html index 7b0d9e1d9..0afdf2edf 100644 --- a/webgl/webgl-render-to-texture-3-cubes-with-depth-buffer.html +++ b/webgl/webgl-render-to-texture-3-cubes-with-depth-buffer.html @@ -14,7 +14,7 @@ - - @@ -67,7 +67,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-render-to-texture.html b/webgl/webgl-render-to-texture.html index 147ad738d..f48158071 100644 --- a/webgl/webgl-render-to-texture.html +++ b/webgl/webgl-render-to-texture.html @@ -14,7 +14,7 @@ - - @@ -66,7 +66,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-resize-canvas-hd-dpi.html b/webgl/webgl-resize-canvas-hd-dpi.html index c788ab2a1..b72d965a1 100644 --- a/webgl/webgl-resize-canvas-hd-dpi.html +++ b/webgl/webgl-resize-canvas-hd-dpi.html @@ -21,7 +21,7 @@ - - @@ -63,7 +63,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["2d-vertex-shader", "2d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-2d", "fragment-shader-2d"]); gl.useProgram(program); // look up where the vertex data needs to go. diff --git a/webgl/webgl-resize-canvas-viewport.html b/webgl/webgl-resize-canvas-viewport.html index 733b8b3c5..217fab710 100644 --- a/webgl/webgl-resize-canvas-viewport.html +++ b/webgl/webgl-resize-canvas-viewport.html @@ -21,7 +21,7 @@ - - @@ -63,7 +63,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["2d-vertex-shader", "2d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-2d", "fragment-shader-2d"]); gl.useProgram(program); // look up where the vertex data needs to go. diff --git a/webgl/webgl-resize-canvas.html b/webgl/webgl-resize-canvas.html index dd43dc2be..f7017f4d6 100644 --- a/webgl/webgl-resize-canvas.html +++ b/webgl/webgl-resize-canvas.html @@ -21,7 +21,7 @@ - - @@ -63,7 +63,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["2d-vertex-shader", "2d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-2d", "fragment-shader-2d"]); gl.useProgram(program); // look up where the vertex data needs to go. diff --git a/webgl/webgl-same-code-body-only-fullscreen.html b/webgl/webgl-same-code-body-only-fullscreen.html index 3be2e0ff5..a20f87f50 100644 --- a/webgl/webgl-same-code-body-only-fullscreen.html +++ b/webgl/webgl-same-code-body-only-fullscreen.html @@ -21,8 +21,8 @@ diff --git a/webgl/webgl-same-code-canvas-embedded-border-box.html b/webgl/webgl-same-code-canvas-embedded-border-box.html index 389707590..7f6f39fa2 100644 --- a/webgl/webgl-same-code-canvas-embedded-border-box.html +++ b/webgl/webgl-same-code-canvas-embedded-border-box.html @@ -39,8 +39,8 @@ diff --git a/webgl/webgl-same-code-canvas-embedded.html b/webgl/webgl-same-code-canvas-embedded.html index bebb29d45..9d47c45ae 100644 --- a/webgl/webgl-same-code-canvas-embedded.html +++ b/webgl/webgl-same-code-canvas-embedded.html @@ -35,8 +35,8 @@ diff --git a/webgl/webgl-same-code-canvas-fullscreen.html b/webgl/webgl-same-code-canvas-fullscreen.html index 62c40940d..f5cab2217 100644 --- a/webgl/webgl-same-code-canvas-fullscreen.html +++ b/webgl/webgl-same-code-canvas-fullscreen.html @@ -22,8 +22,8 @@ diff --git a/webgl/webgl-same-code-canvas-partscreen.html b/webgl/webgl-same-code-canvas-partscreen.html index 44aa5bd62..14e1fcd3b 100644 --- a/webgl/webgl-same-code-canvas-partscreen.html +++ b/webgl/webgl-same-code-canvas-partscreen.html @@ -43,8 +43,8 @@ diff --git a/webgl/webgl-same-code-container-embedded-border-box.html b/webgl/webgl-same-code-container-embedded-border-box.html index f0eddb5e5..1dc028cbc 100644 --- a/webgl/webgl-same-code-container-embedded-border-box.html +++ b/webgl/webgl-same-code-container-embedded-border-box.html @@ -47,8 +47,8 @@ diff --git a/webgl/webgl-same-code-container-embedded.html b/webgl/webgl-same-code-container-embedded.html index 2f21c01bf..437074189 100644 --- a/webgl/webgl-same-code-container-embedded.html +++ b/webgl/webgl-same-code-container-embedded.html @@ -41,8 +41,8 @@ diff --git a/webgl/webgl-same-code-container-fullscreen.html b/webgl/webgl-same-code-container-fullscreen.html index 698942117..d129463bd 100644 --- a/webgl/webgl-same-code-container-fullscreen.html +++ b/webgl/webgl-same-code-container-fullscreen.html @@ -29,8 +29,8 @@ diff --git a/webgl/webgl-same-code-container-partscreen.html b/webgl/webgl-same-code-container-partscreen.html index 303f6ec53..2d4149ad2 100644 --- a/webgl/webgl-same-code-container-partscreen.html +++ b/webgl/webgl-same-code-container-partscreen.html @@ -48,8 +48,8 @@ diff --git a/webgl/webgl-same-code-resize.html b/webgl/webgl-same-code-resize.html index b4b625eb5..f908b2f85 100644 --- a/webgl/webgl-same-code-resize.html +++ b/webgl/webgl-same-code-resize.html @@ -67,8 +67,8 @@ diff --git a/webgl/webgl-scene-graph-block-guy.html b/webgl/webgl-scene-graph-block-guy.html index b7b06b997..f4fc7e0d6 100644 --- a/webgl/webgl-scene-graph-block-guy.html +++ b/webgl/webgl-scene-graph-block-guy.html @@ -14,7 +14,7 @@ - - @@ -153,7 +153,7 @@ var cubeBufferInfo = createFlattenedVertices(gl, primitives.createCubeVertices(1)); // setup GLSL program - var programInfo = webglUtils.createProgramInfo(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var programInfo = webglUtils.createProgramInfo(gl, ["vertex-shader-3d", "fragment-shader-3d"]); function degToRad(d) { return d * Math.PI / 180; diff --git a/webgl/webgl-scene-graph-solar-system-adjusted.html b/webgl/webgl-scene-graph-solar-system-adjusted.html index 76f46d048..6e0176f7b 100644 --- a/webgl/webgl-scene-graph-solar-system-adjusted.html +++ b/webgl/webgl-scene-graph-solar-system-adjusted.html @@ -14,7 +14,7 @@ - - @@ -127,7 +127,7 @@ var sphereBufferInfo = createFlattenedVertices(gl, primitives.createSphereVertices(10, 12, 6)); // setup GLSL program - var programInfo = webglUtils.createProgramInfo(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var programInfo = webglUtils.createProgramInfo(gl, ["vertex-shader-3d", "fragment-shader-3d"]); function degToRad(d) { return d * Math.PI / 180; diff --git a/webgl/webgl-scene-graph-solar-system-larger-earth-fixed.html b/webgl/webgl-scene-graph-solar-system-larger-earth-fixed.html index 8a17e2a57..8d62a5de0 100644 --- a/webgl/webgl-scene-graph-solar-system-larger-earth-fixed.html +++ b/webgl/webgl-scene-graph-solar-system-larger-earth-fixed.html @@ -14,7 +14,7 @@ - - @@ -127,7 +127,7 @@ var sphereBufferInfo = createFlattenedVertices(gl, primitives.createSphereVertices(10, 12, 6)); // setup GLSL program - var programInfo = webglUtils.createProgramInfo(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var programInfo = webglUtils.createProgramInfo(gl, ["vertex-shader-3d", "fragment-shader-3d"]); function degToRad(d) { return d * Math.PI / 180; diff --git a/webgl/webgl-scene-graph-solar-system-larger-earth.html b/webgl/webgl-scene-graph-solar-system-larger-earth.html index 501afa87c..9a4322244 100644 --- a/webgl/webgl-scene-graph-solar-system-larger-earth.html +++ b/webgl/webgl-scene-graph-solar-system-larger-earth.html @@ -14,7 +14,7 @@ - - @@ -127,7 +127,7 @@ var sphereBufferInfo = createFlattenedVertices(gl, primitives.createSphereVertices(10, 12, 6)); // setup GLSL program - var programInfo = webglUtils.createProgramInfo(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var programInfo = webglUtils.createProgramInfo(gl, ["vertex-shader-3d", "fragment-shader-3d"]); function degToRad(d) { return d * Math.PI / 180; diff --git a/webgl/webgl-scene-graph-solar-system.html b/webgl/webgl-scene-graph-solar-system.html index ef8571a00..8570b65bd 100644 --- a/webgl/webgl-scene-graph-solar-system.html +++ b/webgl/webgl-scene-graph-solar-system.html @@ -14,7 +14,7 @@ - - @@ -127,7 +127,7 @@ var sphereBufferInfo = createFlattenedVertices(gl, primitives.createSphereVertices(10, 12, 6)); // setup GLSL program - var programInfo = webglUtils.createProgramInfo(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var programInfo = webglUtils.createProgramInfo(gl, ["vertex-shader-3d", "fragment-shader-3d"]); function degToRad(d) { return d * Math.PI / 180; diff --git a/webgl/webgl-shadows-basic-w-bias.html b/webgl/webgl-shadows-basic-w-bias.html index 8e20c74bf..b3c3d4c35 100644 --- a/webgl/webgl-shadows-basic-w-bias.html +++ b/webgl/webgl-shadows-basic-w-bias.html @@ -28,8 +28,8 @@ @@ -37,7 +37,7 @@ - - @@ -37,7 +37,7 @@ - - @@ -37,7 +37,7 @@ - - @@ -37,7 +37,7 @@ - - @@ -37,7 +37,7 @@ - - diff --git a/webgl/webgl-simple-point.html b/webgl/webgl-simple-point.html index 2011dcfa4..9c311b33c 100644 --- a/webgl/webgl-simple-point.html +++ b/webgl/webgl-simple-point.html @@ -16,8 +16,8 @@ diff --git a/webgl/webgl-simple-points.html b/webgl/webgl-simple-points.html index 27fc3204d..00b76d17b 100644 --- a/webgl/webgl-simple-points.html +++ b/webgl/webgl-simple-points.html @@ -16,8 +16,8 @@ diff --git a/webgl/webgl-skinning-3d-gltf-skinned.html b/webgl/webgl-skinning-3d-gltf-skinned.html index a2bbf99c2..9827708ea 100644 --- a/webgl/webgl-skinning-3d-gltf-skinned.html +++ b/webgl/webgl-skinning-3d-gltf-skinned.html @@ -92,8 +92,8 @@ diff --git a/webgl/webgl-skinning-3d-gltf.html b/webgl/webgl-skinning-3d-gltf.html index dc268a95f..da244005c 100644 --- a/webgl/webgl-skinning-3d-gltf.html +++ b/webgl/webgl-skinning-3d-gltf.html @@ -42,8 +42,8 @@ diff --git a/webgl/webgl-skinning-bone-matrices-in-texture.html b/webgl/webgl-skinning-bone-matrices-in-texture.html index 88113bcbc..b25bf6c7e 100644 --- a/webgl/webgl-skinning-bone-matrices-in-texture.html +++ b/webgl/webgl-skinning-bone-matrices-in-texture.html @@ -67,8 +67,8 @@ diff --git a/webgl/webgl-skinning.html b/webgl/webgl-skinning.html index 5afa65050..34f94fee7 100644 --- a/webgl/webgl-skinning.html +++ b/webgl/webgl-skinning.html @@ -51,8 +51,8 @@ diff --git a/webgl/webgl-skybox-plus-environment-map.html b/webgl/webgl-skybox-plus-environment-map.html index 617aa39e1..8aa0787fc 100644 --- a/webgl/webgl-skybox-plus-environment-map.html +++ b/webgl/webgl-skybox-plus-environment-map.html @@ -80,8 +80,8 @@ diff --git a/webgl/webgl-skybox.html b/webgl/webgl-skybox.html index de5687689..c0c535f21 100644 --- a/webgl/webgl-skybox.html +++ b/webgl/webgl-skybox.html @@ -14,7 +14,7 @@ - - @@ -58,7 +58,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-text-glyphs-texture-atlas.html b/webgl/webgl-text-glyphs-texture-atlas.html index 5d78a8e56..ac2b5b01d 100644 --- a/webgl/webgl-text-glyphs-texture-atlas.html +++ b/webgl/webgl-text-glyphs-texture-atlas.html @@ -8,8 +8,8 @@ @@ -20,7 +20,7 @@ - - @@ -29,7 +29,7 @@ - - @@ -50,7 +50,7 @@ - - @@ -47,7 +47,7 @@ - - @@ -47,7 +47,7 @@ - - - @@ -103,7 +103,7 @@ divContainerElement.appendChild(div); // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-text-html-divs.html b/webgl/webgl-text-html-divs.html index a82566133..a427b7f12 100644 --- a/webgl/webgl-text-html-divs.html +++ b/webgl/webgl-text-html-divs.html @@ -41,8 +41,8 @@ @@ -58,7 +58,7 @@ - - @@ -46,7 +46,7 @@ - - @@ -43,7 +43,7 @@ - - - @@ -78,7 +78,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-text-texture-consistent-scale.html b/webgl/webgl-text-texture-consistent-scale.html index b68dbb5b7..205dea8b5 100644 --- a/webgl/webgl-text-texture-consistent-scale.html +++ b/webgl/webgl-text-texture-consistent-scale.html @@ -17,8 +17,8 @@ @@ -29,7 +29,7 @@ - - @@ -29,7 +29,7 @@ - - @@ -29,7 +29,7 @@ - - @@ -32,7 +32,7 @@ - - @@ -29,7 +29,7 @@ - - @@ -29,7 +29,7 @@ - - @@ -29,7 +29,7 @@ - - @@ -32,7 +32,7 @@ - - - @@ -63,7 +63,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-tips-screenshot-bad.html b/webgl/webgl-tips-screenshot-bad.html index e436c0590..cc84bc496 100644 --- a/webgl/webgl-tips-screenshot-bad.html +++ b/webgl/webgl-tips-screenshot-bad.html @@ -22,7 +22,7 @@ - - @@ -71,7 +71,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-tips-screenshot-good.html b/webgl/webgl-tips-screenshot-good.html index e8e16bc93..2a876050e 100644 --- a/webgl/webgl-tips-screenshot-good.html +++ b/webgl/webgl-tips-screenshot-good.html @@ -22,7 +22,7 @@ - - @@ -71,7 +71,7 @@ } // setup GLSL program - var program = webglUtils.createProgramFromScripts(gl, ["3d-vertex-shader", "3d-fragment-shader"]); + var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-3d", "fragment-shader-3d"]); // look up where the vertex data needs to go. var positionLocation = gl.getAttribLocation(program, "a_position"); diff --git a/webgl/webgl-visualize-camera-with-frustum.html b/webgl/webgl-visualize-camera-with-frustum.html index 7b6c33913..39547dffd 100644 --- a/webgl/webgl-visualize-camera-with-frustum.html +++ b/webgl/webgl-visualize-camera-with-frustum.html @@ -20,8 +20,8 @@ @@ -29,7 +29,7 @@ - - @@ -29,7 +29,7 @@ - - @@ -29,7 +29,7 @@ - -