瀏覽代碼

r132 (bis)

Mr.doob 3 年之前
父節點
當前提交
517eedbacd
共有 5 個文件被更改,包括 26 次插入55 次删除
  1. 12 41
      build/three.js
  2. 0 0
      build/three.min.js
  3. 12 12
      build/three.module.js
  4. 1 1
      editor/sw.js
  5. 1 1
      package.json

+ 12 - 41
build/three.js

@@ -5857,31 +5857,12 @@
 
 	}
 
-	var id = 0;
-
-	function _classPrivateFieldLooseKey(name) {
-		return "__private_" + id++ + "_" + name;
-	}
-
-	function _classPrivateFieldLooseBase(receiver, privateKey) {
-		if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) {
-			throw new TypeError("attempted to use private field on non-instance");
-		}
-
-		return receiver;
-	}
-
 	let materialId = 0;
 
-	var _alphaTest = /*#__PURE__*/_classPrivateFieldLooseKey("alphaTest");
-
 	class Material extends EventDispatcher {
 		constructor() {
 			super();
-			Object.defineProperty(this, _alphaTest, {
-				writable: true,
-				value: 0
-			});
+			this._alphaTest = 0;
 			Object.defineProperty(this, 'id', {
 				value: materialId++
 			});
@@ -5932,15 +5913,15 @@
 		}
 
 		get alphaTest() {
-			return _classPrivateFieldLooseBase(this, _alphaTest)[_alphaTest];
+			return this._alphaTest;
 		}
 
 		set alphaTest(value) {
-			if (_classPrivateFieldLooseBase(this, _alphaTest)[_alphaTest] > 0 !== value > 0) {
+			if (this._alphaTest > 0 !== value > 0) {
 				this.version++;
 			}
 
-			_classPrivateFieldLooseBase(this, _alphaTest)[_alphaTest] = value;
+			this._alphaTest = value;
 		}
 
 		onBuild() {}
@@ -25642,21 +25623,11 @@
 	 * }
 	 */
 
-	var _clearcoat = /*#__PURE__*/_classPrivateFieldLooseKey("clearcoat");
-
-	var _transmission = /*#__PURE__*/_classPrivateFieldLooseKey("transmission");
-
 	class MeshPhysicalMaterial extends MeshStandardMaterial {
 		constructor(parameters) {
 			super();
-			Object.defineProperty(this, _clearcoat, {
-				writable: true,
-				value: 0
-			});
-			Object.defineProperty(this, _transmission, {
-				writable: true,
-				value: 0
-			});
+			this._clearcoat = 0;
+			this._transmission = 0;
 			this.defines = {
 				'STANDARD': '',
 				'PHYSICAL': ''
@@ -25691,27 +25662,27 @@
 		}
 
 		get clearcoat() {
-			return _classPrivateFieldLooseBase(this, _clearcoat)[_clearcoat];
+			return this._clearcoat;
 		}
 
 		set clearcoat(value) {
-			if (_classPrivateFieldLooseBase(this, _clearcoat)[_clearcoat] > 0 !== value > 0) {
+			if (this._clearcoat > 0 !== value > 0) {
 				this.version++;
 			}
 
-			_classPrivateFieldLooseBase(this, _clearcoat)[_clearcoat] = value;
+			this._clearcoat = value;
 		}
 
 		get transmission() {
-			return _classPrivateFieldLooseBase(this, _transmission)[_transmission];
+			return this._transmission;
 		}
 
 		set transmission(value) {
-			if (_classPrivateFieldLooseBase(this, _transmission)[_transmission] > 0 !== value > 0) {
+			if (this._transmission > 0 !== value > 0) {
 				this.version++;
 			}
 
-			_classPrivateFieldLooseBase(this, _transmission)[_transmission] = value;
+			this._transmission = value;
 		}
 
 		copy(source) {

File diff suppressed because it is too large
+ 0 - 0
build/three.min.js


+ 12 - 12
build/three.module.js

@@ -7687,7 +7687,7 @@ let materialId = 0;
 
 class Material extends EventDispatcher {
 
-	#alphaTest = 0;
+	_alphaTest = 0;
 
 	constructor() {
 
@@ -7761,19 +7761,19 @@ class Material extends EventDispatcher {
 
 	get alphaTest() {
 
-		return this.#alphaTest;
+		return this._alphaTest;
 
 	}
 
 	set alphaTest( value ) {
 
-		if ( this.#alphaTest > 0 !== value > 0 ) {
+		if ( this._alphaTest > 0 !== value > 0 ) {
 
 			this.version ++;
 
 		}
 
-		this.#alphaTest = value;
+		this._alphaTest = value;
 
 	}
 
@@ -35090,8 +35090,8 @@ MeshStandardMaterial.prototype.isMeshStandardMaterial = true;
 
 class MeshPhysicalMaterial extends MeshStandardMaterial {
 
-	#clearcoat = 0;
-	#transmission = 0;
+	_clearcoat = 0;
+	_transmission = 0;
 
 	constructor( parameters ) {
 
@@ -35148,37 +35148,37 @@ class MeshPhysicalMaterial extends MeshStandardMaterial {
 
 	get clearcoat() {
 
-		return this.#clearcoat;
+		return this._clearcoat;
 
 	}
 
 	set clearcoat( value ) {
 
-		if ( this.#clearcoat > 0 !== value > 0 ) {
+		if ( this._clearcoat > 0 !== value > 0 ) {
 
 			this.version ++;
 
 		}
 
-		this.#clearcoat = value;
+		this._clearcoat = value;
 
 	}
 
 	get transmission() {
 
-		return this.#transmission;
+		return this._transmission;
 
 	}
 
 	set transmission( value ) {
 
-		if ( this.#transmission > 0 !== value > 0 ) {
+		if ( this._transmission > 0 !== value > 0 ) {
 
 			this.version ++;
 
 		}
 
-		this.#transmission = value;
+		this._transmission = value;
 
 	}
 

+ 1 - 1
editor/sw.js

@@ -1,4 +1,4 @@
-// r132
+// r132.1
 
 const cacheName = 'threejs-editor';
 

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "three",
-  "version": "0.132.0",
+  "version": "0.132.1",
   "description": "JavaScript 3D library",
   "main": "build/three.js",
   "module": "build/three.module.js",

Some files were not shown because too many files changed in this diff