@spiffcommerce/preview 4.1.0-alpha.3 → 4.1.0-alpha.5

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
@@ -214,6 +214,21 @@ type ThreeDPreviewService = {
214
214
  * @param plugin The plugin to remove.
215
215
  */
216
216
  unregisterPlugin(plugin: PreviewServicePlugin): void;
217
+ /**
218
+ * Rotates a transform around the origin.
219
+ * @param transform The transform to rotate. All values are optional and default to standard identity values.
220
+ * @param axis The axis to rotate around. Defaults to the Y axis.
221
+ * @param angle The angle to rotate by. Defaults to PI (180 degrees);
222
+ */
223
+ rotateAroundOrigin(transform: {
224
+ position?: Vector;
225
+ rotation?: Vector;
226
+ scale?: Vector;
227
+ }, axis: Vector, angle: number): {
228
+ position: Vector;
229
+ rotation: Vector;
230
+ scale: Vector;
231
+ };
217
232
  };
218
233
  /**
219
234
  * Represents a service capable of managing and returning contexts that
@@ -266,7 +281,7 @@ type ModelLoadEventData = {
266
281
  /**
267
282
  * The type of event that has occurred.
268
283
  */
269
- readonly eventType: 'load' | 'unload';
284
+ readonly eventType: "load" | "unload";
270
285
  /**
271
286
  * The model that has been loaded or unloaded.
272
287
  */
@@ -639,7 +654,7 @@ interface DepthOfFieldPipelineConfiguration {
639
654
  /**
640
655
  * The quality of the blur. Higher values will provide better quality but will be slower.
641
656
  */
642
- blurLevel?: 'Low' | 'Medium' | 'High';
657
+ blurLevel?: "Low" | "Medium" | "High";
643
658
  /**
644
659
  * The distance from the camera to the focus point.
645
660
  */
@@ -691,7 +706,7 @@ interface MiscPipelineConfiguration {
691
706
  * The type of tone mapping to use. "Standard" or "ACES". "ACES" applies a tone that is similar to Unity and Unreal.
692
707
  * @default "standard"
693
708
  */
694
- toneMappingType?: 'Standard' | 'ACES';
709
+ toneMappingType?: "Standard" | "ACES";
695
710
  }
696
711
  /**
697
712
  * Sharpening is a post processing effect that increases the contrast between pixels.
@@ -712,7 +727,7 @@ interface VignettePipelineConfiguration {
712
727
  /**
713
728
  * "Multiply" or "Opaque". "Multiply" will mix the vignette color with the scene color. "Opaque" will replace the scene color with the vignette color.
714
729
  */
715
- blendMode?: 'Multiply' | 'Opaque';
730
+ blendMode?: "Multiply" | "Opaque";
716
731
  /**
717
732
  * The FOV of the camera. This is used to calculate the vignette size.
718
733
  */
@@ -1100,6 +1115,23 @@ declare class SpiffCommerce3DPreviewService implements ThreeDPreviewService {
1100
1115
  getGlowLayerManager(): GlowLayerManager;
1101
1116
  modelUnloaded(modelContainer: ModelContainer): void;
1102
1117
  private triggerModelLoadEvent;
1118
+ /**
1119
+ * Rotates a transform around the origin.
1120
+ * @param transform The transform to rotate. All values are optional and default to standard identity values.
1121
+ * @param axis The axis to rotate around. Defaults to the Y axis.
1122
+ * @param angle The angle to rotate by. Defaults to PI (180 degrees);
1123
+ */
1124
+ rotateAroundOrigin(transform: {
1125
+ position?: Vector;
1126
+ rotation?: Vector;
1127
+ scale?: Vector;
1128
+ }, axis?: Vector, angle?: number): {
1129
+ position: Vector;
1130
+ rotation: Vector;
1131
+ scale: Vector;
1132
+ };
1133
+ private toBabylonVector3;
1134
+ private fromBabylonVector3;
1103
1135
  private handleMaterialProgressCallback;
1104
1136
  private handleModelProgressCallback;
1105
1137
  /**
@@ -1152,24 +1184,4 @@ declare const REFLECTION_PROBE_RESOLUTION = 128;
1152
1184
  type PowerOfTwoNumber = 128 | 256 | 512 | 1024 | 2048 | 4096 | 8192;
1153
1185
  declare const renderingPipelineDefaults: RenderingPipelineConfiguration;
1154
1186
 
1155
- /**
1156
- * Rotates a transform around the origin.
1157
- * @param transform The transform to rotate. All values are optional and default to standard identity values.
1158
- * @param axis The axis to rotate around. Defaults to the Y axis.
1159
- * @param angle The angle to rotate by. Defaults to PI (180 degrees);
1160
- */
1161
- declare function rotateAroundOrigin(transform: {
1162
- position?: Vector;
1163
- rotation?: Vector;
1164
- scale?: Vector;
1165
- }, axis?: Vector, angle?: number): {
1166
- position: Vector;
1167
- rotation: Vector;
1168
- scale: Vector;
1169
- };
1170
- declare function toBabylonVector3(v: Vector): Vector3;
1171
- declare function fromBabylonVector3(v: Vector3): Vector;
1172
- declare function toRadians(degrees: number): number;
1173
- declare function toRadiansVector(v: Vector): Vector;
1174
-
1175
- export { AntiAliasingPipelineConfiguration, Asset, BloomPipelineConfiguration, CameraAnimation, CameraPose, ChromaticAberrationPipelineConfiguration, Color4Configuration, ColorCurvesConfiguration, DepthOfFieldPipelineConfiguration, EngineContext, GrainPipelineConfiguration, LoadProgressEventData, MaterialEffectMode, MaterialHandle, MaterialResource, MiscPipelineConfiguration, ModelAnimation, ModelContainer, ModelDetails, ModelLoadEventData, PowerOfTwoNumber, PreviewOptions, PreviewServicePlugin, ProductCameraRig, REFLECTION_PROBE_RESOLUTION, RenderableContext, RenderableContextService, RenderingConfiguration, RenderingPipelineConfiguration, SharpenPipelineConfiguration, SpiffCommerce3DPreviewService, ThreeDPreviewService, Vector, VignettePipelineConfiguration, fromBabylonVector3, renderingPipelineDefaults, rotateAroundOrigin, toBabylonVector3, toRadians, toRadiansVector };
1187
+ export { AntiAliasingPipelineConfiguration, Asset, BloomPipelineConfiguration, CameraAnimation, CameraPose, ChromaticAberrationPipelineConfiguration, Color4Configuration, ColorCurvesConfiguration, DepthOfFieldPipelineConfiguration, EngineContext, GrainPipelineConfiguration, LoadProgressEventData, MaterialEffectMode, MaterialHandle, MaterialResource, MiscPipelineConfiguration, ModelAnimation, ModelContainer, ModelDetails, ModelLoadEventData, PowerOfTwoNumber, PreviewOptions, PreviewServicePlugin, ProductCameraRig, REFLECTION_PROBE_RESOLUTION, RenderableContext, RenderableContextService, RenderingConfiguration, RenderingPipelineConfiguration, SharpenPipelineConfiguration, SpiffCommerce3DPreviewService, ThreeDPreviewService, Vector, VignettePipelineConfiguration, renderingPipelineDefaults };