@base2datadesign/viewer-kit 0.2.21 → 0.2.22
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.
|
@@ -172,11 +172,11 @@ export class DebugSystem {
|
|
|
172
172
|
: (extras.gridAutoScale ?? extras.groundAutoScale ?? 2.5);
|
|
173
173
|
const groundSizeDefault = isHdr ? HDR_GROUND_SIZE : DEFAULT_GRID_SIZE;
|
|
174
174
|
const gridSizeDefault = isHdr ? HDR_GRID_SIZE : DEFAULT_GRID_SIZE;
|
|
175
|
-
const derivedGroundSize = modelSpan ?
|
|
175
|
+
const derivedGroundSize = modelSpan ? modelSpan * groundScale : groundSizeDefault;
|
|
176
176
|
const derivedGridSize = groundEnabled
|
|
177
177
|
? (extras.groundSize ?? derivedGroundSize)
|
|
178
178
|
: modelSpan
|
|
179
|
-
?
|
|
179
|
+
? modelSpan * gridScale
|
|
180
180
|
: gridSizeDefault;
|
|
181
181
|
const groundOffset = extras.groundOffset ?? DEFAULT_GROUND_OFFSET;
|
|
182
182
|
const gridHeightOffset = extras.gridHeightOffset ?? DEFAULT_GRID_HEIGHT_OFFSET;
|
|
@@ -196,10 +196,10 @@ export class DebugSystem {
|
|
|
196
196
|
this.add(ground);
|
|
197
197
|
}
|
|
198
198
|
let lastGridPositionY = 0;
|
|
199
|
+
const gridSize = extras.gridSize ?? derivedGridSize;
|
|
199
200
|
if (gridEnabled) {
|
|
200
201
|
const gridPrimary = new THREE.Color(extras.gridColor ?? adjustGridColor(groundColor));
|
|
201
202
|
const gridSecondary = new THREE.Color(extras.gridColorSecondary ?? gridPrimary.getHex());
|
|
202
|
-
const gridSize = extras.gridSize ?? derivedGridSize;
|
|
203
203
|
const gridDivisions = extras.gridDivisions ?? Math.max(1, gridSize);
|
|
204
204
|
const grid = new THREE.GridHelper(gridSize, gridDivisions, gridPrimary, gridSecondary);
|
|
205
205
|
const gridY = groundEnabled ? groundOffset + gridHeightOffset : -gridHeightOffset;
|
|
@@ -220,7 +220,7 @@ export class DebugSystem {
|
|
|
220
220
|
}
|
|
221
221
|
const originPlaneY = groundEnabled ? groundOffset : lastGridPositionY || -gridHeightOffset;
|
|
222
222
|
if (extras.originHighlight !== false) {
|
|
223
|
-
const originCross = buildOriginCross(extras,
|
|
223
|
+
const originCross = buildOriginCross(extras, gridSize, originPlaneY);
|
|
224
224
|
this.add(originCross);
|
|
225
225
|
}
|
|
226
226
|
if (originEnabled) {
|