浏览代码

Docs: Improved code examples in Arabic pages.

Mugen87 4 年之前
父节点
当前提交
1b7c5c2c16

+ 3 - 3
docs/api/ar/audio/Audio.html

@@ -22,14 +22,14 @@
 
 
 		<code>
 		<code>
 		// create an AudioListener and add it to the camera
 		// create an AudioListener and add it to the camera
-		var listener = new THREE.AudioListener();
+		const listener = new THREE.AudioListener();
 		camera.add( listener );
 		camera.add( listener );
 
 
 		// create a global audio source
 		// create a global audio source
-		var sound = new THREE.Audio( listener );
+		const sound = new THREE.Audio( listener );
 
 
 		// load a sound and set it as the Audio object's buffer
 		// load a sound and set it as the Audio object's buffer
-		var audioLoader = new THREE.AudioLoader();
+		const audioLoader = new THREE.AudioLoader();
 		audioLoader.load( 'sounds/ambient.ogg', function( buffer ) {
 		audioLoader.load( 'sounds/ambient.ogg', function( buffer ) {
 			sound.setBuffer( buffer );
 			sound.setBuffer( buffer );
 			sound.setLoop( true );
 			sound.setLoop( true );

+ 5 - 5
docs/api/ar/audio/AudioAnalyser.html

@@ -21,14 +21,14 @@
 
 
 		<code>
 		<code>
 		// create an AudioListener and add it to the camera
 		// create an AudioListener and add it to the camera
-		var listener = new THREE.AudioListener();
+		const listener = new THREE.AudioListener();
 		camera.add( listener );
 		camera.add( listener );
 
 
 		// create an Audio source
 		// create an Audio source
-		var sound = new THREE.Audio( listener );
+		const sound = new THREE.Audio( listener );
 
 
 		// load a sound and set it as the Audio object's buffer
 		// load a sound and set it as the Audio object's buffer
-		var audioLoader = new THREE.AudioLoader();
+		const audioLoader = new THREE.AudioLoader();
 		audioLoader.load( 'sounds/ambient.ogg', function( buffer ) {
 		audioLoader.load( 'sounds/ambient.ogg', function( buffer ) {
 			sound.setBuffer( buffer );
 			sound.setBuffer( buffer );
 			sound.setLoop(true);
 			sound.setLoop(true);
@@ -37,10 +37,10 @@
 		});
 		});
 
 
 		// create an AudioAnalyser, passing in the sound and desired fftSize
 		// create an AudioAnalyser, passing in the sound and desired fftSize
-		var analyser = new THREE.AudioAnalyser( sound, 32 );
+		const analyser = new THREE.AudioAnalyser( sound, 32 );
 
 
 		// get the average frequency of the sound
 		// get the average frequency of the sound
-		var data = analyser.getAverageFrequency();
+		const data = analyser.getAverageFrequency();
 		</code>
 		</code>
 
 
 		<h2>أمثلة (Examples)</h2>
 		<h2>أمثلة (Examples)</h2>

+ 3 - 3
docs/api/ar/audio/AudioListener.html

@@ -22,14 +22,14 @@
 
 
 		<code>
 		<code>
 		// create an AudioListener and add it to the camera
 		// create an AudioListener and add it to the camera
-		var listener = new THREE.AudioListener();
+		const listener = new THREE.AudioListener();
 		camera.add( listener );
 		camera.add( listener );
 
 
 		// create a global audio source
 		// create a global audio source
-		var sound = new THREE.Audio( listener );
+		const sound = new THREE.Audio( listener );
 
 
 		// load a sound and set it as the Audio object's buffer
 		// load a sound and set it as the Audio object's buffer
-		var audioLoader = new THREE.AudioLoader();
+		const audioLoader = new THREE.AudioLoader();
 		audioLoader.load( 'sounds/ambient.ogg', function( buffer ) {
 		audioLoader.load( 'sounds/ambient.ogg', function( buffer ) {
 			sound.setBuffer( buffer );
 			sound.setBuffer( buffer );
 			sound.setLoop(true);
 			sound.setLoop(true);

+ 6 - 6
docs/api/ar/audio/PositionalAudio.html

@@ -22,14 +22,14 @@
 
 
 		<code>
 		<code>
 		// create an AudioListener and add it to the camera
 		// create an AudioListener and add it to the camera
-		var listener = new THREE.AudioListener();
+		const listener = new THREE.AudioListener();
 		camera.add( listener );
 		camera.add( listener );
 
 
 		// create the PositionalAudio object (passing in the listener)
 		// create the PositionalAudio object (passing in the listener)
-		var sound = new THREE.PositionalAudio( listener );
+		const sound = new THREE.PositionalAudio( listener );
 
 
 		// load a sound and set it as the PositionalAudio object's buffer
 		// load a sound and set it as the PositionalAudio object's buffer
-		var audioLoader = new THREE.AudioLoader();
+		const audioLoader = new THREE.AudioLoader();
 		audioLoader.load( 'sounds/song.ogg', function( buffer ) {
 		audioLoader.load( 'sounds/song.ogg', function( buffer ) {
 			sound.setBuffer( buffer );
 			sound.setBuffer( buffer );
 			sound.setRefDistance( 20 );
 			sound.setRefDistance( 20 );
@@ -37,9 +37,9 @@
 		});
 		});
 
 
 		// create an object for the sound to play from
 		// create an object for the sound to play from
-		var sphere = new THREE.SphereBufferGeometry( 20, 32, 16 );
-		var material = new THREE.MeshPhongMaterial( { color: 0xff2200 } );
-		var mesh = new THREE.Mesh( sphere, material );
+		const sphere = new THREE.SphereBufferGeometry( 20, 32, 16 );
+		const material = new THREE.MeshPhongMaterial( { color: 0xff2200 } );
+		const mesh = new THREE.Mesh( sphere, material );
 		scene.add( mesh );
 		scene.add( mesh );
 
 
 		// finally add the sound to the mesh
 		// finally add the sound to the mesh

+ 4 - 4
docs/api/ar/cameras/CubeCamera.html

@@ -18,15 +18,15 @@
 
 
 		<code>
 		<code>
 		// Create cube render target
 		// Create cube render target
-		var cubeRenderTarget = new THREE.WebGLCubeRenderTarget( 128, { format: THREE.RGBFormat, generateMipmaps: true, minFilter: THREE.LinearMipmapLinearFilter } );
+		const cubeRenderTarget = new THREE.WebGLCubeRenderTarget( 128, { format: THREE.RGBFormat, generateMipmaps: true, minFilter: THREE.LinearMipmapLinearFilter } );
 
 
 		// Create cube camera
 		// Create cube camera
-		var cubeCamera = new THREE.CubeCamera( 1, 100000, cubeRenderTarget );
+		const cubeCamera = new THREE.CubeCamera( 1, 100000, cubeRenderTarget );
 		scene.add( cubeCamera );
 		scene.add( cubeCamera );
 
 
 		// Create car
 		// Create car
-		var chromeMaterial = new THREE.MeshLambertMaterial( { color: 0xffffff, envMap: cubeRenderTarget.texture } );
-		var car = new Mesh( carGeometry, chromeMaterial );
+		const chromeMaterial = new THREE.MeshLambertMaterial( { color: 0xffffff, envMap: cubeRenderTarget.texture } );
+		const car = new Mesh( carGeometry, chromeMaterial );
 		scene.add( car );
 		scene.add( car );
 
 
 		// Update the render target cube
 		// Update the render target cube

+ 6 - 6
docs/manual/ar/buildTools/Testing-with-NPM.html

@@ -23,7 +23,7 @@
 			</code>
 			</code>
 			و من ثم قم بإضافة
 			و من ثم قم بإضافة
 		<code>
 		<code>
-			var THREE = require('three');
+			const THREE = require('three');
 		</code>
 		</code>
 			للاختبار الخاص بك.
 			للاختبار الخاص بك.
 		</p>
 		</p>
@@ -139,8 +139,8 @@ $ npm install three --save-dev
 				<li>
 				<li>
 					أخيرًا ، نحتاج بالفعل إلى اختبار JS للتشغيل. دعنا نضيف اختبارًا بسيطًا للتحقق من أن الكائن three.js متاح ويعمل. أنشئ test/verify-three.js تحتوي على:
 					أخيرًا ، نحتاج بالفعل إلى اختبار JS للتشغيل. دعنا نضيف اختبارًا بسيطًا للتحقق من أن الكائن three.js متاح ويعمل. أنشئ test/verify-three.js تحتوي على:
 <code>
 <code>
-var THREE = require('three');
-var assert = require("assert");
+const THREE = require('three');
+const assert = require("assert");
 
 
 describe('The THREE object', function() {
 describe('The THREE object', function() {
   it('should have a defined BasicShadowMap constant', function() {
   it('should have a defined BasicShadowMap constant', function() {
@@ -148,7 +148,7 @@ describe('The THREE object', function() {
   }),
   }),
 
 
   it('should be able to construct a Vector3 with default of x=0', function() {
   it('should be able to construct a Vector3 with default of x=0', function() {
-    var vec3 = new THREE.Vector3();
+    const vec3 = new THREE.Vector3();
     assert.equal(0, vec3.x);
     assert.equal(0, vec3.x);
   })
   })
 })
 })
@@ -231,8 +231,8 @@ if (typeof exports !== 'undefined')
 //=============================================================================
 //=============================================================================
 if (typeof require === 'function') // test for nodejs environment
 if (typeof require === 'function') // test for nodejs environment
 {
 {
-  var THREE = require('three');
-  var MY3 = require('./MY3.js');
+  const THREE = require('three');
+  const MY3 = require('./MY3.js');
 }
 }
 			</code>
 			</code>
 		</div>
 		</div>

+ 5 - 5
docs/manual/ar/introduction/Animation-system.html

@@ -88,11 +88,11 @@
 		<h2>مثال</h2>
 		<h2>مثال</h2>
 
 
 		<code>
 		<code>
-		var mesh;
+		let mesh;
 
 
 		// Create an AnimationMixer, and get the list of AnimationClip instances
 		// Create an AnimationMixer, and get the list of AnimationClip instances
-		var mixer = new THREE.AnimationMixer( mesh );
-		var clips = mesh.animations;
+		const mixer = new THREE.AnimationMixer( mesh );
+		const clips = mesh.animations;
 
 
 		// Update the mixer on each frame
 		// Update the mixer on each frame
 		function update () {
 		function update () {
@@ -100,8 +100,8 @@
 		}
 		}
 
 
 		// Play a specific animation
 		// Play a specific animation
-		var clip = THREE.AnimationClip.findByName( clips, 'dance' );
-		var action = mixer.clipAction( clip );
+		const clip = THREE.AnimationClip.findByName( clips, 'dance' );
+		const action = mixer.clipAction( clip );
 		action.play();
 		action.play();
 
 
 		// Play all animations
 		// Play all animations

+ 13 - 13
docs/manual/ar/introduction/Creating-a-scene.html

@@ -51,10 +51,10 @@
 		</p>
 		</p>
 
 
 		<code>
 		<code>
-		var scene = new THREE.Scene();
-		var camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );
+		const scene = new THREE.Scene();
+		const camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );
 
 
-		var renderer = new THREE.WebGLRenderer();
+		const renderer = new THREE.WebGLRenderer();
 		renderer.setSize( window.innerWidth, window.innerHeight );
 		renderer.setSize( window.innerWidth, window.innerHeight );
 		document.body.appendChild( renderer.domElement );
 		document.body.appendChild( renderer.domElement );
 		</code>
 		</code>
@@ -123,9 +123,9 @@
 		</p>
 		</p>
 
 
 		<code>
 		<code>
-		var geometry = new THREE.BoxGeometry();
-		var material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
-		var cube = new THREE.Mesh( geometry, material );
+		const geometry = new THREE.BoxGeometry();
+		const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
+		const cube = new THREE.Mesh( geometry, material );
 		scene.add( cube );
 		scene.add( cube );
 
 
 		camera.position.z = 5;
 		camera.position.z = 5;
@@ -237,21 +237,21 @@
 			&lt;body&gt;
 			&lt;body&gt;
 				&lt;script src="js/three.js"&gt;&lt;/script&gt;
 				&lt;script src="js/three.js"&gt;&lt;/script&gt;
 				&lt;script&gt;
 				&lt;script&gt;
-					var scene = new THREE.Scene();
-					var camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );
+					const scene = new THREE.Scene();
+					const camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );
 
 
-					var renderer = new THREE.WebGLRenderer();
+					const renderer = new THREE.WebGLRenderer();
 					renderer.setSize( window.innerWidth, window.innerHeight );
 					renderer.setSize( window.innerWidth, window.innerHeight );
 					document.body.appendChild( renderer.domElement );
 					document.body.appendChild( renderer.domElement );
 
 
-					var geometry = new THREE.BoxGeometry();
-					var material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
-					var cube = new THREE.Mesh( geometry, material );
+					const geometry = new THREE.BoxGeometry();
+					const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
+					const cube = new THREE.Mesh( geometry, material );
 					scene.add( cube );
 					scene.add( cube );
 
 
 					camera.position.z = 5;
 					camera.position.z = 5;
 
 
-					var animate = function () {
+					const animate = function () {
 						requestAnimationFrame( animate );
 						requestAnimationFrame( animate );
 
 
 						cube.rotation.x += 0.01;
 						cube.rotation.x += 0.01;

+ 7 - 7
docs/manual/ar/introduction/Drawing-lines.html

@@ -16,20 +16,20 @@
 
 
 			<p>هذا هو الكود الذي سنستخدمه:</p>
 			<p>هذا هو الكود الذي سنستخدمه:</p>
 			<code>
 			<code>
-var renderer = new THREE.WebGLRenderer();
+const renderer = new THREE.WebGLRenderer();
 renderer.setSize( window.innerWidth, window.innerHeight );
 renderer.setSize( window.innerWidth, window.innerHeight );
 document.body.appendChild( renderer.domElement );
 document.body.appendChild( renderer.domElement );
 
 
-var camera = new THREE.PerspectiveCamera( 45, window.innerWidth / window.innerHeight, 1, 500 );
+const camera = new THREE.PerspectiveCamera( 45, window.innerWidth / window.innerHeight, 1, 500 );
 camera.position.set( 0, 0, 100 );
 camera.position.set( 0, 0, 100 );
 camera.lookAt( 0, 0, 0 );
 camera.lookAt( 0, 0, 0 );
 
 
-var scene = new THREE.Scene();
+const scene = new THREE.Scene();
 			</code>
 			</code>
 			<p>الشيء التالي الذي سنفعله هو تحديد المادة. بالنسبة للخطوط ، يتعين علينا استخدام [page:LineBasicMaterial] أو [page:LineDashedMaterial].</p>
 			<p>الشيء التالي الذي سنفعله هو تحديد المادة. بالنسبة للخطوط ، يتعين علينا استخدام [page:LineBasicMaterial] أو [page:LineDashedMaterial].</p>
 			<code>
 			<code>
 //create a blue LineBasicMaterial
 //create a blue LineBasicMaterial
-var material = new THREE.LineBasicMaterial( { color: 0x0000ff } );
+const material = new THREE.LineBasicMaterial( { color: 0x0000ff } );
 			</code>
 			</code>
 
 
 			<p>
 			<p>
@@ -37,19 +37,19 @@ var material = new THREE.LineBasicMaterial( { color: 0x0000ff } );
 			</p>
 			</p>
 
 
 			<code>
 			<code>
-var points = [];
+const points = [];
 points.push( new THREE.Vector3( - 10, 0, 0 ) );
 points.push( new THREE.Vector3( - 10, 0, 0 ) );
 points.push( new THREE.Vector3( 0, 10, 0 ) );
 points.push( new THREE.Vector3( 0, 10, 0 ) );
 points.push( new THREE.Vector3( 10, 0, 0 ) );
 points.push( new THREE.Vector3( 10, 0, 0 ) );
 
 
-var geometry = new THREE.BufferGeometry().setFromPoints( points );
+const geometry = new THREE.BufferGeometry().setFromPoints( points );
 			</code>
 			</code>
 
 
 			<p>لاحظ أنه تم رسم الخطوط بين كل زوج متتالي من الرؤوس ، ولكن ليس بين الأول والأخير (الخط غير مغلق).</p>
 			<p>لاحظ أنه تم رسم الخطوط بين كل زوج متتالي من الرؤوس ، ولكن ليس بين الأول والأخير (الخط غير مغلق).</p>
 
 
 			<p>الآن بعد أن أصبح لدينا نقاط لخطين ومادة ، يمكننا تجميعها معًا لتشكيل خط.</p>
 			<p>الآن بعد أن أصبح لدينا نقاط لخطين ومادة ، يمكننا تجميعها معًا لتشكيل خط.</p>
 			<code>
 			<code>
-var line = new THREE.Line( geometry, material );
+const line = new THREE.Line( geometry, material );
 			</code>
 			</code>
 			<p>كل ما تبقى هو إضافته إلى المشهد و إستعمال أمر العرض [page:WebGLRenderer.render render].</p>
 			<p>كل ما تبقى هو إضافته إلى المشهد و إستعمال أمر العرض [page:WebGLRenderer.render render].</p>
 
 

+ 13 - 13
docs/manual/ar/introduction/How-to-update-things.html

@@ -12,13 +12,13 @@
 		<div>
 		<div>
 			<p>تقوم كل الكائنات بشكل ألي بتحديث حالتها تلقائيًا إذا تمت إضافتها إلى المشهد باستخدام</p>
 			<p>تقوم كل الكائنات بشكل ألي بتحديث حالتها تلقائيًا إذا تمت إضافتها إلى المشهد باستخدام</p>
 			<code>
 			<code>
-var object = new THREE.Object3D();
+const object = new THREE.Object3D();
 scene.add( object );
 scene.add( object );
 			</code>
 			</code>
 			<p>أو إذا كانوا أبناء كائن آخر تمت إضافته إلى المشهد:</p>
 			<p>أو إذا كانوا أبناء كائن آخر تمت إضافته إلى المشهد:</p>
 			<code>
 			<code>
-var object1 = new THREE.Object3D();
-var object2 = new THREE.Object3D();
+const object1 = new THREE.Object3D();
+const object2 = new THREE.Object3D();
 
 
 object1.add( object2 );
 object1.add( object2 );
 scene.add( object1 ); //object1 and object2 will automatically update their matrices
 scene.add( object1 ); //object1 and object2 will automatically update their matrices
@@ -49,36 +49,36 @@ object.updateMatrix();
 				سنستخدم مثال السطر الذي سيتم تمديده في وقت العرض. سنخصص مساحة في المخزن المؤقت لـ 500 رأس لكننا نرسم اثنين فقط في البداية ، باستخدام [page:BufferGeometry.drawRange].
 				سنستخدم مثال السطر الذي سيتم تمديده في وقت العرض. سنخصص مساحة في المخزن المؤقت لـ 500 رأس لكننا نرسم اثنين فقط في البداية ، باستخدام [page:BufferGeometry.drawRange].
 			</p>
 			</p>
 			<code>
 			<code>
-var MAX_POINTS = 500;
+const MAX_POINTS = 500;
 
 
 // geometry
 // geometry
-var geometry = new THREE.BufferGeometry();
+const geometry = new THREE.BufferGeometry();
 
 
 // attributes
 // attributes
-var positions = new Float32Array( MAX_POINTS * 3 ); // 3 vertices per point
+const positions = new Float32Array( MAX_POINTS * 3 ); // 3 vertices per point
 geometry.setAttribute( 'position', new THREE.BufferAttribute( positions, 3 ) );
 geometry.setAttribute( 'position', new THREE.BufferAttribute( positions, 3 ) );
 
 
 // draw range
 // draw range
-var drawCount = 2; // draw the first 2 points, only
+const drawCount = 2; // draw the first 2 points, only
 geometry.setDrawRange( 0, drawCount );
 geometry.setDrawRange( 0, drawCount );
 
 
 // material
 // material
-var material = new THREE.LineBasicMaterial( { color: 0xff0000 } );
+const material = new THREE.LineBasicMaterial( { color: 0xff0000 } );
 
 
 // line
 // line
-var line = new THREE.Line( geometry,  material );
+const line = new THREE.Line( geometry,  material );
 scene.add( line );
 scene.add( line );
 			</code>
 			</code>
 		 	<p>
 		 	<p>
 				بعد ذلك سنضيف نقاطًا بشكل عشوائي إلى الخط باستخدام نمط مثل:
 				بعد ذلك سنضيف نقاطًا بشكل عشوائي إلى الخط باستخدام نمط مثل:
 			</p>
 			</p>
 			<code>
 			<code>
-var positions = line.geometry.attributes.position.array;
+const positions = line.geometry.attributes.position.array;
 
 
-var x, y, z, index;
+let x, y, z, index;
 x = y = z = index = 0;
 x = y = z = index = 0;
 
 
-for ( var i = 0, l = MAX_POINTS; i < l; i ++ ) {
+for ( let i = 0, l = MAX_POINTS; i < l; i ++ ) {
 
 
     positions[ index ++ ] = x;
     positions[ index ++ ] = x;
     positions[ index ++ ] = y;
     positions[ index ++ ] = y;
@@ -130,7 +130,7 @@ line.geometry.computeBoundingSphere();
 				تتحكم العلامات التالية في تحديث سمات الهندسة المختلفة. قم بتعيين العلامات فقط للسمات التي تحتاج إلى تحديثها ، فالتحديثات مكلفة. بمجرد تغيير المخازن المؤقتة ، يتم إعادة تعيين هذه العلامات تلقائيًا إلى false. تحتاج إلى الاستمرار في ضبطها على true إذا كنت تريد الاستمرار في تحديث المخازن المؤقتة. لاحظ أن هذا ينطبق فقط على [page:Geometry] وليس [page:BufferGeometry].
 				تتحكم العلامات التالية في تحديث سمات الهندسة المختلفة. قم بتعيين العلامات فقط للسمات التي تحتاج إلى تحديثها ، فالتحديثات مكلفة. بمجرد تغيير المخازن المؤقتة ، يتم إعادة تعيين هذه العلامات تلقائيًا إلى false. تحتاج إلى الاستمرار في ضبطها على true إذا كنت تريد الاستمرار في تحديث المخازن المؤقتة. لاحظ أن هذا ينطبق فقط على [page:Geometry] وليس [page:BufferGeometry].
 			</p>
 			</p>
 			<code>
 			<code>
-var geometry = new THREE.Geometry();
+const geometry = new THREE.Geometry();
 geometry.verticesNeedUpdate = true;
 geometry.verticesNeedUpdate = true;
 geometry.elementsNeedUpdate = true;
 geometry.elementsNeedUpdate = true;
 geometry.morphTargetsNeedUpdate = true;
 geometry.morphTargetsNeedUpdate = true;

+ 4 - 4
docs/manual/ar/introduction/How-to-use-post-processing.html

@@ -35,7 +35,7 @@
 		</p>
 		</p>
 
 
 		<code>
 		<code>
-		var composer = new EffectComposer( renderer );
+		const composer = new EffectComposer( renderer );
 		</code>
 		</code>
 
 
 		<p>
 		<p>
@@ -57,10 +57,10 @@
 		</p>
 		</p>
 
 
 		<code>
 		<code>
-		var renderPass = new RenderPass( scene, camera );
+		const renderPass = new RenderPass( scene, camera );
 		composer.addPass( renderPass );
 		composer.addPass( renderPass );
 
 
-		var glitchPass = new GlitchPass();
+		const glitchPass = new GlitchPass();
 		composer.addPass( glitchPass );
 		composer.addPass( glitchPass );
 		</code>
 		</code>
 
 
@@ -86,7 +86,7 @@
 
 
 		// later in your init routine
 		// later in your init routine
 
 
-		var luminosityPass = new ShaderPass( LuminosityShader );
+		const luminosityPass = new ShaderPass( LuminosityShader );
 		composer.addPass( luminosityPass );
 		composer.addPass( luminosityPass );
 		</code>
 		</code>
 
 

+ 1 - 1
docs/manual/ar/introduction/Loading-3D-models.html

@@ -78,7 +78,7 @@
 	</p>
 	</p>
 
 
 	<code>
 	<code>
-		var loader = new GLTFLoader();
+		const loader = new GLTFLoader();
 
 
 		loader.load( 'path/to/model.glb', function ( gltf ) {
 		loader.load( 'path/to/model.glb', function ( gltf ) {
 
 

+ 1 - 1
docs/manual/ar/introduction/WebGL-compatibility-check.html

@@ -26,7 +26,7 @@
 
 
 		} else {
 		} else {
 
 
-			var warning = WEBGL.getWebGLErrorMessage();
+			const warning = WEBGL.getWebGLErrorMessage();
 			document.getElementById( 'container' ).appendChild( warning );
 			document.getElementById( 'container' ).appendChild( warning );
 
 
 		}
 		}