Skip to content

Commit f1f9a1c

Browse files
authored
Docs: Improve WebGL compatibilty guide. (#28630)
1 parent ee32a01 commit f1f9a1c

File tree

9 files changed

+30
-31
lines changed

9 files changed

+30
-31
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,22 @@
99
<body class="rtl">
1010
<h1>فحص توافق WebGL</h1>
1111
<p>
12-
على الرغم من أن هذه المشكلة أصبحت أقل وأقل ، إلا أن بعض الأجهزة أو المتصفحات قد لا تدعم WebGL.
12+
على الرغم من أن هذه المشكلة أصبحت أقل وأقل ، إلا أن بعض الأجهزة أو المتصفحات قد لا تدعم WebGL 2.
1313
تتيح لك الطريقة التالية التحقق مما إذا كانت مدعومة وعرض رسالة للمستخدم إذا لم تكن مدعومة.
1414
قم باستيراد وحدة الكشف عن دعم WebGL ، وقم بتشغيل ما يلي قبل محاولة عرض أي شيء.
1515
</p>
1616

1717
<code>
1818
import WebGL from 'three/addons/capabilities/WebGL.js';
1919

20-
if ( WebGL.isWebGLAvailable() ) {
20+
if ( WebGL.isWebGL2Available() ) {
2121

2222
// Initiate function or other initializations here
2323
animate();
2424

2525
} else {
2626

27-
const warning = WebGL.getWebGLErrorMessage();
27+
const warning = WebGL.getWebGL2ErrorMessage();
2828
document.getElementById( 'container' ).appendChild( warning );
2929

3030
}

docs/manual/en/introduction/WebGL-compatibility-check.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,22 @@
99
<body>
1010
<h1>[name]</h1>
1111
<p>
12-
Even though this is becoming less and less of a problem, some devices or browsers may still not support WebGL.
12+
Even though this is becoming less and less of a problem, some devices or browsers may still not support WebGL 2.
1313
The following method allows you to check if it is supported and display a message to the user if it is not.
1414
Import the WebGL support detection module, and run the following before attempting to render anything.
1515
</p>
1616

1717
<code>
1818
import WebGL from 'three/addons/capabilities/WebGL.js';
1919

20-
if ( WebGL.isWebGLAvailable() ) {
20+
if ( WebGL.isWebGL2Available() ) {
2121

2222
// Initiate function or other initializations here
2323
animate();
2424

2525
} else {
2626

27-
const warning = WebGL.getWebGLErrorMessage();
27+
const warning = WebGL.getWebGL2ErrorMessage();
2828
document.getElementById( 'container' ).appendChild( warning );
2929

3030
}

docs/manual/fr/introduction/WebGL-compatibility-check.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,22 @@
99
<body>
1010
<h1>Compatibilité WebGL ([name])</h1>
1111
<p>
12-
Même si le problème se présente de moins en moins, certains appareils ou navigateurs peuvent ne toujours pas supporter WebGL.
12+
Même si le problème se présente de moins en moins, certains appareils ou navigateurs peuvent ne toujours pas supporter WebGL 2.
1313
La méthode suivante vous permet de vérifier si il est supporté et d'afficher un message à l'utilisateur si il ne l'est pas.
1414
Importez le module de détection de support WebGL et exécutez ce qui suit avant d'essayer de rendre quoi que ce soit.
1515
</p>
1616

1717
<code>
1818
import WebGL from 'three/addons/capabilities/WebGL.js';
1919

20-
if ( WebGL.isWebGLAvailable() ) {
20+
if ( WebGL.isWebGL2Available() ) {
2121

2222
// Initiate function or other initializations here
2323
animate();
2424

2525
} else {
2626

27-
const warning = WebGL.getWebGLErrorMessage();
27+
const warning = WebGL.getWebGL2ErrorMessage();
2828
document.getElementById( 'container' ).appendChild( warning );
2929

3030
}

docs/manual/it/introduction/WebGL-compatibility-check.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,23 @@
99
<body>
1010
<h1>Controllo compatibilità WebGL ([name])</h1>
1111
<p>
12-
Anche se questo sta diventano sempre meno un problema, alcuni dispositivi o browser potrebbero ancora non supportare WebGL.
13-
Il seguente codice è utile per controllare se WebGL è supportato, infatti se non lo fosse viene mostrato un messaggio di errore all'utente.
12+
Anche se questo sta diventano sempre meno un problema, alcuni dispositivi o browser potrebbero ancora non supportare WebGL 2.
13+
Il seguente codice è utile per controllare se WebGL 2 è supportato, infatti se non lo fosse viene mostrato un messaggio di errore all'utente.
1414
Importa il modulo di rilevamento del supporto WebGL ed esegui quanto segue prima di tentare di eseguire il rendering di qualsiasi cosa.
1515
</p>
1616

1717

1818
<code>
1919
import WebGL from 'three/addons/capabilities/WebGL.js';
2020

21-
if ( WebGL.isWebGLAvailable() ) {
21+
if ( WebGL.isWebGL2Available() ) {
2222

23-
// Avviare qui la funzione o altre inizializzazioni
23+
// Initiate function or other initializations here
2424
animate();
2525

2626
} else {
2727

28-
const warning = WebGL.getWebGLErrorMessage();
28+
const warning = WebGL.getWebGL2ErrorMessage();
2929
document.getElementById( 'container' ).appendChild( warning );
3030

3131
}

docs/manual/ja/introduction/WebGL-compatibility-check.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ <h1>[name]</h1>
1616
<code>
1717
import WebGL from 'three/addons/capabilities/WebGL.js';
1818

19-
if ( WebGL.isWebGLAvailable() ) {
19+
if ( WebGL.isWebGL2Available() ) {
2020

2121
// Initiate function or other initializations here
2222
animate();
2323

2424
} else {
2525

26-
const warning = WebGL.getWebGLErrorMessage();
26+
const warning = WebGL.getWebGL2ErrorMessage();
2727
document.getElementById( 'container' ).appendChild( warning );
2828

2929
}

docs/manual/ko/introduction/WebGL-compatibility-check.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,22 @@
99
<body>
1010
<h1>WebGL 호환성 검사([name])</h1>
1111
<p>
12-
아마 거의 문제가 되지 않을테지만, 몇몇 디바이스나 브라우저는 아직 WebGL을 지원하지 않습니다.
12+
아마 거의 문제가 되지 않을테지만, 몇몇 디바이스나 브라우저는 아직 WebGL 2을 지원하지 않습니다.
1313
아래 메서드는 지원 여부를 체크해 가능한지 아닌지 메세지를 띄워줄 것입니다.
1414
WebGL 지원 감지 모듈을 가져오고 렌더링을 시도하기 전에 다음을 실행하십시오.
1515
</p>
1616

1717
<code>
1818
import WebGL from 'three/addons/capabilities/WebGL.js';
1919

20-
if ( WebGL.isWebGLAvailable() ) {
20+
if ( WebGL.isWebGL2Available() ) {
2121

2222
// Initiate function or other initializations here
2323
animate();
2424

2525
} else {
2626

27-
const warning = WebGL.getWebGLErrorMessage();
27+
const warning = WebGL.getWebGL2ErrorMessage();
2828
document.getElementById( 'container' ).appendChild( warning );
2929

3030
}

docs/manual/pt-br/introduction/WebGL-compatibility-check.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,22 @@
1010
<h1>Compatibilidade WebGL</h1>
1111

1212
<p>
13-
Mesmo que isso esteja se tornando um problema cada vez menor, alguns dispositivos ou navegadores podem ainda não suportar WebGL.
13+
Mesmo que isso esteja se tornando um problema cada vez menor, alguns dispositivos ou navegadores podem ainda não suportar WebGL 2.
1414
O método a seguir permite verificar se há suporte e exibe uma mensagem para o usuário se não existir.
1515
Importe o módulo de detecção de suporte WebGL e execute o seguinte antes de tentar renderizar qualquer coisa.
1616
</p>
1717

1818
<code>
1919
import WebGL from 'three/addons/capabilities/WebGL.js';
2020

21-
if ( WebGL.isWebGLAvailable() ) {
21+
if ( WebGL.isWebGL2Available() ) {
2222

2323
// Initiate function or other initializations here
2424
animate();
2525

2626
} else {
2727

28-
const warning = WebGL.getWebGLErrorMessage();
28+
const warning = WebGL.getWebGL2ErrorMessage();
2929
document.getElementById( 'container' ).appendChild( warning );
3030

3131
}

docs/manual/ru/introduction/WebGL-compatibility-check.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,22 @@
99
<body>
1010
<h1>Проверка совместимости с WebGL ([name])</h1>
1111
<p>
12-
Несмотря на то, что это становится все менее и менее серьезной проблемой, но все еще некоторые устройства или браузеры могут не поддерживать WebGL.
12+
Несмотря на то, что это становится все менее и менее серьезной проблемой, но все еще некоторые устройства или браузеры могут не поддерживать WebGL 2.
1313
Следующий метод позволяет вам проверить, поддерживается ли он, и отобразить сообщение пользователю, если это не так.
1414
Импортируйте модуль обнаружения поддержки WebGL и выполните следующее, прежде чем пытаться что-либо отобразить.
1515
</p>
1616

1717
<code>
1818
import WebGL from 'three/addons/capabilities/WebGL.js';
1919

20-
if ( WebGL.isWebGLAvailable() ) {
20+
if ( WebGL.isWebGL2Available() ) {
2121

22-
// Инициализируйте функцию или другие инициализации здесь
22+
// Initiate function or other initializations here
2323
animate();
2424

2525
} else {
2626

27-
const warning = WebGL.getWebGLErrorMessage();
27+
const warning = WebGL.getWebGL2ErrorMessage();
2828
document.getElementById( 'container' ).appendChild( warning );
2929

3030
}

docs/manual/zh/introduction/WebGL-compatibility-check.html

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,24 @@
99
<body>
1010
<h1>WebGL兼容性检查([name])</h1>
1111
<p>
12-
虽然这个问题现在已经变得越来不明显,但不可否定的是,某些设备以及浏览器直到现在仍然不支持WebGL。
13-
<br>以下的方法可以帮助你检测当前用户所使用的环境是否支持WebGL,如果不支持,将会向用户提示一条信息。
12+
虽然这个问题现在已经变得越来不明显,但不可否定的是,某些设备以及浏览器直到现在仍然不支持WebGL 2
13+
<br>以下的方法可以帮助你检测当前用户所使用的环境是否支持WebGL 2,如果不支持,将会向用户提示一条信息。
1414
</p>
1515
<p>
16-
请将[link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/capabilities/WebGL.js]引入到你的文件,并在尝试开始渲染之前先运行该文件。
1716
导入 WebGL 兼容检测模块,并在尝试渲染任何内容之前运行以下程序。
1817
</p>
1918

2019
<code>
2120
import WebGL from 'three/addons/capabilities/WebGL.js';
2221

23-
if ( WebGL.isWebGLAvailable() ) {
22+
if ( WebGL.isWebGL2Available() ) {
2423

2524
// Initiate function or other initializations here
2625
animate();
2726

2827
} else {
2928

30-
const warning = WebGL.getWebGLErrorMessage();
29+
const warning = WebGL.getWebGL2ErrorMessage();
3130
document.getElementById( 'container' ).appendChild( warning );
3231

3332
}

0 commit comments

Comments
 (0)