|
@@ -208,7 +208,7 @@ function EventDispatcher() {}
|
|
|
|
|
|
Object.assign( EventDispatcher.prototype, {
|
|
|
|
|
|
- addEventListener: function ( type, listener ) {
|
|
|
+ addEventListener: function ( type, listener, importance=0 ) {//add importance
|
|
|
|
|
|
if ( this._listeners === undefined ) this._listeners = {};
|
|
|
|
|
@@ -220,10 +220,10 @@ Object.assign( EventDispatcher.prototype, {
|
|
|
|
|
|
}
|
|
|
|
|
|
- if ( listeners[ type ].indexOf( listener ) === - 1 ) {
|
|
|
-
|
|
|
- listeners[ type ].push( listener );
|
|
|
-
|
|
|
+ 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
|
|
|
}
|
|
|
|
|
|
},
|
|
@@ -234,7 +234,7 @@ Object.assign( EventDispatcher.prototype, {
|
|
|
|
|
|
const listeners = this._listeners;
|
|
|
|
|
|
- return listeners[ type ] !== undefined && listeners[ type ].indexOf( listener ) !== - 1;
|
|
|
+ return listeners[ type ] !== undefined && listeners[ type ].some(e=>e.listener == listener )
|
|
|
|
|
|
},
|
|
|
|
|
@@ -247,20 +247,36 @@ 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);
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
-
|
|
|
- dispatchEvent: function ( event ) {
|
|
|
-
|
|
|
+ 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}
|
|
|
+ }
|
|
|
if ( this._listeners === undefined ) return;
|
|
|
|
|
|
const listeners = this._listeners;
|
|
@@ -271,18 +287,18 @@ Object.assign( EventDispatcher.prototype, {
|
|
|
event.target = this;
|
|
|
|
|
|
// Make a copy, in case listeners are removed while iterating.
|
|
|
- const array = listenerArray.slice( 0 );
|
|
|
-
|
|
|
- for ( let i = 0, l = array.length; i < l; i ++ ) {
|
|
|
-
|
|
|
- array[ i ].call( this, event );
|
|
|
-
|
|
|
+
|
|
|
+ for(let {listener} of listenerArray.slice(0)){
|
|
|
+ let result = listener.call(this, event); //add stopContinue
|
|
|
+ if(result && result.stopContinue){
|
|
|
+ break
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
} );
|
|
|
|
|
|
const _lut = [];
|
|
@@ -6829,8 +6845,11 @@ Object3D.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
|
|
|
|
|
|
traverse: function ( callback ) {
|
|
|
|
|
|
- callback( this );
|
|
|
-
|
|
|
+ let result = callback( this );
|
|
|
+ if(result && result.stopContinue){//xzw add
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
const children = this.children;
|
|
|
|
|
|
for ( let i = 0, l = children.length; i < l; i ++ ) {
|
|
@@ -8524,7 +8543,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;
|
|
|
|
|
|
}
|
|
@@ -8696,7 +8715,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;
|
|
@@ -8707,7 +8726,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;
|
|
|
|
|
@@ -8881,7 +8900,7 @@ Object.defineProperty( Material.prototype, 'needsUpdate', {
|
|
|
* depthWrite: <bool>,
|
|
|
*
|
|
|
* wireframe: <boolean>,
|
|
|
- * wireframeLinewidth: <float>,
|
|
|
+ * wireframelineWidth: <float>,
|
|
|
*
|
|
|
* skinning: <bool>,
|
|
|
* morphTargets: <bool>
|
|
@@ -8914,7 +8933,7 @@ function MeshBasicMaterial( parameters ) {
|
|
|
this.refractionRatio = 0.98;
|
|
|
|
|
|
this.wireframe = false;
|
|
|
- this.wireframeLinewidth = 1;
|
|
|
+ this.wireframelineWidth = 1;
|
|
|
this.wireframeLinecap = 'round';
|
|
|
this.wireframeLinejoin = 'round';
|
|
|
|
|
@@ -8954,7 +8973,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;
|
|
|
|
|
@@ -11700,7 +11719,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>,
|
|
|
*
|
|
@@ -11722,10 +11741,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
|
|
@@ -11786,7 +11805,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;
|
|
@@ -17448,7 +17467,13 @@ 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 );
|
|
@@ -18871,7 +18896,7 @@ function WebGLRenderStates( extensions, capabilities ) {
|
|
|
* displacementBias: <float>,
|
|
|
*
|
|
|
* wireframe: <boolean>,
|
|
|
- * wireframeLinewidth: <float>
|
|
|
+ * wireframelineWidth: <float>
|
|
|
* }
|
|
|
*/
|
|
|
|
|
@@ -18895,7 +18920,7 @@ function MeshDepthMaterial( parameters ) {
|
|
|
this.displacementBias = 0;
|
|
|
|
|
|
this.wireframe = false;
|
|
|
- this.wireframeLinewidth = 1;
|
|
|
+ this.wireframelineWidth = 1;
|
|
|
|
|
|
this.fog = false;
|
|
|
|
|
@@ -18926,7 +18951,7 @@ MeshDepthMaterial.prototype.copy = function ( source ) {
|
|
|
this.displacementBias = source.displacementBias;
|
|
|
|
|
|
this.wireframe = source.wireframe;
|
|
|
- this.wireframeLinewidth = source.wireframeLinewidth;
|
|
|
+ this.wireframelineWidth = source.wireframelineWidth;
|
|
|
|
|
|
return this;
|
|
|
|
|
@@ -19371,8 +19396,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 ) {
|
|
|
|
|
@@ -19774,7 +19799,7 @@ function WebGLState( gl, extensions, capabilities ) {
|
|
|
let currentFlipSided = null;
|
|
|
let currentCullFace = null;
|
|
|
|
|
|
- let currentLineWidth = null;
|
|
|
+ let currentlineWidth = null;
|
|
|
|
|
|
let currentPolygonOffsetFactor = null;
|
|
|
let currentPolygonOffsetUnits = null;
|
|
@@ -20143,13 +20168,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;
|
|
|
|
|
|
}
|
|
|
|
|
@@ -20340,7 +20365,7 @@ function WebGLState( gl, extensions, capabilities ) {
|
|
|
currentFlipSided = null;
|
|
|
currentCullFace = null;
|
|
|
|
|
|
- currentLineWidth = null;
|
|
|
+ currentlineWidth = null;
|
|
|
|
|
|
currentPolygonOffsetFactor = null;
|
|
|
currentPolygonOffsetUnits = null;
|
|
@@ -20370,7 +20395,7 @@ function WebGLState( gl, extensions, capabilities ) {
|
|
|
setFlipSided: setFlipSided,
|
|
|
setCullFace: setCullFace,
|
|
|
|
|
|
- setLineWidth: setLineWidth,
|
|
|
+ setlineWidth: setlineWidth,
|
|
|
setPolygonOffset: setPolygonOffset,
|
|
|
|
|
|
setScissorTest: setScissorTest,
|
|
@@ -23591,6 +23616,8 @@ function WebGLRenderer( parameters ) {
|
|
|
_this.state = state;
|
|
|
_this.info = info;
|
|
|
|
|
|
+ _this._textures = textures;//add
|
|
|
+
|
|
|
}
|
|
|
|
|
|
initGLContext();
|
|
@@ -23665,8 +23692,8 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
};
|
|
|
|
|
|
- this.setSize = function ( width, height, updateStyle ) {
|
|
|
-
|
|
|
+ this.setSize = function ( width, height, updateStyle, devicePixelRatio ) {//改
|
|
|
+ if (devicePixelRatio != void 0) _pixelRatio = devicePixelRatio; //add
|
|
|
if ( xr.isPresenting ) {
|
|
|
|
|
|
console.warn( 'THREE.WebGLRenderer: Can\'t change size while VR device is presenting.' );
|
|
@@ -23676,19 +23703,23 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
_width = width;
|
|
|
_height = 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 );
|
|
|
-
|
|
|
+
|
|
|
+ //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 );
|
|
|
+ //}
|
|
|
};
|
|
|
|
|
|
this.getDrawingBufferSize = function ( target ) {
|
|
@@ -24094,7 +24125,7 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
if ( material.wireframe === true ) {
|
|
|
|
|
|
- state.setLineWidth( material.wireframeLinewidth * getTargetPixelRatio() );
|
|
|
+ state.setlineWidth( material.wireframelineWidth * getTargetPixelRatio() );
|
|
|
renderer.setMode( 1 );
|
|
|
|
|
|
} else {
|
|
@@ -24105,11 +24136,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 ) {
|
|
|
|
|
@@ -26776,7 +26807,7 @@ InstancedMesh.prototype = Object.assign( Object.create( Mesh.prototype ), {
|
|
|
* color: <hex>,
|
|
|
* opacity: <float>,
|
|
|
*
|
|
|
- * linewidth: <float>,
|
|
|
+ * lineWidth: <float>,
|
|
|
* linecap: "round",
|
|
|
* linejoin: "round"
|
|
|
* }
|
|
@@ -26790,7 +26821,7 @@ function LineBasicMaterial( parameters ) {
|
|
|
|
|
|
this.color = new Color( 0xffffff );
|
|
|
|
|
|
- this.linewidth = 1;
|
|
|
+ this.lineWidth = 1;
|
|
|
this.linecap = 'round';
|
|
|
this.linejoin = 'round';
|
|
|
|
|
@@ -26811,7 +26842,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;
|
|
|
|
|
@@ -33477,7 +33508,7 @@ RawShaderMaterial.prototype.isRawShaderMaterial = true;
|
|
|
* refractionRatio: <float>,
|
|
|
*
|
|
|
* wireframe: <boolean>,
|
|
|
- * wireframeLinewidth: <float>,
|
|
|
+ * wireframelineWidth: <float>,
|
|
|
*
|
|
|
* skinning: <bool>,
|
|
|
* morphTargets: <bool>,
|
|
@@ -33532,7 +33563,7 @@ function MeshStandardMaterial( parameters ) {
|
|
|
this.refractionRatio = 0.98;
|
|
|
|
|
|
this.wireframe = false;
|
|
|
- this.wireframeLinewidth = 1;
|
|
|
+ this.wireframelineWidth = 1;
|
|
|
this.wireframeLinecap = 'round';
|
|
|
this.wireframeLinejoin = 'round';
|
|
|
|
|
@@ -33596,7 +33627,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;
|
|
|
|
|
@@ -33755,7 +33786,7 @@ MeshPhysicalMaterial.prototype.copy = function ( source ) {
|
|
|
* refractionRatio: <float>,
|
|
|
*
|
|
|
* wireframe: <boolean>,
|
|
|
- * wireframeLinewidth: <float>,
|
|
|
+ * wireframelineWidth: <float>,
|
|
|
*
|
|
|
* skinning: <bool>,
|
|
|
* morphTargets: <bool>,
|
|
@@ -33806,7 +33837,7 @@ function MeshPhongMaterial( parameters ) {
|
|
|
this.refractionRatio = 0.98;
|
|
|
|
|
|
this.wireframe = false;
|
|
|
- this.wireframeLinewidth = 1;
|
|
|
+ this.wireframelineWidth = 1;
|
|
|
this.wireframeLinecap = 'round';
|
|
|
this.wireframeLinejoin = 'round';
|
|
|
|
|
@@ -33864,7 +33895,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;
|
|
|
|
|
@@ -33907,7 +33938,7 @@ MeshPhongMaterial.prototype.copy = function ( source ) {
|
|
|
* alphaMap: new THREE.Texture( <Image> ),
|
|
|
*
|
|
|
* wireframe: <boolean>,
|
|
|
- * wireframeLinewidth: <float>,
|
|
|
+ * wireframelineWidth: <float>,
|
|
|
*
|
|
|
* skinning: <bool>,
|
|
|
* morphTargets: <bool>,
|
|
@@ -33952,7 +33983,7 @@ function MeshToonMaterial( parameters ) {
|
|
|
this.alphaMap = null;
|
|
|
|
|
|
this.wireframe = false;
|
|
|
- this.wireframeLinewidth = 1;
|
|
|
+ this.wireframelineWidth = 1;
|
|
|
this.wireframeLinecap = 'round';
|
|
|
this.wireframeLinejoin = 'round';
|
|
|
|
|
@@ -34002,7 +34033,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;
|
|
|
|
|
@@ -34030,7 +34061,7 @@ MeshToonMaterial.prototype.copy = function ( source ) {
|
|
|
* displacementBias: <float>,
|
|
|
*
|
|
|
* wireframe: <boolean>,
|
|
|
- * wireframeLinewidth: <float>
|
|
|
+ * wireframelineWidth: <float>
|
|
|
*
|
|
|
* skinning: <bool>,
|
|
|
* morphTargets: <bool>,
|
|
@@ -34056,7 +34087,7 @@ function MeshNormalMaterial( parameters ) {
|
|
|
this.displacementBias = 0;
|
|
|
|
|
|
this.wireframe = false;
|
|
|
- this.wireframeLinewidth = 1;
|
|
|
+ this.wireframelineWidth = 1;
|
|
|
|
|
|
this.fog = false;
|
|
|
|
|
@@ -34089,7 +34120,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;
|
|
@@ -34126,7 +34157,7 @@ MeshNormalMaterial.prototype.copy = function ( source ) {
|
|
|
* refractionRatio: <float>,
|
|
|
*
|
|
|
* wireframe: <boolean>,
|
|
|
- * wireframeLinewidth: <float>,
|
|
|
+ * wireframelineWidth: <float>,
|
|
|
*
|
|
|
* skinning: <bool>,
|
|
|
* morphTargets: <bool>,
|
|
@@ -34164,7 +34195,7 @@ function MeshLambertMaterial( parameters ) {
|
|
|
this.refractionRatio = 0.98;
|
|
|
|
|
|
this.wireframe = false;
|
|
|
- this.wireframeLinewidth = 1;
|
|
|
+ this.wireframelineWidth = 1;
|
|
|
this.wireframeLinecap = 'round';
|
|
|
this.wireframeLinejoin = 'round';
|
|
|
|
|
@@ -34209,7 +34240,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;
|
|
|
|
|
@@ -34327,7 +34358,7 @@ MeshMatcapMaterial.prototype.copy = function ( source ) {
|
|
|
* color: <hex>,
|
|
|
* opacity: <float>,
|
|
|
*
|
|
|
- * linewidth: <float>,
|
|
|
+ * lineWidth: <float>,
|
|
|
*
|
|
|
* scale: <float>,
|
|
|
* dashSize: <float>,
|
|
@@ -36746,8 +36777,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 );
|
|
|
-
|
|
|
+ if ( callback.onLoad ) callback.onLoad( response, event.total); //xzw add event.total
|
|
|
+
|
|
|
}
|
|
|
|
|
|
scope.manager.itemEnd( url );
|
|
@@ -40371,13 +40402,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;
|
|
@@ -42089,7 +42120,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 ) {
|
|
@@ -42100,9 +42131,9 @@ ImageBitmapLoader.prototype = Object.assign( Object.create( Loader.prototype ),
|
|
|
|
|
|
scope.manager.itemEnd( url );
|
|
|
|
|
|
- } ).catch( function ( e ) {
|
|
|
-
|
|
|
- if ( onError ) onError( e );
|
|
|
+ } ).catch( function ( e ) {
|
|
|
+ //console.log('error', url, e)
|
|
|
+ if ( onError ) onError( e, url );
|
|
|
|
|
|
scope.manager.itemError( url );
|
|
|
scope.manager.itemEnd( url );
|
|
@@ -50456,7 +50487,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;
|
|
|
|