Import and use new geometry functions in box brush commands

This commit is contained in:
2026-04-05 02:38:04 +02:00
parent faf0cfcf03
commit 98bbc49d41
4 changed files with 4 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
import { DEFAULT_GRID_SIZE, snapPositiveSizeToGrid } from "../geometry/grid-snapping";
import { createOpaqueId } from "../core/ids";
import { cloneBoxBrushGeometry, scaleBoxBrushGeometryToSize } from "../document/brushes";
import { cloneSelectionForCommand, getBoxBrushOrThrow, replaceBrush, setSingleBrushSelection } from "./brush-command-helpers";
export function createResizeBoxBrushCommand(options) {
const resolvedSize = options.snapToGrid === false ? options.size : snapPositiveSizeToGrid(options.size, options.gridSize ?? DEFAULT_GRID_SIZE);

View File

@@ -1,5 +1,6 @@
import type { ToolMode } from "../core/tool-mode";
import { DEFAULT_GRID_SIZE, snapPositiveSizeToGrid } from "../geometry/grid-snapping";
import { cloneBoxBrushGeometry, scaleBoxBrushGeometryToSize } from "../document/brushes";
import { createOpaqueId } from "../core/ids";
import type { EditorSelection } from "../core/selection";

View File

@@ -1,4 +1,5 @@
import { createOpaqueId } from "../core/ids";
import { cloneBoxBrushGeometry, scaleBoxBrushGeometryToSize } from "../document/brushes";
import { cloneSelectionForCommand, getBoxBrushOrThrow, replaceBrush, setSingleBrushEdgeSelection, setSingleBrushFaceSelection, setSingleBrushSelection, setSingleBrushVertexSelection } from "./brush-command-helpers";
function cloneVec3(vector) {
return {

View File

@@ -3,6 +3,7 @@ import type { ToolMode } from "../core/tool-mode";
import { createOpaqueId } from "../core/ids";
import type { EditorSelection } from "../core/selection";
import type { Vec3 } from "../core/vector";
import { cloneBoxBrushGeometry, scaleBoxBrushGeometryToSize } from "../document/brushes";
import {
cloneSelectionForCommand,