|
@@ -208,7 +208,7 @@ function EventDispatcher() {}
|
|
|
|
|
|
Object.assign( EventDispatcher.prototype, {
|
|
|
|
|
|
- addEventListener: function ( type, listener, importance=0 ) {//add importance
|
|
|
+ addEventListener: function ( type, listener ) {
|
|
|
|
|
|
if ( this._listeners === undefined ) this._listeners = {};
|
|
|
|
|
@@ -220,10 +220,10 @@ Object.assign( EventDispatcher.prototype, {
|
|
|
|
|
|
}
|
|
|
|
|
|
- if ( !listeners[ type ].some(e=>e.listener == listener ) ) {
|
|
|
- //listeners[ type ].push( listener );
|
|
|
- listeners[type].push({ listener, importance});
|
|
|
- listeners[type] = listeners[type].sort((e,a)=> a.importance - e.importance)//add
|
|
|
+ if ( listeners[ type ].indexOf( listener ) === - 1 ) {
|
|
|
+
|
|
|
+ listeners[ type ].push( listener );
|
|
|
+
|
|
|
}
|
|
|
|
|
|
},
|
|
@@ -234,7 +234,7 @@ Object.assign( EventDispatcher.prototype, {
|
|
|
|
|
|
const listeners = this._listeners;
|
|
|
|
|
|
- return listeners[ type ] !== undefined && listeners[ type ].some(e=>e.listener == listener )
|
|
|
+ return listeners[ type ] !== undefined && listeners[ type ].indexOf( listener ) !== - 1;
|
|
|
|
|
|
},
|
|
|
|
|
@@ -247,36 +247,20 @@ Object.assign( EventDispatcher.prototype, {
|
|
|
|
|
|
if ( listenerArray !== undefined ) {
|
|
|
|
|
|
- /* const index = listenerArray.indexOf( listener );
|
|
|
+ const index = listenerArray.indexOf( listener );
|
|
|
|
|
|
if ( index !== - 1 ) {
|
|
|
|
|
|
listenerArray.splice( index, 1 );
|
|
|
|
|
|
- } */
|
|
|
-
|
|
|
- let item = listenerArray.find(e=>e.listener == listener)
|
|
|
- item && listenerArray.splice(listenerArray.indexOf(item), 1);
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
- removeEventListeners(type){//add
|
|
|
- if(this._listeners && this._listeners[type] !== undefined){
|
|
|
- delete this._listeners[type];
|
|
|
- }
|
|
|
- } ,
|
|
|
- removeAllListeners(){ //add
|
|
|
- this._listeners = {};
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- dispatchEvent: function ( event ) {
|
|
|
- if(typeof event == 'string'){//add
|
|
|
- event = {type:event}
|
|
|
- }
|
|
|
+
|
|
|
+ dispatchEvent: function ( event ) {
|
|
|
+
|
|
|
if ( this._listeners === undefined ) return;
|
|
|
|
|
|
const listeners = this._listeners;
|
|
@@ -287,18 +271,18 @@ Object.assign( EventDispatcher.prototype, {
|
|
|
event.target = this;
|
|
|
|
|
|
// Make a copy, in case listeners are removed while iterating.
|
|
|
-
|
|
|
- for(let {listener} of listenerArray.slice(0)){
|
|
|
- let result = listener.call(this, event); //add stopContinue
|
|
|
- if(result && result.stopContinue){
|
|
|
- break
|
|
|
- }
|
|
|
+ const array = listenerArray.slice( 0 );
|
|
|
+
|
|
|
+ for ( let i = 0, l = array.length; i < l; i ++ ) {
|
|
|
+
|
|
|
+ array[ i ].call( this, event );
|
|
|
+
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
} );
|
|
|
|
|
|
const _lut = [];
|
|
@@ -6845,11 +6829,8 @@ Object3D.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
|
|
|
|
|
|
traverse: function ( callback ) {
|
|
|
|
|
|
- let result = callback( this );
|
|
|
- if(result && result.stopContinue){//xzw add
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
+ callback( this );
|
|
|
+
|
|
|
const children = this.children;
|
|
|
|
|
|
for ( let i = 0, l = children.length; i < l; i ++ ) {
|
|
@@ -8543,7 +8524,7 @@ Material.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
|
|
|
|
|
|
if ( currentValue === undefined ) {
|
|
|
|
|
|
- //console.warn( 'THREE.' + this.type + ': \'' + key + '\' is not a property of this material.' );
|
|
|
+ console.warn( 'THREE.' + this.type + ': \'' + key + '\' is not a property of this material.' );
|
|
|
continue;
|
|
|
|
|
|
}
|
|
@@ -8715,7 +8696,7 @@ Material.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
|
|
|
if ( this.polygonOffsetFactor !== 0 ) data.polygonOffsetFactor = this.polygonOffsetFactor;
|
|
|
if ( this.polygonOffsetUnits !== 0 ) data.polygonOffsetUnits = this.polygonOffsetUnits;
|
|
|
|
|
|
- if ( this.lineWidth && this.lineWidth !== 1 ) data.lineWidth = this.lineWidth;
|
|
|
+ if ( this.linewidth && this.linewidth !== 1 ) data.linewidth = this.linewidth;
|
|
|
if ( this.dashSize !== undefined ) data.dashSize = this.dashSize;
|
|
|
if ( this.gapSize !== undefined ) data.gapSize = this.gapSize;
|
|
|
if ( this.scale !== undefined ) data.scale = this.scale;
|
|
@@ -8726,7 +8707,7 @@ Material.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
|
|
|
if ( this.premultipliedAlpha === true ) data.premultipliedAlpha = this.premultipliedAlpha;
|
|
|
|
|
|
if ( this.wireframe === true ) data.wireframe = this.wireframe;
|
|
|
- if ( this.wireframelineWidth > 1 ) data.wireframelineWidth = this.wireframelineWidth;
|
|
|
+ if ( this.wireframeLinewidth > 1 ) data.wireframeLinewidth = this.wireframeLinewidth;
|
|
|
if ( this.wireframeLinecap !== 'round' ) data.wireframeLinecap = this.wireframeLinecap;
|
|
|
if ( this.wireframeLinejoin !== 'round' ) data.wireframeLinejoin = this.wireframeLinejoin;
|
|
|
|
|
@@ -8900,7 +8881,7 @@ Object.defineProperty( Material.prototype, 'needsUpdate', {
|
|
|
* depthWrite: <bool>,
|
|
|
*
|
|
|
* wireframe: <boolean>,
|
|
|
- * wireframelineWidth: <float>,
|
|
|
+ * wireframeLinewidth: <float>,
|
|
|
*
|
|
|
* skinning: <bool>,
|
|
|
* morphTargets: <bool>
|
|
@@ -8933,7 +8914,7 @@ function MeshBasicMaterial( parameters ) {
|
|
|
this.refractionRatio = 0.98;
|
|
|
|
|
|
this.wireframe = false;
|
|
|
- this.wireframelineWidth = 1;
|
|
|
+ this.wireframeLinewidth = 1;
|
|
|
this.wireframeLinecap = 'round';
|
|
|
this.wireframeLinejoin = 'round';
|
|
|
|
|
@@ -8973,7 +8954,7 @@ MeshBasicMaterial.prototype.copy = function ( source ) {
|
|
|
this.refractionRatio = source.refractionRatio;
|
|
|
|
|
|
this.wireframe = source.wireframe;
|
|
|
- this.wireframelineWidth = source.wireframelineWidth;
|
|
|
+ this.wireframeLinewidth = source.wireframeLinewidth;
|
|
|
this.wireframeLinecap = source.wireframeLinecap;
|
|
|
this.wireframeLinejoin = source.wireframeLinejoin;
|
|
|
|
|
@@ -11719,7 +11700,7 @@ var default_fragment = "void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0
|
|
|
* vertexShader: <string>,
|
|
|
*
|
|
|
* wireframe: <boolean>,
|
|
|
- * wireframelineWidth: <float>,
|
|
|
+ * wireframeLinewidth: <float>,
|
|
|
*
|
|
|
* lights: <bool>,
|
|
|
*
|
|
@@ -11741,10 +11722,10 @@ function ShaderMaterial( parameters ) {
|
|
|
this.vertexShader = default_vertex;
|
|
|
this.fragmentShader = default_fragment;
|
|
|
|
|
|
- this.lineWidth = 1;
|
|
|
+ this.linewidth = 1;
|
|
|
|
|
|
this.wireframe = false;
|
|
|
- this.wireframelineWidth = 1;
|
|
|
+ this.wireframeLinewidth = 1;
|
|
|
|
|
|
this.fog = false; // set to use scene fog
|
|
|
this.lights = false; // set to use scene lights
|
|
@@ -11805,7 +11786,7 @@ ShaderMaterial.prototype.copy = function ( source ) {
|
|
|
this.defines = Object.assign( {}, source.defines );
|
|
|
|
|
|
this.wireframe = source.wireframe;
|
|
|
- this.wireframelineWidth = source.wireframelineWidth;
|
|
|
+ this.wireframeLinewidth = source.wireframeLinewidth;
|
|
|
|
|
|
this.lights = source.lights;
|
|
|
this.clipping = source.clipping;
|
|
@@ -17467,13 +17448,7 @@ function WebGLProgram( renderer, cacheKey, parameters, bindingStates ) {
|
|
|
const fragmentErrors = getShaderErrors( gl, glFragmentShader, 'fragment' );
|
|
|
|
|
|
console.error( 'THREE.WebGLProgram: shader error: ', gl.getError(), '35715', gl.getProgramParameter( program, 35715 ), 'gl.getProgramInfoLog', programLog, vertexErrors, fragmentErrors );
|
|
|
- //add:
|
|
|
- if(fragmentErrors){
|
|
|
- console.log(fragmentGlsl.split("\n").map((a, i) => `${i + 1}`.padEnd(5) + a).join("\n") )
|
|
|
- }else{
|
|
|
- console.log(vertexGlsl.split("\n").map((a, i) => `${i + 1}`.padEnd(5) + a).join("\n") )
|
|
|
- }
|
|
|
-
|
|
|
+
|
|
|
} else if ( programLog !== '' ) {
|
|
|
|
|
|
console.warn( 'THREE.WebGLProgram: gl.getProgramInfoLog()', programLog );
|
|
@@ -18896,7 +18871,7 @@ function WebGLRenderStates( extensions, capabilities ) {
|
|
|
* displacementBias: <float>,
|
|
|
*
|
|
|
* wireframe: <boolean>,
|
|
|
- * wireframelineWidth: <float>
|
|
|
+ * wireframeLinewidth: <float>
|
|
|
* }
|
|
|
*/
|
|
|
|
|
@@ -18920,7 +18895,7 @@ function MeshDepthMaterial( parameters ) {
|
|
|
this.displacementBias = 0;
|
|
|
|
|
|
this.wireframe = false;
|
|
|
- this.wireframelineWidth = 1;
|
|
|
+ this.wireframeLinewidth = 1;
|
|
|
|
|
|
this.fog = false;
|
|
|
|
|
@@ -18951,7 +18926,7 @@ MeshDepthMaterial.prototype.copy = function ( source ) {
|
|
|
this.displacementBias = source.displacementBias;
|
|
|
|
|
|
this.wireframe = source.wireframe;
|
|
|
- this.wireframelineWidth = source.wireframelineWidth;
|
|
|
+ this.wireframeLinewidth = source.wireframeLinewidth;
|
|
|
|
|
|
return this;
|
|
|
|
|
@@ -19396,8 +19371,8 @@ function WebGLShadowMap( _renderer, _objects, maxTextureSize ) {
|
|
|
result.clippingPlanes = material.clippingPlanes;
|
|
|
result.clipIntersection = material.clipIntersection;
|
|
|
|
|
|
- result.wireframelineWidth = material.wireframelineWidth;
|
|
|
- result.lineWidth = material.lineWidth;
|
|
|
+ result.wireframeLinewidth = material.wireframeLinewidth;
|
|
|
+ result.linewidth = material.linewidth;
|
|
|
|
|
|
if ( light.isPointLight === true && result.isMeshDistanceMaterial === true ) {
|
|
|
|
|
@@ -19799,7 +19774,7 @@ function WebGLState( gl, extensions, capabilities ) {
|
|
|
let currentFlipSided = null;
|
|
|
let currentCullFace = null;
|
|
|
|
|
|
- let currentlineWidth = null;
|
|
|
+ let currentLineWidth = null;
|
|
|
|
|
|
let currentPolygonOffsetFactor = null;
|
|
|
let currentPolygonOffsetUnits = null;
|
|
@@ -20168,13 +20143,13 @@ function WebGLState( gl, extensions, capabilities ) {
|
|
|
|
|
|
}
|
|
|
|
|
|
- function setlineWidth( width ) {
|
|
|
+ function setLineWidth( width ) {
|
|
|
|
|
|
- if ( width !== currentlineWidth ) {
|
|
|
+ if ( width !== currentLineWidth ) {
|
|
|
|
|
|
if ( lineWidthAvailable ) gl.lineWidth( width );
|
|
|
|
|
|
- currentlineWidth = width;
|
|
|
+ currentLineWidth = width;
|
|
|
|
|
|
}
|
|
|
|
|
@@ -20365,7 +20340,7 @@ function WebGLState( gl, extensions, capabilities ) {
|
|
|
currentFlipSided = null;
|
|
|
currentCullFace = null;
|
|
|
|
|
|
- currentlineWidth = null;
|
|
|
+ currentLineWidth = null;
|
|
|
|
|
|
currentPolygonOffsetFactor = null;
|
|
|
currentPolygonOffsetUnits = null;
|
|
@@ -20395,7 +20370,7 @@ function WebGLState( gl, extensions, capabilities ) {
|
|
|
setFlipSided: setFlipSided,
|
|
|
setCullFace: setCullFace,
|
|
|
|
|
|
- setlineWidth: setlineWidth,
|
|
|
+ setLineWidth: setLineWidth,
|
|
|
setPolygonOffset: setPolygonOffset,
|
|
|
|
|
|
setScissorTest: setScissorTest,
|
|
@@ -23616,8 +23591,6 @@ function WebGLRenderer( parameters ) {
|
|
|
_this.state = state;
|
|
|
_this.info = info;
|
|
|
|
|
|
- _this._textures = textures;//add
|
|
|
-
|
|
|
}
|
|
|
|
|
|
initGLContext();
|
|
@@ -23692,8 +23665,8 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
};
|
|
|
|
|
|
- this.setSize = function ( width, height, updateStyle, devicePixelRatio ) {//改
|
|
|
- if (devicePixelRatio != void 0) _pixelRatio = devicePixelRatio; //add
|
|
|
+ this.setSize = function ( width, height, updateStyle ) {
|
|
|
+
|
|
|
if ( xr.isPresenting ) {
|
|
|
|
|
|
console.warn( 'THREE.WebGLRenderer: Can\'t change size while VR device is presenting.' );
|
|
@@ -23703,23 +23676,19 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
_width = width;
|
|
|
_height = height;
|
|
|
-
|
|
|
- //if(!window.unableSetSize){
|
|
|
- _canvas.width = Math.floor( width * _pixelRatio );
|
|
|
- _canvas.height = Math.floor( height * _pixelRatio );
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- if ( updateStyle !== false ) {
|
|
|
-
|
|
|
- _canvas.style.width = width + 'px';
|
|
|
- _canvas.style.height = height + 'px';
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- this.setViewport( 0, 0, width, height );
|
|
|
- //}
|
|
|
+
|
|
|
+ _canvas.width = Math.floor( width * _pixelRatio );
|
|
|
+ _canvas.height = Math.floor( height * _pixelRatio );
|
|
|
+
|
|
|
+ if ( updateStyle !== false ) {
|
|
|
+
|
|
|
+ _canvas.style.width = width + 'px';
|
|
|
+ _canvas.style.height = height + 'px';
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ this.setViewport( 0, 0, width, height );
|
|
|
+
|
|
|
};
|
|
|
|
|
|
this.getDrawingBufferSize = function ( target ) {
|
|
@@ -24125,7 +24094,7 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
if ( material.wireframe === true ) {
|
|
|
|
|
|
- state.setlineWidth( material.wireframelineWidth * getTargetPixelRatio() );
|
|
|
+ state.setLineWidth( material.wireframeLinewidth * getTargetPixelRatio() );
|
|
|
renderer.setMode( 1 );
|
|
|
|
|
|
} else {
|
|
@@ -24136,11 +24105,11 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
} else if ( object.isLine ) {
|
|
|
|
|
|
- let lineWidth = material.lineWidth;
|
|
|
+ let lineWidth = material.linewidth;
|
|
|
|
|
|
if ( lineWidth === undefined ) lineWidth = 1; // Not using Line*Material
|
|
|
|
|
|
- state.setlineWidth( lineWidth * getTargetPixelRatio() );
|
|
|
+ state.setLineWidth( lineWidth * getTargetPixelRatio() );
|
|
|
|
|
|
if ( object.isLineSegments ) {
|
|
|
|
|
@@ -26807,7 +26776,7 @@ InstancedMesh.prototype = Object.assign( Object.create( Mesh.prototype ), {
|
|
|
* color: <hex>,
|
|
|
* opacity: <float>,
|
|
|
*
|
|
|
- * lineWidth: <float>,
|
|
|
+ * linewidth: <float>,
|
|
|
* linecap: "round",
|
|
|
* linejoin: "round"
|
|
|
* }
|
|
@@ -26821,7 +26790,7 @@ function LineBasicMaterial( parameters ) {
|
|
|
|
|
|
this.color = new Color( 0xffffff );
|
|
|
|
|
|
- this.lineWidth = 1;
|
|
|
+ this.linewidth = 1;
|
|
|
this.linecap = 'round';
|
|
|
this.linejoin = 'round';
|
|
|
|
|
@@ -26842,7 +26811,7 @@ LineBasicMaterial.prototype.copy = function ( source ) {
|
|
|
|
|
|
this.color.copy( source.color );
|
|
|
|
|
|
- this.lineWidth = source.lineWidth;
|
|
|
+ this.linewidth = source.linewidth;
|
|
|
this.linecap = source.linecap;
|
|
|
this.linejoin = source.linejoin;
|
|
|
|
|
@@ -33508,7 +33477,7 @@ RawShaderMaterial.prototype.isRawShaderMaterial = true;
|
|
|
* refractionRatio: <float>,
|
|
|
*
|
|
|
* wireframe: <boolean>,
|
|
|
- * wireframelineWidth: <float>,
|
|
|
+ * wireframeLinewidth: <float>,
|
|
|
*
|
|
|
* skinning: <bool>,
|
|
|
* morphTargets: <bool>,
|
|
@@ -33563,7 +33532,7 @@ function MeshStandardMaterial( parameters ) {
|
|
|
this.refractionRatio = 0.98;
|
|
|
|
|
|
this.wireframe = false;
|
|
|
- this.wireframelineWidth = 1;
|
|
|
+ this.wireframeLinewidth = 1;
|
|
|
this.wireframeLinecap = 'round';
|
|
|
this.wireframeLinejoin = 'round';
|
|
|
|
|
@@ -33627,7 +33596,7 @@ MeshStandardMaterial.prototype.copy = function ( source ) {
|
|
|
this.refractionRatio = source.refractionRatio;
|
|
|
|
|
|
this.wireframe = source.wireframe;
|
|
|
- this.wireframelineWidth = source.wireframelineWidth;
|
|
|
+ this.wireframeLinewidth = source.wireframeLinewidth;
|
|
|
this.wireframeLinecap = source.wireframeLinecap;
|
|
|
this.wireframeLinejoin = source.wireframeLinejoin;
|
|
|
|
|
@@ -33786,7 +33755,7 @@ MeshPhysicalMaterial.prototype.copy = function ( source ) {
|
|
|
* refractionRatio: <float>,
|
|
|
*
|
|
|
* wireframe: <boolean>,
|
|
|
- * wireframelineWidth: <float>,
|
|
|
+ * wireframeLinewidth: <float>,
|
|
|
*
|
|
|
* skinning: <bool>,
|
|
|
* morphTargets: <bool>,
|
|
@@ -33837,7 +33806,7 @@ function MeshPhongMaterial( parameters ) {
|
|
|
this.refractionRatio = 0.98;
|
|
|
|
|
|
this.wireframe = false;
|
|
|
- this.wireframelineWidth = 1;
|
|
|
+ this.wireframeLinewidth = 1;
|
|
|
this.wireframeLinecap = 'round';
|
|
|
this.wireframeLinejoin = 'round';
|
|
|
|
|
@@ -33895,7 +33864,7 @@ MeshPhongMaterial.prototype.copy = function ( source ) {
|
|
|
this.refractionRatio = source.refractionRatio;
|
|
|
|
|
|
this.wireframe = source.wireframe;
|
|
|
- this.wireframelineWidth = source.wireframelineWidth;
|
|
|
+ this.wireframeLinewidth = source.wireframeLinewidth;
|
|
|
this.wireframeLinecap = source.wireframeLinecap;
|
|
|
this.wireframeLinejoin = source.wireframeLinejoin;
|
|
|
|
|
@@ -33938,7 +33907,7 @@ MeshPhongMaterial.prototype.copy = function ( source ) {
|
|
|
* alphaMap: new THREE.Texture( <Image> ),
|
|
|
*
|
|
|
* wireframe: <boolean>,
|
|
|
- * wireframelineWidth: <float>,
|
|
|
+ * wireframeLinewidth: <float>,
|
|
|
*
|
|
|
* skinning: <bool>,
|
|
|
* morphTargets: <bool>,
|
|
@@ -33983,7 +33952,7 @@ function MeshToonMaterial( parameters ) {
|
|
|
this.alphaMap = null;
|
|
|
|
|
|
this.wireframe = false;
|
|
|
- this.wireframelineWidth = 1;
|
|
|
+ this.wireframeLinewidth = 1;
|
|
|
this.wireframeLinecap = 'round';
|
|
|
this.wireframeLinejoin = 'round';
|
|
|
|
|
@@ -34033,7 +34002,7 @@ MeshToonMaterial.prototype.copy = function ( source ) {
|
|
|
this.alphaMap = source.alphaMap;
|
|
|
|
|
|
this.wireframe = source.wireframe;
|
|
|
- this.wireframelineWidth = source.wireframelineWidth;
|
|
|
+ this.wireframeLinewidth = source.wireframeLinewidth;
|
|
|
this.wireframeLinecap = source.wireframeLinecap;
|
|
|
this.wireframeLinejoin = source.wireframeLinejoin;
|
|
|
|
|
@@ -34061,7 +34030,7 @@ MeshToonMaterial.prototype.copy = function ( source ) {
|
|
|
* displacementBias: <float>,
|
|
|
*
|
|
|
* wireframe: <boolean>,
|
|
|
- * wireframelineWidth: <float>
|
|
|
+ * wireframeLinewidth: <float>
|
|
|
*
|
|
|
* skinning: <bool>,
|
|
|
* morphTargets: <bool>,
|
|
@@ -34087,7 +34056,7 @@ function MeshNormalMaterial( parameters ) {
|
|
|
this.displacementBias = 0;
|
|
|
|
|
|
this.wireframe = false;
|
|
|
- this.wireframelineWidth = 1;
|
|
|
+ this.wireframeLinewidth = 1;
|
|
|
|
|
|
this.fog = false;
|
|
|
|
|
@@ -34120,7 +34089,7 @@ MeshNormalMaterial.prototype.copy = function ( source ) {
|
|
|
this.displacementBias = source.displacementBias;
|
|
|
|
|
|
this.wireframe = source.wireframe;
|
|
|
- this.wireframelineWidth = source.wireframelineWidth;
|
|
|
+ this.wireframeLinewidth = source.wireframeLinewidth;
|
|
|
|
|
|
this.skinning = source.skinning;
|
|
|
this.morphTargets = source.morphTargets;
|
|
@@ -34157,7 +34126,7 @@ MeshNormalMaterial.prototype.copy = function ( source ) {
|
|
|
* refractionRatio: <float>,
|
|
|
*
|
|
|
* wireframe: <boolean>,
|
|
|
- * wireframelineWidth: <float>,
|
|
|
+ * wireframeLinewidth: <float>,
|
|
|
*
|
|
|
* skinning: <bool>,
|
|
|
* morphTargets: <bool>,
|
|
@@ -34195,7 +34164,7 @@ function MeshLambertMaterial( parameters ) {
|
|
|
this.refractionRatio = 0.98;
|
|
|
|
|
|
this.wireframe = false;
|
|
|
- this.wireframelineWidth = 1;
|
|
|
+ this.wireframeLinewidth = 1;
|
|
|
this.wireframeLinecap = 'round';
|
|
|
this.wireframeLinejoin = 'round';
|
|
|
|
|
@@ -34240,7 +34209,7 @@ MeshLambertMaterial.prototype.copy = function ( source ) {
|
|
|
this.refractionRatio = source.refractionRatio;
|
|
|
|
|
|
this.wireframe = source.wireframe;
|
|
|
- this.wireframelineWidth = source.wireframelineWidth;
|
|
|
+ this.wireframeLinewidth = source.wireframeLinewidth;
|
|
|
this.wireframeLinecap = source.wireframeLinecap;
|
|
|
this.wireframeLinejoin = source.wireframeLinejoin;
|
|
|
|
|
@@ -34358,7 +34327,7 @@ MeshMatcapMaterial.prototype.copy = function ( source ) {
|
|
|
* color: <hex>,
|
|
|
* opacity: <float>,
|
|
|
*
|
|
|
- * lineWidth: <float>,
|
|
|
+ * linewidth: <float>,
|
|
|
*
|
|
|
* scale: <float>,
|
|
|
* dashSize: <float>,
|
|
@@ -36777,8 +36746,8 @@ FileLoader.prototype = Object.assign( Object.create( Loader.prototype ), {
|
|
|
for ( let i = 0, il = callbacks.length; i < il; i ++ ) {
|
|
|
|
|
|
const callback = callbacks[ i ];
|
|
|
- if ( callback.onLoad ) callback.onLoad( response, event.total); //xzw add event.total
|
|
|
-
|
|
|
+ if ( callback.onLoad ) callback.onLoad( response );
|
|
|
+
|
|
|
}
|
|
|
|
|
|
scope.manager.itemEnd( url );
|
|
@@ -40402,13 +40371,13 @@ MaterialLoader.prototype = Object.assign( Object.create( Loader.prototype ), {
|
|
|
if ( json.stencilZPass !== undefined ) material.stencilZPass = json.stencilZPass;
|
|
|
|
|
|
if ( json.wireframe !== undefined ) material.wireframe = json.wireframe;
|
|
|
- if ( json.wireframelineWidth !== undefined ) material.wireframelineWidth = json.wireframelineWidth;
|
|
|
+ if ( json.wireframeLinewidth !== undefined ) material.wireframeLinewidth = json.wireframeLinewidth;
|
|
|
if ( json.wireframeLinecap !== undefined ) material.wireframeLinecap = json.wireframeLinecap;
|
|
|
if ( json.wireframeLinejoin !== undefined ) material.wireframeLinejoin = json.wireframeLinejoin;
|
|
|
|
|
|
if ( json.rotation !== undefined ) material.rotation = json.rotation;
|
|
|
|
|
|
- if ( json.lineWidth !== 1 ) material.lineWidth = json.lineWidth;
|
|
|
+ if ( json.linewidth !== 1 ) material.linewidth = json.linewidth;
|
|
|
if ( json.dashSize !== undefined ) material.dashSize = json.dashSize;
|
|
|
if ( json.gapSize !== undefined ) material.gapSize = json.gapSize;
|
|
|
if ( json.scale !== undefined ) material.scale = json.scale;
|
|
@@ -42120,7 +42089,7 @@ ImageBitmapLoader.prototype = Object.assign( Object.create( Loader.prototype ),
|
|
|
return res.blob();
|
|
|
|
|
|
} ).then( function ( blob ) {
|
|
|
- //console.log('getBlob', url )
|
|
|
+
|
|
|
return createImageBitmap( blob, scope.options );
|
|
|
|
|
|
} ).then( function ( imageBitmap ) {
|
|
@@ -42131,9 +42100,9 @@ ImageBitmapLoader.prototype = Object.assign( Object.create( Loader.prototype ),
|
|
|
|
|
|
scope.manager.itemEnd( url );
|
|
|
|
|
|
- } ).catch( function ( e ) {
|
|
|
- //console.log('error', url, e)
|
|
|
- if ( onError ) onError( e, url );
|
|
|
+ } ).catch( function ( e ) {
|
|
|
+
|
|
|
+ if ( onError ) onError( e );
|
|
|
|
|
|
scope.manager.itemError( url );
|
|
|
scope.manager.itemEnd( url );
|
|
@@ -50487,7 +50456,7 @@ Object.defineProperties( BufferAttribute.prototype, {
|
|
|
Object.assign( BufferAttribute.prototype, {
|
|
|
setDynamic: function ( value ) {
|
|
|
|
|
|
- //console.warn( 'THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead.' );
|
|
|
+ console.warn( 'THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead.' );
|
|
|
this.setUsage( value === true ? DynamicDrawUsage : StaticDrawUsage );
|
|
|
return this;
|
|
|
|