fluidcad 0.0.37 → 0.0.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "generatedAt": "2026-06-12T18:19:00.445Z",
3
+ "generatedAt": "2026-06-21T11:15:51.248Z",
4
4
  "symbols": {
5
5
  "arc": "api/arc",
6
6
  "axis": "api/axis",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "generatedAt": "2026-06-12T18:19:00.445Z",
3
+ "generatedAt": "2026-06-21T11:15:51.248Z",
4
4
  "docs": [
5
5
  {
6
6
  "id": "api/arc",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluidcad",
3
- "version": "0.0.37",
3
+ "version": "0.0.38",
4
4
  "description": "Parametric CAD modeling library using javascript",
5
5
  "author": "Marwan Aouida <contact@marwan.dev>",
6
6
  "license": "MIT",
@@ -114,7 +114,7 @@ export declare class FluidCadServer {
114
114
  processFile(filePath: string, ignoreCache?: boolean): Promise<SceneRenderedData | null>;
115
115
  updateLiveCode(fileName: string, code: string): Promise<SceneRenderedData | null>;
116
116
  rollbackFromUI(index: number): Promise<SceneRenderedData | null>;
117
- recomputeCurrentFile(): Promise<SceneRenderedData | null>;
117
+ recomputeCurrentFile(forceFullRebuild?: boolean): Promise<SceneRenderedData | null>;
118
118
  rollback(fileName: string, index: number): Promise<SceneRenderedData | null>;
119
119
  importFile(workspacePath: string, fileName: string, data: string): Promise<void>;
120
120
  getShapeProperties(shapeId: string): any;
@@ -220,13 +220,23 @@ export class FluidCadServer {
220
220
  async rollbackFromUI(index) {
221
221
  return this.rollback(this.currentFileName, index);
222
222
  }
223
- async recomputeCurrentFile() {
223
+ async recomputeCurrentFile(forceFullRebuild = false) {
224
224
  if (!this.currentFilePath) {
225
225
  return null;
226
226
  }
227
227
  const sessionId = this.currentFileName;
228
228
  this.renderingCache.delete(sessionId);
229
229
  this.lastRendered.delete(sessionId);
230
+ if (forceFullRebuild) {
231
+ // Drop the incremental-compare baseline so every object is rebuilt from
232
+ // scratch instead of being carried over as cached. Without this, an
233
+ // unchanged file compares equal at every index, the whole scene is
234
+ // marked cached, and the render reuses all geometry — so the explicit
235
+ // "Recompute scene" action does no visible work and reports no build
236
+ // timings (buildDurationMs is only recorded for objects that rebuild).
237
+ // Param edits keep the baseline so slider drags stay fast.
238
+ this.previousScenes.delete(sessionId);
239
+ }
230
240
  return this.processFileInternal(sessionId, this.currentFilePath, true);
231
241
  }
232
242
  async rollback(fileName, index) {
@@ -2,7 +2,7 @@ import { Router } from 'express';
2
2
  export function createParamsRouter(fluidCadServer, sendToExtension, broadcastToUI) {
3
3
  const router = Router();
4
4
  router.post('/recompute', async (_req, res) => {
5
- const data = await fluidCadServer.recomputeCurrentFile();
5
+ const data = await fluidCadServer.recomputeCurrentFile(true);
6
6
  if (!data) {
7
7
  res.status(404).json({ error: 'No active scene' });
8
8
  return;