mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-12-02 02:14:56 +01:00
27 lines
656 B
JavaScript
Executable File
27 lines
656 B
JavaScript
Executable File
/**
|
|
* @author mrdoob / http://mrdoob.com/
|
|
* @author jbaicoianu / http://baicoianu.com/
|
|
*/
|
|
|
|
THREE.ProxyVector2 = function ( array, offset ) {
|
|
|
|
this.array = array;
|
|
this.offset = offset;
|
|
|
|
};
|
|
|
|
THREE.ProxyVector2.prototype = Object.create( THREE.Vector2.prototype );
|
|
THREE.ProxyVector2.prototype.constructor = THREE.ProxyVector2;
|
|
|
|
Object.defineProperties( THREE.ProxyVector2.prototype, {
|
|
'x': {
|
|
get: function () { return this.array[ this.offset ]; },
|
|
set: function ( v ) { this.array[ this.offset ] = v; }
|
|
},
|
|
'y': {
|
|
get: function () { return this.array[ this.offset + 1 ]; },
|
|
set: function ( v ) { this.array[ this.offset + 1 ] = v; }
|
|
}
|
|
} );
|
|
|