Three paths in the 3D stage dropped objects without releasing what they held on the GPU: - Scene.clear() (New Scene) assigned `scene.children = []`, which disposed nothing and left each child parented to the scene. Every New Scene leaked all geometries, materials, textures and splat buffers of the previous one. - SceneUtils.deleteObject disposed geometries and materials but not the textures they reference (Material.dispose() does not free its maps), so deleting a textured GLB leaked every map. - _create_skybox replaced scene.background without disposing the previous cube texture. Add disposeObject3D(), which frees geometries, materials and their textures (deduplicated), skeleton bone textures and Spark splat buffers, and use it in clear() and deleteObject. clear() now uses Object3D.clear() so children are actually unparented. The old deleteObject also checked a custom `.texture` field that nothing in the codebase sets; that branch is dropped. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| .vscode | ||
| apps/artcraft | ||
| libs | ||
| scripts | ||
| tools | ||
| .editorconfig | ||
| .eslintignore | ||
| .eslintrc.json | ||
| .gitignore | ||
| .nxignore | ||
| README.md | ||
| api_docs.html | ||
| build_modules.sh | ||
| clean_modules.sh | ||
| nx.json | ||
| package-lock.json | ||
| package.json | ||
| tsconfig.base.json | ||
| tsconfig.json | ||
| vitest.workspace.ts | ||
README.md
Artcraft frontend
This Nx workspace contains the Tauri desktop frontend in apps/artcraft and its
shared libraries in libs. Website and Netlify builds live in artcraft-services.
Use Node.js 20 or newer and npm. Run the following commands from frontend/:
npm ci
npx nx dev artcraft
npx nx build artcraft
The frontend development server uses port 5173. Start the Rust app separately from the repository root:
./script/artcraft/unix_rust_dev.sh
The repository-root frontend launcher installs dependencies and starts the same server:
./script/artcraft/unix_frontend_dev.sh
On Windows, use script/artcraft/windows_frontend_dev.ps1 and
script/artcraft/windows_rust_dev.ps1 in separate terminals. See
development setup for Rust and Tauri prerequisites.
The Vite build writes apps/artcraft/dist, which Tauri bundles. Public resources
come from apps/artcraft/app/public. The app also needs its retained libraries,
root package lock, TypeScript project references, and Nx/Vite configuration.
The aliases in tsconfig.base.json resolve shared libraries to their source for
both development and production. The app's Vite configuration loads this file
explicitly so imports inside shared libraries use the same aliases. The desktop
build does not require library dist/ outputs or a separate library build.
Import shared libraries by the names declared in their package.json files:
import { Button } from "@storyteller/ui-button";
import { Modal } from "@storyteller/ui-modal";
Use the workspace-local Nx version through npx nx. npm ci and the release
workflows use the checked-in lockfile; do not reinstall different Nx versions
inside CI.
clean_modules.sh is an explicit cleanup command that removes build outputs,
Nx caches, and frontend dependencies. Do not run it when preserving local build
outputs during repository pruning.