@aura3d/rendering 2.0.0 → 2.0.1
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/ArchitecturalMaterialCatalog.d.ts +3 -3
- package/dist/CanonicalProductScene.d.ts +1 -1
- package/dist/CascadedShadowMaps.d.ts +7 -7
- package/dist/ClusteredForwardLighting.d.ts +2 -2
- package/dist/DecalGeometry.d.ts +2 -2
- package/dist/DepthPass.d.ts +4 -4
- package/dist/EnvironmentBackgroundPass.d.ts +4 -4
- package/dist/EnvironmentBackgroundResources.d.ts +2 -2
- package/dist/EnvironmentLighting.d.ts +1 -1
- package/dist/EnvironmentMapResources.d.ts +2 -2
- package/dist/EnvironmentPipeline.d.ts +2 -2
- package/dist/EnvironmentPlatform.d.ts +3 -3
- package/dist/EnvironmentPreset.d.ts +1 -1
- package/dist/Exposure.d.ts +1 -1
- package/dist/ExternalParityRenderPreset.d.ts +3 -3
- package/dist/ForwardPass.d.ts +9 -9
- package/dist/Geometry.d.ts +3 -3
- package/dist/GeometryPrimitives.d.ts +2 -2
- package/dist/HDRRenderPipeline.d.ts +4 -4
- package/dist/IBL.d.ts +4 -4
- package/dist/IndexBuffer.d.ts +1 -1
- package/dist/InstancedPBRMaterial.d.ts +2 -2
- package/dist/InstancedUnlitMaterial.d.ts +1 -1
- package/dist/Instancing.d.ts +1 -1
- package/dist/LightUniforms.d.ts +2 -2
- package/dist/LightingDebug.d.ts +2 -2
- package/dist/LightingDefaults.d.ts +2 -2
- package/dist/LightingRig.d.ts +1 -1
- package/dist/LineGeometry.d.ts +2 -2
- package/dist/Material.d.ts +1 -1
- package/dist/MaterialBinding.d.ts +3 -3
- package/dist/MaterialInstance.d.ts +2 -2
- package/dist/MaterialPresets.d.ts +2 -2
- package/dist/MeshConsolidation.d.ts +2 -2
- package/dist/MorphTarget.d.ts +1 -1
- package/dist/MorphTargetPlan.d.ts +1 -1
- package/dist/MorphUnlitMaterial.d.ts +1 -1
- package/dist/NormalMappedPBRMaterial.d.ts +4 -4
- package/dist/PBRLightingDefaults.d.ts +1 -1
- package/dist/PBRMaterial.d.ts +2 -2
- package/dist/PMREM.d.ts +2 -2
- package/dist/PortableShaderMaterial.d.ts +3 -3
- package/dist/PostProcessPass.d.ts +2 -2
- package/dist/ProceduralTexture.d.ts +1 -1
- package/dist/ProductTurntable.d.ts +3 -3
- package/dist/ReflectionProbe.d.ts +4 -4
- package/dist/ReflectionSurfaces.d.ts +2 -2
- package/dist/RenderBackend.d.ts +3 -3
- package/dist/RenderDevice.d.ts +6 -6
- package/dist/RenderGraph.d.ts +1 -1
- package/dist/RenderPass.d.ts +1 -1
- package/dist/RenderPipeline.d.ts +3 -3
- package/dist/RenderQueue.d.ts +2 -2
- package/dist/RenderState.d.ts +2 -2
- package/dist/Renderer.d.ts +14 -14
- package/dist/RendererFeatureGates.d.ts +1 -1
- package/dist/RendererPostprocessPlan.d.ts +1 -1
- package/dist/RendererVisualPipelineReport.d.ts +4 -4
- package/dist/ResourceLifecycle.d.ts +1 -1
- package/dist/SceneOptimization.d.ts +2 -2
- package/dist/ScreenSpaceLineMaterial.d.ts +1 -1
- package/dist/ShaderChunks.d.ts.map +1 -1
- package/dist/ShaderChunks.js +11 -5
- package/dist/ShaderChunks.js.map +1 -1
- package/dist/ShaderLibrary.d.ts +2 -2
- package/dist/ShaderLibrary.d.ts.map +1 -1
- package/dist/ShaderLibrary.js +17 -58
- package/dist/ShaderLibrary.js.map +1 -1
- package/dist/ShaderLibraryCore.d.ts +3 -3
- package/dist/ShaderLibraryCore.d.ts.map +1 -1
- package/dist/ShaderLibraryCore.js +3 -11
- package/dist/ShaderLibraryCore.js.map +1 -1
- package/dist/ShaderModule.d.ts +3 -3
- package/dist/ShaderReflection.d.ts +1 -1
- package/dist/ShadowMap.d.ts +1 -1
- package/dist/ShadowPass.d.ts +5 -5
- package/dist/ShadowProjection.d.ts +1 -1
- package/dist/SkinnedLitMaterial.d.ts +3 -3
- package/dist/SkinnedUnlitMaterial.d.ts +1 -1
- package/dist/SkinningBounds.d.ts +2 -2
- package/dist/SpecularPrefilter.d.ts +1 -1
- package/dist/SpriteGeometry.d.ts +1 -1
- package/dist/StereoCameraRig.d.ts +1 -1
- package/dist/StereoEffects.d.ts +1 -1
- package/dist/TerrainHeightfield.d.ts +1 -1
- package/dist/TextureBinding.d.ts +2 -2
- package/dist/TexturedPBRMaterial.d.ts +4 -4
- package/dist/TexturedUnlitMaterial.d.ts +3 -3
- package/dist/ToneMapping.d.ts +1 -1
- package/dist/UniformBinder.d.ts +1 -1
- package/dist/UnlitMaterial.d.ts +1 -1
- package/dist/VegetationScatter.d.ts +1 -1
- package/dist/VertexBuffer.d.ts +2 -2
- package/dist/WebGL2Device.d.ts +1 -1
- package/dist/WebGPUDevice.d.ts +2 -2
- package/dist/WebGPURenderToTextureProof.d.ts +1 -1
- package/dist/advanced-runtime/AdvancedRenderer.d.ts +3 -3
- package/dist/advanced-runtime/index.d.ts +9 -9
- package/dist/cinematic/BloomPass.d.ts +1 -1
- package/dist/cinematic/CinematicDepthComposition.d.ts +1 -1
- package/dist/cinematic/CinematicLightingRig.d.ts +2 -2
- package/dist/cinematic/CinematicMaterialPresets.d.ts +2 -2
- package/dist/cinematic/CinematicPostProcess.d.ts +6 -6
- package/dist/cinematic/DepthHazePass.d.ts +1 -1
- package/dist/cinematic/EmissivePracticalLightSystem.d.ts +2 -2
- package/dist/cinematic/FilmGrainPass.d.ts +1 -1
- package/dist/cinematic/FogVolumeSystem.d.ts +1 -1
- package/dist/cinematic/GlowCardSystem.d.ts +2 -2
- package/dist/cinematic/RainParticleSystem.d.ts +2 -2
- package/dist/cinematic/VignettePass.d.ts +1 -1
- package/dist/cinematic/WetReflectionApproximation.d.ts +1 -1
- package/dist/cinematic/index.d.ts +14 -14
- package/dist/index.d.ts +230 -230
- package/dist/materials/PhysicalMaterial.d.ts +1 -1
- package/dist/performance/BVH.d.ts +2 -2
- package/dist/performance/Batcher.d.ts +2 -2
- package/dist/performance/FrustumCuller.d.ts +1 -1
- package/dist/performance/Octree.d.ts +1 -1
- package/dist/postprocess/BloomPass.d.ts +1 -1
- package/dist/postprocess/CinematicDiagnostics.d.ts +1 -1
- package/dist/postprocess/ColorGradingPass.d.ts +1 -1
- package/dist/postprocess/DepthOfFieldPass.d.ts +1 -1
- package/dist/postprocess/EffectComposer.d.ts +3 -3
- package/dist/postprocess/SSAOPass.d.ts +1 -1
- package/dist/postprocess/index.d.ts +10 -10
- package/dist/production-runtime/AnimationControlsPipeline.d.ts +1 -1
- package/dist/production-runtime/PBRHDRPipeline.d.ts +4 -4
- package/dist/production-runtime/ProductionEffectsPipeline.d.ts +2 -2
- package/dist/production-runtime/ProductionRendererTypes.d.ts +2 -2
- package/dist/production-runtime/ProductionRuntimeRenderer.d.ts +3 -3
- package/dist/production-runtime/ProductionWebGL2Renderer.d.ts +4 -4
- package/dist/production-runtime/ProductionWebGPURenderer.d.ts +4 -4
- package/dist/production-runtime/TransmissionBackdropCapture.d.ts +3 -3
- package/dist/production-runtime/backends/RendererBackend.d.ts +1 -1
- package/dist/production-runtime/backends/WebGL2RendererBackend.d.ts +3 -3
- package/dist/production-runtime/backends/WebGPURendererBackend.d.ts +1 -1
- package/dist/production-runtime/backends/webgl2/WebGL2StateCache.d.ts +1 -1
- package/dist/production-runtime/diagnostics/FrameCapture.d.ts +1 -1
- package/dist/production-runtime/environment/HDRLoader.d.ts +2 -2
- package/dist/production-runtime/environment/PMREMGenerator.d.ts +1 -1
- package/dist/production-runtime/framegraph/FrameGraph.d.ts +1 -1
- package/dist/production-runtime/geometry/ProjectedDecalGeometry.d.ts +1 -1
- package/dist/production-runtime/index.d.ts +74 -74
- package/dist/production-runtime/lights/LightManager.d.ts +1 -1
- package/dist/production-runtime/lights/ShadowMapRenderer.d.ts +1 -1
- package/dist/production-runtime/materials/GLTFMaterialAdapter.d.ts +1 -1
- package/dist/production-runtime/materials/GLTFPBRMaterialAdapter.d.ts +2 -2
- package/dist/production-runtime/materials/MaterialCompiler.d.ts +2 -2
- package/dist/production-runtime/materials/MaterialTextureBindings.d.ts +1 -1
- package/dist/production-runtime/passes/ContactShadowPass.d.ts +1 -1
- package/dist/production-runtime/passes/DepthPrepass.d.ts +1 -1
- package/dist/production-runtime/passes/OpaquePass.d.ts +1 -1
- package/dist/production-runtime/passes/ShadowPass.d.ts +1 -1
- package/dist/production-runtime/passes/SkyboxPass.d.ts +1 -1
- package/dist/production-runtime/passes/ToneMappingPass.d.ts +1 -1
- package/dist/production-runtime/passes/TransparentPass.d.ts +1 -1
- package/dist/production-runtime/postprocess/BloomPass.d.ts +2 -2
- package/dist/production-runtime/postprocess/ColorGradingPass.d.ts +2 -2
- package/dist/production-runtime/postprocess/DOFPass.d.ts +2 -2
- package/dist/production-runtime/postprocess/FXAAPass.d.ts +2 -2
- package/dist/production-runtime/postprocess/ProductionEffectComposer.d.ts +1 -1
- package/dist/production-runtime/postprocess/ProductionPostProcessTypes.d.ts +1 -1
- package/dist/production-runtime/postprocess/SSAOPass.d.ts +2 -2
- package/dist/production-runtime/resources/RenderTarget.d.ts +1 -1
- package/dist/production-runtime/scene/RenderableMesh.d.ts +1 -1
- package/dist/production-runtime/scene/RenderableScene.d.ts +3 -3
- package/dist/shadows/CascadedShadowPipeline.d.ts +1 -1
- package/dist/shadows/ShadowDebugViews.d.ts +2 -2
- package/dist/threejs-example-parity/index.d.ts +4 -4
- package/dist/webgpu/WebGPUBuffer.d.ts +1 -1
- package/dist/webgpu/WebGPUCompute.d.ts +2 -2
- package/dist/webgpu/WebGPUPostProcess.d.ts +2 -2
- package/dist/webgpu/WebGPUTexture.d.ts +2 -2
- package/dist/webgpu.d.ts +3 -3
- package/package.json +3 -3
- package/dist/ArchitecturalLightingFixtures.d.ts +0 -40
- package/dist/ArchitecturalLightingFixtures.d.ts.map +0 -1
- package/dist/ArchitecturalLightingFixtures.js +0 -171
- package/dist/ArchitecturalLightingFixtures.js.map +0 -1
- package/dist/ArchitecturalMeasurementFixtures.d.ts +0 -30
- package/dist/ArchitecturalMeasurementFixtures.d.ts.map +0 -1
- package/dist/ArchitecturalMeasurementFixtures.js +0 -115
- package/dist/ArchitecturalMeasurementFixtures.js.map +0 -1
- package/dist/CanonicalSceneFixtures.d.ts +0 -13
- package/dist/CanonicalSceneFixtures.d.ts.map +0 -1
- package/dist/CanonicalSceneFixtures.js +0 -78
- package/dist/CanonicalSceneFixtures.js.map +0 -1
- package/dist/CullingFixtures.d.ts +0 -70
- package/dist/CullingFixtures.d.ts.map +0 -1
- package/dist/CullingFixtures.js +0 -191
- package/dist/CullingFixtures.js.map +0 -1
- package/dist/OceanFixtures.d.ts +0 -62
- package/dist/OceanFixtures.d.ts.map +0 -1
- package/dist/OceanFixtures.js +0 -240
- package/dist/OceanFixtures.js.map +0 -1
- package/dist/ProceduralTextureFixtures.d.ts +0 -27
- package/dist/ProceduralTextureFixtures.d.ts.map +0 -1
- package/dist/ProceduralTextureFixtures.js +0 -336
- package/dist/ProceduralTextureFixtures.js.map +0 -1
- package/dist/ProductTurntableFixtures.d.ts +0 -96
- package/dist/ProductTurntableFixtures.d.ts.map +0 -1
- package/dist/ProductTurntableFixtures.js +0 -639
- package/dist/ProductTurntableFixtures.js.map +0 -1
- package/dist/SpaceEnvironmentFixtures.d.ts +0 -59
- package/dist/SpaceEnvironmentFixtures.d.ts.map +0 -1
- package/dist/SpaceEnvironmentFixtures.js +0 -132
- package/dist/SpaceEnvironmentFixtures.js.map +0 -1
- package/dist/TerrainFixtures.d.ts +0 -60
- package/dist/TerrainFixtures.d.ts.map +0 -1
- package/dist/TerrainFixtures.js +0 -239
- package/dist/TerrainFixtures.js.map +0 -1
- package/dist/VegetationFixtures.d.ts +0 -68
- package/dist/VegetationFixtures.d.ts.map +0 -1
- package/dist/VegetationFixtures.js +0 -241
- package/dist/VegetationFixtures.js.map +0 -1
- package/dist/VoxelWorldFixtures.d.ts +0 -54
- package/dist/VoxelWorldFixtures.d.ts.map +0 -1
- package/dist/VoxelWorldFixtures.js +0 -186
- package/dist/VoxelWorldFixtures.js.map +0 -1
- package/dist/WeatherFixtures.d.ts +0 -46
- package/dist/WeatherFixtures.d.ts.map +0 -1
- package/dist/WeatherFixtures.js +0 -142
- package/dist/WeatherFixtures.js.map +0 -1
- package/dist/cartoon/CartoonMaterialStyle.d.ts +0 -19
- package/dist/cartoon/CartoonMaterialStyle.d.ts.map +0 -1
- package/dist/cartoon/CartoonMaterialStyle.js +0 -13
- package/dist/cartoon/CartoonMaterialStyle.js.map +0 -1
- package/dist/cartoon/CartoonRenderPreset.d.ts +0 -36
- package/dist/cartoon/CartoonRenderPreset.d.ts.map +0 -1
- package/dist/cartoon/CartoonRenderPreset.js +0 -23
- package/dist/cartoon/CartoonRenderPreset.js.map +0 -1
- package/dist/cartoon/CartoonToonMaterial.d.ts +0 -130
- package/dist/cartoon/CartoonToonMaterial.d.ts.map +0 -1
- package/dist/cartoon/CartoonToonMaterial.js +0 -303
- package/dist/cartoon/CartoonToonMaterial.js.map +0 -1
- package/dist/cartoon/CartoonVisualQuality.d.ts +0 -28
- package/dist/cartoon/CartoonVisualQuality.d.ts.map +0 -1
- package/dist/cartoon/CartoonVisualQuality.js +0 -39
- package/dist/cartoon/CartoonVisualQuality.js.map +0 -1
- package/dist/cartoon/applyCartoonRenderPreset.d.ts +0 -79
- package/dist/cartoon/applyCartoonRenderPreset.d.ts.map +0 -1
- package/dist/cartoon/applyCartoonRenderPreset.js +0 -88
- package/dist/cartoon/applyCartoonRenderPreset.js.map +0 -1
- package/dist/cartoon/index.d.ts +0 -6
- package/dist/cartoon/index.d.ts.map +0 -1
- package/dist/cartoon/index.js +0 -6
- package/dist/cartoon/index.js.map +0 -1
- package/dist/threejs-compatibility/InstancingSystem.d.ts +0 -10
- package/dist/threejs-compatibility/InstancingSystem.d.ts.map +0 -1
- package/dist/threejs-compatibility/InstancingSystem.js +0 -11
- package/dist/threejs-compatibility/InstancingSystem.js.map +0 -1
- package/dist/threejs-compatibility/LightingSystem.d.ts +0 -11
- package/dist/threejs-compatibility/LightingSystem.d.ts.map +0 -1
- package/dist/threejs-compatibility/LightingSystem.js +0 -14
- package/dist/threejs-compatibility/LightingSystem.js.map +0 -1
- package/dist/threejs-compatibility/MaterialSystem.d.ts +0 -6
- package/dist/threejs-compatibility/MaterialSystem.d.ts.map +0 -1
- package/dist/threejs-compatibility/MaterialSystem.js +0 -7
- package/dist/threejs-compatibility/MaterialSystem.js.map +0 -1
- package/dist/threejs-compatibility/RenderTargetSystem.d.ts +0 -16
- package/dist/threejs-compatibility/RenderTargetSystem.d.ts.map +0 -1
- package/dist/threejs-compatibility/RenderTargetSystem.js +0 -23
- package/dist/threejs-compatibility/RenderTargetSystem.js.map +0 -1
- package/dist/threejs-compatibility/RendererDiagnostics.d.ts +0 -27
- package/dist/threejs-compatibility/RendererDiagnostics.d.ts.map +0 -1
- package/dist/threejs-compatibility/RendererDiagnostics.js +0 -41
- package/dist/threejs-compatibility/RendererDiagnostics.js.map +0 -1
- package/dist/threejs-compatibility/SceneRenderer.d.ts +0 -19
- package/dist/threejs-compatibility/SceneRenderer.d.ts.map +0 -1
- package/dist/threejs-compatibility/SceneRenderer.js +0 -18
- package/dist/threejs-compatibility/SceneRenderer.js.map +0 -1
- package/dist/threejs-compatibility/ShadowSystem.d.ts +0 -11
- package/dist/threejs-compatibility/ShadowSystem.d.ts.map +0 -1
- package/dist/threejs-compatibility/ShadowSystem.js +0 -12
- package/dist/threejs-compatibility/ShadowSystem.js.map +0 -1
- package/dist/threejs-compatibility/TextureSystem.d.ts +0 -9
- package/dist/threejs-compatibility/TextureSystem.d.ts.map +0 -1
- package/dist/threejs-compatibility/TextureSystem.js +0 -14
- package/dist/threejs-compatibility/TextureSystem.js.map +0 -1
- package/dist/threejs-compatibility/ThreeCompatRenderer.d.ts +0 -37
- package/dist/threejs-compatibility/ThreeCompatRenderer.d.ts.map +0 -1
- package/dist/threejs-compatibility/ThreeCompatRenderer.js +0 -77
- package/dist/threejs-compatibility/ThreeCompatRenderer.js.map +0 -1
- package/dist/threejs-compatibility/TransparencySystem.d.ts +0 -11
- package/dist/threejs-compatibility/TransparencySystem.d.ts.map +0 -1
- package/dist/threejs-compatibility/TransparencySystem.js +0 -12
- package/dist/threejs-compatibility/TransparencySystem.js.map +0 -1
- package/dist/threejs-compatibility/index.d.ts +0 -25
- package/dist/threejs-compatibility/index.d.ts.map +0 -1
- package/dist/threejs-compatibility/index.js +0 -15
- package/dist/threejs-compatibility/index.js.map +0 -1
- package/dist/threejs-compatibility/performance/BVH.d.ts +0 -11
- package/dist/threejs-compatibility/performance/BVH.d.ts.map +0 -1
- package/dist/threejs-compatibility/performance/BVH.js +0 -10
- package/dist/threejs-compatibility/performance/BVH.js.map +0 -1
- package/dist/threejs-compatibility/performance/FrustumCulling.d.ts +0 -7
- package/dist/threejs-compatibility/performance/FrustumCulling.d.ts.map +0 -1
- package/dist/threejs-compatibility/performance/FrustumCulling.js +0 -5
- package/dist/threejs-compatibility/performance/FrustumCulling.js.map +0 -1
- package/dist/threejs-compatibility/performance/Instancing.d.ts +0 -7
- package/dist/threejs-compatibility/performance/Instancing.d.ts.map +0 -1
- package/dist/threejs-compatibility/performance/Instancing.js +0 -10
- package/dist/threejs-compatibility/performance/Instancing.js.map +0 -1
- package/dist/threejs-compatibility/performance/LODSystem.d.ts +0 -9
- package/dist/threejs-compatibility/performance/LODSystem.d.ts.map +0 -1
- package/dist/threejs-compatibility/performance/LODSystem.js +0 -11
- package/dist/threejs-compatibility/performance/LODSystem.js.map +0 -1
- package/dist/threejs-compatibility/performance/OcclusionCulling.d.ts +0 -3
- package/dist/threejs-compatibility/performance/OcclusionCulling.d.ts.map +0 -1
- package/dist/threejs-compatibility/performance/OcclusionCulling.js +0 -5
- package/dist/threejs-compatibility/performance/OcclusionCulling.js.map +0 -1
- package/dist/threejs-compatibility/performance/RaycastAcceleration.d.ts +0 -8
- package/dist/threejs-compatibility/performance/RaycastAcceleration.d.ts.map +0 -1
- package/dist/threejs-compatibility/performance/RaycastAcceleration.js +0 -11
- package/dist/threejs-compatibility/performance/RaycastAcceleration.js.map +0 -1
- package/dist/threejs-compatibility/performance/RendererProfiler.d.ts +0 -11
- package/dist/threejs-compatibility/performance/RendererProfiler.d.ts.map +0 -1
- package/dist/threejs-compatibility/performance/RendererProfiler.js +0 -10
- package/dist/threejs-compatibility/performance/RendererProfiler.js.map +0 -1
- package/dist/threejs-compatibility/performance/TextureStreaming.d.ts +0 -7
- package/dist/threejs-compatibility/performance/TextureStreaming.d.ts.map +0 -1
- package/dist/threejs-compatibility/performance/TextureStreaming.js +0 -10
- package/dist/threejs-compatibility/performance/TextureStreaming.js.map +0 -1
- package/dist/threejs-compatibility/performance/index.d.ts +0 -13
- package/dist/threejs-compatibility/performance/index.d.ts.map +0 -1
- package/dist/threejs-compatibility/performance/index.js +0 -9
- package/dist/threejs-compatibility/performance/index.js.map +0 -1
- package/dist/threejs-compatibility/postprocess/BloomPass.d.ts +0 -9
- package/dist/threejs-compatibility/postprocess/BloomPass.d.ts.map +0 -1
- package/dist/threejs-compatibility/postprocess/BloomPass.js +0 -14
- package/dist/threejs-compatibility/postprocess/BloomPass.js.map +0 -1
- package/dist/threejs-compatibility/postprocess/ColorGradingPass.d.ts +0 -10
- package/dist/threejs-compatibility/postprocess/ColorGradingPass.d.ts.map +0 -1
- package/dist/threejs-compatibility/postprocess/ColorGradingPass.js +0 -16
- package/dist/threejs-compatibility/postprocess/ColorGradingPass.js.map +0 -1
- package/dist/threejs-compatibility/postprocess/DepthOfFieldPass.d.ts +0 -9
- package/dist/threejs-compatibility/postprocess/DepthOfFieldPass.d.ts.map +0 -1
- package/dist/threejs-compatibility/postprocess/DepthOfFieldPass.js +0 -19
- package/dist/threejs-compatibility/postprocess/DepthOfFieldPass.js.map +0 -1
- package/dist/threejs-compatibility/postprocess/EffectComposer.d.ts +0 -7
- package/dist/threejs-compatibility/postprocess/EffectComposer.d.ts.map +0 -1
- package/dist/threejs-compatibility/postprocess/EffectComposer.js +0 -11
- package/dist/threejs-compatibility/postprocess/EffectComposer.js.map +0 -1
- package/dist/threejs-compatibility/postprocess/FXAAPass.d.ts +0 -7
- package/dist/threejs-compatibility/postprocess/FXAAPass.d.ts.map +0 -1
- package/dist/threejs-compatibility/postprocess/FXAAPass.js +0 -10
- package/dist/threejs-compatibility/postprocess/FXAAPass.js.map +0 -1
- package/dist/threejs-compatibility/postprocess/MotionBlurPass.d.ts +0 -9
- package/dist/threejs-compatibility/postprocess/MotionBlurPass.d.ts.map +0 -1
- package/dist/threejs-compatibility/postprocess/MotionBlurPass.js +0 -18
- package/dist/threejs-compatibility/postprocess/MotionBlurPass.js.map +0 -1
- package/dist/threejs-compatibility/postprocess/OutlinePass.d.ts +0 -9
- package/dist/threejs-compatibility/postprocess/OutlinePass.d.ts.map +0 -1
- package/dist/threejs-compatibility/postprocess/OutlinePass.js +0 -19
- package/dist/threejs-compatibility/postprocess/OutlinePass.js.map +0 -1
- package/dist/threejs-compatibility/postprocess/PostProcessTypes.d.ts +0 -42
- package/dist/threejs-compatibility/postprocess/PostProcessTypes.d.ts.map +0 -1
- package/dist/threejs-compatibility/postprocess/PostProcessTypes.js +0 -123
- package/dist/threejs-compatibility/postprocess/PostProcessTypes.js.map +0 -1
- package/dist/threejs-compatibility/postprocess/RenderPass.d.ts +0 -7
- package/dist/threejs-compatibility/postprocess/RenderPass.d.ts.map +0 -1
- package/dist/threejs-compatibility/postprocess/RenderPass.js +0 -8
- package/dist/threejs-compatibility/postprocess/RenderPass.js.map +0 -1
- package/dist/threejs-compatibility/postprocess/SMAAPass.d.ts +0 -7
- package/dist/threejs-compatibility/postprocess/SMAAPass.d.ts.map +0 -1
- package/dist/threejs-compatibility/postprocess/SMAAPass.js +0 -10
- package/dist/threejs-compatibility/postprocess/SMAAPass.js.map +0 -1
- package/dist/threejs-compatibility/postprocess/SSAOPass.d.ts +0 -9
- package/dist/threejs-compatibility/postprocess/SSAOPass.d.ts.map +0 -1
- package/dist/threejs-compatibility/postprocess/SSAOPass.js +0 -19
- package/dist/threejs-compatibility/postprocess/SSAOPass.js.map +0 -1
- package/dist/threejs-compatibility/postprocess/ShaderPass.d.ts +0 -9
- package/dist/threejs-compatibility/postprocess/ShaderPass.d.ts.map +0 -1
- package/dist/threejs-compatibility/postprocess/ShaderPass.js +0 -11
- package/dist/threejs-compatibility/postprocess/ShaderPass.js.map +0 -1
- package/dist/threejs-compatibility/postprocess/TAAPass.d.ts +0 -7
- package/dist/threejs-compatibility/postprocess/TAAPass.d.ts.map +0 -1
- package/dist/threejs-compatibility/postprocess/TAAPass.js +0 -10
- package/dist/threejs-compatibility/postprocess/TAAPass.js.map +0 -1
- package/dist/threejs-compatibility/postprocess/VignettePass.d.ts +0 -9
- package/dist/threejs-compatibility/postprocess/VignettePass.d.ts.map +0 -1
- package/dist/threejs-compatibility/postprocess/VignettePass.js +0 -14
- package/dist/threejs-compatibility/postprocess/VignettePass.js.map +0 -1
- package/dist/threejs-compatibility/postprocess/index.d.ts +0 -16
- package/dist/threejs-compatibility/postprocess/index.d.ts.map +0 -1
- package/dist/threejs-compatibility/postprocess/index.js +0 -15
- package/dist/threejs-compatibility/postprocess/index.js.map +0 -1
- package/dist/threejs-compatibility/shaders/NodeMaterial.d.ts +0 -14
- package/dist/threejs-compatibility/shaders/NodeMaterial.d.ts.map +0 -1
- package/dist/threejs-compatibility/shaders/NodeMaterial.js +0 -15
- package/dist/threejs-compatibility/shaders/NodeMaterial.js.map +0 -1
- package/dist/threejs-compatibility/shaders/RawShaderMaterial.d.ts +0 -6
- package/dist/threejs-compatibility/shaders/RawShaderMaterial.d.ts.map +0 -1
- package/dist/threejs-compatibility/shaders/RawShaderMaterial.js +0 -6
- package/dist/threejs-compatibility/shaders/RawShaderMaterial.js.map +0 -1
- package/dist/threejs-compatibility/shaders/ShaderDiagnostics.d.ts +0 -7
- package/dist/threejs-compatibility/shaders/ShaderDiagnostics.d.ts.map +0 -1
- package/dist/threejs-compatibility/shaders/ShaderDiagnostics.js +0 -12
- package/dist/threejs-compatibility/shaders/ShaderDiagnostics.js.map +0 -1
- package/dist/threejs-compatibility/shaders/ShaderMaterial.d.ts +0 -12
- package/dist/threejs-compatibility/shaders/ShaderMaterial.d.ts.map +0 -1
- package/dist/threejs-compatibility/shaders/ShaderMaterial.js +0 -20
- package/dist/threejs-compatibility/shaders/ShaderMaterial.js.map +0 -1
- package/dist/threejs-compatibility/shaders/ThreeCompatShaderChunks.d.ts +0 -7
- package/dist/threejs-compatibility/shaders/ThreeCompatShaderChunks.d.ts.map +0 -1
- package/dist/threejs-compatibility/shaders/ThreeCompatShaderChunks.js +0 -7
- package/dist/threejs-compatibility/shaders/ThreeCompatShaderChunks.js.map +0 -1
- package/dist/threejs-compatibility/shaders/Uniforms.d.ts +0 -8
- package/dist/threejs-compatibility/shaders/Uniforms.d.ts.map +0 -1
- package/dist/threejs-compatibility/shaders/Uniforms.js +0 -14
- package/dist/threejs-compatibility/shaders/Uniforms.js.map +0 -1
- package/dist/threejs-compatibility/shaders/index.d.ts +0 -10
- package/dist/threejs-compatibility/shaders/index.d.ts.map +0 -1
- package/dist/threejs-compatibility/shaders/index.js +0 -7
- package/dist/threejs-compatibility/shaders/index.js.map +0 -1
- package/dist/threejs-compatibility/vfx/GPUPointCloud.d.ts +0 -7
- package/dist/threejs-compatibility/vfx/GPUPointCloud.d.ts.map +0 -1
- package/dist/threejs-compatibility/vfx/GPUPointCloud.js +0 -12
- package/dist/threejs-compatibility/vfx/GPUPointCloud.js.map +0 -1
- package/dist/threejs-compatibility/vfx/LineRenderer.d.ts +0 -10
- package/dist/threejs-compatibility/vfx/LineRenderer.d.ts.map +0 -1
- package/dist/threejs-compatibility/vfx/LineRenderer.js +0 -7
- package/dist/threejs-compatibility/vfx/LineRenderer.js.map +0 -1
- package/dist/threejs-compatibility/vfx/ParticleSystem.d.ts +0 -12
- package/dist/threejs-compatibility/vfx/ParticleSystem.d.ts.map +0 -1
- package/dist/threejs-compatibility/vfx/ParticleSystem.js +0 -15
- package/dist/threejs-compatibility/vfx/ParticleSystem.js.map +0 -1
- package/dist/threejs-compatibility/vfx/SpriteSystem.d.ts +0 -11
- package/dist/threejs-compatibility/vfx/SpriteSystem.d.ts.map +0 -1
- package/dist/threejs-compatibility/vfx/SpriteSystem.js +0 -7
- package/dist/threejs-compatibility/vfx/SpriteSystem.js.map +0 -1
- package/dist/threejs-compatibility/vfx/TrailRenderer.d.ts +0 -5
- package/dist/threejs-compatibility/vfx/TrailRenderer.d.ts.map +0 -1
- package/dist/threejs-compatibility/vfx/TrailRenderer.js +0 -9
- package/dist/threejs-compatibility/vfx/TrailRenderer.js.map +0 -1
- package/dist/threejs-compatibility/vfx/VFXDiagnostics.d.ts +0 -21
- package/dist/threejs-compatibility/vfx/VFXDiagnostics.d.ts.map +0 -1
- package/dist/threejs-compatibility/vfx/VFXDiagnostics.js +0 -12
- package/dist/threejs-compatibility/vfx/VFXDiagnostics.js.map +0 -1
- package/dist/threejs-compatibility/vfx/index.d.ts +0 -10
- package/dist/threejs-compatibility/vfx/index.d.ts.map +0 -1
- package/dist/threejs-compatibility/vfx/index.js +0 -7
- package/dist/threejs-compatibility/vfx/index.js.map +0 -1
- package/dist/webgpu-device-entry.d.ts +0 -25
- package/dist/webgpu-device-entry.d.ts.map +0 -1
- package/dist/webgpu-device-entry.js +0 -24
- package/dist/webgpu-device-entry.js.map +0 -1
|
@@ -1,639 +0,0 @@
|
|
|
1
|
-
import { Geometry } from "./Geometry.js";
|
|
2
|
-
import { PBRMaterial } from "./PBRMaterial.js";
|
|
3
|
-
import { createProceduralTexture } from "./ProceduralTextureFixtures.js";
|
|
4
|
-
import { Sampler } from "./Sampler.js";
|
|
5
|
-
import { TexturedPBRMaterial } from "./TexturedPBRMaterial.js";
|
|
6
|
-
import { TexturedUnlitMaterial } from "./TexturedUnlitMaterial.js";
|
|
7
|
-
import { UnlitMaterial } from "./UnlitMaterial.js";
|
|
8
|
-
import { createExternalParityEnvironmentLighting } from "./ExternalParityRenderPreset.js";
|
|
9
|
-
import { DirectionalLight } from "@aura3d/scene";
|
|
10
|
-
const sourceFiles = [
|
|
11
|
-
"master:src/ecommerce/turntable/TurntableController.ts",
|
|
12
|
-
"master:src/ecommerce/turntable/HotspotManager.ts",
|
|
13
|
-
"master:src/ecommerce/turntable/LightingPresetManager.ts",
|
|
14
|
-
"master:src/ecommerce/turntable/CaptureManager.ts",
|
|
15
|
-
"master:src/ecommerce/turntable/BatchProcessor.ts",
|
|
16
|
-
"master:src/ecommerce/turntable/ARExporter.ts"
|
|
17
|
-
];
|
|
18
|
-
const lightingPresets = {
|
|
19
|
-
studio: {
|
|
20
|
-
activeLightCount: 4,
|
|
21
|
-
ambientIntensity: 0.2,
|
|
22
|
-
keyIntensity: 1.5,
|
|
23
|
-
fillIntensity: 0.5,
|
|
24
|
-
rimIntensity: 0.8,
|
|
25
|
-
environmentIntensity: 1,
|
|
26
|
-
shadowEnabled: true,
|
|
27
|
-
shadowSoftness: 0.5
|
|
28
|
-
},
|
|
29
|
-
soft: {
|
|
30
|
-
activeLightCount: 4,
|
|
31
|
-
ambientIntensity: 0.5,
|
|
32
|
-
keyIntensity: 0.8,
|
|
33
|
-
fillIntensity: 0.8,
|
|
34
|
-
rimIntensity: 0.4,
|
|
35
|
-
environmentIntensity: 0.85,
|
|
36
|
-
shadowEnabled: false,
|
|
37
|
-
shadowSoftness: 1
|
|
38
|
-
},
|
|
39
|
-
inspection: {
|
|
40
|
-
activeLightCount: 3,
|
|
41
|
-
ambientIntensity: 0.32,
|
|
42
|
-
keyIntensity: 1.15,
|
|
43
|
-
fillIntensity: 0.65,
|
|
44
|
-
rimIntensity: 0.35,
|
|
45
|
-
environmentIntensity: 1.05,
|
|
46
|
-
shadowEnabled: true,
|
|
47
|
-
shadowSoftness: 0.35
|
|
48
|
-
},
|
|
49
|
-
dramatic: {
|
|
50
|
-
activeLightCount: 3,
|
|
51
|
-
ambientIntensity: 0.05,
|
|
52
|
-
keyIntensity: 2.5,
|
|
53
|
-
fillIntensity: 0.12,
|
|
54
|
-
rimIntensity: 1.2,
|
|
55
|
-
environmentIntensity: 0.7,
|
|
56
|
-
shadowEnabled: true,
|
|
57
|
-
shadowSoftness: 0.1
|
|
58
|
-
},
|
|
59
|
-
neutral: {
|
|
60
|
-
activeLightCount: 4,
|
|
61
|
-
ambientIntensity: 0.3,
|
|
62
|
-
keyIntensity: 1,
|
|
63
|
-
fillIntensity: 0.6,
|
|
64
|
-
rimIntensity: 0.3,
|
|
65
|
-
environmentIntensity: 1,
|
|
66
|
-
shadowEnabled: true,
|
|
67
|
-
shadowSoftness: 0.5
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
export function createProductTurntableFixture(options = {}) {
|
|
71
|
-
const elapsedSeconds = finiteOrDefault(options.elapsedSeconds, 0, "elapsedSeconds");
|
|
72
|
-
const interactionCount = integerOrDefault(options.interactionCount, 0, "interactionCount");
|
|
73
|
-
const interactionAgeMs = finiteOrDefault(options.interactionAgeMs, Number.POSITIVE_INFINITY, "interactionAgeMs");
|
|
74
|
-
const canvasWidth = Math.max(320, integerOrDefault(options.canvasWidth, 960, "canvasWidth"));
|
|
75
|
-
const canvasHeight = Math.max(240, integerOrDefault(options.canvasHeight, 540, "canvasHeight"));
|
|
76
|
-
const lightingPreset = options.lightingPreset ?? "studio";
|
|
77
|
-
const speedRadiansPerSecond = Math.PI / 8;
|
|
78
|
-
const resumeDelayMs = 2_000;
|
|
79
|
-
const transitionDurationSeconds = 0.5;
|
|
80
|
-
const pausedByInteraction = interactionCount > 0 && interactionAgeMs < resumeDelayMs;
|
|
81
|
-
const resumeBlend = pausedByInteraction ? 0 : Math.min(1, Math.max(0, (interactionAgeMs - resumeDelayMs) / (transitionDurationSeconds * 1000)));
|
|
82
|
-
const currentSpeedRadiansPerSecond = Number((speedRadiansPerSecond * resumeBlend).toFixed(4));
|
|
83
|
-
const rotationRadians = Number(((elapsedSeconds * speedRadiansPerSecond) % (Math.PI * 2)).toFixed(4));
|
|
84
|
-
const hotspots = createHotspots(rotationRadians, canvasWidth, canvasHeight);
|
|
85
|
-
const visibleHotspotCount = hotspots.filter((hotspot) => hotspot.screen.visible).length;
|
|
86
|
-
const capture = createCapturePlan(Boolean(options.captureRequested), Math.max(0, integerOrDefault(options.exportedBytes, 0, "exportedBytes")));
|
|
87
|
-
const lighting = createLighting(lightingPreset);
|
|
88
|
-
const hash = hashProductTurntable([
|
|
89
|
-
rotationRadians,
|
|
90
|
-
currentSpeedRadiansPerSecond,
|
|
91
|
-
visibleHotspotCount,
|
|
92
|
-
lighting.activeLightCount,
|
|
93
|
-
lighting.environmentIntensity,
|
|
94
|
-
capture.completedBatchTasks,
|
|
95
|
-
capture.exportedBytes
|
|
96
|
-
]);
|
|
97
|
-
return {
|
|
98
|
-
id: "external-product-turntable-fixture",
|
|
99
|
-
source: "origin-master-ecommerce-turntable-adapted",
|
|
100
|
-
sourceFiles,
|
|
101
|
-
autoRotate: true,
|
|
102
|
-
speedRadiansPerSecond,
|
|
103
|
-
direction: "cw",
|
|
104
|
-
pauseOnInteraction: true,
|
|
105
|
-
resumeDelayMs,
|
|
106
|
-
smoothTransition: true,
|
|
107
|
-
transitionDurationSeconds,
|
|
108
|
-
currentSpeedRadiansPerSecond,
|
|
109
|
-
rotationRadians,
|
|
110
|
-
pausedByInteraction,
|
|
111
|
-
interactionCount,
|
|
112
|
-
hotspots,
|
|
113
|
-
visibleHotspotCount,
|
|
114
|
-
lighting,
|
|
115
|
-
capture,
|
|
116
|
-
manifestHash: hash,
|
|
117
|
-
claimBoundary: "This fixture adapts old ecommerce turntable concepts into deterministic external product evidence. It does not claim a complete ecommerce pipeline, native USDZ export, video capture, PIM integration, or AR platform parity."
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
export function createProductTurntableRenderKit(options = {}) {
|
|
121
|
-
const fixture = createProductTurntableFixture(options);
|
|
122
|
-
const environment = createExternalParityEnvironmentLighting(productTurntableEnvironmentPreset(fixture.lighting.activePreset));
|
|
123
|
-
const sampler = new Sampler({ minFilter: "linear-mipmap-linear", magFilter: "linear", addressU: "repeat", addressV: "repeat" });
|
|
124
|
-
const detailSampler = new Sampler({ minFilter: "linear", magFilter: "linear", addressU: "repeat", addressV: "repeat" });
|
|
125
|
-
const textures = [
|
|
126
|
-
createProceduralTexture("metallic-paint", { width: 128, height: 128 }),
|
|
127
|
-
createProceduralTexture("carbon-fiber", { width: 128, height: 128 }),
|
|
128
|
-
createProceduralTexture("metallic-roughness-map", { width: 128, height: 128 }),
|
|
129
|
-
createProceduralTexture("normal-from-height", { width: 128, height: 128 }),
|
|
130
|
-
createProceduralTexture("sci-fi-panel", { width: 128, height: 128 }),
|
|
131
|
-
createProceduralTexture("concrete-asphalt", { width: 128, height: 128 }),
|
|
132
|
-
createProceduralTexture("racing-stripes", { width: 128, height: 128 })
|
|
133
|
-
];
|
|
134
|
-
const [paint, carbon, metallicRoughness, normal, panel, concrete, accentStripes] = textures;
|
|
135
|
-
const geometryLibrary = new Map([
|
|
136
|
-
["ear-shell", Geometry.capsule({ radius: 0.34, height: 0.9, segments: 64, rings: 16, textured: true })],
|
|
137
|
-
["ear-pad", Geometry.uvSphere(0.42, 64, 32, { textured: true })],
|
|
138
|
-
["headband", Geometry.texturedCube(1)],
|
|
139
|
-
["control", Geometry.texturedCube(1)],
|
|
140
|
-
["accent", Geometry.uvSphere(0.18, 48, 24, { textured: true })],
|
|
141
|
-
["stage", Geometry.texturedCube(1)]
|
|
142
|
-
]);
|
|
143
|
-
const materialLibrary = new Map([
|
|
144
|
-
["painted-shell", new TexturedPBRMaterial({
|
|
145
|
-
name: "turntable-painted-metal-shell",
|
|
146
|
-
baseColor: [0.48, 0.5, 0.52, 1],
|
|
147
|
-
metallic: 0.62,
|
|
148
|
-
roughness: 0.32,
|
|
149
|
-
metallicRoughnessTexture: metallicRoughness,
|
|
150
|
-
metallicRoughnessSampler: sampler,
|
|
151
|
-
normalTexture: normal,
|
|
152
|
-
normalSampler: detailSampler,
|
|
153
|
-
normalScale: 0.12,
|
|
154
|
-
clearcoatFactor: 0.34,
|
|
155
|
-
clearcoatRoughnessFactor: 0.22
|
|
156
|
-
})],
|
|
157
|
-
["carbon-pad", new TexturedPBRMaterial({
|
|
158
|
-
name: "turntable-carbon-cushion",
|
|
159
|
-
baseColor: [0.08, 0.09, 0.11, 1],
|
|
160
|
-
metallic: 0.08,
|
|
161
|
-
roughness: 0.64,
|
|
162
|
-
baseColorTexture: carbon,
|
|
163
|
-
baseColorSampler: sampler,
|
|
164
|
-
normalTexture: normal,
|
|
165
|
-
normalSampler: detailSampler,
|
|
166
|
-
normalScale: 0.22
|
|
167
|
-
})],
|
|
168
|
-
["brushed-trim", new PBRMaterial({
|
|
169
|
-
name: "turntable-brushed-trim",
|
|
170
|
-
baseColor: [0.86, 0.82, 0.72, 1],
|
|
171
|
-
metallic: 1,
|
|
172
|
-
roughness: 0.19,
|
|
173
|
-
specularFactor: 1
|
|
174
|
-
})],
|
|
175
|
-
["control-panel", new TexturedPBRMaterial({
|
|
176
|
-
name: "turntable-control-panel",
|
|
177
|
-
baseColor: [0.16, 0.42, 0.58, 1],
|
|
178
|
-
metallic: 0.18,
|
|
179
|
-
roughness: 0.38,
|
|
180
|
-
baseColorTexture: panel,
|
|
181
|
-
baseColorSampler: sampler,
|
|
182
|
-
normalTexture: normal,
|
|
183
|
-
normalSampler: detailSampler,
|
|
184
|
-
normalScale: 0.16,
|
|
185
|
-
emissiveColor: [0.01, 0.12, 0.16],
|
|
186
|
-
emissiveStrength: 0.18
|
|
187
|
-
})],
|
|
188
|
-
["status-light", new PBRMaterial({
|
|
189
|
-
name: "turntable-status-light",
|
|
190
|
-
baseColor: [0.18, 0.92, 1, 1],
|
|
191
|
-
metallic: 0,
|
|
192
|
-
roughness: 0.18,
|
|
193
|
-
emissiveColor: [0.06, 0.72, 1],
|
|
194
|
-
emissiveStrength: 1.4
|
|
195
|
-
})],
|
|
196
|
-
["amber-status-light", new PBRMaterial({
|
|
197
|
-
name: "turntable-amber-status-light",
|
|
198
|
-
baseColor: [1, 0.62, 0.12, 1],
|
|
199
|
-
metallic: 0,
|
|
200
|
-
roughness: 0.2,
|
|
201
|
-
emissiveColor: [1, 0.36, 0.06],
|
|
202
|
-
emissiveStrength: 0.9
|
|
203
|
-
})],
|
|
204
|
-
["magenta-status-light", new PBRMaterial({
|
|
205
|
-
name: "turntable-magenta-status-light",
|
|
206
|
-
baseColor: [0.94, 0.16, 0.86, 1],
|
|
207
|
-
metallic: 0,
|
|
208
|
-
roughness: 0.2,
|
|
209
|
-
emissiveColor: [0.56, 0.04, 0.5],
|
|
210
|
-
emissiveStrength: 0.82
|
|
211
|
-
})],
|
|
212
|
-
["studio-stage", new TexturedUnlitMaterial({
|
|
213
|
-
name: "turntable-studio-stage",
|
|
214
|
-
texture: concrete,
|
|
215
|
-
sampler,
|
|
216
|
-
textureTransform: { scale: [7.5, 3.75] },
|
|
217
|
-
color: [0.18, 0.2, 0.22, 1]
|
|
218
|
-
})],
|
|
219
|
-
["studio-backdrop", new UnlitMaterial({
|
|
220
|
-
name: "turntable-studio-backdrop",
|
|
221
|
-
color: [0.018, 0.023, 0.03, 1]
|
|
222
|
-
})],
|
|
223
|
-
["studio-accent-stripe", new TexturedUnlitMaterial({
|
|
224
|
-
name: "turntable-studio-accent-stripe",
|
|
225
|
-
texture: accentStripes,
|
|
226
|
-
sampler,
|
|
227
|
-
textureTransform: { scale: [2.8, 0.8] },
|
|
228
|
-
color: [0.72, 0.62, 0.42, 1]
|
|
229
|
-
})],
|
|
230
|
-
["paint-finish-reference", new TexturedUnlitMaterial({
|
|
231
|
-
name: "turntable-metallic-paint-finish-reference",
|
|
232
|
-
texture: paint,
|
|
233
|
-
sampler,
|
|
234
|
-
textureTransform: { scale: [2.4, 0.8] },
|
|
235
|
-
color: [0.2, 0.12, 0.1, 1]
|
|
236
|
-
})],
|
|
237
|
-
["studio-softbox", new UnlitMaterial({
|
|
238
|
-
name: "turntable-studio-softbox-panel",
|
|
239
|
-
color: [0.1, 0.12, 0.14, 1]
|
|
240
|
-
})],
|
|
241
|
-
["dark-detail-line", new UnlitMaterial({
|
|
242
|
-
name: "turntable-dark-detail-line",
|
|
243
|
-
color: [0.018, 0.022, 0.026, 1]
|
|
244
|
-
})],
|
|
245
|
-
["cyan-detail-line", new UnlitMaterial({
|
|
246
|
-
name: "turntable-cyan-detail-line",
|
|
247
|
-
color: [0.08, 0.34, 0.38, 1]
|
|
248
|
-
})],
|
|
249
|
-
["warm-detail-line", new UnlitMaterial({
|
|
250
|
-
name: "turntable-warm-detail-line",
|
|
251
|
-
color: [0.52, 0.31, 0.18, 1]
|
|
252
|
-
})]
|
|
253
|
-
]);
|
|
254
|
-
const angle = fixture.rotationRadians;
|
|
255
|
-
const includeStage = options.includeStage !== false;
|
|
256
|
-
const collectedLights = createProductTurntableCollectedLights(fixture.lighting);
|
|
257
|
-
const renderItems = [
|
|
258
|
-
item(geometryLibrary, materialLibrary, "left-ear-shell", "ear-shell", "painted-shell", -0.56, 0.1, 0, 0.82, 1.08, 0.64, angle),
|
|
259
|
-
item(geometryLibrary, materialLibrary, "right-ear-shell", "ear-shell", "painted-shell", 0.56, 0.1, 0, 0.82, 1.08, 0.64, angle),
|
|
260
|
-
item(geometryLibrary, materialLibrary, "left-ear-pad", "ear-pad", "carbon-pad", -0.56, -0.02, 0.08, 0.56, 0.72, 0.26, angle),
|
|
261
|
-
item(geometryLibrary, materialLibrary, "right-ear-pad", "ear-pad", "carbon-pad", 0.56, -0.02, 0.08, 0.56, 0.72, 0.26, angle),
|
|
262
|
-
item(geometryLibrary, materialLibrary, "outer-headband", "headband", "brushed-trim", 0, 0.75, -0.05, 1.52, 0.14, 0.22, angle),
|
|
263
|
-
item(geometryLibrary, materialLibrary, "inner-headband", "headband", "carbon-pad", 0, 0.56, 0.02, 1.16, 0.1, 0.18, angle),
|
|
264
|
-
item(geometryLibrary, materialLibrary, "left-yoke", "headband", "brushed-trim", -0.54, 0.45, 0, 0.16, 0.64, 0.16, angle),
|
|
265
|
-
item(geometryLibrary, materialLibrary, "right-yoke", "headband", "brushed-trim", 0.54, 0.45, 0, 0.16, 0.64, 0.16, angle),
|
|
266
|
-
item(geometryLibrary, materialLibrary, "control-module", "control", "control-panel", 0.82, 0.04, 0.16, 0.18, 0.34, 0.12, angle),
|
|
267
|
-
item(geometryLibrary, materialLibrary, "status-light", "accent", "status-light", 0.91, 0.08, 0.28, 0.16, 0.16, 0.16, angle),
|
|
268
|
-
item(geometryLibrary, materialLibrary, "left-amber-accent", "accent", "amber-status-light", -0.96, 0.16, 0.24, 0.1, 0.1, 0.1, angle),
|
|
269
|
-
item(geometryLibrary, materialLibrary, "right-magenta-accent", "accent", "magenta-status-light", 0.36, -0.34, 0.3, 0.1, 0.1, 0.1, angle)
|
|
270
|
-
];
|
|
271
|
-
for (const side of [-1, 1]) {
|
|
272
|
-
for (let index = 0; index < 5; index += 1) {
|
|
273
|
-
renderItems.push(item(geometryLibrary, materialLibrary, `ear-pad-stitch-${side}-${index}`, "headband", index % 2 === 0 ? "dark-detail-line" : "cyan-detail-line", side * 0.56, -0.24 + index * 0.085, -0.22, 0.46, 0.014, 0.012, angle));
|
|
274
|
-
}
|
|
275
|
-
for (let index = 0; index < 7; index += 1) {
|
|
276
|
-
renderItems.push(item(geometryLibrary, materialLibrary, `ear-pad-vertical-stitch-${side}-${index}`, "headband", index % 2 === 0 ? "dark-detail-line" : "cyan-detail-line", side * (0.34 + index * 0.075), -0.04, -0.235, 0.012, 0.43, 0.012, angle));
|
|
277
|
-
}
|
|
278
|
-
for (let index = 0; index < 4; index += 1) {
|
|
279
|
-
renderItems.push(item(geometryLibrary, materialLibrary, `shell-highlight-strake-${side}-${index}`, "headband", index % 2 === 0 ? "warm-detail-line" : "dark-detail-line", side * (0.56 + index * 0.035), 0.22 + index * 0.078, -0.24, 0.34 - index * 0.035, 0.012, 0.012, angle));
|
|
280
|
-
}
|
|
281
|
-
for (let index = 0; index < 7; index += 1) {
|
|
282
|
-
renderItems.push(item(geometryLibrary, materialLibrary, `shell-machined-vertical-${side}-${index}`, "headband", index % 2 === 0 ? "warm-detail-line" : "dark-detail-line", side * (0.31 + index * 0.07), 0.25, -0.245, 0.012, 0.58, 0.012, angle));
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
for (let index = 0; index < 7; index += 1) {
|
|
286
|
-
renderItems.push(item(geometryLibrary, materialLibrary, `headband-machined-groove-${index}`, "headband", index % 2 === 0 ? "dark-detail-line" : "cyan-detail-line", -0.58 + index * 0.19, 0.78, -0.24, 0.08, 0.016, 0.012, angle));
|
|
287
|
-
}
|
|
288
|
-
for (let index = 0; index < 6; index += 1) {
|
|
289
|
-
renderItems.push(item(geometryLibrary, materialLibrary, `control-module-ridge-${index}`, "headband", index % 2 === 0 ? "cyan-detail-line" : "dark-detail-line", 0.78, -0.08 + index * 0.052, -0.26, 0.16, 0.01, 0.01, angle));
|
|
290
|
-
}
|
|
291
|
-
for (let index = 0; index < 6; index += 1) {
|
|
292
|
-
renderItems.push(item(geometryLibrary, materialLibrary, `control-module-vertical-grille-${index}`, "headband", index % 2 === 0 ? "cyan-detail-line" : "dark-detail-line", 0.72 + index * 0.035, 0.06, -0.275, 0.01, 0.34, 0.01, angle));
|
|
293
|
-
}
|
|
294
|
-
if (includeStage) {
|
|
295
|
-
renderItems.push(item(geometryLibrary, materialLibrary, "full-studio-backdrop", "stage", "studio-backdrop", 0, 0.18, -1.48, 7.8, 4.35, 0.05, 0), item(geometryLibrary, materialLibrary, "studio-stage", "stage", "studio-stage", 0, -0.62, -0.42, 4.4, 0.08, 0.16, 0), item(geometryLibrary, materialLibrary, "backdrop", "stage", "studio-backdrop", 0, 0.18, -1.12, 4.4, 2.25, 0.05, 0), item(geometryLibrary, materialLibrary, "stage-accent-stripe-left", "stage", "studio-accent-stripe", -1.04, -0.51, -0.34, 1.18, 0.035, 0.035, 0), item(geometryLibrary, materialLibrary, "stage-accent-stripe-right", "stage", "studio-accent-stripe", 1.04, -0.51, -0.34, 1.18, 0.035, 0.035, 0), item(geometryLibrary, materialLibrary, "left-softbox-panel", "stage", "studio-softbox", -1.78, 0.22, -0.94, 0.12, 1.16, 0.04, 0), item(geometryLibrary, materialLibrary, "right-softbox-panel", "stage", "studio-softbox", 1.78, 0.22, -0.94, 0.12, 1.16, 0.04, 0), item(geometryLibrary, materialLibrary, "top-softbox-panel", "stage", "studio-softbox", 0, 1.08, -0.94, 1.52, 0.07, 0.04, 0));
|
|
296
|
-
appendTurntableStageDetails(renderItems, geometryLibrary, materialLibrary);
|
|
297
|
-
}
|
|
298
|
-
const postprocess = {
|
|
299
|
-
targetFormat: "rgba16f",
|
|
300
|
-
toneMapping: {
|
|
301
|
-
operator: "filmic",
|
|
302
|
-
exposure: fixture.lighting.activePreset === "dramatic" ? 1.32 : 1.12,
|
|
303
|
-
gamma: 2.2,
|
|
304
|
-
inputColorSpace: "linear",
|
|
305
|
-
outputColorSpace: "srgb"
|
|
306
|
-
},
|
|
307
|
-
colorGrade: {
|
|
308
|
-
contrast: 1.1,
|
|
309
|
-
saturation: 1.08,
|
|
310
|
-
vibrance: 0.16,
|
|
311
|
-
vignette: 0.12,
|
|
312
|
-
sharpening: 0.28
|
|
313
|
-
},
|
|
314
|
-
bloom: { threshold: 0.78, intensity: 0.12, radius: 1 },
|
|
315
|
-
fxaa: true
|
|
316
|
-
};
|
|
317
|
-
const source = {
|
|
318
|
-
renderItems,
|
|
319
|
-
cameraPolicy: "auto-frame",
|
|
320
|
-
cameraFrameBounds: { min: [-1.35, -0.52, -0.38], max: [1.35, 1, 0.42] },
|
|
321
|
-
collectedLights,
|
|
322
|
-
// `ambientIntensity` and `environmentIntensity` are preset properties, so they must reach
|
|
323
|
-
// the frame the renderer actually samples. In this renderer the ambient term *is*
|
|
324
|
-
// `environmentLighting.intensity`, so the preset's ambient drives that directly rather
|
|
325
|
-
// than being approximated by an extra directional light. The bundle returned by
|
|
326
|
-
// `createExternalParityEnvironmentLighting` is cached and shared across callers, so both
|
|
327
|
-
// values are applied to a copy rather than mutated in place.
|
|
328
|
-
environmentLighting: applyPresetEnvironmentLighting(environment.lighting, fixture.lighting.ambientIntensity, fixture.lighting.environmentIntensity),
|
|
329
|
-
shadow: {
|
|
330
|
-
// `shadowEnabled`/`shadowSoftness` are preset properties, so a preset that declares
|
|
331
|
-
// shadows off (soft) must actually render without them, and a hard-shadow preset
|
|
332
|
-
// (dramatic, softness 0.1) must not use the same PCF radius as a diffuse one.
|
|
333
|
-
enabled: fixture.lighting.shadowEnabled,
|
|
334
|
-
light: collectedLights[0]?.source,
|
|
335
|
-
size: 768,
|
|
336
|
-
strength: 0.42,
|
|
337
|
-
bias: 0.0025,
|
|
338
|
-
slopeBias: 1.2,
|
|
339
|
-
filter: "pcf",
|
|
340
|
-
pcfRadius: Number((0.6 + fixture.lighting.shadowSoftness * 1.3).toFixed(4)),
|
|
341
|
-
pcfSamples: 9
|
|
342
|
-
},
|
|
343
|
-
postprocess,
|
|
344
|
-
frustumCulling: false
|
|
345
|
-
};
|
|
346
|
-
return {
|
|
347
|
-
fixture,
|
|
348
|
-
source,
|
|
349
|
-
renderItems,
|
|
350
|
-
geometryLibrary,
|
|
351
|
-
materialLibrary,
|
|
352
|
-
bounds: { min: [-2.2, -0.7, -1.18], max: [2.2, 1.13, 0.44] },
|
|
353
|
-
postprocess,
|
|
354
|
-
dispose: () => {
|
|
355
|
-
for (const geometry of geometryLibrary.values())
|
|
356
|
-
geometry.dispose();
|
|
357
|
-
for (const texture of textures)
|
|
358
|
-
texture.dispose();
|
|
359
|
-
}
|
|
360
|
-
};
|
|
361
|
-
}
|
|
362
|
-
function appendTurntableStageDetails(renderItems, geometryLibrary, materialLibrary) {
|
|
363
|
-
for (let index = 0; index < 5; index += 1) {
|
|
364
|
-
renderItems.push(item(geometryLibrary, materialLibrary, `studio-floor-perspective-line-${index}`, "stage", "dark-detail-line", -1.2 + index * 0.6, -0.62, -0.305, 0.006, 0.58, 0.009, 0));
|
|
365
|
-
}
|
|
366
|
-
for (let index = 0; index < 3; index += 1) {
|
|
367
|
-
renderItems.push(item(geometryLibrary, materialLibrary, `studio-floor-cross-reference-${index}`, "stage", "dark-detail-line", 0, -0.74 + index * 0.14, -0.295, 1.42, 0.007, 0.009, 0));
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
/**
|
|
371
|
-
* Builds the turntable's three-point rig from the *active lighting preset*.
|
|
372
|
-
*
|
|
373
|
-
* These intensities used to be hardcoded, so `lightingPreset` changed only the reported
|
|
374
|
-
* `fixture.lighting` metadata while every preset rendered an identical frame. That made the
|
|
375
|
-
* preset a self-reported claim rather than a rendering input, and it left the studio preset
|
|
376
|
-
* measurably underlit: the kit reported `keyIntensity: 1.5` and `environmentIntensity: 1`
|
|
377
|
-
* while the rig actually submitted a fixed 2.35 key with no ambient term at all, and the
|
|
378
|
-
* root quality gate's `salientRatio` sat at 0.096 against its 0.105 floor.
|
|
379
|
-
*
|
|
380
|
-
* The preset's `keyIntensity`/`fillIntensity`/`rimIntensity` are relative weights, scaled by
|
|
381
|
-
* a shared gain so the default studio preset keeps its previously-tuned absolute key value.
|
|
382
|
-
* `ambientIntensity` is handled separately by `applyPresetEnvironmentLighting`, because in this
|
|
383
|
-
* renderer the ambient term is `environmentLighting.intensity` rather than a fourth
|
|
384
|
-
* directional light. Submitting it in both places would double-count it.
|
|
385
|
-
*/
|
|
386
|
-
/**
|
|
387
|
-
* Applies the active preset's ambient and environment intensities to an environment bundle.
|
|
388
|
-
*
|
|
389
|
-
* `ambientIntensity` sets the ambient colour term directly; `environmentIntensity` scales the
|
|
390
|
-
* sampled environment map and its specular contribution. Textures and samplers are shared by
|
|
391
|
-
* reference because they are immutable GPU resources, so only scalars differ per preset.
|
|
392
|
-
*/
|
|
393
|
-
function applyPresetEnvironmentLighting(lighting, ambientIntensity, environmentIntensity) {
|
|
394
|
-
for (const [name, value] of [["ambientIntensity", ambientIntensity], ["environmentIntensity", environmentIntensity]]) {
|
|
395
|
-
if (!Number.isFinite(value) || value < 0) {
|
|
396
|
-
throw new RangeError(`Product turntable ${name} must be finite and non-negative`);
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
const scaled = (value) => typeof value === "number" ? Number((value * environmentIntensity).toFixed(4)) : value;
|
|
400
|
-
return {
|
|
401
|
-
...lighting,
|
|
402
|
-
intensity: Number(ambientIntensity.toFixed(4)),
|
|
403
|
-
...(typeof lighting.environmentMapIntensity === "number"
|
|
404
|
-
? { environmentMapIntensity: scaled(lighting.environmentMapIntensity) }
|
|
405
|
-
: {}),
|
|
406
|
-
...(typeof lighting.environmentMapSpecularIntensity === "number"
|
|
407
|
-
? { environmentMapSpecularIntensity: scaled(lighting.environmentMapSpecularIntensity) }
|
|
408
|
-
: {}),
|
|
409
|
-
...(lighting.proceduralMap
|
|
410
|
-
? {
|
|
411
|
-
proceduralMap: {
|
|
412
|
-
...lighting.proceduralMap,
|
|
413
|
-
...(typeof lighting.proceduralMap.intensity === "number"
|
|
414
|
-
? { intensity: scaled(lighting.proceduralMap.intensity) }
|
|
415
|
-
: {}),
|
|
416
|
-
...(typeof lighting.proceduralMap.specularIntensity === "number"
|
|
417
|
-
? { specularIntensity: scaled(lighting.proceduralMap.specularIntensity) }
|
|
418
|
-
: {})
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
: {})
|
|
422
|
-
};
|
|
423
|
-
}
|
|
424
|
-
function createProductTurntableCollectedLights(lighting) {
|
|
425
|
-
// Chosen so studio (keyIntensity 1.5) reproduces the previously hardcoded 2.35 key.
|
|
426
|
-
const gain = 2.35 / 1.5;
|
|
427
|
-
const keyIntensity = Number((lighting.keyIntensity * gain).toFixed(4));
|
|
428
|
-
const fillIntensity = Number((lighting.fillIntensity * gain).toFixed(4));
|
|
429
|
-
const rimIntensity = Number((lighting.rimIntensity * gain).toFixed(4));
|
|
430
|
-
const key = new DirectionalLight("turntable-key-shadow");
|
|
431
|
-
const fill = new DirectionalLight("turntable-fill");
|
|
432
|
-
const rim = new DirectionalLight("turntable-rim");
|
|
433
|
-
key.castsShadow = lighting.shadowEnabled;
|
|
434
|
-
key.color = [1, 0.92, 0.78];
|
|
435
|
-
key.intensity = keyIntensity;
|
|
436
|
-
fill.color = [0.5, 0.64, 0.95];
|
|
437
|
-
fill.intensity = fillIntensity;
|
|
438
|
-
rim.color = [0.85, 0.92, 1];
|
|
439
|
-
rim.intensity = rimIntensity;
|
|
440
|
-
return [
|
|
441
|
-
{
|
|
442
|
-
kind: "directional",
|
|
443
|
-
color: [1, 0.92, 0.78],
|
|
444
|
-
intensity: keyIntensity,
|
|
445
|
-
position: [0, 0, 0],
|
|
446
|
-
direction: [0.42, -0.64, -0.64],
|
|
447
|
-
right: [1, 0, 0],
|
|
448
|
-
up: [0, 1, 0],
|
|
449
|
-
range: 0,
|
|
450
|
-
width: 0,
|
|
451
|
-
height: 0,
|
|
452
|
-
spotAngle: 0,
|
|
453
|
-
penumbra: 0,
|
|
454
|
-
castsShadow: lighting.shadowEnabled,
|
|
455
|
-
layerMask: 0xffffffff,
|
|
456
|
-
source: key
|
|
457
|
-
},
|
|
458
|
-
{
|
|
459
|
-
kind: "directional",
|
|
460
|
-
color: [0.5, 0.64, 0.95],
|
|
461
|
-
intensity: fillIntensity,
|
|
462
|
-
position: [0, 0, 0],
|
|
463
|
-
direction: [-0.5, -0.3, -0.82],
|
|
464
|
-
right: [1, 0, 0],
|
|
465
|
-
up: [0, 1, 0],
|
|
466
|
-
range: 0,
|
|
467
|
-
width: 0,
|
|
468
|
-
height: 0,
|
|
469
|
-
spotAngle: 0,
|
|
470
|
-
penumbra: 0,
|
|
471
|
-
castsShadow: false,
|
|
472
|
-
layerMask: 0xffffffff,
|
|
473
|
-
source: fill
|
|
474
|
-
},
|
|
475
|
-
{
|
|
476
|
-
kind: "directional",
|
|
477
|
-
color: [0.85, 0.92, 1],
|
|
478
|
-
intensity: rimIntensity,
|
|
479
|
-
position: [0, 0, 0],
|
|
480
|
-
direction: [-0.15, -0.12, 0.98],
|
|
481
|
-
right: [1, 0, 0],
|
|
482
|
-
up: [0, 1, 0],
|
|
483
|
-
range: 0,
|
|
484
|
-
width: 0,
|
|
485
|
-
height: 0,
|
|
486
|
-
spotAngle: 0,
|
|
487
|
-
penumbra: 0,
|
|
488
|
-
castsShadow: false,
|
|
489
|
-
layerMask: 0xffffffff,
|
|
490
|
-
source: rim
|
|
491
|
-
}
|
|
492
|
-
];
|
|
493
|
-
}
|
|
494
|
-
function createHotspots(rotationRadians, canvasWidth, canvasHeight) {
|
|
495
|
-
const anchors = [
|
|
496
|
-
{
|
|
497
|
-
id: "material-finish",
|
|
498
|
-
group: "material",
|
|
499
|
-
label: "Metallic shell",
|
|
500
|
-
content: "Product finish, carbon accent, and procedural roughness maps are bound through the current renderer.",
|
|
501
|
-
position: [-0.3, 0.24, 0.18],
|
|
502
|
-
threshold: -0.15
|
|
503
|
-
},
|
|
504
|
-
{
|
|
505
|
-
id: "comfort-band",
|
|
506
|
-
group: "comfort",
|
|
507
|
-
label: "Comfort band",
|
|
508
|
-
content: "Generated multi-part glTF geometry keeps headband and cushion slots independently selectable.",
|
|
509
|
-
position: [0, 0.52, 0.1],
|
|
510
|
-
threshold: -0.05
|
|
511
|
-
},
|
|
512
|
-
{
|
|
513
|
-
id: "control-module",
|
|
514
|
-
group: "controls",
|
|
515
|
-
label: "Control module",
|
|
516
|
-
content: "The selected controls part is exposed in runtime state for ecommerce hotspot evidence.",
|
|
517
|
-
position: [0.38, 0.06, 0.2],
|
|
518
|
-
threshold: -0.1
|
|
519
|
-
}
|
|
520
|
-
];
|
|
521
|
-
return anchors.map((anchor, index) => {
|
|
522
|
-
const projected = projectHotspot(anchor.position, rotationRadians, canvasWidth, canvasHeight, index);
|
|
523
|
-
return {
|
|
524
|
-
id: anchor.id,
|
|
525
|
-
group: anchor.group,
|
|
526
|
-
label: anchor.label,
|
|
527
|
-
content: anchor.content,
|
|
528
|
-
position: anchor.position,
|
|
529
|
-
screen: projected,
|
|
530
|
-
visibilityThreshold: anchor.threshold
|
|
531
|
-
};
|
|
532
|
-
});
|
|
533
|
-
}
|
|
534
|
-
function productTurntableEnvironmentPreset(preset) {
|
|
535
|
-
if (preset === "soft" || preset === "neutral")
|
|
536
|
-
return "softbox";
|
|
537
|
-
if (preset === "inspection")
|
|
538
|
-
return "inspection";
|
|
539
|
-
if (preset === "dramatic")
|
|
540
|
-
return "exhibit";
|
|
541
|
-
return "studio";
|
|
542
|
-
}
|
|
543
|
-
function item(geometryLibrary, materialLibrary, label, geometryId, materialId, tx, ty, tz, sx, sy, sz, yawRadians) {
|
|
544
|
-
const geometry = geometryLibrary.get(geometryId);
|
|
545
|
-
const material = materialLibrary.get(materialId);
|
|
546
|
-
if (!geometry)
|
|
547
|
-
throw new Error(`Missing product turntable geometry: ${geometryId}`);
|
|
548
|
-
if (!material)
|
|
549
|
-
throw new Error(`Missing product turntable material: ${materialId}`);
|
|
550
|
-
return {
|
|
551
|
-
geometry,
|
|
552
|
-
material,
|
|
553
|
-
label,
|
|
554
|
-
modelMatrix: modelMatrix(tx, ty, tz, sx, sy, sz, yawRadians)
|
|
555
|
-
};
|
|
556
|
-
}
|
|
557
|
-
function modelMatrix(tx, ty, tz, sx, sy, sz, yawRadians) {
|
|
558
|
-
const cos = Math.cos(yawRadians);
|
|
559
|
-
const sin = Math.sin(yawRadians);
|
|
560
|
-
return new Float32Array([
|
|
561
|
-
cos * sx, 0, -sin * sx, 0,
|
|
562
|
-
0, sy, 0, 0,
|
|
563
|
-
sin * sz, 0, cos * sz, 0,
|
|
564
|
-
tx, ty, tz, 1
|
|
565
|
-
]);
|
|
566
|
-
}
|
|
567
|
-
function projectHotspot(position, rotationRadians, canvasWidth, canvasHeight, index) {
|
|
568
|
-
const cos = Math.cos(rotationRadians);
|
|
569
|
-
const sin = Math.sin(rotationRadians);
|
|
570
|
-
const x = position[0] * cos - position[2] * sin;
|
|
571
|
-
const z = position[0] * sin + position[2] * cos;
|
|
572
|
-
const screenX = Math.round(canvasWidth * (0.5 + x * 0.36));
|
|
573
|
-
const screenY = Math.round(canvasHeight * (0.5 - position[1] * 0.42 + index * 0.018));
|
|
574
|
-
return {
|
|
575
|
-
x: screenX,
|
|
576
|
-
y: screenY,
|
|
577
|
-
visible: z > -0.38 && screenX >= 0 && screenX <= canvasWidth && screenY >= 0 && screenY <= canvasHeight,
|
|
578
|
-
occluded: false
|
|
579
|
-
};
|
|
580
|
-
}
|
|
581
|
-
function createLighting(activePreset) {
|
|
582
|
-
const descriptor = lightingPresets[activePreset];
|
|
583
|
-
return {
|
|
584
|
-
source: "origin-master-ecommerce-lighting-preset-manager-adapted",
|
|
585
|
-
presets: ["studio", "soft", "inspection", "dramatic", "neutral"],
|
|
586
|
-
activePreset,
|
|
587
|
-
transitionSupported: true,
|
|
588
|
-
...descriptor
|
|
589
|
-
};
|
|
590
|
-
}
|
|
591
|
-
function createCapturePlan(captureRequested, exportedBytes) {
|
|
592
|
-
const completedBatchTasks = captureRequested && exportedBytes > 0 ? 3 : 2;
|
|
593
|
-
return {
|
|
594
|
-
source: "origin-master-ecommerce-capture-batch-export-adapted",
|
|
595
|
-
screenshotFormats: ["png", "jpeg", "webp"],
|
|
596
|
-
screenshotViews: ["hero", "front", "detail", "exploded"],
|
|
597
|
-
spinFrameCount: 72,
|
|
598
|
-
spinDurationSeconds: 4,
|
|
599
|
-
batchTasks: ["thumbnail", "screenshot", "360-spin", "ar-export"],
|
|
600
|
-
completedBatchTasks,
|
|
601
|
-
captureRequested,
|
|
602
|
-
exportedBytes,
|
|
603
|
-
arExportFormats: ["glb"],
|
|
604
|
-
blockedExportClaims: [
|
|
605
|
-
"native-USDZ-export",
|
|
606
|
-
"browser-video-recording-pipeline",
|
|
607
|
-
"AR-Quick-Look-and-Scene-Viewer-platform-parity",
|
|
608
|
-
"ecommerce-PIM-or-commerce-platform-integration"
|
|
609
|
-
]
|
|
610
|
-
};
|
|
611
|
-
}
|
|
612
|
-
function finiteOrDefault(value, fallback, name) {
|
|
613
|
-
if (value === undefined)
|
|
614
|
-
return fallback;
|
|
615
|
-
if (!Number.isFinite(value) && value !== Number.POSITIVE_INFINITY)
|
|
616
|
-
throw new RangeError(`${name} must be finite.`);
|
|
617
|
-
return value;
|
|
618
|
-
}
|
|
619
|
-
function integerOrDefault(value, fallback, name) {
|
|
620
|
-
if (value === undefined)
|
|
621
|
-
return fallback;
|
|
622
|
-
if (!Number.isInteger(value) || value < 0)
|
|
623
|
-
throw new RangeError(`${name} must be a non-negative integer.`);
|
|
624
|
-
return value;
|
|
625
|
-
}
|
|
626
|
-
function hashProductTurntable(values) {
|
|
627
|
-
let hash = 0x811c9dc5;
|
|
628
|
-
for (const value of values) {
|
|
629
|
-
const scaled = Math.round(value * 1000);
|
|
630
|
-
hash ^= scaled & 0xff;
|
|
631
|
-
hash = Math.imul(hash, 0x01000193) >>> 0;
|
|
632
|
-
hash ^= (scaled >>> 8) & 0xff;
|
|
633
|
-
hash = Math.imul(hash, 0x01000193) >>> 0;
|
|
634
|
-
hash ^= (scaled >>> 16) & 0xff;
|
|
635
|
-
hash = Math.imul(hash, 0x01000193) >>> 0;
|
|
636
|
-
}
|
|
637
|
-
return hash.toString(16).padStart(8, "0");
|
|
638
|
-
}
|
|
639
|
-
//# sourceMappingURL=ProductTurntableFixtures.js.map
|