Update App.tsx with new selection mode and box edge/vertex handling
This commit is contained in:
@@ -32,7 +32,9 @@ import { createUpsertEntityCommand } from "../commands/upsert-entity-command";
|
|||||||
import { createUpsertModelInstanceCommand } from "../commands/upsert-model-instance-command";
|
import { createUpsertModelInstanceCommand } from "../commands/upsert-model-instance-command";
|
||||||
import { createUpsertInteractionLinkCommand } from "../commands/upsert-interaction-link-command";
|
import { createUpsertInteractionLinkCommand } from "../commands/upsert-interaction-link-command";
|
||||||
import {
|
import {
|
||||||
|
getSelectedBrushEdgeId,
|
||||||
getSelectedBrushFaceId,
|
getSelectedBrushFaceId,
|
||||||
|
getSelectedBrushVertexId,
|
||||||
getSingleSelectedBrushId,
|
getSingleSelectedBrushId,
|
||||||
getSingleSelectedEntityId,
|
getSingleSelectedEntityId,
|
||||||
getSingleSelectedModelInstanceId,
|
getSingleSelectedModelInstanceId,
|
||||||
@@ -93,14 +95,24 @@ import {
|
|||||||
import type { AudioAssetRecord, ImageAssetRecord, ModelAssetRecord, ProjectAssetRecord } from "../assets/project-assets";
|
import type { AudioAssetRecord, ImageAssetRecord, ModelAssetRecord, ProjectAssetRecord } from "../assets/project-assets";
|
||||||
import { getProjectAssetKindLabel } from "../assets/project-assets";
|
import { getProjectAssetKindLabel } from "../assets/project-assets";
|
||||||
import {
|
import {
|
||||||
|
getWhiteboxSelectionModeLabel,
|
||||||
|
WHITEBOX_SELECTION_MODES,
|
||||||
|
type WhiteboxSelectionMode
|
||||||
|
} from "../core/whitebox-selection-mode";
|
||||||
|
import {
|
||||||
|
BOX_EDGE_LABELS,
|
||||||
BOX_FACE_IDS,
|
BOX_FACE_IDS,
|
||||||
|
BOX_FACE_LABELS,
|
||||||
|
BOX_VERTEX_LABELS,
|
||||||
DEFAULT_BOX_BRUSH_CENTER,
|
DEFAULT_BOX_BRUSH_CENTER,
|
||||||
DEFAULT_BOX_BRUSH_ROTATION_DEGREES,
|
DEFAULT_BOX_BRUSH_ROTATION_DEGREES,
|
||||||
DEFAULT_BOX_BRUSH_SIZE,
|
DEFAULT_BOX_BRUSH_SIZE,
|
||||||
createDefaultFaceUvState,
|
createDefaultFaceUvState,
|
||||||
normalizeBrushName,
|
normalizeBrushName,
|
||||||
type BoxBrush,
|
type BoxBrush,
|
||||||
|
type BoxEdgeId,
|
||||||
type BoxFaceId,
|
type BoxFaceId,
|
||||||
|
type BoxVertexId,
|
||||||
type FaceUvRotationQuarterTurns,
|
type FaceUvRotationQuarterTurns,
|
||||||
type FaceUvState
|
type FaceUvState
|
||||||
} from "../document/brushes";
|
} from "../document/brushes";
|
||||||
@@ -220,15 +232,6 @@ interface Vec3Draft {
|
|||||||
|
|
||||||
type InteractionSourceEntity = Extract<EntityInstance, { kind: "triggerVolume" | "interactable" }>;
|
type InteractionSourceEntity = Extract<EntityInstance, { kind: "triggerVolume" | "interactable" }>;
|
||||||
|
|
||||||
const FACE_LABELS: Record<BoxFaceId, string> = {
|
|
||||||
posX: "+X Right",
|
|
||||||
negX: "-X Left",
|
|
||||||
posY: "+Y Top",
|
|
||||||
negY: "-Y Bottom",
|
|
||||||
posZ: "+Z Front",
|
|
||||||
negZ: "-Z Back"
|
|
||||||
};
|
|
||||||
|
|
||||||
function getModelInstanceCollisionModeDescription(mode: ModelInstanceCollisionMode): string {
|
function getModelInstanceCollisionModeDescription(mode: ModelInstanceCollisionMode): string {
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case "none":
|
case "none":
|
||||||
|
|||||||
Reference in New Issue
Block a user