1
|
Before Width: | Height: | Size: 475 KiB |
|
Before Width: | Height: | Size: 642 KiB |
|
Before Width: | Height: | Size: 481 KiB |
|
Before Width: | Height: | Size: 550 KiB |
|
Before Width: | Height: | Size: 363 KiB |
|
Before Width: | Height: | Size: 676 KiB |
|
Before Width: | Height: | Size: 718 KiB |
|
Before Width: | Height: | Size: 730 KiB |
|
Before Width: | Height: | Size: 729 KiB |
|
Before Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 132 KiB |
|
Before Width: | Height: | Size: 125 KiB |
|
Before Width: | Height: | Size: 153 KiB |
|
Before Width: | Height: | Size: 141 KiB |
|
Before Width: | Height: | Size: 180 KiB |
|
Before Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 84 KiB |
|
Before Width: | Height: | Size: 131 KiB |
|
Before Width: | Height: | Size: 244 KiB |
|
Before Width: | Height: | Size: 152 KiB |
|
Before Width: | Height: | Size: 127 KiB |
|
Before Width: | Height: | Size: 154 KiB |
|
Before Width: | Height: | Size: 155 KiB |
|
Before Width: | Height: | Size: 944 KiB |
25
index.html
@ -509,14 +509,14 @@
|
||||
if (result.code === 200) {
|
||||
console.log(result.data);
|
||||
sku = currentText;
|
||||
await initPlacementZoneConfig();
|
||||
await initPlacementZoneConfig();
|
||||
const { enable_placement_zone, wall_divisions } = result.data;
|
||||
// const {position_x, position_y, position_z} = data;
|
||||
if (enable_placement_zone && wall_divisions != undefined) {
|
||||
|
||||
console.log(wall_divisions);
|
||||
|
||||
// await placementWall(wall_divisions);
|
||||
// await placementWall(wall_divisions);
|
||||
}
|
||||
}
|
||||
|
||||
@ -799,13 +799,13 @@
|
||||
});
|
||||
|
||||
// 初始化放置区域配置数据(只需设置一次)
|
||||
const initPlacementZoneConfig = (divisions=1) => {
|
||||
const initPlacementZoneConfig = (divisions=3) => {
|
||||
|
||||
// 只清除旧的放置区域网格,不清除模型
|
||||
kernel.dropZone.clearZones();
|
||||
// 调整 baseY 来控制整体高度(正数向上,负数向下)
|
||||
const baseY = 0.09; // 修改这个值来调整整体高度
|
||||
const height = 2.27;
|
||||
const height = 2.2;
|
||||
// 调整 offset 来控制每个面向外或向内的偏移
|
||||
// 正数 = 向外移动,负数 = 向内移动
|
||||
const wallOffset = 0; // 修改这个值来调整墙面偏移
|
||||
@ -820,32 +820,33 @@
|
||||
walls: [
|
||||
{
|
||||
name: 'front',
|
||||
startPoint: [-1.85, baseY, -1.45],
|
||||
endPoint: [1.85, baseY, -1.45],
|
||||
startPoint: [-1.73, baseY, -1.45],
|
||||
endPoint: [1.73, baseY, -1.45],
|
||||
height: height,
|
||||
divisions: divisions,
|
||||
offset: wallOffset // 向外或向内偏移
|
||||
},
|
||||
|
||||
{
|
||||
name: 'back',
|
||||
startPoint: [1.85, baseY, 1.45],
|
||||
endPoint: [-1.85, baseY, 1.45],
|
||||
startPoint: [1.37, baseY, 1.45],
|
||||
endPoint: [-1.37, baseY, 1.45],
|
||||
height: height,
|
||||
divisions: divisions,
|
||||
offset: wallOffset
|
||||
},
|
||||
{
|
||||
name: 'left',
|
||||
startPoint: [-2.9, baseY, 1.45],
|
||||
endPoint: [-2.9, baseY, -1.45],
|
||||
startPoint: [-1.75, baseY, 1.45],
|
||||
endPoint: [-1.75, baseY, -1.45],
|
||||
height: height,
|
||||
divisions: divisions,
|
||||
offset: wallOffset
|
||||
},
|
||||
{
|
||||
name: 'right',
|
||||
startPoint: [2.9, baseY, -1.45],
|
||||
endPoint: [2.9, baseY, 1.45],
|
||||
startPoint: [1.75, baseY, -1.45],
|
||||
endPoint: [1.75, baseY, 1.45],
|
||||
height: height,
|
||||
divisions: divisions,
|
||||
offset: wallOffset
|
||||
|
||||
|
Before Width: | Height: | Size: 702 KiB |
|
Before Width: | Height: | Size: 169 KiB |
|
Before Width: | Height: | Size: 178 KiB |