@xtctwins/tctwins-core 1.0.44 → 1.0.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13098,7 +13098,7 @@ this._ignoreNextSectionPlaneDirUpdate=false;this._createNodes();this._bindEvents
13098
13098
  */},{key:"sectionPlane",get:function get(){return this._sectionPlane;}/**
13099
13099
  * 设置剖切面位置
13100
13100
  * @param {any} value
13101
- */},{key:"pos",get:function get(){return this.posRate;},set:function set(posRate){if(posRate<0||posRate>100)return;var aabb=this._scene.aabb;var center=this._scene.center;var xRange=aabb[3]-aabb[0];//前后
13101
+ */},{key:"pos",get:function get(){return this._pos;},set:function set(posRate){if(posRate<0||posRate>100)return;var aabb=this._scene.aabb;var center=this._scene.center;var xRange=aabb[3]-aabb[0];//前后
13102
13102
  var yRange=aabb[4]-aabb[1];//上下
13103
13103
  var zRange=aabb[5]-aabb[2];//左右
13104
13104
  var newSectionPos=math.vec3();newSectionPos[0]=this.pos[0];newSectionPos[1]=this.pos[1];newSectionPos[2]=this.pos[2];var dir=this._sectionPlane.dir;var rateDis;if(dir[0]!=0){rateDis=posRate/100*xRange;newSectionPos[0]=center[0]-xRange/2+rateDis;}else if(dir[1]!=0){rateDis=posRate/100*yRange;newSectionPos[1]=center[1]-yRange/2+rateDis;}else if(dir[2]!=0){rateDis=posRate/100*zRange;newSectionPos[2]=center[2]-zRange/2+rateDis;}this._sectionPlane.pos=newSectionPos;}},{key:"posRate",get:function get(){var aabb=this._scene.aabb;var center=this._scene.center;var xRange=aabb[3]-aabb[0];// 前后
@@ -13407,7 +13407,7 @@ var sectionPlane=new SectionPlane(this.viewer.scene,{id:params.id,pos:params.pos
13407
13407
  */},{key:"setControlPos",value:function setControlPos(posRate){if(this._currentControl==null)return;this._currentControl.pos=posRate;}/**
13408
13408
  * 获取剖切面位置
13409
13409
  * @returns
13410
- */},{key:"getControlPos",value:function getControlPos(){if(this._currentControl==null)return-1;return this._currentControl.pos;}/**
13410
+ */},{key:"getControlPos",value:function getControlPos(){if(this._currentControl==null)return-1;return this._currentControl.posRate;}/**
13411
13411
  * Inverts the direction of {@link SectionPlane#dir} on every existing SectionPlane.
13412
13412
  *
13413
13413
  * Inverts all SectionPlanes, including those that were not created with SectionPlanesPlugin.