@@ -931,7 +931,7 @@ export default {
}
// console.log("模型计算位置--", positionX, positionY)
- // console.log("模型计算位置", cubeInfo, centerX, centerY, spaceWidth, spaceHeight, modelWidth, modelHeight, spaceId, scaleX, scaleY, positionX, positionY, cubeInfo.modelName)
+ console.log("模型计算位置", cubeInfo, centerX, centerY, spaceWidth, spaceHeight, modelWidth, modelHeight, spaceId, scaleX, scaleY, positionX, positionY, cubeInfo.modelName)
let oldPosition = new THREE.Vector3();//当前几何体的位置参数
oldPosition.copy(cube.position);
let oldScale = new THREE.Vector3();//当前几何体的位置参数
@@ -933,9 +933,19 @@
let newWidth = curSpace.spaceWidth * sizeScale;
let newHeight = curSpace.spaceHeight * sizeScale;
+
+ if(isZoomIn){
+ newWidth = Math.min(newWidth, curSpace.spaceWidthMax)
+ newHeight = Math.min(newHeight, curSpace.spaceHeightMax)
+ }else{
+ newWidth = Math.max(newWidth, curSpace.spaceWidthMin)
+ newHeight = Math.max(newHeight, curSpace.spaceHeightMin)
+ }
let changeWidth = Math.abs(newWidth - curSpace.spaceWidth)
let changeHeight = Math.abs(newHeight - curSpace.spaceHeight)
+ console.log("变化的尺寸", newWidth, newHeight, data, sizeScale);
console.log("变化的尺寸", changeWidth, changeHeight, data, curSpace.spaceWidth, curSpace.spaceHeight);
if(curSpace.quadrant == 1){
@@ -1,3 +1,11 @@
+/*
+ * @Author: caodongdong caodongdoong@gmail.com
+ * @Date: 2023-10-26 13:18:07
+ * @LastEditors: caodongdong caodongdoong@gmail.com
+ * @LastEditTime: 2023-10-26 19:45:43
+ * @FilePath: \h5-webgl-program\src\static\globlShowModel.js
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ */
//需要精简加载的模型名称
var globlShowModel = [
'BP_T_2PeopleBasin01',