Skip to content

Commit b7dbcb0

Browse files
committed
Updated builds.
1 parent a64bfd2 commit b7dbcb0

File tree

2 files changed

+47
-65
lines changed

2 files changed

+47
-65
lines changed

build/three.js

Lines changed: 34 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -21881,18 +21881,19 @@
2188121881
try {
2188221882

2188321883
var texture = renderTarget.texture;
21884+
var textureFormat = texture.format;
21885+
var textureType = texture.type;
2188421886

21885-
if ( texture.format !== RGBAFormat && paramThreeToGL( texture.format ) !== _gl.getParameter( _gl.IMPLEMENTATION_COLOR_READ_FORMAT ) ) {
21887+
if ( textureFormat !== RGBAFormat && paramThreeToGL( textureFormat ) !== _gl.getParameter( _gl.IMPLEMENTATION_COLOR_READ_FORMAT ) ) {
2188621888

2188721889
console.error( 'THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.' );
2188821890
return;
2188921891

2189021892
}
2189121893

21892-
if ( texture.type !== UnsignedByteType &&
21893-
paramThreeToGL( texture.type ) !== _gl.getParameter( _gl.IMPLEMENTATION_COLOR_READ_TYPE ) &&
21894-
! ( texture.type === FloatType && extensions.get( 'WEBGL_color_buffer_float' ) ) &&
21895-
! ( texture.type === HalfFloatType && extensions.get( 'EXT_color_buffer_half_float' ) ) ) {
21894+
if ( textureType !== UnsignedByteType && paramThreeToGL( textureType ) !== _gl.getParameter( _gl.IMPLEMENTATION_COLOR_READ_TYPE ) && // IE11, Edge and Chrome Mac < 52 (#9513)
21895+
! ( textureType === FloatType && ( extensions.get( 'OES_texture_float' ) || extensions.get( 'WEBGL_color_buffer_float' ) ) ) && // Chrome Mac >= 52 and Firefox
21896+
! ( textureType === HalfFloatType && extensions.get( 'EXT_color_buffer_half_float' ) ) ) {
2189621897

2189721898
console.error( 'THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.' );
2189821899
return;
@@ -21905,7 +21906,7 @@
2190521906

2190621907
if ( ( x >= 0 && x <= ( renderTarget.width - width ) ) && ( y >= 0 && y <= ( renderTarget.height - height ) ) ) {
2190721908

21908-
_gl.readPixels( x, y, width, height, paramThreeToGL( texture.format ), paramThreeToGL( texture.type ), buffer );
21909+
_gl.readPixels( x, y, width, height, paramThreeToGL( textureFormat ), paramThreeToGL( textureType ), buffer );
2190921910

2191021911
}
2191121912

@@ -38576,62 +38577,42 @@
3857638577
CylinderBufferGeometry.prototype = Object.create( BufferGeometry.prototype );
3857738578
CylinderBufferGeometry.prototype.constructor = CylinderBufferGeometry;
3857838579

38579-
/**
38580-
* @author WestLangley / http://github.com/WestLangley
38581-
* @author zz85 / http://github.com/zz85
38582-
* @author bhouston / http://clara.io
38583-
*
38584-
* Creates an arrow for visualizing directions
38585-
*
38586-
* Parameters:
38587-
* dir - Vector3
38588-
* origin - Vector3
38589-
* length - Number
38590-
* color - color in hex value
38591-
* headLength - Number
38592-
* headWidth - Number
38593-
*/
38594-
38595-
exports.ArrowHelper = ( function () {
38596-
38597-
var lineGeometry = new BufferGeometry();
38598-
lineGeometry.addAttribute( 'position', new Float32Attribute( [ 0, 0, 0, 0, 1, 0 ], 3 ) );
38599-
38600-
var coneGeometry = new CylinderBufferGeometry( 0, 0.5, 1, 5, 1 );
38601-
coneGeometry.translate( 0, - 0.5, 0 );
38580+
var lineGeometry = new BufferGeometry();
38581+
lineGeometry.addAttribute( 'position', new Float32Attribute( [ 0, 0, 0, 0, 1, 0 ], 3 ) );
3860238582

38603-
return function ArrowHelper( dir, origin, length, color, headLength, headWidth ) {
38583+
var coneGeometry = new CylinderBufferGeometry( 0, 0.5, 1, 5, 1 );
38584+
coneGeometry.translate( 0, - 0.5, 0 );
3860438585

38605-
// dir is assumed to be normalized
38586+
function ArrowHelper( dir, origin, length, color, headLength, headWidth ) {
3860638587

38607-
Object3D.call( this );
38588+
// dir is assumed to be normalized
3860838589

38609-
if ( color === undefined ) color = 0xffff00;
38610-
if ( length === undefined ) length = 1;
38611-
if ( headLength === undefined ) headLength = 0.2 * length;
38612-
if ( headWidth === undefined ) headWidth = 0.2 * headLength;
38590+
Object3D.call( this );
3861338591

38614-
this.position.copy( origin );
38592+
if ( color === undefined ) color = 0xffff00;
38593+
if ( length === undefined ) length = 1;
38594+
if ( headLength === undefined ) headLength = 0.2 * length;
38595+
if ( headWidth === undefined ) headWidth = 0.2 * headLength;
3861538596

38616-
this.line = new Line( lineGeometry, new LineBasicMaterial( { color: color } ) );
38617-
this.line.matrixAutoUpdate = false;
38618-
this.add( this.line );
38597+
this.position.copy( origin );
3861938598

38620-
this.cone = new Mesh( coneGeometry, new MeshBasicMaterial( { color: color } ) );
38621-
this.cone.matrixAutoUpdate = false;
38622-
this.add( this.cone );
38599+
this.line = new Line( lineGeometry, new LineBasicMaterial( { color: color } ) );
38600+
this.line.matrixAutoUpdate = false;
38601+
this.add( this.line );
3862338602

38624-
this.setDirection( dir );
38625-
this.setLength( length, headLength, headWidth );
38603+
this.cone = new Mesh( coneGeometry, new MeshBasicMaterial( { color: color } ) );
38604+
this.cone.matrixAutoUpdate = false;
38605+
this.add( this.cone );
3862638606

38627-
};
38607+
this.setDirection( dir );
38608+
this.setLength( length, headLength, headWidth );
3862838609

38629-
}() );
38610+
}
3863038611

38631-
exports.ArrowHelper.prototype = Object.create( Object3D.prototype );
38632-
exports.ArrowHelper.prototype.constructor = exports.ArrowHelper;
38612+
ArrowHelper.prototype = Object.create( Object3D.prototype );
38613+
ArrowHelper.prototype.constructor = ArrowHelper;
3863338614

38634-
exports.ArrowHelper.prototype.setDirection = ( function () {
38615+
ArrowHelper.prototype.setDirection = ( function () {
3863538616

3863638617
var axis = new Vector3();
3863738618
var radians;
@@ -38662,7 +38643,7 @@
3866238643

3866338644
}() );
3866438645

38665-
exports.ArrowHelper.prototype.setLength = function ( length, headLength, headWidth ) {
38646+
ArrowHelper.prototype.setLength = function ( length, headLength, headWidth ) {
3866638647

3866738648
if ( headLength === undefined ) headLength = 0.2 * length;
3866838649
if ( headWidth === undefined ) headWidth = 0.2 * headLength;
@@ -38676,7 +38657,7 @@
3867638657

3867738658
};
3867838659

38679-
exports.ArrowHelper.prototype.setColor = function ( color ) {
38660+
ArrowHelper.prototype.setColor = function ( color ) {
3868038661

3868138662
this.line.material.color.copy( color );
3868238663
this.cone.material.color.copy( color );
@@ -41469,6 +41450,7 @@
4146941450
exports.CameraHelper = CameraHelper;
4147041451
exports.BoundingBoxHelper = BoundingBoxHelper;
4147141452
exports.BoxHelper = BoxHelper;
41453+
exports.ArrowHelper = ArrowHelper;
4147241454
exports.AxisHelper = AxisHelper;
4147341455
exports.WireframeGeometry = WireframeGeometry;
4147441456
exports.ParametricGeometry = ParametricGeometry;

0 commit comments

Comments
 (0)