@womp/mesh-editor
v0.1.9
Published
Browser mesh editing engine and edit-session UI for Womp products.
Keywords
Readme
@womp/mesh-editor
Framework-independent browser mesh editing for Womp products.
This package is publicly downloadable but remains proprietary. No license is granted for external use.
The package contains the EditableMesh model, the PortableMeshEditor
engine, Three.js conversion helpers, and the edit-only reference session. It
does not include rigging clients, provider integrations, backend platforms, or
Python workers.
import { open_edit_session } from "@womp/mesh-editor/session";
await open_edit_session({
title: "Edit mesh",
editable_mesh,
root_class: "product-mesh-editor-theme",
on_commit: async ({ mesh }) => {
await persist_mesh(mesh);
},
});Return false from on_commit when the host cancels its import dialog. The session
stays open with its edits and undo history. Rejected promises display an error
and also keep the session open for retry.
root_class scopes the semantic --womp-mesh-editor-* theme tokens documented
in docs/ui-theming.md. Omit it to retain the default appearance.
The reference session prepares Dense tessellation before editing, falls back to Standard when required by mesh limits, and hides tessellation controls. The prepared mesh is the clean session baseline and is returned on commit.
[email protected] is a peer dependency and must be supplied by the host.
