Skip to content

Commit

Permalink
Examples: Clean up.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Jan 6, 2022
1 parent f37eacb commit ab21bee
Show file tree
Hide file tree
Showing 20 changed files with 43 additions and 185 deletions.
4 changes: 2 additions & 2 deletions docs/manual/ar/introduction/WebGL-compatibility-check.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ <h1>فحص توافق WebGL</h1>
</p>

<code>
if ( WEBGL.isWebGLAvailable() ) {
if ( WebGL.isWebGLAvailable() ) {

// Initiate function or other initializations here
animate();

} else {

const warning = WEBGL.getWebGLErrorMessage();
const warning = WebGL.getWebGLErrorMessage();
document.getElementById( 'container' ).appendChild( warning );

}
Expand Down
4 changes: 2 additions & 2 deletions docs/manual/en/introduction/WebGL-compatibility-check.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ <h1>[name]</h1>
</p>

<code>
if ( WEBGL.isWebGLAvailable() ) {
if ( WebGL.isWebGLAvailable() ) {

// Initiate function or other initializations here
animate();

} else {

const warning = WEBGL.getWebGLErrorMessage();
const warning = WebGL.getWebGLErrorMessage();
document.getElementById( 'container' ).appendChild( warning );

}
Expand Down
4 changes: 2 additions & 2 deletions docs/manual/ja/introduction/WebGL-compatibility-check.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ <h1>[name]</h1>
</p>

<code>
if ( WEBGL.isWebGLAvailable() ) {
if ( WebGL.isWebGLAvailable() ) {

// Initiate function or other initializations here
animate();

} else {

const warning = WEBGL.getWebGLErrorMessage();
const warning = WebGL.getWebGLErrorMessage();
document.getElementById( 'container' ).appendChild( warning );

}
Expand Down
4 changes: 2 additions & 2 deletions docs/manual/ko/introduction/WebGL-compatibility-check.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ <h1>WebGL 호환성 검사([name])</h1>
</p>

<code>
if ( WEBGL.isWebGLAvailable() ) {
if ( WebGL.isWebGLAvailable() ) {

// Initiate function or other initializations here
animate();

} else {

const warning = WEBGL.getWebGLErrorMessage();
const warning = WebGL.getWebGLErrorMessage();
document.getElementById( 'container' ).appendChild( warning );

}
Expand Down
4 changes: 2 additions & 2 deletions docs/manual/zh/introduction/WebGL-compatibility-check.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ <h1>WebGL兼容性检查([name])</h1>
</p>

<code>
if (WEBGL.isWebGLAvailable()) {
if (WebGL.isWebGLAvailable()) {
// Initiate function or other initializations here
animate();
} else {
const warning = WEBGL.getWebGLErrorMessage();
const warning = WebGL.getWebGLErrorMessage();
document.getElementById('container').appendChild(warning);
}
</code>
Expand Down
26 changes: 0 additions & 26 deletions examples/js/capabilities/ImportMaps.js

This file was deleted.

90 changes: 0 additions & 90 deletions examples/js/capabilities/WebGL.js

This file was deleted.

27 changes: 0 additions & 27 deletions examples/js/capabilities/WebGPU.js

This file was deleted.

4 changes: 2 additions & 2 deletions examples/jsm/capabilities/WebGL.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class WEBGL {
class WebGL {

static isWebGLAvailable() {

Expand Down Expand Up @@ -88,4 +88,4 @@ class WEBGL {

}

export { WEBGL };
export default WebGL;
6 changes: 3 additions & 3 deletions examples/webgl2_buffergeometry_attributes_integer.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@

import * as THREE from '../build/three.module.js';

import { WEBGL } from './jsm/capabilities/WebGL.js';
import WebGL from './jsm/capabilities/WebGL.js';

if ( WEBGL.isWebGL2Available() === false ) {
if ( WebGL.isWebGL2Available() === false ) {

document.body.appendChild( WEBGL.getWebGL2ErrorMessage() );
document.body.appendChild( WebGL.getWebGL2ErrorMessage() );

}

Expand Down
6 changes: 3 additions & 3 deletions examples/webgl2_materials_texture2darray.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@
import Stats from './jsm/libs/stats.module.js';
import { unzipSync } from './jsm/libs/fflate.module.js';

import { WEBGL } from './jsm/capabilities/WebGL.js';
import WebGL from './jsm/capabilities/WebGL.js';

if ( WEBGL.isWebGL2Available() === false ) {
if ( WebGL.isWebGL2Available() === false ) {

document.body.appendChild( WEBGL.getWebGL2ErrorMessage() );
document.body.appendChild( WebGL.getWebGL2ErrorMessage() );

}

Expand Down
6 changes: 3 additions & 3 deletions examples/webgl2_materials_texture3d.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
import { OrbitControls } from './jsm/controls/OrbitControls.js';
import { NRRDLoader } from './jsm/loaders/NRRDLoader.js';
import { VolumeRenderShader1 } from './jsm/shaders/VolumeShader.js';
import { WEBGL } from './jsm/capabilities/WebGL.js';
import WebGL from './jsm/capabilities/WebGL.js';

if ( WEBGL.isWebGL2Available() === false ) {
if ( WebGL.isWebGL2Available() === false ) {

document.body.appendChild( WEBGL.getWebGL2ErrorMessage() );
document.body.appendChild( WebGL.getWebGL2ErrorMessage() );

}

Expand Down
6 changes: 3 additions & 3 deletions examples/webgl2_materials_texture3d_partialupdate.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
import { ImprovedNoise } from './jsm/math/ImprovedNoise.js';

import { GUI } from './jsm/libs/lil-gui.module.min.js';
import { WEBGL } from './jsm/capabilities/WebGL.js';
import WebGL from './jsm/capabilities/WebGL.js';

if ( WEBGL.isWebGL2Available() === false ) {
if ( WebGL.isWebGL2Available() === false ) {

document.body.appendChild( WEBGL.getWebGL2ErrorMessage() );
document.body.appendChild( WebGL.getWebGL2ErrorMessage() );

}

Expand Down
6 changes: 3 additions & 3 deletions examples/webgl2_multiple_rendertargets.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@

import * as THREE from '../build/three.module.js';

import { WEBGL } from './jsm/capabilities/WebGL.js';
import WebGL from './jsm/capabilities/WebGL.js';
import { OrbitControls } from './jsm/controls/OrbitControls.js';

let camera, scene, renderer, controls;
Expand All @@ -120,9 +120,9 @@

function init() {

if ( WEBGL.isWebGL2Available() === false ) {
if ( WebGL.isWebGL2Available() === false ) {

document.body.appendChild( WEBGL.getWebGL2ErrorMessage() );
document.body.appendChild( WebGL.getWebGL2ErrorMessage() );
return;

}
Expand Down
6 changes: 3 additions & 3 deletions examples/webgl2_multisampled_renderbuffers.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
import { RenderPass } from './jsm/postprocessing/RenderPass.js';
import { ShaderPass } from './jsm/postprocessing/ShaderPass.js';
import { CopyShader } from './jsm/shaders/CopyShader.js';
import { WEBGL } from './jsm/capabilities/WebGL.js';
import WebGL from './jsm/capabilities/WebGL.js';

let camera, renderer, clock, group, container;

Expand All @@ -51,9 +51,9 @@

function init() {

if ( WEBGL.isWebGL2Available() === false ) {
if ( WebGL.isWebGL2Available() === false ) {

document.body.appendChild( WEBGL.getWebGL2ErrorMessage() );
document.body.appendChild( WebGL.getWebGL2ErrorMessage() );
return;

}
Expand Down
6 changes: 3 additions & 3 deletions examples/webgl2_rendertarget_texture2darray.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@
import { unzipSync } from './jsm/libs/fflate.module.js';
import { GUI } from './jsm/libs/lil-gui.module.min.js';

import { WEBGL } from './jsm/capabilities/WebGL.js';
import WebGL from './jsm/capabilities/WebGL.js';

if ( WEBGL.isWebGL2Available() === false ) {
if ( WebGL.isWebGL2Available() === false ) {

document.body.appendChild( WEBGL.getWebGL2ErrorMessage() );
document.body.appendChild( WebGL.getWebGL2ErrorMessage() );

}

Expand Down
6 changes: 3 additions & 3 deletions examples/webgl2_volume_cloud.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
import { ImprovedNoise } from './jsm/math/ImprovedNoise.js';

import { GUI } from './jsm/libs/lil-gui.module.min.js';
import { WEBGL } from './jsm/capabilities/WebGL.js';
import WebGL from './jsm/capabilities/WebGL.js';

if ( WEBGL.isWebGL2Available() === false ) {
if ( WebGL.isWebGL2Available() === false ) {

document.body.appendChild( WEBGL.getWebGL2ErrorMessage() );
document.body.appendChild( WebGL.getWebGL2ErrorMessage() );

}

Expand Down
6 changes: 3 additions & 3 deletions examples/webgl2_volume_instancing.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
import { OrbitControls } from './jsm/controls/OrbitControls.js';
import { VOXLoader, VOXDataTexture3D } from './jsm/loaders/VOXLoader.js';

import { WEBGL } from './jsm/capabilities/WebGL.js';
import WebGL from './jsm/capabilities/WebGL.js';

if ( WEBGL.isWebGL2Available() === false ) {
if ( WebGL.isWebGL2Available() === false ) {

document.body.appendChild( WEBGL.getWebGL2ErrorMessage() );
document.body.appendChild( WebGL.getWebGL2ErrorMessage() );

}

Expand Down
Loading

0 comments on commit ab21bee

Please sign in to comment.