con un clic
tinyworld-asset-editing
// Use when changing Tiny World Builder selection placement, freehand drawing, asset clipboard, cut/copy/paste/duplicate, saved templates, or Stamps panel navigation.
// Use when changing Tiny World Builder selection placement, freehand drawing, asset clipboard, cut/copy/paste/duplicate, saved templates, or Stamps panel navigation.
Use when changing Tiny World Builder renderer setup, shadows, smoke, voxel clouds, ghost board render cost, frame loop, or GPU performance.
Use when changing Tiny World Builder API, webhook, SSE, MCP, plugin, or automation examples.
Use when changing the home island layout, edge dressing, undersides, draped banners (autoincentive sponsor flag), plane/crop-duster flight paths, banner streamers, or which side of the island is "front".
Use when changing ghost boards, multiplayer preview boards, panning, ghost visibility, jigsaw reveal, or any visibility behavior around the active Tiny World board.
Use when adding or changing persisted user state — settings defaults, audio, camera/orbit, panel positions, feature flags, and the in-app "Save Defaults" pipeline that snapshots localStorage into tinyworld-defaults.json. Also covers the inline-script regex gotcha that has burned us twice.
Use when changing Tiny World Builder Settings modal tabs, panels, controls, rendering/world/material/crowd/AI settings, or settings accessibility.
| name | tinyworld-asset-editing |
| description | Use when changing Tiny World Builder selection placement, freehand drawing, asset clipboard, cut/copy/paste/duplicate, saved templates, or Stamps panel navigation. |
Use the existing board intent contract:
world[x][z] is intent and cellMeshes['x,z'] is render state.setCell(x, z, opts) or helpers that call it.window.__tinyworldSelection; use worldCoords(), materialize(), and replaceWorldCoords(). Do not parse raw selectedCells keys in new code.Placement rules:
applyTool() path once per selected world coord with { skipSelectionBulk: true }. This preserves tool variants, terrain overrides, ghost transforms, fence logic, model stamp settings, and existing setCell side effects.Actions row can expose an Apply tool command; it should reuse the same bulk-placement helper rather than duplicating placement logic.dragMode === 'draw', drawVisitedCells, drawLastWorldCoord, and applyDrawToolToHit(). Drawing should not repeatedly stack terrain, bridges, or same-kind objects while the pointer crosses the same cell.kind: 'fence'; use fenceSide plus floors. Wall starts at level 4, boundary at level 5. Drawing a higher-level fence over an existing same-side fence should upgrade to that base level, not silently no-op. This also applies when the fence is stored as an extras entry beside another occupant.fenceSide from each draw step direction, not from the final pointer edge copied onto every skipped cell. Fixed side variants (north, center-x, etc.) should still win.Clipboard and templates:
{ version, origin, size, cells: [{ dx, dz, cell }] }.cloneCellIntent() so terrain, terrain height, kind, floors, building type, fence side, extras, rotation, offsetX/Y/Z, appearance, and waterFlow survive copy/paste and saved templates.tinyworld:asset-templates.v1 in localStorage. Keep these world-intent templates separate from model stamps and voxel build stamps.replaceWorldCoords() with placed cells so the pasted region stays selected for immediate follow-up edits.Templates; selecting one should place from its one-shot template payload and preserve the user's explicit copy/cut clipboard.localStorage entry, refreshes Stamps counts/cards, and clears stale selected-template tool state.Delete/Backspace should clear the active selection or hovered cell without writing to the asset clipboard; keep this separate from cut/copy semantics.Actions row should expose the same non-clipboard Delete path so mouse users can clear selected assets without using Cut.Shift+Arrow shifts selected cells through the internal move path without replacing the user's explicit clipboard, while arrows without an active selection keep camera/ghost behavior.Selection properties:
Edit, Transform, Appearance, Ground) so dense multi-selection actions stay scannable.?ai=0 / html.ai-disabled); hide prompt/chat controls, not the selected-object properties surface, and open selected objects directly to Properties so the property rows are visible.selectionAction so behavior remains centralized.applySelectionProperty().tinyworld:selection-props-active-tab.v1); keep the durable row keys/actions intact underneath tabbed Edit/Transform/Appearance/Ground views.tinyworld:selection-props-collapsed.v1; toggling sections must not remove or rename underlying row keys/actions.aria-label/title; the glyph is visual shorthand, not the action contract.currentValue plus aria-pressed/.active on property chips when a selected value is uniform, and leave mixed selections unpressed.bodyColor/topColor for any supported built-in kind, not just buildings. Expand applyAppearanceToObject() material buckets when exposing new colour rows so the world render and selection preview actually change.Default option that clears only the matching bodyColor/topColor override while preserving materials, style, transform, and the other colour row.objectScale, scaleX, scaleY, or scaleZ, preserving materials, colours, model IDs, and style.offsetX/Y/Z, preserving rotation, scale, materials, colours, model IDs, and style.new-island tool should select/create an editable island
board and route gizmo movement/rotation to the island group, while normal
object transform rows continue to operate on selected cells only.window.__tinyworldSelection.replaceWorldCoords(), not by
mutating selection internals, and should refresh from tinyworld:selection-changed,
tinyworld:world-changed, and tinyworld:grid-changed events.Stamps panel:
stampBuilderAllTools() builds model, voxel, and built-in stamp tools; filtering combines active category and search text.tuft; do not leave toolbar-only assets out of the searchable stamp library.Recent stamps category is derived from tinyworld:stamp-builder-recent.v1 and should use the same stampBuilderSelectionKey() values as selected-card state. Keep it ordered by most recent selection and remove deleted template keys.Recent; ignore Select, Erase, Auto, hidden tools, and other non-stamps so stale keys do not crowd out real stamps.mtllib and map_Kd lines. VoxEdit-style Tr 1.000000 should not make a textured model fully transparent; treat it as opaque unless a d dissolve value says otherwise.clone(true) can leave skeletons tied to the cached source scene when multiple stamps are placed.gltf.animations in the model-stamp asset cache. Runtime systems such as crowd character replacements use those clips after cloning the cached scene.Validation:
npm test, and npm run build.1/E, R/F, clear, perspective toggle, and console errors.