@buildcores/render-client 1.4.1 → 1.6.0

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.
package/dist/types.d.ts CHANGED
@@ -237,6 +237,121 @@ export interface BuildRenderProps {
237
237
  * Works for both parts and shareCode rendering.
238
238
  */
239
239
  gridSettings?: GridSettings;
240
+ /**
241
+ * Animation mode for the auto-rotation.
242
+ *
243
+ * - **bounce**: (default) Quick back-and-forth partial rotation with pauses
244
+ * - **spin360**: Slow continuous 360° rotation
245
+ *
246
+ * @example
247
+ * ```tsx
248
+ * // Continuous slow spin (good for showcases)
249
+ * <BuildRender
250
+ * shareCode="abc123"
251
+ * animationMode="spin360"
252
+ * spinDuration={12000} // 12 seconds per full rotation
253
+ * />
254
+ * ```
255
+ *
256
+ * @default "bounce"
257
+ */
258
+ animationMode?: 'bounce' | 'spin360';
259
+ /**
260
+ * Duration in milliseconds for one full 360° rotation.
261
+ * Only applies when `animationMode` is "spin360".
262
+ *
263
+ * @example
264
+ * ```tsx
265
+ * <BuildRender
266
+ * shareCode="abc123"
267
+ * animationMode="spin360"
268
+ * spinDuration={15000} // 15 seconds per rotation
269
+ * />
270
+ * ```
271
+ *
272
+ * @default 10000 (10 seconds)
273
+ */
274
+ spinDuration?: number;
275
+ /**
276
+ * Whether to enable user interaction (drag to rotate, scroll to zoom).
277
+ *
278
+ * When set to `false`:
279
+ * - Drag-to-rotate is disabled
280
+ * - Scroll-to-zoom is disabled
281
+ * - Cursor shows as "pointer" instead of "grab"
282
+ * - Click events pass through (useful for wrapping in a link)
283
+ *
284
+ * @example
285
+ * ```tsx
286
+ * // Non-interactive showcase with link
287
+ * <a href="https://buildcores.com/build/abc123">
288
+ * <BuildRender
289
+ * shareCode="abc123"
290
+ * animationMode="spin360"
291
+ * interactive={false}
292
+ * />
293
+ * </a>
294
+ * ```
295
+ *
296
+ * @default true
297
+ */
298
+ interactive?: boolean;
299
+ /**
300
+ * Frame quality for sprite renders.
301
+ * - **standard**: 72 frames (default) - good balance of quality and file size
302
+ * - **high**: 144 frames - smoother animation, larger file size (~2x file size)
303
+ *
304
+ * @example
305
+ * ```tsx
306
+ * <BuildRender
307
+ * shareCode="abc123"
308
+ * frameQuality="high" // 144 frames for smoother rotation
309
+ * />
310
+ * ```
311
+ *
312
+ * @default "standard"
313
+ */
314
+ frameQuality?: 'standard' | 'high';
315
+ /**
316
+ * Initial zoom level for the build.
317
+ * Range: 0.5 (50%) to 2.5 (250%). Values less than 1 make the build appear smaller,
318
+ * values greater than 1 make it appear larger.
319
+ *
320
+ * @example
321
+ * ```tsx
322
+ * <BuildRender
323
+ * shareCode="abc123"
324
+ * zoom={0.7} // 70% size - build appears smaller
325
+ * />
326
+ *
327
+ * <BuildRender
328
+ * shareCode="abc123"
329
+ * zoom={1.5} // 150% size - build appears larger
330
+ * />
331
+ * ```
332
+ *
333
+ * @default 1
334
+ */
335
+ zoom?: number;
336
+ /**
337
+ * Camera zoom level for server-side rendering.
338
+ * Values > 1 move the camera further away (build appears smaller in the sprite).
339
+ * Values < 1 move the camera closer (build appears larger in the sprite).
340
+ *
341
+ * Use this for higher quality scaled-down renders vs client-side zoom scaling.
342
+ * Range: 0.5 to 2.0
343
+ *
344
+ * @example
345
+ * ```tsx
346
+ * <BuildRender
347
+ * shareCode="abc123"
348
+ * cameraZoom={1.3} // Camera 30% further away - smaller build in sprite
349
+ * />
350
+ * ```
351
+ *
352
+ * @default 1
353
+ */
354
+ cameraZoom?: number;
240
355
  }
241
356
  /**
242
357
  * API configuration for environment and authentication
@@ -445,6 +560,23 @@ export interface RenderBuildRequest {
445
560
  * Only applies when showGrid is true.
446
561
  */
447
562
  gridSettings?: GridSettings;
563
+ /**
564
+ * Frame quality for sprite renders.
565
+ * - **standard**: 72 frames (default) - good balance of quality and file size
566
+ * - **high**: 144 frames - smoother animation, larger file size
567
+ *
568
+ * @default "standard"
569
+ */
570
+ frameQuality?: 'standard' | 'high';
571
+ /**
572
+ * Camera zoom level for server-side rendering.
573
+ * Values > 1 move the camera further away (build appears smaller in the sprite).
574
+ * Values < 1 move the camera closer (build appears larger in the sprite).
575
+ * Range: 0.5 to 2.0
576
+ *
577
+ * @default 1
578
+ */
579
+ cameraZoom?: number;
448
580
  }
449
581
  /**
450
582
  * Response structure containing all available parts for each category.
@@ -588,6 +720,11 @@ export interface BuildResponse {
588
720
  partDetails: {
589
721
  [K in PartCategory]?: PartDetailsWithCategory[];
590
722
  };
723
+ /**
724
+ * Whether the case in this build has an interactive 3D model available.
725
+ * If false, the build cannot be rendered in 3D.
726
+ */
727
+ hasInteractiveModel: boolean;
591
728
  }
592
729
  /**
593
730
  * Response from the get parts by IDs endpoint.
@@ -637,6 +774,10 @@ export interface RenderByShareCodeOptions {
637
774
  cameraOffsetX?: number;
638
775
  /** Grid appearance settings (for thicker/more visible grid in renders) */
639
776
  gridSettings?: GridSettings;
777
+ /** Frame quality - 'standard' (72 frames) or 'high' (144 frames for smoother animation) */
778
+ frameQuality?: 'standard' | 'high';
779
+ /** Camera zoom level for rendering. Values > 1 move camera further (build appears smaller). Range: 0.5 to 2.0 */
780
+ cameraZoom?: number;
640
781
  /** Polling interval in milliseconds (default: 1500) */
641
782
  pollIntervalMs?: number;
642
783
  /** Timeout in milliseconds (default: 120000 = 2 minutes) */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buildcores/render-client",
3
- "version": "1.4.1",
3
+ "version": "1.6.0",
4
4
  "type": "module",
5
5
  "description": "React component for interactive 360-degree video rendering",
6
6
  "repository": {