@spiffcommerce/preview 5.8.9 → 5.9.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/index.d.mts CHANGED
@@ -165,7 +165,7 @@ type ThreeDPreviewService = {
165
165
  * Designed for use when utilizing the 3D preview in an editor format.
166
166
  * Given a list of material names, highlights the associated meshes in the scene.
167
167
  */
168
- setHighlights(materials: readonly MaterialHandle[], color?: readonly [number, number, number]): void;
168
+ setHighlights(materials: readonly MaterialHandle[]): void;
169
169
  /**
170
170
  * Sets the rendering pipeline configuration for the scene. Overwrites any existing configuration.
171
171
  * @param renderingPipelineConfiguration The configuration to apply. Empty values will be set to default.
@@ -224,6 +224,12 @@ type ThreeDPreviewService = {
224
224
  * Note this will not resolve any existing promises.
225
225
  */
226
226
  forceStopCameraAnimations(): void;
227
+ /**
228
+ * Takes a list of material names supported by the highlighter. This function
229
+ * must be notified of materials for highlighting to work.
230
+ * @param materials A list of material names to allow highlighting on.
231
+ */
232
+ setHighlightMaterials(materials: string[]): void;
227
233
  };
228
234
  /**
229
235
  * Represents a service capable of managing and returning contexts that
@@ -1090,12 +1096,12 @@ declare class SpiffCommerce3DPreviewService implements ThreeDPreviewService {
1090
1096
  * A collection of callbacks to be invoked when a model is loaded or unloaded.
1091
1097
  */
1092
1098
  private modelLoadEventCallbacks;
1093
- private glowLayerManager;
1094
1099
  /**
1095
- * When instantiated, contains a list of meshes that contribute to highlighting
1096
- * in the scene.
1100
+ * A list of valid material names supported by the highlighter.
1101
+ * All other materials will be ignored.
1097
1102
  */
1098
- private highlightLayer?;
1103
+ private validHighlightMaterials;
1104
+ private glowLayerManager;
1099
1105
  private renderingPipeline;
1100
1106
  private modelContainers;
1101
1107
  private plugins;
@@ -1131,7 +1137,7 @@ declare class SpiffCommerce3DPreviewService implements ThreeDPreviewService {
1131
1137
  renderSceneScreenshot(resolution: number, camAnim: CameraAnimation): Promise<string>;
1132
1138
  orbitEnabled(): boolean;
1133
1139
  fireResizeEvent(): void;
1134
- setHighlights(materials: readonly MaterialHandle[], color?: readonly [number, number, number]): void;
1140
+ setHighlights(materials: readonly MaterialHandle[]): void;
1135
1141
  setRenderingPipelineConfiguration(renderingPipelineConfiguration: RenderingPipelineConfiguration): void;
1136
1142
  loadModel(modelDetails: ModelDetails, options?: {
1137
1143
  refocusCamera?: boolean;
@@ -1154,6 +1160,7 @@ declare class SpiffCommerce3DPreviewService implements ThreeDPreviewService {
1154
1160
  scale: Vector;
1155
1161
  };
1156
1162
  updatePreviewOptions(options: PreviewOptions): void;
1163
+ setHighlightMaterials(materials: string[]): void;
1157
1164
  /**
1158
1165
  * Given a valid canvas element, will remove any existing input controls
1159
1166
  * and re-attach them to the given canvas. The pan mouse button can be set