提交 d2cfb5ec 编写于 作者: M Mr.doob

Made id property immutable.

I'm seeing people modifying it :(
上级 92e861bf
......@@ -5,7 +5,8 @@
THREE.BufferGeometry = function () {
this.id = THREE.GeometryIdCount ++;
Object.defineProperty( this, 'id', { value: THREE.GeometryIdCount ++ } );
this.uuid = THREE.Math.generateUUID();
this.name = '';
......
......@@ -9,7 +9,8 @@
THREE.Geometry = function () {
this.id = THREE.GeometryIdCount ++;
Object.defineProperty( this, 'id', { value: THREE.GeometryIdCount ++ } );
this.uuid = THREE.Math.generateUUID();
this.name = '';
......
......@@ -7,7 +7,8 @@
THREE.Object3D = function () {
this.id = THREE.Object3DIdCount ++;
Object.defineProperty( this, 'id', { value: THREE.Object3DIdCount ++ } );
this.uuid = THREE.Math.generateUUID();
this.name = '';
......
......@@ -5,7 +5,8 @@
THREE.Material = function () {
this.id = THREE.MaterialIdCount ++;
Object.defineProperty( this, 'id', { value: THREE.MaterialIdCount ++ } );
this.uuid = THREE.Math.generateUUID();
this.name = '';
......
......@@ -6,7 +6,8 @@
THREE.Texture = function ( image, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy ) {
this.id = THREE.TextureIdCount ++;
Object.defineProperty( this, 'id', { value: THREE.TextureIdCount ++ } );
this.uuid = THREE.Math.generateUUID();
this.name = '';
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册