From 03385cc9f4f157cec2e5fd05f35e6af646055908 Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Tue, 14 Sep 2021 11:07:46 +0900 Subject: Web/API以下の文書内のリンクURLを正規化 (#2360) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - /en-US へのリンクを /ja へのリンクに修正 - /ja が付いていないものに /ja を付加 - MDN内のリンクが完全URLの場合、 /ja/docs からのURLに修正 --- files/ja/web/api/webgl_api/basic_2d_animation_example/index.html | 2 +- .../tutorial/adding_2d_content_to_a_webgl_context/index.html | 2 +- files/ja/web/api/webgl_api/webgl_model_view_projection/index.html | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'files/ja/web/api/webgl_api') diff --git a/files/ja/web/api/webgl_api/basic_2d_animation_example/index.html b/files/ja/web/api/webgl_api/basic_2d_animation_example/index.html index 5330c36d31..bad0c8dd0e 100644 --- a/files/ja/web/api/webgl_api/basic_2d_animation_example/index.html +++ b/files/ja/web/api/webgl_api/basic_2d_animation_example/index.html @@ -233,7 +233,7 @@ function startup() {

ソースコードは {{domxref("WebGLRenderingContext.shaderSource", "gl.shaderSource()")}} を通して新しいシェーダーに送信され、そのときシェーダーは {{domxref("WebGLRenderingContext.compileShader", "gl.compileShader()")}} を使用してコンパイルされます。

-

コンパイルエラーはコンソールに記録されます。生成されるメッセージに正しいシェーダータイプの文字列を挿入するためのテンプレートリテラル文字列の使用に注意してください。実際のエラーの詳細は、{{domxref("WebGLRenderingContext.getShaderInfoLog", "gl.getShaderInfoLog()")}}を呼び出すことによって取得されます。

+

コンパイルエラーはコンソールに記録されます。生成されるメッセージに正しいシェーダータイプの文字列を挿入するためのテンプレートリテラル文字列の使用に注意してください。実際のエラーの詳細は、{{domxref("WebGLRenderingContext.getShaderInfoLog", "gl.getShaderInfoLog()")}}を呼び出すことによって取得されます。

最後に、コンパイルされたシェーダーが呼び出し元 (buildShaderProgram() 関数) へ返します。

diff --git a/files/ja/web/api/webgl_api/tutorial/adding_2d_content_to_a_webgl_context/index.html b/files/ja/web/api/webgl_api/tutorial/adding_2d_content_to_a_webgl_context/index.html index c96c77043d..934f52c3ea 100644 --- a/files/ja/web/api/webgl_api/tutorial/adding_2d_content_to_a_webgl_context/index.html +++ b/files/ja/web/api/webgl_api/tutorial/adding_2d_content_to_a_webgl_context/index.html @@ -129,7 +129,7 @@ translation_of: Web/API/WebGL_API/Tutorial/Adding_2D_content_to_a_WebGL_context
  const shaderProgram = initShaderProgram(gl, vsSource, fsSource);
-

After we've created a shader program we need to look up the locations that WebGL assigned to our inputs. In this case we have one attribute and two uniforms. Attributes receive values from buffers. Each iteration of the vertex shader receives the next value from the buffer assigned to that attribute. Uniforms are similar to JavaScript global variables. They stay the same value for all iterations of a shader. Since the attribute and uniform locations are specific to a single shader program we'll store them together to make them easy to pass around

+

After we've created a shader program we need to look up the locations that WebGL assigned to our inputs. In this case we have one attribute and two uniforms. Attributes receive values from buffers. Each iteration of the vertex shader receives the next value from the buffer assigned to that attribute. Uniforms are similar to JavaScript global variables. They stay the same value for all iterations of a shader. Since the attribute and uniform locations are specific to a single shader program we'll store them together to make them easy to pass around

  const programInfo = {
     program: shaderProgram,
diff --git a/files/ja/web/api/webgl_api/webgl_model_view_projection/index.html b/files/ja/web/api/webgl_api/webgl_model_view_projection/index.html
index d686e310bd..304d1604e4 100644
--- a/files/ja/web/api/webgl_api/webgl_model_view_projection/index.html
+++ b/files/ja/web/api/webgl_api/webgl_model_view_projection/index.html
@@ -5,7 +5,7 @@ translation_of: Web/API/WebGL_API/WebGL_model_view_projection
 ---
 

{{WebGLSidebar}}

-

この記事では、WebGL プロジェクト内でデータを取得し、それを適切な空間に投影して画面に表示する方法について説明します。並進、拡縮、回転行列を使用した基本的な行列計算の知識があることを前提としています。3Dシーンを構成するときに通常使用される中心的な3つの行列である、モデル、ビュー、射影行列について説明します。

+

この記事では、WebGL プロジェクト内でデータを取得し、それを適切な空間に投影して画面に表示する方法について説明します。並進、拡縮、回転行列を使用した基本的な行列計算の知識があることを前提としています。3Dシーンを構成するときに通常使用される中心的な3つの行列である、モデル、ビュー、射影行列について説明します。

Note: This article is also available as an MDN content kit. It also uses a collection of utility functions available under the MDN global object.

@@ -687,6 +687,6 @@ gl_Position = projection * model * vec4(position, 1.0);

See also

    -
  • WebGL
  • +
  • WebGL
  • {{interwiki("wikipedia", "3D projection")}}
-- cgit v1.2.3-54-g00ecf