Skip to content

Commit 7410f62

Browse files
authored
Merge pull request #20517 from Mugen87/dev51
Examples: Resolve linter issues.
2 parents 3292d6d + 72e9134 commit 7410f62

File tree

10 files changed

+32
-34
lines changed

10 files changed

+32
-34
lines changed

examples/js/loaders/DRACOLoader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ THREE.DRACOLoader.DRACOWorker = function () {
582582

583583
}
584584

585-
function getDracoDataType ( draco, attributeType ) {
585+
function getDracoDataType( draco, attributeType ) {
586586

587587
switch ( attributeType ) {
588588

examples/js/loaders/VRMLLoader.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
console.warn( "THREE.VRMLLoader: As part of the transition to ES6 Modules, the files in 'examples/js' were deprecated in May 2020 (r117) and will be deleted in December 2020 (r124). You can find more information about developing using ES6 Modules in https://threejs.org/docs/#manual/en/introduction/Installation." );
22

3-
/* global chevrotain */
4-
53
THREE.VRMLLoader = ( function () {
64

75
// dependency check
86

9-
if ( typeof chevrotain === 'undefined' ) {
7+
if ( typeof chevrotain === 'undefined' ) { // eslint-disable-line no-undef
108

119
throw Error( 'THREE.VRMLLoader: External library chevrotain.min.js required.' );
1210

@@ -101,7 +99,7 @@ THREE.VRMLLoader = ( function () {
10199

102100
function createTokens() {
103101

104-
var createToken = chevrotain.createToken;
102+
var createToken = chevrotain.createToken; // eslint-disable-line no-undef
105103

106104
// from http://gun.teipir.gr/VRML-amgem/spec/part1/concepts.html#SyntaxBasics
107105

@@ -176,15 +174,15 @@ THREE.VRMLLoader = ( function () {
176174
var Comment = createToken( {
177175
name: 'Comment',
178176
pattern: /#.*/,
179-
group: chevrotain.Lexer.SKIPPED
177+
group: chevrotain.Lexer.SKIPPED // eslint-disable-line no-undef
180178
} );
181179

182180
// commas, blanks, tabs, newlines and carriage returns are whitespace characters wherever they appear outside of string fields
183181

184182
var WhiteSpace = createToken( {
185183
name: 'WhiteSpace',
186184
pattern: /[ ,\s]/,
187-
group: chevrotain.Lexer.SKIPPED
185+
group: chevrotain.Lexer.SKIPPED // eslint-disable-line no-undef
188186
} );
189187

190188
var tokens = [
@@ -3179,7 +3177,7 @@ THREE.VRMLLoader = ( function () {
31793177

31803178
function VRMLLexer( tokens ) {
31813179

3182-
this.lexer = new chevrotain.Lexer( tokens );
3180+
this.lexer = new chevrotain.Lexer( tokens ); // eslint-disable-line no-undef
31833181

31843182
}
31853183

@@ -3207,7 +3205,7 @@ THREE.VRMLLoader = ( function () {
32073205

32083206
function VRMLParser( tokenVocabulary ) {
32093207

3210-
chevrotain.Parser.call( this, tokenVocabulary );
3208+
chevrotain.Parser.call( this, tokenVocabulary ); // eslint-disable-line no-undef
32113209

32123210
var $ = this;
32133211

@@ -3434,7 +3432,7 @@ THREE.VRMLLoader = ( function () {
34343432

34353433
}
34363434

3437-
VRMLParser.prototype = Object.create( chevrotain.Parser.prototype );
3435+
VRMLParser.prototype = Object.create( chevrotain.Parser.prototype ); // eslint-disable-line no-undef
34383436
VRMLParser.prototype.constructor = VRMLParser;
34393437

34403438
function Face( a, b, c ) {

examples/jsm/loaders/3DMLoader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ Rhino3dmLoader.Rhino3dmWorker = function () {
774774
/* Like Basis Loader */
775775
RhinoModule = { wasmBinary, onRuntimeInitialized: resolve };
776776

777-
rhino3dm( RhinoModule );
777+
rhino3dm( RhinoModule ); // eslint-disable-line no-undef
778778

779779
} ).then( () => {
780780

examples/jsm/loaders/DRACOLoader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ DRACOLoader.DRACOWorker = function () {
587587

588588
}
589589

590-
function getDracoDataType ( draco, attributeType ) {
590+
function getDracoDataType( draco, attributeType ) {
591591

592592
switch ( attributeType ) {
593593

examples/jsm/loaders/KTX2Loader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class KTX2Loader extends CompressedTextureLoader {
107107
// initialization to return a native Promise.
108108
scope.basisModulePending = new Promise( function ( resolve ) {
109109

110-
MSC_TRANSCODER().then( function ( basisModule ) {
110+
MSC_TRANSCODER().then( function ( basisModule ) { // eslint-disable-line no-undef
111111

112112
scope.basisModule = basisModule;
113113

examples/jsm/loaders/VRMLLoader.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,11 @@ import {
3636
} from "../../../build/three.module.js";
3737
import { chevrotain } from "../libs/chevrotain.module.min.js";
3838

39-
/* global chevrotain */
40-
4139
var VRMLLoader = ( function () {
4240

4341
// dependency check
4442

45-
if ( typeof chevrotain === 'undefined' ) {
43+
if ( typeof chevrotain === 'undefined' ) { // eslint-disable-line no-undef
4644

4745
throw Error( 'THREE.VRMLLoader: External library chevrotain.min.js required.' );
4846

@@ -137,7 +135,7 @@ var VRMLLoader = ( function () {
137135

138136
function createTokens() {
139137

140-
var createToken = chevrotain.createToken;
138+
var createToken = chevrotain.createToken; // eslint-disable-line no-undef
141139

142140
// from http://gun.teipir.gr/VRML-amgem/spec/part1/concepts.html#SyntaxBasics
143141

@@ -212,15 +210,15 @@ var VRMLLoader = ( function () {
212210
var Comment = createToken( {
213211
name: 'Comment',
214212
pattern: /#.*/,
215-
group: chevrotain.Lexer.SKIPPED
213+
group: chevrotain.Lexer.SKIPPED // eslint-disable-line no-undef
216214
} );
217215

218216
// commas, blanks, tabs, newlines and carriage returns are whitespace characters wherever they appear outside of string fields
219217

220218
var WhiteSpace = createToken( {
221219
name: 'WhiteSpace',
222220
pattern: /[ ,\s]/,
223-
group: chevrotain.Lexer.SKIPPED
221+
group: chevrotain.Lexer.SKIPPED // eslint-disable-line no-undef
224222
} );
225223

226224
var tokens = [
@@ -3215,7 +3213,7 @@ var VRMLLoader = ( function () {
32153213

32163214
function VRMLLexer( tokens ) {
32173215

3218-
this.lexer = new chevrotain.Lexer( tokens );
3216+
this.lexer = new chevrotain.Lexer( tokens ); // eslint-disable-line no-undef
32193217

32203218
}
32213219

@@ -3243,7 +3241,7 @@ var VRMLLoader = ( function () {
32433241

32443242
function VRMLParser( tokenVocabulary ) {
32453243

3246-
chevrotain.Parser.call( this, tokenVocabulary );
3244+
chevrotain.Parser.call( this, tokenVocabulary ); // eslint-disable-line no-undef
32473245

32483246
var $ = this;
32493247

@@ -3470,7 +3468,7 @@ var VRMLLoader = ( function () {
34703468

34713469
}
34723470

3473-
VRMLParser.prototype = Object.create( chevrotain.Parser.prototype );
3471+
VRMLParser.prototype = Object.create( chevrotain.Parser.prototype ); // eslint-disable-line no-undef
34743472
VRMLParser.prototype.constructor = VRMLParser;
34753473

34763474
function Face( a, b, c ) {

examples/jsm/physics/AmmoPhysics.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ async function AmmoPhysics() {
77

88
}
99

10-
const AmmoLib = await Ammo();
10+
const AmmoLib = await Ammo(); // eslint-disable-line no-undef
1111

1212
const frameRate = 60;
1313

examples/jsm/postprocessing/Pass.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ Object.assign( Pass.prototype, {
3434

3535
// Helper for passes that need to fill the viewport with a single quad.
3636

37+
// Important: It's actually a hack to put FullScreenQuad into the Pass namespace. This is only
38+
// done to make examples/js code work. Normally, FullScreenQuad should be exported
39+
// from this module like Pass.
40+
3741
Pass.FullScreenQuad = ( function () {
3842

3943
var camera = new OrthographicCamera( - 1, 1, 1, - 1, 0, 1 );

examples/jsm/postprocessing/SAOPass.d.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,6 @@ interface SAOPassParams {
2626
saoBlurDepthCutoff: number;
2727
}
2828

29-
export namespace SAOPass {
30-
enum OUTPUT {
31-
Default,
32-
Beauty,
33-
SAO,
34-
Depth,
35-
Normal
36-
}
37-
}
38-
3929
export class SAOPass extends Pass {
4030

4131
constructor( scene: Scene, camera: Camera, depthTexture?: boolean, useNormals?: boolean, resolution?: Vector2 );
@@ -62,6 +52,14 @@ export class SAOPass extends Pass {
6252
fsQuad: object;
6353
params: SAOPassParams;
6454

55+
static OUTPUT: {
56+
Beauty: number;
57+
Default: number;
58+
SAO: number;
59+
Depth: number;
60+
Normal: number;
61+
};
62+
6563
renderPass( renderer: WebGLRenderer, passMaterial: Material, renderTarget: WebGLRenderTarget, clearColor?: Color | string | number, clearAlpha?: number ): void;
6664
renderOverride( renderer: WebGLRenderer, overrideMaterial: Material, renderTarget: WebGLRenderTarget, clearColor?: Color | string | number, clearAlpha?: number ): void;
6765

utils/modularize.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ var files = [
3535

3636
{ path: 'exporters/ColladaExporter.js', dependencies: [], ignoreList: [] },
3737
{ path: 'exporters/DRACOExporter.js', dependencies: [], ignoreList: [ 'Geometry' ] },
38-
{ path: 'exporters/GLTFExporter.js', dependencies: [], ignoreList: [ 'AnimationClip', 'Camera', 'Geometry', 'Material', 'Mesh', 'Object3D', 'RGBFormat', 'Scenes', 'ShaderMaterial' ] },
38+
{ path: 'exporters/GLTFExporter.js', dependencies: [], ignoreList: [ 'AnimationClip', 'Camera', 'Geometry', 'Material', 'Mesh', 'Object3D', 'RGBFormat', 'Scenes', 'ShaderMaterial', 'Matrix4' ] },
3939
{ path: 'exporters/MMDExporter.js', dependencies: [ { name: 'MMDParser', path: 'libs/mmdparser.module.js' } ], ignoreList: [] },
4040
{ path: 'exporters/OBJExporter.js', dependencies: [], ignoreList: [] },
4141
{ path: 'exporters/PLYExporter.js', dependencies: [], ignoreList: [] },

0 commit comments

Comments
 (0)