提交 46630ad4 编写于 作者: T Tristan VALCKE

Style

上级 2754225c
......@@ -34,7 +34,11 @@ function BufferAttribute( array, itemSize, normalized ) {
Object.defineProperty( BufferAttribute.prototype, "needsUpdate", {
set: function(value) { if ( value === true ) this.version ++; }
set: function(value) {
if ( value === true ) this.version ++;
}
});
......
......@@ -23,7 +23,11 @@ function InterleavedBuffer( array, stride ) {
Object.defineProperty( InterleavedBuffer.prototype, "needsUpdate", {
set: function(value) { if ( value === true ) this.version ++; }
set: function(value) {
if ( value === true ) this.version ++;
}
});
......
......@@ -18,9 +18,25 @@ function InterleavedBufferAttribute( interleavedBuffer, itemSize, offset, normal
Object.defineProperties( InterleavedBufferAttribute.prototype, {
"count" : { get: function () { return this.data.count; } },
"count" : {
"array" : { get: function () { return this.data.array; } }
get: function () {
return this.data.count;
}
},
"array" : {
get: function () {
return this.data.array;
}
}
} );
......
......@@ -70,6 +70,7 @@ Object.defineProperty( Material.prototype, "needsUpdate", {
return this._needsUpdate;
},
set: function(value) {
if ( value === true ) this.update();
......
......@@ -178,8 +178,7 @@ Object.assign( Frustum.prototype, {
};
}(),
containsPoint: function ( point ) {
var planes = this.planes;
......
......@@ -256,4 +256,5 @@ Object.assign( Interpolant.prototype, {
} );
export { Interpolant };
......@@ -325,8 +325,6 @@ Object.assign( Ray.prototype, {
},
intersectsPlane: function ( plane ) {
// check if the ray lies on the plane first
......
......@@ -15,18 +15,39 @@ function Vector2( x, y ) {
Object.defineProperties( Vector2.prototype, {
"width" : {
get: function () { return this.x; },
set: function ( value ) { this.x = value; }
get: function () {
return this.x;
},
set: function ( value ) {
this.x = value;
}
},
"height" : {
get: function () { return this.y; },
set: function ( value ) { this.y = value; }
get: function () {
return this.y;
},
set: function ( value ) {
this.y = value;
}
}
} );
Object.assign( Vector2.prototype, {
constructor: Vector2,
......
......@@ -61,7 +61,11 @@ Texture.DEFAULT_MAPPING = UVMapping;
Object.defineProperty( Texture.prototype, "needsUpdate", {
set: function(value) { if ( value === true ) this.version ++; }
set: function(value) {
if ( value === true ) this.version ++;
}
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册