|
@@ -790,7 +790,7 @@
|
|
|
//mergeModel:
|
|
|
boundAddObjs:false,
|
|
|
intersectOnObjs:false,
|
|
|
-
|
|
|
+ intersectWhenHover:true,
|
|
|
};
|
|
|
|
|
|
|
|
@@ -42921,7 +42921,7 @@
|
|
|
return res.blob();
|
|
|
|
|
|
} ).then( function ( blob ) {
|
|
|
-
|
|
|
+ //console.log('getBlob', url )
|
|
|
return createImageBitmap( blob, scope.options );
|
|
|
|
|
|
} ).then( function ( imageBitmap ) {
|
|
@@ -42933,7 +42933,7 @@
|
|
|
scope.manager.itemEnd( url );
|
|
|
|
|
|
} ).catch( function ( e ) {
|
|
|
-
|
|
|
+ //console.log('error', url, e)
|
|
|
if ( onError ) onError( e );
|
|
|
|
|
|
scope.manager.itemError( url );
|
|
@@ -85101,7 +85101,7 @@ void main() {
|
|
|
this.dragViewport = this.hoverViewport = viewport;
|
|
|
|
|
|
|
|
|
- if(isTouch){
|
|
|
+ if(isTouch || !Potree.settings.intersectWhenHover){
|
|
|
this.hoveredElements = this.getHoveredElements();
|
|
|
this.intersect = this.getIntersect(viewport);
|
|
|
//this.intersect = this.getWholeIntersect()
|
|
@@ -85608,7 +85608,7 @@ void main() {
|
|
|
let intersect;
|
|
|
|
|
|
|
|
|
- if(e.onlyGetIntersect || !this.drag || this.drag.object || viewport.alignment ){ //没有拖拽物体,但按下鼠标了的话,不intersect
|
|
|
+ if(e.onlyGetIntersect || Potree.settings.intersectWhenHover && (!this.drag || this.drag.object || viewport.alignment) ){ //没有拖拽物体,但按下鼠标了的话,不intersect
|
|
|
|
|
|
let dontIntersect = this.drag && viewport.alignment && Potree.settings.editType == 'pano' || isFlying;/* viewer.images360.flying */ // flying 时可能卡顿
|
|
|
//console.log('dontIntersectPointcloud',dontIntersectPointcloud)
|
|
@@ -108254,7 +108254,7 @@ ENDSEC
|
|
|
};
|
|
|
|
|
|
GLTFParser.prototype.loadTextureImage = function ( textureIndex, source, loader ) {
|
|
|
- console.log('loadTextureImage', textureIndex, source);
|
|
|
+
|
|
|
var parser = this;
|
|
|
var json = this.json;
|
|
|
var options = this.options;
|
|
@@ -108306,21 +108306,25 @@ ENDSEC
|
|
|
if ( loader.isImageBitmapLoader === true ) {
|
|
|
|
|
|
onLoad = function ( imageBitmap ) {
|
|
|
-
|
|
|
+ //console.log('resolveURL onLoad',textureIndex )
|
|
|
resolve( new CanvasTexture( imageBitmap ) );
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
- loader.load( resolveURL( sourceURI, options.path ), onLoad, undefined, reject );
|
|
|
+ loader.load( resolveURL( sourceURI, options.path ), onLoad, undefined,/* ()=>{
|
|
|
+ console.log('reject',textureIndex, arguments)
|
|
|
+ reject.apply(this,arguments)
|
|
|
+
|
|
|
+ } */ reject );
|
|
|
|
|
|
} );
|
|
|
|
|
|
} ).then( function ( texture ) {
|
|
|
|
|
|
// Clean up resources and configure Texture.
|
|
|
- console.log('texture',texture.image);
|
|
|
+ //console.log('texture', textureIndex, texture.image)
|
|
|
if ( isObjectURL === true ) {
|
|
|
|
|
|
URL.revokeObjectURL( sourceURI );
|
|
@@ -115302,7 +115306,7 @@ ENDSEC
|
|
|
Object.defineProperty( scope, propName, {
|
|
|
|
|
|
get: function () {
|
|
|
-
|
|
|
+
|
|
|
return propValue !== undefined ? propValue : defaultValue;
|
|
|
|
|
|
},
|
|
@@ -115329,10 +115333,10 @@ ENDSEC
|
|
|
_gizmo[ propName ] = defaultValue;
|
|
|
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// updateMatrixWorld updates key transformation variables
|
|
|
this.updateMatrixWorld = function () {
|
|
|
-
|
|
|
+
|
|
|
if ( this.object !== undefined ) {
|
|
|
|
|
|
this.object.updateMatrixWorld();
|
|
@@ -115345,7 +115349,7 @@ ENDSEC
|
|
|
parentQuaternionInv.copy( parentQuaternion ).invert();
|
|
|
worldQuaternionInv.copy( worldQuaternion ).invert();
|
|
|
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
this.camera.updateMatrixWorld();
|
|
|
this.camera.matrixWorld.decompose( cameraPosition, cameraQuaternion, cameraScale );
|
|
@@ -117066,7 +117070,8 @@ ENDSEC
|
|
|
|
|
|
viewer.ssaaRenderPass.enabled = false;
|
|
|
viewer.outlinePass.enabled = true;
|
|
|
-
|
|
|
+ Potree.settings.intersectWhenHover = false;
|
|
|
+ //viewer.updateVisible(viewer.reticule, 'force', false)
|
|
|
},
|
|
|
|
|
|
|
|
@@ -117615,7 +117620,7 @@ ENDSEC
|
|
|
this.hide(0);
|
|
|
|
|
|
//viewer.inputHandler.addInputListener(this);
|
|
|
- viewer.addEventListener('global_mousemove',this.move.bind(this));
|
|
|
+ Potree.settings.intersectWhenHover && viewer.addEventListener('global_mousemove',this.move.bind(this));
|
|
|
//viewer.addEventListener('global_click',this.move.bind(this))
|
|
|
viewer.addEventListener('global_mousedown',this.move.bind(this));//主要针对触屏
|
|
|
|