浏览代码

Examples: Switch to this.is* = true. (#24092)

* Exampels: Switch to this.is* = true.

* Examples: Clean up.
Michael Herzog 3 年之前
父节点
当前提交
4a1a4ca881
共有 65 个文件被更改,包括 173 次插入160 次删除
  1. 6 6
      examples/jsm/controls/TransformControls.js
  2. 2 2
      examples/jsm/geometries/LightningStrike.js
  3. 2 2
      examples/jsm/helpers/ViewHelper.js
  4. 6 6
      examples/jsm/libs/flow.module.js
  5. 2 2
      examples/jsm/lines/Line2.js
  6. 3 2
      examples/jsm/lines/LineGeometry.js
  7. 2 2
      examples/jsm/lines/LineMaterial.js
  8. 2 2
      examples/jsm/lines/LineSegments2.js
  9. 2 2
      examples/jsm/lines/LineSegmentsGeometry.js
  10. 2 2
      examples/jsm/lines/Wireframe.js
  11. 2 2
      examples/jsm/lines/WireframeGeometry2.js
  12. 2 2
      examples/jsm/loaders/FontLoader.js
  13. 2 2
      examples/jsm/loaders/MMDLoader.js
  14. 2 2
      examples/jsm/math/Lut.js
  15. 2 2
      examples/jsm/node-editor/core/DataFile.js
  16. 2 2
      examples/jsm/nodes/accessors/BufferNode.js
  17. 2 2
      examples/jsm/nodes/accessors/CubeTextureNode.js
  18. 2 2
      examples/jsm/nodes/accessors/PointUVNode.js
  19. 2 2
      examples/jsm/nodes/accessors/StorageBufferNode.js
  20. 2 2
      examples/jsm/nodes/accessors/TextureNode.js
  21. 2 2
      examples/jsm/nodes/accessors/UVNode.js
  22. 2 2
      examples/jsm/nodes/core/ArrayUniformNode.js
  23. 2 2
      examples/jsm/nodes/core/BypassNode.js
  24. 2 2
      examples/jsm/nodes/core/CodeNode.js
  25. 8 2
      examples/jsm/nodes/core/ConstNode.js
  26. 2 2
      examples/jsm/nodes/core/ContextNode.js
  27. 3 3
      examples/jsm/nodes/core/InputNode.js
  28. 2 2
      examples/jsm/nodes/core/InstanceIndexNode.js
  29. 2 2
      examples/jsm/nodes/core/Node.js
  30. 2 2
      examples/jsm/nodes/core/NodeAttribute.js
  31. 2 2
      examples/jsm/nodes/core/NodeUniform.js
  32. 2 2
      examples/jsm/nodes/core/NodeVar.js
  33. 2 2
      examples/jsm/nodes/core/NodeVary.js
  34. 2 2
      examples/jsm/nodes/core/TempNode.js
  35. 8 2
      examples/jsm/nodes/core/UniformNode.js
  36. 2 2
      examples/jsm/nodes/display/FrontFacingNode.js
  37. 2 2
      examples/jsm/nodes/fog/FogNode.js
  38. 2 2
      examples/jsm/nodes/fog/FogRangeNode.js
  39. 2 2
      examples/jsm/nodes/gpgpu/ComputeNode.js
  40. 2 2
      examples/jsm/nodes/materials/LineBasicNodeMaterial.js
  41. 2 2
      examples/jsm/nodes/materials/MeshBasicNodeMaterial.js
  42. 3 3
      examples/jsm/nodes/materials/MeshStandardNodeMaterial.js
  43. 2 2
      examples/jsm/nodes/materials/NodeMaterial.js
  44. 2 2
      examples/jsm/nodes/materials/PointsNodeMaterial.js
  45. 2 2
      examples/jsm/objects/Lensflare.js
  46. 2 2
      examples/jsm/objects/LightningStorm.js
  47. 2 2
      examples/jsm/objects/MarchingCubes.js
  48. 2 2
      examples/jsm/objects/Reflector.js
  49. 2 2
      examples/jsm/objects/ReflectorForSSRPass.js
  50. 2 2
      examples/jsm/objects/Refractor.js
  51. 2 2
      examples/jsm/objects/ShadowMesh.js
  52. 2 2
      examples/jsm/objects/Sky.js
  53. 2 2
      examples/jsm/objects/Water.js
  54. 2 2
      examples/jsm/objects/Water2.js
  55. 2 2
      examples/jsm/renderers/CSS2DRenderer.js
  56. 4 4
      examples/jsm/renderers/CSS3DRenderer.js
  57. 2 2
      examples/jsm/renderers/SVGRenderer.js
  58. 2 2
      examples/jsm/renderers/webgpu/WebGPUBuffer.js
  59. 2 2
      examples/jsm/renderers/webgpu/WebGPURenderer.js
  60. 8 8
      examples/jsm/renderers/webgpu/WebGPUSampledTexture.js
  61. 2 2
      examples/jsm/renderers/webgpu/WebGPUSampler.js
  62. 2 2
      examples/jsm/renderers/webgpu/WebGPUStorageBuffer.js
  63. 14 14
      examples/jsm/renderers/webgpu/WebGPUUniform.js
  64. 2 2
      examples/jsm/renderers/webgpu/WebGPUUniformBuffer.js
  65. 2 2
      examples/jsm/renderers/webgpu/WebGPUUniformsGroup.js

+ 6 - 6
examples/jsm/controls/TransformControls.js

@@ -49,6 +49,8 @@ class TransformControls extends Object3D {
 
 		}
 
+		this.isTransformControls = true;
+
 		this.visible = false;
 		this.domElement = domElement;
 		this.domElement.style.touchAction = 'none'; // disable touch scroll
@@ -641,8 +643,6 @@ class TransformControls extends Object3D {
 
 }
 
-TransformControls.prototype.isTransformControls = true;
-
 // mouse / touch event handlers
 
 function getPointer( event ) {
@@ -766,6 +766,8 @@ class TransformControlsGizmo extends Object3D {
 
 		super();
 
+		this.isTransformControlsGizmo = true;
+
 		this.type = 'TransformControlsGizmo';
 
 		// shared materials
@@ -1456,8 +1458,6 @@ class TransformControlsGizmo extends Object3D {
 
 }
 
-TransformControlsGizmo.prototype.isTransformControlsGizmo = true;
-
 //
 
 class TransformControlsPlane extends Mesh {
@@ -1469,6 +1469,8 @@ class TransformControlsPlane extends Mesh {
 			new MeshBasicMaterial( { visible: false, wireframe: true, side: DoubleSide, transparent: true, opacity: 0.1, toneMapped: false } )
 		);
 
+		this.isTransformControlsPlane = true;
+
 		this.type = 'TransformControlsPlane';
 
 	}
@@ -1551,6 +1553,4 @@ class TransformControlsPlane extends Mesh {
 
 }
 
-TransformControlsPlane.prototype.isTransformControlsPlane = true;
-
 export { TransformControls, TransformControlsGizmo, TransformControlsPlane };

+ 2 - 2
examples/jsm/geometries/LightningStrike.js

@@ -115,6 +115,8 @@ class LightningStrike extends BufferGeometry {
 
 		super();
 
+		this.isLightningStrike = true;
+
 		this.type = 'LightningStrike';
 
 		// Set parameters, and set undefined parameters to default values
@@ -1001,8 +1003,6 @@ class LightningStrike extends BufferGeometry {
 
 }
 
-LightningStrike.prototype.isLightningStrike = true;
-
 // Ray states
 LightningStrike.RAY_INITIALIZED = 0;
 LightningStrike.RAY_UNBORN = 1;

+ 2 - 2
examples/jsm/helpers/ViewHelper.js

@@ -8,6 +8,8 @@ class ViewHelper extends THREE.Object3D {
 
 		super();
 
+		this.isViewHelper = true;
+
 		this.animating = false;
 		this.controls = null;
 
@@ -290,6 +292,4 @@ class ViewHelper extends THREE.Object3D {
 
 }
 
-ViewHelper.prototype.isViewHelper = true;
-
 export { ViewHelper };

+ 6 - 6
examples/jsm/libs/flow.module.js

@@ -398,6 +398,8 @@ class Element extends Serializer {
 
 		super();
 
+		this.isElement = true;
+
 		const dom = document.createElement( 'f-element' );
 		dom.element = this;
 
@@ -1096,14 +1098,14 @@ class Element extends Serializer {
 
 }
 
-Element.prototype.isElement = true;
-
 class Input extends Serializer {
 
 	constructor( dom ) {
 
 		super();
 
+		this.isInput = true;
+
 		this.dom = dom;
 
 		this.element = null;
@@ -1232,14 +1234,14 @@ class Input extends Serializer {
 
 }
 
-Input.prototype.isInput = true;
-
 class Node extends Serializer {
 
 	constructor() {
 
 		super();
 
+		this.isNode = true;
+
 		const dom = document.createElement( 'f-node' );
 
 		const onDown = () => {
@@ -1512,8 +1514,6 @@ class Node extends Serializer {
 
 }
 
-Node.prototype.isNode = true;
-
 class DraggableElement extends Element {
 
 	constructor( draggable = true ) {

+ 2 - 2
examples/jsm/lines/Line2.js

@@ -8,12 +8,12 @@ class Line2 extends LineSegments2 {
 
 		super( geometry, material );
 
+		this.isLine2 = true;
+
 		this.type = 'Line2';
 
 	}
 
 }
 
-Line2.prototype.isLine2 = true;
-
 export { Line2 };

+ 3 - 2
examples/jsm/lines/LineGeometry.js

@@ -5,6 +5,9 @@ class LineGeometry extends LineSegmentsGeometry {
 	constructor() {
 
 		super();
+
+		this.isLineGeometry = true;
+
 		this.type = 'LineGeometry';
 
 	}
@@ -82,6 +85,4 @@ class LineGeometry extends LineSegmentsGeometry {
 
 }
 
-LineGeometry.prototype.isLineGeometry = true;
-
 export { LineGeometry };

+ 2 - 2
examples/jsm/lines/LineMaterial.js

@@ -451,6 +451,8 @@ class LineMaterial extends ShaderMaterial {
 
 		} );
 
+		this.isLineMaterial = true;
+
 		Object.defineProperties( this, {
 
 			color: {
@@ -697,6 +699,4 @@ class LineMaterial extends ShaderMaterial {
 
 }
 
-LineMaterial.prototype.isLineMaterial = true;
-
 export { LineMaterial };

+ 2 - 2
examples/jsm/lines/LineSegments2.js

@@ -219,6 +219,8 @@ class LineSegments2 extends Mesh {
 
 		super( geometry, material );
 
+		this.isLineSegments2 = true;
+
 		this.type = 'LineSegments2';
 
 	}
@@ -350,6 +352,4 @@ class LineSegments2 extends Mesh {
 
 }
 
-LineSegments2.prototype.isLineSegments2 = true;
-
 export { LineSegments2 };

+ 2 - 2
examples/jsm/lines/LineSegmentsGeometry.js

@@ -18,6 +18,8 @@ class LineSegmentsGeometry extends InstancedBufferGeometry {
 
 		super();
 
+		this.isLineSegmentsGeometry = true;
+
 		this.type = 'LineSegmentsGeometry';
 
 		const positions = [ - 1, 2, 0, 1, 2, 0, - 1, 1, 0, 1, 1, 0, - 1, 0, 0, 1, 0, 0, - 1, - 1, 0, 1, - 1, 0 ];
@@ -245,6 +247,4 @@ class LineSegmentsGeometry extends InstancedBufferGeometry {
 
 }
 
-LineSegmentsGeometry.prototype.isLineSegmentsGeometry = true;
-
 export { LineSegmentsGeometry };

+ 2 - 2
examples/jsm/lines/Wireframe.js

@@ -16,6 +16,8 @@ class Wireframe extends Mesh {
 
 		super( geometry, material );
 
+		this.isWireframe = true;
+
 		this.type = 'Wireframe';
 
 	}
@@ -51,6 +53,4 @@ class Wireframe extends Mesh {
 
 }
 
-Wireframe.prototype.isWireframe = true;
-
 export { Wireframe };

+ 2 - 2
examples/jsm/lines/WireframeGeometry2.js

@@ -9,6 +9,8 @@ class WireframeGeometry2 extends LineSegmentsGeometry {
 
 		super();
 
+		this.isWireframeGeometry2 = true;
+
 		this.type = 'WireframeGeometry2';
 
 		this.fromWireframeGeometry( new WireframeGeometry( geometry ) );
@@ -19,6 +21,4 @@ class WireframeGeometry2 extends LineSegmentsGeometry {
 
 }
 
-WireframeGeometry2.prototype.isWireframeGeometry2 = true;
-
 export { WireframeGeometry2 };

+ 2 - 2
examples/jsm/loaders/FontLoader.js

@@ -57,6 +57,8 @@ class Font {
 
 	constructor( data ) {
 
+		this.isFont = true;
+
 		this.type = 'Font';
 
 		this.data = data;
@@ -191,6 +193,4 @@ function createPath( char, scale, offsetX, offsetY, data ) {
 
 }
 
-Font.prototype.isFont = true;
-
 export { FontLoader, Font };

+ 2 - 2
examples/jsm/loaders/MMDLoader.js

@@ -2080,6 +2080,8 @@ class MMDToonMaterial extends ShaderMaterial {
 
 		super();
 
+		this.isMMDToonMaterial = true;
+
 		this._matcapCombine = AddOperation;
 		this.emissiveIntensity = 1.0;
 		this.normalMapType = TangentSpaceNormalMap;
@@ -2237,6 +2239,4 @@ class MMDToonMaterial extends ShaderMaterial {
 
 }
 
-MMDToonMaterial.prototype.isMMDToonMaterial = true;
-
 export { MMDLoader };

+ 2 - 2
examples/jsm/math/Lut.js

@@ -7,6 +7,8 @@ class Lut {
 
  	constructor( colormap, count = 32 ) {
 
+		this.isLut = true;
+
 		this.lut = [];
 		this.map = [];
 		this.n = 0;
@@ -189,8 +191,6 @@ class Lut {
 
 }
 
-Lut.prototype.isLut = true;
-
 const ColorMapKeywords = {
 
 	'rainbow': [[ 0.0, 0x0000FF ], [ 0.2, 0x00FFFF ], [ 0.5, 0x00FF00 ], [ 0.8, 0xFFFF00 ], [ 1.0, 0xFF0000 ]],

+ 2 - 2
examples/jsm/node-editor/core/DataFile.js

@@ -2,6 +2,8 @@ export class DataFile {
 
 	constructor( value ) {
 
+		this.isDataFile = true;
+
 		this.value = value;
 		this.url = null;
 
@@ -55,5 +57,3 @@ export class DataFile {
 	}
 
 }
-
-DataFile.prototype.isDataFile = true;

+ 2 - 2
examples/jsm/nodes/accessors/BufferNode.js

@@ -6,6 +6,8 @@ class BufferNode extends UniformNode {
 
 		super( value, bufferType );
 
+		this.isBufferNode = true;
+
 		this.bufferType = bufferType;
 		this.bufferCount = bufferCount;
 
@@ -19,6 +21,4 @@ class BufferNode extends UniformNode {
 
 }
 
-BufferNode.prototype.isBufferNode = true;
-
 export default BufferNode;

+ 2 - 2
examples/jsm/nodes/accessors/CubeTextureNode.js

@@ -8,6 +8,8 @@ class CubeTextureNode extends TextureNode {
 
 		super( value, uvNode, levelNode );
 
+		this.isCubeTextureNode = true;
+
 	}
 
 	getInputType( /*builder*/ ) {
@@ -74,6 +76,4 @@ class CubeTextureNode extends TextureNode {
 
 }
 
-CubeTextureNode.prototype.isCubeTextureNode = true;
-
 export default CubeTextureNode;

+ 2 - 2
examples/jsm/nodes/accessors/PointUVNode.js

@@ -6,6 +6,8 @@ class PointUVNode extends Node {
 
 		super( 'vec2' );
 
+		this.isPointUVNode = true;
+
 	}
 
 	generate( /*builder*/ ) {
@@ -16,6 +18,4 @@ class PointUVNode extends Node {
 
 }
 
-PointUVNode.prototype.isPointUVNode = true;
-
 export default PointUVNode;

+ 2 - 2
examples/jsm/nodes/accessors/StorageBufferNode.js

@@ -6,6 +6,8 @@ class StorageBufferNode extends BufferNode {
 
 		super( value, bufferType, bufferCount );
 
+		this.isStorageBufferNode = true;
+
 	}
 
 	getInputType( /*builder*/ ) {
@@ -16,6 +18,4 @@ class StorageBufferNode extends BufferNode {
 
 }
 
-StorageBufferNode.prototype.isStorageBufferNode = true;
-
 export default StorageBufferNode;

+ 2 - 2
examples/jsm/nodes/accessors/TextureNode.js

@@ -7,6 +7,8 @@ class TextureNode extends UniformNode {
 
 		super( value, 'vec4' );
 
+		this.isTextureNode = true;
+
 		this.uvNode = uvNode;
 		this.levelNode = levelNode;
 
@@ -95,6 +97,4 @@ class TextureNode extends UniformNode {
 
 }
 
-TextureNode.prototype.isTextureNode = true;
-
 export default TextureNode;

+ 2 - 2
examples/jsm/nodes/accessors/UVNode.js

@@ -6,6 +6,8 @@ class UVNode extends AttributeNode {
 
 		super( null, 'vec2' );
 
+		this.isUVNode = true;
+
 		this.index = index;
 
 	}
@@ -36,6 +38,4 @@ class UVNode extends AttributeNode {
 
 }
 
-UVNode.prototype.isUVNode = true;
-
 export default UVNode;

+ 2 - 2
examples/jsm/nodes/core/ArrayUniformNode.js

@@ -6,6 +6,8 @@ class ArrayUniformNode extends UniformNode {
 
 		super();
 
+		this.isArrayUniformNode = true;
+
 		this.nodes = nodes;
 
 	}
@@ -18,6 +20,4 @@ class ArrayUniformNode extends UniformNode {
 
 }
 
-ArrayUniformNode.prototype.isArrayUniformNode = true;
-
 export default ArrayUniformNode;

+ 2 - 2
examples/jsm/nodes/core/BypassNode.js

@@ -6,6 +6,8 @@ class BypassNode extends Node {
 
 		super();
 
+		this.isBypassNode = true;
+
 		this.outputNode = returnNode;
 		this.callNode = callNode;
 
@@ -33,6 +35,4 @@ class BypassNode extends Node {
 
 }
 
-BypassNode.prototype.isBypassNode = true;
-
 export default BypassNode;

+ 2 - 2
examples/jsm/nodes/core/CodeNode.js

@@ -6,6 +6,8 @@ class CodeNode extends Node {
 
 		super( nodeType );
 
+		this.isCodeNode = true;
+
 		this.code = code;
 
 		this._includes = [];
@@ -45,6 +47,4 @@ class CodeNode extends Node {
 
 }
 
-CodeNode.prototype.isCodeNode = true;
-
 export default CodeNode;

+ 8 - 2
examples/jsm/nodes/core/ConstNode.js

@@ -2,6 +2,14 @@ import InputNode from './InputNode.js';
 
 class ConstNode extends InputNode {
 
+	constructor( value, nodeType = null ) {
+
+		super( value, nodeType );
+
+		this.isConstNode = true;
+
+	}
+
 	generateConst( builder ) {
 
 		return builder.getConst( this.getNodeType( builder ), this.value );
@@ -18,6 +26,4 @@ class ConstNode extends InputNode {
 
 }
 
-ConstNode.prototype.isConstNode = true;
-
 export default ConstNode;

+ 2 - 2
examples/jsm/nodes/core/ContextNode.js

@@ -6,6 +6,8 @@ class ContextNode extends Node {
 
 		super();
 
+		this.isContextNode = true;
+
 		this.node = node;
 		this.context = context;
 
@@ -33,6 +35,4 @@ class ContextNode extends Node {
 
 }
 
-ContextNode.prototype.isContextNode = true;
-
 export default ContextNode;

+ 3 - 3
examples/jsm/nodes/core/InputNode.js

@@ -7,6 +7,8 @@ class InputNode extends Node {
 
 		super( nodeType );
 
+		this.isInputNode = true;
+
 		this.value = value;
 
 	}
@@ -51,12 +53,10 @@ class InputNode extends Node {
 
 	generate( /*builder, output*/ ) {
 
-		console.warn('Abstract function.');
+		console.warn( 'Abstract function.' );
 
 	}
 
 }
 
-InputNode.prototype.isInputNode = true;
-
 export default InputNode;

+ 2 - 2
examples/jsm/nodes/core/InstanceIndexNode.js

@@ -6,6 +6,8 @@ class InstanceIndexNode extends Node {
 
 		super( 'uint' );
 
+		this.isInstanceIndexNode = true;
+
 	}
 
 	generate( builder ) {
@@ -16,6 +18,4 @@ class InstanceIndexNode extends Node {
 
 }
 
-InstanceIndexNode.prototype.isInstanceIndexNode = true;
-
 export default InstanceIndexNode;

+ 2 - 2
examples/jsm/nodes/core/Node.js

@@ -8,6 +8,8 @@ class Node {
 
 	constructor( nodeType = null ) {
 
+		this.isNode = true;
+
 		this.nodeType = nodeType;
 
 		this.updateType = NodeUpdateType.None;
@@ -246,6 +248,4 @@ class Node {
 
 }
 
-Node.prototype.isNode = true;
-
 export default Node;

+ 2 - 2
examples/jsm/nodes/core/NodeAttribute.js

@@ -2,6 +2,8 @@ class NodeAttribute {
 
 	constructor( name, type ) {
 
+		this.isNodeAttribute = true;
+
 		this.name = name;
 		this.type = type;
 
@@ -9,6 +11,4 @@ class NodeAttribute {
 
 }
 
-NodeAttribute.prototype.isNodeAttribute = true;
-
 export default NodeAttribute;

+ 2 - 2
examples/jsm/nodes/core/NodeUniform.js

@@ -2,6 +2,8 @@ class NodeUniform {
 
 	constructor( name, type, node, needsUpdate = undefined ) {
 
+		this.isNodeUniform = true;
+
 		this.name = name;
 		this.type = type;
 		this.node = node;
@@ -23,6 +25,4 @@ class NodeUniform {
 
 }
 
-NodeUniform.prototype.isNodeUniform = true;
-
 export default NodeUniform;

+ 2 - 2
examples/jsm/nodes/core/NodeVar.js

@@ -2,6 +2,8 @@ class NodeVar {
 
 	constructor( name, type ) {
 
+		this.isNodeVar = true;
+
 		this.name = name;
 		this.type = type;
 
@@ -9,6 +11,4 @@ class NodeVar {
 
 }
 
-NodeVar.prototype.isNodeVar = true;
-
 export default NodeVar;

+ 2 - 2
examples/jsm/nodes/core/NodeVary.js

@@ -2,6 +2,8 @@ class NodeVary {
 
 	constructor( name, type ) {
 
+		this.isNodeVary = true;
+
 		this.name = name;
 		this.type = type;
 
@@ -9,6 +11,4 @@ class NodeVary {
 
 }
 
-NodeVary.prototype.isNodeVary = true;
-
 export default NodeVary;

+ 2 - 2
examples/jsm/nodes/core/TempNode.js

@@ -6,6 +6,8 @@ class TempNode extends Node {
 
 		super( type );
 
+		this.isTempNode = true;
+
 	}
 
 	build( builder, output ) {
@@ -39,6 +41,4 @@ class TempNode extends Node {
 
 }
 
-TempNode.prototype.isTempNode = true;
-
 export default TempNode;

+ 8 - 2
examples/jsm/nodes/core/UniformNode.js

@@ -2,6 +2,14 @@ import InputNode from './InputNode.js';
 
 class UniformNode extends InputNode {
 
+	constructor( value, nodeType = null ) {
+
+		super( value, nodeType );
+
+		this.isUniformNode = true;
+
+	}
+
 	getUniformHash( builder ) {
 
 		return this.getHash( builder );
@@ -35,6 +43,4 @@ class UniformNode extends InputNode {
 
 }
 
-UniformNode.prototype.isUniformNode = true;
-
 export default UniformNode;

+ 2 - 2
examples/jsm/nodes/display/FrontFacingNode.js

@@ -6,6 +6,8 @@ class FrontFacingNode extends Node {
 
 		super( 'bool' );
 
+		this.isFrontFacingNode = true;
+
 	}
 
 	generate( builder ) {
@@ -16,6 +18,4 @@ class FrontFacingNode extends Node {
 
 }
 
-FrontFacingNode.prototype.isFrontFacingNode = true;
-
 export default FrontFacingNode;

+ 2 - 2
examples/jsm/nodes/fog/FogNode.js

@@ -7,6 +7,8 @@ class FogNode extends Node {
 
 		super( 'float' );
 
+		this.isFogNode = true;
+
 		this.colorNode = colorNode;
 		this.factorNode = factorNode;
 
@@ -26,6 +28,4 @@ class FogNode extends Node {
 
 }
 
-FogNode.prototype.isFogNode = true;
-
 export default FogNode;

+ 2 - 2
examples/jsm/nodes/fog/FogRangeNode.js

@@ -7,6 +7,8 @@ class FogRangeNode extends FogNode {
 
 		super( colorNode );
 
+		this.isFogRangeNode = true;
+
 		this.nearNode = nearNode;
 		this.farNode = farNode;
 
@@ -22,6 +24,4 @@ class FogRangeNode extends FogNode {
 
 }
 
-FogRangeNode.prototype.isFogRangeNode = true;
-
 export default FogRangeNode;

+ 2 - 2
examples/jsm/nodes/gpgpu/ComputeNode.js

@@ -7,6 +7,8 @@ class ComputeNode extends Node {
 
 		super( 'void' );
 
+		this.isComputeNode = true;
+
 		this.computeNode = computeNode;
 
 		this.count = count;
@@ -58,6 +60,4 @@ class ComputeNode extends Node {
 
 }
 
-ComputeNode.prototype.isComputeNode = true;
-
 export default ComputeNode;

+ 2 - 2
examples/jsm/nodes/materials/LineBasicNodeMaterial.js

@@ -9,6 +9,8 @@ class LineBasicNodeMaterial extends NodeMaterial {
 
 		super();
 
+		this.isLineBasicNodeMaterial = true;
+
 		this.colorNode = null;
 		this.opacityNode = null;
 
@@ -41,6 +43,4 @@ class LineBasicNodeMaterial extends NodeMaterial {
 
 }
 
-LineBasicNodeMaterial.prototype.isLineBasicNodeMaterial = true;
-
 export default LineBasicNodeMaterial;

+ 2 - 2
examples/jsm/nodes/materials/MeshBasicNodeMaterial.js

@@ -9,6 +9,8 @@ class MeshBasicNodeMaterial extends NodeMaterial {
 
 		super();
 
+		this.isMeshBasicNodeMaterial = true;
+
 		this.lights = true;
 
 		this.colorNode = null;
@@ -43,6 +45,4 @@ class MeshBasicNodeMaterial extends NodeMaterial {
 
 }
 
-MeshBasicNodeMaterial.prototype.isMeshBasicNodeMaterial = true;
-
 export default MeshBasicNodeMaterial;

+ 3 - 3
examples/jsm/nodes/materials/MeshStandardNodeMaterial.js

@@ -21,6 +21,8 @@ export default class MeshStandardNodeMaterial extends NodeMaterial {
 
 		super();
 
+		this.isMeshStandardNodeMaterial = true;
+
 		this.colorNode = null;
 		this.opacityNode = null;
 
@@ -57,7 +59,7 @@ export default class MeshStandardNodeMaterial extends NodeMaterial {
 
 		if ( this.lightsNode ) builder.lightsNode = this.lightsNode;
 
-		let materialLightsNode = [];
+		const materialLightsNode = [];
 
 		if ( envNode ) {
 
@@ -165,5 +167,3 @@ export default class MeshStandardNodeMaterial extends NodeMaterial {
 	}
 
 }
-
-MeshStandardNodeMaterial.prototype.isMeshStandardNodeMaterial = true;

+ 2 - 2
examples/jsm/nodes/materials/NodeMaterial.js

@@ -14,6 +14,8 @@ class NodeMaterial extends ShaderMaterial {
 
 		super();
 
+		this.isNodeMaterial = true;
+
 		this.type = this.constructor.name;
 
 		this.lights = true;
@@ -218,6 +220,4 @@ class NodeMaterial extends ShaderMaterial {
 
 }
 
-NodeMaterial.prototype.isNodeMaterial = true;
-
 export default NodeMaterial;

+ 2 - 2
examples/jsm/nodes/materials/PointsNodeMaterial.js

@@ -9,6 +9,8 @@ class PointsNodeMaterial extends NodeMaterial {
 
 		super();
 
+		this.isPointsNodeMaterial = true;
+
 		this.transparent = true;
 
 		this.colorNode = null;
@@ -47,6 +49,4 @@ class PointsNodeMaterial extends NodeMaterial {
 
 }
 
-PointsNodeMaterial.prototype.isPointsNodeMaterial = true;
-
 export default PointsNodeMaterial;

+ 2 - 2
examples/jsm/objects/Lensflare.js

@@ -21,6 +21,8 @@ class Lensflare extends Mesh {
 
 		super( Lensflare.Geometry, new MeshBasicMaterial( { opacity: 0, transparent: true } ) );
 
+		this.isLensflare = true;
+
 		this.type = 'Lensflare';
 		this.frustumCulled = false;
 		this.renderOrder = Infinity;
@@ -265,8 +267,6 @@ class Lensflare extends Mesh {
 
 }
 
-Lensflare.prototype.isLensflare = true;
-
 //
 
 class LensflareElement {

+ 2 - 2
examples/jsm/objects/LightningStorm.js

@@ -58,6 +58,8 @@ class LightningStorm extends Object3D {
 
 		super();
 
+		this.isLightningStorm = true;
+
 		// Parameters
 
 		this.stormParams = stormParams;
@@ -240,6 +242,4 @@ class LightningStorm extends Object3D {
 
 }
 
-LightningStorm.prototype.isLightningStorm = true;
-
 export { LightningStorm };

+ 2 - 2
examples/jsm/objects/MarchingCubes.js

@@ -18,6 +18,8 @@ class MarchingCubes extends Mesh {
 
 		super( geometry, material );
 
+		this.isMarchingCubes = true;
+
 		const scope = this;
 
 		// temp buffers used in polygonize
@@ -867,8 +869,6 @@ class MarchingCubes extends Mesh {
 
 }
 
-MarchingCubes.prototype.isMarchingCubes = true;
-
 /////////////////////////////////////
 // Marching cubes lookup tables
 /////////////////////////////////////

+ 2 - 2
examples/jsm/objects/Reflector.js

@@ -17,6 +17,8 @@ class Reflector extends Mesh {
 
 		super( geometry );
 
+		this.isReflector = true;
+
 		this.type = 'Reflector';
 		this.camera = new PerspectiveCamera();
 
@@ -191,8 +193,6 @@ class Reflector extends Mesh {
 
 }
 
-Reflector.prototype.isReflector = true;
-
 Reflector.ReflectorShader = {
 
 	uniforms: {

+ 2 - 2
examples/jsm/objects/ReflectorForSSRPass.js

@@ -20,6 +20,8 @@ class ReflectorForSSRPass extends Mesh {
 
 		super( geometry );
 
+		this.isReflectorForSSRPass = true;
+
 		this.type = 'ReflectorForSSRPass';
 
 		const scope = this;
@@ -249,8 +251,6 @@ class ReflectorForSSRPass extends Mesh {
 
 }
 
-ReflectorForSSRPass.prototype.isReflectorForSSRPass = true;
-
 ReflectorForSSRPass.ReflectorShader = {
 
 	defines: {

+ 2 - 2
examples/jsm/objects/Refractor.js

@@ -18,6 +18,8 @@ class Refractor extends Mesh {
 
 		super( geometry );
 
+		this.isRefractor = true;
+
 		this.type = 'Refractor';
 		this.camera = new PerspectiveCamera();
 
@@ -260,8 +262,6 @@ class Refractor extends Mesh {
 
 }
 
-Refractor.prototype.isRefractor = true;
-
 Refractor.RefractorShader = {
 
 	uniforms: {

+ 2 - 2
examples/jsm/objects/ShadowMesh.js

@@ -25,6 +25,8 @@ class ShadowMesh extends Mesh {
 
 		super( mesh.geometry, shadowMaterial );
 
+		this.isShadowMesh = true;
+
 		this.meshMatrix = mesh.matrixWorld;
 
 		this.frustumCulled = false;
@@ -69,6 +71,4 @@ class ShadowMesh extends Mesh {
 
 }
 
-ShadowMesh.prototype.isShadowMesh = true;
-
 export { ShadowMesh };

+ 2 - 2
examples/jsm/objects/Sky.js

@@ -38,12 +38,12 @@ class Sky extends Mesh {
 
 		super( new BoxGeometry( 1, 1, 1 ), material );
 
+		this.isSky = true;
+
 	}
 
 }
 
-Sky.prototype.isSky = true;
-
 Sky.SkyShader = {
 
 	uniforms: {

+ 2 - 2
examples/jsm/objects/Water.js

@@ -26,6 +26,8 @@ class Water extends Mesh {
 
 		super( geometry );
 
+		this.isWater = true;
+
 		const scope = this;
 
 		const textureWidth = options.textureWidth !== undefined ? options.textureWidth : 512;
@@ -324,6 +326,4 @@ class Water extends Mesh {
 
 }
 
-Water.prototype.isWater = true;
-
 export { Water };

+ 2 - 2
examples/jsm/objects/Water2.js

@@ -27,6 +27,8 @@ class Water extends Mesh {
 
 		super( geometry );
 
+		this.isWater = true;
+
 		this.type = 'Water';
 
 		const scope = this;
@@ -201,8 +203,6 @@ class Water extends Mesh {
 
 }
 
-Water.prototype.isWater = true;
-
 Water.WaterShader = {
 
 	uniforms: {

+ 2 - 2
examples/jsm/renderers/CSS2DRenderer.js

@@ -10,6 +10,8 @@ class CSS2DObject extends Object3D {
 
 		super();
 
+		this.isCSS2DObject = true;
+
 		this.element = element;
 
 		this.element.style.position = 'absolute';
@@ -45,8 +47,6 @@ class CSS2DObject extends Object3D {
 
 }
 
-CSS2DObject.prototype.isCSS2DObject = true;
-
 //
 
 const _vector = new Vector3();

+ 4 - 4
examples/jsm/renderers/CSS3DRenderer.js

@@ -19,6 +19,8 @@ class CSS3DObject extends Object3D {
 
 		super();
 
+		this.isCSS3DObject = true;
+
 		this.element = element;
 		this.element.style.position = 'absolute';
 		this.element.style.pointerEvents = 'auto';
@@ -54,14 +56,14 @@ class CSS3DObject extends Object3D {
 
 }
 
-CSS3DObject.prototype.isCSS3DObject = true;
-
 class CSS3DSprite extends CSS3DObject {
 
 	constructor( element ) {
 
 		super( element );
 
+		this.isCSS3DSprite = true;
+
 		this.rotation2D = 0;
 
 	}
@@ -78,8 +80,6 @@ class CSS3DSprite extends CSS3DObject {
 
 }
 
-CSS3DSprite.prototype.isCSS3DSprite = true;
-
 //
 
 const _matrix = new Matrix4();

+ 2 - 2
examples/jsm/renderers/SVGRenderer.js

@@ -18,14 +18,14 @@ class SVGObject extends Object3D {
 
 		super();
 
+		this.isSVGObject = true;
+
 		this.node = node;
 
 	}
 
 }
 
-SVGObject.prototype.isSVGObject = true;
-
 class SVGRenderer {
 
 	constructor() {

+ 2 - 2
examples/jsm/renderers/webgpu/WebGPUBuffer.js

@@ -7,6 +7,8 @@ class WebGPUBuffer extends WebGPUBinding {
 
 		super( name );
 
+		this.isBuffer = true;
+
 		this.bytesPerElement = Float32Array.BYTES_PER_ELEMENT;
 		this.type = type;
 		this.visibility = GPUShaderStage.VERTEX;
@@ -38,6 +40,4 @@ class WebGPUBuffer extends WebGPUBinding {
 
 }
 
-WebGPUBuffer.prototype.isBuffer = true;
-
 export default WebGPUBuffer;

+ 2 - 2
examples/jsm/renderers/webgpu/WebGPURenderer.js

@@ -66,6 +66,8 @@ class WebGPURenderer {
 
 	constructor( parameters = {} ) {
 
+		this.isWebGPURenderer = true;
+
 		// public
 
 		this.domElement = ( parameters.canvas !== undefined ) ? parameters.canvas : this._createCanvasElement();
@@ -979,6 +981,4 @@ class WebGPURenderer {
 
 }
 
-WebGPURenderer.prototype.isWebGPURenderer = true;
-
 export default WebGPURenderer;

+ 8 - 8
examples/jsm/renderers/webgpu/WebGPUSampledTexture.js

@@ -7,6 +7,8 @@ class WebGPUSampledTexture extends WebGPUBinding {
 
 		super( name );
 
+		this.isSampledTexture = true;
+
 		this.texture = texture;
 
 		this.dimension = GPUTextureViewDimension.TwoD;
@@ -26,48 +28,46 @@ class WebGPUSampledTexture extends WebGPUBinding {
 
 }
 
-WebGPUSampledTexture.prototype.isSampledTexture = true;
-
 class WebGPUSampledArrayTexture extends WebGPUSampledTexture {
 
 	constructor( name, texture ) {
 
 		super( name, texture );
 
+		this.isSampledArrayTexture = true;
+
 		this.dimension = GPUTextureViewDimension.TwoDArray;
 
 	}
 
 }
 
-WebGPUSampledArrayTexture.prototype.isSampledArrayTexture = true;
-
 class WebGPUSampled3DTexture extends WebGPUSampledTexture {
 
 	constructor( name, texture ) {
 
 		super( name, texture );
 
+		this.isSampled3DTexture = true;
+
 		this.dimension = GPUTextureViewDimension.ThreeD;
 
 	}
 
 }
 
-WebGPUSampled3DTexture.prototype.isSampled3DTexture = true;
-
 class WebGPUSampledCubeTexture extends WebGPUSampledTexture {
 
 	constructor( name, texture ) {
 
 		super( name, texture );
 
+		this.isSampledCubeTexture = true;
+
 		this.dimension = GPUTextureViewDimension.Cube;
 
 	}
 
 }
 
-WebGPUSampledCubeTexture.prototype.isSampledCubeTexture = true;
-
 export { WebGPUSampledTexture, WebGPUSampledArrayTexture, WebGPUSampled3DTexture, WebGPUSampledCubeTexture };

+ 2 - 2
examples/jsm/renderers/webgpu/WebGPUSampler.js

@@ -7,6 +7,8 @@ class WebGPUSampler extends WebGPUBinding {
 
 		super( name );
 
+		this.isSampler = true;
+
 		this.texture = texture;
 
 		this.type = GPUBindingType.Sampler;
@@ -24,6 +26,4 @@ class WebGPUSampler extends WebGPUBinding {
 
 }
 
-WebGPUSampler.prototype.isSampler = true;
-
 export default WebGPUSampler;

+ 2 - 2
examples/jsm/renderers/webgpu/WebGPUStorageBuffer.js

@@ -7,6 +7,8 @@ class WebGPUStorageBuffer extends WebGPUBuffer {
 
 		super( name, GPUBindingType.StorageBuffer, attribute.array );
 
+		this.isStorageBuffer = true;
+
 		this.usage |= GPUBufferUsage.VERTEX | GPUBufferUsage.STORAGE;
 
 		this.attribute = attribute;
@@ -15,6 +17,4 @@ class WebGPUStorageBuffer extends WebGPUBuffer {
 
 }
 
-WebGPUStorageBuffer.prototype.isStorageBuffer = true;
-
 export default WebGPUStorageBuffer;

+ 14 - 14
examples/jsm/renderers/webgpu/WebGPUUniform.js

@@ -34,6 +34,8 @@ class FloatUniform extends WebGPUUniform {
 
 		super( name, value );
 
+		this.isFloatUniform = true;
+
 		this.boundary = 4;
 		this.itemSize = 1;
 
@@ -41,14 +43,14 @@ class FloatUniform extends WebGPUUniform {
 
 }
 
-FloatUniform.prototype.isFloatUniform = true;
-
 class Vector2Uniform extends WebGPUUniform {
 
 	constructor( name, value = new Vector2() ) {
 
 		super( name, value );
 
+		this.isVector2Uniform = true;
+
 		this.boundary = 8;
 		this.itemSize = 2;
 
@@ -56,14 +58,14 @@ class Vector2Uniform extends WebGPUUniform {
 
 }
 
-Vector2Uniform.prototype.isVector2Uniform = true;
-
 class Vector3Uniform extends WebGPUUniform {
 
 	constructor( name, value = new Vector3() ) {
 
 		super( name, value );
 
+		this.isVector3Uniform = true;
+
 		this.boundary = 16;
 		this.itemSize = 3;
 
@@ -71,14 +73,14 @@ class Vector3Uniform extends WebGPUUniform {
 
 }
 
-Vector3Uniform.prototype.isVector3Uniform = true;
-
 class Vector4Uniform extends WebGPUUniform {
 
 	constructor( name, value = new Vector4() ) {
 
 		super( name, value );
 
+		this.isVector4Uniform = true;
+
 		this.boundary = 16;
 		this.itemSize = 4;
 
@@ -86,14 +88,14 @@ class Vector4Uniform extends WebGPUUniform {
 
 }
 
-Vector4Uniform.prototype.isVector4Uniform = true;
-
 class ColorUniform extends WebGPUUniform {
 
 	constructor( name, value = new Color() ) {
 
 		super( name, value );
 
+		this.isColorUniform = true;
+
 		this.boundary = 16;
 		this.itemSize = 3;
 
@@ -101,14 +103,14 @@ class ColorUniform extends WebGPUUniform {
 
 }
 
-ColorUniform.prototype.isColorUniform = true;
-
 class Matrix3Uniform extends WebGPUUniform {
 
 	constructor( name, value = new Matrix3() ) {
 
 		super( name, value );
 
+		this.isMatrix3Uniform = true;
+
 		this.boundary = 48;
 		this.itemSize = 12;
 
@@ -116,14 +118,14 @@ class Matrix3Uniform extends WebGPUUniform {
 
 }
 
-Matrix3Uniform.prototype.isMatrix3Uniform = true;
-
 class Matrix4Uniform extends WebGPUUniform {
 
 	constructor( name, value = new Matrix4() ) {
 
 		super( name, value );
 
+		this.isMatrix4Uniform = true;
+
 		this.boundary = 64;
 		this.itemSize = 16;
 
@@ -131,6 +133,4 @@ class Matrix4Uniform extends WebGPUUniform {
 
 }
 
-Matrix4Uniform.prototype.isMatrix4Uniform = true;
-
 export { FloatUniform, Vector2Uniform, Vector3Uniform, Vector4Uniform, ColorUniform, Matrix3Uniform, Matrix4Uniform };

+ 2 - 2
examples/jsm/renderers/webgpu/WebGPUUniformBuffer.js

@@ -7,12 +7,12 @@ class WebGPUUniformBuffer extends WebGPUBuffer {
 
 		super( name, GPUBindingType.UniformBuffer, buffer );
 
+		this.isUniformBuffer = true;
+
 		this.usage |= GPUBufferUsage.UNIFORM;
 
 	}
 
 }
 
-WebGPUUniformBuffer.prototype.isUniformBuffer = true;
-
 export default WebGPUUniformBuffer;

+ 2 - 2
examples/jsm/renderers/webgpu/WebGPUUniformsGroup.js

@@ -7,6 +7,8 @@ class WebGPUUniformsGroup extends WebGPUUniformBuffer {
 
 		super( name );
 
+		this.isUniformsGroup = true;
+
 		// the order of uniforms in this array must match the order of uniforms in the shader
 
 		this.uniforms = [];
@@ -294,6 +296,4 @@ function arraysEqual( a, b, offset ) {
 
 }
 
-WebGPUUniformsGroup.prototype.isUniformsGroup = true;
-
 export default WebGPUUniformsGroup;