|
@@ -12974,9 +12974,9 @@ Object.assign( BufferAttribute.prototype, {
|
|
|
|
|
|
//
|
|
|
|
|
|
-function Int8BufferAttribute( array, itemSize ) {
|
|
|
+function Int8BufferAttribute( array, itemSize, normalized ) {
|
|
|
|
|
|
- BufferAttribute.call( this, new Int8Array( array ), itemSize );
|
|
|
+ BufferAttribute.call( this, new Int8Array( array ), itemSize, normalized );
|
|
|
|
|
|
}
|
|
|
|
|
@@ -12984,9 +12984,9 @@ Int8BufferAttribute.prototype = Object.create( BufferAttribute.prototype );
|
|
|
Int8BufferAttribute.prototype.constructor = Int8BufferAttribute;
|
|
|
|
|
|
|
|
|
-function Uint8BufferAttribute( array, itemSize ) {
|
|
|
+function Uint8BufferAttribute( array, itemSize, normalized ) {
|
|
|
|
|
|
- BufferAttribute.call( this, new Uint8Array( array ), itemSize );
|
|
|
+ BufferAttribute.call( this, new Uint8Array( array ), itemSize, normalized );
|
|
|
|
|
|
}
|
|
|
|
|
@@ -12994,9 +12994,9 @@ Uint8BufferAttribute.prototype = Object.create( BufferAttribute.prototype );
|
|
|
Uint8BufferAttribute.prototype.constructor = Uint8BufferAttribute;
|
|
|
|
|
|
|
|
|
-function Uint8ClampedBufferAttribute( array, itemSize ) {
|
|
|
+function Uint8ClampedBufferAttribute( array, itemSize, normalized ) {
|
|
|
|
|
|
- BufferAttribute.call( this, new Uint8ClampedArray( array ), itemSize );
|
|
|
+ BufferAttribute.call( this, new Uint8ClampedArray( array ), itemSize, normalized );
|
|
|
|
|
|
}
|
|
|
|
|
@@ -13004,9 +13004,9 @@ Uint8ClampedBufferAttribute.prototype = Object.create( BufferAttribute.prototype
|
|
|
Uint8ClampedBufferAttribute.prototype.constructor = Uint8ClampedBufferAttribute;
|
|
|
|
|
|
|
|
|
-function Int16BufferAttribute( array, itemSize ) {
|
|
|
+function Int16BufferAttribute( array, itemSize, normalized ) {
|
|
|
|
|
|
- BufferAttribute.call( this, new Int16Array( array ), itemSize );
|
|
|
+ BufferAttribute.call( this, new Int16Array( array ), itemSize, normalized );
|
|
|
|
|
|
}
|
|
|
|
|
@@ -13014,9 +13014,9 @@ Int16BufferAttribute.prototype = Object.create( BufferAttribute.prototype );
|
|
|
Int16BufferAttribute.prototype.constructor = Int16BufferAttribute;
|
|
|
|
|
|
|
|
|
-function Uint16BufferAttribute( array, itemSize ) {
|
|
|
+function Uint16BufferAttribute( array, itemSize, normalized ) {
|
|
|
|
|
|
- BufferAttribute.call( this, new Uint16Array( array ), itemSize );
|
|
|
+ BufferAttribute.call( this, new Uint16Array( array ), itemSize, normalized );
|
|
|
|
|
|
}
|
|
|
|
|
@@ -13024,9 +13024,9 @@ Uint16BufferAttribute.prototype = Object.create( BufferAttribute.prototype );
|
|
|
Uint16BufferAttribute.prototype.constructor = Uint16BufferAttribute;
|
|
|
|
|
|
|
|
|
-function Int32BufferAttribute( array, itemSize ) {
|
|
|
+function Int32BufferAttribute( array, itemSize, normalized ) {
|
|
|
|
|
|
- BufferAttribute.call( this, new Int32Array( array ), itemSize );
|
|
|
+ BufferAttribute.call( this, new Int32Array( array ), itemSize, normalized );
|
|
|
|
|
|
}
|
|
|
|
|
@@ -13034,9 +13034,9 @@ Int32BufferAttribute.prototype = Object.create( BufferAttribute.prototype );
|
|
|
Int32BufferAttribute.prototype.constructor = Int32BufferAttribute;
|
|
|
|
|
|
|
|
|
-function Uint32BufferAttribute( array, itemSize ) {
|
|
|
+function Uint32BufferAttribute( array, itemSize, normalized ) {
|
|
|
|
|
|
- BufferAttribute.call( this, new Uint32Array( array ), itemSize );
|
|
|
+ BufferAttribute.call( this, new Uint32Array( array ), itemSize, normalized );
|
|
|
|
|
|
}
|
|
|
|
|
@@ -13044,9 +13044,9 @@ Uint32BufferAttribute.prototype = Object.create( BufferAttribute.prototype );
|
|
|
Uint32BufferAttribute.prototype.constructor = Uint32BufferAttribute;
|
|
|
|
|
|
|
|
|
-function Float32BufferAttribute( array, itemSize ) {
|
|
|
+function Float32BufferAttribute( array, itemSize, normalized ) {
|
|
|
|
|
|
- BufferAttribute.call( this, new Float32Array( array ), itemSize );
|
|
|
+ BufferAttribute.call( this, new Float32Array( array ), itemSize, normalized );
|
|
|
|
|
|
}
|
|
|
|
|
@@ -13054,9 +13054,9 @@ Float32BufferAttribute.prototype = Object.create( BufferAttribute.prototype );
|
|
|
Float32BufferAttribute.prototype.constructor = Float32BufferAttribute;
|
|
|
|
|
|
|
|
|
-function Float64BufferAttribute( array, itemSize ) {
|
|
|
+function Float64BufferAttribute( array, itemSize, normalized ) {
|
|
|
|
|
|
- BufferAttribute.call( this, new Float64Array( array ), itemSize );
|
|
|
+ BufferAttribute.call( this, new Float64Array( array ), itemSize, normalized );
|
|
|
|
|
|
}
|
|
|
|
|
@@ -15924,6 +15924,18 @@ Mesh.prototype = Object.assign( Object.create( Object3D.prototype ), {
|
|
|
|
|
|
this.drawMode = source.drawMode;
|
|
|
|
|
|
+ if ( source.morphTargetInfluences !== undefined ) {
|
|
|
+
|
|
|
+ this.morphTargetInfluences = source.morphTargetInfluences.slice();
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ if ( source.morphTargetDictionary !== undefined ) {
|
|
|
+
|
|
|
+ this.morphTargetDictionary = Object.assign( {}, source.morphTargetDictionary );
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
return this;
|
|
|
|
|
|
},
|
|
@@ -17685,21 +17697,29 @@ function WebGLProgram( renderer, extensions, code, material, shader, parameters
|
|
|
|
|
|
prefixVertex = [
|
|
|
|
|
|
- customDefines,
|
|
|
-
|
|
|
- '\n'
|
|
|
+ customDefines
|
|
|
|
|
|
].filter( filterEmptyLine ).join( '\n' );
|
|
|
|
|
|
+ if ( prefixVertex.length > 0 ) {
|
|
|
+
|
|
|
+ prefixVertex += '\n';
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
prefixFragment = [
|
|
|
|
|
|
customExtensions,
|
|
|
- customDefines,
|
|
|
-
|
|
|
- '\n'
|
|
|
+ customDefines
|
|
|
|
|
|
].filter( filterEmptyLine ).join( '\n' );
|
|
|
|
|
|
+ if ( prefixFragment.length > 0 ) {
|
|
|
+
|
|
|
+ prefixFragment += '\n';
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
} else {
|
|
|
|
|
|
prefixVertex = [
|
|
@@ -18407,7 +18427,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
|
|
|
function makePowerOfTwo( image ) {
|
|
|
|
|
|
- if ( image instanceof HTMLImageElement || image instanceof HTMLCanvasElement ) {
|
|
|
+ if ( image instanceof HTMLImageElement || image instanceof HTMLCanvasElement || image instanceof ImageBitmap ) {
|
|
|
|
|
|
var canvas = document.createElementNS( 'http://www.w3.org/1999/xhtml', 'canvas' );
|
|
|
canvas.width = _Math.floorPowerOfTwo( image.width );
|