@aura3d/engine 1.0.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/README.md +115 -0
- package/dist/animation/AnimationAction.d.ts +40 -0
- package/dist/animation/AnimationAction.d.ts.map +1 -0
- package/dist/animation/AnimationAction.js +143 -0
- package/dist/animation/AnimationAction.js.map +1 -0
- package/dist/animation/AnimationClip.d.ts +24 -0
- package/dist/animation/AnimationClip.d.ts.map +1 -0
- package/dist/animation/AnimationClip.js +45 -0
- package/dist/animation/AnimationClip.js.map +1 -0
- package/dist/animation/AnimationEvents.d.ts +10 -0
- package/dist/animation/AnimationEvents.d.ts.map +1 -0
- package/dist/animation/AnimationEvents.js +26 -0
- package/dist/animation/AnimationEvents.js.map +1 -0
- package/dist/animation/AnimationLayer.d.ts +27 -0
- package/dist/animation/AnimationLayer.d.ts.map +1 -0
- package/dist/animation/AnimationLayer.js +53 -0
- package/dist/animation/AnimationLayer.js.map +1 -0
- package/dist/animation/AnimationMixer.d.ts +54 -0
- package/dist/animation/AnimationMixer.d.ts.map +1 -0
- package/dist/animation/AnimationMixer.js +319 -0
- package/dist/animation/AnimationMixer.js.map +1 -0
- package/dist/animation/AnimationStateMachine.d.ts +43 -0
- package/dist/animation/AnimationStateMachine.d.ts.map +1 -0
- package/dist/animation/AnimationStateMachine.js +92 -0
- package/dist/animation/AnimationStateMachine.js.map +1 -0
- package/dist/animation/AnimationTrack.d.ts +23 -0
- package/dist/animation/AnimationTrack.d.ts.map +1 -0
- package/dist/animation/AnimationTrack.js +124 -0
- package/dist/animation/AnimationTrack.js.map +1 -0
- package/dist/animation/BlendTree.d.ts +23 -0
- package/dist/animation/BlendTree.d.ts.map +1 -0
- package/dist/animation/BlendTree.js +68 -0
- package/dist/animation/BlendTree.js.map +1 -0
- package/dist/animation/Bone.d.ts +20 -0
- package/dist/animation/Bone.d.ts.map +1 -0
- package/dist/animation/Bone.js +24 -0
- package/dist/animation/Bone.js.map +1 -0
- package/dist/animation/CrowdAnimation.d.ts +13 -0
- package/dist/animation/CrowdAnimation.d.ts.map +1 -0
- package/dist/animation/CrowdAnimation.js +14 -0
- package/dist/animation/CrowdAnimation.js.map +1 -0
- package/dist/animation/ECSAnimationBridge.d.ts +9 -0
- package/dist/animation/ECSAnimationBridge.d.ts.map +1 -0
- package/dist/animation/ECSAnimationBridge.js +24 -0
- package/dist/animation/ECSAnimationBridge.js.map +1 -0
- package/dist/animation/IK.d.ts +24 -0
- package/dist/animation/IK.d.ts.map +1 -0
- package/dist/animation/IK.js +76 -0
- package/dist/animation/IK.js.map +1 -0
- package/dist/animation/Keyframe.d.ts +50 -0
- package/dist/animation/Keyframe.d.ts.map +1 -0
- package/dist/animation/Keyframe.js +118 -0
- package/dist/animation/Keyframe.js.map +1 -0
- package/dist/animation/LocomotionController.d.ts +47 -0
- package/dist/animation/LocomotionController.d.ts.map +1 -0
- package/dist/animation/LocomotionController.js +106 -0
- package/dist/animation/LocomotionController.js.map +1 -0
- package/dist/animation/MotionMatchingFixtures.d.ts +58 -0
- package/dist/animation/MotionMatchingFixtures.d.ts.map +1 -0
- package/dist/animation/MotionMatchingFixtures.js +175 -0
- package/dist/animation/MotionMatchingFixtures.js.map +1 -0
- package/dist/animation/MotionQuality.d.ts +36 -0
- package/dist/animation/MotionQuality.d.ts.map +1 -0
- package/dist/animation/MotionQuality.js +117 -0
- package/dist/animation/MotionQuality.js.map +1 -0
- package/dist/animation/Retargeting.d.ts +12 -0
- package/dist/animation/Retargeting.d.ts.map +1 -0
- package/dist/animation/Retargeting.js +19 -0
- package/dist/animation/Retargeting.js.map +1 -0
- package/dist/animation/RootMotion.d.ts +21 -0
- package/dist/animation/RootMotion.d.ts.map +1 -0
- package/dist/animation/RootMotion.js +84 -0
- package/dist/animation/RootMotion.js.map +1 -0
- package/dist/animation/SceneAnimationBridge.d.ts +18 -0
- package/dist/animation/SceneAnimationBridge.d.ts.map +1 -0
- package/dist/animation/SceneAnimationBridge.js +69 -0
- package/dist/animation/SceneAnimationBridge.js.map +1 -0
- package/dist/animation/SecondaryAnimationFixtures.d.ts +55 -0
- package/dist/animation/SecondaryAnimationFixtures.d.ts.map +1 -0
- package/dist/animation/SecondaryAnimationFixtures.js +147 -0
- package/dist/animation/SecondaryAnimationFixtures.js.map +1 -0
- package/dist/animation/Skeleton.d.ts +9 -0
- package/dist/animation/Skeleton.d.ts.map +1 -0
- package/dist/animation/Skeleton.js +31 -0
- package/dist/animation/Skeleton.js.map +1 -0
- package/dist/animation/Skinning.d.ts +7 -0
- package/dist/animation/Skinning.d.ts.map +1 -0
- package/dist/animation/Skinning.js +12 -0
- package/dist/animation/Skinning.js.map +1 -0
- package/dist/animation/browser-index.d.ts +21 -0
- package/dist/animation/browser-index.d.ts.map +1 -0
- package/dist/animation/browser-index.js +21 -0
- package/dist/animation/browser-index.js.map +1 -0
- package/dist/animation/index.d.ts +24 -0
- package/dist/animation/index.d.ts.map +1 -0
- package/dist/animation/index.js +24 -0
- package/dist/animation/index.js.map +1 -0
- package/dist/animation/threejs-compatibility/AnimationAction.d.ts +16 -0
- package/dist/animation/threejs-compatibility/AnimationAction.d.ts.map +1 -0
- package/dist/animation/threejs-compatibility/AnimationAction.js +25 -0
- package/dist/animation/threejs-compatibility/AnimationAction.js.map +1 -0
- package/dist/animation/threejs-compatibility/AnimationClip.d.ts +14 -0
- package/dist/animation/threejs-compatibility/AnimationClip.d.ts.map +1 -0
- package/dist/animation/threejs-compatibility/AnimationClip.js +11 -0
- package/dist/animation/threejs-compatibility/AnimationClip.js.map +1 -0
- package/dist/animation/threejs-compatibility/AnimationDiagnostics.d.ts +44 -0
- package/dist/animation/threejs-compatibility/AnimationDiagnostics.d.ts.map +1 -0
- package/dist/animation/threejs-compatibility/AnimationDiagnostics.js +31 -0
- package/dist/animation/threejs-compatibility/AnimationDiagnostics.js.map +1 -0
- package/dist/animation/threejs-compatibility/AnimationMixer.d.ts +9 -0
- package/dist/animation/threejs-compatibility/AnimationMixer.d.ts.map +1 -0
- package/dist/animation/threejs-compatibility/AnimationMixer.js +24 -0
- package/dist/animation/threejs-compatibility/AnimationMixer.js.map +1 -0
- package/dist/animation/threejs-compatibility/MorphTargetMixer.d.ts +10 -0
- package/dist/animation/threejs-compatibility/MorphTargetMixer.d.ts.map +1 -0
- package/dist/animation/threejs-compatibility/MorphTargetMixer.js +10 -0
- package/dist/animation/threejs-compatibility/MorphTargetMixer.js.map +1 -0
- package/dist/animation/threejs-compatibility/Skeleton.d.ts +10 -0
- package/dist/animation/threejs-compatibility/Skeleton.d.ts.map +1 -0
- package/dist/animation/threejs-compatibility/Skeleton.js +8 -0
- package/dist/animation/threejs-compatibility/Skeleton.js.map +1 -0
- package/dist/animation/threejs-compatibility/SkinnedMesh.d.ts +11 -0
- package/dist/animation/threejs-compatibility/SkinnedMesh.d.ts.map +1 -0
- package/dist/animation/threejs-compatibility/SkinnedMesh.js +16 -0
- package/dist/animation/threejs-compatibility/SkinnedMesh.js.map +1 -0
- package/dist/animation/threejs-compatibility/index.d.ts +12 -0
- package/dist/animation/threejs-compatibility/index.d.ts.map +1 -0
- package/dist/animation/threejs-compatibility/index.js +8 -0
- package/dist/animation/threejs-compatibility/index.js.map +1 -0
- package/dist/apps/index.d.ts +50 -0
- package/dist/apps/index.d.ts.map +1 -0
- package/dist/apps/index.js +99 -0
- package/dist/apps/index.js.map +1 -0
- package/dist/assets/AdvancedAssetCorpus.d.ts +124 -0
- package/dist/assets/AdvancedAssetCorpus.d.ts.map +1 -0
- package/dist/assets/AdvancedAssetCorpus.js +266 -0
- package/dist/assets/AdvancedAssetCorpus.js.map +1 -0
- package/dist/assets/AssetBundleCacheFixtures.d.ts +62 -0
- package/dist/assets/AssetBundleCacheFixtures.d.ts.map +1 -0
- package/dist/assets/AssetBundleCacheFixtures.js +222 -0
- package/dist/assets/AssetBundleCacheFixtures.js.map +1 -0
- package/dist/assets/AssetCache.d.ts +21 -0
- package/dist/assets/AssetCache.d.ts.map +1 -0
- package/dist/assets/AssetCache.js +54 -0
- package/dist/assets/AssetCache.js.map +1 -0
- package/dist/assets/AssetCompatibility.d.ts +54 -0
- package/dist/assets/AssetCompatibility.d.ts.map +1 -0
- package/dist/assets/AssetCompatibility.js +122 -0
- package/dist/assets/AssetCompatibility.js.map +1 -0
- package/dist/assets/AssetCorpus.d.ts +88 -0
- package/dist/assets/AssetCorpus.d.ts.map +1 -0
- package/dist/assets/AssetCorpus.js +215 -0
- package/dist/assets/AssetCorpus.js.map +1 -0
- package/dist/assets/AssetDependencyGraph.d.ts +12 -0
- package/dist/assets/AssetDependencyGraph.d.ts.map +1 -0
- package/dist/assets/AssetDependencyGraph.js +66 -0
- package/dist/assets/AssetDependencyGraph.js.map +1 -0
- package/dist/assets/AssetHandle.d.ts +26 -0
- package/dist/assets/AssetHandle.d.ts.map +1 -0
- package/dist/assets/AssetHandle.js +53 -0
- package/dist/assets/AssetHandle.js.map +1 -0
- package/dist/assets/AssetImportPreflight.d.ts +43 -0
- package/dist/assets/AssetImportPreflight.d.ts.map +1 -0
- package/dist/assets/AssetImportPreflight.js +117 -0
- package/dist/assets/AssetImportPreflight.js.map +1 -0
- package/dist/assets/AssetInspection.d.ts +183 -0
- package/dist/assets/AssetInspection.d.ts.map +1 -0
- package/dist/assets/AssetInspection.js +397 -0
- package/dist/assets/AssetInspection.js.map +1 -0
- package/dist/assets/AssetLoader.d.ts +26 -0
- package/dist/assets/AssetLoader.d.ts.map +1 -0
- package/dist/assets/AssetLoader.js +12 -0
- package/dist/assets/AssetLoader.js.map +1 -0
- package/dist/assets/AssetManager.d.ts +37 -0
- package/dist/assets/AssetManager.d.ts.map +1 -0
- package/dist/assets/AssetManager.js +161 -0
- package/dist/assets/AssetManager.js.map +1 -0
- package/dist/assets/AssetRegistry.d.ts +10 -0
- package/dist/assets/AssetRegistry.d.ts.map +1 -0
- package/dist/assets/AssetRegistry.js +34 -0
- package/dist/assets/AssetRegistry.js.map +1 -0
- package/dist/assets/AssetRenderDefaults.d.ts +13 -0
- package/dist/assets/AssetRenderDefaults.d.ts.map +1 -0
- package/dist/assets/AssetRenderDefaults.js +23 -0
- package/dist/assets/AssetRenderDefaults.js.map +1 -0
- package/dist/assets/AudioLoader.d.ts +17 -0
- package/dist/assets/AudioLoader.d.ts.map +1 -0
- package/dist/assets/AudioLoader.js +23 -0
- package/dist/assets/AudioLoader.js.map +1 -0
- package/dist/assets/BlenderExportValidation.d.ts +64 -0
- package/dist/assets/BlenderExportValidation.d.ts.map +1 -0
- package/dist/assets/BlenderExportValidation.js +143 -0
- package/dist/assets/BlenderExportValidation.js.map +1 -0
- package/dist/assets/CarConceptMaterialStability.d.ts +28 -0
- package/dist/assets/CarConceptMaterialStability.d.ts.map +1 -0
- package/dist/assets/CarConceptMaterialStability.js +1308 -0
- package/dist/assets/CarConceptMaterialStability.js.map +1 -0
- package/dist/assets/EXRLoader.d.ts +2 -0
- package/dist/assets/EXRLoader.d.ts.map +1 -0
- package/dist/assets/EXRLoader.js +2 -0
- package/dist/assets/EXRLoader.js.map +1 -0
- package/dist/assets/ExternalParityGLTFCorpus.d.ts +39 -0
- package/dist/assets/ExternalParityGLTFCorpus.d.ts.map +1 -0
- package/dist/assets/ExternalParityGLTFCorpus.js +32 -0
- package/dist/assets/ExternalParityGLTFCorpus.js.map +1 -0
- package/dist/assets/GLTFAnimationRuntime.d.ts +243 -0
- package/dist/assets/GLTFAnimationRuntime.d.ts.map +1 -0
- package/dist/assets/GLTFAnimationRuntime.js +954 -0
- package/dist/assets/GLTFAnimationRuntime.js.map +1 -0
- package/dist/assets/GLTFCompressionDecoders.d.ts +42 -0
- package/dist/assets/GLTFCompressionDecoders.d.ts.map +1 -0
- package/dist/assets/GLTFCompressionDecoders.js +99 -0
- package/dist/assets/GLTFCompressionDecoders.js.map +1 -0
- package/dist/assets/GLTFExtensionSupport.d.ts +33 -0
- package/dist/assets/GLTFExtensionSupport.d.ts.map +1 -0
- package/dist/assets/GLTFExtensionSupport.js +85 -0
- package/dist/assets/GLTFExtensionSupport.js.map +1 -0
- package/dist/assets/GLTFLoader.d.ts +361 -0
- package/dist/assets/GLTFLoader.d.ts.map +1 -0
- package/dist/assets/GLTFLoader.js +2735 -0
- package/dist/assets/GLTFLoader.js.map +1 -0
- package/dist/assets/GLTFRenderResources.d.ts +162 -0
- package/dist/assets/GLTFRenderResources.d.ts.map +1 -0
- package/dist/assets/GLTFRenderResources.js +1684 -0
- package/dist/assets/GLTFRenderResources.js.map +1 -0
- package/dist/assets/HDRLoader.d.ts +2 -0
- package/dist/assets/HDRLoader.d.ts.map +1 -0
- package/dist/assets/HDRLoader.js +2 -0
- package/dist/assets/HDRLoader.js.map +1 -0
- package/dist/assets/ImageLoader.d.ts +15 -0
- package/dist/assets/ImageLoader.d.ts.map +1 -0
- package/dist/assets/ImageLoader.js +36 -0
- package/dist/assets/ImageLoader.js.map +1 -0
- package/dist/assets/ImportPipeline.d.ts +39 -0
- package/dist/assets/ImportPipeline.d.ts.map +1 -0
- package/dist/assets/ImportPipeline.js +105 -0
- package/dist/assets/ImportPipeline.js.map +1 -0
- package/dist/assets/KTX2BasisTextureTranscoder.d.ts +9 -0
- package/dist/assets/KTX2BasisTextureTranscoder.d.ts.map +1 -0
- package/dist/assets/KTX2BasisTextureTranscoder.js +178 -0
- package/dist/assets/KTX2BasisTextureTranscoder.js.map +1 -0
- package/dist/assets/LoadContext.d.ts +20 -0
- package/dist/assets/LoadContext.d.ts.map +1 -0
- package/dist/assets/LoadContext.js +42 -0
- package/dist/assets/LoadContext.js.map +1 -0
- package/dist/assets/MaterialLoader.d.ts +17 -0
- package/dist/assets/MaterialLoader.d.ts.map +1 -0
- package/dist/assets/MaterialLoader.js +138 -0
- package/dist/assets/MaterialLoader.js.map +1 -0
- package/dist/assets/MeshOptimization.d.ts +20 -0
- package/dist/assets/MeshOptimization.d.ts.map +1 -0
- package/dist/assets/MeshOptimization.js +65 -0
- package/dist/assets/MeshOptimization.js.map +1 -0
- package/dist/assets/OBJLoader.d.ts +13 -0
- package/dist/assets/OBJLoader.d.ts.map +1 -0
- package/dist/assets/OBJLoader.js +492 -0
- package/dist/assets/OBJLoader.js.map +1 -0
- package/dist/assets/SceneAnalysisFixtures.d.ts +100 -0
- package/dist/assets/SceneAnalysisFixtures.d.ts.map +1 -0
- package/dist/assets/SceneAnalysisFixtures.js +331 -0
- package/dist/assets/SceneAnalysisFixtures.js.map +1 -0
- package/dist/assets/SceneLoader.d.ts +27 -0
- package/dist/assets/SceneLoader.d.ts.map +1 -0
- package/dist/assets/SceneLoader.js +40 -0
- package/dist/assets/SceneLoader.js.map +1 -0
- package/dist/assets/ShaderLoader.d.ts +12 -0
- package/dist/assets/ShaderLoader.d.ts.map +1 -0
- package/dist/assets/ShaderLoader.js +18 -0
- package/dist/assets/ShaderLoader.js.map +1 -0
- package/dist/assets/TextureLoader.d.ts +16 -0
- package/dist/assets/TextureLoader.d.ts.map +1 -0
- package/dist/assets/TextureLoader.js +17 -0
- package/dist/assets/TextureLoader.js.map +1 -0
- package/dist/assets/TexturePipeline.d.ts +24 -0
- package/dist/assets/TexturePipeline.d.ts.map +1 -0
- package/dist/assets/TexturePipeline.js +64 -0
- package/dist/assets/TexturePipeline.js.map +1 -0
- package/dist/assets/TextureStreaming.d.ts +10 -0
- package/dist/assets/TextureStreaming.d.ts.map +1 -0
- package/dist/assets/TextureStreaming.js +11 -0
- package/dist/assets/TextureStreaming.js.map +1 -0
- package/dist/assets/WorkerAssetJobs.d.ts +18 -0
- package/dist/assets/WorkerAssetJobs.d.ts.map +1 -0
- package/dist/assets/WorkerAssetJobs.js +37 -0
- package/dist/assets/WorkerAssetJobs.js.map +1 -0
- package/dist/assets/advanced-gallery/index.d.ts +3 -0
- package/dist/assets/advanced-gallery/index.d.ts.map +1 -0
- package/dist/assets/advanced-gallery/index.js +2 -0
- package/dist/assets/advanced-gallery/index.js.map +1 -0
- package/dist/assets/asset-corpus/GLTFSceneLoader.d.ts +3 -0
- package/dist/assets/asset-corpus/GLTFSceneLoader.d.ts.map +1 -0
- package/dist/assets/asset-corpus/GLTFSceneLoader.js +2 -0
- package/dist/assets/asset-corpus/GLTFSceneLoader.js.map +1 -0
- package/dist/assets/asset-corpus/ProductionAssetCorpus.d.ts +89 -0
- package/dist/assets/asset-corpus/ProductionAssetCorpus.d.ts.map +1 -0
- package/dist/assets/asset-corpus/ProductionAssetCorpus.js +116 -0
- package/dist/assets/asset-corpus/ProductionAssetCorpus.js.map +1 -0
- package/dist/assets/asset-corpus/ProductionAssetPipeline.d.ts +3 -0
- package/dist/assets/asset-corpus/ProductionAssetPipeline.d.ts.map +1 -0
- package/dist/assets/asset-corpus/ProductionAssetPipeline.js +3 -0
- package/dist/assets/asset-corpus/ProductionAssetPipeline.js.map +1 -0
- package/dist/assets/asset-corpus/ProductionGLTFRenderPipeline.d.ts +65 -0
- package/dist/assets/asset-corpus/ProductionGLTFRenderPipeline.d.ts.map +1 -0
- package/dist/assets/asset-corpus/ProductionGLTFRenderPipeline.js +110 -0
- package/dist/assets/asset-corpus/ProductionGLTFRenderPipeline.js.map +1 -0
- package/dist/assets/asset-corpus/ProductionHDRTextureLoader.d.ts +8 -0
- package/dist/assets/asset-corpus/ProductionHDRTextureLoader.d.ts.map +1 -0
- package/dist/assets/asset-corpus/ProductionHDRTextureLoader.js +2 -0
- package/dist/assets/asset-corpus/ProductionHDRTextureLoader.js.map +1 -0
- package/dist/assets/asset-corpus/ProductionKTX2TextureLoader.d.ts +7 -0
- package/dist/assets/asset-corpus/ProductionKTX2TextureLoader.d.ts.map +1 -0
- package/dist/assets/asset-corpus/ProductionKTX2TextureLoader.js +2 -0
- package/dist/assets/asset-corpus/ProductionKTX2TextureLoader.js.map +1 -0
- package/dist/assets/asset-corpus/ProductionTextureLoader.d.ts +7 -0
- package/dist/assets/asset-corpus/ProductionTextureLoader.d.ts.map +1 -0
- package/dist/assets/asset-corpus/ProductionTextureLoader.js +2 -0
- package/dist/assets/asset-corpus/ProductionTextureLoader.js.map +1 -0
- package/dist/assets/asset-corpus/index.d.ts +10 -0
- package/dist/assets/asset-corpus/index.d.ts.map +1 -0
- package/dist/assets/asset-corpus/index.js +8 -0
- package/dist/assets/asset-corpus/index.js.map +1 -0
- package/dist/assets/browser-index.d.ts +48 -0
- package/dist/assets/browser-index.d.ts.map +1 -0
- package/dist/assets/browser-index.js +26 -0
- package/dist/assets/browser-index.js.map +1 -0
- package/dist/assets/createRenderableScene.d.ts +23 -0
- package/dist/assets/createRenderableScene.d.ts.map +1 -0
- package/dist/assets/createRenderableScene.js +94 -0
- package/dist/assets/createRenderableScene.js.map +1 -0
- package/dist/assets/index.d.ts +82 -0
- package/dist/assets/index.d.ts.map +1 -0
- package/dist/assets/index.js +45 -0
- package/dist/assets/index.js.map +1 -0
- package/dist/assets/loadRenderableAsset.d.ts +16 -0
- package/dist/assets/loadRenderableAsset.d.ts.map +1 -0
- package/dist/assets/loadRenderableAsset.js +50 -0
- package/dist/assets/loadRenderableAsset.js.map +1 -0
- package/dist/assets/loaders/CubeTextureLoader.d.ts +4 -0
- package/dist/assets/loaders/CubeTextureLoader.d.ts.map +1 -0
- package/dist/assets/loaders/CubeTextureLoader.js +9 -0
- package/dist/assets/loaders/CubeTextureLoader.js.map +1 -0
- package/dist/assets/loaders/EXRLoader.d.ts +4 -0
- package/dist/assets/loaders/EXRLoader.d.ts.map +1 -0
- package/dist/assets/loaders/EXRLoader.js +10 -0
- package/dist/assets/loaders/EXRLoader.js.map +1 -0
- package/dist/assets/loaders/HDRLoader.d.ts +4 -0
- package/dist/assets/loaders/HDRLoader.d.ts.map +1 -0
- package/dist/assets/loaders/HDRLoader.js +7 -0
- package/dist/assets/loaders/HDRLoader.js.map +1 -0
- package/dist/assets/loaders/KTX2Loader.d.ts +4 -0
- package/dist/assets/loaders/KTX2Loader.d.ts.map +1 -0
- package/dist/assets/loaders/KTX2Loader.js +7 -0
- package/dist/assets/loaders/KTX2Loader.js.map +1 -0
- package/dist/assets/loaders/LoaderDiagnostics.d.ts +18 -0
- package/dist/assets/loaders/LoaderDiagnostics.d.ts.map +1 -0
- package/dist/assets/loaders/LoaderDiagnostics.js +18 -0
- package/dist/assets/loaders/LoaderDiagnostics.js.map +1 -0
- package/dist/assets/loaders/MTLLoader.d.ts +10 -0
- package/dist/assets/loaders/MTLLoader.d.ts.map +1 -0
- package/dist/assets/loaders/MTLLoader.js +14 -0
- package/dist/assets/loaders/MTLLoader.js.map +1 -0
- package/dist/assets/loaders/OBJLoader.d.ts +12 -0
- package/dist/assets/loaders/OBJLoader.d.ts.map +1 -0
- package/dist/assets/loaders/OBJLoader.js +16 -0
- package/dist/assets/loaders/OBJLoader.js.map +1 -0
- package/dist/assets/loaders/TextureLoader.d.ts +6 -0
- package/dist/assets/loaders/TextureLoader.d.ts.map +1 -0
- package/dist/assets/loaders/TextureLoader.js +11 -0
- package/dist/assets/loaders/TextureLoader.js.map +1 -0
- package/dist/assets/loaders/ThreeCompatGLTFLoader.d.ts +10 -0
- package/dist/assets/loaders/ThreeCompatGLTFLoader.d.ts.map +1 -0
- package/dist/assets/loaders/ThreeCompatGLTFLoader.js +13 -0
- package/dist/assets/loaders/ThreeCompatGLTFLoader.js.map +1 -0
- package/dist/assets/loaders/index.d.ts +15 -0
- package/dist/assets/loaders/index.d.ts.map +1 -0
- package/dist/assets/loaders/index.js +10 -0
- package/dist/assets/loaders/index.js.map +1 -0
- package/dist/assets/threejs-compatibility/ThreeCompatAssetProvenance.d.ts +34 -0
- package/dist/assets/threejs-compatibility/ThreeCompatAssetProvenance.d.ts.map +1 -0
- package/dist/assets/threejs-compatibility/ThreeCompatAssetProvenance.js +16 -0
- package/dist/assets/threejs-compatibility/ThreeCompatAssetProvenance.js.map +1 -0
- package/dist/assets/threejs-compatibility/ThreeCompatAssetRegistry.d.ts +29 -0
- package/dist/assets/threejs-compatibility/ThreeCompatAssetRegistry.d.ts.map +1 -0
- package/dist/assets/threejs-compatibility/ThreeCompatAssetRegistry.js +33 -0
- package/dist/assets/threejs-compatibility/ThreeCompatAssetRegistry.js.map +1 -0
- package/dist/assets/threejs-example-parity/index.d.ts +20 -0
- package/dist/assets/threejs-example-parity/index.d.ts.map +1 -0
- package/dist/assets/threejs-example-parity/index.js +218 -0
- package/dist/assets/threejs-example-parity/index.js.map +1 -0
- package/dist/audio/AdaptiveMusicFixtures.d.ts +36 -0
- package/dist/audio/AdaptiveMusicFixtures.d.ts.map +1 -0
- package/dist/audio/AdaptiveMusicFixtures.js +90 -0
- package/dist/audio/AdaptiveMusicFixtures.js.map +1 -0
- package/dist/audio/AudioBus.d.ts +13 -0
- package/dist/audio/AudioBus.d.ts.map +1 -0
- package/dist/audio/AudioBus.js +32 -0
- package/dist/audio/AudioBus.js.map +1 -0
- package/dist/audio/AudioClip.d.ts +13 -0
- package/dist/audio/AudioClip.d.ts.map +1 -0
- package/dist/audio/AudioClip.js +18 -0
- package/dist/audio/AudioClip.js.map +1 -0
- package/dist/audio/AudioContextManager.d.ts +31 -0
- package/dist/audio/AudioContextManager.d.ts.map +1 -0
- package/dist/audio/AudioContextManager.js +49 -0
- package/dist/audio/AudioContextManager.js.map +1 -0
- package/dist/audio/AudioEffect.d.ts +8 -0
- package/dist/audio/AudioEffect.d.ts.map +1 -0
- package/dist/audio/AudioEffect.js +2 -0
- package/dist/audio/AudioEffect.js.map +1 -0
- package/dist/audio/AudioEffectsAnalysisFixtures.d.ts +99 -0
- package/dist/audio/AudioEffectsAnalysisFixtures.d.ts.map +1 -0
- package/dist/audio/AudioEffectsAnalysisFixtures.js +192 -0
- package/dist/audio/AudioEffectsAnalysisFixtures.js.map +1 -0
- package/dist/audio/AudioListener.d.ts +12 -0
- package/dist/audio/AudioListener.d.ts.map +1 -0
- package/dist/audio/AudioListener.js +11 -0
- package/dist/audio/AudioListener.js.map +1 -0
- package/dist/audio/AudioMixer.d.ts +12 -0
- package/dist/audio/AudioMixer.d.ts.map +1 -0
- package/dist/audio/AudioMixer.js +33 -0
- package/dist/audio/AudioMixer.js.map +1 -0
- package/dist/audio/AudioSource.d.ts +25 -0
- package/dist/audio/AudioSource.d.ts.map +1 -0
- package/dist/audio/AudioSource.js +58 -0
- package/dist/audio/AudioSource.js.map +1 -0
- package/dist/audio/AudioSystem.d.ts +13 -0
- package/dist/audio/AudioSystem.d.ts.map +1 -0
- package/dist/audio/AudioSystem.js +28 -0
- package/dist/audio/AudioSystem.js.map +1 -0
- package/dist/audio/SceneAudioBridge.d.ts +19 -0
- package/dist/audio/SceneAudioBridge.d.ts.map +1 -0
- package/dist/audio/SceneAudioBridge.js +37 -0
- package/dist/audio/SceneAudioBridge.js.map +1 -0
- package/dist/audio/SpatialAudio.d.ts +17 -0
- package/dist/audio/SpatialAudio.d.ts.map +1 -0
- package/dist/audio/SpatialAudio.js +22 -0
- package/dist/audio/SpatialAudio.js.map +1 -0
- package/dist/audio/SpatialAudioFixtures.d.ts +38 -0
- package/dist/audio/SpatialAudioFixtures.d.ts.map +1 -0
- package/dist/audio/SpatialAudioFixtures.js +94 -0
- package/dist/audio/SpatialAudioFixtures.js.map +1 -0
- package/dist/audio/effects/Filter.d.ts +13 -0
- package/dist/audio/effects/Filter.d.ts.map +1 -0
- package/dist/audio/effects/Filter.js +31 -0
- package/dist/audio/effects/Filter.js.map +1 -0
- package/dist/audio/effects/Reverb.d.ts +12 -0
- package/dist/audio/effects/Reverb.d.ts.map +1 -0
- package/dist/audio/effects/Reverb.js +23 -0
- package/dist/audio/effects/Reverb.js.map +1 -0
- package/dist/audio/index.d.ts +25 -0
- package/dist/audio/index.d.ts.map +1 -0
- package/dist/audio/index.js +15 -0
- package/dist/audio/index.js.map +1 -0
- package/dist/aura3d-cli/cli.d.ts +3 -0
- package/dist/aura3d-cli/cli.d.ts.map +1 -0
- package/dist/aura3d-cli/cli.js +79 -0
- package/dist/aura3d-cli/cli.js.map +1 -0
- package/dist/aura3d-cli/index.d.ts +78 -0
- package/dist/aura3d-cli/index.d.ts.map +1 -0
- package/dist/aura3d-cli/index.js +422 -0
- package/dist/aura3d-cli/index.js.map +1 -0
- package/dist/controls/ControlState.d.ts +14 -0
- package/dist/controls/ControlState.d.ts.map +1 -0
- package/dist/controls/ControlState.js +11 -0
- package/dist/controls/ControlState.js.map +1 -0
- package/dist/controls/DragControls.d.ts +8 -0
- package/dist/controls/DragControls.d.ts.map +1 -0
- package/dist/controls/DragControls.js +14 -0
- package/dist/controls/DragControls.js.map +1 -0
- package/dist/controls/FirstPersonControls.d.ts +5 -0
- package/dist/controls/FirstPersonControls.d.ts.map +1 -0
- package/dist/controls/FirstPersonControls.js +8 -0
- package/dist/controls/FirstPersonControls.js.map +1 -0
- package/dist/controls/FlyControls.d.ts +8 -0
- package/dist/controls/FlyControls.d.ts.map +1 -0
- package/dist/controls/FlyControls.js +12 -0
- package/dist/controls/FlyControls.js.map +1 -0
- package/dist/controls/InteractionControls.d.ts +83 -0
- package/dist/controls/InteractionControls.d.ts.map +1 -0
- package/dist/controls/InteractionControls.js +163 -0
- package/dist/controls/InteractionControls.js.map +1 -0
- package/dist/controls/MapControls.d.ts +6 -0
- package/dist/controls/MapControls.d.ts.map +1 -0
- package/dist/controls/MapControls.js +9 -0
- package/dist/controls/MapControls.js.map +1 -0
- package/dist/controls/NativeControlTypes.d.ts +49 -0
- package/dist/controls/NativeControlTypes.d.ts.map +1 -0
- package/dist/controls/NativeControlTypes.js +58 -0
- package/dist/controls/NativeControlTypes.js.map +1 -0
- package/dist/controls/OrbitControls.d.ts +11 -0
- package/dist/controls/OrbitControls.d.ts.map +1 -0
- package/dist/controls/OrbitControls.js +25 -0
- package/dist/controls/OrbitControls.js.map +1 -0
- package/dist/controls/Picking.d.ts +41 -0
- package/dist/controls/Picking.d.ts.map +1 -0
- package/dist/controls/Picking.js +149 -0
- package/dist/controls/Picking.js.map +1 -0
- package/dist/controls/PickingAnnotations.d.ts +134 -0
- package/dist/controls/PickingAnnotations.d.ts.map +1 -0
- package/dist/controls/PickingAnnotations.js +221 -0
- package/dist/controls/PickingAnnotations.js.map +1 -0
- package/dist/controls/PointerLockControls.d.ts +9 -0
- package/dist/controls/PointerLockControls.d.ts.map +1 -0
- package/dist/controls/PointerLockControls.js +14 -0
- package/dist/controls/PointerLockControls.js.map +1 -0
- package/dist/controls/SelectionManager.d.ts +8 -0
- package/dist/controls/SelectionManager.d.ts.map +1 -0
- package/dist/controls/SelectionManager.js +15 -0
- package/dist/controls/SelectionManager.js.map +1 -0
- package/dist/controls/TrackballControls.d.ts +18 -0
- package/dist/controls/TrackballControls.d.ts.map +1 -0
- package/dist/controls/TrackballControls.js +99 -0
- package/dist/controls/TrackballControls.js.map +1 -0
- package/dist/controls/TransformControls.d.ts +11 -0
- package/dist/controls/TransformControls.d.ts.map +1 -0
- package/dist/controls/TransformControls.js +19 -0
- package/dist/controls/TransformControls.js.map +1 -0
- package/dist/controls/index.d.ts +21 -0
- package/dist/controls/index.d.ts.map +1 -0
- package/dist/controls/index.js +15 -0
- package/dist/controls/index.js.map +1 -0
- package/dist/core/Diagnostics.d.ts +25 -0
- package/dist/core/Diagnostics.d.ts.map +1 -0
- package/dist/core/Diagnostics.js +60 -0
- package/dist/core/Diagnostics.js.map +1 -0
- package/dist/core/Disposable.d.ts +12 -0
- package/dist/core/Disposable.d.ts.map +1 -0
- package/dist/core/Disposable.js +37 -0
- package/dist/core/Disposable.js.map +1 -0
- package/dist/core/Engine.d.ts +46 -0
- package/dist/core/Engine.d.ts.map +1 -0
- package/dist/core/Engine.js +130 -0
- package/dist/core/Engine.js.map +1 -0
- package/dist/core/EngineConfig.d.ts +18 -0
- package/dist/core/EngineConfig.d.ts.map +1 -0
- package/dist/core/EngineConfig.js +23 -0
- package/dist/core/EngineConfig.js.map +1 -0
- package/dist/core/EngineLoop.d.ts +33 -0
- package/dist/core/EngineLoop.d.ts.map +1 -0
- package/dist/core/EngineLoop.js +63 -0
- package/dist/core/EngineLoop.js.map +1 -0
- package/dist/core/Errors.d.ts +14 -0
- package/dist/core/Errors.d.ts.map +1 -0
- package/dist/core/Errors.js +24 -0
- package/dist/core/Errors.js.map +1 -0
- package/dist/core/EventBus.d.ts +18 -0
- package/dist/core/EventBus.d.ts.map +1 -0
- package/dist/core/EventBus.js +45 -0
- package/dist/core/EventBus.js.map +1 -0
- package/dist/core/FixedStepAccumulator.d.ts +15 -0
- package/dist/core/FixedStepAccumulator.d.ts.map +1 -0
- package/dist/core/FixedStepAccumulator.js +34 -0
- package/dist/core/FixedStepAccumulator.js.map +1 -0
- package/dist/core/Logger.d.ts +23 -0
- package/dist/core/Logger.d.ts.map +1 -0
- package/dist/core/Logger.js +53 -0
- package/dist/core/Logger.js.map +1 -0
- package/dist/core/ResourceScope.d.ts +18 -0
- package/dist/core/ResourceScope.d.ts.map +1 -0
- package/dist/core/ResourceScope.js +53 -0
- package/dist/core/ResourceScope.js.map +1 -0
- package/dist/core/Scheduler.d.ts +31 -0
- package/dist/core/Scheduler.d.ts.map +1 -0
- package/dist/core/Scheduler.js +77 -0
- package/dist/core/Scheduler.js.map +1 -0
- package/dist/core/TaskQueue.d.ts +13 -0
- package/dist/core/TaskQueue.d.ts.map +1 -0
- package/dist/core/TaskQueue.js +42 -0
- package/dist/core/TaskQueue.js.map +1 -0
- package/dist/core/Time.d.ts +24 -0
- package/dist/core/Time.d.ts.map +1 -0
- package/dist/core/Time.js +45 -0
- package/dist/core/Time.js.map +1 -0
- package/dist/core/VersionedSerialization.d.ts +96 -0
- package/dist/core/VersionedSerialization.d.ts.map +1 -0
- package/dist/core/VersionedSerialization.js +278 -0
- package/dist/core/VersionedSerialization.js.map +1 -0
- package/dist/core/index.d.ts +15 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +15 -0
- package/dist/core/index.js.map +1 -0
- package/dist/create-aura3d/cli.d.ts +3 -0
- package/dist/create-aura3d/cli.d.ts.map +1 -0
- package/dist/create-aura3d/cli.js +27 -0
- package/dist/create-aura3d/cli.js.map +1 -0
- package/dist/create-aura3d/index.d.ts +16 -0
- package/dist/create-aura3d/index.d.ts.map +1 -0
- package/dist/create-aura3d/index.js +63 -0
- package/dist/create-aura3d/index.js.map +1 -0
- package/dist/debug/AnimationInspector.d.ts +25 -0
- package/dist/debug/AnimationInspector.d.ts.map +1 -0
- package/dist/debug/AnimationInspector.js +46 -0
- package/dist/debug/AnimationInspector.js.map +1 -0
- package/dist/debug/ChromeTraceExporter.d.ts +35 -0
- package/dist/debug/ChromeTraceExporter.d.ts.map +1 -0
- package/dist/debug/ChromeTraceExporter.js +110 -0
- package/dist/debug/ChromeTraceExporter.js.map +1 -0
- package/dist/debug/DebugLineCanvasRenderer.d.ts +24 -0
- package/dist/debug/DebugLineCanvasRenderer.d.ts.map +1 -0
- package/dist/debug/DebugLineCanvasRenderer.js +58 -0
- package/dist/debug/DebugLineCanvasRenderer.js.map +1 -0
- package/dist/debug/DebugOverlay.d.ts +18 -0
- package/dist/debug/DebugOverlay.d.ts.map +1 -0
- package/dist/debug/DebugOverlay.js +19 -0
- package/dist/debug/DebugOverlay.js.map +1 -0
- package/dist/debug/DrawCallTracker.d.ts +22 -0
- package/dist/debug/DrawCallTracker.d.ts.map +1 -0
- package/dist/debug/DrawCallTracker.js +28 -0
- package/dist/debug/DrawCallTracker.js.map +1 -0
- package/dist/debug/ECSInspector.d.ts +16 -0
- package/dist/debug/ECSInspector.d.ts.map +1 -0
- package/dist/debug/ECSInspector.js +12 -0
- package/dist/debug/ECSInspector.js.map +1 -0
- package/dist/debug/GPUProfiler.d.ts +22 -0
- package/dist/debug/GPUProfiler.d.ts.map +1 -0
- package/dist/debug/GPUProfiler.js +32 -0
- package/dist/debug/GPUProfiler.js.map +1 -0
- package/dist/debug/MaterialDiagnostics.d.ts +17 -0
- package/dist/debug/MaterialDiagnostics.d.ts.map +1 -0
- package/dist/debug/MaterialDiagnostics.js +43 -0
- package/dist/debug/MaterialDiagnostics.js.map +1 -0
- package/dist/debug/PhysicsDebugAdapter.d.ts +29 -0
- package/dist/debug/PhysicsDebugAdapter.d.ts.map +1 -0
- package/dist/debug/PhysicsDebugAdapter.js +57 -0
- package/dist/debug/PhysicsDebugAdapter.js.map +1 -0
- package/dist/debug/Profiler.d.ts +24 -0
- package/dist/debug/Profiler.d.ts.map +1 -0
- package/dist/debug/Profiler.js +56 -0
- package/dist/debug/Profiler.js.map +1 -0
- package/dist/debug/RenderStateInspector.d.ts +19 -0
- package/dist/debug/RenderStateInspector.d.ts.map +1 -0
- package/dist/debug/RenderStateInspector.js +33 -0
- package/dist/debug/RenderStateInspector.js.map +1 -0
- package/dist/debug/ReportExporter.d.ts +12 -0
- package/dist/debug/ReportExporter.d.ts.map +1 -0
- package/dist/debug/ReportExporter.js +27 -0
- package/dist/debug/ReportExporter.js.map +1 -0
- package/dist/debug/ResourceTracker.d.ts +23 -0
- package/dist/debug/ResourceTracker.d.ts.map +1 -0
- package/dist/debug/ResourceTracker.js +41 -0
- package/dist/debug/ResourceTracker.js.map +1 -0
- package/dist/debug/SceneHelpers.d.ts +46 -0
- package/dist/debug/SceneHelpers.d.ts.map +1 -0
- package/dist/debug/SceneHelpers.js +137 -0
- package/dist/debug/SceneHelpers.js.map +1 -0
- package/dist/debug/ShaderDiagnostics.d.ts +20 -0
- package/dist/debug/ShaderDiagnostics.d.ts.map +1 -0
- package/dist/debug/ShaderDiagnostics.js +49 -0
- package/dist/debug/ShaderDiagnostics.js.map +1 -0
- package/dist/debug/index.d.ts +31 -0
- package/dist/debug/index.d.ts.map +1 -0
- package/dist/debug/index.js +16 -0
- package/dist/debug/index.js.map +1 -0
- package/dist/ecs/Archetype.d.ts +11 -0
- package/dist/ecs/Archetype.d.ts.map +1 -0
- package/dist/ecs/Archetype.js +19 -0
- package/dist/ecs/Archetype.js.map +1 -0
- package/dist/ecs/Bitset.d.ts +12 -0
- package/dist/ecs/Bitset.d.ts.map +1 -0
- package/dist/ecs/Bitset.js +43 -0
- package/dist/ecs/Bitset.js.map +1 -0
- package/dist/ecs/CommandBuffer.d.ts +16 -0
- package/dist/ecs/CommandBuffer.d.ts.map +1 -0
- package/dist/ecs/CommandBuffer.js +86 -0
- package/dist/ecs/CommandBuffer.js.map +1 -0
- package/dist/ecs/Component.d.ts +18 -0
- package/dist/ecs/Component.d.ts.map +1 -0
- package/dist/ecs/Component.js +7 -0
- package/dist/ecs/Component.js.map +1 -0
- package/dist/ecs/ComponentRegistry.d.ts +12 -0
- package/dist/ecs/ComponentRegistry.d.ts.map +1 -0
- package/dist/ecs/ComponentRegistry.js +36 -0
- package/dist/ecs/ComponentRegistry.js.map +1 -0
- package/dist/ecs/ComponentStore.d.ts +21 -0
- package/dist/ecs/ComponentStore.d.ts.map +1 -0
- package/dist/ecs/ComponentStore.js +66 -0
- package/dist/ecs/ComponentStore.js.map +1 -0
- package/dist/ecs/ECSProfiler.d.ts +12 -0
- package/dist/ecs/ECSProfiler.d.ts.map +1 -0
- package/dist/ecs/ECSProfiler.js +13 -0
- package/dist/ecs/ECSProfiler.js.map +1 -0
- package/dist/ecs/ECSSerializer.d.ts +18 -0
- package/dist/ecs/ECSSerializer.d.ts.map +1 -0
- package/dist/ecs/ECSSerializer.js +37 -0
- package/dist/ecs/ECSSerializer.js.map +1 -0
- package/dist/ecs/Entity.d.ts +8 -0
- package/dist/ecs/Entity.d.ts.map +1 -0
- package/dist/ecs/Entity.js +14 -0
- package/dist/ecs/Entity.js.map +1 -0
- package/dist/ecs/EntityManager.d.ts +12 -0
- package/dist/ecs/EntityManager.d.ts.map +1 -0
- package/dist/ecs/EntityManager.js +33 -0
- package/dist/ecs/EntityManager.js.map +1 -0
- package/dist/ecs/Query.d.ts +24 -0
- package/dist/ecs/Query.d.ts.map +1 -0
- package/dist/ecs/Query.js +47 -0
- package/dist/ecs/Query.js.map +1 -0
- package/dist/ecs/SparseSet.d.ts +14 -0
- package/dist/ecs/SparseSet.d.ts.map +1 -0
- package/dist/ecs/SparseSet.js +50 -0
- package/dist/ecs/SparseSet.js.map +1 -0
- package/dist/ecs/System.d.ts +18 -0
- package/dist/ecs/System.d.ts.map +1 -0
- package/dist/ecs/System.js +2 -0
- package/dist/ecs/System.js.map +1 -0
- package/dist/ecs/SystemScheduler.d.ts +10 -0
- package/dist/ecs/SystemScheduler.d.ts.map +1 -0
- package/dist/ecs/SystemScheduler.js +79 -0
- package/dist/ecs/SystemScheduler.js.map +1 -0
- package/dist/ecs/World.d.ts +27 -0
- package/dist/ecs/World.d.ts.map +1 -0
- package/dist/ecs/World.js +68 -0
- package/dist/ecs/World.js.map +1 -0
- package/dist/ecs/components/ActiveComponent.d.ts +16 -0
- package/dist/ecs/components/ActiveComponent.d.ts.map +1 -0
- package/dist/ecs/components/ActiveComponent.js +46 -0
- package/dist/ecs/components/ActiveComponent.js.map +1 -0
- package/dist/ecs/components/HierarchyComponent.d.ts +34 -0
- package/dist/ecs/components/HierarchyComponent.d.ts.map +1 -0
- package/dist/ecs/components/HierarchyComponent.js +103 -0
- package/dist/ecs/components/HierarchyComponent.js.map +1 -0
- package/dist/ecs/components/NameComponent.d.ts +5 -0
- package/dist/ecs/components/NameComponent.d.ts.map +1 -0
- package/dist/ecs/components/NameComponent.js +10 -0
- package/dist/ecs/components/NameComponent.js.map +1 -0
- package/dist/ecs/components/TagComponent.d.ts +5 -0
- package/dist/ecs/components/TagComponent.d.ts.map +1 -0
- package/dist/ecs/components/TagComponent.js +10 -0
- package/dist/ecs/components/TagComponent.js.map +1 -0
- package/dist/ecs/components/TransformComponent.d.ts +18 -0
- package/dist/ecs/components/TransformComponent.d.ts.map +1 -0
- package/dist/ecs/components/TransformComponent.js +27 -0
- package/dist/ecs/components/TransformComponent.js.map +1 -0
- package/dist/ecs/index.d.ts +22 -0
- package/dist/ecs/index.d.ts.map +1 -0
- package/dist/ecs/index.js +22 -0
- package/dist/ecs/index.js.map +1 -0
- package/dist/ecs/systems/ActiveSystem.d.ts +16 -0
- package/dist/ecs/systems/ActiveSystem.d.ts.map +1 -0
- package/dist/ecs/systems/ActiveSystem.js +61 -0
- package/dist/ecs/systems/ActiveSystem.js.map +1 -0
- package/dist/ecs/systems/HierarchySystem.d.ts +25 -0
- package/dist/ecs/systems/HierarchySystem.d.ts.map +1 -0
- package/dist/ecs/systems/HierarchySystem.js +185 -0
- package/dist/ecs/systems/HierarchySystem.js.map +1 -0
- package/dist/ecs/systems/index.d.ts +3 -0
- package/dist/ecs/systems/index.d.ts.map +1 -0
- package/dist/ecs/systems/index.js +3 -0
- package/dist/ecs/systems/index.js.map +1 -0
- package/dist/editor/index.d.ts +2 -0
- package/dist/editor/index.d.ts.map +1 -0
- package/dist/editor/index.js +2 -0
- package/dist/editor/index.js.map +1 -0
- package/dist/editor-runtime/Command.d.ts +11 -0
- package/dist/editor-runtime/Command.d.ts.map +1 -0
- package/dist/editor-runtime/Command.js +2 -0
- package/dist/editor-runtime/Command.js.map +1 -0
- package/dist/editor-runtime/CommandHistory.d.ts +20 -0
- package/dist/editor-runtime/CommandHistory.d.ts.map +1 -0
- package/dist/editor-runtime/CommandHistory.js +124 -0
- package/dist/editor-runtime/CommandHistory.js.map +1 -0
- package/dist/editor-runtime/DiagnosticsOverlayModel.d.ts +30 -0
- package/dist/editor-runtime/DiagnosticsOverlayModel.d.ts.map +1 -0
- package/dist/editor-runtime/DiagnosticsOverlayModel.js +57 -0
- package/dist/editor-runtime/DiagnosticsOverlayModel.js.map +1 -0
- package/dist/editor-runtime/EditorPluginHost.d.ts +46 -0
- package/dist/editor-runtime/EditorPluginHost.d.ts.map +1 -0
- package/dist/editor-runtime/EditorPluginHost.js +57 -0
- package/dist/editor-runtime/EditorPluginHost.js.map +1 -0
- package/dist/editor-runtime/EditorRuntime.d.ts +95 -0
- package/dist/editor-runtime/EditorRuntime.d.ts.map +1 -0
- package/dist/editor-runtime/EditorRuntime.js +277 -0
- package/dist/editor-runtime/EditorRuntime.js.map +1 -0
- package/dist/editor-runtime/EditorStateModel.d.ts +93 -0
- package/dist/editor-runtime/EditorStateModel.d.ts.map +1 -0
- package/dist/editor-runtime/EditorStateModel.js +251 -0
- package/dist/editor-runtime/EditorStateModel.js.map +1 -0
- package/dist/editor-runtime/Gizmo.d.ts +43 -0
- package/dist/editor-runtime/Gizmo.d.ts.map +1 -0
- package/dist/editor-runtime/Gizmo.js +60 -0
- package/dist/editor-runtime/Gizmo.js.map +1 -0
- package/dist/editor-runtime/HierarchyModel.d.ts +21 -0
- package/dist/editor-runtime/HierarchyModel.d.ts.map +1 -0
- package/dist/editor-runtime/HierarchyModel.js +32 -0
- package/dist/editor-runtime/HierarchyModel.js.map +1 -0
- package/dist/editor-runtime/InspectorModel.d.ts +16 -0
- package/dist/editor-runtime/InspectorModel.d.ts.map +1 -0
- package/dist/editor-runtime/InspectorModel.js +53 -0
- package/dist/editor-runtime/InspectorModel.js.map +1 -0
- package/dist/editor-runtime/LocalizationAccessibilityFixtures.d.ts +70 -0
- package/dist/editor-runtime/LocalizationAccessibilityFixtures.d.ts.map +1 -0
- package/dist/editor-runtime/LocalizationAccessibilityFixtures.js +275 -0
- package/dist/editor-runtime/LocalizationAccessibilityFixtures.js.map +1 -0
- package/dist/editor-runtime/MaterialVariantWorkflow.d.ts +19 -0
- package/dist/editor-runtime/MaterialVariantWorkflow.d.ts.map +1 -0
- package/dist/editor-runtime/MaterialVariantWorkflow.js +82 -0
- package/dist/editor-runtime/MaterialVariantWorkflow.js.map +1 -0
- package/dist/editor-runtime/PickingService.d.ts +58 -0
- package/dist/editor-runtime/PickingService.d.ts.map +1 -0
- package/dist/editor-runtime/PickingService.js +119 -0
- package/dist/editor-runtime/PickingService.js.map +1 -0
- package/dist/editor-runtime/PlayModeBridge.d.ts +14 -0
- package/dist/editor-runtime/PlayModeBridge.d.ts.map +1 -0
- package/dist/editor-runtime/PlayModeBridge.js +23 -0
- package/dist/editor-runtime/PlayModeBridge.js.map +1 -0
- package/dist/editor-runtime/PrefabRegistry.d.ts +41 -0
- package/dist/editor-runtime/PrefabRegistry.d.ts.map +1 -0
- package/dist/editor-runtime/PrefabRegistry.js +119 -0
- package/dist/editor-runtime/PrefabRegistry.js.map +1 -0
- package/dist/editor-runtime/ProjectSerializer.d.ts +9 -0
- package/dist/editor-runtime/ProjectSerializer.d.ts.map +1 -0
- package/dist/editor-runtime/ProjectSerializer.js +14 -0
- package/dist/editor-runtime/ProjectSerializer.js.map +1 -0
- package/dist/editor-runtime/RotateGizmo.d.ts +5 -0
- package/dist/editor-runtime/RotateGizmo.d.ts.map +1 -0
- package/dist/editor-runtime/RotateGizmo.js +37 -0
- package/dist/editor-runtime/RotateGizmo.js.map +1 -0
- package/dist/editor-runtime/ScaleGizmo.d.ts +5 -0
- package/dist/editor-runtime/ScaleGizmo.d.ts.map +1 -0
- package/dist/editor-runtime/ScaleGizmo.js +42 -0
- package/dist/editor-runtime/ScaleGizmo.js.map +1 -0
- package/dist/editor-runtime/Selection.d.ts +20 -0
- package/dist/editor-runtime/Selection.d.ts.map +1 -0
- package/dist/editor-runtime/Selection.js +46 -0
- package/dist/editor-runtime/Selection.js.map +1 -0
- package/dist/editor-runtime/ShaderGraphModel.d.ts +69 -0
- package/dist/editor-runtime/ShaderGraphModel.d.ts.map +1 -0
- package/dist/editor-runtime/ShaderGraphModel.js +172 -0
- package/dist/editor-runtime/ShaderGraphModel.js.map +1 -0
- package/dist/editor-runtime/StaticExportRuntime.d.ts +13 -0
- package/dist/editor-runtime/StaticExportRuntime.d.ts.map +1 -0
- package/dist/editor-runtime/StaticExportRuntime.js +307 -0
- package/dist/editor-runtime/StaticExportRuntime.js.map +1 -0
- package/dist/editor-runtime/TimelineModel.d.ts +157 -0
- package/dist/editor-runtime/TimelineModel.d.ts.map +1 -0
- package/dist/editor-runtime/TimelineModel.js +271 -0
- package/dist/editor-runtime/TimelineModel.js.map +1 -0
- package/dist/editor-runtime/TranslateGizmo.d.ts +5 -0
- package/dist/editor-runtime/TranslateGizmo.d.ts.map +1 -0
- package/dist/editor-runtime/TranslateGizmo.js +41 -0
- package/dist/editor-runtime/TranslateGizmo.js.map +1 -0
- package/dist/editor-runtime/commands/CreateNodeCommand.d.ts +14 -0
- package/dist/editor-runtime/commands/CreateNodeCommand.d.ts.map +1 -0
- package/dist/editor-runtime/commands/CreateNodeCommand.js +16 -0
- package/dist/editor-runtime/commands/CreateNodeCommand.js.map +1 -0
- package/dist/editor-runtime/commands/DeleteNodeCommand.d.ts +13 -0
- package/dist/editor-runtime/commands/DeleteNodeCommand.d.ts.map +1 -0
- package/dist/editor-runtime/commands/DeleteNodeCommand.js +55 -0
- package/dist/editor-runtime/commands/DeleteNodeCommand.js.map +1 -0
- package/dist/editor-runtime/commands/ReparentNodeCommand.d.ts +24 -0
- package/dist/editor-runtime/commands/ReparentNodeCommand.d.ts.map +1 -0
- package/dist/editor-runtime/commands/ReparentNodeCommand.js +39 -0
- package/dist/editor-runtime/commands/ReparentNodeCommand.js.map +1 -0
- package/dist/editor-runtime/commands/SetPropertyCommand.d.ts +14 -0
- package/dist/editor-runtime/commands/SetPropertyCommand.d.ts.map +1 -0
- package/dist/editor-runtime/commands/SetPropertyCommand.js +43 -0
- package/dist/editor-runtime/commands/SetPropertyCommand.js.map +1 -0
- package/dist/editor-runtime/commands/TransformCommand.d.ts +42 -0
- package/dist/editor-runtime/commands/TransformCommand.d.ts.map +1 -0
- package/dist/editor-runtime/commands/TransformCommand.js +72 -0
- package/dist/editor-runtime/commands/TransformCommand.js.map +1 -0
- package/dist/editor-runtime/index.d.ts +47 -0
- package/dist/editor-runtime/index.d.ts.map +1 -0
- package/dist/editor-runtime/index.js +28 -0
- package/dist/editor-runtime/index.js.map +1 -0
- package/dist/engine/A3DApp.d.ts +3 -0
- package/dist/engine/A3DApp.d.ts.map +1 -0
- package/dist/engine/A3DApp.js +2 -0
- package/dist/engine/A3DApp.js.map +1 -0
- package/dist/engine/A3DQualityPresets.d.ts +7 -0
- package/dist/engine/A3DQualityPresets.d.ts.map +1 -0
- package/dist/engine/A3DQualityPresets.js +9 -0
- package/dist/engine/A3DQualityPresets.js.map +1 -0
- package/dist/engine/advanced-runtime/A3DAppLifecycle.d.ts +26 -0
- package/dist/engine/advanced-runtime/A3DAppLifecycle.d.ts.map +1 -0
- package/dist/engine/advanced-runtime/A3DAppLifecycle.js +77 -0
- package/dist/engine/advanced-runtime/A3DAppLifecycle.js.map +1 -0
- package/dist/engine/advanced-runtime/A3DRenderer.d.ts +22 -0
- package/dist/engine/advanced-runtime/A3DRenderer.d.ts.map +1 -0
- package/dist/engine/advanced-runtime/A3DRenderer.js +85 -0
- package/dist/engine/advanced-runtime/A3DRenderer.js.map +1 -0
- package/dist/engine/advanced-runtime/A3DScene.d.ts +29 -0
- package/dist/engine/advanced-runtime/A3DScene.d.ts.map +1 -0
- package/dist/engine/advanced-runtime/A3DScene.js +83 -0
- package/dist/engine/advanced-runtime/A3DScene.js.map +1 -0
- package/dist/engine/advanced-runtime/index.d.ts +11 -0
- package/dist/engine/advanced-runtime/index.d.ts.map +1 -0
- package/dist/engine/advanced-runtime/index.js +6 -0
- package/dist/engine/advanced-runtime/index.js.map +1 -0
- package/dist/engine/agent-api/assets/humanoid-fixture.glb +0 -0
- package/dist/engine/agent-api/assets/player-fixture.glb +0 -0
- package/dist/engine/agent-api/humanoid-walk-runtime.d.ts +89 -0
- package/dist/engine/agent-api/humanoid-walk-runtime.d.ts.map +1 -0
- package/dist/engine/agent-api/humanoid-walk-runtime.js +287 -0
- package/dist/engine/agent-api/humanoid-walk-runtime.js.map +1 -0
- package/dist/engine/agent-api/index.d.ts +1592 -0
- package/dist/engine/agent-api/index.d.ts.map +1 -0
- package/dist/engine/agent-api/index.js +8493 -0
- package/dist/engine/agent-api/index.js.map +1 -0
- package/dist/engine/agent-api/particle-fountain-runtime.d.ts +91 -0
- package/dist/engine/agent-api/particle-fountain-runtime.d.ts.map +1 -0
- package/dist/engine/agent-api/particle-fountain-runtime.js +299 -0
- package/dist/engine/agent-api/particle-fountain-runtime.js.map +1 -0
- package/dist/engine/agent-api/product-viewer-runtime.d.ts +115 -0
- package/dist/engine/agent-api/product-viewer-runtime.d.ts.map +1 -0
- package/dist/engine/agent-api/product-viewer-runtime.js +338 -0
- package/dist/engine/agent-api/product-viewer-runtime.js.map +1 -0
- package/dist/engine/devtools/AuraAssetPanel.d.ts +9 -0
- package/dist/engine/devtools/AuraAssetPanel.d.ts.map +1 -0
- package/dist/engine/devtools/AuraAssetPanel.js +9 -0
- package/dist/engine/devtools/AuraAssetPanel.js.map +1 -0
- package/dist/engine/devtools/AuraDiagnosticsOverlay.d.ts +8 -0
- package/dist/engine/devtools/AuraDiagnosticsOverlay.d.ts.map +1 -0
- package/dist/engine/devtools/AuraDiagnosticsOverlay.js +42 -0
- package/dist/engine/devtools/AuraDiagnosticsOverlay.js.map +1 -0
- package/dist/engine/devtools/AuraPerformancePanel.d.ts +10 -0
- package/dist/engine/devtools/AuraPerformancePanel.d.ts.map +1 -0
- package/dist/engine/devtools/AuraPerformancePanel.js +10 -0
- package/dist/engine/devtools/AuraPerformancePanel.js.map +1 -0
- package/dist/engine/index.d.ts +91 -0
- package/dist/engine/index.d.ts.map +1 -0
- package/dist/engine/index.js +136 -0
- package/dist/engine/index.js.map +1 -0
- package/dist/engine/production-runtime/index.d.ts +492 -0
- package/dist/engine/production-runtime/index.d.ts.map +1 -0
- package/dist/engine/production-runtime/index.js +1267 -0
- package/dist/engine/production-runtime/index.js.map +1 -0
- package/dist/engine/testing/routeHealth.d.ts +10 -0
- package/dist/engine/testing/routeHealth.d.ts.map +1 -0
- package/dist/engine/testing/routeHealth.js +16 -0
- package/dist/engine/testing/routeHealth.js.map +1 -0
- package/dist/engine/testing/screenshot.d.ts +4 -0
- package/dist/engine/testing/screenshot.d.ts.map +1 -0
- package/dist/engine/testing/screenshot.js +10 -0
- package/dist/engine/testing/screenshot.js.map +1 -0
- package/dist/engine/threejs-example-parity/FlagshipFoundation.d.ts +158 -0
- package/dist/engine/threejs-example-parity/FlagshipFoundation.d.ts.map +1 -0
- package/dist/engine/threejs-example-parity/FlagshipFoundation.js +332 -0
- package/dist/engine/threejs-example-parity/FlagshipFoundation.js.map +1 -0
- package/dist/engine/threejs-example-parity/index.d.ts +113 -0
- package/dist/engine/threejs-example-parity/index.d.ts.map +1 -0
- package/dist/engine/threejs-example-parity/index.js +737 -0
- package/dist/engine/threejs-example-parity/index.js.map +1 -0
- package/dist/environments/EnvironmentPreview.d.ts +13 -0
- package/dist/environments/EnvironmentPreview.d.ts.map +1 -0
- package/dist/environments/EnvironmentPreview.js +16 -0
- package/dist/environments/EnvironmentPreview.js.map +1 -0
- package/dist/environments/EnvironmentRegistry.d.ts +35 -0
- package/dist/environments/EnvironmentRegistry.d.ts.map +1 -0
- package/dist/environments/EnvironmentRegistry.js +39 -0
- package/dist/environments/EnvironmentRegistry.js.map +1 -0
- package/dist/environments/HDRIEnvironment.d.ts +38 -0
- package/dist/environments/HDRIEnvironment.d.ts.map +1 -0
- package/dist/environments/HDRIEnvironment.js +34 -0
- package/dist/environments/HDRIEnvironment.js.map +1 -0
- package/dist/environments/PMREMPreset.d.ts +14 -0
- package/dist/environments/PMREMPreset.d.ts.map +1 -0
- package/dist/environments/PMREMPreset.js +16 -0
- package/dist/environments/PMREMPreset.js.map +1 -0
- package/dist/environments/index.d.ts +11 -0
- package/dist/environments/index.d.ts.map +1 -0
- package/dist/environments/index.js +6 -0
- package/dist/environments/index.js.map +1 -0
- package/dist/environments/production-runtime/ProductionEnvironmentCorpus.d.ts +78 -0
- package/dist/environments/production-runtime/ProductionEnvironmentCorpus.d.ts.map +1 -0
- package/dist/environments/production-runtime/ProductionEnvironmentCorpus.js +67 -0
- package/dist/environments/production-runtime/ProductionEnvironmentCorpus.js.map +1 -0
- package/dist/environments/production-runtime/index.d.ts +3 -0
- package/dist/environments/production-runtime/index.d.ts.map +1 -0
- package/dist/environments/production-runtime/index.js +2 -0
- package/dist/environments/production-runtime/index.js.map +1 -0
- package/dist/environments/threejs-example-parity/index.d.ts +17 -0
- package/dist/environments/threejs-example-parity/index.d.ts.map +1 -0
- package/dist/environments/threejs-example-parity/index.js +49 -0
- package/dist/environments/threejs-example-parity/index.js.map +1 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.js +24 -0
- package/dist/input/ActionMap.d.ts +44 -0
- package/dist/input/ActionMap.d.ts.map +1 -0
- package/dist/input/ActionMap.js +74 -0
- package/dist/input/ActionMap.js.map +1 -0
- package/dist/input/GamepadDevice.d.ts +17 -0
- package/dist/input/GamepadDevice.d.ts.map +1 -0
- package/dist/input/GamepadDevice.js +27 -0
- package/dist/input/GamepadDevice.js.map +1 -0
- package/dist/input/GamepadInput.d.ts +3 -0
- package/dist/input/GamepadInput.d.ts.map +1 -0
- package/dist/input/GamepadInput.js +2 -0
- package/dist/input/GamepadInput.js.map +1 -0
- package/dist/input/GestureControls.d.ts +3 -0
- package/dist/input/GestureControls.d.ts.map +1 -0
- package/dist/input/GestureControls.js +2 -0
- package/dist/input/GestureControls.js.map +1 -0
- package/dist/input/GestureHapticsFixtures.d.ts +57 -0
- package/dist/input/GestureHapticsFixtures.d.ts.map +1 -0
- package/dist/input/GestureHapticsFixtures.js +115 -0
- package/dist/input/GestureHapticsFixtures.js.map +1 -0
- package/dist/input/GestureRecognizer.d.ts +19 -0
- package/dist/input/GestureRecognizer.d.ts.map +1 -0
- package/dist/input/GestureRecognizer.js +32 -0
- package/dist/input/GestureRecognizer.js.map +1 -0
- package/dist/input/InputActionBindingFixtures.d.ts +44 -0
- package/dist/input/InputActionBindingFixtures.d.ts.map +1 -0
- package/dist/input/InputActionBindingFixtures.js +86 -0
- package/dist/input/InputActionBindingFixtures.js.map +1 -0
- package/dist/input/InputReplay.d.ts +97 -0
- package/dist/input/InputReplay.d.ts.map +1 -0
- package/dist/input/InputReplay.js +189 -0
- package/dist/input/InputReplay.js.map +1 -0
- package/dist/input/InputSnapshot.d.ts +44 -0
- package/dist/input/InputSnapshot.d.ts.map +1 -0
- package/dist/input/InputSnapshot.js +44 -0
- package/dist/input/InputSnapshot.js.map +1 -0
- package/dist/input/InputSystem.d.ts +24 -0
- package/dist/input/InputSystem.d.ts.map +1 -0
- package/dist/input/InputSystem.js +77 -0
- package/dist/input/InputSystem.js.map +1 -0
- package/dist/input/InteractionSystem.d.ts +42 -0
- package/dist/input/InteractionSystem.d.ts.map +1 -0
- package/dist/input/InteractionSystem.js +80 -0
- package/dist/input/InteractionSystem.js.map +1 -0
- package/dist/input/KeyboardDevice.d.ts +18 -0
- package/dist/input/KeyboardDevice.d.ts.map +1 -0
- package/dist/input/KeyboardDevice.js +22 -0
- package/dist/input/KeyboardDevice.js.map +1 -0
- package/dist/input/PickingRay.d.ts +10 -0
- package/dist/input/PickingRay.d.ts.map +1 -0
- package/dist/input/PickingRay.js +27 -0
- package/dist/input/PickingRay.js.map +1 -0
- package/dist/input/PointerDevice.d.ts +51 -0
- package/dist/input/PointerDevice.d.ts.map +1 -0
- package/dist/input/PointerDevice.js +75 -0
- package/dist/input/PointerDevice.js.map +1 -0
- package/dist/input/VirtualTouchControls.d.ts +57 -0
- package/dist/input/VirtualTouchControls.d.ts.map +1 -0
- package/dist/input/VirtualTouchControls.js +127 -0
- package/dist/input/VirtualTouchControls.js.map +1 -0
- package/dist/input/WebXRSessionController.d.ts +108 -0
- package/dist/input/WebXRSessionController.d.ts.map +1 -0
- package/dist/input/WebXRSessionController.js +143 -0
- package/dist/input/WebXRSessionController.js.map +1 -0
- package/dist/input/XRFixtures.d.ts +65 -0
- package/dist/input/XRFixtures.d.ts.map +1 -0
- package/dist/input/XRFixtures.js +136 -0
- package/dist/input/XRFixtures.js.map +1 -0
- package/dist/input/controls/CameraRig.d.ts +12 -0
- package/dist/input/controls/CameraRig.d.ts.map +1 -0
- package/dist/input/controls/CameraRig.js +32 -0
- package/dist/input/controls/CameraRig.js.map +1 -0
- package/dist/input/controls/ControlTypes.d.ts +17 -0
- package/dist/input/controls/ControlTypes.d.ts.map +1 -0
- package/dist/input/controls/ControlTypes.js +4 -0
- package/dist/input/controls/ControlTypes.js.map +1 -0
- package/dist/input/controls/EditorFlyControls.d.ts +20 -0
- package/dist/input/controls/EditorFlyControls.d.ts.map +1 -0
- package/dist/input/controls/EditorFlyControls.js +44 -0
- package/dist/input/controls/EditorFlyControls.js.map +1 -0
- package/dist/input/controls/FirstPersonControls.d.ts +22 -0
- package/dist/input/controls/FirstPersonControls.d.ts.map +1 -0
- package/dist/input/controls/FirstPersonControls.js +44 -0
- package/dist/input/controls/FirstPersonControls.js.map +1 -0
- package/dist/input/controls/OrbitControls.d.ts +49 -0
- package/dist/input/controls/OrbitControls.d.ts.map +1 -0
- package/dist/input/controls/OrbitControls.js +131 -0
- package/dist/input/controls/OrbitControls.js.map +1 -0
- package/dist/input/controls/PointerLockControls.d.ts +11 -0
- package/dist/input/controls/PointerLockControls.d.ts.map +1 -0
- package/dist/input/controls/PointerLockControls.js +19 -0
- package/dist/input/controls/PointerLockControls.js.map +1 -0
- package/dist/input/controls/SceneCameraAdapter.d.ts +10 -0
- package/dist/input/controls/SceneCameraAdapter.d.ts.map +1 -0
- package/dist/input/controls/SceneCameraAdapter.js +90 -0
- package/dist/input/controls/SceneCameraAdapter.js.map +1 -0
- package/dist/input/controls/ThirdPersonFollowControls.d.ts +20 -0
- package/dist/input/controls/ThirdPersonFollowControls.d.ts.map +1 -0
- package/dist/input/controls/ThirdPersonFollowControls.js +33 -0
- package/dist/input/controls/ThirdPersonFollowControls.js.map +1 -0
- package/dist/input/index.d.ts +47 -0
- package/dist/input/index.d.ts.map +1 -0
- package/dist/input/index.js +25 -0
- package/dist/input/index.js.map +1 -0
- package/dist/materials/MaterialPreset.d.ts +30 -0
- package/dist/materials/MaterialPreset.d.ts.map +1 -0
- package/dist/materials/MaterialPreset.js +2 -0
- package/dist/materials/MaterialPreset.js.map +1 -0
- package/dist/materials/MaterialPresets.d.ts +3 -0
- package/dist/materials/MaterialPresets.d.ts.map +1 -0
- package/dist/materials/MaterialPresets.js +2 -0
- package/dist/materials/MaterialPresets.js.map +1 -0
- package/dist/materials/MaterialPreviewScene.d.ts +12 -0
- package/dist/materials/MaterialPreviewScene.d.ts.map +1 -0
- package/dist/materials/MaterialPreviewScene.js +20 -0
- package/dist/materials/MaterialPreviewScene.js.map +1 -0
- package/dist/materials/MaterialValidation.d.ts +14 -0
- package/dist/materials/MaterialValidation.d.ts.map +1 -0
- package/dist/materials/MaterialValidation.js +26 -0
- package/dist/materials/MaterialValidation.js.map +1 -0
- package/dist/materials/NodeMaterial.d.ts +11 -0
- package/dist/materials/NodeMaterial.d.ts.map +1 -0
- package/dist/materials/NodeMaterial.js +15 -0
- package/dist/materials/NodeMaterial.js.map +1 -0
- package/dist/materials/PBRMaterialLibrary.d.ts +7 -0
- package/dist/materials/PBRMaterialLibrary.d.ts.map +1 -0
- package/dist/materials/PBRMaterialLibrary.js +89 -0
- package/dist/materials/PBRMaterialLibrary.js.map +1 -0
- package/dist/materials/TextureSet.d.ts +17 -0
- package/dist/materials/TextureSet.d.ts.map +1 -0
- package/dist/materials/TextureSet.js +40 -0
- package/dist/materials/TextureSet.js.map +1 -0
- package/dist/materials/browser-index.d.ts +9 -0
- package/dist/materials/browser-index.d.ts.map +1 -0
- package/dist/materials/browser-index.js +6 -0
- package/dist/materials/browser-index.js.map +1 -0
- package/dist/materials/index.d.ts +11 -0
- package/dist/materials/index.d.ts.map +1 -0
- package/dist/materials/index.js +7 -0
- package/dist/materials/index.js.map +1 -0
- package/dist/math/Box3.d.ts +19 -0
- package/dist/math/Box3.d.ts.map +1 -0
- package/dist/math/Box3.js +61 -0
- package/dist/math/Box3.js.map +1 -0
- package/dist/math/Color.d.ts +15 -0
- package/dist/math/Color.d.ts.map +1 -0
- package/dist/math/Color.js +41 -0
- package/dist/math/Color.js.map +1 -0
- package/dist/math/Curves.d.ts +22 -0
- package/dist/math/Curves.d.ts.map +1 -0
- package/dist/math/Curves.js +74 -0
- package/dist/math/Curves.js.map +1 -0
- package/dist/math/Easing.d.ts +7 -0
- package/dist/math/Easing.d.ts.map +1 -0
- package/dist/math/Easing.js +24 -0
- package/dist/math/Easing.js.map +1 -0
- package/dist/math/Euler.d.ts +12 -0
- package/dist/math/Euler.d.ts.map +1 -0
- package/dist/math/Euler.js +30 -0
- package/dist/math/Euler.js.map +1 -0
- package/dist/math/Frustum.d.ts +14 -0
- package/dist/math/Frustum.d.ts.map +1 -0
- package/dist/math/Frustum.js +40 -0
- package/dist/math/Frustum.js.map +1 -0
- package/dist/math/Interpolation.d.ts +11 -0
- package/dist/math/Interpolation.d.ts.map +1 -0
- package/dist/math/Interpolation.js +30 -0
- package/dist/math/Interpolation.js.map +1 -0
- package/dist/math/Matrix3.d.ts +9 -0
- package/dist/math/Matrix3.d.ts.map +1 -0
- package/dist/math/Matrix3.js +51 -0
- package/dist/math/Matrix3.js.map +1 -0
- package/dist/math/Matrix4.d.ts +45 -0
- package/dist/math/Matrix4.d.ts.map +1 -0
- package/dist/math/Matrix4.js +204 -0
- package/dist/math/Matrix4.js.map +1 -0
- package/dist/math/Plane.d.ts +11 -0
- package/dist/math/Plane.d.ts.map +1 -0
- package/dist/math/Plane.js +31 -0
- package/dist/math/Plane.js.map +1 -0
- package/dist/math/Quaternion.d.ts +25 -0
- package/dist/math/Quaternion.d.ts.map +1 -0
- package/dist/math/Quaternion.js +121 -0
- package/dist/math/Quaternion.js.map +1 -0
- package/dist/math/Random.d.ts +9 -0
- package/dist/math/Random.d.ts.map +1 -0
- package/dist/math/Random.js +30 -0
- package/dist/math/Random.js.map +1 -0
- package/dist/math/Ray.d.ts +14 -0
- package/dist/math/Ray.d.ts.map +1 -0
- package/dist/math/Ray.js +67 -0
- package/dist/math/Ray.js.map +1 -0
- package/dist/math/Sphere.d.ts +9 -0
- package/dist/math/Sphere.d.ts.map +1 -0
- package/dist/math/Sphere.js +18 -0
- package/dist/math/Sphere.js.map +1 -0
- package/dist/math/Transform.d.ts +14 -0
- package/dist/math/Transform.d.ts.map +1 -0
- package/dist/math/Transform.js +28 -0
- package/dist/math/Transform.js.map +1 -0
- package/dist/math/Vector2.d.ts +22 -0
- package/dist/math/Vector2.d.ts.map +1 -0
- package/dist/math/Vector2.js +54 -0
- package/dist/math/Vector2.js.map +1 -0
- package/dist/math/Vector3.d.ts +34 -0
- package/dist/math/Vector3.d.ts.map +1 -0
- package/dist/math/Vector3.js +77 -0
- package/dist/math/Vector3.js.map +1 -0
- package/dist/math/Vector4.d.ts +19 -0
- package/dist/math/Vector4.d.ts.map +1 -0
- package/dist/math/Vector4.js +43 -0
- package/dist/math/Vector4.js.map +1 -0
- package/dist/math/index.d.ts +19 -0
- package/dist/math/index.d.ts.map +1 -0
- package/dist/math/index.js +19 -0
- package/dist/math/index.js.map +1 -0
- package/dist/physics/CharacterController.d.ts +52 -0
- package/dist/physics/CharacterController.d.ts.map +1 -0
- package/dist/physics/CharacterController.js +146 -0
- package/dist/physics/CharacterController.js.map +1 -0
- package/dist/physics/ClothFixtures.d.ts +87 -0
- package/dist/physics/ClothFixtures.d.ts.map +1 -0
- package/dist/physics/ClothFixtures.js +264 -0
- package/dist/physics/ClothFixtures.js.map +1 -0
- package/dist/physics/Collider.d.ts +27 -0
- package/dist/physics/Collider.d.ts.map +1 -0
- package/dist/physics/Collider.js +45 -0
- package/dist/physics/Collider.js.map +1 -0
- package/dist/physics/CollisionEvents.d.ts +26 -0
- package/dist/physics/CollisionEvents.d.ts.map +1 -0
- package/dist/physics/CollisionEvents.js +46 -0
- package/dist/physics/CollisionEvents.js.map +1 -0
- package/dist/physics/Constraint.d.ts +31 -0
- package/dist/physics/Constraint.d.ts.map +1 -0
- package/dist/physics/Constraint.js +103 -0
- package/dist/physics/Constraint.js.map +1 -0
- package/dist/physics/Constraints.d.ts +2 -0
- package/dist/physics/Constraints.d.ts.map +1 -0
- package/dist/physics/Constraints.js +2 -0
- package/dist/physics/Constraints.js.map +1 -0
- package/dist/physics/Crowd.d.ts +64 -0
- package/dist/physics/Crowd.d.ts.map +1 -0
- package/dist/physics/Crowd.js +209 -0
- package/dist/physics/Crowd.js.map +1 -0
- package/dist/physics/ECSPhysicsBridge.d.ts +17 -0
- package/dist/physics/ECSPhysicsBridge.d.ts.map +1 -0
- package/dist/physics/ECSPhysicsBridge.js +37 -0
- package/dist/physics/ECSPhysicsBridge.js.map +1 -0
- package/dist/physics/FireSmokeFixtures.d.ts +103 -0
- package/dist/physics/FireSmokeFixtures.d.ts.map +1 -0
- package/dist/physics/FireSmokeFixtures.js +271 -0
- package/dist/physics/FireSmokeFixtures.js.map +1 -0
- package/dist/physics/FluidFixtures.d.ts +75 -0
- package/dist/physics/FluidFixtures.d.ts.map +1 -0
- package/dist/physics/FluidFixtures.js +219 -0
- package/dist/physics/FluidFixtures.js.map +1 -0
- package/dist/physics/FractureFixtures.d.ts +68 -0
- package/dist/physics/FractureFixtures.d.ts.map +1 -0
- package/dist/physics/FractureFixtures.js +199 -0
- package/dist/physics/FractureFixtures.js.map +1 -0
- package/dist/physics/Navigation.d.ts +67 -0
- package/dist/physics/Navigation.d.ts.map +1 -0
- package/dist/physics/Navigation.js +261 -0
- package/dist/physics/Navigation.js.map +1 -0
- package/dist/physics/PhysicsDebugDraw.d.ts +11 -0
- package/dist/physics/PhysicsDebugDraw.d.ts.map +1 -0
- package/dist/physics/PhysicsDebugDraw.js +64 -0
- package/dist/physics/PhysicsDebugDraw.js.map +1 -0
- package/dist/physics/PhysicsSandboxFixtures.d.ts +53 -0
- package/dist/physics/PhysicsSandboxFixtures.d.ts.map +1 -0
- package/dist/physics/PhysicsSandboxFixtures.js +280 -0
- package/dist/physics/PhysicsSandboxFixtures.js.map +1 -0
- package/dist/physics/PhysicsStepper.d.ts +15 -0
- package/dist/physics/PhysicsStepper.d.ts.map +1 -0
- package/dist/physics/PhysicsStepper.js +37 -0
- package/dist/physics/PhysicsStepper.js.map +1 -0
- package/dist/physics/PhysicsWorld.d.ts +101 -0
- package/dist/physics/PhysicsWorld.d.ts.map +1 -0
- package/dist/physics/PhysicsWorld.js +868 -0
- package/dist/physics/PhysicsWorld.js.map +1 -0
- package/dist/physics/PlatformerFixtures.d.ts +70 -0
- package/dist/physics/PlatformerFixtures.d.ts.map +1 -0
- package/dist/physics/PlatformerFixtures.js +120 -0
- package/dist/physics/PlatformerFixtures.js.map +1 -0
- package/dist/physics/Raycast.d.ts +23 -0
- package/dist/physics/Raycast.d.ts.map +1 -0
- package/dist/physics/Raycast.js +271 -0
- package/dist/physics/Raycast.js.map +1 -0
- package/dist/physics/RigidBody.d.ts +69 -0
- package/dist/physics/RigidBody.d.ts.map +1 -0
- package/dist/physics/RigidBody.js +255 -0
- package/dist/physics/RigidBody.js.map +1 -0
- package/dist/physics/ScenePhysicsBridge.d.ts +42 -0
- package/dist/physics/ScenePhysicsBridge.d.ts.map +1 -0
- package/dist/physics/ScenePhysicsBridge.js +168 -0
- package/dist/physics/ScenePhysicsBridge.js.map +1 -0
- package/dist/physics/Shape.d.ts +50 -0
- package/dist/physics/Shape.d.ts.map +1 -0
- package/dist/physics/Shape.js +128 -0
- package/dist/physics/Shape.js.map +1 -0
- package/dist/physics/SoftBodyFixtures.d.ts +70 -0
- package/dist/physics/SoftBodyFixtures.d.ts.map +1 -0
- package/dist/physics/SoftBodyFixtures.js +272 -0
- package/dist/physics/SoftBodyFixtures.js.map +1 -0
- package/dist/physics/Steering.d.ts +161 -0
- package/dist/physics/Steering.d.ts.map +1 -0
- package/dist/physics/Steering.js +347 -0
- package/dist/physics/Steering.js.map +1 -0
- package/dist/physics/VehicleDynamics.d.ts +152 -0
- package/dist/physics/VehicleDynamics.d.ts.map +1 -0
- package/dist/physics/VehicleDynamics.js +335 -0
- package/dist/physics/VehicleDynamics.js.map +1 -0
- package/dist/physics/index.d.ts +25 -0
- package/dist/physics/index.d.ts.map +1 -0
- package/dist/physics/index.js +25 -0
- package/dist/physics/index.js.map +1 -0
- package/dist/product-studio/ProductAsset.d.ts +2 -0
- package/dist/product-studio/ProductAsset.d.ts.map +1 -0
- package/dist/product-studio/ProductAsset.js +2 -0
- package/dist/product-studio/ProductAsset.js.map +1 -0
- package/dist/product-studio/ProductAssetLoader.d.ts +3 -0
- package/dist/product-studio/ProductAssetLoader.d.ts.map +1 -0
- package/dist/product-studio/ProductAssetLoader.js +77 -0
- package/dist/product-studio/ProductAssetLoader.js.map +1 -0
- package/dist/product-studio/ProductCamera.d.ts +4 -0
- package/dist/product-studio/ProductCamera.d.ts.map +1 -0
- package/dist/product-studio/ProductCamera.js +45 -0
- package/dist/product-studio/ProductCamera.js.map +1 -0
- package/dist/product-studio/ProductDiagnostics.d.ts +4 -0
- package/dist/product-studio/ProductDiagnostics.d.ts.map +1 -0
- package/dist/product-studio/ProductDiagnostics.js +21 -0
- package/dist/product-studio/ProductDiagnostics.js.map +1 -0
- package/dist/product-studio/ProductExport.d.ts +4 -0
- package/dist/product-studio/ProductExport.d.ts.map +1 -0
- package/dist/product-studio/ProductExport.js +40 -0
- package/dist/product-studio/ProductExport.js.map +1 -0
- package/dist/product-studio/ProductFloor.d.ts +4 -0
- package/dist/product-studio/ProductFloor.d.ts.map +1 -0
- package/dist/product-studio/ProductFloor.js +15 -0
- package/dist/product-studio/ProductFloor.js.map +1 -0
- package/dist/product-studio/ProductLighting.d.ts +3 -0
- package/dist/product-studio/ProductLighting.d.ts.map +1 -0
- package/dist/product-studio/ProductLighting.js +42 -0
- package/dist/product-studio/ProductLighting.js.map +1 -0
- package/dist/product-studio/ProductMaterials.d.ts +5 -0
- package/dist/product-studio/ProductMaterials.d.ts.map +1 -0
- package/dist/product-studio/ProductMaterials.js +41 -0
- package/dist/product-studio/ProductMaterials.js.map +1 -0
- package/dist/product-studio/ProductRenderScene.d.ts +4 -0
- package/dist/product-studio/ProductRenderScene.d.ts.map +1 -0
- package/dist/product-studio/ProductRenderScene.js +46 -0
- package/dist/product-studio/ProductRenderScene.js.map +1 -0
- package/dist/product-studio/ProductShowcaseLayout.d.ts +32 -0
- package/dist/product-studio/ProductShowcaseLayout.d.ts.map +1 -0
- package/dist/product-studio/ProductShowcaseLayout.js +54 -0
- package/dist/product-studio/ProductShowcaseLayout.js.map +1 -0
- package/dist/product-studio/ProductStudio.d.ts +3 -0
- package/dist/product-studio/ProductStudio.d.ts.map +1 -0
- package/dist/product-studio/ProductStudio.js +51 -0
- package/dist/product-studio/ProductStudio.js.map +1 -0
- package/dist/product-studio/ProductTypes.d.ts +133 -0
- package/dist/product-studio/ProductTypes.d.ts.map +1 -0
- package/dist/product-studio/ProductTypes.js +2 -0
- package/dist/product-studio/ProductTypes.js.map +1 -0
- package/dist/product-studio/index.d.ts +13 -0
- package/dist/product-studio/index.d.ts.map +1 -0
- package/dist/product-studio/index.js +11 -0
- package/dist/product-studio/index.js.map +1 -0
- package/dist/react/index.d.ts +44 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +116 -0
- package/dist/react/index.js.map +1 -0
- package/dist/rendering/ArchitecturalLightingFixtures.d.ts +40 -0
- package/dist/rendering/ArchitecturalLightingFixtures.d.ts.map +1 -0
- package/dist/rendering/ArchitecturalLightingFixtures.js +171 -0
- package/dist/rendering/ArchitecturalLightingFixtures.js.map +1 -0
- package/dist/rendering/ArchitecturalMaterialCatalog.d.ts +30 -0
- package/dist/rendering/ArchitecturalMaterialCatalog.d.ts.map +1 -0
- package/dist/rendering/ArchitecturalMaterialCatalog.js +90 -0
- package/dist/rendering/ArchitecturalMaterialCatalog.js.map +1 -0
- package/dist/rendering/ArchitecturalMeasurementFixtures.d.ts +30 -0
- package/dist/rendering/ArchitecturalMeasurementFixtures.d.ts.map +1 -0
- package/dist/rendering/ArchitecturalMeasurementFixtures.js +115 -0
- package/dist/rendering/ArchitecturalMeasurementFixtures.js.map +1 -0
- package/dist/rendering/BRDFLut.d.ts +13 -0
- package/dist/rendering/BRDFLut.d.ts.map +1 -0
- package/dist/rendering/BRDFLut.js +34 -0
- package/dist/rendering/BRDFLut.js.map +1 -0
- package/dist/rendering/CameraFraming.d.ts +31 -0
- package/dist/rendering/CameraFraming.d.ts.map +1 -0
- package/dist/rendering/CameraFraming.js +143 -0
- package/dist/rendering/CameraFraming.js.map +1 -0
- package/dist/rendering/CanonicalSceneFixtures.d.ts +13 -0
- package/dist/rendering/CanonicalSceneFixtures.d.ts.map +1 -0
- package/dist/rendering/CanonicalSceneFixtures.js +78 -0
- package/dist/rendering/CanonicalSceneFixtures.js.map +1 -0
- package/dist/rendering/CascadedShadowMaps.d.ts +121 -0
- package/dist/rendering/CascadedShadowMaps.d.ts.map +1 -0
- package/dist/rendering/CascadedShadowMaps.js +315 -0
- package/dist/rendering/CascadedShadowMaps.js.map +1 -0
- package/dist/rendering/ColorManagement.d.ts +33 -0
- package/dist/rendering/ColorManagement.d.ts.map +1 -0
- package/dist/rendering/ColorManagement.js +71 -0
- package/dist/rendering/ColorManagement.js.map +1 -0
- package/dist/rendering/CullingFixtures.d.ts +70 -0
- package/dist/rendering/CullingFixtures.d.ts.map +1 -0
- package/dist/rendering/CullingFixtures.js +191 -0
- package/dist/rendering/CullingFixtures.js.map +1 -0
- package/dist/rendering/DecalGeometry.d.ts +3 -0
- package/dist/rendering/DecalGeometry.d.ts.map +1 -0
- package/dist/rendering/DecalGeometry.js +2 -0
- package/dist/rendering/DecalGeometry.js.map +1 -0
- package/dist/rendering/DepthPass.d.ts +23 -0
- package/dist/rendering/DepthPass.d.ts.map +1 -0
- package/dist/rendering/DepthPass.js +99 -0
- package/dist/rendering/DepthPass.js.map +1 -0
- package/dist/rendering/EnvironmentBackgroundPass.d.ts +27 -0
- package/dist/rendering/EnvironmentBackgroundPass.d.ts.map +1 -0
- package/dist/rendering/EnvironmentBackgroundPass.js +167 -0
- package/dist/rendering/EnvironmentBackgroundPass.js.map +1 -0
- package/dist/rendering/EnvironmentBackgroundResources.d.ts +31 -0
- package/dist/rendering/EnvironmentBackgroundResources.d.ts.map +1 -0
- package/dist/rendering/EnvironmentBackgroundResources.js +237 -0
- package/dist/rendering/EnvironmentBackgroundResources.js.map +1 -0
- package/dist/rendering/EnvironmentLighting.d.ts +10 -0
- package/dist/rendering/EnvironmentLighting.d.ts.map +1 -0
- package/dist/rendering/EnvironmentLighting.js +64 -0
- package/dist/rendering/EnvironmentLighting.js.map +1 -0
- package/dist/rendering/EnvironmentMapResources.d.ts +98 -0
- package/dist/rendering/EnvironmentMapResources.d.ts.map +1 -0
- package/dist/rendering/EnvironmentMapResources.js +794 -0
- package/dist/rendering/EnvironmentMapResources.js.map +1 -0
- package/dist/rendering/EnvironmentPipeline.d.ts +21 -0
- package/dist/rendering/EnvironmentPipeline.d.ts.map +1 -0
- package/dist/rendering/EnvironmentPipeline.js +43 -0
- package/dist/rendering/EnvironmentPipeline.js.map +1 -0
- package/dist/rendering/EnvironmentPlatform.d.ts +185 -0
- package/dist/rendering/EnvironmentPlatform.d.ts.map +1 -0
- package/dist/rendering/EnvironmentPlatform.js +922 -0
- package/dist/rendering/EnvironmentPlatform.js.map +1 -0
- package/dist/rendering/EnvironmentPreset.d.ts +35 -0
- package/dist/rendering/EnvironmentPreset.d.ts.map +1 -0
- package/dist/rendering/EnvironmentPreset.js +96 -0
- package/dist/rendering/EnvironmentPreset.js.map +1 -0
- package/dist/rendering/Exposure.d.ts +19 -0
- package/dist/rendering/Exposure.d.ts.map +1 -0
- package/dist/rendering/Exposure.js +34 -0
- package/dist/rendering/Exposure.js.map +1 -0
- package/dist/rendering/ExternalParityRenderPreset.d.ts +149 -0
- package/dist/rendering/ExternalParityRenderPreset.d.ts.map +1 -0
- package/dist/rendering/ExternalParityRenderPreset.js +519 -0
- package/dist/rendering/ExternalParityRenderPreset.js.map +1 -0
- package/dist/rendering/ForwardPass.d.ts +122 -0
- package/dist/rendering/ForwardPass.d.ts.map +1 -0
- package/dist/rendering/ForwardPass.js +1352 -0
- package/dist/rendering/ForwardPass.js.map +1 -0
- package/dist/rendering/FrameVisualMetrics.d.ts +60 -0
- package/dist/rendering/FrameVisualMetrics.d.ts.map +1 -0
- package/dist/rendering/FrameVisualMetrics.js +146 -0
- package/dist/rendering/FrameVisualMetrics.js.map +1 -0
- package/dist/rendering/Geometry.d.ts +50 -0
- package/dist/rendering/Geometry.d.ts.map +1 -0
- package/dist/rendering/Geometry.js +385 -0
- package/dist/rendering/Geometry.js.map +1 -0
- package/dist/rendering/GeometryPrimitives.d.ts +3 -0
- package/dist/rendering/GeometryPrimitives.d.ts.map +1 -0
- package/dist/rendering/GeometryPrimitives.js +2 -0
- package/dist/rendering/GeometryPrimitives.js.map +1 -0
- package/dist/rendering/HDRRenderPipeline.d.ts +27 -0
- package/dist/rendering/HDRRenderPipeline.d.ts.map +1 -0
- package/dist/rendering/HDRRenderPipeline.js +67 -0
- package/dist/rendering/HDRRenderPipeline.js.map +1 -0
- package/dist/rendering/IBL.d.ts +37 -0
- package/dist/rendering/IBL.d.ts.map +1 -0
- package/dist/rendering/IBL.js +48 -0
- package/dist/rendering/IBL.js.map +1 -0
- package/dist/rendering/IndexBuffer.d.ts +15 -0
- package/dist/rendering/IndexBuffer.d.ts.map +1 -0
- package/dist/rendering/IndexBuffer.js +51 -0
- package/dist/rendering/IndexBuffer.js.map +1 -0
- package/dist/rendering/InstancedPBRMaterial.d.ts +33 -0
- package/dist/rendering/InstancedPBRMaterial.d.ts.map +1 -0
- package/dist/rendering/InstancedPBRMaterial.js +147 -0
- package/dist/rendering/InstancedPBRMaterial.js.map +1 -0
- package/dist/rendering/InstancedUnlitMaterial.d.ts +11 -0
- package/dist/rendering/InstancedUnlitMaterial.d.ts.map +1 -0
- package/dist/rendering/InstancedUnlitMaterial.js +50 -0
- package/dist/rendering/InstancedUnlitMaterial.js.map +1 -0
- package/dist/rendering/Instancing.d.ts +7 -0
- package/dist/rendering/Instancing.d.ts.map +1 -0
- package/dist/rendering/Instancing.js +14 -0
- package/dist/rendering/Instancing.js.map +1 -0
- package/dist/rendering/LightCollector.d.ts +24 -0
- package/dist/rendering/LightCollector.d.ts.map +1 -0
- package/dist/rendering/LightCollector.js +56 -0
- package/dist/rendering/LightCollector.js.map +1 -0
- package/dist/rendering/LightUniforms.d.ts +14 -0
- package/dist/rendering/LightUniforms.d.ts.map +1 -0
- package/dist/rendering/LightUniforms.js +37 -0
- package/dist/rendering/LightUniforms.js.map +1 -0
- package/dist/rendering/LightingDebug.d.ts +13 -0
- package/dist/rendering/LightingDebug.d.ts.map +1 -0
- package/dist/rendering/LightingDebug.js +69 -0
- package/dist/rendering/LightingDebug.js.map +1 -0
- package/dist/rendering/LightingDefaults.d.ts +13 -0
- package/dist/rendering/LightingDefaults.d.ts.map +1 -0
- package/dist/rendering/LightingDefaults.js +64 -0
- package/dist/rendering/LightingDefaults.js.map +1 -0
- package/dist/rendering/LightingRig.d.ts +53 -0
- package/dist/rendering/LightingRig.d.ts.map +1 -0
- package/dist/rendering/LightingRig.js +197 -0
- package/dist/rendering/LightingRig.js.map +1 -0
- package/dist/rendering/LineGeometry.d.ts +3 -0
- package/dist/rendering/LineGeometry.d.ts.map +1 -0
- package/dist/rendering/LineGeometry.js +2 -0
- package/dist/rendering/LineGeometry.js.map +1 -0
- package/dist/rendering/Material.d.ts +77 -0
- package/dist/rendering/Material.d.ts.map +1 -0
- package/dist/rendering/Material.js +137 -0
- package/dist/rendering/Material.js.map +1 -0
- package/dist/rendering/MaterialBinding.d.ts +17 -0
- package/dist/rendering/MaterialBinding.d.ts.map +1 -0
- package/dist/rendering/MaterialBinding.js +119 -0
- package/dist/rendering/MaterialBinding.js.map +1 -0
- package/dist/rendering/MaterialInstance.d.ts +16 -0
- package/dist/rendering/MaterialInstance.d.ts.map +1 -0
- package/dist/rendering/MaterialInstance.js +53 -0
- package/dist/rendering/MaterialInstance.js.map +1 -0
- package/dist/rendering/MaterialPresets.d.ts +31 -0
- package/dist/rendering/MaterialPresets.d.ts.map +1 -0
- package/dist/rendering/MaterialPresets.js +219 -0
- package/dist/rendering/MaterialPresets.js.map +1 -0
- package/dist/rendering/MorphTarget.d.ts +10 -0
- package/dist/rendering/MorphTarget.d.ts.map +1 -0
- package/dist/rendering/MorphTarget.js +101 -0
- package/dist/rendering/MorphTarget.js.map +1 -0
- package/dist/rendering/MorphUnlitMaterial.d.ts +11 -0
- package/dist/rendering/MorphUnlitMaterial.d.ts.map +1 -0
- package/dist/rendering/MorphUnlitMaterial.js +45 -0
- package/dist/rendering/MorphUnlitMaterial.js.map +1 -0
- package/dist/rendering/NormalMappedPBRMaterial.d.ts +37 -0
- package/dist/rendering/NormalMappedPBRMaterial.d.ts.map +1 -0
- package/dist/rendering/NormalMappedPBRMaterial.js +148 -0
- package/dist/rendering/NormalMappedPBRMaterial.js.map +1 -0
- package/dist/rendering/OceanFixtures.d.ts +62 -0
- package/dist/rendering/OceanFixtures.d.ts.map +1 -0
- package/dist/rendering/OceanFixtures.js +240 -0
- package/dist/rendering/OceanFixtures.js.map +1 -0
- package/dist/rendering/PBRLightingDefaults.d.ts +4 -0
- package/dist/rendering/PBRLightingDefaults.d.ts.map +1 -0
- package/dist/rendering/PBRLightingDefaults.js +10 -0
- package/dist/rendering/PBRLightingDefaults.js.map +1 -0
- package/dist/rendering/PBRMaterial.d.ts +84 -0
- package/dist/rendering/PBRMaterial.d.ts.map +1 -0
- package/dist/rendering/PBRMaterial.js +349 -0
- package/dist/rendering/PBRMaterial.js.map +1 -0
- package/dist/rendering/PMREM.d.ts +26 -0
- package/dist/rendering/PMREM.d.ts.map +1 -0
- package/dist/rendering/PMREM.js +26 -0
- package/dist/rendering/PMREM.js.map +1 -0
- package/dist/rendering/PbrReference.d.ts +153 -0
- package/dist/rendering/PbrReference.d.ts.map +1 -0
- package/dist/rendering/PbrReference.js +500 -0
- package/dist/rendering/PbrReference.js.map +1 -0
- package/dist/rendering/PostProcessPass.d.ts +439 -0
- package/dist/rendering/PostProcessPass.d.ts.map +1 -0
- package/dist/rendering/PostProcessPass.js +1834 -0
- package/dist/rendering/PostProcessPass.js.map +1 -0
- package/dist/rendering/ProceduralTextureFixtures.d.ts +27 -0
- package/dist/rendering/ProceduralTextureFixtures.d.ts.map +1 -0
- package/dist/rendering/ProceduralTextureFixtures.js +336 -0
- package/dist/rendering/ProceduralTextureFixtures.js.map +1 -0
- package/dist/rendering/ProductTurntableFixtures.d.ts +96 -0
- package/dist/rendering/ProductTurntableFixtures.d.ts.map +1 -0
- package/dist/rendering/ProductTurntableFixtures.js +559 -0
- package/dist/rendering/ProductTurntableFixtures.js.map +1 -0
- package/dist/rendering/Raycaster.d.ts +14 -0
- package/dist/rendering/Raycaster.d.ts.map +1 -0
- package/dist/rendering/Raycaster.js +10 -0
- package/dist/rendering/Raycaster.js.map +1 -0
- package/dist/rendering/ReflectionProbe.d.ts +8 -0
- package/dist/rendering/ReflectionProbe.d.ts.map +1 -0
- package/dist/rendering/ReflectionProbe.js +10 -0
- package/dist/rendering/ReflectionProbe.js.map +1 -0
- package/dist/rendering/ReflectionSurfaces.d.ts +35 -0
- package/dist/rendering/ReflectionSurfaces.d.ts.map +1 -0
- package/dist/rendering/ReflectionSurfaces.js +155 -0
- package/dist/rendering/ReflectionSurfaces.js.map +1 -0
- package/dist/rendering/RenderBackend.d.ts +14 -0
- package/dist/rendering/RenderBackend.d.ts.map +1 -0
- package/dist/rendering/RenderBackend.js +33 -0
- package/dist/rendering/RenderBackend.js.map +1 -0
- package/dist/rendering/RenderDebugViews.d.ts +26 -0
- package/dist/rendering/RenderDebugViews.d.ts.map +1 -0
- package/dist/rendering/RenderDebugViews.js +97 -0
- package/dist/rendering/RenderDebugViews.js.map +1 -0
- package/dist/rendering/RenderDevice.d.ts +280 -0
- package/dist/rendering/RenderDevice.d.ts.map +1 -0
- package/dist/rendering/RenderDevice.js +561 -0
- package/dist/rendering/RenderDevice.js.map +1 -0
- package/dist/rendering/RenderGraph.d.ts +22 -0
- package/dist/rendering/RenderGraph.d.ts.map +1 -0
- package/dist/rendering/RenderGraph.js +159 -0
- package/dist/rendering/RenderGraph.js.map +1 -0
- package/dist/rendering/RenderPass.d.ts +23 -0
- package/dist/rendering/RenderPass.d.ts.map +1 -0
- package/dist/rendering/RenderPass.js +14 -0
- package/dist/rendering/RenderPass.js.map +1 -0
- package/dist/rendering/RenderPipeline.d.ts +39 -0
- package/dist/rendering/RenderPipeline.d.ts.map +1 -0
- package/dist/rendering/RenderPipeline.js +67 -0
- package/dist/rendering/RenderPipeline.js.map +1 -0
- package/dist/rendering/RenderQueue.d.ts +3 -0
- package/dist/rendering/RenderQueue.d.ts.map +1 -0
- package/dist/rendering/RenderQueue.js +2 -0
- package/dist/rendering/RenderQueue.js.map +1 -0
- package/dist/rendering/RenderState.d.ts +3 -0
- package/dist/rendering/RenderState.d.ts.map +1 -0
- package/dist/rendering/RenderState.js +2 -0
- package/dist/rendering/RenderState.js.map +1 -0
- package/dist/rendering/Renderer.d.ts +265 -0
- package/dist/rendering/Renderer.d.ts.map +1 -0
- package/dist/rendering/Renderer.js +2094 -0
- package/dist/rendering/Renderer.js.map +1 -0
- package/dist/rendering/RendererDebugOverlay.d.ts +20 -0
- package/dist/rendering/RendererDebugOverlay.d.ts.map +1 -0
- package/dist/rendering/RendererDebugOverlay.js +54 -0
- package/dist/rendering/RendererDebugOverlay.js.map +1 -0
- package/dist/rendering/RendererFeatureGates.d.ts +17 -0
- package/dist/rendering/RendererFeatureGates.d.ts.map +1 -0
- package/dist/rendering/RendererFeatureGates.js +92 -0
- package/dist/rendering/RendererFeatureGates.js.map +1 -0
- package/dist/rendering/RendererPostprocessPlan.d.ts +59 -0
- package/dist/rendering/RendererPostprocessPlan.d.ts.map +1 -0
- package/dist/rendering/RendererPostprocessPlan.js +155 -0
- package/dist/rendering/RendererPostprocessPlan.js.map +1 -0
- package/dist/rendering/RendererTiming.d.ts +53 -0
- package/dist/rendering/RendererTiming.d.ts.map +1 -0
- package/dist/rendering/RendererTiming.js +186 -0
- package/dist/rendering/RendererTiming.js.map +1 -0
- package/dist/rendering/RendererVisualPipelineReport.d.ts +224 -0
- package/dist/rendering/RendererVisualPipelineReport.d.ts.map +1 -0
- package/dist/rendering/RendererVisualPipelineReport.js +499 -0
- package/dist/rendering/RendererVisualPipelineReport.js.map +1 -0
- package/dist/rendering/ResourceLifecycle.d.ts +8 -0
- package/dist/rendering/ResourceLifecycle.d.ts.map +1 -0
- package/dist/rendering/ResourceLifecycle.js +18 -0
- package/dist/rendering/ResourceLifecycle.js.map +1 -0
- package/dist/rendering/Sampler.d.ts +20 -0
- package/dist/rendering/Sampler.d.ts.map +1 -0
- package/dist/rendering/Sampler.js +19 -0
- package/dist/rendering/Sampler.js.map +1 -0
- package/dist/rendering/SceneOptimization.d.ts +127 -0
- package/dist/rendering/SceneOptimization.d.ts.map +1 -0
- package/dist/rendering/SceneOptimization.js +342 -0
- package/dist/rendering/SceneOptimization.js.map +1 -0
- package/dist/rendering/ShaderChunks.d.ts +8 -0
- package/dist/rendering/ShaderChunks.d.ts.map +1 -0
- package/dist/rendering/ShaderChunks.js +386 -0
- package/dist/rendering/ShaderChunks.js.map +1 -0
- package/dist/rendering/ShaderLibrary.d.ts +63 -0
- package/dist/rendering/ShaderLibrary.d.ts.map +1 -0
- package/dist/rendering/ShaderLibrary.js +2707 -0
- package/dist/rendering/ShaderLibrary.js.map +1 -0
- package/dist/rendering/ShaderModule.d.ts +14 -0
- package/dist/rendering/ShaderModule.d.ts.map +1 -0
- package/dist/rendering/ShaderModule.js +33 -0
- package/dist/rendering/ShaderModule.js.map +1 -0
- package/dist/rendering/ShaderPreprocessor.d.ts +19 -0
- package/dist/rendering/ShaderPreprocessor.d.ts.map +1 -0
- package/dist/rendering/ShaderPreprocessor.js +212 -0
- package/dist/rendering/ShaderPreprocessor.js.map +1 -0
- package/dist/rendering/ShaderReflection.d.ts +23 -0
- package/dist/rendering/ShaderReflection.d.ts.map +1 -0
- package/dist/rendering/ShaderReflection.js +134 -0
- package/dist/rendering/ShaderReflection.js.map +1 -0
- package/dist/rendering/ShadowMap.d.ts +58 -0
- package/dist/rendering/ShadowMap.d.ts.map +1 -0
- package/dist/rendering/ShadowMap.js +183 -0
- package/dist/rendering/ShadowMap.js.map +1 -0
- package/dist/rendering/ShadowPass.d.ts +44 -0
- package/dist/rendering/ShadowPass.d.ts.map +1 -0
- package/dist/rendering/ShadowPass.js +162 -0
- package/dist/rendering/ShadowPass.js.map +1 -0
- package/dist/rendering/ShadowProjection.d.ts +15 -0
- package/dist/rendering/ShadowProjection.d.ts.map +1 -0
- package/dist/rendering/ShadowProjection.js +90 -0
- package/dist/rendering/ShadowProjection.js.map +1 -0
- package/dist/rendering/SkinnedLitMaterial.d.ts +63 -0
- package/dist/rendering/SkinnedLitMaterial.d.ts.map +1 -0
- package/dist/rendering/SkinnedLitMaterial.js +296 -0
- package/dist/rendering/SkinnedLitMaterial.js.map +1 -0
- package/dist/rendering/SkinnedUnlitMaterial.d.ts +13 -0
- package/dist/rendering/SkinnedUnlitMaterial.d.ts.map +1 -0
- package/dist/rendering/SkinnedUnlitMaterial.js +52 -0
- package/dist/rendering/SkinnedUnlitMaterial.js.map +1 -0
- package/dist/rendering/SkinningBounds.d.ts +10 -0
- package/dist/rendering/SkinningBounds.d.ts.map +1 -0
- package/dist/rendering/SkinningBounds.js +107 -0
- package/dist/rendering/SkinningBounds.js.map +1 -0
- package/dist/rendering/SpaceEnvironmentFixtures.d.ts +59 -0
- package/dist/rendering/SpaceEnvironmentFixtures.d.ts.map +1 -0
- package/dist/rendering/SpaceEnvironmentFixtures.js +132 -0
- package/dist/rendering/SpaceEnvironmentFixtures.js.map +1 -0
- package/dist/rendering/SpriteGeometry.d.ts +3 -0
- package/dist/rendering/SpriteGeometry.d.ts.map +1 -0
- package/dist/rendering/SpriteGeometry.js +21 -0
- package/dist/rendering/SpriteGeometry.js.map +1 -0
- package/dist/rendering/StereoCameraRig.d.ts +34 -0
- package/dist/rendering/StereoCameraRig.d.ts.map +1 -0
- package/dist/rendering/StereoCameraRig.js +79 -0
- package/dist/rendering/StereoCameraRig.js.map +1 -0
- package/dist/rendering/StereoEffects.d.ts +90 -0
- package/dist/rendering/StereoEffects.d.ts.map +1 -0
- package/dist/rendering/StereoEffects.js +171 -0
- package/dist/rendering/StereoEffects.js.map +1 -0
- package/dist/rendering/TerrainFixtures.d.ts +36 -0
- package/dist/rendering/TerrainFixtures.d.ts.map +1 -0
- package/dist/rendering/TerrainFixtures.js +143 -0
- package/dist/rendering/TerrainFixtures.js.map +1 -0
- package/dist/rendering/Texture.d.ts +64 -0
- package/dist/rendering/Texture.d.ts.map +1 -0
- package/dist/rendering/Texture.js +257 -0
- package/dist/rendering/Texture.js.map +1 -0
- package/dist/rendering/TextureBinding.d.ts +38 -0
- package/dist/rendering/TextureBinding.d.ts.map +1 -0
- package/dist/rendering/TextureBinding.js +66 -0
- package/dist/rendering/TextureBinding.js.map +1 -0
- package/dist/rendering/TexturedPBRMaterial.d.ts +206 -0
- package/dist/rendering/TexturedPBRMaterial.d.ts.map +1 -0
- package/dist/rendering/TexturedPBRMaterial.js +842 -0
- package/dist/rendering/TexturedPBRMaterial.js.map +1 -0
- package/dist/rendering/TexturedUnlitMaterial.d.ts +19 -0
- package/dist/rendering/TexturedUnlitMaterial.d.ts.map +1 -0
- package/dist/rendering/TexturedUnlitMaterial.js +52 -0
- package/dist/rendering/TexturedUnlitMaterial.js.map +1 -0
- package/dist/rendering/ToneMapping.d.ts +19 -0
- package/dist/rendering/ToneMapping.d.ts.map +1 -0
- package/dist/rendering/ToneMapping.js +53 -0
- package/dist/rendering/ToneMapping.js.map +1 -0
- package/dist/rendering/UniformBinder.d.ts +7 -0
- package/dist/rendering/UniformBinder.d.ts.map +1 -0
- package/dist/rendering/UniformBinder.js +14 -0
- package/dist/rendering/UniformBinder.js.map +1 -0
- package/dist/rendering/UniformLayout.d.ts +19 -0
- package/dist/rendering/UniformLayout.d.ts.map +1 -0
- package/dist/rendering/UniformLayout.js +107 -0
- package/dist/rendering/UniformLayout.js.map +1 -0
- package/dist/rendering/UnlitMaterial.d.ts +16 -0
- package/dist/rendering/UnlitMaterial.d.ts.map +1 -0
- package/dist/rendering/UnlitMaterial.js +60 -0
- package/dist/rendering/UnlitMaterial.js.map +1 -0
- package/dist/rendering/VegetationFixtures.d.ts +68 -0
- package/dist/rendering/VegetationFixtures.d.ts.map +1 -0
- package/dist/rendering/VegetationFixtures.js +241 -0
- package/dist/rendering/VegetationFixtures.js.map +1 -0
- package/dist/rendering/VertexBuffer.d.ts +29 -0
- package/dist/rendering/VertexBuffer.d.ts.map +1 -0
- package/dist/rendering/VertexBuffer.js +106 -0
- package/dist/rendering/VertexBuffer.js.map +1 -0
- package/dist/rendering/VertexFormat.d.ts +36 -0
- package/dist/rendering/VertexFormat.d.ts.map +1 -0
- package/dist/rendering/VertexFormat.js +127 -0
- package/dist/rendering/VertexFormat.js.map +1 -0
- package/dist/rendering/VoxelWorldFixtures.d.ts +54 -0
- package/dist/rendering/VoxelWorldFixtures.d.ts.map +1 -0
- package/dist/rendering/VoxelWorldFixtures.js +186 -0
- package/dist/rendering/VoxelWorldFixtures.js.map +1 -0
- package/dist/rendering/WeatherFixtures.d.ts +46 -0
- package/dist/rendering/WeatherFixtures.d.ts.map +1 -0
- package/dist/rendering/WeatherFixtures.js +142 -0
- package/dist/rendering/WeatherFixtures.js.map +1 -0
- package/dist/rendering/WebGL2Device.d.ts +137 -0
- package/dist/rendering/WebGL2Device.d.ts.map +1 -0
- package/dist/rendering/WebGL2Device.js +2107 -0
- package/dist/rendering/WebGL2Device.js.map +1 -0
- package/dist/rendering/WebGL2StateCache.d.ts +89 -0
- package/dist/rendering/WebGL2StateCache.d.ts.map +1 -0
- package/dist/rendering/WebGL2StateCache.js +265 -0
- package/dist/rendering/WebGL2StateCache.js.map +1 -0
- package/dist/rendering/WebGPUDevice.d.ts +287 -0
- package/dist/rendering/WebGPUDevice.d.ts.map +1 -0
- package/dist/rendering/WebGPUDevice.js +2403 -0
- package/dist/rendering/WebGPUDevice.js.map +1 -0
- package/dist/rendering/WebGPURenderToTextureProof.d.ts +29 -0
- package/dist/rendering/WebGPURenderToTextureProof.d.ts.map +1 -0
- package/dist/rendering/WebGPURenderToTextureProof.js +96 -0
- package/dist/rendering/WebGPURenderToTextureProof.js.map +1 -0
- package/dist/rendering/advanced-runtime/AdvancedRenderer.d.ts +23 -0
- package/dist/rendering/advanced-runtime/AdvancedRenderer.d.ts.map +1 -0
- package/dist/rendering/advanced-runtime/AdvancedRenderer.js +45 -0
- package/dist/rendering/advanced-runtime/AdvancedRenderer.js.map +1 -0
- package/dist/rendering/advanced-runtime/index.d.ts +10 -0
- package/dist/rendering/advanced-runtime/index.d.ts.map +1 -0
- package/dist/rendering/advanced-runtime/index.js +9 -0
- package/dist/rendering/advanced-runtime/index.js.map +1 -0
- package/dist/rendering/cinematic/BloomPass.d.ts +10 -0
- package/dist/rendering/cinematic/BloomPass.d.ts.map +1 -0
- package/dist/rendering/cinematic/BloomPass.js +18 -0
- package/dist/rendering/cinematic/BloomPass.js.map +1 -0
- package/dist/rendering/cinematic/CinematicDepthComposition.d.ts +12 -0
- package/dist/rendering/cinematic/CinematicDepthComposition.d.ts.map +1 -0
- package/dist/rendering/cinematic/CinematicDepthComposition.js +22 -0
- package/dist/rendering/cinematic/CinematicDepthComposition.js.map +1 -0
- package/dist/rendering/cinematic/CinematicEvidence.d.ts +43 -0
- package/dist/rendering/cinematic/CinematicEvidence.d.ts.map +1 -0
- package/dist/rendering/cinematic/CinematicEvidence.js +55 -0
- package/dist/rendering/cinematic/CinematicEvidence.js.map +1 -0
- package/dist/rendering/cinematic/CinematicLightingRig.d.ts +32 -0
- package/dist/rendering/cinematic/CinematicLightingRig.d.ts.map +1 -0
- package/dist/rendering/cinematic/CinematicLightingRig.js +90 -0
- package/dist/rendering/cinematic/CinematicLightingRig.js.map +1 -0
- package/dist/rendering/cinematic/CinematicMaterialPresets.d.ts +16 -0
- package/dist/rendering/cinematic/CinematicMaterialPresets.d.ts.map +1 -0
- package/dist/rendering/cinematic/CinematicMaterialPresets.js +114 -0
- package/dist/rendering/cinematic/CinematicMaterialPresets.js.map +1 -0
- package/dist/rendering/cinematic/CinematicPostProcess.d.ts +25 -0
- package/dist/rendering/cinematic/CinematicPostProcess.d.ts.map +1 -0
- package/dist/rendering/cinematic/CinematicPostProcess.js +64 -0
- package/dist/rendering/cinematic/CinematicPostProcess.js.map +1 -0
- package/dist/rendering/cinematic/DepthHazePass.d.ts +12 -0
- package/dist/rendering/cinematic/DepthHazePass.d.ts.map +1 -0
- package/dist/rendering/cinematic/DepthHazePass.js +20 -0
- package/dist/rendering/cinematic/DepthHazePass.js.map +1 -0
- package/dist/rendering/cinematic/EmissivePracticalLightSystem.d.ts +18 -0
- package/dist/rendering/cinematic/EmissivePracticalLightSystem.d.ts.map +1 -0
- package/dist/rendering/cinematic/EmissivePracticalLightSystem.js +25 -0
- package/dist/rendering/cinematic/EmissivePracticalLightSystem.js.map +1 -0
- package/dist/rendering/cinematic/FilmGrainPass.d.ts +9 -0
- package/dist/rendering/cinematic/FilmGrainPass.d.ts.map +1 -0
- package/dist/rendering/cinematic/FilmGrainPass.js +17 -0
- package/dist/rendering/cinematic/FilmGrainPass.js.map +1 -0
- package/dist/rendering/cinematic/FogVolumeSystem.d.ts +12 -0
- package/dist/rendering/cinematic/FogVolumeSystem.d.ts.map +1 -0
- package/dist/rendering/cinematic/FogVolumeSystem.js +20 -0
- package/dist/rendering/cinematic/FogVolumeSystem.js.map +1 -0
- package/dist/rendering/cinematic/GlowCardSystem.d.ts +17 -0
- package/dist/rendering/cinematic/GlowCardSystem.d.ts.map +1 -0
- package/dist/rendering/cinematic/GlowCardSystem.js +28 -0
- package/dist/rendering/cinematic/GlowCardSystem.js.map +1 -0
- package/dist/rendering/cinematic/RainParticleSystem.d.ts +22 -0
- package/dist/rendering/cinematic/RainParticleSystem.d.ts.map +1 -0
- package/dist/rendering/cinematic/RainParticleSystem.js +114 -0
- package/dist/rendering/cinematic/RainParticleSystem.js.map +1 -0
- package/dist/rendering/cinematic/VignettePass.d.ts +10 -0
- package/dist/rendering/cinematic/VignettePass.d.ts.map +1 -0
- package/dist/rendering/cinematic/VignettePass.js +17 -0
- package/dist/rendering/cinematic/VignettePass.js.map +1 -0
- package/dist/rendering/cinematic/WetReflectionApproximation.d.ts +13 -0
- package/dist/rendering/cinematic/WetReflectionApproximation.d.ts.map +1 -0
- package/dist/rendering/cinematic/WetReflectionApproximation.js +18 -0
- package/dist/rendering/cinematic/WetReflectionApproximation.js.map +1 -0
- package/dist/rendering/cinematic/index.d.ts +15 -0
- package/dist/rendering/cinematic/index.d.ts.map +1 -0
- package/dist/rendering/cinematic/index.js +15 -0
- package/dist/rendering/cinematic/index.js.map +1 -0
- package/dist/rendering/effects/CollisionModule.d.ts +15 -0
- package/dist/rendering/effects/CollisionModule.d.ts.map +1 -0
- package/dist/rendering/effects/CollisionModule.js +46 -0
- package/dist/rendering/effects/CollisionModule.js.map +1 -0
- package/dist/rendering/effects/ColorModule.d.ts +15 -0
- package/dist/rendering/effects/ColorModule.d.ts.map +1 -0
- package/dist/rendering/effects/ColorModule.js +45 -0
- package/dist/rendering/effects/ColorModule.js.map +1 -0
- package/dist/rendering/effects/ForceModule.d.ts +11 -0
- package/dist/rendering/effects/ForceModule.d.ts.map +1 -0
- package/dist/rendering/effects/ForceModule.js +17 -0
- package/dist/rendering/effects/ForceModule.js.map +1 -0
- package/dist/rendering/effects/GPUParticleBackend.d.ts +153 -0
- package/dist/rendering/effects/GPUParticleBackend.d.ts.map +1 -0
- package/dist/rendering/effects/GPUParticleBackend.js +397 -0
- package/dist/rendering/effects/GPUParticleBackend.js.map +1 -0
- package/dist/rendering/effects/Particle.d.ts +49 -0
- package/dist/rendering/effects/Particle.d.ts.map +1 -0
- package/dist/rendering/effects/Particle.js +56 -0
- package/dist/rendering/effects/Particle.js.map +1 -0
- package/dist/rendering/effects/ParticleDiagnostics.d.ts +58 -0
- package/dist/rendering/effects/ParticleDiagnostics.d.ts.map +1 -0
- package/dist/rendering/effects/ParticleDiagnostics.js +145 -0
- package/dist/rendering/effects/ParticleDiagnostics.js.map +1 -0
- package/dist/rendering/effects/ParticleEffectPresets.d.ts +8 -0
- package/dist/rendering/effects/ParticleEffectPresets.d.ts.map +1 -0
- package/dist/rendering/effects/ParticleEffectPresets.js +137 -0
- package/dist/rendering/effects/ParticleEffectPresets.js.map +1 -0
- package/dist/rendering/effects/ParticleEmitter.d.ts +87 -0
- package/dist/rendering/effects/ParticleEmitter.d.ts.map +1 -0
- package/dist/rendering/effects/ParticleEmitter.js +254 -0
- package/dist/rendering/effects/ParticleEmitter.js.map +1 -0
- package/dist/rendering/effects/ParticleModule.d.ts +15 -0
- package/dist/rendering/effects/ParticleModule.d.ts.map +1 -0
- package/dist/rendering/effects/ParticleModule.js +6 -0
- package/dist/rendering/effects/ParticleModule.js.map +1 -0
- package/dist/rendering/effects/ParticleRenderPass.d.ts +35 -0
- package/dist/rendering/effects/ParticleRenderPass.d.ts.map +1 -0
- package/dist/rendering/effects/ParticleRenderPass.js +91 -0
- package/dist/rendering/effects/ParticleRenderPass.js.map +1 -0
- package/dist/rendering/effects/ParticleRenderer.d.ts +34 -0
- package/dist/rendering/effects/ParticleRenderer.d.ts.map +1 -0
- package/dist/rendering/effects/ParticleRenderer.js +93 -0
- package/dist/rendering/effects/ParticleRenderer.js.map +1 -0
- package/dist/rendering/effects/ParticleSystem.d.ts +51 -0
- package/dist/rendering/effects/ParticleSystem.d.ts.map +1 -0
- package/dist/rendering/effects/ParticleSystem.js +261 -0
- package/dist/rendering/effects/ParticleSystem.js.map +1 -0
- package/dist/rendering/effects/SizeModule.d.ts +14 -0
- package/dist/rendering/effects/SizeModule.d.ts.map +1 -0
- package/dist/rendering/effects/SizeModule.js +42 -0
- package/dist/rendering/effects/SizeModule.js.map +1 -0
- package/dist/rendering/effects/TrailModule.d.ts +22 -0
- package/dist/rendering/effects/TrailModule.d.ts.map +1 -0
- package/dist/rendering/effects/TrailModule.js +50 -0
- package/dist/rendering/effects/TrailModule.js.map +1 -0
- package/dist/rendering/effects/VelocityModule.d.ts +15 -0
- package/dist/rendering/effects/VelocityModule.d.ts.map +1 -0
- package/dist/rendering/effects/VelocityModule.js +57 -0
- package/dist/rendering/effects/VelocityModule.js.map +1 -0
- package/dist/rendering/effects/index.d.ts +16 -0
- package/dist/rendering/effects/index.d.ts.map +1 -0
- package/dist/rendering/effects/index.js +16 -0
- package/dist/rendering/effects/index.js.map +1 -0
- package/dist/rendering/index.d.ts +260 -0
- package/dist/rendering/index.d.ts.map +1 -0
- package/dist/rendering/index.js +155 -0
- package/dist/rendering/index.js.map +1 -0
- package/dist/rendering/materials/AlphaSorting.d.ts +8 -0
- package/dist/rendering/materials/AlphaSorting.d.ts.map +1 -0
- package/dist/rendering/materials/AlphaSorting.js +26 -0
- package/dist/rendering/materials/AlphaSorting.js.map +1 -0
- package/dist/rendering/materials/MaterialExtensions.d.ts +10 -0
- package/dist/rendering/materials/MaterialExtensions.d.ts.map +1 -0
- package/dist/rendering/materials/MaterialExtensions.js +20 -0
- package/dist/rendering/materials/MaterialExtensions.js.map +1 -0
- package/dist/rendering/materials/PhysicalMaterial.d.ts +36 -0
- package/dist/rendering/materials/PhysicalMaterial.d.ts.map +1 -0
- package/dist/rendering/materials/PhysicalMaterial.js +79 -0
- package/dist/rendering/materials/PhysicalMaterial.js.map +1 -0
- package/dist/rendering/materials/TransmissionPass.d.ts +16 -0
- package/dist/rendering/materials/TransmissionPass.d.ts.map +1 -0
- package/dist/rendering/materials/TransmissionPass.js +30 -0
- package/dist/rendering/materials/TransmissionPass.js.map +1 -0
- package/dist/rendering/performance/BVH.d.ts +3 -0
- package/dist/rendering/performance/BVH.d.ts.map +1 -0
- package/dist/rendering/performance/BVH.js +2 -0
- package/dist/rendering/performance/BVH.js.map +1 -0
- package/dist/rendering/performance/Batcher.d.ts +3 -0
- package/dist/rendering/performance/Batcher.d.ts.map +1 -0
- package/dist/rendering/performance/Batcher.js +2 -0
- package/dist/rendering/performance/Batcher.js.map +1 -0
- package/dist/rendering/performance/FrustumCuller.d.ts +3 -0
- package/dist/rendering/performance/FrustumCuller.d.ts.map +1 -0
- package/dist/rendering/performance/FrustumCuller.js +5 -0
- package/dist/rendering/performance/FrustumCuller.js.map +1 -0
- package/dist/rendering/performance/LOD.d.ts +8 -0
- package/dist/rendering/performance/LOD.d.ts.map +1 -0
- package/dist/rendering/performance/LOD.js +15 -0
- package/dist/rendering/performance/LOD.js.map +1 -0
- package/dist/rendering/performance/Octree.d.ts +7 -0
- package/dist/rendering/performance/Octree.d.ts.map +1 -0
- package/dist/rendering/performance/Octree.js +4 -0
- package/dist/rendering/performance/Octree.js.map +1 -0
- package/dist/rendering/performance/RenderItemSorting.d.ts +43 -0
- package/dist/rendering/performance/RenderItemSorting.d.ts.map +1 -0
- package/dist/rendering/performance/RenderItemSorting.js +111 -0
- package/dist/rendering/performance/RenderItemSorting.js.map +1 -0
- package/dist/rendering/performance/RendererStats.d.ts +23 -0
- package/dist/rendering/performance/RendererStats.d.ts.map +1 -0
- package/dist/rendering/performance/RendererStats.js +23 -0
- package/dist/rendering/performance/RendererStats.js.map +1 -0
- package/dist/rendering/performance/ResourceBudget.d.ts +19 -0
- package/dist/rendering/performance/ResourceBudget.d.ts.map +1 -0
- package/dist/rendering/performance/ResourceBudget.js +21 -0
- package/dist/rendering/performance/ResourceBudget.js.map +1 -0
- package/dist/rendering/postprocess/BloomPass.d.ts +11 -0
- package/dist/rendering/postprocess/BloomPass.d.ts.map +1 -0
- package/dist/rendering/postprocess/BloomPass.js +14 -0
- package/dist/rendering/postprocess/BloomPass.js.map +1 -0
- package/dist/rendering/postprocess/CinematicDiagnostics.d.ts +112 -0
- package/dist/rendering/postprocess/CinematicDiagnostics.d.ts.map +1 -0
- package/dist/rendering/postprocess/CinematicDiagnostics.js +492 -0
- package/dist/rendering/postprocess/CinematicDiagnostics.js.map +1 -0
- package/dist/rendering/postprocess/ColorGradingPass.d.ts +4 -0
- package/dist/rendering/postprocess/ColorGradingPass.d.ts.map +1 -0
- package/dist/rendering/postprocess/ColorGradingPass.js +15 -0
- package/dist/rendering/postprocess/ColorGradingPass.js.map +1 -0
- package/dist/rendering/postprocess/DepthOfFieldPass.d.ts +3 -0
- package/dist/rendering/postprocess/DepthOfFieldPass.d.ts.map +1 -0
- package/dist/rendering/postprocess/DepthOfFieldPass.js +7 -0
- package/dist/rendering/postprocess/DepthOfFieldPass.js.map +1 -0
- package/dist/rendering/postprocess/EffectComposer.d.ts +110 -0
- package/dist/rendering/postprocess/EffectComposer.d.ts.map +1 -0
- package/dist/rendering/postprocess/EffectComposer.js +249 -0
- package/dist/rendering/postprocess/EffectComposer.js.map +1 -0
- package/dist/rendering/postprocess/SSAOPass.d.ts +6 -0
- package/dist/rendering/postprocess/SSAOPass.d.ts.map +1 -0
- package/dist/rendering/postprocess/SSAOPass.js +18 -0
- package/dist/rendering/postprocess/SSAOPass.js.map +1 -0
- package/dist/rendering/postprocess/index.d.ts +11 -0
- package/dist/rendering/postprocess/index.d.ts.map +1 -0
- package/dist/rendering/postprocess/index.js +7 -0
- package/dist/rendering/postprocess/index.js.map +1 -0
- package/dist/rendering/production-runtime/AnimationControlsPipeline.d.ts +37 -0
- package/dist/rendering/production-runtime/AnimationControlsPipeline.d.ts.map +1 -0
- package/dist/rendering/production-runtime/AnimationControlsPipeline.js +41 -0
- package/dist/rendering/production-runtime/AnimationControlsPipeline.js.map +1 -0
- package/dist/rendering/production-runtime/PBRHDRPipeline.d.ts +81 -0
- package/dist/rendering/production-runtime/PBRHDRPipeline.d.ts.map +1 -0
- package/dist/rendering/production-runtime/PBRHDRPipeline.js +279 -0
- package/dist/rendering/production-runtime/PBRHDRPipeline.js.map +1 -0
- package/dist/rendering/production-runtime/ProductionEffectsPipeline.d.ts +20 -0
- package/dist/rendering/production-runtime/ProductionEffectsPipeline.d.ts.map +1 -0
- package/dist/rendering/production-runtime/ProductionEffectsPipeline.js +65 -0
- package/dist/rendering/production-runtime/ProductionEffectsPipeline.js.map +1 -0
- package/dist/rendering/production-runtime/ProductionRendererTypes.d.ts +97 -0
- package/dist/rendering/production-runtime/ProductionRendererTypes.d.ts.map +1 -0
- package/dist/rendering/production-runtime/ProductionRendererTypes.js +29 -0
- package/dist/rendering/production-runtime/ProductionRendererTypes.js.map +1 -0
- package/dist/rendering/production-runtime/ProductionRuntimeRenderer.d.ts +36 -0
- package/dist/rendering/production-runtime/ProductionRuntimeRenderer.d.ts.map +1 -0
- package/dist/rendering/production-runtime/ProductionRuntimeRenderer.js +124 -0
- package/dist/rendering/production-runtime/ProductionRuntimeRenderer.js.map +1 -0
- package/dist/rendering/production-runtime/ProductionWebGL2Renderer.d.ts +51 -0
- package/dist/rendering/production-runtime/ProductionWebGL2Renderer.d.ts.map +1 -0
- package/dist/rendering/production-runtime/ProductionWebGL2Renderer.js +269 -0
- package/dist/rendering/production-runtime/ProductionWebGL2Renderer.js.map +1 -0
- package/dist/rendering/production-runtime/ProductionWebGPURenderer.d.ts +69 -0
- package/dist/rendering/production-runtime/ProductionWebGPURenderer.d.ts.map +1 -0
- package/dist/rendering/production-runtime/ProductionWebGPURenderer.js +313 -0
- package/dist/rendering/production-runtime/ProductionWebGPURenderer.js.map +1 -0
- package/dist/rendering/production-runtime/TransmissionBackdropCapture.d.ts +11 -0
- package/dist/rendering/production-runtime/TransmissionBackdropCapture.d.ts.map +1 -0
- package/dist/rendering/production-runtime/TransmissionBackdropCapture.js +119 -0
- package/dist/rendering/production-runtime/TransmissionBackdropCapture.js.map +1 -0
- package/dist/rendering/production-runtime/animation/MorphTargetRenderer.d.ts +7 -0
- package/dist/rendering/production-runtime/animation/MorphTargetRenderer.d.ts.map +1 -0
- package/dist/rendering/production-runtime/animation/MorphTargetRenderer.js +2 -0
- package/dist/rendering/production-runtime/animation/MorphTargetRenderer.js.map +1 -0
- package/dist/rendering/production-runtime/animation/SkinningRenderer.d.ts +7 -0
- package/dist/rendering/production-runtime/animation/SkinningRenderer.d.ts.map +1 -0
- package/dist/rendering/production-runtime/animation/SkinningRenderer.js +2 -0
- package/dist/rendering/production-runtime/animation/SkinningRenderer.js.map +1 -0
- package/dist/rendering/production-runtime/backends/RendererBackend.d.ts +16 -0
- package/dist/rendering/production-runtime/backends/RendererBackend.d.ts.map +1 -0
- package/dist/rendering/production-runtime/backends/RendererBackend.js +2 -0
- package/dist/rendering/production-runtime/backends/RendererBackend.js.map +1 -0
- package/dist/rendering/production-runtime/backends/WebGL2RendererBackend.d.ts +15 -0
- package/dist/rendering/production-runtime/backends/WebGL2RendererBackend.d.ts.map +1 -0
- package/dist/rendering/production-runtime/backends/WebGL2RendererBackend.js +25 -0
- package/dist/rendering/production-runtime/backends/WebGL2RendererBackend.js.map +1 -0
- package/dist/rendering/production-runtime/backends/WebGPURendererBackend.d.ts +20 -0
- package/dist/rendering/production-runtime/backends/WebGPURendererBackend.d.ts.map +1 -0
- package/dist/rendering/production-runtime/backends/WebGPURendererBackend.js +19 -0
- package/dist/rendering/production-runtime/backends/WebGPURendererBackend.js.map +1 -0
- package/dist/rendering/production-runtime/backends/webgl2/WebGL2Buffer.d.ts +11 -0
- package/dist/rendering/production-runtime/backends/webgl2/WebGL2Buffer.d.ts.map +1 -0
- package/dist/rendering/production-runtime/backends/webgl2/WebGL2Buffer.js +8 -0
- package/dist/rendering/production-runtime/backends/webgl2/WebGL2Buffer.js.map +1 -0
- package/dist/rendering/production-runtime/backends/webgl2/WebGL2Capabilities.d.ts +11 -0
- package/dist/rendering/production-runtime/backends/webgl2/WebGL2Capabilities.d.ts.map +1 -0
- package/dist/rendering/production-runtime/backends/webgl2/WebGL2Capabilities.js +8 -0
- package/dist/rendering/production-runtime/backends/webgl2/WebGL2Capabilities.js.map +1 -0
- package/dist/rendering/production-runtime/backends/webgl2/WebGL2RenderTarget.d.ts +11 -0
- package/dist/rendering/production-runtime/backends/webgl2/WebGL2RenderTarget.d.ts.map +1 -0
- package/dist/rendering/production-runtime/backends/webgl2/WebGL2RenderTarget.js +8 -0
- package/dist/rendering/production-runtime/backends/webgl2/WebGL2RenderTarget.js.map +1 -0
- package/dist/rendering/production-runtime/backends/webgl2/WebGL2Shader.d.ts +11 -0
- package/dist/rendering/production-runtime/backends/webgl2/WebGL2Shader.d.ts.map +1 -0
- package/dist/rendering/production-runtime/backends/webgl2/WebGL2Shader.js +8 -0
- package/dist/rendering/production-runtime/backends/webgl2/WebGL2Shader.js.map +1 -0
- package/dist/rendering/production-runtime/backends/webgl2/WebGL2StateCache.d.ts +2 -0
- package/dist/rendering/production-runtime/backends/webgl2/WebGL2StateCache.d.ts.map +1 -0
- package/dist/rendering/production-runtime/backends/webgl2/WebGL2StateCache.js +2 -0
- package/dist/rendering/production-runtime/backends/webgl2/WebGL2StateCache.js.map +1 -0
- package/dist/rendering/production-runtime/backends/webgl2/WebGL2Texture.d.ts +11 -0
- package/dist/rendering/production-runtime/backends/webgl2/WebGL2Texture.d.ts.map +1 -0
- package/dist/rendering/production-runtime/backends/webgl2/WebGL2Texture.js +8 -0
- package/dist/rendering/production-runtime/backends/webgl2/WebGL2Texture.js.map +1 -0
- package/dist/rendering/production-runtime/backends/webgpu/WebGPUBuffer.d.ts +11 -0
- package/dist/rendering/production-runtime/backends/webgpu/WebGPUBuffer.d.ts.map +1 -0
- package/dist/rendering/production-runtime/backends/webgpu/WebGPUBuffer.js +8 -0
- package/dist/rendering/production-runtime/backends/webgpu/WebGPUBuffer.js.map +1 -0
- package/dist/rendering/production-runtime/backends/webgpu/WebGPUCapabilities.d.ts +11 -0
- package/dist/rendering/production-runtime/backends/webgpu/WebGPUCapabilities.d.ts.map +1 -0
- package/dist/rendering/production-runtime/backends/webgpu/WebGPUCapabilities.js +8 -0
- package/dist/rendering/production-runtime/backends/webgpu/WebGPUCapabilities.js.map +1 -0
- package/dist/rendering/production-runtime/backends/webgpu/WebGPURenderTarget.d.ts +11 -0
- package/dist/rendering/production-runtime/backends/webgpu/WebGPURenderTarget.d.ts.map +1 -0
- package/dist/rendering/production-runtime/backends/webgpu/WebGPURenderTarget.js +8 -0
- package/dist/rendering/production-runtime/backends/webgpu/WebGPURenderTarget.js.map +1 -0
- package/dist/rendering/production-runtime/backends/webgpu/WebGPUShader.d.ts +11 -0
- package/dist/rendering/production-runtime/backends/webgpu/WebGPUShader.d.ts.map +1 -0
- package/dist/rendering/production-runtime/backends/webgpu/WebGPUShader.js +8 -0
- package/dist/rendering/production-runtime/backends/webgpu/WebGPUShader.js.map +1 -0
- package/dist/rendering/production-runtime/backends/webgpu/WebGPUTexture.d.ts +11 -0
- package/dist/rendering/production-runtime/backends/webgpu/WebGPUTexture.d.ts.map +1 -0
- package/dist/rendering/production-runtime/backends/webgpu/WebGPUTexture.js +8 -0
- package/dist/rendering/production-runtime/backends/webgpu/WebGPUTexture.js.map +1 -0
- package/dist/rendering/production-runtime/color/ColorManagement.d.ts +4 -0
- package/dist/rendering/production-runtime/color/ColorManagement.d.ts.map +1 -0
- package/dist/rendering/production-runtime/color/ColorManagement.js +3 -0
- package/dist/rendering/production-runtime/color/ColorManagement.js.map +1 -0
- package/dist/rendering/production-runtime/color/ToneMapping.d.ts +3 -0
- package/dist/rendering/production-runtime/color/ToneMapping.d.ts.map +1 -0
- package/dist/rendering/production-runtime/color/ToneMapping.js +9 -0
- package/dist/rendering/production-runtime/color/ToneMapping.js.map +1 -0
- package/dist/rendering/production-runtime/diagnostics/FrameCapture.d.ts +7 -0
- package/dist/rendering/production-runtime/diagnostics/FrameCapture.d.ts.map +1 -0
- package/dist/rendering/production-runtime/diagnostics/FrameCapture.js +2 -0
- package/dist/rendering/production-runtime/diagnostics/FrameCapture.js.map +1 -0
- package/dist/rendering/production-runtime/diagnostics/GPUCapabilities.d.ts +9 -0
- package/dist/rendering/production-runtime/diagnostics/GPUCapabilities.d.ts.map +1 -0
- package/dist/rendering/production-runtime/diagnostics/GPUCapabilities.js +2 -0
- package/dist/rendering/production-runtime/diagnostics/GPUCapabilities.js.map +1 -0
- package/dist/rendering/production-runtime/diagnostics/RendererStats.d.ts +9 -0
- package/dist/rendering/production-runtime/diagnostics/RendererStats.d.ts.map +1 -0
- package/dist/rendering/production-runtime/diagnostics/RendererStats.js +2 -0
- package/dist/rendering/production-runtime/diagnostics/RendererStats.js.map +1 -0
- package/dist/rendering/production-runtime/environment/EnvironmentMap.d.ts +8 -0
- package/dist/rendering/production-runtime/environment/EnvironmentMap.d.ts.map +1 -0
- package/dist/rendering/production-runtime/environment/EnvironmentMap.js +2 -0
- package/dist/rendering/production-runtime/environment/EnvironmentMap.js.map +1 -0
- package/dist/rendering/production-runtime/environment/HDRLoader.d.ts +19 -0
- package/dist/rendering/production-runtime/environment/HDRLoader.d.ts.map +1 -0
- package/dist/rendering/production-runtime/environment/HDRLoader.js +22 -0
- package/dist/rendering/production-runtime/environment/HDRLoader.js.map +1 -0
- package/dist/rendering/production-runtime/environment/PMREMGenerator.d.ts +99 -0
- package/dist/rendering/production-runtime/environment/PMREMGenerator.d.ts.map +1 -0
- package/dist/rendering/production-runtime/environment/PMREMGenerator.js +534 -0
- package/dist/rendering/production-runtime/environment/PMREMGenerator.js.map +1 -0
- package/dist/rendering/production-runtime/framegraph/FrameGraph.d.ts +8 -0
- package/dist/rendering/production-runtime/framegraph/FrameGraph.d.ts.map +1 -0
- package/dist/rendering/production-runtime/framegraph/FrameGraph.js +14 -0
- package/dist/rendering/production-runtime/framegraph/FrameGraph.js.map +1 -0
- package/dist/rendering/production-runtime/framegraph/RenderPass.d.ts +14 -0
- package/dist/rendering/production-runtime/framegraph/RenderPass.d.ts.map +1 -0
- package/dist/rendering/production-runtime/framegraph/RenderPass.js +2 -0
- package/dist/rendering/production-runtime/framegraph/RenderPass.js.map +1 -0
- package/dist/rendering/production-runtime/geometry/ProjectedDecalGeometry.d.ts +53 -0
- package/dist/rendering/production-runtime/geometry/ProjectedDecalGeometry.d.ts.map +1 -0
- package/dist/rendering/production-runtime/geometry/ProjectedDecalGeometry.js +340 -0
- package/dist/rendering/production-runtime/geometry/ProjectedDecalGeometry.js.map +1 -0
- package/dist/rendering/production-runtime/index.d.ts +73 -0
- package/dist/rendering/production-runtime/index.d.ts.map +1 -0
- package/dist/rendering/production-runtime/index.js +67 -0
- package/dist/rendering/production-runtime/index.js.map +1 -0
- package/dist/rendering/production-runtime/lights/LightManager.d.ts +8 -0
- package/dist/rendering/production-runtime/lights/LightManager.d.ts.map +1 -0
- package/dist/rendering/production-runtime/lights/LightManager.js +7 -0
- package/dist/rendering/production-runtime/lights/LightManager.js.map +1 -0
- package/dist/rendering/production-runtime/lights/ShadowMapRenderer.d.ts +8 -0
- package/dist/rendering/production-runtime/lights/ShadowMapRenderer.d.ts.map +1 -0
- package/dist/rendering/production-runtime/lights/ShadowMapRenderer.js +4 -0
- package/dist/rendering/production-runtime/lights/ShadowMapRenderer.js.map +1 -0
- package/dist/rendering/production-runtime/materials/GLTFMaterialAdapter.d.ts +14 -0
- package/dist/rendering/production-runtime/materials/GLTFMaterialAdapter.d.ts.map +1 -0
- package/dist/rendering/production-runtime/materials/GLTFMaterialAdapter.js +5 -0
- package/dist/rendering/production-runtime/materials/GLTFMaterialAdapter.js.map +1 -0
- package/dist/rendering/production-runtime/materials/GLTFPBRMaterialAdapter.d.ts +3 -0
- package/dist/rendering/production-runtime/materials/GLTFPBRMaterialAdapter.d.ts.map +1 -0
- package/dist/rendering/production-runtime/materials/GLTFPBRMaterialAdapter.js +2 -0
- package/dist/rendering/production-runtime/materials/GLTFPBRMaterialAdapter.js.map +1 -0
- package/dist/rendering/production-runtime/materials/MaterialCompiler.d.ts +9 -0
- package/dist/rendering/production-runtime/materials/MaterialCompiler.d.ts.map +1 -0
- package/dist/rendering/production-runtime/materials/MaterialCompiler.js +5 -0
- package/dist/rendering/production-runtime/materials/MaterialCompiler.js.map +1 -0
- package/dist/rendering/production-runtime/materials/MaterialTextureBindings.d.ts +8 -0
- package/dist/rendering/production-runtime/materials/MaterialTextureBindings.d.ts.map +1 -0
- package/dist/rendering/production-runtime/materials/MaterialTextureBindings.js +4 -0
- package/dist/rendering/production-runtime/materials/MaterialTextureBindings.js.map +1 -0
- package/dist/rendering/production-runtime/materials/PBRMaterial.d.ts +23 -0
- package/dist/rendering/production-runtime/materials/PBRMaterial.d.ts.map +1 -0
- package/dist/rendering/production-runtime/materials/PBRMaterial.js +2 -0
- package/dist/rendering/production-runtime/materials/PBRMaterial.js.map +1 -0
- package/dist/rendering/production-runtime/materials/PBRShaderFeatures.d.ts +13 -0
- package/dist/rendering/production-runtime/materials/PBRShaderFeatures.d.ts.map +1 -0
- package/dist/rendering/production-runtime/materials/PBRShaderFeatures.js +2 -0
- package/dist/rendering/production-runtime/materials/PBRShaderFeatures.js.map +1 -0
- package/dist/rendering/production-runtime/passes/ContactShadowPass.d.ts +40 -0
- package/dist/rendering/production-runtime/passes/ContactShadowPass.d.ts.map +1 -0
- package/dist/rendering/production-runtime/passes/ContactShadowPass.js +126 -0
- package/dist/rendering/production-runtime/passes/ContactShadowPass.js.map +1 -0
- package/dist/rendering/production-runtime/passes/DepthPrepass.d.ts +8 -0
- package/dist/rendering/production-runtime/passes/DepthPrepass.d.ts.map +1 -0
- package/dist/rendering/production-runtime/passes/DepthPrepass.js +7 -0
- package/dist/rendering/production-runtime/passes/DepthPrepass.js.map +1 -0
- package/dist/rendering/production-runtime/passes/OpaquePass.d.ts +8 -0
- package/dist/rendering/production-runtime/passes/OpaquePass.d.ts.map +1 -0
- package/dist/rendering/production-runtime/passes/OpaquePass.js +7 -0
- package/dist/rendering/production-runtime/passes/OpaquePass.js.map +1 -0
- package/dist/rendering/production-runtime/passes/ShadowPass.d.ts +8 -0
- package/dist/rendering/production-runtime/passes/ShadowPass.d.ts.map +1 -0
- package/dist/rendering/production-runtime/passes/ShadowPass.js +7 -0
- package/dist/rendering/production-runtime/passes/ShadowPass.js.map +1 -0
- package/dist/rendering/production-runtime/passes/SkyboxPass.d.ts +8 -0
- package/dist/rendering/production-runtime/passes/SkyboxPass.d.ts.map +1 -0
- package/dist/rendering/production-runtime/passes/SkyboxPass.js +7 -0
- package/dist/rendering/production-runtime/passes/SkyboxPass.js.map +1 -0
- package/dist/rendering/production-runtime/passes/ToneMappingPass.d.ts +8 -0
- package/dist/rendering/production-runtime/passes/ToneMappingPass.d.ts.map +1 -0
- package/dist/rendering/production-runtime/passes/ToneMappingPass.js +7 -0
- package/dist/rendering/production-runtime/passes/ToneMappingPass.js.map +1 -0
- package/dist/rendering/production-runtime/passes/TransparentPass.d.ts +8 -0
- package/dist/rendering/production-runtime/passes/TransparentPass.d.ts.map +1 -0
- package/dist/rendering/production-runtime/passes/TransparentPass.js +7 -0
- package/dist/rendering/production-runtime/passes/TransparentPass.js.map +1 -0
- package/dist/rendering/production-runtime/postprocess/BloomPass.d.ts +15 -0
- package/dist/rendering/production-runtime/postprocess/BloomPass.d.ts.map +1 -0
- package/dist/rendering/production-runtime/postprocess/BloomPass.js +37 -0
- package/dist/rendering/production-runtime/postprocess/BloomPass.js.map +1 -0
- package/dist/rendering/production-runtime/postprocess/ColorGradingPass.d.ts +16 -0
- package/dist/rendering/production-runtime/postprocess/ColorGradingPass.d.ts.map +1 -0
- package/dist/rendering/production-runtime/postprocess/ColorGradingPass.js +34 -0
- package/dist/rendering/production-runtime/postprocess/ColorGradingPass.js.map +1 -0
- package/dist/rendering/production-runtime/postprocess/DOFPass.d.ts +16 -0
- package/dist/rendering/production-runtime/postprocess/DOFPass.d.ts.map +1 -0
- package/dist/rendering/production-runtime/postprocess/DOFPass.js +31 -0
- package/dist/rendering/production-runtime/postprocess/DOFPass.js.map +1 -0
- package/dist/rendering/production-runtime/postprocess/FXAAPass.d.ts +16 -0
- package/dist/rendering/production-runtime/postprocess/FXAAPass.d.ts.map +1 -0
- package/dist/rendering/production-runtime/postprocess/FXAAPass.js +39 -0
- package/dist/rendering/production-runtime/postprocess/FXAAPass.js.map +1 -0
- package/dist/rendering/production-runtime/postprocess/ProductionEffectComposer.d.ts +21 -0
- package/dist/rendering/production-runtime/postprocess/ProductionEffectComposer.d.ts.map +1 -0
- package/dist/rendering/production-runtime/postprocess/ProductionEffectComposer.js +53 -0
- package/dist/rendering/production-runtime/postprocess/ProductionEffectComposer.js.map +1 -0
- package/dist/rendering/production-runtime/postprocess/ProductionPostProcessTypes.d.ts +37 -0
- package/dist/rendering/production-runtime/postprocess/ProductionPostProcessTypes.d.ts.map +1 -0
- package/dist/rendering/production-runtime/postprocess/ProductionPostProcessTypes.js +124 -0
- package/dist/rendering/production-runtime/postprocess/ProductionPostProcessTypes.js.map +1 -0
- package/dist/rendering/production-runtime/postprocess/SSAOPass.d.ts +15 -0
- package/dist/rendering/production-runtime/postprocess/SSAOPass.d.ts.map +1 -0
- package/dist/rendering/production-runtime/postprocess/SSAOPass.js +30 -0
- package/dist/rendering/production-runtime/postprocess/SSAOPass.js.map +1 -0
- package/dist/rendering/production-runtime/resources/GPUBuffer.d.ts +10 -0
- package/dist/rendering/production-runtime/resources/GPUBuffer.d.ts.map +1 -0
- package/dist/rendering/production-runtime/resources/GPUBuffer.js +7 -0
- package/dist/rendering/production-runtime/resources/GPUBuffer.js.map +1 -0
- package/dist/rendering/production-runtime/resources/GPUTexture.d.ts +12 -0
- package/dist/rendering/production-runtime/resources/GPUTexture.d.ts.map +1 -0
- package/dist/rendering/production-runtime/resources/GPUTexture.js +7 -0
- package/dist/rendering/production-runtime/resources/GPUTexture.js.map +1 -0
- package/dist/rendering/production-runtime/resources/RenderTarget.d.ts +11 -0
- package/dist/rendering/production-runtime/resources/RenderTarget.d.ts.map +1 -0
- package/dist/rendering/production-runtime/resources/RenderTarget.js +7 -0
- package/dist/rendering/production-runtime/resources/RenderTarget.js.map +1 -0
- package/dist/rendering/production-runtime/resources/ResourceCache.d.ts +8 -0
- package/dist/rendering/production-runtime/resources/ResourceCache.d.ts.map +1 -0
- package/dist/rendering/production-runtime/resources/ResourceCache.js +8 -0
- package/dist/rendering/production-runtime/resources/ResourceCache.js.map +1 -0
- package/dist/rendering/production-runtime/scene/Camera.d.ts +8 -0
- package/dist/rendering/production-runtime/scene/Camera.d.ts.map +1 -0
- package/dist/rendering/production-runtime/scene/Camera.js +2 -0
- package/dist/rendering/production-runtime/scene/Camera.js.map +1 -0
- package/dist/rendering/production-runtime/scene/Lights.d.ts +9 -0
- package/dist/rendering/production-runtime/scene/Lights.d.ts.map +1 -0
- package/dist/rendering/production-runtime/scene/Lights.js +2 -0
- package/dist/rendering/production-runtime/scene/Lights.js.map +1 -0
- package/dist/rendering/production-runtime/scene/RenderableMesh.d.ts +8 -0
- package/dist/rendering/production-runtime/scene/RenderableMesh.d.ts.map +1 -0
- package/dist/rendering/production-runtime/scene/RenderableMesh.js +2 -0
- package/dist/rendering/production-runtime/scene/RenderableMesh.js.map +1 -0
- package/dist/rendering/production-runtime/scene/RenderablePrimitive.d.ts +8 -0
- package/dist/rendering/production-runtime/scene/RenderablePrimitive.d.ts.map +1 -0
- package/dist/rendering/production-runtime/scene/RenderablePrimitive.js +2 -0
- package/dist/rendering/production-runtime/scene/RenderablePrimitive.js.map +1 -0
- package/dist/rendering/production-runtime/scene/RenderableScene.d.ts +11 -0
- package/dist/rendering/production-runtime/scene/RenderableScene.d.ts.map +1 -0
- package/dist/rendering/production-runtime/scene/RenderableScene.js +2 -0
- package/dist/rendering/production-runtime/scene/RenderableScene.js.map +1 -0
- package/dist/rendering/production-runtime/shaders/ShaderProgramLibrary.d.ts +12 -0
- package/dist/rendering/production-runtime/shaders/ShaderProgramLibrary.d.ts.map +1 -0
- package/dist/rendering/production-runtime/shaders/ShaderProgramLibrary.js +7 -0
- package/dist/rendering/production-runtime/shaders/ShaderProgramLibrary.js.map +1 -0
- package/dist/rendering/shadows/CascadedShadowPipeline.d.ts +25 -0
- package/dist/rendering/shadows/CascadedShadowPipeline.d.ts.map +1 -0
- package/dist/rendering/shadows/CascadedShadowPipeline.js +31 -0
- package/dist/rendering/shadows/CascadedShadowPipeline.js.map +1 -0
- package/dist/rendering/shadows/ContactShadows.d.ts +37 -0
- package/dist/rendering/shadows/ContactShadows.d.ts.map +1 -0
- package/dist/rendering/shadows/ContactShadows.js +68 -0
- package/dist/rendering/shadows/ContactShadows.js.map +1 -0
- package/dist/rendering/shadows/ShadowDebugViews.d.ts +12 -0
- package/dist/rendering/shadows/ShadowDebugViews.d.ts.map +1 -0
- package/dist/rendering/shadows/ShadowDebugViews.js +35 -0
- package/dist/rendering/shadows/ShadowDebugViews.js.map +1 -0
- package/dist/rendering/threejs-compatibility/InstancingSystem.d.ts +10 -0
- package/dist/rendering/threejs-compatibility/InstancingSystem.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/InstancingSystem.js +11 -0
- package/dist/rendering/threejs-compatibility/InstancingSystem.js.map +1 -0
- package/dist/rendering/threejs-compatibility/LightingSystem.d.ts +11 -0
- package/dist/rendering/threejs-compatibility/LightingSystem.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/LightingSystem.js +14 -0
- package/dist/rendering/threejs-compatibility/LightingSystem.js.map +1 -0
- package/dist/rendering/threejs-compatibility/MaterialSystem.d.ts +6 -0
- package/dist/rendering/threejs-compatibility/MaterialSystem.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/MaterialSystem.js +7 -0
- package/dist/rendering/threejs-compatibility/MaterialSystem.js.map +1 -0
- package/dist/rendering/threejs-compatibility/RenderTargetSystem.d.ts +16 -0
- package/dist/rendering/threejs-compatibility/RenderTargetSystem.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/RenderTargetSystem.js +23 -0
- package/dist/rendering/threejs-compatibility/RenderTargetSystem.js.map +1 -0
- package/dist/rendering/threejs-compatibility/RendererDiagnostics.d.ts +27 -0
- package/dist/rendering/threejs-compatibility/RendererDiagnostics.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/RendererDiagnostics.js +41 -0
- package/dist/rendering/threejs-compatibility/RendererDiagnostics.js.map +1 -0
- package/dist/rendering/threejs-compatibility/SceneRenderer.d.ts +19 -0
- package/dist/rendering/threejs-compatibility/SceneRenderer.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/SceneRenderer.js +18 -0
- package/dist/rendering/threejs-compatibility/SceneRenderer.js.map +1 -0
- package/dist/rendering/threejs-compatibility/ShadowSystem.d.ts +11 -0
- package/dist/rendering/threejs-compatibility/ShadowSystem.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/ShadowSystem.js +12 -0
- package/dist/rendering/threejs-compatibility/ShadowSystem.js.map +1 -0
- package/dist/rendering/threejs-compatibility/TextureSystem.d.ts +9 -0
- package/dist/rendering/threejs-compatibility/TextureSystem.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/TextureSystem.js +14 -0
- package/dist/rendering/threejs-compatibility/TextureSystem.js.map +1 -0
- package/dist/rendering/threejs-compatibility/ThreeCompatRenderer.d.ts +37 -0
- package/dist/rendering/threejs-compatibility/ThreeCompatRenderer.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/ThreeCompatRenderer.js +77 -0
- package/dist/rendering/threejs-compatibility/ThreeCompatRenderer.js.map +1 -0
- package/dist/rendering/threejs-compatibility/TransparencySystem.d.ts +11 -0
- package/dist/rendering/threejs-compatibility/TransparencySystem.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/TransparencySystem.js +12 -0
- package/dist/rendering/threejs-compatibility/TransparencySystem.js.map +1 -0
- package/dist/rendering/threejs-compatibility/index.d.ts +25 -0
- package/dist/rendering/threejs-compatibility/index.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/index.js +15 -0
- package/dist/rendering/threejs-compatibility/index.js.map +1 -0
- package/dist/rendering/threejs-compatibility/performance/BVH.d.ts +11 -0
- package/dist/rendering/threejs-compatibility/performance/BVH.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/performance/BVH.js +10 -0
- package/dist/rendering/threejs-compatibility/performance/BVH.js.map +1 -0
- package/dist/rendering/threejs-compatibility/performance/FrustumCulling.d.ts +7 -0
- package/dist/rendering/threejs-compatibility/performance/FrustumCulling.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/performance/FrustumCulling.js +5 -0
- package/dist/rendering/threejs-compatibility/performance/FrustumCulling.js.map +1 -0
- package/dist/rendering/threejs-compatibility/performance/Instancing.d.ts +7 -0
- package/dist/rendering/threejs-compatibility/performance/Instancing.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/performance/Instancing.js +10 -0
- package/dist/rendering/threejs-compatibility/performance/Instancing.js.map +1 -0
- package/dist/rendering/threejs-compatibility/performance/LODSystem.d.ts +9 -0
- package/dist/rendering/threejs-compatibility/performance/LODSystem.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/performance/LODSystem.js +11 -0
- package/dist/rendering/threejs-compatibility/performance/LODSystem.js.map +1 -0
- package/dist/rendering/threejs-compatibility/performance/OcclusionCulling.d.ts +3 -0
- package/dist/rendering/threejs-compatibility/performance/OcclusionCulling.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/performance/OcclusionCulling.js +5 -0
- package/dist/rendering/threejs-compatibility/performance/OcclusionCulling.js.map +1 -0
- package/dist/rendering/threejs-compatibility/performance/RaycastAcceleration.d.ts +8 -0
- package/dist/rendering/threejs-compatibility/performance/RaycastAcceleration.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/performance/RaycastAcceleration.js +11 -0
- package/dist/rendering/threejs-compatibility/performance/RaycastAcceleration.js.map +1 -0
- package/dist/rendering/threejs-compatibility/performance/RendererProfiler.d.ts +11 -0
- package/dist/rendering/threejs-compatibility/performance/RendererProfiler.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/performance/RendererProfiler.js +10 -0
- package/dist/rendering/threejs-compatibility/performance/RendererProfiler.js.map +1 -0
- package/dist/rendering/threejs-compatibility/performance/TextureStreaming.d.ts +7 -0
- package/dist/rendering/threejs-compatibility/performance/TextureStreaming.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/performance/TextureStreaming.js +10 -0
- package/dist/rendering/threejs-compatibility/performance/TextureStreaming.js.map +1 -0
- package/dist/rendering/threejs-compatibility/performance/index.d.ts +13 -0
- package/dist/rendering/threejs-compatibility/performance/index.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/performance/index.js +9 -0
- package/dist/rendering/threejs-compatibility/performance/index.js.map +1 -0
- package/dist/rendering/threejs-compatibility/postprocess/BloomPass.d.ts +9 -0
- package/dist/rendering/threejs-compatibility/postprocess/BloomPass.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/postprocess/BloomPass.js +14 -0
- package/dist/rendering/threejs-compatibility/postprocess/BloomPass.js.map +1 -0
- package/dist/rendering/threejs-compatibility/postprocess/ColorGradingPass.d.ts +10 -0
- package/dist/rendering/threejs-compatibility/postprocess/ColorGradingPass.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/postprocess/ColorGradingPass.js +16 -0
- package/dist/rendering/threejs-compatibility/postprocess/ColorGradingPass.js.map +1 -0
- package/dist/rendering/threejs-compatibility/postprocess/DepthOfFieldPass.d.ts +9 -0
- package/dist/rendering/threejs-compatibility/postprocess/DepthOfFieldPass.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/postprocess/DepthOfFieldPass.js +19 -0
- package/dist/rendering/threejs-compatibility/postprocess/DepthOfFieldPass.js.map +1 -0
- package/dist/rendering/threejs-compatibility/postprocess/EffectComposer.d.ts +7 -0
- package/dist/rendering/threejs-compatibility/postprocess/EffectComposer.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/postprocess/EffectComposer.js +11 -0
- package/dist/rendering/threejs-compatibility/postprocess/EffectComposer.js.map +1 -0
- package/dist/rendering/threejs-compatibility/postprocess/FXAAPass.d.ts +7 -0
- package/dist/rendering/threejs-compatibility/postprocess/FXAAPass.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/postprocess/FXAAPass.js +10 -0
- package/dist/rendering/threejs-compatibility/postprocess/FXAAPass.js.map +1 -0
- package/dist/rendering/threejs-compatibility/postprocess/MotionBlurPass.d.ts +9 -0
- package/dist/rendering/threejs-compatibility/postprocess/MotionBlurPass.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/postprocess/MotionBlurPass.js +18 -0
- package/dist/rendering/threejs-compatibility/postprocess/MotionBlurPass.js.map +1 -0
- package/dist/rendering/threejs-compatibility/postprocess/OutlinePass.d.ts +9 -0
- package/dist/rendering/threejs-compatibility/postprocess/OutlinePass.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/postprocess/OutlinePass.js +19 -0
- package/dist/rendering/threejs-compatibility/postprocess/OutlinePass.js.map +1 -0
- package/dist/rendering/threejs-compatibility/postprocess/PostProcessTypes.d.ts +42 -0
- package/dist/rendering/threejs-compatibility/postprocess/PostProcessTypes.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/postprocess/PostProcessTypes.js +123 -0
- package/dist/rendering/threejs-compatibility/postprocess/PostProcessTypes.js.map +1 -0
- package/dist/rendering/threejs-compatibility/postprocess/RenderPass.d.ts +7 -0
- package/dist/rendering/threejs-compatibility/postprocess/RenderPass.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/postprocess/RenderPass.js +8 -0
- package/dist/rendering/threejs-compatibility/postprocess/RenderPass.js.map +1 -0
- package/dist/rendering/threejs-compatibility/postprocess/SMAAPass.d.ts +7 -0
- package/dist/rendering/threejs-compatibility/postprocess/SMAAPass.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/postprocess/SMAAPass.js +10 -0
- package/dist/rendering/threejs-compatibility/postprocess/SMAAPass.js.map +1 -0
- package/dist/rendering/threejs-compatibility/postprocess/SSAOPass.d.ts +9 -0
- package/dist/rendering/threejs-compatibility/postprocess/SSAOPass.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/postprocess/SSAOPass.js +19 -0
- package/dist/rendering/threejs-compatibility/postprocess/SSAOPass.js.map +1 -0
- package/dist/rendering/threejs-compatibility/postprocess/ShaderPass.d.ts +9 -0
- package/dist/rendering/threejs-compatibility/postprocess/ShaderPass.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/postprocess/ShaderPass.js +11 -0
- package/dist/rendering/threejs-compatibility/postprocess/ShaderPass.js.map +1 -0
- package/dist/rendering/threejs-compatibility/postprocess/TAAPass.d.ts +7 -0
- package/dist/rendering/threejs-compatibility/postprocess/TAAPass.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/postprocess/TAAPass.js +10 -0
- package/dist/rendering/threejs-compatibility/postprocess/TAAPass.js.map +1 -0
- package/dist/rendering/threejs-compatibility/postprocess/VignettePass.d.ts +9 -0
- package/dist/rendering/threejs-compatibility/postprocess/VignettePass.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/postprocess/VignettePass.js +14 -0
- package/dist/rendering/threejs-compatibility/postprocess/VignettePass.js.map +1 -0
- package/dist/rendering/threejs-compatibility/postprocess/index.d.ts +16 -0
- package/dist/rendering/threejs-compatibility/postprocess/index.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/postprocess/index.js +15 -0
- package/dist/rendering/threejs-compatibility/postprocess/index.js.map +1 -0
- package/dist/rendering/threejs-compatibility/shaders/NodeMaterial.d.ts +14 -0
- package/dist/rendering/threejs-compatibility/shaders/NodeMaterial.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/shaders/NodeMaterial.js +15 -0
- package/dist/rendering/threejs-compatibility/shaders/NodeMaterial.js.map +1 -0
- package/dist/rendering/threejs-compatibility/shaders/RawShaderMaterial.d.ts +6 -0
- package/dist/rendering/threejs-compatibility/shaders/RawShaderMaterial.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/shaders/RawShaderMaterial.js +6 -0
- package/dist/rendering/threejs-compatibility/shaders/RawShaderMaterial.js.map +1 -0
- package/dist/rendering/threejs-compatibility/shaders/ShaderDiagnostics.d.ts +7 -0
- package/dist/rendering/threejs-compatibility/shaders/ShaderDiagnostics.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/shaders/ShaderDiagnostics.js +12 -0
- package/dist/rendering/threejs-compatibility/shaders/ShaderDiagnostics.js.map +1 -0
- package/dist/rendering/threejs-compatibility/shaders/ShaderMaterial.d.ts +12 -0
- package/dist/rendering/threejs-compatibility/shaders/ShaderMaterial.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/shaders/ShaderMaterial.js +20 -0
- package/dist/rendering/threejs-compatibility/shaders/ShaderMaterial.js.map +1 -0
- package/dist/rendering/threejs-compatibility/shaders/ThreeCompatShaderChunks.d.ts +7 -0
- package/dist/rendering/threejs-compatibility/shaders/ThreeCompatShaderChunks.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/shaders/ThreeCompatShaderChunks.js +7 -0
- package/dist/rendering/threejs-compatibility/shaders/ThreeCompatShaderChunks.js.map +1 -0
- package/dist/rendering/threejs-compatibility/shaders/Uniforms.d.ts +8 -0
- package/dist/rendering/threejs-compatibility/shaders/Uniforms.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/shaders/Uniforms.js +14 -0
- package/dist/rendering/threejs-compatibility/shaders/Uniforms.js.map +1 -0
- package/dist/rendering/threejs-compatibility/shaders/index.d.ts +10 -0
- package/dist/rendering/threejs-compatibility/shaders/index.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/shaders/index.js +7 -0
- package/dist/rendering/threejs-compatibility/shaders/index.js.map +1 -0
- package/dist/rendering/threejs-compatibility/vfx/GPUPointCloud.d.ts +7 -0
- package/dist/rendering/threejs-compatibility/vfx/GPUPointCloud.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/vfx/GPUPointCloud.js +12 -0
- package/dist/rendering/threejs-compatibility/vfx/GPUPointCloud.js.map +1 -0
- package/dist/rendering/threejs-compatibility/vfx/LineRenderer.d.ts +10 -0
- package/dist/rendering/threejs-compatibility/vfx/LineRenderer.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/vfx/LineRenderer.js +7 -0
- package/dist/rendering/threejs-compatibility/vfx/LineRenderer.js.map +1 -0
- package/dist/rendering/threejs-compatibility/vfx/ParticleSystem.d.ts +12 -0
- package/dist/rendering/threejs-compatibility/vfx/ParticleSystem.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/vfx/ParticleSystem.js +15 -0
- package/dist/rendering/threejs-compatibility/vfx/ParticleSystem.js.map +1 -0
- package/dist/rendering/threejs-compatibility/vfx/SpriteSystem.d.ts +11 -0
- package/dist/rendering/threejs-compatibility/vfx/SpriteSystem.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/vfx/SpriteSystem.js +7 -0
- package/dist/rendering/threejs-compatibility/vfx/SpriteSystem.js.map +1 -0
- package/dist/rendering/threejs-compatibility/vfx/TrailRenderer.d.ts +5 -0
- package/dist/rendering/threejs-compatibility/vfx/TrailRenderer.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/vfx/TrailRenderer.js +9 -0
- package/dist/rendering/threejs-compatibility/vfx/TrailRenderer.js.map +1 -0
- package/dist/rendering/threejs-compatibility/vfx/VFXDiagnostics.d.ts +21 -0
- package/dist/rendering/threejs-compatibility/vfx/VFXDiagnostics.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/vfx/VFXDiagnostics.js +12 -0
- package/dist/rendering/threejs-compatibility/vfx/VFXDiagnostics.js.map +1 -0
- package/dist/rendering/threejs-compatibility/vfx/index.d.ts +10 -0
- package/dist/rendering/threejs-compatibility/vfx/index.d.ts.map +1 -0
- package/dist/rendering/threejs-compatibility/vfx/index.js +7 -0
- package/dist/rendering/threejs-compatibility/vfx/index.js.map +1 -0
- package/dist/rendering/threejs-example-parity/index.d.ts +57 -0
- package/dist/rendering/threejs-example-parity/index.d.ts.map +1 -0
- package/dist/rendering/threejs-example-parity/index.js +139 -0
- package/dist/rendering/threejs-example-parity/index.js.map +1 -0
- package/dist/rendering/webgpu/WebGPUBuffer.d.ts +2 -0
- package/dist/rendering/webgpu/WebGPUBuffer.d.ts.map +1 -0
- package/dist/rendering/webgpu/WebGPUBuffer.js +2 -0
- package/dist/rendering/webgpu/WebGPUBuffer.js.map +1 -0
- package/dist/rendering/webgpu/WebGPUCompute.d.ts +3 -0
- package/dist/rendering/webgpu/WebGPUCompute.d.ts.map +1 -0
- package/dist/rendering/webgpu/WebGPUCompute.js +2 -0
- package/dist/rendering/webgpu/WebGPUCompute.js.map +1 -0
- package/dist/rendering/webgpu/WebGPUPipelineCache.d.ts +6 -0
- package/dist/rendering/webgpu/WebGPUPipelineCache.d.ts.map +1 -0
- package/dist/rendering/webgpu/WebGPUPipelineCache.js +15 -0
- package/dist/rendering/webgpu/WebGPUPipelineCache.js.map +1 -0
- package/dist/rendering/webgpu/WebGPUPostProcess.d.ts +3 -0
- package/dist/rendering/webgpu/WebGPUPostProcess.d.ts.map +1 -0
- package/dist/rendering/webgpu/WebGPUPostProcess.js +2 -0
- package/dist/rendering/webgpu/WebGPUPostProcess.js.map +1 -0
- package/dist/rendering/webgpu/WebGPUTexture.d.ts +3 -0
- package/dist/rendering/webgpu/WebGPUTexture.d.ts.map +1 -0
- package/dist/rendering/webgpu/WebGPUTexture.js +2 -0
- package/dist/rendering/webgpu/WebGPUTexture.js.map +1 -0
- package/dist/scene/Bounds.d.ts +18 -0
- package/dist/scene/Bounds.d.ts.map +1 -0
- package/dist/scene/Bounds.js +55 -0
- package/dist/scene/Bounds.js.map +1 -0
- package/dist/scene/Camera.d.ts +22 -0
- package/dist/scene/Camera.d.ts.map +1 -0
- package/dist/scene/Camera.js +44 -0
- package/dist/scene/Camera.js.map +1 -0
- package/dist/scene/DirectionalLight.d.ts +7 -0
- package/dist/scene/DirectionalLight.d.ts.map +1 -0
- package/dist/scene/DirectionalLight.js +12 -0
- package/dist/scene/DirectionalLight.js.map +1 -0
- package/dist/scene/Hierarchy.d.ts +6 -0
- package/dist/scene/Hierarchy.d.ts.map +1 -0
- package/dist/scene/Hierarchy.js +19 -0
- package/dist/scene/Hierarchy.js.map +1 -0
- package/dist/scene/Layers.d.ts +8 -0
- package/dist/scene/Layers.d.ts.map +1 -0
- package/dist/scene/Layers.js +21 -0
- package/dist/scene/Layers.js.map +1 -0
- package/dist/scene/Light.d.ts +14 -0
- package/dist/scene/Light.d.ts.map +1 -0
- package/dist/scene/Light.js +23 -0
- package/dist/scene/Light.js.map +1 -0
- package/dist/scene/Lights.d.ts +6 -0
- package/dist/scene/Lights.d.ts.map +1 -0
- package/dist/scene/Lights.js +5 -0
- package/dist/scene/Lights.js.map +1 -0
- package/dist/scene/MathTypes.d.ts +52 -0
- package/dist/scene/MathTypes.d.ts.map +1 -0
- package/dist/scene/MathTypes.js +119 -0
- package/dist/scene/MathTypes.js.map +1 -0
- package/dist/scene/Object3D.d.ts +48 -0
- package/dist/scene/Object3D.d.ts.map +1 -0
- package/dist/scene/Object3D.js +122 -0
- package/dist/scene/Object3D.js.map +1 -0
- package/dist/scene/OrthographicCamera.d.ts +29 -0
- package/dist/scene/OrthographicCamera.d.ts.map +1 -0
- package/dist/scene/OrthographicCamera.js +59 -0
- package/dist/scene/OrthographicCamera.js.map +1 -0
- package/dist/scene/PerspectiveCamera.d.ts +20 -0
- package/dist/scene/PerspectiveCamera.d.ts.map +1 -0
- package/dist/scene/PerspectiveCamera.js +42 -0
- package/dist/scene/PerspectiveCamera.js.map +1 -0
- package/dist/scene/PointLight.d.ts +10 -0
- package/dist/scene/PointLight.d.ts.map +1 -0
- package/dist/scene/PointLight.js +22 -0
- package/dist/scene/PointLight.js.map +1 -0
- package/dist/scene/Renderable.d.ts +30 -0
- package/dist/scene/Renderable.d.ts.map +1 -0
- package/dist/scene/Renderable.js +54 -0
- package/dist/scene/Renderable.js.map +1 -0
- package/dist/scene/Scene.d.ts +45 -0
- package/dist/scene/Scene.d.ts.map +1 -0
- package/dist/scene/Scene.js +117 -0
- package/dist/scene/Scene.js.map +1 -0
- package/dist/scene/SceneMetadata.d.ts +79 -0
- package/dist/scene/SceneMetadata.d.ts.map +1 -0
- package/dist/scene/SceneMetadata.js +130 -0
- package/dist/scene/SceneMetadata.js.map +1 -0
- package/dist/scene/SceneNode.d.ts +42 -0
- package/dist/scene/SceneNode.d.ts.map +1 -0
- package/dist/scene/SceneNode.js +126 -0
- package/dist/scene/SceneNode.js.map +1 -0
- package/dist/scene/SceneQuery.d.ts +16 -0
- package/dist/scene/SceneQuery.d.ts.map +1 -0
- package/dist/scene/SceneQuery.js +37 -0
- package/dist/scene/SceneQuery.js.map +1 -0
- package/dist/scene/SceneSerializer.d.ts +59 -0
- package/dist/scene/SceneSerializer.d.ts.map +1 -0
- package/dist/scene/SceneSerializer.js +127 -0
- package/dist/scene/SceneSerializer.js.map +1 -0
- package/dist/scene/SpotLight.d.ts +14 -0
- package/dist/scene/SpotLight.d.ts.map +1 -0
- package/dist/scene/SpotLight.js +35 -0
- package/dist/scene/SpotLight.js.map +1 -0
- package/dist/scene/TransformNode.d.ts +26 -0
- package/dist/scene/TransformNode.d.ts.map +1 -0
- package/dist/scene/TransformNode.js +98 -0
- package/dist/scene/TransformNode.js.map +1 -0
- package/dist/scene/index.d.ts +21 -0
- package/dist/scene/index.d.ts.map +1 -0
- package/dist/scene/index.js +21 -0
- package/dist/scene/index.js.map +1 -0
- package/dist/scripting/AdaptiveDifficultyFixtures.d.ts +58 -0
- package/dist/scripting/AdaptiveDifficultyFixtures.d.ts.map +1 -0
- package/dist/scripting/AdaptiveDifficultyFixtures.js +228 -0
- package/dist/scripting/AdaptiveDifficultyFixtures.js.map +1 -0
- package/dist/scripting/AnalyticsPrivacyFixtures.d.ts +63 -0
- package/dist/scripting/AnalyticsPrivacyFixtures.d.ts.map +1 -0
- package/dist/scripting/AnalyticsPrivacyFixtures.js +120 -0
- package/dist/scripting/AnalyticsPrivacyFixtures.js.map +1 -0
- package/dist/scripting/Behavior.d.ts +10 -0
- package/dist/scripting/Behavior.d.ts.map +1 -0
- package/dist/scripting/Behavior.js +2 -0
- package/dist/scripting/Behavior.js.map +1 -0
- package/dist/scripting/BehaviorHost.d.ts +17 -0
- package/dist/scripting/BehaviorHost.d.ts.map +1 -0
- package/dist/scripting/BehaviorHost.js +39 -0
- package/dist/scripting/BehaviorHost.js.map +1 -0
- package/dist/scripting/BehaviorRegistry.d.ts +8 -0
- package/dist/scripting/BehaviorRegistry.d.ts.map +1 -0
- package/dist/scripting/BehaviorRegistry.js +17 -0
- package/dist/scripting/BehaviorRegistry.js.map +1 -0
- package/dist/scripting/BehaviorSystem.d.ts +26 -0
- package/dist/scripting/BehaviorSystem.d.ts.map +1 -0
- package/dist/scripting/BehaviorSystem.js +76 -0
- package/dist/scripting/BehaviorSystem.js.map +1 -0
- package/dist/scripting/BehaviorTree.d.ts +75 -0
- package/dist/scripting/BehaviorTree.d.ts.map +1 -0
- package/dist/scripting/BehaviorTree.js +204 -0
- package/dist/scripting/BehaviorTree.js.map +1 -0
- package/dist/scripting/CloudServiceFixtures.d.ts +81 -0
- package/dist/scripting/CloudServiceFixtures.d.ts.map +1 -0
- package/dist/scripting/CloudServiceFixtures.js +144 -0
- package/dist/scripting/CloudServiceFixtures.js.map +1 -0
- package/dist/scripting/CulturalBehaviorFixtures.d.ts +75 -0
- package/dist/scripting/CulturalBehaviorFixtures.d.ts.map +1 -0
- package/dist/scripting/CulturalBehaviorFixtures.js +180 -0
- package/dist/scripting/CulturalBehaviorFixtures.js.map +1 -0
- package/dist/scripting/DecisionTree.d.ts +42 -0
- package/dist/scripting/DecisionTree.d.ts.map +1 -0
- package/dist/scripting/DecisionTree.js +125 -0
- package/dist/scripting/DecisionTree.js.map +1 -0
- package/dist/scripting/GOAP.d.ts +51 -0
- package/dist/scripting/GOAP.d.ts.map +1 -0
- package/dist/scripting/GOAP.js +105 -0
- package/dist/scripting/GOAP.js.map +1 -0
- package/dist/scripting/HTN.d.ts +58 -0
- package/dist/scripting/HTN.d.ts.map +1 -0
- package/dist/scripting/HTN.js +115 -0
- package/dist/scripting/HTN.js.map +1 -0
- package/dist/scripting/LearningAgentFixtures.d.ts +60 -0
- package/dist/scripting/LearningAgentFixtures.d.ts.map +1 -0
- package/dist/scripting/LearningAgentFixtures.js +122 -0
- package/dist/scripting/LearningAgentFixtures.js.map +1 -0
- package/dist/scripting/NetworkReplicationFixtures.d.ts +82 -0
- package/dist/scripting/NetworkReplicationFixtures.d.ts.map +1 -0
- package/dist/scripting/NetworkReplicationFixtures.js +330 -0
- package/dist/scripting/NetworkReplicationFixtures.js.map +1 -0
- package/dist/scripting/Perception.d.ts +58 -0
- package/dist/scripting/Perception.d.ts.map +1 -0
- package/dist/scripting/Perception.js +111 -0
- package/dist/scripting/Perception.js.map +1 -0
- package/dist/scripting/PlayerBehaviorTelemetryFixtures.d.ts +74 -0
- package/dist/scripting/PlayerBehaviorTelemetryFixtures.d.ts.map +1 -0
- package/dist/scripting/PlayerBehaviorTelemetryFixtures.js +189 -0
- package/dist/scripting/PlayerBehaviorTelemetryFixtures.js.map +1 -0
- package/dist/scripting/ProceduralContentAdaptationFixtures.d.ts +52 -0
- package/dist/scripting/ProceduralContentAdaptationFixtures.d.ts.map +1 -0
- package/dist/scripting/ProceduralContentAdaptationFixtures.js +149 -0
- package/dist/scripting/ProceduralContentAdaptationFixtures.js.map +1 -0
- package/dist/scripting/ScriptContext.d.ts +18 -0
- package/dist/scripting/ScriptContext.d.ts.map +1 -0
- package/dist/scripting/ScriptContext.js +21 -0
- package/dist/scripting/ScriptContext.js.map +1 -0
- package/dist/scripting/StateMachine.d.ts +52 -0
- package/dist/scripting/StateMachine.d.ts.map +1 -0
- package/dist/scripting/StateMachine.js +117 -0
- package/dist/scripting/StateMachine.js.map +1 -0
- package/dist/scripting/UtilityAI.d.ts +55 -0
- package/dist/scripting/UtilityAI.d.ts.map +1 -0
- package/dist/scripting/UtilityAI.js +113 -0
- package/dist/scripting/UtilityAI.js.map +1 -0
- package/dist/scripting/VisualGraph.d.ts +19 -0
- package/dist/scripting/VisualGraph.d.ts.map +1 -0
- package/dist/scripting/VisualGraph.js +74 -0
- package/dist/scripting/VisualGraph.js.map +1 -0
- package/dist/scripting/VisualGraphExecutor.d.ts +11 -0
- package/dist/scripting/VisualGraphExecutor.d.ts.map +1 -0
- package/dist/scripting/VisualGraphExecutor.js +214 -0
- package/dist/scripting/VisualGraphExecutor.js.map +1 -0
- package/dist/scripting/VisualNode.d.ts +17 -0
- package/dist/scripting/VisualNode.d.ts.map +1 -0
- package/dist/scripting/VisualNode.js +24 -0
- package/dist/scripting/VisualNode.js.map +1 -0
- package/dist/scripting/VisualNodeCatalog.d.ts +14 -0
- package/dist/scripting/VisualNodeCatalog.d.ts.map +1 -0
- package/dist/scripting/VisualNodeCatalog.js +82 -0
- package/dist/scripting/VisualNodeCatalog.js.map +1 -0
- package/dist/scripting/WeaponSystem.d.ts +228 -0
- package/dist/scripting/WeaponSystem.d.ts.map +1 -0
- package/dist/scripting/WeaponSystem.js +530 -0
- package/dist/scripting/WeaponSystem.js.map +1 -0
- package/dist/scripting/index.d.ts +50 -0
- package/dist/scripting/index.d.ts.map +1 -0
- package/dist/scripting/index.js +25 -0
- package/dist/scripting/index.js.map +1 -0
- package/dist/three-compat/ThreeApiInventory.d.ts +18 -0
- package/dist/three-compat/ThreeApiInventory.d.ts.map +1 -0
- package/dist/three-compat/ThreeApiInventory.js +99 -0
- package/dist/three-compat/ThreeApiInventory.js.map +1 -0
- package/dist/three-compat/ThreeCompatibilityMatrix.d.ts +30 -0
- package/dist/three-compat/ThreeCompatibilityMatrix.d.ts.map +1 -0
- package/dist/three-compat/ThreeCompatibilityMatrix.js +69 -0
- package/dist/three-compat/ThreeCompatibilityMatrix.js.map +1 -0
- package/dist/three-compat/animation/index.d.ts +3 -0
- package/dist/three-compat/animation/index.d.ts.map +1 -0
- package/dist/three-compat/animation/index.js +2 -0
- package/dist/three-compat/animation/index.js.map +1 -0
- package/dist/three-compat/cameras/index.d.ts +24 -0
- package/dist/three-compat/cameras/index.d.ts.map +1 -0
- package/dist/three-compat/cameras/index.js +44 -0
- package/dist/three-compat/cameras/index.js.map +1 -0
- package/dist/three-compat/controls/index.d.ts +3 -0
- package/dist/three-compat/controls/index.d.ts.map +1 -0
- package/dist/three-compat/controls/index.js +2 -0
- package/dist/three-compat/controls/index.js.map +1 -0
- package/dist/three-compat/core/Object3DCompat.d.ts +62 -0
- package/dist/three-compat/core/Object3DCompat.d.ts.map +1 -0
- package/dist/three-compat/core/Object3DCompat.js +112 -0
- package/dist/three-compat/core/Object3DCompat.js.map +1 -0
- package/dist/three-compat/core/RaycasterCompat.d.ts +18 -0
- package/dist/three-compat/core/RaycasterCompat.d.ts.map +1 -0
- package/dist/three-compat/core/RaycasterCompat.js +28 -0
- package/dist/three-compat/core/RaycasterCompat.js.map +1 -0
- package/dist/three-compat/core/SceneCompat.d.ts +8 -0
- package/dist/three-compat/core/SceneCompat.d.ts.map +1 -0
- package/dist/three-compat/core/SceneCompat.js +8 -0
- package/dist/three-compat/core/SceneCompat.js.map +1 -0
- package/dist/three-compat/geometries/index.d.ts +67 -0
- package/dist/three-compat/geometries/index.d.ts.map +1 -0
- package/dist/three-compat/geometries/index.js +114 -0
- package/dist/three-compat/geometries/index.js.map +1 -0
- package/dist/three-compat/helpers/index.d.ts +40 -0
- package/dist/three-compat/helpers/index.d.ts.map +1 -0
- package/dist/three-compat/helpers/index.js +129 -0
- package/dist/three-compat/helpers/index.js.map +1 -0
- package/dist/three-compat/index.d.ts +32 -0
- package/dist/three-compat/index.d.ts.map +1 -0
- package/dist/three-compat/index.js +22 -0
- package/dist/three-compat/index.js.map +1 -0
- package/dist/three-compat/lights/index.d.ts +35 -0
- package/dist/three-compat/lights/index.d.ts.map +1 -0
- package/dist/three-compat/lights/index.js +39 -0
- package/dist/three-compat/lights/index.js.map +1 -0
- package/dist/three-compat/loaders/index.d.ts +54 -0
- package/dist/three-compat/loaders/index.d.ts.map +1 -0
- package/dist/three-compat/loaders/index.js +79 -0
- package/dist/three-compat/loaders/index.js.map +1 -0
- package/dist/three-compat/materials/index.d.ts +70 -0
- package/dist/three-compat/materials/index.d.ts.map +1 -0
- package/dist/three-compat/materials/index.js +85 -0
- package/dist/three-compat/materials/index.js.map +1 -0
- package/dist/three-compat/math/index.d.ts +34 -0
- package/dist/three-compat/math/index.d.ts.map +1 -0
- package/dist/three-compat/math/index.js +90 -0
- package/dist/three-compat/math/index.js.map +1 -0
- package/dist/three-compat/migration/CompatibilityWarnings.d.ts +6 -0
- package/dist/three-compat/migration/CompatibilityWarnings.d.ts.map +1 -0
- package/dist/three-compat/migration/CompatibilityWarnings.js +8 -0
- package/dist/three-compat/migration/CompatibilityWarnings.js.map +1 -0
- package/dist/three-compat/migration/ImportMap.d.ts +2 -0
- package/dist/three-compat/migration/ImportMap.d.ts.map +1 -0
- package/dist/three-compat/migration/ImportMap.js +10 -0
- package/dist/three-compat/migration/ImportMap.js.map +1 -0
- package/dist/three-compat/migration/ThreeToA3DAdapter.d.ts +8 -0
- package/dist/three-compat/migration/ThreeToA3DAdapter.d.ts.map +1 -0
- package/dist/three-compat/migration/ThreeToA3DAdapter.js +20 -0
- package/dist/three-compat/migration/ThreeToA3DAdapter.js.map +1 -0
- package/dist/three-compat/postprocessing/index.d.ts +2 -0
- package/dist/three-compat/postprocessing/index.d.ts.map +1 -0
- package/dist/three-compat/postprocessing/index.js +2 -0
- package/dist/three-compat/postprocessing/index.js.map +1 -0
- package/dist/three-compat/render-targets/index.d.ts +17 -0
- package/dist/three-compat/render-targets/index.d.ts.map +1 -0
- package/dist/three-compat/render-targets/index.js +29 -0
- package/dist/three-compat/render-targets/index.js.map +1 -0
- package/dist/three-compat/shaders/index.d.ts +3 -0
- package/dist/three-compat/shaders/index.d.ts.map +1 -0
- package/dist/three-compat/shaders/index.js +3 -0
- package/dist/three-compat/shaders/index.js.map +1 -0
- package/dist/three-compat/textures/index.d.ts +19 -0
- package/dist/three-compat/textures/index.d.ts.map +1 -0
- package/dist/three-compat/textures/index.js +24 -0
- package/dist/three-compat/textures/index.js.map +1 -0
- package/dist/workflows/AnimationLabWorkflow.d.ts +3 -0
- package/dist/workflows/AnimationLabWorkflow.d.ts.map +1 -0
- package/dist/workflows/AnimationLabWorkflow.js +156 -0
- package/dist/workflows/AnimationLabWorkflow.js.map +1 -0
- package/dist/workflows/AssetViewerWorkflow.d.ts +3 -0
- package/dist/workflows/AssetViewerWorkflow.d.ts.map +1 -0
- package/dist/workflows/AssetViewerWorkflow.js +35 -0
- package/dist/workflows/AssetViewerWorkflow.js.map +1 -0
- package/dist/workflows/ComparisonWorkflow.d.ts +3 -0
- package/dist/workflows/ComparisonWorkflow.d.ts.map +1 -0
- package/dist/workflows/ComparisonWorkflow.js +67 -0
- package/dist/workflows/ComparisonWorkflow.js.map +1 -0
- package/dist/workflows/InteractiveSceneWorkflow.d.ts +3 -0
- package/dist/workflows/InteractiveSceneWorkflow.d.ts.map +1 -0
- package/dist/workflows/InteractiveSceneWorkflow.js +43 -0
- package/dist/workflows/InteractiveSceneWorkflow.js.map +1 -0
- package/dist/workflows/MaterialStudioWorkflow.d.ts +3 -0
- package/dist/workflows/MaterialStudioWorkflow.d.ts.map +1 -0
- package/dist/workflows/MaterialStudioWorkflow.js +47 -0
- package/dist/workflows/MaterialStudioWorkflow.js.map +1 -0
- package/dist/workflows/ProductConfiguratorWorkflow.d.ts +3 -0
- package/dist/workflows/ProductConfiguratorWorkflow.d.ts.map +1 -0
- package/dist/workflows/ProductConfiguratorWorkflow.js +25 -0
- package/dist/workflows/ProductConfiguratorWorkflow.js.map +1 -0
- package/dist/workflows/SceneShowcaseWorkflow.d.ts +3 -0
- package/dist/workflows/SceneShowcaseWorkflow.d.ts.map +1 -0
- package/dist/workflows/SceneShowcaseWorkflow.js +44 -0
- package/dist/workflows/SceneShowcaseWorkflow.js.map +1 -0
- package/dist/workflows/WorkflowDiagnostics.d.ts +11 -0
- package/dist/workflows/WorkflowDiagnostics.d.ts.map +1 -0
- package/dist/workflows/WorkflowDiagnostics.js +34 -0
- package/dist/workflows/WorkflowDiagnostics.js.map +1 -0
- package/dist/workflows/WorkflowTypes.d.ts +90 -0
- package/dist/workflows/WorkflowTypes.d.ts.map +1 -0
- package/dist/workflows/WorkflowTypes.js +2 -0
- package/dist/workflows/WorkflowTypes.js.map +1 -0
- package/dist/workflows/index.d.ts +13 -0
- package/dist/workflows/index.d.ts.map +1 -0
- package/dist/workflows/index.js +11 -0
- package/dist/workflows/index.js.map +1 -0
- package/dist/workflows/production-runtime/ArchitectureWorkflow.d.ts +7 -0
- package/dist/workflows/production-runtime/ArchitectureWorkflow.d.ts.map +1 -0
- package/dist/workflows/production-runtime/ArchitectureWorkflow.js +2 -0
- package/dist/workflows/production-runtime/ArchitectureWorkflow.js.map +1 -0
- package/dist/workflows/production-runtime/AssetInspectionWorkflow.d.ts +7 -0
- package/dist/workflows/production-runtime/AssetInspectionWorkflow.d.ts.map +1 -0
- package/dist/workflows/production-runtime/AssetInspectionWorkflow.js +2 -0
- package/dist/workflows/production-runtime/AssetInspectionWorkflow.js.map +1 -0
- package/dist/workflows/production-runtime/CinematicWorkflow.d.ts +7 -0
- package/dist/workflows/production-runtime/CinematicWorkflow.d.ts.map +1 -0
- package/dist/workflows/production-runtime/CinematicWorkflow.js +2 -0
- package/dist/workflows/production-runtime/CinematicWorkflow.js.map +1 -0
- package/dist/workflows/production-runtime/MaterialAuthoringWorkflow.d.ts +7 -0
- package/dist/workflows/production-runtime/MaterialAuthoringWorkflow.d.ts.map +1 -0
- package/dist/workflows/production-runtime/MaterialAuthoringWorkflow.js +2 -0
- package/dist/workflows/production-runtime/MaterialAuthoringWorkflow.js.map +1 -0
- package/dist/workflows/production-runtime/ProductRenderWorkflow.d.ts +7 -0
- package/dist/workflows/production-runtime/ProductRenderWorkflow.d.ts.map +1 -0
- package/dist/workflows/production-runtime/ProductRenderWorkflow.js +2 -0
- package/dist/workflows/production-runtime/ProductRenderWorkflow.js.map +1 -0
- package/dist/workflows/production-runtime/ProductionExampleRuntime.d.ts +66 -0
- package/dist/workflows/production-runtime/ProductionExampleRuntime.d.ts.map +1 -0
- package/dist/workflows/production-runtime/ProductionExampleRuntime.js +189 -0
- package/dist/workflows/production-runtime/ProductionExampleRuntime.js.map +1 -0
- package/dist/workflows/production-runtime/ProductionWorkflows.d.ts +69 -0
- package/dist/workflows/production-runtime/ProductionWorkflows.d.ts.map +1 -0
- package/dist/workflows/production-runtime/ProductionWorkflows.js +128 -0
- package/dist/workflows/production-runtime/ProductionWorkflows.js.map +1 -0
- package/dist/workflows/production-runtime/WorkflowDiagnostics.d.ts +7 -0
- package/dist/workflows/production-runtime/WorkflowDiagnostics.d.ts.map +1 -0
- package/dist/workflows/production-runtime/WorkflowDiagnostics.js +2 -0
- package/dist/workflows/production-runtime/WorkflowDiagnostics.js.map +1 -0
- package/dist/workflows/production-runtime/index.d.ts +11 -0
- package/dist/workflows/production-runtime/index.d.ts.map +1 -0
- package/dist/workflows/production-runtime/index.js +9 -0
- package/dist/workflows/production-runtime/index.js.map +1 -0
- package/dist/workflows/workflow-foundation/index.d.ts +26 -0
- package/dist/workflows/workflow-foundation/index.d.ts.map +1 -0
- package/dist/workflows/workflow-foundation/index.js +25 -0
- package/dist/workflows/workflow-foundation/index.js.map +1 -0
- package/package.json +490 -0
- package/templates/cinematic-scene/README.md +11 -0
- package/templates/cinematic-scene/index.html +13 -0
- package/templates/cinematic-scene/package.json +21 -0
- package/templates/cinematic-scene/playwright.config.ts +14 -0
- package/templates/cinematic-scene/public/aura-assets/hero-fixture.glb +0 -0
- package/templates/cinematic-scene/public/aura-assets/hero.thumb.svg +1 -0
- package/templates/cinematic-scene/src/aura-assets.ts +17 -0
- package/templates/cinematic-scene/src/main.ts +27 -0
- package/templates/cinematic-scene/tests/route-health.spec.ts +16 -0
- package/templates/cinematic-scene/tests/screenshot.spec.ts +56 -0
- package/templates/cinematic-scene/tsconfig.json +15 -0
- package/templates/mini-game/README.md +10 -0
- package/templates/mini-game/index.html +13 -0
- package/templates/mini-game/package.json +21 -0
- package/templates/mini-game/playwright.config.ts +14 -0
- package/templates/mini-game/public/aura-assets/player-fixture.glb +0 -0
- package/templates/mini-game/public/aura-assets/player.thumb.svg +8 -0
- package/templates/mini-game/src/aura-assets.ts +17 -0
- package/templates/mini-game/src/main.ts +27 -0
- package/templates/mini-game/tests/route-health.spec.ts +16 -0
- package/templates/mini-game/tests/screenshot.spec.ts +63 -0
- package/templates/mini-game/tsconfig.json +15 -0
- package/templates/product-viewer/README.md +16 -0
- package/templates/product-viewer/index.html +16 -0
- package/templates/product-viewer/package.json +21 -0
- package/templates/product-viewer/playwright.config.ts +14 -0
- package/templates/product-viewer/public/aura-assets/product-fixture.glb +0 -0
- package/templates/product-viewer/public/aura-assets/product.thumb.svg +1 -0
- package/templates/product-viewer/src/aura-assets.ts +17 -0
- package/templates/product-viewer/src/main.ts +27 -0
- package/templates/product-viewer/tests/route-health.spec.ts +16 -0
- package/templates/product-viewer/tests/screenshot.spec.ts +60 -0
- package/templates/product-viewer/tsconfig.json +15 -0
|
@@ -0,0 +1,2403 @@
|
|
|
1
|
+
import { RenderDeviceError, viewBytes } from "./RenderDevice.js";
|
|
2
|
+
import { reflectShaderSources } from "./ShaderReflection.js";
|
|
3
|
+
import { Texture, bytesPerPixel, isCompressedTextureFormat } from "./Texture.js";
|
|
4
|
+
import { TextureBinding } from "./TextureBinding.js";
|
|
5
|
+
import {} from "./VertexFormat.js";
|
|
6
|
+
const BUFFER_USAGE = {
|
|
7
|
+
MAP_READ: 0x0001,
|
|
8
|
+
COPY_SRC: 0x0004,
|
|
9
|
+
COPY_DST: 0x0008,
|
|
10
|
+
INDEX: 0x0010,
|
|
11
|
+
VERTEX: 0x0020,
|
|
12
|
+
UNIFORM: 0x0040
|
|
13
|
+
};
|
|
14
|
+
const MAP_MODE = {
|
|
15
|
+
READ: 0x0001
|
|
16
|
+
};
|
|
17
|
+
const TEXTURE_USAGE = {
|
|
18
|
+
RENDER_ATTACHMENT: 0x0010,
|
|
19
|
+
COPY_SRC: 0x0001,
|
|
20
|
+
COPY_DST: 0x0002,
|
|
21
|
+
TEXTURE_BINDING: 0x0004
|
|
22
|
+
};
|
|
23
|
+
const DEPTH_TEXTURE_FORMAT = "depth24plus";
|
|
24
|
+
class WebGPURenderBuffer {
|
|
25
|
+
id;
|
|
26
|
+
usage;
|
|
27
|
+
byteLength;
|
|
28
|
+
nativeByteLength;
|
|
29
|
+
handle;
|
|
30
|
+
disposed = false;
|
|
31
|
+
bytes;
|
|
32
|
+
constructor(id, usage, byteLength, nativeByteLength, handle, initialData) {
|
|
33
|
+
this.id = id;
|
|
34
|
+
this.usage = usage;
|
|
35
|
+
this.byteLength = byteLength;
|
|
36
|
+
this.nativeByteLength = nativeByteLength;
|
|
37
|
+
this.handle = handle;
|
|
38
|
+
this.bytes = new Uint8Array(byteLength);
|
|
39
|
+
if (initialData)
|
|
40
|
+
this.bytes.set(viewBytes(initialData), 0);
|
|
41
|
+
}
|
|
42
|
+
dispose() {
|
|
43
|
+
if (!this.disposed) {
|
|
44
|
+
this.handle.destroy();
|
|
45
|
+
this.disposed = true;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
class WebGPUShaderProgram {
|
|
50
|
+
id;
|
|
51
|
+
label;
|
|
52
|
+
marker;
|
|
53
|
+
reflection;
|
|
54
|
+
modules;
|
|
55
|
+
entryPoints;
|
|
56
|
+
nativeUniformLayout;
|
|
57
|
+
disposed = false;
|
|
58
|
+
renderPipelines = new Map();
|
|
59
|
+
constructor(id, label, marker, reflection, modules, entryPoints, nativeUniformLayout) {
|
|
60
|
+
this.id = id;
|
|
61
|
+
this.label = label;
|
|
62
|
+
this.marker = marker;
|
|
63
|
+
this.reflection = reflection;
|
|
64
|
+
this.modules = modules;
|
|
65
|
+
this.entryPoints = entryPoints;
|
|
66
|
+
this.nativeUniformLayout = nativeUniformLayout;
|
|
67
|
+
}
|
|
68
|
+
dispose() {
|
|
69
|
+
this.disposed = true;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
class WebGPURenderTarget {
|
|
73
|
+
id;
|
|
74
|
+
width;
|
|
75
|
+
height;
|
|
76
|
+
label;
|
|
77
|
+
colorTexture;
|
|
78
|
+
depthTexture;
|
|
79
|
+
nativeTexture;
|
|
80
|
+
nativeView;
|
|
81
|
+
nativeDepthTexture;
|
|
82
|
+
nativeDepthView;
|
|
83
|
+
hasDepth;
|
|
84
|
+
disposed = false;
|
|
85
|
+
nativeNeedsClear = true;
|
|
86
|
+
nativeClearColor = [0, 0, 0, 1];
|
|
87
|
+
colorPixels;
|
|
88
|
+
colorFloatPixels;
|
|
89
|
+
depthPixels;
|
|
90
|
+
constructor(id, width, height, label, colorTexture, depthTexture, nativeTexture, nativeView, nativeDepthTexture, nativeDepthView, hasDepth) {
|
|
91
|
+
this.id = id;
|
|
92
|
+
this.width = width;
|
|
93
|
+
this.height = height;
|
|
94
|
+
this.label = label;
|
|
95
|
+
this.colorTexture = colorTexture;
|
|
96
|
+
this.depthTexture = depthTexture;
|
|
97
|
+
this.nativeTexture = nativeTexture;
|
|
98
|
+
this.nativeView = nativeView;
|
|
99
|
+
this.nativeDepthTexture = nativeDepthTexture;
|
|
100
|
+
this.nativeDepthView = nativeDepthView;
|
|
101
|
+
this.hasDepth = hasDepth;
|
|
102
|
+
this.colorPixels = new Uint8Array(width * height * 4);
|
|
103
|
+
this.colorFloatPixels = colorTexture.format === "rgba16f" || colorTexture.format === "rgba32f"
|
|
104
|
+
? new Float32Array(width * height * 4)
|
|
105
|
+
: null;
|
|
106
|
+
this.depthPixels = hasDepth ? new Float32Array(width * height).fill(1) : null;
|
|
107
|
+
}
|
|
108
|
+
dispose() {
|
|
109
|
+
if (!this.disposed) {
|
|
110
|
+
this.nativeTexture?.destroy();
|
|
111
|
+
this.nativeDepthTexture?.destroy();
|
|
112
|
+
this.colorTexture.dispose();
|
|
113
|
+
this.depthTexture?.dispose();
|
|
114
|
+
this.disposed = true;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
export class WebGPUDevice {
|
|
119
|
+
adapter;
|
|
120
|
+
device;
|
|
121
|
+
canvasContext;
|
|
122
|
+
presentationFormat;
|
|
123
|
+
kind = "webgpu";
|
|
124
|
+
info;
|
|
125
|
+
disposed = false;
|
|
126
|
+
contextLost = false;
|
|
127
|
+
nextId = 1;
|
|
128
|
+
frameActive = false;
|
|
129
|
+
drawCalls = 0;
|
|
130
|
+
viewportWidth = 0;
|
|
131
|
+
viewportHeight = 0;
|
|
132
|
+
clearColor = [0, 0, 0, 1];
|
|
133
|
+
lastError = null;
|
|
134
|
+
nativeSubmissions = 0;
|
|
135
|
+
nativeTextureBindings = 0;
|
|
136
|
+
nativeGeneratedBasicSubmissions = 0;
|
|
137
|
+
nativeGeneratedTextureSubmissions = 0;
|
|
138
|
+
nativePassthroughSubmissions = 0;
|
|
139
|
+
nativePbrSubmissions = 0;
|
|
140
|
+
nativeInstancedSubmissions = 0;
|
|
141
|
+
nativeSkinnedSubmissions = 0;
|
|
142
|
+
nativeMorphSubmissions = 0;
|
|
143
|
+
nativeEnvironmentBindings = 0;
|
|
144
|
+
nativeShadowMapBindings = 0;
|
|
145
|
+
canvasSubmissions = 0;
|
|
146
|
+
buffers = new Set();
|
|
147
|
+
shaders = new Set();
|
|
148
|
+
renderTargets = new Set();
|
|
149
|
+
nativeSampledTextures = new Map();
|
|
150
|
+
activeRenderTarget = null;
|
|
151
|
+
backbufferPixels = null;
|
|
152
|
+
backbufferWidth = 0;
|
|
153
|
+
backbufferHeight = 0;
|
|
154
|
+
canvasDepthTexture = null;
|
|
155
|
+
canvasDepthView = null;
|
|
156
|
+
canvasDepthWidth = 0;
|
|
157
|
+
canvasDepthHeight = 0;
|
|
158
|
+
static async create(options = {}) {
|
|
159
|
+
const gpu = options.gpu ?? readWebGPU(globalThis);
|
|
160
|
+
const adapter = options.adapter ?? (await requestAdapter(gpu));
|
|
161
|
+
if (!adapter) {
|
|
162
|
+
throw new RenderDeviceError("WebGPU adapter request did not return a device owner", "WEBGPU_ADAPTER_MISSING");
|
|
163
|
+
}
|
|
164
|
+
const device = validateWebGPUDevice(await requestDevice(adapter, options.device));
|
|
165
|
+
const canvasContext = options.canvas ? acquireWebGPUCanvasContext(options.canvas) : null;
|
|
166
|
+
const presentationFormat = options.presentationFormat ?? gpu?.getPreferredCanvasFormat?.() ?? "bgra8unorm";
|
|
167
|
+
if (canvasContext) {
|
|
168
|
+
canvasContext.configure({
|
|
169
|
+
device,
|
|
170
|
+
format: presentationFormat,
|
|
171
|
+
alphaMode: "opaque"
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
return new WebGPUDevice(adapter, device, canvasContext, presentationFormat);
|
|
175
|
+
}
|
|
176
|
+
constructor(adapter, device, canvasContext, presentationFormat) {
|
|
177
|
+
this.adapter = adapter;
|
|
178
|
+
this.device = device;
|
|
179
|
+
this.canvasContext = canvasContext;
|
|
180
|
+
this.presentationFormat = presentationFormat;
|
|
181
|
+
const supportsNativeRenderPipeline = hasNativeRenderPipeline(device);
|
|
182
|
+
const supportsNativeTextureReadback = hasNativeTextureReadback(device);
|
|
183
|
+
const supportsCanvasSurface = supportsNativeRenderPipeline && canvasContext !== null;
|
|
184
|
+
this.info = {
|
|
185
|
+
backend: "webgpu",
|
|
186
|
+
vendor: adapter.info?.vendor ?? "webgpu",
|
|
187
|
+
renderer: describeAdapter(adapter) ?? "webgpu-render-device",
|
|
188
|
+
capabilities: [
|
|
189
|
+
"buffers",
|
|
190
|
+
"buffer-readback",
|
|
191
|
+
"shader-validation",
|
|
192
|
+
"render-targets",
|
|
193
|
+
"pixel-readback",
|
|
194
|
+
"postprocess-presentation",
|
|
195
|
+
"hdr-render-targets",
|
|
196
|
+
"float-readback",
|
|
197
|
+
"draw-validation",
|
|
198
|
+
"rasterization",
|
|
199
|
+
"depth-render-targets",
|
|
200
|
+
"spot-shadow-maps",
|
|
201
|
+
"point-shadow-maps",
|
|
202
|
+
"hdr-image-based-lighting",
|
|
203
|
+
...(supportsNativeRenderPipeline ? ["native-render-pipeline"] : []),
|
|
204
|
+
...(hasNativeSampledTextureBinding(device) ? ["native-sampled-textures"] : []),
|
|
205
|
+
...(supportsNativeTextureReadback ? ["native-texture-readback"] : []),
|
|
206
|
+
...(supportsCanvasSurface ? ["canvas-surface"] : [])
|
|
207
|
+
],
|
|
208
|
+
limitations: [
|
|
209
|
+
"Synchronous readPixels remains CPU-shadowed for deterministic tests; use readPixelsAsync for native WebGPU texture-to-buffer readback when available.",
|
|
210
|
+
"Renderer.render() stays synchronous and uses CPU-shadowed readback for deterministic compatibility; use Renderer.renderAsync() when renderer-owned WebGPU postprocess must read native render targets.",
|
|
211
|
+
"Sampleable WebGPU depth render-target textures are not advertised until native texture binding and depth readback evidence exists.",
|
|
212
|
+
...(supportsNativeRenderPipeline ? [] : ["native WebGPU render-pipeline submission requires createRenderPipeline, createTexture, and createCommandEncoder."]),
|
|
213
|
+
...(hasNativeSampledTextureBinding(device) ? [] : ["native WebGPU sampled texture binding requires createSampler, createTexture, and queue.writeTexture."]),
|
|
214
|
+
...(supportsNativeTextureReadback ? [] : ["native WebGPU texture readback requires copyTextureToBuffer plus mappable readback buffers."]),
|
|
215
|
+
...(canvasContext ? [] : ["Canvas presentation requires a canvas that exposes a webgpu context."])
|
|
216
|
+
]
|
|
217
|
+
};
|
|
218
|
+
this.observeDeviceLost();
|
|
219
|
+
}
|
|
220
|
+
createBuffer(usage, byteLength, initialData) {
|
|
221
|
+
this.assertAlive();
|
|
222
|
+
if (byteLength <= 0 || !Number.isInteger(byteLength)) {
|
|
223
|
+
throw new RenderDeviceError("Buffer byteLength must be a positive integer", "INVALID_BUFFER_SIZE", { byteLength });
|
|
224
|
+
}
|
|
225
|
+
if (initialData && initialData.byteLength > byteLength) {
|
|
226
|
+
throw new RenderDeviceError("Initial data exceeds buffer size", "BUFFER_OVERFLOW", {
|
|
227
|
+
byteLength,
|
|
228
|
+
dataByteLength: initialData.byteLength
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
const handle = this.device.createBuffer({
|
|
232
|
+
label: `aura3d-${usage}-${this.nextId}`,
|
|
233
|
+
size: alignTo(byteLength, 4),
|
|
234
|
+
usage: bufferUsageFlags(usage)
|
|
235
|
+
});
|
|
236
|
+
const buffer = new WebGPURenderBuffer(this.nextId++, usage, byteLength, alignTo(byteLength, 4), handle, initialData);
|
|
237
|
+
this.buffers.add(buffer);
|
|
238
|
+
if (initialData)
|
|
239
|
+
writeAlignedQueueBuffer(this.device.queue, handle, 0, initialData, buffer.nativeByteLength);
|
|
240
|
+
return buffer;
|
|
241
|
+
}
|
|
242
|
+
updateBuffer(buffer, byteOffset, data) {
|
|
243
|
+
this.assertAlive();
|
|
244
|
+
const webgpuBuffer = this.requireBuffer(buffer);
|
|
245
|
+
if (byteOffset < 0 || byteOffset + data.byteLength > webgpuBuffer.byteLength) {
|
|
246
|
+
throw new RenderDeviceError("Buffer update range is out of bounds", "BUFFER_RANGE_OUT_OF_BOUNDS", {
|
|
247
|
+
byteOffset,
|
|
248
|
+
dataByteLength: data.byteLength,
|
|
249
|
+
byteLength: webgpuBuffer.byteLength
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
webgpuBuffer.bytes.set(viewBytes(data), byteOffset);
|
|
253
|
+
writeAlignedQueueBuffer(this.device.queue, webgpuBuffer.handle, byteOffset, webgpuBuffer.bytes.subarray(byteOffset, byteOffset + data.byteLength), webgpuBuffer.nativeByteLength);
|
|
254
|
+
}
|
|
255
|
+
readBuffer(buffer, byteOffset = 0, byteLength = buffer.byteLength - byteOffset) {
|
|
256
|
+
this.assertAlive();
|
|
257
|
+
const webgpuBuffer = this.requireBuffer(buffer);
|
|
258
|
+
if (byteOffset < 0 || byteLength < 0 || byteOffset + byteLength > webgpuBuffer.byteLength) {
|
|
259
|
+
throw new RenderDeviceError("Buffer read range is out of bounds", "BUFFER_RANGE_OUT_OF_BOUNDS", {
|
|
260
|
+
byteOffset,
|
|
261
|
+
byteLength,
|
|
262
|
+
bufferByteLength: webgpuBuffer.byteLength
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
return webgpuBuffer.bytes.slice(byteOffset, byteOffset + byteLength);
|
|
266
|
+
}
|
|
267
|
+
createShaderProgram(sources) {
|
|
268
|
+
this.assertAlive();
|
|
269
|
+
if (!sources.vertex.includes(sources.marker) || !sources.fragment.includes(sources.marker)) {
|
|
270
|
+
throw new RenderDeviceError("Shader source marker is missing from compiled sources", "SHADER_MARKER_MISSING", {
|
|
271
|
+
label: sources.label,
|
|
272
|
+
marker: sources.marker
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
const nativeSources = createNativeShaderSources(sources);
|
|
276
|
+
const modules = this.device.createShaderModule
|
|
277
|
+
? [
|
|
278
|
+
this.device.createShaderModule({ label: `${sources.label}-vertex`, code: nativeSources.vertex }),
|
|
279
|
+
this.device.createShaderModule({ label: `${sources.label}-fragment`, code: nativeSources.fragment })
|
|
280
|
+
]
|
|
281
|
+
: [];
|
|
282
|
+
const shader = new WebGPUShaderProgram(this.nextId++, sources.label, sources.marker, reflectShaderSources(sources), modules, nativeSources.entryPoints, nativeSources.uniformLayout);
|
|
283
|
+
this.shaders.add(shader);
|
|
284
|
+
return shader;
|
|
285
|
+
}
|
|
286
|
+
createRenderTarget(descriptor) {
|
|
287
|
+
this.assertAlive();
|
|
288
|
+
if (!Number.isInteger(descriptor.width) ||
|
|
289
|
+
descriptor.width <= 0 ||
|
|
290
|
+
!Number.isInteger(descriptor.height) ||
|
|
291
|
+
descriptor.height <= 0) {
|
|
292
|
+
throw new RenderDeviceError("Render target dimensions must be positive integers", "INVALID_RENDER_TARGET_SIZE", {
|
|
293
|
+
width: descriptor.width,
|
|
294
|
+
height: descriptor.height,
|
|
295
|
+
label: descriptor.label
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
const nativeTexture = this.device.createTexture?.({
|
|
299
|
+
label: descriptor.label ?? "aura3d-webgpu-render-target",
|
|
300
|
+
size: [descriptor.width, descriptor.height],
|
|
301
|
+
format: webgpuTextureFormat(descriptor.format ?? "rgba8"),
|
|
302
|
+
usage: TEXTURE_USAGE.RENDER_ATTACHMENT | TEXTURE_USAGE.COPY_SRC | TEXTURE_USAGE.COPY_DST | TEXTURE_USAGE.TEXTURE_BINDING
|
|
303
|
+
}) ?? null;
|
|
304
|
+
const hasDepth = descriptor.depth !== false;
|
|
305
|
+
const hasSampleableDepth = descriptor.depth === "texture";
|
|
306
|
+
const nativeDepthTexture = hasDepth
|
|
307
|
+
? this.device.createTexture?.({
|
|
308
|
+
label: `${descriptor.label ?? "aura3d-webgpu-render-target"}-depth`,
|
|
309
|
+
size: [descriptor.width, descriptor.height],
|
|
310
|
+
format: DEPTH_TEXTURE_FORMAT,
|
|
311
|
+
usage: TEXTURE_USAGE.RENDER_ATTACHMENT | (hasSampleableDepth ? TEXTURE_USAGE.TEXTURE_BINDING : 0)
|
|
312
|
+
}) ?? null
|
|
313
|
+
: null;
|
|
314
|
+
const depthTexture = hasSampleableDepth
|
|
315
|
+
? new Texture({ width: descriptor.width, height: descriptor.height, format: "depth24", label: `${descriptor.label ?? "render-target"}-depth` })
|
|
316
|
+
: undefined;
|
|
317
|
+
const target = new WebGPURenderTarget(this.nextId++, descriptor.width, descriptor.height, descriptor.label ?? "render-target", new Texture({ width: descriptor.width, height: descriptor.height, format: descriptor.format ?? "rgba8", label: descriptor.label ?? "render-target-color" }), depthTexture, nativeTexture, nativeTexture?.createView() ?? null, nativeDepthTexture, nativeDepthTexture?.createView() ?? null, hasDepth);
|
|
318
|
+
this.renderTargets.add(target);
|
|
319
|
+
return target;
|
|
320
|
+
}
|
|
321
|
+
setRenderTarget(target) {
|
|
322
|
+
this.assertAlive();
|
|
323
|
+
if (target === null) {
|
|
324
|
+
this.activeRenderTarget = null;
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
327
|
+
if (!(target instanceof WebGPURenderTarget) || !this.renderTargets.has(target) || target.disposed) {
|
|
328
|
+
throw new RenderDeviceError("Render target is not a live WebGPU resource owned by this device", "INVALID_RESOURCE", {
|
|
329
|
+
targetId: target.id
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
this.activeRenderTarget = target;
|
|
333
|
+
}
|
|
334
|
+
writeRenderTargetPixels(target, pixels) {
|
|
335
|
+
this.assertAlive();
|
|
336
|
+
const webgpuTarget = this.requireRenderTarget(target);
|
|
337
|
+
const expectedLength = webgpuTarget.width * webgpuTarget.height * 4;
|
|
338
|
+
if (pixels.length !== expectedLength) {
|
|
339
|
+
throw new RenderDeviceError("Render target pixel upload length does not match target dimensions", "INVALID_RENDER_TARGET_PIXELS", {
|
|
340
|
+
targetId: target.id,
|
|
341
|
+
expectedLength,
|
|
342
|
+
actualLength: pixels.length
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
webgpuTarget.colorPixels.set(pixels);
|
|
346
|
+
if (webgpuTarget.colorFloatPixels) {
|
|
347
|
+
for (let index = 0; index < pixels.length; index += 1) {
|
|
348
|
+
webgpuTarget.colorFloatPixels[index] = pixels[index] / 255;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
if (webgpuTarget.nativeTexture && webgpuTarget.colorTexture.format === "rgba8" && hasNativeTextureUpload(this.device)) {
|
|
352
|
+
this.device.queue.writeTexture({ texture: webgpuTarget.nativeTexture }, pixels, { bytesPerRow: webgpuTarget.width * 4, rowsPerImage: webgpuTarget.height }, { width: webgpuTarget.width, height: webgpuTarget.height, depthOrArrayLayers: 1 });
|
|
353
|
+
webgpuTarget.nativeNeedsClear = false;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
presentRenderTarget(source) {
|
|
357
|
+
this.assertAlive();
|
|
358
|
+
const target = this.requireRenderTarget(source);
|
|
359
|
+
if (target.colorTexture.format !== "rgba8") {
|
|
360
|
+
throw new RenderDeviceError("WebGPU backbuffer presentation currently requires rgba8 source pixels", "PRESENT_FORMAT_UNSUPPORTED", {
|
|
361
|
+
source: source.label,
|
|
362
|
+
format: target.colorTexture.format
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
this.backbufferPixels = target.colorPixels.slice();
|
|
366
|
+
this.backbufferWidth = target.width;
|
|
367
|
+
this.backbufferHeight = target.height;
|
|
368
|
+
this.activeRenderTarget = null;
|
|
369
|
+
this.canvasSubmissions += 1;
|
|
370
|
+
}
|
|
371
|
+
readPixels(x, y, width, height) {
|
|
372
|
+
this.assertAlive();
|
|
373
|
+
if (![x, y, width, height].every(Number.isInteger) || x < 0 || y < 0 || width <= 0 || height <= 0) {
|
|
374
|
+
throw new RenderDeviceError("Readback rectangle must be positive and in bounds", "INVALID_READBACK_RECT", { x, y, width, height });
|
|
375
|
+
}
|
|
376
|
+
const boundsWidth = this.activeRenderTarget?.width ?? (this.backbufferPixels ? this.backbufferWidth : this.viewportWidth);
|
|
377
|
+
const boundsHeight = this.activeRenderTarget?.height ?? (this.backbufferPixels ? this.backbufferHeight : this.viewportHeight);
|
|
378
|
+
if (x + width > boundsWidth || y + height > boundsHeight) {
|
|
379
|
+
throw new RenderDeviceError("Readback rectangle exceeds framebuffer bounds", "READBACK_OUT_OF_BOUNDS", {
|
|
380
|
+
x,
|
|
381
|
+
y,
|
|
382
|
+
width,
|
|
383
|
+
height,
|
|
384
|
+
boundsWidth,
|
|
385
|
+
boundsHeight
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
const output = new Uint8Array(width * height * 4);
|
|
389
|
+
const target = this.activeRenderTarget;
|
|
390
|
+
if (!target) {
|
|
391
|
+
if (this.backbufferPixels) {
|
|
392
|
+
for (let row = 0; row < height; row += 1) {
|
|
393
|
+
const sourceOffset = ((y + row) * this.backbufferWidth + x) * 4;
|
|
394
|
+
const destOffset = row * width * 4;
|
|
395
|
+
output.set(this.backbufferPixels.subarray(sourceOffset, sourceOffset + width * 4), destOffset);
|
|
396
|
+
}
|
|
397
|
+
return output;
|
|
398
|
+
}
|
|
399
|
+
const bytes = rgbaBytes(this.clearColor);
|
|
400
|
+
for (let index = 0; index < output.length; index += 4)
|
|
401
|
+
output.set(bytes, index);
|
|
402
|
+
return output;
|
|
403
|
+
}
|
|
404
|
+
for (let row = 0; row < height; row += 1) {
|
|
405
|
+
const sourceOffset = ((y + row) * target.width + x) * 4;
|
|
406
|
+
const destOffset = row * width * 4;
|
|
407
|
+
output.set(target.colorPixels.subarray(sourceOffset, sourceOffset + width * 4), destOffset);
|
|
408
|
+
}
|
|
409
|
+
return output;
|
|
410
|
+
}
|
|
411
|
+
async readPixelsAsync(x, y, width, height) {
|
|
412
|
+
this.assertAlive();
|
|
413
|
+
if (![x, y, width, height].every(Number.isInteger) || x < 0 || y < 0 || width <= 0 || height <= 0) {
|
|
414
|
+
throw new RenderDeviceError("Readback rectangle must be positive and in bounds", "INVALID_READBACK_RECT", { x, y, width, height });
|
|
415
|
+
}
|
|
416
|
+
const target = this.activeRenderTarget;
|
|
417
|
+
if (!target || !target.nativeTexture) {
|
|
418
|
+
throw new RenderDeviceError("Native WebGPU readback requires an active native render target", "NATIVE_READBACK_TARGET_MISSING", {
|
|
419
|
+
x,
|
|
420
|
+
y,
|
|
421
|
+
width,
|
|
422
|
+
height,
|
|
423
|
+
renderTarget: target?.label ?? null
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
if (target.colorTexture.format !== "rgba8") {
|
|
427
|
+
throw new RenderDeviceError("Native WebGPU readback currently supports rgba8 render targets", "NATIVE_READBACK_FORMAT_UNSUPPORTED", {
|
|
428
|
+
format: target.colorTexture.format,
|
|
429
|
+
renderTarget: target.label
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
if (x + width > target.width || y + height > target.height) {
|
|
433
|
+
throw new RenderDeviceError("Readback rectangle exceeds framebuffer bounds", "READBACK_OUT_OF_BOUNDS", {
|
|
434
|
+
x,
|
|
435
|
+
y,
|
|
436
|
+
width,
|
|
437
|
+
height,
|
|
438
|
+
boundsWidth: target.width,
|
|
439
|
+
boundsHeight: target.height
|
|
440
|
+
});
|
|
441
|
+
}
|
|
442
|
+
if (!hasNativeTextureReadback(this.device)) {
|
|
443
|
+
throw new RenderDeviceError("WebGPU device does not expose native texture-to-buffer readback", "NATIVE_READBACK_UNSUPPORTED");
|
|
444
|
+
}
|
|
445
|
+
this.flushNativeRenderTargetClear(target);
|
|
446
|
+
const bytesPerPixel = 4;
|
|
447
|
+
const unpaddedBytesPerRow = width * bytesPerPixel;
|
|
448
|
+
const bytesPerRow = alignTo(unpaddedBytesPerRow, 256);
|
|
449
|
+
const bufferSize = bytesPerRow * height;
|
|
450
|
+
const readback = this.device.createBuffer({
|
|
451
|
+
label: `${target.label}-native-readback`,
|
|
452
|
+
size: bufferSize,
|
|
453
|
+
usage: BUFFER_USAGE.MAP_READ | BUFFER_USAGE.COPY_DST
|
|
454
|
+
});
|
|
455
|
+
const encoder = this.device.createCommandEncoder({ label: `${target.label}-native-readback-encoder` });
|
|
456
|
+
const copyTextureToBuffer = encoder.copyTextureToBuffer;
|
|
457
|
+
if (!copyTextureToBuffer) {
|
|
458
|
+
readback.destroy();
|
|
459
|
+
throw new RenderDeviceError("WebGPU command encoder does not expose texture-to-buffer copy", "NATIVE_READBACK_UNSUPPORTED");
|
|
460
|
+
}
|
|
461
|
+
copyTextureToBuffer.call(encoder, { texture: target.nativeTexture, origin: { x, y, z: 0 } }, { buffer: readback, bytesPerRow, rowsPerImage: height }, { width, height, depthOrArrayLayers: 1 });
|
|
462
|
+
this.device.queue.submit([encoder.finish()]);
|
|
463
|
+
try {
|
|
464
|
+
const mapAsync = readback.mapAsync;
|
|
465
|
+
const getMappedRange = readback.getMappedRange;
|
|
466
|
+
const unmap = readback.unmap;
|
|
467
|
+
if (!mapAsync || !getMappedRange || !unmap) {
|
|
468
|
+
throw new RenderDeviceError("WebGPU readback buffer does not expose mapped readback APIs", "NATIVE_READBACK_UNSUPPORTED");
|
|
469
|
+
}
|
|
470
|
+
await mapAsync.call(readback, MAP_MODE.READ);
|
|
471
|
+
const mapped = new Uint8Array(getMappedRange.call(readback));
|
|
472
|
+
const output = new Uint8Array(width * height * bytesPerPixel);
|
|
473
|
+
for (let row = 0; row < height; row += 1) {
|
|
474
|
+
const sourceOffset = row * bytesPerRow;
|
|
475
|
+
const destOffset = (height - 1 - row) * unpaddedBytesPerRow;
|
|
476
|
+
output.set(mapped.subarray(sourceOffset, sourceOffset + unpaddedBytesPerRow), destOffset);
|
|
477
|
+
}
|
|
478
|
+
unmap.call(readback);
|
|
479
|
+
return output;
|
|
480
|
+
}
|
|
481
|
+
finally {
|
|
482
|
+
readback.destroy();
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
async readFloatPixelsAsync(x, y, width, height) {
|
|
486
|
+
this.assertAlive();
|
|
487
|
+
if (![x, y, width, height].every(Number.isInteger) || x < 0 || y < 0 || width <= 0 || height <= 0) {
|
|
488
|
+
throw new RenderDeviceError("Float readback rectangle must be positive and in bounds", "INVALID_READBACK_RECT", { x, y, width, height });
|
|
489
|
+
}
|
|
490
|
+
const target = this.activeRenderTarget;
|
|
491
|
+
if (!target || !target.nativeTexture) {
|
|
492
|
+
throw new RenderDeviceError("Native WebGPU float readback requires an active native render target", "NATIVE_READBACK_TARGET_MISSING", {
|
|
493
|
+
x,
|
|
494
|
+
y,
|
|
495
|
+
width,
|
|
496
|
+
height,
|
|
497
|
+
renderTarget: target?.label ?? null
|
|
498
|
+
});
|
|
499
|
+
}
|
|
500
|
+
if (x + width > target.width || y + height > target.height) {
|
|
501
|
+
throw new RenderDeviceError("Float readback rectangle exceeds framebuffer bounds", "READBACK_OUT_OF_BOUNDS", {
|
|
502
|
+
x,
|
|
503
|
+
y,
|
|
504
|
+
width,
|
|
505
|
+
height,
|
|
506
|
+
boundsWidth: target.width,
|
|
507
|
+
boundsHeight: target.height
|
|
508
|
+
});
|
|
509
|
+
}
|
|
510
|
+
if (!hasNativeTextureReadback(this.device)) {
|
|
511
|
+
throw new RenderDeviceError("WebGPU device does not expose native texture-to-buffer readback", "NATIVE_READBACK_UNSUPPORTED");
|
|
512
|
+
}
|
|
513
|
+
this.flushNativeRenderTargetClear(target);
|
|
514
|
+
const format = target.colorTexture.format;
|
|
515
|
+
const bytesPerPixel = format === "rgba32f" ? 16 : format === "rgba16f" ? 8 : 4;
|
|
516
|
+
const unpaddedBytesPerRow = width * bytesPerPixel;
|
|
517
|
+
const bytesPerRow = alignTo(unpaddedBytesPerRow, 256);
|
|
518
|
+
const bufferSize = bytesPerRow * height;
|
|
519
|
+
const readback = this.device.createBuffer({
|
|
520
|
+
label: `${target.label}-native-float-readback`,
|
|
521
|
+
size: bufferSize,
|
|
522
|
+
usage: BUFFER_USAGE.MAP_READ | BUFFER_USAGE.COPY_DST
|
|
523
|
+
});
|
|
524
|
+
const encoder = this.device.createCommandEncoder({ label: `${target.label}-native-float-readback-encoder` });
|
|
525
|
+
const copyTextureToBuffer = encoder.copyTextureToBuffer;
|
|
526
|
+
if (!copyTextureToBuffer) {
|
|
527
|
+
readback.destroy();
|
|
528
|
+
throw new RenderDeviceError("WebGPU command encoder does not expose texture-to-buffer copy", "NATIVE_READBACK_UNSUPPORTED");
|
|
529
|
+
}
|
|
530
|
+
copyTextureToBuffer.call(encoder, { texture: target.nativeTexture, origin: { x, y, z: 0 } }, { buffer: readback, bytesPerRow, rowsPerImage: height }, { width, height, depthOrArrayLayers: 1 });
|
|
531
|
+
this.device.queue.submit([encoder.finish()]);
|
|
532
|
+
try {
|
|
533
|
+
const mapAsync = readback.mapAsync;
|
|
534
|
+
const getMappedRange = readback.getMappedRange;
|
|
535
|
+
const unmap = readback.unmap;
|
|
536
|
+
if (!mapAsync || !getMappedRange || !unmap) {
|
|
537
|
+
throw new RenderDeviceError("WebGPU readback buffer does not expose mapped readback APIs", "NATIVE_READBACK_UNSUPPORTED");
|
|
538
|
+
}
|
|
539
|
+
await mapAsync.call(readback, MAP_MODE.READ);
|
|
540
|
+
const mapped = new Uint8Array(getMappedRange.call(readback));
|
|
541
|
+
const view = new DataView(mapped.buffer, mapped.byteOffset, mapped.byteLength);
|
|
542
|
+
const output = new Float32Array(width * height * 4);
|
|
543
|
+
for (let row = 0; row < height; row += 1) {
|
|
544
|
+
const destRow = height - 1 - row;
|
|
545
|
+
for (let column = 0; column < width; column += 1) {
|
|
546
|
+
const sourceOffset = row * bytesPerRow + column * bytesPerPixel;
|
|
547
|
+
const destOffset = (destRow * width + column) * 4;
|
|
548
|
+
if (format === "rgba32f") {
|
|
549
|
+
output[destOffset] = view.getFloat32(sourceOffset, true);
|
|
550
|
+
output[destOffset + 1] = view.getFloat32(sourceOffset + 4, true);
|
|
551
|
+
output[destOffset + 2] = view.getFloat32(sourceOffset + 8, true);
|
|
552
|
+
output[destOffset + 3] = view.getFloat32(sourceOffset + 12, true);
|
|
553
|
+
}
|
|
554
|
+
else if (format === "rgba16f") {
|
|
555
|
+
output[destOffset] = halfFloatToNumber(view.getUint16(sourceOffset, true));
|
|
556
|
+
output[destOffset + 1] = halfFloatToNumber(view.getUint16(sourceOffset + 2, true));
|
|
557
|
+
output[destOffset + 2] = halfFloatToNumber(view.getUint16(sourceOffset + 4, true));
|
|
558
|
+
output[destOffset + 3] = halfFloatToNumber(view.getUint16(sourceOffset + 6, true));
|
|
559
|
+
}
|
|
560
|
+
else {
|
|
561
|
+
output[destOffset] = (mapped[sourceOffset] ?? 0) / 255;
|
|
562
|
+
output[destOffset + 1] = (mapped[sourceOffset + 1] ?? 0) / 255;
|
|
563
|
+
output[destOffset + 2] = (mapped[sourceOffset + 2] ?? 0) / 255;
|
|
564
|
+
output[destOffset + 3] = (mapped[sourceOffset + 3] ?? 0) / 255;
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
unmap.call(readback);
|
|
569
|
+
return output;
|
|
570
|
+
}
|
|
571
|
+
finally {
|
|
572
|
+
readback.destroy();
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
readFloatPixels(x, y, width, height) {
|
|
576
|
+
this.assertAlive();
|
|
577
|
+
if (![x, y, width, height].every(Number.isInteger) || x < 0 || y < 0 || width <= 0 || height <= 0) {
|
|
578
|
+
throw new RenderDeviceError("Float readback rectangle must be positive and in bounds", "INVALID_READBACK_RECT", { x, y, width, height });
|
|
579
|
+
}
|
|
580
|
+
const boundsWidth = this.activeRenderTarget?.width ?? (this.backbufferPixels ? this.backbufferWidth : this.viewportWidth);
|
|
581
|
+
const boundsHeight = this.activeRenderTarget?.height ?? (this.backbufferPixels ? this.backbufferHeight : this.viewportHeight);
|
|
582
|
+
if (x + width > boundsWidth || y + height > boundsHeight) {
|
|
583
|
+
throw new RenderDeviceError("Float readback rectangle exceeds framebuffer bounds", "READBACK_OUT_OF_BOUNDS", {
|
|
584
|
+
x,
|
|
585
|
+
y,
|
|
586
|
+
width,
|
|
587
|
+
height,
|
|
588
|
+
boundsWidth,
|
|
589
|
+
boundsHeight
|
|
590
|
+
});
|
|
591
|
+
}
|
|
592
|
+
const output = new Float32Array(width * height * 4);
|
|
593
|
+
const target = this.activeRenderTarget;
|
|
594
|
+
if (!target) {
|
|
595
|
+
if (this.backbufferPixels) {
|
|
596
|
+
const bytes = this.readPixels(x, y, width, height);
|
|
597
|
+
for (let index = 0; index < bytes.length; index += 1)
|
|
598
|
+
output[index] = bytes[index] / 255;
|
|
599
|
+
return output;
|
|
600
|
+
}
|
|
601
|
+
for (let index = 0; index < output.length; index += 4) {
|
|
602
|
+
output[index] = this.clearColor[0];
|
|
603
|
+
output[index + 1] = this.clearColor[1];
|
|
604
|
+
output[index + 2] = this.clearColor[2];
|
|
605
|
+
output[index + 3] = this.clearColor[3];
|
|
606
|
+
}
|
|
607
|
+
return output;
|
|
608
|
+
}
|
|
609
|
+
if (target.colorFloatPixels) {
|
|
610
|
+
for (let row = 0; row < height; row += 1) {
|
|
611
|
+
const sourceOffset = ((y + row) * target.width + x) * 4;
|
|
612
|
+
const destOffset = row * width * 4;
|
|
613
|
+
output.set(target.colorFloatPixels.subarray(sourceOffset, sourceOffset + width * 4), destOffset);
|
|
614
|
+
}
|
|
615
|
+
return output;
|
|
616
|
+
}
|
|
617
|
+
const bytes = this.readPixels(x, y, width, height);
|
|
618
|
+
for (let index = 0; index < bytes.length; index += 1)
|
|
619
|
+
output[index] = bytes[index] / 255;
|
|
620
|
+
return output;
|
|
621
|
+
}
|
|
622
|
+
beginFrame(width, height) {
|
|
623
|
+
this.assertAlive();
|
|
624
|
+
if (this.frameActive) {
|
|
625
|
+
throw new RenderDeviceError("Frame is already active", "FRAME_ALREADY_ACTIVE");
|
|
626
|
+
}
|
|
627
|
+
if (width <= 0 || height <= 0) {
|
|
628
|
+
throw new RenderDeviceError("Frame dimensions must be positive", "INVALID_FRAME_SIZE", { width, height });
|
|
629
|
+
}
|
|
630
|
+
this.frameActive = true;
|
|
631
|
+
this.drawCalls = 0;
|
|
632
|
+
this.lastError = null;
|
|
633
|
+
this.viewportWidth = width;
|
|
634
|
+
this.viewportHeight = height;
|
|
635
|
+
this.ensureCanvasDepthAttachment(width, height);
|
|
636
|
+
}
|
|
637
|
+
clear(color) {
|
|
638
|
+
this.assertFrame();
|
|
639
|
+
this.clearColor = color;
|
|
640
|
+
if (this.activeRenderTarget) {
|
|
641
|
+
this.clearActiveRenderTarget(color);
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
clearRenderTarget(color) {
|
|
645
|
+
this.assertFrame();
|
|
646
|
+
if (!this.activeRenderTarget) {
|
|
647
|
+
this.clearColor = color;
|
|
648
|
+
return;
|
|
649
|
+
}
|
|
650
|
+
this.clearActiveRenderTarget(color);
|
|
651
|
+
}
|
|
652
|
+
draw(command) {
|
|
653
|
+
this.assertFrame();
|
|
654
|
+
const vertexBuffer = this.requireBuffer(command.vertexBuffer);
|
|
655
|
+
if (vertexBuffer.disposed) {
|
|
656
|
+
throw new RenderDeviceError("Cannot draw with a disposed vertex buffer", "DISPOSED_RESOURCE", {
|
|
657
|
+
bufferId: command.vertexBuffer.id
|
|
658
|
+
});
|
|
659
|
+
}
|
|
660
|
+
if (command.indexBuffer) {
|
|
661
|
+
const indexBuffer = this.requireBuffer(command.indexBuffer);
|
|
662
|
+
if (indexBuffer.disposed) {
|
|
663
|
+
throw new RenderDeviceError("Cannot draw with a disposed index buffer", "DISPOSED_RESOURCE", {
|
|
664
|
+
bufferId: command.indexBuffer.id
|
|
665
|
+
});
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
if (command.shader)
|
|
669
|
+
this.requireShader(command.shader);
|
|
670
|
+
if (command.vertexCount <= 0) {
|
|
671
|
+
throw new RenderDeviceError("Draw command must have a positive vertex count", "INVALID_DRAW_COMMAND", {
|
|
672
|
+
vertexCount: command.vertexCount,
|
|
673
|
+
label: command.label
|
|
674
|
+
});
|
|
675
|
+
}
|
|
676
|
+
if (command.firstVertex !== undefined && (!Number.isInteger(command.firstVertex) || command.firstVertex < 0)) {
|
|
677
|
+
throw new RenderDeviceError("Draw command firstVertex must be a non-negative integer", "INVALID_DRAW_COMMAND", {
|
|
678
|
+
firstVertex: command.firstVertex,
|
|
679
|
+
label: command.label
|
|
680
|
+
});
|
|
681
|
+
}
|
|
682
|
+
if (command.indexBuffer && (command.indexCount === undefined || command.indexCount <= 0)) {
|
|
683
|
+
throw new RenderDeviceError("Indexed draw command must have a positive index count", "INVALID_DRAW_COMMAND", {
|
|
684
|
+
indexCount: command.indexCount,
|
|
685
|
+
label: command.label
|
|
686
|
+
});
|
|
687
|
+
}
|
|
688
|
+
if (command.firstIndex !== undefined && (!Number.isInteger(command.firstIndex) || command.firstIndex < 0)) {
|
|
689
|
+
throw new RenderDeviceError("Draw command firstIndex must be a non-negative integer", "INVALID_DRAW_COMMAND", {
|
|
690
|
+
firstIndex: command.firstIndex,
|
|
691
|
+
label: command.label
|
|
692
|
+
});
|
|
693
|
+
}
|
|
694
|
+
if (command.instanceCount !== undefined && (!Number.isInteger(command.instanceCount) || command.instanceCount <= 0)) {
|
|
695
|
+
throw new RenderDeviceError("Draw command instanceCount must be a positive integer", "INVALID_DRAW_COMMAND", {
|
|
696
|
+
instanceCount: command.instanceCount,
|
|
697
|
+
label: command.label
|
|
698
|
+
});
|
|
699
|
+
}
|
|
700
|
+
this.submitNativeRenderPass(command, vertexBuffer);
|
|
701
|
+
this.rasterizeDraw(command, vertexBuffer);
|
|
702
|
+
this.drawCalls += 1;
|
|
703
|
+
}
|
|
704
|
+
endFrame() {
|
|
705
|
+
this.assertFrame();
|
|
706
|
+
this.frameActive = false;
|
|
707
|
+
this.device.queue.submit([]);
|
|
708
|
+
}
|
|
709
|
+
captureState() {
|
|
710
|
+
return new Map([
|
|
711
|
+
["backend", this.kind],
|
|
712
|
+
["disposed", this.disposed],
|
|
713
|
+
["contextLost", this.contextLost],
|
|
714
|
+
["frameActive", this.frameActive],
|
|
715
|
+
["viewportWidth", this.viewportWidth],
|
|
716
|
+
["viewportHeight", this.viewportHeight],
|
|
717
|
+
["renderTarget", this.activeRenderTarget?.label ?? null],
|
|
718
|
+
["presentationFormat", this.presentationFormat],
|
|
719
|
+
["drawCalls", this.drawCalls],
|
|
720
|
+
["nativeSubmissions", this.nativeSubmissions],
|
|
721
|
+
["nativeTextureBindings", this.nativeTextureBindings],
|
|
722
|
+
["nativeGeneratedBasicSubmissions", this.nativeGeneratedBasicSubmissions],
|
|
723
|
+
["nativeGeneratedTextureSubmissions", this.nativeGeneratedTextureSubmissions],
|
|
724
|
+
["nativePassthroughSubmissions", this.nativePassthroughSubmissions],
|
|
725
|
+
["nativePbrSubmissions", this.nativePbrSubmissions],
|
|
726
|
+
["nativeInstancedSubmissions", this.nativeInstancedSubmissions],
|
|
727
|
+
["nativeSkinnedSubmissions", this.nativeSkinnedSubmissions],
|
|
728
|
+
["nativeMorphSubmissions", this.nativeMorphSubmissions],
|
|
729
|
+
["nativeEnvironmentBindings", this.nativeEnvironmentBindings],
|
|
730
|
+
["nativeShadowMapBindings", this.nativeShadowMapBindings],
|
|
731
|
+
["canvasSubmissions", this.canvasSubmissions]
|
|
732
|
+
]);
|
|
733
|
+
}
|
|
734
|
+
getDiagnostics() {
|
|
735
|
+
const liveRenderTargets = [...this.renderTargets].filter((target) => !target.disposed);
|
|
736
|
+
const bufferBytes = [...this.buffers].filter((buffer) => !buffer.disposed).reduce((total, buffer) => total + buffer.byteLength, 0);
|
|
737
|
+
const textureBytes = liveRenderTargets.reduce((total, target) => total + target.colorTexture.byteLength + (target.depthTexture?.byteLength ?? 0), 0);
|
|
738
|
+
return {
|
|
739
|
+
drawCalls: this.drawCalls,
|
|
740
|
+
buffers: [...this.buffers].filter((buffer) => !buffer.disposed).length,
|
|
741
|
+
shaders: [...this.shaders].filter((shader) => !shader.disposed).length,
|
|
742
|
+
renderTargets: liveRenderTargets.length,
|
|
743
|
+
textures: liveRenderTargets.length,
|
|
744
|
+
bufferBytes,
|
|
745
|
+
textureBytes,
|
|
746
|
+
approximateGpuMemoryBytes: bufferBytes + textureBytes,
|
|
747
|
+
compressedTextures: 0,
|
|
748
|
+
compressedTextureBytes: 0,
|
|
749
|
+
textureFallbacks: 0,
|
|
750
|
+
textureFallbackBytes: 0,
|
|
751
|
+
disposedBuffers: [...this.buffers].filter((buffer) => buffer.disposed).length,
|
|
752
|
+
disposedShaders: [...this.shaders].filter((shader) => shader.disposed).length,
|
|
753
|
+
disposedRenderTargets: [...this.renderTargets].filter((target) => target.disposed).length,
|
|
754
|
+
disposedTextures: [...this.renderTargets].reduce((total, target) => total + (target.colorTexture.disposed ? 1 : 0) + (target.depthTexture?.disposed ? 1 : 0), 0),
|
|
755
|
+
nativeSubmissions: this.nativeSubmissions,
|
|
756
|
+
nativeTextureBindings: this.nativeTextureBindings,
|
|
757
|
+
nativeGeneratedBasicSubmissions: this.nativeGeneratedBasicSubmissions,
|
|
758
|
+
nativeGeneratedTextureSubmissions: this.nativeGeneratedTextureSubmissions,
|
|
759
|
+
nativePassthroughSubmissions: this.nativePassthroughSubmissions,
|
|
760
|
+
nativePbrSubmissions: this.nativePbrSubmissions,
|
|
761
|
+
nativeInstancedSubmissions: this.nativeInstancedSubmissions,
|
|
762
|
+
nativeSkinnedSubmissions: this.nativeSkinnedSubmissions,
|
|
763
|
+
nativeMorphSubmissions: this.nativeMorphSubmissions,
|
|
764
|
+
nativeEnvironmentBindings: this.nativeEnvironmentBindings,
|
|
765
|
+
nativeShadowMapBindings: this.nativeShadowMapBindings,
|
|
766
|
+
lastError: this.lastError,
|
|
767
|
+
contextLost: this.contextLost
|
|
768
|
+
};
|
|
769
|
+
}
|
|
770
|
+
dispose() {
|
|
771
|
+
if (this.disposed)
|
|
772
|
+
return;
|
|
773
|
+
for (const buffer of this.buffers)
|
|
774
|
+
buffer.dispose();
|
|
775
|
+
for (const shader of this.shaders)
|
|
776
|
+
shader.dispose();
|
|
777
|
+
for (const target of this.renderTargets)
|
|
778
|
+
target.dispose();
|
|
779
|
+
for (const resource of this.nativeSampledTextures.values())
|
|
780
|
+
resource.texture.destroy();
|
|
781
|
+
this.nativeSampledTextures.clear();
|
|
782
|
+
this.canvasDepthTexture?.destroy();
|
|
783
|
+
this.canvasDepthTexture = null;
|
|
784
|
+
this.canvasDepthView = null;
|
|
785
|
+
this.canvasContext?.unconfigure?.();
|
|
786
|
+
this.device.destroy?.();
|
|
787
|
+
this.frameActive = false;
|
|
788
|
+
this.disposed = true;
|
|
789
|
+
}
|
|
790
|
+
assertAlive() {
|
|
791
|
+
if (this.disposed) {
|
|
792
|
+
throw new RenderDeviceError("Render device is disposed", "DISPOSED_DEVICE");
|
|
793
|
+
}
|
|
794
|
+
if (this.contextLost) {
|
|
795
|
+
throw new RenderDeviceError("Render context is lost", "CONTEXT_LOST");
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
assertFrame() {
|
|
799
|
+
this.assertAlive();
|
|
800
|
+
if (!this.frameActive) {
|
|
801
|
+
throw new RenderDeviceError("No active frame", "NO_ACTIVE_FRAME");
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
observeDeviceLost() {
|
|
805
|
+
const lost = this.device.lost;
|
|
806
|
+
if (!lost || typeof lost.then !== "function")
|
|
807
|
+
return;
|
|
808
|
+
void lost.then((info) => {
|
|
809
|
+
if (this.disposed)
|
|
810
|
+
return;
|
|
811
|
+
this.contextLost = true;
|
|
812
|
+
const detail = [info.reason, info.message].filter(Boolean).join(": ");
|
|
813
|
+
this.lastError = detail ? `WebGPU device lost: ${detail}` : "WebGPU device lost";
|
|
814
|
+
}).catch((error) => {
|
|
815
|
+
if (this.disposed)
|
|
816
|
+
return;
|
|
817
|
+
this.contextLost = true;
|
|
818
|
+
this.lastError = `WebGPU device lost promise rejected: ${error instanceof Error ? error.message : String(error)}`;
|
|
819
|
+
});
|
|
820
|
+
}
|
|
821
|
+
requireBuffer(buffer) {
|
|
822
|
+
if (!(buffer instanceof WebGPURenderBuffer) || !this.buffers.has(buffer)) {
|
|
823
|
+
throw new RenderDeviceError("Buffer was not created by this WebGPU device", "FOREIGN_RESOURCE", {
|
|
824
|
+
bufferId: buffer.id
|
|
825
|
+
});
|
|
826
|
+
}
|
|
827
|
+
if (buffer.disposed) {
|
|
828
|
+
throw new RenderDeviceError("Cannot use a disposed buffer", "DISPOSED_RESOURCE", { bufferId: buffer.id });
|
|
829
|
+
}
|
|
830
|
+
return buffer;
|
|
831
|
+
}
|
|
832
|
+
requireShader(shader) {
|
|
833
|
+
if (!(shader instanceof WebGPUShaderProgram) || !this.shaders.has(shader)) {
|
|
834
|
+
throw new RenderDeviceError("Shader was not created by this WebGPU device", "FOREIGN_RESOURCE", {
|
|
835
|
+
shaderId: shader.id
|
|
836
|
+
});
|
|
837
|
+
}
|
|
838
|
+
if (shader.disposed) {
|
|
839
|
+
throw new RenderDeviceError("Cannot use a disposed shader", "DISPOSED_RESOURCE", { shaderId: shader.id });
|
|
840
|
+
}
|
|
841
|
+
return shader;
|
|
842
|
+
}
|
|
843
|
+
requireRenderTarget(target) {
|
|
844
|
+
if (!(target instanceof WebGPURenderTarget) || !this.renderTargets.has(target)) {
|
|
845
|
+
throw new RenderDeviceError("Render target was not created by this WebGPU device", "FOREIGN_RESOURCE", {
|
|
846
|
+
targetId: target.id
|
|
847
|
+
});
|
|
848
|
+
}
|
|
849
|
+
if (target.disposed) {
|
|
850
|
+
throw new RenderDeviceError("Cannot use a disposed render target", "DISPOSED_RESOURCE", { targetId: target.id });
|
|
851
|
+
}
|
|
852
|
+
return target;
|
|
853
|
+
}
|
|
854
|
+
rasterizeDraw(command, vertexBuffer) {
|
|
855
|
+
if (!this.activeRenderTarget || !command.vertexFormat?.hasAttribute("position"))
|
|
856
|
+
return;
|
|
857
|
+
const position = command.vertexFormat.getAttribute("position");
|
|
858
|
+
const colorAttribute = command.vertexFormat.hasAttribute("color") ? command.vertexFormat.getAttribute("color") : null;
|
|
859
|
+
const uvAttribute = command.vertexFormat.hasAttribute("uv") ? command.vertexFormat.getAttribute("uv") : null;
|
|
860
|
+
if (position.components < 2)
|
|
861
|
+
return;
|
|
862
|
+
const indices = this.indicesFor(command);
|
|
863
|
+
const color = uniformColor(command.uniforms);
|
|
864
|
+
const texture = uniformBaseColorTextureBinding(command.uniforms);
|
|
865
|
+
const shadow = uniformForwardShadow(command.uniforms);
|
|
866
|
+
const instanceMatrices = uniformRasterMatrices(command.uniforms, command.instanceCount ?? 1);
|
|
867
|
+
const modelMatrices = uniformRasterModelMatrices(command.uniforms, command.instanceCount ?? 1);
|
|
868
|
+
const depthTest = command.renderState?.depthTest !== false && this.activeRenderTarget.depthPixels !== null;
|
|
869
|
+
const depthWrite = command.renderState?.depthWrite !== false;
|
|
870
|
+
for (let instanceIndex = 0; instanceIndex < instanceMatrices.length; instanceIndex += 1) {
|
|
871
|
+
const matrix = instanceMatrices[instanceIndex] ?? identityMatrix();
|
|
872
|
+
const modelMatrix = modelMatrices[instanceIndex] ?? identityMatrix();
|
|
873
|
+
if (command.topology === "triangles") {
|
|
874
|
+
for (let offset = 0; offset + 2 < indices.length; offset += 3) {
|
|
875
|
+
const indexA = indices[offset];
|
|
876
|
+
const indexB = indices[offset + 1];
|
|
877
|
+
const indexC = indices[offset + 2];
|
|
878
|
+
const localA = readMorphedPosition(vertexBuffer.bytes, command.vertexFormat.stride, position.offset, indexA, command.uniforms);
|
|
879
|
+
const localB = readMorphedPosition(vertexBuffer.bytes, command.vertexFormat.stride, position.offset, indexB, command.uniforms);
|
|
880
|
+
const localC = readMorphedPosition(vertexBuffer.bytes, command.vertexFormat.stride, position.offset, indexC, command.uniforms);
|
|
881
|
+
const a = transformPosition(localA, matrix);
|
|
882
|
+
const b = transformPosition(localB, matrix);
|
|
883
|
+
const c = transformPosition(localC, matrix);
|
|
884
|
+
const worldA = transformPosition(localA, modelMatrix);
|
|
885
|
+
const worldB = transformPosition(localB, modelMatrix);
|
|
886
|
+
const worldC = transformPosition(localC, modelMatrix);
|
|
887
|
+
const colorA = readVertexColor(vertexBuffer.bytes, command.vertexFormat.stride, colorAttribute?.offset, indexA);
|
|
888
|
+
const colorB = readVertexColor(vertexBuffer.bytes, command.vertexFormat.stride, colorAttribute?.offset, indexB);
|
|
889
|
+
const colorC = readVertexColor(vertexBuffer.bytes, command.vertexFormat.stride, colorAttribute?.offset, indexC);
|
|
890
|
+
const uvA = readVertexUv(vertexBuffer.bytes, command.vertexFormat.stride, uvAttribute?.offset, indexA);
|
|
891
|
+
const uvB = readVertexUv(vertexBuffer.bytes, command.vertexFormat.stride, uvAttribute?.offset, indexB);
|
|
892
|
+
const uvC = readVertexUv(vertexBuffer.bytes, command.vertexFormat.stride, uvAttribute?.offset, indexC);
|
|
893
|
+
rasterizeTriangle(this.activeRenderTarget, a, b, c, worldA, worldB, worldC, color, colorA, colorB, colorC, uvA, uvB, uvC, texture, shadow, depthTest, depthWrite);
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
else if (command.topology === "lines") {
|
|
897
|
+
for (let offset = 0; offset + 1 < indices.length; offset += 2) {
|
|
898
|
+
const indexA = indices[offset];
|
|
899
|
+
const indexB = indices[offset + 1];
|
|
900
|
+
const a = transformPosition(readMorphedPosition(vertexBuffer.bytes, command.vertexFormat.stride, position.offset, indexA, command.uniforms), matrix);
|
|
901
|
+
const b = transformPosition(readMorphedPosition(vertexBuffer.bytes, command.vertexFormat.stride, position.offset, indexB, command.uniforms), matrix);
|
|
902
|
+
const colorA = readVertexColor(vertexBuffer.bytes, command.vertexFormat.stride, colorAttribute?.offset, indexA);
|
|
903
|
+
const colorB = readVertexColor(vertexBuffer.bytes, command.vertexFormat.stride, colorAttribute?.offset, indexB);
|
|
904
|
+
rasterizeLine(this.activeRenderTarget, a, b, color, colorA, colorB, depthTest, depthWrite);
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
else {
|
|
908
|
+
for (const index of indices) {
|
|
909
|
+
const point = transformPosition(readMorphedPosition(vertexBuffer.bytes, command.vertexFormat.stride, position.offset, index, command.uniforms), matrix);
|
|
910
|
+
const vertexColor = readVertexColor(vertexBuffer.bytes, command.vertexFormat.stride, colorAttribute?.offset, index);
|
|
911
|
+
rasterizePoint(this.activeRenderTarget, point, multiplyColor(color, vertexColor), depthTest, depthWrite);
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
submitNativeRenderPass(command, vertexBuffer) {
|
|
917
|
+
const nativeView = this.activeRenderTarget?.nativeView ?? this.currentCanvasView();
|
|
918
|
+
if (!nativeView || !command.shader)
|
|
919
|
+
return;
|
|
920
|
+
if (!hasNativeRenderPipeline(this.device))
|
|
921
|
+
return;
|
|
922
|
+
const shader = this.requireShader(command.shader);
|
|
923
|
+
const vertexModule = shader.modules[0];
|
|
924
|
+
const fragmentModule = shader.modules[1] ?? vertexModule;
|
|
925
|
+
if (!vertexModule || !fragmentModule)
|
|
926
|
+
return;
|
|
927
|
+
const topology = command.topology === "lines" ? "line-list" : command.topology === "points" ? "point-list" : "triangle-list";
|
|
928
|
+
const targetFormat = this.activeRenderTarget ? webgpuTextureFormat(this.activeRenderTarget.colorTexture.format) : this.presentationFormat;
|
|
929
|
+
const vertexBuffers = command.vertexFormat ? [vertexBufferLayout(command.vertexFormat)] : undefined;
|
|
930
|
+
const shouldClear = this.activeRenderTarget ? this.activeRenderTarget.nativeNeedsClear : this.drawCalls === 0;
|
|
931
|
+
const depthView = this.activeRenderTarget?.nativeDepthView ?? this.canvasDepthView;
|
|
932
|
+
const depthEnabled = depthView !== null &&
|
|
933
|
+
depthView !== undefined &&
|
|
934
|
+
command.renderState?.depthTest !== false;
|
|
935
|
+
const depthWriteEnabled = command.renderState?.depthWrite ?? true;
|
|
936
|
+
const depthCompare = command.renderState?.depthCompare ?? "less-equal";
|
|
937
|
+
const blendEnabled = command.renderState?.blend === true;
|
|
938
|
+
const pipelineKey = `${shader.nativeUniformLayout}:${topology}:${targetFormat}:${blendEnabled ? "blend" : "opaque"}:${depthEnabled ? `${depthWriteEnabled}:${depthCompare}` : "nodepth"}:${command.vertexFormat?.stride ?? 0}:${command.vertexFormat?.attributes.map((attribute) => `${attribute.shaderLocation}/${attribute.offset}/${attribute.components}`).join(",") ?? "none"}`;
|
|
939
|
+
let pipeline = shader.renderPipelines.get(pipelineKey);
|
|
940
|
+
if (!pipeline) {
|
|
941
|
+
pipeline = this.device.createRenderPipeline({
|
|
942
|
+
label: `${shader.label}-pipeline`,
|
|
943
|
+
layout: "auto",
|
|
944
|
+
vertex: { module: vertexModule, entryPoint: shader.entryPoints[0], ...(vertexBuffers ? { buffers: vertexBuffers } : {}) },
|
|
945
|
+
fragment: {
|
|
946
|
+
module: fragmentModule,
|
|
947
|
+
entryPoint: shader.entryPoints[1],
|
|
948
|
+
targets: [{
|
|
949
|
+
format: targetFormat,
|
|
950
|
+
...(blendEnabled
|
|
951
|
+
? {
|
|
952
|
+
blend: {
|
|
953
|
+
color: { srcFactor: "src-alpha", dstFactor: "one-minus-src-alpha", operation: "add" },
|
|
954
|
+
alpha: { srcFactor: "one", dstFactor: "one-minus-src-alpha", operation: "add" }
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
: {})
|
|
958
|
+
}]
|
|
959
|
+
},
|
|
960
|
+
primitive: { topology },
|
|
961
|
+
...(depthEnabled
|
|
962
|
+
? {
|
|
963
|
+
depthStencil: {
|
|
964
|
+
format: DEPTH_TEXTURE_FORMAT,
|
|
965
|
+
depthWriteEnabled,
|
|
966
|
+
depthCompare
|
|
967
|
+
}
|
|
968
|
+
}
|
|
969
|
+
: {})
|
|
970
|
+
});
|
|
971
|
+
shader.renderPipelines.set(pipelineKey, pipeline);
|
|
972
|
+
}
|
|
973
|
+
const encoder = this.device.createCommandEncoder({ label: `${command.label ?? "draw"}-encoder` });
|
|
974
|
+
const uniformBuffer = usesNativeDrawUniforms(shader.nativeUniformLayout) ? this.createNativeDrawUniformBuffer(command) : null;
|
|
975
|
+
const sampledTexture = shader.nativeUniformLayout === "generated-texture" ? this.createNativeSampledTextureBinding(uniformBaseColorTextureBinding(command.uniforms)) : null;
|
|
976
|
+
const materialTextures = usesNativePbrTextureBindings(shader.nativeUniformLayout) ? this.createNativePbrTextureBindings(command) : null;
|
|
977
|
+
if (shader.nativeUniformLayout === "generated-texture" && !sampledTexture) {
|
|
978
|
+
uniformBuffer?.destroy();
|
|
979
|
+
return;
|
|
980
|
+
}
|
|
981
|
+
if (usesNativePbrTextureBindings(shader.nativeUniformLayout) && !materialTextures) {
|
|
982
|
+
uniformBuffer?.destroy();
|
|
983
|
+
return;
|
|
984
|
+
}
|
|
985
|
+
const bindGroup = uniformBuffer && pipeline.getBindGroupLayout && this.device.createBindGroup
|
|
986
|
+
? this.device.createBindGroup({
|
|
987
|
+
label: `${command.label ?? "draw"}-draw-bind-group`,
|
|
988
|
+
layout: pipeline.getBindGroupLayout(0),
|
|
989
|
+
entries: [
|
|
990
|
+
{ binding: 0, resource: { buffer: uniformBuffer } },
|
|
991
|
+
...(sampledTexture ? [
|
|
992
|
+
{ binding: 1, resource: sampledTexture.sampler },
|
|
993
|
+
{ binding: 2, resource: sampledTexture.view }
|
|
994
|
+
] : []),
|
|
995
|
+
...(materialTextures ? [
|
|
996
|
+
{ binding: 1, resource: materialTextures.base.sampler },
|
|
997
|
+
{ binding: 2, resource: materialTextures.base.view },
|
|
998
|
+
{ binding: 3, resource: materialTextures.environment.sampler },
|
|
999
|
+
{ binding: 4, resource: materialTextures.environment.view },
|
|
1000
|
+
{ binding: 5, resource: materialTextures.brdf.sampler },
|
|
1001
|
+
{ binding: 6, resource: materialTextures.brdf.view },
|
|
1002
|
+
{ binding: 7, resource: materialTextures.shadow.sampler },
|
|
1003
|
+
{ binding: 8, resource: materialTextures.shadow.view },
|
|
1004
|
+
{ binding: 9, resource: materialTextures.normal.sampler },
|
|
1005
|
+
{ binding: 10, resource: materialTextures.normal.view },
|
|
1006
|
+
{ binding: 11, resource: materialTextures.metallicRoughness.sampler },
|
|
1007
|
+
{ binding: 12, resource: materialTextures.metallicRoughness.view },
|
|
1008
|
+
{ binding: 13, resource: materialTextures.occlusion.sampler },
|
|
1009
|
+
{ binding: 14, resource: materialTextures.occlusion.view }
|
|
1010
|
+
] : [])
|
|
1011
|
+
]
|
|
1012
|
+
})
|
|
1013
|
+
: null;
|
|
1014
|
+
const pass = encoder.beginRenderPass({
|
|
1015
|
+
label: `${command.label ?? "draw"}-pass`,
|
|
1016
|
+
colorAttachments: [{
|
|
1017
|
+
view: nativeView,
|
|
1018
|
+
clearValue: this.activeRenderTarget?.nativeClearColor ?? this.clearColor,
|
|
1019
|
+
loadOp: shouldClear ? "clear" : "load",
|
|
1020
|
+
storeOp: "store"
|
|
1021
|
+
}],
|
|
1022
|
+
...(depthEnabled
|
|
1023
|
+
? {
|
|
1024
|
+
depthStencilAttachment: {
|
|
1025
|
+
view: depthView,
|
|
1026
|
+
depthClearValue: 1,
|
|
1027
|
+
depthLoadOp: shouldClear ? "clear" : "load",
|
|
1028
|
+
depthStoreOp: "store"
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1031
|
+
: {})
|
|
1032
|
+
});
|
|
1033
|
+
pass.setPipeline(pipeline);
|
|
1034
|
+
pass.setVertexBuffer(0, vertexBuffer.handle);
|
|
1035
|
+
if (bindGroup)
|
|
1036
|
+
pass.setBindGroup?.(0, bindGroup);
|
|
1037
|
+
if (command.indexBuffer) {
|
|
1038
|
+
if (!pass.setIndexBuffer || !pass.drawIndexed) {
|
|
1039
|
+
pass.end();
|
|
1040
|
+
uniformBuffer?.destroy();
|
|
1041
|
+
this.lastError = "Native WebGPU indexed draw skipped because the render-pass encoder does not expose indexed draw APIs.";
|
|
1042
|
+
return;
|
|
1043
|
+
}
|
|
1044
|
+
const indexBuffer = this.requireBuffer(command.indexBuffer);
|
|
1045
|
+
pass.setIndexBuffer(indexBuffer.handle, command.indexType ?? "uint16");
|
|
1046
|
+
pass.drawIndexed(command.indexCount ?? this.indicesFor(command).length, command.instanceCount ?? 1, command.firstIndex ?? 0);
|
|
1047
|
+
}
|
|
1048
|
+
else {
|
|
1049
|
+
pass.draw(command.vertexCount, command.instanceCount ?? 1, command.firstVertex ?? 0);
|
|
1050
|
+
}
|
|
1051
|
+
pass.end();
|
|
1052
|
+
this.device.queue.submit([encoder.finish()]);
|
|
1053
|
+
if (this.activeRenderTarget)
|
|
1054
|
+
this.activeRenderTarget.nativeNeedsClear = false;
|
|
1055
|
+
uniformBuffer?.destroy();
|
|
1056
|
+
this.nativeSubmissions += 1;
|
|
1057
|
+
if (sampledTexture)
|
|
1058
|
+
this.nativeTextureBindings += 1;
|
|
1059
|
+
if (shader.nativeUniformLayout === "generated-basic")
|
|
1060
|
+
this.nativeGeneratedBasicSubmissions += 1;
|
|
1061
|
+
if (shader.nativeUniformLayout === "generated-texture")
|
|
1062
|
+
this.nativeGeneratedTextureSubmissions += 1;
|
|
1063
|
+
if (shader.nativeUniformLayout === "passthrough")
|
|
1064
|
+
this.nativePassthroughSubmissions += 1;
|
|
1065
|
+
if (shader.nativeUniformLayout === "generated-pbr" || shader.nativeUniformLayout === "generated-textured-pbr" || shader.nativeUniformLayout === "generated-instanced-pbr")
|
|
1066
|
+
this.nativePbrSubmissions += 1;
|
|
1067
|
+
if (shader.nativeUniformLayout === "generated-instanced-pbr")
|
|
1068
|
+
this.nativeInstancedSubmissions += 1;
|
|
1069
|
+
if (shader.nativeUniformLayout === "generated-skinned-unlit")
|
|
1070
|
+
this.nativeSkinnedSubmissions += 1;
|
|
1071
|
+
if (shader.nativeUniformLayout === "generated-morph-unlit")
|
|
1072
|
+
this.nativeMorphSubmissions += 1;
|
|
1073
|
+
if (materialTextures?.actualBaseColor)
|
|
1074
|
+
this.nativeTextureBindings += 1;
|
|
1075
|
+
if (materialTextures?.actualNormal)
|
|
1076
|
+
this.nativeTextureBindings += 1;
|
|
1077
|
+
if (materialTextures?.actualMetallicRoughness)
|
|
1078
|
+
this.nativeTextureBindings += 1;
|
|
1079
|
+
if (materialTextures?.actualOcclusion)
|
|
1080
|
+
this.nativeTextureBindings += 1;
|
|
1081
|
+
if (materialTextures?.actualEnvironment)
|
|
1082
|
+
this.nativeEnvironmentBindings += 1;
|
|
1083
|
+
if (materialTextures?.actualBrdf)
|
|
1084
|
+
this.nativeEnvironmentBindings += 1;
|
|
1085
|
+
if (materialTextures?.actualShadow)
|
|
1086
|
+
this.nativeShadowMapBindings += 1;
|
|
1087
|
+
if (!this.activeRenderTarget)
|
|
1088
|
+
this.canvasSubmissions += 1;
|
|
1089
|
+
}
|
|
1090
|
+
flushNativeRenderTargetClear(target) {
|
|
1091
|
+
if (!target.nativeNeedsClear || !target.nativeView || !this.device.createCommandEncoder)
|
|
1092
|
+
return;
|
|
1093
|
+
const encoder = this.device.createCommandEncoder({ label: `${target.label}-native-clear` });
|
|
1094
|
+
const pass = encoder.beginRenderPass({
|
|
1095
|
+
label: `${target.label}-native-clear-pass`,
|
|
1096
|
+
colorAttachments: [{
|
|
1097
|
+
view: target.nativeView,
|
|
1098
|
+
clearValue: target.nativeClearColor,
|
|
1099
|
+
loadOp: "clear",
|
|
1100
|
+
storeOp: "store"
|
|
1101
|
+
}],
|
|
1102
|
+
...(target.nativeDepthView
|
|
1103
|
+
? {
|
|
1104
|
+
depthStencilAttachment: {
|
|
1105
|
+
view: target.nativeDepthView,
|
|
1106
|
+
depthClearValue: 1,
|
|
1107
|
+
depthLoadOp: "clear",
|
|
1108
|
+
depthStoreOp: "store"
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
: {})
|
|
1112
|
+
});
|
|
1113
|
+
pass.end();
|
|
1114
|
+
this.device.queue.submit([encoder.finish()]);
|
|
1115
|
+
target.nativeNeedsClear = false;
|
|
1116
|
+
}
|
|
1117
|
+
createNativeSampledTextureBinding(binding) {
|
|
1118
|
+
if (!binding?.texture || binding.texture.disposed || !binding.validate().ok || !hasNativeSampledTextureBinding(this.device))
|
|
1119
|
+
return null;
|
|
1120
|
+
const texture = binding.texture;
|
|
1121
|
+
let resource = this.nativeSampledTextures.get(texture);
|
|
1122
|
+
if (!resource) {
|
|
1123
|
+
if (texture.source) {
|
|
1124
|
+
const sourceLevels = nativeTextureSourceLevels(texture);
|
|
1125
|
+
if (sourceLevels.length === 0)
|
|
1126
|
+
return null;
|
|
1127
|
+
const nativeTexture = this.device.createTexture({
|
|
1128
|
+
label: texture.label,
|
|
1129
|
+
size: { width: texture.width, height: texture.height, depthOrArrayLayers: 1 },
|
|
1130
|
+
format: webgpuSampledTextureFormat(texture, "rgba8"),
|
|
1131
|
+
usage: TEXTURE_USAGE.TEXTURE_BINDING | TEXTURE_USAGE.COPY_DST,
|
|
1132
|
+
mipLevelCount: sourceLevels.length
|
|
1133
|
+
});
|
|
1134
|
+
const writeTexture = this.device.queue.writeTexture;
|
|
1135
|
+
if (!writeTexture)
|
|
1136
|
+
return null;
|
|
1137
|
+
sourceLevels.forEach((level, mipLevel) => {
|
|
1138
|
+
writeTexture.call(this.device.queue, { texture: nativeTexture, mipLevel }, level.data, { bytesPerRow: level.bytesPerRow, rowsPerImage: level.height }, { width: level.width, height: level.height, depthOrArrayLayers: 1 });
|
|
1139
|
+
});
|
|
1140
|
+
resource = { texture: nativeTexture, view: nativeTexture.createView() };
|
|
1141
|
+
}
|
|
1142
|
+
else {
|
|
1143
|
+
const sampledTexture = nativeSampledTextureLevels(texture);
|
|
1144
|
+
if (!sampledTexture)
|
|
1145
|
+
return null;
|
|
1146
|
+
const { levels, format } = sampledTexture;
|
|
1147
|
+
const baseLevel = levels[0];
|
|
1148
|
+
if (!baseLevel)
|
|
1149
|
+
return null;
|
|
1150
|
+
const levelBytesPerPixel = bytesPerPixel(format);
|
|
1151
|
+
if (levels.some((level) => level.data.byteLength < level.width * level.height * levelBytesPerPixel))
|
|
1152
|
+
return null;
|
|
1153
|
+
const nativeTexture = this.device.createTexture({
|
|
1154
|
+
label: texture.label,
|
|
1155
|
+
size: { width: baseLevel.width, height: baseLevel.height, depthOrArrayLayers: 1 },
|
|
1156
|
+
format: webgpuSampledTextureFormat(texture, format),
|
|
1157
|
+
usage: TEXTURE_USAGE.TEXTURE_BINDING | TEXTURE_USAGE.COPY_DST,
|
|
1158
|
+
mipLevelCount: levels.length
|
|
1159
|
+
});
|
|
1160
|
+
for (const [mipLevel, level] of levels.entries()) {
|
|
1161
|
+
this.device.queue.writeTexture({ texture: nativeTexture, mipLevel }, level.data, { bytesPerRow: level.width * levelBytesPerPixel, rowsPerImage: level.height }, { width: level.width, height: level.height, depthOrArrayLayers: 1 });
|
|
1162
|
+
}
|
|
1163
|
+
resource = { texture: nativeTexture, view: nativeTexture.createView() };
|
|
1164
|
+
}
|
|
1165
|
+
this.nativeSampledTextures.set(texture, resource);
|
|
1166
|
+
}
|
|
1167
|
+
return {
|
|
1168
|
+
view: resource.view,
|
|
1169
|
+
sampler: this.device.createSampler(webgpuSamplerDescriptor(binding.sampler)),
|
|
1170
|
+
actual: true
|
|
1171
|
+
};
|
|
1172
|
+
}
|
|
1173
|
+
createNativePbrTextureBindings(command) {
|
|
1174
|
+
if (!hasNativeSampledTextureBinding(this.device))
|
|
1175
|
+
return null;
|
|
1176
|
+
const baseBinding = uniformBaseColorTextureBinding(command.uniforms);
|
|
1177
|
+
const environmentBinding = uniformTextureBinding(command.uniforms, "u_environmentMapTexture");
|
|
1178
|
+
const brdfBinding = uniformTextureBinding(command.uniforms, "u_environmentBrdfLutTexture");
|
|
1179
|
+
const shadowBinding = uniformTextureBinding(command.uniforms, "u_shadowMapTexture");
|
|
1180
|
+
const normalBinding = uniformTextureBinding(command.uniforms, "u_normalTexture");
|
|
1181
|
+
const metallicRoughnessBinding = uniformTextureBinding(command.uniforms, "u_metallicRoughnessTexture");
|
|
1182
|
+
const occlusionBinding = uniformTextureBinding(command.uniforms, "u_occlusionTexture");
|
|
1183
|
+
const base = this.createNativeSampledTextureBinding(baseBinding) ?? this.createNativeFallbackSampledTextureBinding("white-srgb", [255, 255, 255, 255], "srgb");
|
|
1184
|
+
const environment = this.createNativeSampledTextureBinding(environmentBinding) ?? this.createNativeFallbackSampledTextureBinding("environment-srgb", [92, 116, 156, 255], "srgb");
|
|
1185
|
+
const brdf = this.createNativeSampledTextureBinding(brdfBinding) ?? this.createNativeFallbackSampledTextureBinding("brdf-linear", [180, 180, 255, 255], "linear");
|
|
1186
|
+
const shadow = this.createNativeSampledTextureBinding(shadowBinding) ?? this.createNativeFallbackSampledTextureBinding("shadow-lit-linear", [255, 255, 255, 255], "linear");
|
|
1187
|
+
const normal = this.createNativeSampledTextureBinding(normalBinding) ?? this.createNativeFallbackSampledTextureBinding("flat-normal-linear", [128, 128, 255, 255], "linear");
|
|
1188
|
+
const metallicRoughness = this.createNativeSampledTextureBinding(metallicRoughnessBinding) ?? this.createNativeFallbackSampledTextureBinding("metallic-roughness-linear", [255, 255, 255, 255], "linear");
|
|
1189
|
+
const occlusion = this.createNativeSampledTextureBinding(occlusionBinding) ?? this.createNativeFallbackSampledTextureBinding("occlusion-linear", [255, 255, 255, 255], "linear");
|
|
1190
|
+
if (!base || !environment || !brdf || !shadow || !normal || !metallicRoughness || !occlusion)
|
|
1191
|
+
return null;
|
|
1192
|
+
return {
|
|
1193
|
+
base,
|
|
1194
|
+
environment,
|
|
1195
|
+
brdf,
|
|
1196
|
+
shadow,
|
|
1197
|
+
normal,
|
|
1198
|
+
metallicRoughness,
|
|
1199
|
+
occlusion,
|
|
1200
|
+
actualBaseColor: baseBinding !== null && base.actual,
|
|
1201
|
+
actualEnvironment: environmentBinding !== null && environment.actual,
|
|
1202
|
+
actualBrdf: brdfBinding !== null && brdf.actual,
|
|
1203
|
+
actualShadow: shadowBinding !== null && shadow.actual,
|
|
1204
|
+
actualNormal: normalBinding !== null && normal.actual,
|
|
1205
|
+
actualMetallicRoughness: metallicRoughnessBinding !== null && metallicRoughness.actual,
|
|
1206
|
+
actualOcclusion: occlusionBinding !== null && occlusion.actual
|
|
1207
|
+
};
|
|
1208
|
+
}
|
|
1209
|
+
createNativeFallbackSampledTextureBinding(key, rgba, colorSpace) {
|
|
1210
|
+
if (!hasNativeSampledTextureBinding(this.device))
|
|
1211
|
+
return null;
|
|
1212
|
+
let resource = this.nativeSampledTextures.get(`fallback:${key}`);
|
|
1213
|
+
if (!resource) {
|
|
1214
|
+
const nativeTexture = this.device.createTexture({
|
|
1215
|
+
label: `aura3d-native-${key}`,
|
|
1216
|
+
size: { width: 1, height: 1, depthOrArrayLayers: 1 },
|
|
1217
|
+
format: colorSpace === "srgb" ? "rgba8unorm-srgb" : "rgba8unorm",
|
|
1218
|
+
usage: TEXTURE_USAGE.TEXTURE_BINDING | TEXTURE_USAGE.COPY_DST
|
|
1219
|
+
});
|
|
1220
|
+
this.device.queue.writeTexture({ texture: nativeTexture }, new Uint8Array(rgba), { bytesPerRow: 4, rowsPerImage: 1 }, { width: 1, height: 1, depthOrArrayLayers: 1 });
|
|
1221
|
+
resource = { texture: nativeTexture, view: nativeTexture.createView() };
|
|
1222
|
+
this.nativeSampledTextures.set(`fallback:${key}`, resource);
|
|
1223
|
+
}
|
|
1224
|
+
return {
|
|
1225
|
+
view: resource.view,
|
|
1226
|
+
sampler: this.device.createSampler({
|
|
1227
|
+
minFilter: "nearest",
|
|
1228
|
+
magFilter: "nearest",
|
|
1229
|
+
addressModeU: "clamp-to-edge",
|
|
1230
|
+
addressModeV: "clamp-to-edge"
|
|
1231
|
+
}),
|
|
1232
|
+
actual: false
|
|
1233
|
+
};
|
|
1234
|
+
}
|
|
1235
|
+
createNativeDrawUniformBuffer(command) {
|
|
1236
|
+
if (!this.device.createBindGroup)
|
|
1237
|
+
return null;
|
|
1238
|
+
const data = new Float32Array(188);
|
|
1239
|
+
const baseColorBinding = uniformBaseColorTextureBinding(command.uniforms);
|
|
1240
|
+
const environmentBinding = uniformTextureBinding(command.uniforms, "u_environmentMapTexture");
|
|
1241
|
+
const normalBinding = uniformTextureBinding(command.uniforms, "u_normalTexture");
|
|
1242
|
+
const metallicRoughnessBinding = uniformTextureBinding(command.uniforms, "u_metallicRoughnessTexture");
|
|
1243
|
+
const occlusionBinding = uniformTextureBinding(command.uniforms, "u_occlusionTexture");
|
|
1244
|
+
data.set(uniformMat4(command.uniforms?.get("u_modelViewProjection")) ?? identityMatrix(), 0);
|
|
1245
|
+
data.set(uniformColor(command.uniforms), 16);
|
|
1246
|
+
data[20] = uniformNumber(command.uniforms?.get("u_metallic"), 0);
|
|
1247
|
+
data[21] = uniformNumber(command.uniforms?.get("u_roughness"), 0.5);
|
|
1248
|
+
data[22] = uniformNumber(command.uniforms?.get("u_environmentIntensity"), 0);
|
|
1249
|
+
data[23] = uniformNumber(command.uniforms?.get("u_environmentMapTextureIntensity"), 0);
|
|
1250
|
+
data[24] = uniformNumber(command.uniforms?.get("u_baseColorTextureEnabled"), baseColorBinding ? 1 : 0);
|
|
1251
|
+
data[25] = uniformNumber(command.uniforms?.get("u_shadowMapEnabled"), 0);
|
|
1252
|
+
data[26] = uniformNumber(command.uniforms?.get("u_shadowMapStrength"), 0.65);
|
|
1253
|
+
data[27] = uniformNumber(command.uniforms?.get("u_environmentMapTextureEnabled"), environmentBinding ? 1 : 0);
|
|
1254
|
+
const morphWeights = command.uniforms?.get("u_morphWeights");
|
|
1255
|
+
data[28] = morphWeights instanceof Float32Array || Array.isArray(morphWeights) ? Number(morphWeights[0] ?? 0) : 0;
|
|
1256
|
+
data[29] = uniformNumber(command.uniforms?.get("u_morphTargetCount"), 0);
|
|
1257
|
+
data[30] = uniformNumber(command.uniforms?.get("u_environmentMapTextureMipCount"), 1);
|
|
1258
|
+
data[31] = uniformNumber(command.uniforms?.get("u_environmentMapTextureSpecularIntensity"), 0)
|
|
1259
|
+
* uniformNumber(command.uniforms?.get("u_materialEnvironmentSpecularScale"), 1);
|
|
1260
|
+
data[128] = uniformNumber(command.uniforms?.get("u_normalTextureEnabled"), normalBinding ? 1 : 0);
|
|
1261
|
+
data[129] = uniformNumber(command.uniforms?.get("u_normalScale"), 1);
|
|
1262
|
+
data[130] = uniformNumber(command.uniforms?.get("u_occlusionStrength"), 1);
|
|
1263
|
+
data[160] = uniformNumber(command.uniforms?.get("u_alphaCutoff"), 0);
|
|
1264
|
+
data[161] = uniformNumber(command.uniforms?.get("u_transmissionFactor"), 0);
|
|
1265
|
+
data[162] = uniformNumber(command.uniforms?.get("u_diffuseTransmissionFactor"), 0);
|
|
1266
|
+
data.set(uniformVec3(command.uniforms?.get("u_cameraPosition")) ?? [0, 0, 1], 164);
|
|
1267
|
+
data[167] = 1;
|
|
1268
|
+
data[168] = uniformNumber(command.uniforms?.get("u_metallicRoughnessTextureEnabled"), metallicRoughnessBinding ? 1 : 0);
|
|
1269
|
+
data[169] = uniformNumber(command.uniforms?.get("u_occlusionTextureEnabled"), occlusionBinding ? 1 : 0);
|
|
1270
|
+
data[170] = uniformNumber(command.uniforms?.get("u_productColorSmoothing"), 0);
|
|
1271
|
+
data.set(uniformMat4(command.uniforms?.get("u_normalMatrix")) ?? identityMatrix(), 172);
|
|
1272
|
+
const modelMatrix = uniformMat4(command.uniforms?.get("u_modelMatrix")) ?? identityMatrix();
|
|
1273
|
+
const instanceMatrixValue = command.uniforms?.get("u_instanceMatrices");
|
|
1274
|
+
const instanceMatrixNumbers = instanceMatrixValue instanceof Float32Array || Array.isArray(instanceMatrixValue) ? Array.from(instanceMatrixValue) : [];
|
|
1275
|
+
const hasInstanceMatrices = instanceMatrixNumbers.length >= 16 && instanceMatrixNumbers.slice(0, 16).every(Number.isFinite);
|
|
1276
|
+
const instanceMatrices = hasInstanceMatrices ? uniformMat4Array(instanceMatrixValue, 4) : [];
|
|
1277
|
+
for (let index = 0; index < 4; index += 1) {
|
|
1278
|
+
data.set(instanceMatrices[index] ?? (index === 0 ? modelMatrix : identityMatrix()), 32 + index * 16);
|
|
1279
|
+
}
|
|
1280
|
+
const jointMatrices = uniformMat4Array(command.uniforms?.get("u_jointMatrices"), 2);
|
|
1281
|
+
for (let index = 0; index < 2; index += 1) {
|
|
1282
|
+
data.set(jointMatrices[index] ?? identityMatrix(), 96 + index * 16);
|
|
1283
|
+
}
|
|
1284
|
+
const morphDeltas = command.uniforms?.get("u_morphPositionDeltas");
|
|
1285
|
+
const morphNumbers = morphDeltas instanceof Float32Array || Array.isArray(morphDeltas) ? Array.from(morphDeltas).slice(0, 32) : [];
|
|
1286
|
+
if (morphNumbers.length > 0)
|
|
1287
|
+
data.set(morphNumbers, 128);
|
|
1288
|
+
const buffer = this.device.createBuffer({
|
|
1289
|
+
label: `${command.label ?? "draw"}-draw-uniforms`,
|
|
1290
|
+
size: data.byteLength,
|
|
1291
|
+
usage: BUFFER_USAGE.UNIFORM | BUFFER_USAGE.COPY_DST
|
|
1292
|
+
});
|
|
1293
|
+
this.device.queue.writeBuffer(buffer, 0, data);
|
|
1294
|
+
return buffer;
|
|
1295
|
+
}
|
|
1296
|
+
currentCanvasView() {
|
|
1297
|
+
if (!this.canvasContext)
|
|
1298
|
+
return null;
|
|
1299
|
+
return this.canvasContext.getCurrentTexture().createView();
|
|
1300
|
+
}
|
|
1301
|
+
ensureCanvasDepthAttachment(width, height) {
|
|
1302
|
+
if (!this.canvasContext || !this.device.createTexture)
|
|
1303
|
+
return;
|
|
1304
|
+
if (this.canvasDepthTexture &&
|
|
1305
|
+
this.canvasDepthView &&
|
|
1306
|
+
this.canvasDepthWidth === width &&
|
|
1307
|
+
this.canvasDepthHeight === height) {
|
|
1308
|
+
return;
|
|
1309
|
+
}
|
|
1310
|
+
this.canvasDepthTexture?.destroy();
|
|
1311
|
+
this.canvasDepthTexture = this.device.createTexture({
|
|
1312
|
+
label: "aura3d-webgpu-canvas-depth",
|
|
1313
|
+
size: [width, height],
|
|
1314
|
+
format: DEPTH_TEXTURE_FORMAT,
|
|
1315
|
+
usage: TEXTURE_USAGE.RENDER_ATTACHMENT
|
|
1316
|
+
});
|
|
1317
|
+
this.canvasDepthView = this.canvasDepthTexture.createView();
|
|
1318
|
+
this.canvasDepthWidth = width;
|
|
1319
|
+
this.canvasDepthHeight = height;
|
|
1320
|
+
}
|
|
1321
|
+
clearActiveRenderTarget(color) {
|
|
1322
|
+
if (!this.activeRenderTarget)
|
|
1323
|
+
return;
|
|
1324
|
+
const bytes = rgbaBytes(color);
|
|
1325
|
+
for (let index = 0; index < this.activeRenderTarget.colorPixels.length; index += 4) {
|
|
1326
|
+
this.activeRenderTarget.colorPixels.set(bytes, index);
|
|
1327
|
+
}
|
|
1328
|
+
this.activeRenderTarget.nativeNeedsClear = true;
|
|
1329
|
+
this.activeRenderTarget.nativeClearColor = color;
|
|
1330
|
+
this.activeRenderTarget.depthPixels?.fill(1);
|
|
1331
|
+
if (this.activeRenderTarget.colorFloatPixels) {
|
|
1332
|
+
for (let index = 0; index < this.activeRenderTarget.colorFloatPixels.length; index += 4) {
|
|
1333
|
+
this.activeRenderTarget.colorFloatPixels[index] = color[0];
|
|
1334
|
+
this.activeRenderTarget.colorFloatPixels[index + 1] = color[1];
|
|
1335
|
+
this.activeRenderTarget.colorFloatPixels[index + 2] = color[2];
|
|
1336
|
+
this.activeRenderTarget.colorFloatPixels[index + 3] = color[3];
|
|
1337
|
+
}
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1340
|
+
indicesFor(command) {
|
|
1341
|
+
if (!command.indexBuffer) {
|
|
1342
|
+
const firstVertex = command.firstVertex ?? 0;
|
|
1343
|
+
return Array.from({ length: command.vertexCount }, (_, index) => firstVertex + index);
|
|
1344
|
+
}
|
|
1345
|
+
const indexBuffer = this.requireBuffer(command.indexBuffer);
|
|
1346
|
+
const indexCount = command.indexCount ?? Math.floor(indexBuffer.byteLength / (command.indexType === "uint32" ? 4 : 2));
|
|
1347
|
+
const indices = [];
|
|
1348
|
+
const view = new DataView(indexBuffer.bytes.buffer, indexBuffer.bytes.byteOffset, indexBuffer.bytes.byteLength);
|
|
1349
|
+
const firstIndex = command.firstIndex ?? 0;
|
|
1350
|
+
for (let index = 0; index < indexCount; index += 1) {
|
|
1351
|
+
const byteOffset = (firstIndex + index) * (command.indexType === "uint32" ? 4 : 2);
|
|
1352
|
+
indices.push(command.indexType === "uint32" ? view.getUint32(byteOffset, true) : view.getUint16(byteOffset, true));
|
|
1353
|
+
}
|
|
1354
|
+
return indices;
|
|
1355
|
+
}
|
|
1356
|
+
}
|
|
1357
|
+
async function requestAdapter(gpu) {
|
|
1358
|
+
if (!gpu) {
|
|
1359
|
+
throw new RenderDeviceError("WebGPU runtime is missing from the current environment", "WEBGPU_RUNTIME_MISSING");
|
|
1360
|
+
}
|
|
1361
|
+
return gpu.requestAdapter();
|
|
1362
|
+
}
|
|
1363
|
+
async function requestDevice(adapter, injectedDevice) {
|
|
1364
|
+
if (injectedDevice) {
|
|
1365
|
+
return injectedDevice;
|
|
1366
|
+
}
|
|
1367
|
+
try {
|
|
1368
|
+
return await adapter.requestDevice();
|
|
1369
|
+
}
|
|
1370
|
+
catch (error) {
|
|
1371
|
+
throw new RenderDeviceError("WebGPU adapter failed to create a device", "WEBGPU_DEVICE_REQUEST_FAILED", {
|
|
1372
|
+
adapter: describeAdapter(adapter),
|
|
1373
|
+
reason: error instanceof Error ? error.message : String(error)
|
|
1374
|
+
});
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
1377
|
+
function validateWebGPUDevice(device) {
|
|
1378
|
+
const missing = [];
|
|
1379
|
+
if (!device || typeof device !== "object")
|
|
1380
|
+
missing.push("device");
|
|
1381
|
+
if (typeof device?.createBuffer !== "function")
|
|
1382
|
+
missing.push("createBuffer");
|
|
1383
|
+
if (typeof device?.queue?.writeBuffer !== "function")
|
|
1384
|
+
missing.push("queue.writeBuffer");
|
|
1385
|
+
if (typeof device?.queue?.submit !== "function")
|
|
1386
|
+
missing.push("queue.submit");
|
|
1387
|
+
if (missing.length > 0) {
|
|
1388
|
+
throw new RenderDeviceError("WebGPU device is missing required render-device capabilities", "WEBGPU_DEVICE_INVALID", {
|
|
1389
|
+
missing
|
|
1390
|
+
});
|
|
1391
|
+
}
|
|
1392
|
+
return device;
|
|
1393
|
+
}
|
|
1394
|
+
function hasNativeRenderPipeline(device) {
|
|
1395
|
+
return typeof device.createCommandEncoder === "function" &&
|
|
1396
|
+
typeof device.createRenderPipeline === "function" &&
|
|
1397
|
+
typeof device.createBindGroup === "function" &&
|
|
1398
|
+
typeof device.createTexture === "function";
|
|
1399
|
+
}
|
|
1400
|
+
function hasNativeSampledTextureBinding(device) {
|
|
1401
|
+
return typeof device.createTexture === "function" &&
|
|
1402
|
+
typeof device.createSampler === "function" &&
|
|
1403
|
+
typeof device.queue.writeTexture === "function";
|
|
1404
|
+
}
|
|
1405
|
+
function hasNativeTextureUpload(device) {
|
|
1406
|
+
return typeof device.queue.writeTexture === "function";
|
|
1407
|
+
}
|
|
1408
|
+
function hasNativeTextureReadback(device) {
|
|
1409
|
+
if (typeof device.createCommandEncoder !== "function" || typeof device.createTexture !== "function")
|
|
1410
|
+
return false;
|
|
1411
|
+
const probe = device.createBuffer({
|
|
1412
|
+
label: "aura3d-native-readback-capability-probe",
|
|
1413
|
+
size: 4,
|
|
1414
|
+
usage: BUFFER_USAGE.MAP_READ | BUFFER_USAGE.COPY_DST
|
|
1415
|
+
});
|
|
1416
|
+
const supported = typeof probe.mapAsync === "function" &&
|
|
1417
|
+
typeof probe.getMappedRange === "function" &&
|
|
1418
|
+
typeof probe.unmap === "function" &&
|
|
1419
|
+
typeof device.createCommandEncoder({ label: "aura3d-native-readback-capability-probe" }).copyTextureToBuffer === "function";
|
|
1420
|
+
probe.destroy();
|
|
1421
|
+
return supported;
|
|
1422
|
+
}
|
|
1423
|
+
function alignTo(value, alignment) {
|
|
1424
|
+
return Math.ceil(value / alignment) * alignment;
|
|
1425
|
+
}
|
|
1426
|
+
function readWebGPU(globalScope) {
|
|
1427
|
+
return globalScope.navigator?.gpu;
|
|
1428
|
+
}
|
|
1429
|
+
function acquireWebGPUCanvasContext(canvas) {
|
|
1430
|
+
const getContext = canvas.getContext;
|
|
1431
|
+
if (typeof getContext !== "function") {
|
|
1432
|
+
throw new RenderDeviceError("WebGPU canvas presentation requires getContext(\"webgpu\")", "WEBGPU_CANVAS_CONTEXT_MISSING");
|
|
1433
|
+
}
|
|
1434
|
+
const context = getContext.call(canvas, "webgpu");
|
|
1435
|
+
if (!context || typeof context.configure !== "function" || typeof context.getCurrentTexture !== "function") {
|
|
1436
|
+
throw new RenderDeviceError("Canvas did not provide a usable WebGPU presentation context", "WEBGPU_CANVAS_CONTEXT_INVALID");
|
|
1437
|
+
}
|
|
1438
|
+
return context;
|
|
1439
|
+
}
|
|
1440
|
+
function describeAdapter(adapter) {
|
|
1441
|
+
if (adapter.name)
|
|
1442
|
+
return adapter.name;
|
|
1443
|
+
const parts = [adapter.info?.vendor, adapter.info?.architecture, adapter.info?.device, adapter.info?.description].filter(Boolean);
|
|
1444
|
+
return parts.length > 0 ? parts.join(" ") : undefined;
|
|
1445
|
+
}
|
|
1446
|
+
function bufferUsageFlags(usage) {
|
|
1447
|
+
if (usage === "vertex")
|
|
1448
|
+
return BUFFER_USAGE.VERTEX | BUFFER_USAGE.COPY_DST | BUFFER_USAGE.COPY_SRC;
|
|
1449
|
+
if (usage === "index")
|
|
1450
|
+
return BUFFER_USAGE.INDEX | BUFFER_USAGE.COPY_DST | BUFFER_USAGE.COPY_SRC;
|
|
1451
|
+
if (usage === "uniform")
|
|
1452
|
+
return BUFFER_USAGE.UNIFORM | BUFFER_USAGE.COPY_DST | BUFFER_USAGE.COPY_SRC;
|
|
1453
|
+
return BUFFER_USAGE.MAP_READ | BUFFER_USAGE.COPY_DST;
|
|
1454
|
+
}
|
|
1455
|
+
function webgpuTextureFormat(format) {
|
|
1456
|
+
if (format === "rgba16f")
|
|
1457
|
+
return "rgba16float";
|
|
1458
|
+
if (format === "rgba32f")
|
|
1459
|
+
return "rgba32float";
|
|
1460
|
+
return "rgba8unorm";
|
|
1461
|
+
}
|
|
1462
|
+
function nativeSampledTextureLevels(texture) {
|
|
1463
|
+
if (isCompressedTextureFormat(texture.format)) {
|
|
1464
|
+
const fallback = texture.fallbackTextureLevels;
|
|
1465
|
+
return fallback.length > 0 ? { levels: fallback, format: "rgba8" } : null;
|
|
1466
|
+
}
|
|
1467
|
+
if (texture.format === "depth24")
|
|
1468
|
+
return null;
|
|
1469
|
+
const levels = texture.textureLevels;
|
|
1470
|
+
return levels.length > 0 ? { levels, format: texture.format } : null;
|
|
1471
|
+
}
|
|
1472
|
+
function nativeTextureSourceLevels(texture) {
|
|
1473
|
+
const source = texture.source;
|
|
1474
|
+
if (!source || typeof globalThis === "undefined")
|
|
1475
|
+
return [];
|
|
1476
|
+
const width = Math.max(1, Math.round(texture.width));
|
|
1477
|
+
const height = Math.max(1, Math.round(texture.height));
|
|
1478
|
+
const mipCount = Math.max(1, Math.floor(Math.log2(Math.max(width, height))) + 1);
|
|
1479
|
+
const levels = [];
|
|
1480
|
+
for (let level = 0; level < mipCount; level += 1) {
|
|
1481
|
+
const levelWidth = Math.max(1, width >> level);
|
|
1482
|
+
const levelHeight = Math.max(1, height >> level);
|
|
1483
|
+
const canvas = createTextureReadbackCanvas(levelWidth, levelHeight);
|
|
1484
|
+
if (!canvas)
|
|
1485
|
+
return levels;
|
|
1486
|
+
const context = canvas.getContext("2d", { willReadFrequently: true });
|
|
1487
|
+
if (!context)
|
|
1488
|
+
return levels;
|
|
1489
|
+
context.clearRect(0, 0, levelWidth, levelHeight);
|
|
1490
|
+
context.drawImage(source, 0, 0, levelWidth, levelHeight);
|
|
1491
|
+
const pixels = context.getImageData(0, 0, levelWidth, levelHeight).data;
|
|
1492
|
+
const sourceBytesPerRow = levelWidth * 4;
|
|
1493
|
+
const bytesPerRow = alignTo(sourceBytesPerRow, 256);
|
|
1494
|
+
if (bytesPerRow === sourceBytesPerRow) {
|
|
1495
|
+
levels.push({ width: levelWidth, height: levelHeight, bytesPerRow, data: new Uint8Array(pixels.buffer.slice(pixels.byteOffset, pixels.byteOffset + pixels.byteLength)) });
|
|
1496
|
+
continue;
|
|
1497
|
+
}
|
|
1498
|
+
const data = new Uint8Array(bytesPerRow * levelHeight);
|
|
1499
|
+
for (let row = 0; row < levelHeight; row += 1) {
|
|
1500
|
+
data.set(pixels.subarray(row * sourceBytesPerRow, (row + 1) * sourceBytesPerRow), row * bytesPerRow);
|
|
1501
|
+
}
|
|
1502
|
+
levels.push({ width: levelWidth, height: levelHeight, bytesPerRow, data });
|
|
1503
|
+
}
|
|
1504
|
+
return levels;
|
|
1505
|
+
}
|
|
1506
|
+
function createTextureReadbackCanvas(width, height) {
|
|
1507
|
+
const offscreenCanvas = globalThis.OffscreenCanvas;
|
|
1508
|
+
if (offscreenCanvas)
|
|
1509
|
+
return new offscreenCanvas(width, height);
|
|
1510
|
+
if (typeof document === "undefined")
|
|
1511
|
+
return null;
|
|
1512
|
+
const canvas = document.createElement("canvas");
|
|
1513
|
+
canvas.width = width;
|
|
1514
|
+
canvas.height = height;
|
|
1515
|
+
return canvas;
|
|
1516
|
+
}
|
|
1517
|
+
function webgpuSampledTextureFormat(texture, format) {
|
|
1518
|
+
if (format === "rgba16f")
|
|
1519
|
+
return "rgba16float";
|
|
1520
|
+
if (format === "rgba32f")
|
|
1521
|
+
return "rgba32float";
|
|
1522
|
+
return texture.colorSpace === "srgb" ? "rgba8unorm-srgb" : "rgba8unorm";
|
|
1523
|
+
}
|
|
1524
|
+
function webgpuMinFilter(filter) {
|
|
1525
|
+
if (filter === "nearest" || filter === "nearest-mipmap-nearest" || filter === "nearest-mipmap-linear")
|
|
1526
|
+
return "nearest";
|
|
1527
|
+
return "linear";
|
|
1528
|
+
}
|
|
1529
|
+
function webgpuMagFilter(filter) {
|
|
1530
|
+
return filter;
|
|
1531
|
+
}
|
|
1532
|
+
function webgpuMipmapFilter(filter) {
|
|
1533
|
+
if (filter === "nearest-mipmap-nearest" || filter === "linear-mipmap-nearest")
|
|
1534
|
+
return "nearest";
|
|
1535
|
+
if (filter === "nearest-mipmap-linear" || filter === "linear-mipmap-linear")
|
|
1536
|
+
return "linear";
|
|
1537
|
+
return undefined;
|
|
1538
|
+
}
|
|
1539
|
+
function webgpuSamplerDescriptor(sampler) {
|
|
1540
|
+
const minFilter = webgpuMinFilter(sampler.minFilter);
|
|
1541
|
+
const magFilter = webgpuMagFilter(sampler.magFilter);
|
|
1542
|
+
const mipmapFilter = webgpuMipmapFilter(sampler.minFilter);
|
|
1543
|
+
const descriptor = {
|
|
1544
|
+
minFilter,
|
|
1545
|
+
magFilter,
|
|
1546
|
+
...(mipmapFilter ? { mipmapFilter } : {}),
|
|
1547
|
+
addressModeU: sampler.addressU,
|
|
1548
|
+
addressModeV: sampler.addressV
|
|
1549
|
+
};
|
|
1550
|
+
const maxAnisotropy = webgpuMaxAnisotropy(sampler.maxAnisotropy, minFilter, magFilter, mipmapFilter);
|
|
1551
|
+
return maxAnisotropy === undefined ? descriptor : { ...descriptor, maxAnisotropy };
|
|
1552
|
+
}
|
|
1553
|
+
function webgpuMaxAnisotropy(maxAnisotropy, minFilter, magFilter, mipmapFilter) {
|
|
1554
|
+
if (maxAnisotropy <= 1)
|
|
1555
|
+
return undefined;
|
|
1556
|
+
if (minFilter !== "linear" || magFilter !== "linear" || mipmapFilter !== "linear")
|
|
1557
|
+
return undefined;
|
|
1558
|
+
return Math.min(16, Math.max(1, Math.floor(maxAnisotropy)));
|
|
1559
|
+
}
|
|
1560
|
+
function usesNativeDrawUniforms(layout) {
|
|
1561
|
+
return layout !== "passthrough";
|
|
1562
|
+
}
|
|
1563
|
+
function usesNativePbrTextureBindings(layout) {
|
|
1564
|
+
return layout === "generated-pbr" ||
|
|
1565
|
+
layout === "generated-textured-pbr" ||
|
|
1566
|
+
layout === "generated-instanced-pbr";
|
|
1567
|
+
}
|
|
1568
|
+
function writeAlignedQueueBuffer(queue, buffer, byteOffset, data, nativeByteLength) {
|
|
1569
|
+
const bytes = viewBytes(data);
|
|
1570
|
+
if (byteOffset % 4 === 0 && bytes.byteLength % 4 === 0) {
|
|
1571
|
+
queue.writeBuffer(buffer, byteOffset, bytes);
|
|
1572
|
+
return;
|
|
1573
|
+
}
|
|
1574
|
+
const alignedOffset = Math.floor(byteOffset / 4) * 4;
|
|
1575
|
+
const alignedEnd = alignTo(byteOffset + bytes.byteLength, 4);
|
|
1576
|
+
if (alignedEnd > nativeByteLength) {
|
|
1577
|
+
throw new RenderDeviceError("Aligned WebGPU buffer write exceeds native buffer allocation", "BUFFER_RANGE_OUT_OF_BOUNDS", {
|
|
1578
|
+
byteOffset,
|
|
1579
|
+
dataByteLength: bytes.byteLength,
|
|
1580
|
+
alignedOffset,
|
|
1581
|
+
alignedEnd,
|
|
1582
|
+
nativeByteLength
|
|
1583
|
+
});
|
|
1584
|
+
}
|
|
1585
|
+
const padded = new Uint8Array(alignedEnd - alignedOffset);
|
|
1586
|
+
padded.set(bytes, byteOffset - alignedOffset);
|
|
1587
|
+
queue.writeBuffer(buffer, alignedOffset, padded);
|
|
1588
|
+
}
|
|
1589
|
+
function rgbaBytes(color) {
|
|
1590
|
+
return new Uint8Array(color.map((channel) => Math.round(Math.max(0, Math.min(1, channel)) * 255)));
|
|
1591
|
+
}
|
|
1592
|
+
function halfFloatToNumber(bits) {
|
|
1593
|
+
const sign = (bits & 0x8000) ? -1 : 1;
|
|
1594
|
+
const exponent = (bits >> 10) & 0x1f;
|
|
1595
|
+
const fraction = bits & 0x03ff;
|
|
1596
|
+
if (exponent === 0) {
|
|
1597
|
+
return sign * 2 ** -14 * (fraction / 1024);
|
|
1598
|
+
}
|
|
1599
|
+
if (exponent === 0x1f) {
|
|
1600
|
+
return fraction === 0 ? sign * Infinity : Number.NaN;
|
|
1601
|
+
}
|
|
1602
|
+
return sign * 2 ** (exponent - 15) * (1 + fraction / 1024);
|
|
1603
|
+
}
|
|
1604
|
+
function uniformColor(uniforms) {
|
|
1605
|
+
const value = uniforms?.get("u_baseColor") ?? uniforms?.get("u_color") ?? uniforms?.get("color");
|
|
1606
|
+
const components = value instanceof Float32Array || Array.isArray(value) ? Array.from(value).slice(0, 4) : [];
|
|
1607
|
+
if (components.length >= 3 && components.every((component) => Number.isFinite(component))) {
|
|
1608
|
+
return [
|
|
1609
|
+
components[0] ?? 1,
|
|
1610
|
+
components[1] ?? 1,
|
|
1611
|
+
components[2] ?? 1,
|
|
1612
|
+
components[3] ?? 1
|
|
1613
|
+
];
|
|
1614
|
+
}
|
|
1615
|
+
return [1, 1, 1, 1];
|
|
1616
|
+
}
|
|
1617
|
+
function uniformBaseColorTextureBinding(uniforms) {
|
|
1618
|
+
if (!uniforms)
|
|
1619
|
+
return null;
|
|
1620
|
+
const direct = uniforms.get("u_texture") ?? uniforms.get("u_baseColorTexture") ?? uniforms.get("baseColorTexture");
|
|
1621
|
+
if (direct instanceof TextureBinding && direct.texture && !direct.texture.disposed && direct.validate().ok) {
|
|
1622
|
+
return direct;
|
|
1623
|
+
}
|
|
1624
|
+
return null;
|
|
1625
|
+
}
|
|
1626
|
+
function uniformTextureBinding(uniforms, name) {
|
|
1627
|
+
const value = uniforms?.get(name);
|
|
1628
|
+
return value instanceof TextureBinding && value.texture && !value.texture.disposed && value.validate().ok ? value : null;
|
|
1629
|
+
}
|
|
1630
|
+
function uniformNumber(value, fallback) {
|
|
1631
|
+
return typeof value === "number" && Number.isFinite(value) ? value : fallback;
|
|
1632
|
+
}
|
|
1633
|
+
function uniformVec3(value) {
|
|
1634
|
+
const components = value instanceof Float32Array || Array.isArray(value) ? Array.from(value).slice(0, 3) : [];
|
|
1635
|
+
return components.length === 3 && components.every(Number.isFinite)
|
|
1636
|
+
? [components[0], components[1], components[2]]
|
|
1637
|
+
: null;
|
|
1638
|
+
}
|
|
1639
|
+
function uniformMat4Array(value, count) {
|
|
1640
|
+
const numbers = value instanceof Float32Array || Array.isArray(value) ? Array.from(value) : [];
|
|
1641
|
+
return Array.from({ length: count }, (_, index) => {
|
|
1642
|
+
const start = index * 16;
|
|
1643
|
+
const matrix = numbers.slice(start, start + 16);
|
|
1644
|
+
return matrix.length === 16 && matrix.every(Number.isFinite) ? matrix : identityMatrix();
|
|
1645
|
+
});
|
|
1646
|
+
}
|
|
1647
|
+
function uniformRasterMatrices(uniforms, instanceCount) {
|
|
1648
|
+
const modelViewProjection = uniformMat4(uniforms?.get("u_modelViewProjection")) ?? identityMatrix();
|
|
1649
|
+
const value = uniforms?.get("u_instanceMatrices");
|
|
1650
|
+
const numbers = value instanceof Float32Array || Array.isArray(value) ? Array.from(value) : [];
|
|
1651
|
+
if (numbers.length < instanceCount * 16 || !numbers.slice(0, instanceCount * 16).every(Number.isFinite)) {
|
|
1652
|
+
return Array.from({ length: instanceCount }, () => modelViewProjection);
|
|
1653
|
+
}
|
|
1654
|
+
return Array.from({ length: instanceCount }, (_, index) => multiplyMat4(modelViewProjection, numbers.slice(index * 16, index * 16 + 16)));
|
|
1655
|
+
}
|
|
1656
|
+
function uniformRasterModelMatrices(uniforms, instanceCount) {
|
|
1657
|
+
const modelMatrix = uniformMat4(uniforms?.get("u_modelMatrix")) ?? identityMatrix();
|
|
1658
|
+
const value = uniforms?.get("u_instanceMatrices");
|
|
1659
|
+
const numbers = value instanceof Float32Array || Array.isArray(value) ? Array.from(value) : [];
|
|
1660
|
+
if (numbers.length < instanceCount * 16 || !numbers.slice(0, instanceCount * 16).every(Number.isFinite)) {
|
|
1661
|
+
return Array.from({ length: instanceCount }, () => modelMatrix);
|
|
1662
|
+
}
|
|
1663
|
+
return Array.from({ length: instanceCount }, (_, index) => multiplyMat4(modelMatrix, numbers.slice(index * 16, index * 16 + 16)));
|
|
1664
|
+
}
|
|
1665
|
+
function uniformForwardShadow(uniforms) {
|
|
1666
|
+
if (!uniforms)
|
|
1667
|
+
return null;
|
|
1668
|
+
const enabled = uniforms.get("u_shadowMapEnabled");
|
|
1669
|
+
if (typeof enabled !== "number" || enabled < 0.5)
|
|
1670
|
+
return null;
|
|
1671
|
+
const texture = uniforms.get("u_shadowMapTexture");
|
|
1672
|
+
const matrix = uniformMat4(uniforms.get("u_shadowMapMatrix")) ?? identityMatrix();
|
|
1673
|
+
if (!(texture instanceof TextureBinding) || !texture.texture || texture.texture.disposed || !texture.validate().ok) {
|
|
1674
|
+
return null;
|
|
1675
|
+
}
|
|
1676
|
+
const strengthValue = uniforms.get("u_shadowMapStrength");
|
|
1677
|
+
const biasValue = uniforms.get("u_shadowMapBias");
|
|
1678
|
+
const strength = typeof strengthValue === "number" && Number.isFinite(strengthValue) ? Math.max(0, Math.min(1, strengthValue)) : 0.65;
|
|
1679
|
+
const bias = typeof biasValue === "number" && Number.isFinite(biasValue) ? Math.max(0, biasValue) : 0.001;
|
|
1680
|
+
return { texture, matrix, strength, bias };
|
|
1681
|
+
}
|
|
1682
|
+
function uniformMat4(value) {
|
|
1683
|
+
const numbers = value instanceof Float32Array || Array.isArray(value) ? Array.from(value) : [];
|
|
1684
|
+
return numbers.length === 16 && numbers.every(Number.isFinite) ? numbers : null;
|
|
1685
|
+
}
|
|
1686
|
+
function multiplyMat4(left, right) {
|
|
1687
|
+
const out = new Array(16);
|
|
1688
|
+
for (let row = 0; row < 4; row += 1) {
|
|
1689
|
+
for (let column = 0; column < 4; column += 1) {
|
|
1690
|
+
out[column * 4 + row] =
|
|
1691
|
+
(left[0 * 4 + row] ?? 0) * (right[column * 4 + 0] ?? 0) +
|
|
1692
|
+
(left[1 * 4 + row] ?? 0) * (right[column * 4 + 1] ?? 0) +
|
|
1693
|
+
(left[2 * 4 + row] ?? 0) * (right[column * 4 + 2] ?? 0) +
|
|
1694
|
+
(left[3 * 4 + row] ?? 0) * (right[column * 4 + 3] ?? 0);
|
|
1695
|
+
}
|
|
1696
|
+
}
|
|
1697
|
+
return out;
|
|
1698
|
+
}
|
|
1699
|
+
function transformPosition(position, matrix) {
|
|
1700
|
+
const x = (matrix[0] ?? 1) * position[0] + (matrix[4] ?? 0) * position[1] + (matrix[8] ?? 0) * position[2] + (matrix[12] ?? 0);
|
|
1701
|
+
const y = (matrix[1] ?? 0) * position[0] + (matrix[5] ?? 1) * position[1] + (matrix[9] ?? 0) * position[2] + (matrix[13] ?? 0);
|
|
1702
|
+
const z = (matrix[2] ?? 0) * position[0] + (matrix[6] ?? 0) * position[1] + (matrix[10] ?? 1) * position[2] + (matrix[14] ?? 0);
|
|
1703
|
+
const w = (matrix[3] ?? 0) * position[0] + (matrix[7] ?? 0) * position[1] + (matrix[11] ?? 0) * position[2] + (matrix[15] ?? 1);
|
|
1704
|
+
const inverseW = Math.abs(w) > 1e-8 ? 1 / w : 1;
|
|
1705
|
+
return [
|
|
1706
|
+
x * inverseW,
|
|
1707
|
+
y * inverseW,
|
|
1708
|
+
z * inverseW
|
|
1709
|
+
];
|
|
1710
|
+
}
|
|
1711
|
+
function toDepth(ndcZ) {
|
|
1712
|
+
return Math.max(0, Math.min(1, ndcZ * 0.5 + 0.5));
|
|
1713
|
+
}
|
|
1714
|
+
function passesDepthTest(target, pixelIndex, depth, enabled, write) {
|
|
1715
|
+
if (!enabled || !target.depthPixels)
|
|
1716
|
+
return true;
|
|
1717
|
+
if (depth > (target.depthPixels[pixelIndex] ?? 1) + 1e-6)
|
|
1718
|
+
return false;
|
|
1719
|
+
if (write)
|
|
1720
|
+
target.depthPixels[pixelIndex] = depth;
|
|
1721
|
+
return true;
|
|
1722
|
+
}
|
|
1723
|
+
function readPosition(bytes, stride, offset, vertexIndex) {
|
|
1724
|
+
const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
1725
|
+
const base = vertexIndex * stride + offset;
|
|
1726
|
+
return [
|
|
1727
|
+
view.getFloat32(base, true),
|
|
1728
|
+
view.getFloat32(base + 4, true),
|
|
1729
|
+
view.getFloat32(base + 8, true)
|
|
1730
|
+
];
|
|
1731
|
+
}
|
|
1732
|
+
function readMorphedPosition(bytes, stride, offset, vertexIndex, uniforms) {
|
|
1733
|
+
const basePosition = readPosition(bytes, stride, offset, vertexIndex);
|
|
1734
|
+
const packed = uniforms?.get("u_morphPositionDeltas");
|
|
1735
|
+
const weights = uniforms?.get("u_morphWeights");
|
|
1736
|
+
const targetCountValue = uniforms?.get("u_morphTargetCount");
|
|
1737
|
+
if (!(packed instanceof Float32Array) || !(weights instanceof Float32Array) || typeof targetCountValue !== "number") {
|
|
1738
|
+
return basePosition;
|
|
1739
|
+
}
|
|
1740
|
+
const targetCount = Math.max(0, Math.min(weights.length, Math.floor(targetCountValue)));
|
|
1741
|
+
let x = basePosition[0];
|
|
1742
|
+
let y = basePosition[1];
|
|
1743
|
+
let z = basePosition[2];
|
|
1744
|
+
for (let target = 0; target < targetCount; target += 1) {
|
|
1745
|
+
const weight = weights[target] ?? 0;
|
|
1746
|
+
const deltaOffset = (target * 64 + vertexIndex) * 4;
|
|
1747
|
+
x += (packed[deltaOffset] ?? 0) * weight;
|
|
1748
|
+
y += (packed[deltaOffset + 1] ?? 0) * weight;
|
|
1749
|
+
z += (packed[deltaOffset + 2] ?? 0) * weight;
|
|
1750
|
+
}
|
|
1751
|
+
return [x, y, z];
|
|
1752
|
+
}
|
|
1753
|
+
function toPixel(position, width, height) {
|
|
1754
|
+
return [
|
|
1755
|
+
(position[0] * 0.5 + 0.5) * (width - 1),
|
|
1756
|
+
(1 - (position[1] * 0.5 + 0.5)) * (height - 1),
|
|
1757
|
+
toDepth(position[2])
|
|
1758
|
+
];
|
|
1759
|
+
}
|
|
1760
|
+
function identityMatrix() {
|
|
1761
|
+
return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
|
|
1762
|
+
}
|
|
1763
|
+
function readVertexColor(bytes, stride, offset, vertexIndex) {
|
|
1764
|
+
if (offset === undefined)
|
|
1765
|
+
return [1, 1, 1, 1];
|
|
1766
|
+
const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
1767
|
+
const base = vertexIndex * stride + offset;
|
|
1768
|
+
return [
|
|
1769
|
+
view.getFloat32(base, true),
|
|
1770
|
+
view.getFloat32(base + 4, true),
|
|
1771
|
+
view.getFloat32(base + 8, true),
|
|
1772
|
+
view.getFloat32(base + 12, true)
|
|
1773
|
+
];
|
|
1774
|
+
}
|
|
1775
|
+
function readVertexUv(bytes, stride, offset, vertexIndex) {
|
|
1776
|
+
if (offset === undefined)
|
|
1777
|
+
return [0, 0];
|
|
1778
|
+
const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
1779
|
+
const base = vertexIndex * stride + offset;
|
|
1780
|
+
return [view.getFloat32(base, true), view.getFloat32(base + 4, true)];
|
|
1781
|
+
}
|
|
1782
|
+
function rasterizeTriangle(target, a, b, c, worldA, worldB, worldC, color, colorA, colorB, colorC, uvA, uvB, uvC, texture, shadow, depthTest, depthWrite) {
|
|
1783
|
+
const pa = toPixel(a, target.width, target.height);
|
|
1784
|
+
const pb = toPixel(b, target.width, target.height);
|
|
1785
|
+
const pc = toPixel(c, target.width, target.height);
|
|
1786
|
+
const minX = clampInt(Math.floor(Math.min(pa[0], pb[0], pc[0])), 0, target.width - 1);
|
|
1787
|
+
const maxX = clampInt(Math.ceil(Math.max(pa[0], pb[0], pc[0])), 0, target.width - 1);
|
|
1788
|
+
const minY = clampInt(Math.floor(Math.min(pa[1], pb[1], pc[1])), 0, target.height - 1);
|
|
1789
|
+
const maxY = clampInt(Math.ceil(Math.max(pa[1], pb[1], pc[1])), 0, target.height - 1);
|
|
1790
|
+
const area = edge(pa, pb, pc);
|
|
1791
|
+
if (Math.abs(area) < 1e-6)
|
|
1792
|
+
return;
|
|
1793
|
+
for (let y = minY; y <= maxY; y += 1) {
|
|
1794
|
+
for (let x = minX; x <= maxX; x += 1) {
|
|
1795
|
+
const p = [x + 0.5, y + 0.5];
|
|
1796
|
+
const w0 = edge(pb, pc, p);
|
|
1797
|
+
const w1 = edge(pc, pa, p);
|
|
1798
|
+
const w2 = edge(pa, pb, p);
|
|
1799
|
+
if ((w0 >= 0 && w1 >= 0 && w2 >= 0) || (w0 <= 0 && w1 <= 0 && w2 <= 0)) {
|
|
1800
|
+
const invArea = 1 / area;
|
|
1801
|
+
const wa = w0 * invArea;
|
|
1802
|
+
const wb = w1 * invArea;
|
|
1803
|
+
const wc = w2 * invArea;
|
|
1804
|
+
const uv = [
|
|
1805
|
+
uvA[0] * wa + uvB[0] * wb + uvC[0] * wc,
|
|
1806
|
+
uvA[1] * wa + uvB[1] * wb + uvC[1] * wc
|
|
1807
|
+
];
|
|
1808
|
+
const worldPosition = [
|
|
1809
|
+
worldA[0] * wa + worldB[0] * wb + worldC[0] * wc,
|
|
1810
|
+
worldA[1] * wa + worldB[1] * wb + worldC[1] * wc,
|
|
1811
|
+
worldA[2] * wa + worldB[2] * wb + worldC[2] * wc
|
|
1812
|
+
];
|
|
1813
|
+
const pixelIndex = y * target.width + x;
|
|
1814
|
+
const depth = pa[2] * wa + pb[2] * wb + pc[2] * wc;
|
|
1815
|
+
if (!passesDepthTest(target, pixelIndex, depth, depthTest, depthWrite))
|
|
1816
|
+
continue;
|
|
1817
|
+
const shadedColor = multiplyColor(multiplyColor(color, interpolateColor(colorA, colorB, colorC, wa, wb, wc)), texture ? sampleTextureBinding(texture, uv) : [1, 1, 1, 1]);
|
|
1818
|
+
target.colorPixels.set(rgbaBytes(multiplyColor(shadedColor, shadowFactor(shadow, worldPosition))), pixelIndex * 4);
|
|
1819
|
+
}
|
|
1820
|
+
}
|
|
1821
|
+
}
|
|
1822
|
+
}
|
|
1823
|
+
function rasterizeLine(target, a, b, color, colorA, colorB, depthTest, depthWrite) {
|
|
1824
|
+
const pa = toPixel(a, target.width, target.height);
|
|
1825
|
+
const pb = toPixel(b, target.width, target.height);
|
|
1826
|
+
const x0 = clampInt(Math.round(pa[0]), 0, target.width - 1);
|
|
1827
|
+
const y0 = clampInt(Math.round(pa[1]), 0, target.height - 1);
|
|
1828
|
+
const x1 = clampInt(Math.round(pb[0]), 0, target.width - 1);
|
|
1829
|
+
const y1 = clampInt(Math.round(pb[1]), 0, target.height - 1);
|
|
1830
|
+
const dx = Math.abs(x1 - x0);
|
|
1831
|
+
const dy = Math.abs(y1 - y0);
|
|
1832
|
+
const steps = Math.max(dx, dy, 1);
|
|
1833
|
+
const shadedA = multiplyColor(color, colorA);
|
|
1834
|
+
const shadedB = multiplyColor(color, colorB);
|
|
1835
|
+
for (let step = 0; step <= steps; step += 1) {
|
|
1836
|
+
const t = step / steps;
|
|
1837
|
+
const x = clampInt(Math.round(x0 + (x1 - x0) * t), 0, target.width - 1);
|
|
1838
|
+
const y = clampInt(Math.round(y0 + (y1 - y0) * t), 0, target.height - 1);
|
|
1839
|
+
const pixelIndex = y * target.width + x;
|
|
1840
|
+
const depth = pa[2] + (pb[2] - pa[2]) * t;
|
|
1841
|
+
if (!passesDepthTest(target, pixelIndex, depth, depthTest, depthWrite))
|
|
1842
|
+
continue;
|
|
1843
|
+
const shaded = lerpColor(shadedA, shadedB, t);
|
|
1844
|
+
target.colorPixels.set(rgbaBytes(shaded), pixelIndex * 4);
|
|
1845
|
+
}
|
|
1846
|
+
}
|
|
1847
|
+
function rasterizePoint(target, point, color, depthTest, depthWrite) {
|
|
1848
|
+
const pixel = toPixel(point, target.width, target.height);
|
|
1849
|
+
const centerX = clampInt(Math.round(pixel[0]), 0, target.width - 1);
|
|
1850
|
+
const centerY = clampInt(Math.round(pixel[1]), 0, target.height - 1);
|
|
1851
|
+
const bytes = rgbaBytes(color);
|
|
1852
|
+
for (let y = centerY - 2; y <= centerY + 2; y += 1) {
|
|
1853
|
+
if (y < 0 || y >= target.height)
|
|
1854
|
+
continue;
|
|
1855
|
+
for (let x = centerX - 2; x <= centerX + 2; x += 1) {
|
|
1856
|
+
if (x < 0 || x >= target.width)
|
|
1857
|
+
continue;
|
|
1858
|
+
const pixelIndex = y * target.width + x;
|
|
1859
|
+
if (!passesDepthTest(target, pixelIndex, pixel[2], depthTest, depthWrite))
|
|
1860
|
+
continue;
|
|
1861
|
+
target.colorPixels.set(bytes, pixelIndex * 4);
|
|
1862
|
+
}
|
|
1863
|
+
}
|
|
1864
|
+
}
|
|
1865
|
+
function sampleTextureBinding(binding, uv) {
|
|
1866
|
+
const texture = binding.texture;
|
|
1867
|
+
if (!texture || texture.disposed)
|
|
1868
|
+
return [1, 1, 1, 1];
|
|
1869
|
+
const level = texture.textureLevels[0] ?? texture.fallbackTextureLevels[0];
|
|
1870
|
+
if (!level || level.data.length < level.width * level.height * 4)
|
|
1871
|
+
return [1, 1, 1, 1];
|
|
1872
|
+
const transformed = binding.transformUV(uv);
|
|
1873
|
+
const u = addressCoordinate(transformed[0], binding.sampler.addressU);
|
|
1874
|
+
const v = addressCoordinate(transformed[1], binding.sampler.addressV);
|
|
1875
|
+
const x = clampInt(Math.round(u * (level.width - 1)), 0, level.width - 1);
|
|
1876
|
+
const y = clampInt(Math.round(v * (level.height - 1)), 0, level.height - 1);
|
|
1877
|
+
const offset = (y * level.width + x) * 4;
|
|
1878
|
+
const r = (level.data[offset] ?? 255) / 255;
|
|
1879
|
+
const g = (level.data[offset + 1] ?? 255) / 255;
|
|
1880
|
+
const b = (level.data[offset + 2] ?? 255) / 255;
|
|
1881
|
+
return [
|
|
1882
|
+
texture.colorSpace === "srgb" ? srgbToLinear(r) : r,
|
|
1883
|
+
texture.colorSpace === "srgb" ? srgbToLinear(g) : g,
|
|
1884
|
+
texture.colorSpace === "srgb" ? srgbToLinear(b) : b,
|
|
1885
|
+
(level.data[offset + 3] ?? 255) / 255
|
|
1886
|
+
];
|
|
1887
|
+
}
|
|
1888
|
+
function srgbToLinear(value) {
|
|
1889
|
+
return value <= 0.04045 ? value / 12.92 : ((value + 0.055) / 1.055) ** 2.4;
|
|
1890
|
+
}
|
|
1891
|
+
function shadowFactor(shadow, worldPosition) {
|
|
1892
|
+
if (!shadow)
|
|
1893
|
+
return [1, 1, 1, 1];
|
|
1894
|
+
const projected = transformPosition(worldPosition, shadow.matrix);
|
|
1895
|
+
if (projected[0] < -1 || projected[0] > 1 || projected[1] < -1 || projected[1] > 1 || projected[2] < -1 || projected[2] > 1) {
|
|
1896
|
+
return [1, 1, 1, 1];
|
|
1897
|
+
}
|
|
1898
|
+
const uv = [projected[0] * 0.5 + 0.5, projected[1] * 0.5 + 0.5];
|
|
1899
|
+
const storedDepth = sampleTextureBinding(shadow.texture, uv)[0];
|
|
1900
|
+
const receiverDepth = projected[2] * 0.5 + 0.5 - shadow.bias;
|
|
1901
|
+
const visibility = receiverDepth > storedDepth ? 1 - shadow.strength : 1;
|
|
1902
|
+
return [visibility, visibility, visibility, 1];
|
|
1903
|
+
}
|
|
1904
|
+
function addressCoordinate(value, mode) {
|
|
1905
|
+
if (mode === "repeat")
|
|
1906
|
+
return value - Math.floor(value);
|
|
1907
|
+
if (mode === "mirror-repeat") {
|
|
1908
|
+
const repeated = value - Math.floor(value);
|
|
1909
|
+
return Math.floor(value) % 2 === 0 ? repeated : 1 - repeated;
|
|
1910
|
+
}
|
|
1911
|
+
return Math.min(1, Math.max(0, value));
|
|
1912
|
+
}
|
|
1913
|
+
function lerpColor(a, b, t) {
|
|
1914
|
+
return [
|
|
1915
|
+
a[0] + (b[0] - a[0]) * t,
|
|
1916
|
+
a[1] + (b[1] - a[1]) * t,
|
|
1917
|
+
a[2] + (b[2] - a[2]) * t,
|
|
1918
|
+
a[3] + (b[3] - a[3]) * t
|
|
1919
|
+
];
|
|
1920
|
+
}
|
|
1921
|
+
function interpolateColor(a, b, c, wa, wb, wc) {
|
|
1922
|
+
return [
|
|
1923
|
+
a[0] * wa + b[0] * wb + c[0] * wc,
|
|
1924
|
+
a[1] * wa + b[1] * wb + c[1] * wc,
|
|
1925
|
+
a[2] * wa + b[2] * wb + c[2] * wc,
|
|
1926
|
+
a[3] * wa + b[3] * wb + c[3] * wc
|
|
1927
|
+
];
|
|
1928
|
+
}
|
|
1929
|
+
function multiplyColor(a, b) {
|
|
1930
|
+
return [a[0] * b[0], a[1] * b[1], a[2] * b[2], a[3] * b[3]];
|
|
1931
|
+
}
|
|
1932
|
+
function edge(a, b, c) {
|
|
1933
|
+
return (c[0] - a[0]) * (b[1] - a[1]) - (c[1] - a[1]) * (b[0] - a[0]);
|
|
1934
|
+
}
|
|
1935
|
+
function clampInt(value, min, max) {
|
|
1936
|
+
return Math.min(max, Math.max(min, value));
|
|
1937
|
+
}
|
|
1938
|
+
function createNativeShaderSources(sources) {
|
|
1939
|
+
const vertexEntry = inferWGSLVertexEntryPoint(sources.vertex) ?? "vs_main";
|
|
1940
|
+
const fragmentEntry = inferWGSLFragmentEntryPoint(sources.fragment) ?? "fs_main";
|
|
1941
|
+
if (/\@(vertex|fragment|compute)\b/.test(sources.vertex) || /\@(vertex|fragment|compute)\b/.test(sources.fragment)) {
|
|
1942
|
+
return { vertex: sources.vertex, fragment: sources.fragment, entryPoints: [vertexEntry, fragmentEntry], uniformLayout: "passthrough" };
|
|
1943
|
+
}
|
|
1944
|
+
if (sources.marker.includes("instanced-pbr")) {
|
|
1945
|
+
return { ...nativeInstancedPbrShader(vertexEntry, fragmentEntry, sources.marker), entryPoints: [vertexEntry, fragmentEntry], uniformLayout: "generated-instanced-pbr" };
|
|
1946
|
+
}
|
|
1947
|
+
if (sources.marker.includes("pbr-textured")) {
|
|
1948
|
+
return { ...nativeTexturedPbrShader(vertexEntry, fragmentEntry, sources.marker, nativeShaderUsesTangent(sources.vertex)), entryPoints: [vertexEntry, fragmentEntry], uniformLayout: "generated-textured-pbr" };
|
|
1949
|
+
}
|
|
1950
|
+
if (sources.marker.includes("pbr-direct")) {
|
|
1951
|
+
return sources.fragment.includes("u_baseColorTexture")
|
|
1952
|
+
? { ...nativeTexturedPbrShader(vertexEntry, fragmentEntry, sources.marker, nativeShaderUsesTangent(sources.vertex)), entryPoints: [vertexEntry, fragmentEntry], uniformLayout: "generated-textured-pbr" }
|
|
1953
|
+
: { ...nativePbrShader(vertexEntry, fragmentEntry, sources.marker), entryPoints: [vertexEntry, fragmentEntry], uniformLayout: "generated-pbr" };
|
|
1954
|
+
}
|
|
1955
|
+
if (sources.marker.includes("skinned-unlit")) {
|
|
1956
|
+
return { ...nativeSkinnedUnlitShader(vertexEntry, fragmentEntry, sources.marker), entryPoints: [vertexEntry, fragmentEntry], uniformLayout: "generated-skinned-unlit" };
|
|
1957
|
+
}
|
|
1958
|
+
if (sources.marker.includes("morph-unlit")) {
|
|
1959
|
+
return { ...nativeMorphUnlitShader(vertexEntry, fragmentEntry, sources.marker), entryPoints: [vertexEntry, fragmentEntry], uniformLayout: "generated-morph-unlit" };
|
|
1960
|
+
}
|
|
1961
|
+
if (/sampler2D/.test(sources.fragment) && /layout\s*\(\s*location\s*=\s*2\s*\)\s*in\s+vec2/.test(sources.vertex)) {
|
|
1962
|
+
return {
|
|
1963
|
+
vertex: `// ${sources.marker}\nstruct DrawUniforms {\n modelViewProjection: mat4x4<f32>,\n color: vec4<f32>,\n};\n\nstruct VertexOutput {\n @builtin(position) position: vec4<f32>,\n @location(0) uv: vec2<f32>,\n};\n\n@group(0) @binding(0) var<uniform> u_draw: DrawUniforms;\n\n@vertex\nfn ${vertexEntry}(@location(0) position: vec3<f32>, @location(2) uv: vec2<f32>) -> VertexOutput {\n var output: VertexOutput;\n let clipPosition = u_draw.modelViewProjection * vec4<f32>(position, 1.0);
|
|
1964
|
+
output.position = vec4<f32>(clipPosition.x, clipPosition.y, clipPosition.z * 0.5 + clipPosition.w * 0.5, clipPosition.w);\n output.uv = uv;\n return output;\n}\n`,
|
|
1965
|
+
fragment: `// ${sources.marker}\nstruct DrawUniforms {\n modelViewProjection: mat4x4<f32>,\n color: vec4<f32>,\n};\n\nstruct VertexOutput {\n @builtin(position) position: vec4<f32>,\n @location(0) uv: vec2<f32>,\n};\n\n@group(0) @binding(0) var<uniform> u_draw: DrawUniforms;\n@group(0) @binding(1) var u_textureSampler: sampler;\n@group(0) @binding(2) var u_texture: texture_2d<f32>;\n\n@fragment\nfn ${fragmentEntry}(input: VertexOutput) -> @location(0) vec4<f32> {\n return u_draw.color * textureSample(u_texture, u_textureSampler, input.uv);\n}\n`,
|
|
1966
|
+
entryPoints: [vertexEntry, fragmentEntry],
|
|
1967
|
+
uniformLayout: "generated-texture"
|
|
1968
|
+
};
|
|
1969
|
+
}
|
|
1970
|
+
return {
|
|
1971
|
+
vertex: `// ${sources.marker}\nstruct DrawUniforms {\n modelViewProjection: mat4x4<f32>,\n color: vec4<f32>,\n};\n\nstruct VertexOutput {\n @builtin(position) position: vec4<f32>,\n};\n\n@group(0) @binding(0) var<uniform> u_draw: DrawUniforms;\n\n@vertex\nfn ${vertexEntry}(@location(0) position: vec3<f32>) -> VertexOutput {\n var output: VertexOutput;\n let clipPosition = u_draw.modelViewProjection * vec4<f32>(position, 1.0);
|
|
1972
|
+
output.position = vec4<f32>(clipPosition.x, clipPosition.y, clipPosition.z * 0.5 + clipPosition.w * 0.5, clipPosition.w);\n return output;\n}\n`,
|
|
1973
|
+
fragment: `// ${sources.marker}\nstruct DrawUniforms {\n modelViewProjection: mat4x4<f32>,\n color: vec4<f32>,\n};\n\n@group(0) @binding(0) var<uniform> u_draw: DrawUniforms;\n\n@fragment\nfn ${fragmentEntry}() -> @location(0) vec4<f32> {\n return u_draw.color;\n}\n`,
|
|
1974
|
+
entryPoints: [vertexEntry, fragmentEntry],
|
|
1975
|
+
uniformLayout: "generated-basic"
|
|
1976
|
+
};
|
|
1977
|
+
}
|
|
1978
|
+
function nativeUniformStruct() {
|
|
1979
|
+
return `struct DrawUniforms {
|
|
1980
|
+
modelViewProjection: mat4x4<f32>,
|
|
1981
|
+
color: vec4<f32>,
|
|
1982
|
+
params: vec4<f32>,
|
|
1983
|
+
flags: vec4<f32>,
|
|
1984
|
+
reserved0: vec4<f32>,
|
|
1985
|
+
instance0: mat4x4<f32>,
|
|
1986
|
+
instance1: mat4x4<f32>,
|
|
1987
|
+
instance2: mat4x4<f32>,
|
|
1988
|
+
instance3: mat4x4<f32>,
|
|
1989
|
+
joint0: mat4x4<f32>,
|
|
1990
|
+
joint1: mat4x4<f32>,
|
|
1991
|
+
morph0: vec4<f32>,
|
|
1992
|
+
morph1: vec4<f32>,
|
|
1993
|
+
morph2: vec4<f32>,
|
|
1994
|
+
morph3: vec4<f32>,
|
|
1995
|
+
morph4: vec4<f32>,
|
|
1996
|
+
morph5: vec4<f32>,
|
|
1997
|
+
morph6: vec4<f32>,
|
|
1998
|
+
morph7: vec4<f32>,
|
|
1999
|
+
material: vec4<f32>,
|
|
2000
|
+
camera: vec4<f32>,
|
|
2001
|
+
materialFlags: vec4<f32>,
|
|
2002
|
+
normalMatrix: mat4x4<f32>,
|
|
2003
|
+
};
|
|
2004
|
+
|
|
2005
|
+
@group(0) @binding(0) var<uniform> u_draw: DrawUniforms;
|
|
2006
|
+
|
|
2007
|
+
fn a3dWebGPUClipPosition(clipPosition: vec4<f32>) -> vec4<f32> {
|
|
2008
|
+
return vec4<f32>(clipPosition.x, clipPosition.y, clipPosition.z * 0.5 + clipPosition.w * 0.5, clipPosition.w);
|
|
2009
|
+
}
|
|
2010
|
+
`;
|
|
2011
|
+
}
|
|
2012
|
+
function nativeShaderUsesTangent(vertexSource) {
|
|
2013
|
+
return /\ba_tangent\b/.test(vertexSource) || /layout\s*\(\s*location\s*=\s*3\s*\)\s*in\s+vec4/.test(vertexSource);
|
|
2014
|
+
}
|
|
2015
|
+
function nativePbrFragmentPrelude(marker) {
|
|
2016
|
+
return `// ${marker}
|
|
2017
|
+
${nativeUniformStruct()}
|
|
2018
|
+
@group(0) @binding(1) var u_baseSampler: sampler;
|
|
2019
|
+
@group(0) @binding(2) var u_baseTexture: texture_2d<f32>;
|
|
2020
|
+
@group(0) @binding(3) var u_environmentSampler: sampler;
|
|
2021
|
+
@group(0) @binding(4) var u_environmentTexture: texture_2d<f32>;
|
|
2022
|
+
@group(0) @binding(5) var u_brdfSampler: sampler;
|
|
2023
|
+
@group(0) @binding(6) var u_brdfTexture: texture_2d<f32>;
|
|
2024
|
+
@group(0) @binding(7) var u_shadowSampler: sampler;
|
|
2025
|
+
@group(0) @binding(8) var u_shadowTexture: texture_2d<f32>;
|
|
2026
|
+
@group(0) @binding(9) var u_normalSampler: sampler;
|
|
2027
|
+
@group(0) @binding(10) var u_normalTexture: texture_2d<f32>;
|
|
2028
|
+
@group(0) @binding(11) var u_metallicRoughnessSampler: sampler;
|
|
2029
|
+
@group(0) @binding(12) var u_metallicRoughnessTexture: texture_2d<f32>;
|
|
2030
|
+
@group(0) @binding(13) var u_occlusionSampler: sampler;
|
|
2031
|
+
@group(0) @binding(14) var u_occlusionTexture: texture_2d<f32>;
|
|
2032
|
+
|
|
2033
|
+
struct VertexOutput {
|
|
2034
|
+
@builtin(position) position: vec4<f32>,
|
|
2035
|
+
@location(0) normal: vec3<f32>,
|
|
2036
|
+
@location(1) uv: vec2<f32>,
|
|
2037
|
+
@location(2) worldPosition: vec3<f32>,
|
|
2038
|
+
@location(3) tangent: vec4<f32>,
|
|
2039
|
+
};
|
|
2040
|
+
|
|
2041
|
+
fn fresnelSchlick(cosTheta: f32, f0: vec3<f32>) -> vec3<f32> {
|
|
2042
|
+
return f0 + (vec3<f32>(1.0, 1.0, 1.0) - f0) * pow(clamp(1.0 - cosTheta, 0.0, 1.0), 5.0);
|
|
2043
|
+
}
|
|
2044
|
+
|
|
2045
|
+
fn fresnelSchlickRoughness(cosTheta: f32, f0: vec3<f32>, roughness: f32) -> vec3<f32> {
|
|
2046
|
+
let smoothness = 1.0 - clamp(roughness, 0.0, 1.0);
|
|
2047
|
+
return f0 + (max(vec3<f32>(smoothness, smoothness, smoothness), f0) - f0) * pow(clamp(1.0 - cosTheta, 0.0, 1.0), 5.0);
|
|
2048
|
+
}
|
|
2049
|
+
|
|
2050
|
+
fn ggxDistribution(nDotH: f32, roughness: f32) -> f32 {
|
|
2051
|
+
let a = max(roughness * roughness, 0.045);
|
|
2052
|
+
let a2 = a * a;
|
|
2053
|
+
let denom = max((nDotH * nDotH) * (a2 - 1.0) + 1.0, 0.001);
|
|
2054
|
+
return a2 / max(3.14159265 * denom * denom, 0.001);
|
|
2055
|
+
}
|
|
2056
|
+
|
|
2057
|
+
fn ggxVisibilitySmithCorrelated(nDotV: f32, nDotL: f32, roughness: f32) -> f32 {
|
|
2058
|
+
let a = max(roughness * roughness, 0.045);
|
|
2059
|
+
let a2 = a * a;
|
|
2060
|
+
let lambdaV = nDotL * sqrt(max((nDotV - a2 * nDotV) * nDotV + a2, 0.00001));
|
|
2061
|
+
let lambdaL = nDotV * sqrt(max((nDotL - a2 * nDotL) * nDotL + a2, 0.00001));
|
|
2062
|
+
return 0.5 / max(lambdaV + lambdaL, 0.00001);
|
|
2063
|
+
}
|
|
2064
|
+
|
|
2065
|
+
fn diffuseBurley(nDotV: f32, nDotL: f32, lDotH: f32, roughness: f32) -> f32 {
|
|
2066
|
+
let energyBias = mix(0.0, 0.5, roughness);
|
|
2067
|
+
let energyFactor = mix(1.0, 1.0 / 1.51, roughness);
|
|
2068
|
+
let fd90 = energyBias + 2.0 * lDotH * lDotH * roughness;
|
|
2069
|
+
let lightScatter = 1.0 + (fd90 - 1.0) * pow(clamp(1.0 - nDotL, 0.0, 1.0), 5.0);
|
|
2070
|
+
let viewScatter = 1.0 + (fd90 - 1.0) * pow(clamp(1.0 - nDotV, 0.0, 1.0), 5.0);
|
|
2071
|
+
return lightScatter * viewScatter * energyFactor;
|
|
2072
|
+
}
|
|
2073
|
+
|
|
2074
|
+
fn encodePbrOutput(linearColor: vec3<f32>) -> vec3<f32> {
|
|
2075
|
+
let color = max(linearColor, vec3<f32>(0.0, 0.0, 0.0));
|
|
2076
|
+
let filmic = clamp((color * (2.51 * color + vec3<f32>(0.03, 0.03, 0.03))) / (color * (2.43 * color + vec3<f32>(0.59, 0.59, 0.59)) + vec3<f32>(0.14, 0.14, 0.14)), vec3<f32>(0.0, 0.0, 0.0), vec3<f32>(1.0, 1.0, 1.0));
|
|
2077
|
+
return pow(filmic, vec3<f32>(1.0 / 2.2, 1.0 / 2.2, 1.0 / 2.2));
|
|
2078
|
+
}
|
|
2079
|
+
|
|
2080
|
+
fn productPropBodyGate(baseColor: vec3<f32>, strength: f32) -> f32 {
|
|
2081
|
+
let maxChannel = max(max(baseColor.r, baseColor.g), baseColor.b);
|
|
2082
|
+
let minChannel = min(min(baseColor.r, baseColor.g), baseColor.b);
|
|
2083
|
+
let normalized = baseColor / max(maxChannel, 0.001);
|
|
2084
|
+
let warm = clamp(strength, 0.0, 1.0)
|
|
2085
|
+
* smoothstep(0.18, 0.42, maxChannel)
|
|
2086
|
+
* smoothstep(0.04, 0.2, maxChannel - minChannel)
|
|
2087
|
+
* smoothstep(0.64, 0.84, normalized.r)
|
|
2088
|
+
* (1.0 - smoothstep(0.12, 0.32, normalized.b));
|
|
2089
|
+
return warm * smoothstep(0.46, 0.64, normalized.g) * (1.0 - smoothstep(0.74, 0.94, normalized.b));
|
|
2090
|
+
}
|
|
2091
|
+
|
|
2092
|
+
fn productPropOrangeGate(baseColor: vec3<f32>, strength: f32) -> f32 {
|
|
2093
|
+
let maxChannel = max(max(baseColor.r, baseColor.g), baseColor.b);
|
|
2094
|
+
let minChannel = min(min(baseColor.r, baseColor.g), baseColor.b);
|
|
2095
|
+
let normalized = baseColor / max(maxChannel, 0.001);
|
|
2096
|
+
let warm = clamp(strength, 0.0, 1.0)
|
|
2097
|
+
* smoothstep(0.32, 0.58, maxChannel)
|
|
2098
|
+
* smoothstep(0.05, 0.24, maxChannel - minChannel)
|
|
2099
|
+
* smoothstep(0.68, 0.88, normalized.r)
|
|
2100
|
+
* (1.0 - smoothstep(0.1, 0.28, normalized.b));
|
|
2101
|
+
return warm * (1.0 - smoothstep(0.34, 0.58, normalized.g)) * smoothstep(0.012, 0.08, baseColor.g);
|
|
2102
|
+
}
|
|
2103
|
+
|
|
2104
|
+
fn productPropAlbedo(baseColor: vec3<f32>, strength: f32) -> vec3<f32> {
|
|
2105
|
+
let orangeGate = productPropOrangeGate(baseColor, strength);
|
|
2106
|
+
let bodyGate = productPropBodyGate(baseColor, strength) * (1.0 - orangeGate * 0.92);
|
|
2107
|
+
let maxChannel = max(max(baseColor.r, baseColor.g), baseColor.b);
|
|
2108
|
+
let bodyLuma = mix(0.98, 1.03, smoothstep(0.24, 0.9, maxChannel));
|
|
2109
|
+
let beakLuma = mix(0.94, 1.02, smoothstep(0.2, 0.82, maxChannel));
|
|
2110
|
+
var color = mix(baseColor, vec3<f32>(1.0, 0.88, 0.012) * bodyLuma, clamp(bodyGate * 0.995, 0.0, 0.995));
|
|
2111
|
+
color = mix(color, vec3<f32>(1.0, 0.24, 0.018) * beakLuma, clamp(orangeGate * 0.99, 0.0, 0.99));
|
|
2112
|
+
return color;
|
|
2113
|
+
}
|
|
2114
|
+
|
|
2115
|
+
fn perturbNormal(normalInput: vec3<f32>, tangentFrame: vec4<f32>, normalSample: vec3<f32>, normalScale: f32) -> vec3<f32> {
|
|
2116
|
+
let n = normalize(normalInput);
|
|
2117
|
+
let tangent = normalize(tangentFrame.xyz);
|
|
2118
|
+
let bitangent = normalize(cross(n, tangent) * tangentFrame.w);
|
|
2119
|
+
let mapped = vec3<f32>((normalSample.xy * 2.0 - vec2<f32>(1.0, 1.0)) * max(normalScale, 0.0), normalSample.z * 2.0 - 1.0);
|
|
2120
|
+
return normalize(tangent * mapped.x + bitangent * mapped.y + n * max(mapped.z, 0.001));
|
|
2121
|
+
}
|
|
2122
|
+
|
|
2123
|
+
fn shadePbr(normalInput: vec3<f32>, tangentFrame: vec4<f32>, uv: vec2<f32>, worldPosition: vec3<f32>) -> vec4<f32> {
|
|
2124
|
+
var normal = normalize(normalInput);
|
|
2125
|
+
if (u_draw.morph0.x > 0.5) {
|
|
2126
|
+
normal = perturbNormal(normal, tangentFrame, textureSample(u_normalTexture, u_normalSampler, uv).rgb, u_draw.morph0.y);
|
|
2127
|
+
}
|
|
2128
|
+
let viewDirection = normalize(u_draw.camera.xyz - worldPosition);
|
|
2129
|
+
let lightDirection = normalize(vec3<f32>(0.36, 0.52, 0.78));
|
|
2130
|
+
let halfVector = normalize(lightDirection + viewDirection);
|
|
2131
|
+
var baseColor = u_draw.color.rgb;
|
|
2132
|
+
var materialAlpha = u_draw.color.a;
|
|
2133
|
+
if (u_draw.flags.x > 0.5) {
|
|
2134
|
+
let baseSample = textureSample(u_baseTexture, u_baseSampler, uv);
|
|
2135
|
+
baseColor = baseColor * baseSample.rgb;
|
|
2136
|
+
materialAlpha = materialAlpha * baseSample.a;
|
|
2137
|
+
}
|
|
2138
|
+
let sourceProductBaseColor = baseColor;
|
|
2139
|
+
let productOrangeGate = productPropOrangeGate(sourceProductBaseColor, u_draw.materialFlags.z);
|
|
2140
|
+
let productBodyGate = productPropBodyGate(sourceProductBaseColor, u_draw.materialFlags.z) * (1.0 - productOrangeGate * 0.92);
|
|
2141
|
+
let productSurfaceGate = clamp(productBodyGate + productOrangeGate * 0.72, 0.0, 1.0);
|
|
2142
|
+
baseColor = productPropAlbedo(sourceProductBaseColor, u_draw.materialFlags.z);
|
|
2143
|
+
if (materialAlpha < u_draw.material.x) {
|
|
2144
|
+
discard;
|
|
2145
|
+
}
|
|
2146
|
+
let transmission = clamp(max(u_draw.material.y, u_draw.material.z), 0.0, 1.0);
|
|
2147
|
+
let metallicRoughnessSample = textureSample(u_metallicRoughnessTexture, u_metallicRoughnessSampler, uv);
|
|
2148
|
+
let metallicRoughnessEnabled = step(0.5, u_draw.materialFlags.x);
|
|
2149
|
+
let occlusionEnabled = step(0.5, u_draw.materialFlags.y);
|
|
2150
|
+
let sampledMetallic = clamp(u_draw.params.x * metallicRoughnessSample.b, 0.0, 1.0);
|
|
2151
|
+
let sampledRoughness = clamp(u_draw.params.y * metallicRoughnessSample.g, 0.045, 1.0);
|
|
2152
|
+
let sampledOcclusion = mix(1.0, textureSample(u_occlusionTexture, u_occlusionSampler, uv).r, clamp(u_draw.morph0.z, 0.0, 1.0));
|
|
2153
|
+
let metallic = mix(clamp(u_draw.params.x, 0.0, 1.0), sampledMetallic, metallicRoughnessEnabled);
|
|
2154
|
+
let roughness = mix(clamp(u_draw.params.y, 0.045, 1.0), sampledRoughness, metallicRoughnessEnabled);
|
|
2155
|
+
let occlusion = mix(1.0, sampledOcclusion, occlusionEnabled);
|
|
2156
|
+
let smoothedProductNormal = normalize(vec3<f32>(normal.x * 0.42, max(normal.y, 0.28), normal.z * 0.42));
|
|
2157
|
+
normal = normalize(mix(normal, smoothedProductNormal, productBodyGate * 0.46 + productOrangeGate * 0.84));
|
|
2158
|
+
let nDotL = max(dot(normal, lightDirection), 0.0);
|
|
2159
|
+
let nDotV = max(dot(normal, viewDirection), 0.001);
|
|
2160
|
+
let nDotH = max(dot(normal, halfVector), 0.001);
|
|
2161
|
+
let vDotH = max(dot(viewDirection, halfVector), 0.001);
|
|
2162
|
+
let f0 = mix(vec3<f32>(0.04, 0.04, 0.04), baseColor, metallic);
|
|
2163
|
+
let fresnel = fresnelSchlick(vDotH, f0);
|
|
2164
|
+
let distribution = ggxDistribution(nDotH, roughness);
|
|
2165
|
+
let visibility = ggxVisibilitySmithCorrelated(nDotV, nDotL, roughness);
|
|
2166
|
+
let lDotH = max(dot(lightDirection, halfVector), 0.0);
|
|
2167
|
+
let kd = (vec3<f32>(1.0, 1.0, 1.0) - fresnel) * (1.0 - metallic);
|
|
2168
|
+
let specular = fresnel * distribution * visibility;
|
|
2169
|
+
let diffuse = kd * baseColor * diffuseBurley(nDotV, nDotL, lDotH, roughness) / 3.14159265;
|
|
2170
|
+
var environment = baseColor * u_draw.params.z * (0.28 + 0.72 * clamp(normal.y * 0.5 + 0.5, 0.0, 1.0)) * occlusion;
|
|
2171
|
+
var environmentSpecularContribution = vec3<f32>(0.0, 0.0, 0.0);
|
|
2172
|
+
if (u_draw.flags.w > 0.5) {
|
|
2173
|
+
let reflectionDirection = reflect(-viewDirection, normal);
|
|
2174
|
+
let diffuseUv = vec2<f32>(fract(atan2(normal.z, normal.x) / 6.2831853 + 0.5), acos(clamp(normal.y, -1.0, 1.0)) / 3.14159265);
|
|
2175
|
+
let specularUv = vec2<f32>(fract(atan2(reflectionDirection.z, reflectionDirection.x) / 6.2831853 + 0.5), acos(clamp(reflectionDirection.y, -1.0, 1.0)) / 3.14159265);
|
|
2176
|
+
let environmentMipCount = max(u_draw.reserved0.z, 1.0);
|
|
2177
|
+
let diffuseEnv = textureSampleLevel(u_environmentTexture, u_environmentSampler, diffuseUv, max(environmentMipCount - 1.0, 0.0)).rgb;
|
|
2178
|
+
let specularEnv = textureSampleLevel(u_environmentTexture, u_environmentSampler, specularUv, roughness * max(environmentMipCount - 1.0, 0.0)).rgb;
|
|
2179
|
+
let brdf = textureSampleLevel(u_brdfTexture, u_brdfSampler, vec2<f32>(nDotV, roughness), 0.0).rg;
|
|
2180
|
+
let environmentFresnel = fresnelSchlickRoughness(nDotV, f0, roughness);
|
|
2181
|
+
let environmentDiffuse = (vec3<f32>(1.0, 1.0, 1.0) - environmentFresnel) * (1.0 - metallic) * diffuseEnv * baseColor * u_draw.params.w * occlusion;
|
|
2182
|
+
let environmentSpecular = specularEnv * (f0 * brdf.x + vec3<f32>(brdf.y, brdf.y, brdf.y)) * max(u_draw.reserved0.w, 0.0);
|
|
2183
|
+
environmentSpecularContribution = environmentSpecular;
|
|
2184
|
+
environment = environment + environmentDiffuse + environmentSpecular;
|
|
2185
|
+
}
|
|
2186
|
+
var shadow = 1.0;
|
|
2187
|
+
if (u_draw.flags.y > 0.5) {
|
|
2188
|
+
let shadowDepth = textureSampleLevel(u_shadowTexture, u_shadowSampler, vec2<f32>(0.5, 0.5), 0.0).r;
|
|
2189
|
+
shadow = mix(1.0, shadowDepth, clamp(u_draw.flags.z, 0.0, 1.0));
|
|
2190
|
+
}
|
|
2191
|
+
let litOpaqueLinearColor = environment + (diffuse + specular) * nDotL * 2.25 * shadow;
|
|
2192
|
+
let smoothedBodyColor = mix(baseColor, vec3<f32>(1.0, 0.88, 0.012), productBodyGate * 0.32);
|
|
2193
|
+
let smoothedBeakColor = mix(baseColor, vec3<f32>(1.0, 0.24, 0.018), productOrangeGate * 0.82);
|
|
2194
|
+
let softBodyProduct = smoothedBodyColor * (1.5 + 0.06 * nDotL) + specular * nDotL * 0.018;
|
|
2195
|
+
let softBeakProduct = smoothedBeakColor * (1.08 + 0.05 * nDotL) + specular * nDotL * 0.018;
|
|
2196
|
+
var opaqueLinearColor = mix(litOpaqueLinearColor, softBodyProduct, productBodyGate * 0.78);
|
|
2197
|
+
opaqueLinearColor = mix(opaqueLinearColor, softBeakProduct, productOrangeGate * 0.95);
|
|
2198
|
+
let transmittedTint = baseColor * u_draw.params.w * (0.18 + 0.42 * clamp(1.0 - roughness, 0.0, 1.0)) + environmentSpecularContribution * 1.35;
|
|
2199
|
+
let linearColor = mix(opaqueLinearColor, opaqueLinearColor * 0.22 + transmittedTint, transmission);
|
|
2200
|
+
let outputAlpha = mix(materialAlpha, min(materialAlpha, 0.22), transmission);
|
|
2201
|
+
return vec4<f32>(encodePbrOutput(linearColor), outputAlpha);
|
|
2202
|
+
}
|
|
2203
|
+
`;
|
|
2204
|
+
}
|
|
2205
|
+
function nativePbrShader(vertexEntry, fragmentEntry, marker) {
|
|
2206
|
+
return {
|
|
2207
|
+
vertex: `// ${marker}
|
|
2208
|
+
${nativeUniformStruct()}
|
|
2209
|
+
struct VertexOutput {
|
|
2210
|
+
@builtin(position) position: vec4<f32>,
|
|
2211
|
+
@location(0) normal: vec3<f32>,
|
|
2212
|
+
@location(1) uv: vec2<f32>,
|
|
2213
|
+
@location(2) worldPosition: vec3<f32>,
|
|
2214
|
+
@location(3) tangent: vec4<f32>,
|
|
2215
|
+
};
|
|
2216
|
+
|
|
2217
|
+
@vertex
|
|
2218
|
+
fn ${vertexEntry}(@location(0) position: vec3<f32>, @location(1) normal: vec3<f32>) -> VertexOutput {
|
|
2219
|
+
var output: VertexOutput;
|
|
2220
|
+
let worldPosition = (u_draw.instance0 * vec4<f32>(position, 1.0)).xyz;
|
|
2221
|
+
output.position = a3dWebGPUClipPosition(u_draw.modelViewProjection * vec4<f32>(position, 1.0));
|
|
2222
|
+
output.normal = normalize((u_draw.normalMatrix * vec4<f32>(normal, 0.0)).xyz);
|
|
2223
|
+
output.uv = vec2<f32>(0.5, 0.5);
|
|
2224
|
+
output.worldPosition = worldPosition;
|
|
2225
|
+
output.tangent = vec4<f32>(1.0, 0.0, 0.0, 1.0);
|
|
2226
|
+
return output;
|
|
2227
|
+
}
|
|
2228
|
+
`,
|
|
2229
|
+
fragment: `${nativePbrFragmentPrelude(marker)}
|
|
2230
|
+
@fragment
|
|
2231
|
+
fn ${fragmentEntry}(input: VertexOutput) -> @location(0) vec4<f32> {
|
|
2232
|
+
return shadePbr(input.normal, input.tangent, input.uv, input.worldPosition);
|
|
2233
|
+
}
|
|
2234
|
+
`
|
|
2235
|
+
};
|
|
2236
|
+
}
|
|
2237
|
+
function nativeTexturedPbrShader(vertexEntry, fragmentEntry, marker, usesTangent) {
|
|
2238
|
+
return {
|
|
2239
|
+
vertex: `// ${marker}
|
|
2240
|
+
${nativeUniformStruct()}
|
|
2241
|
+
struct VertexOutput {
|
|
2242
|
+
@builtin(position) position: vec4<f32>,
|
|
2243
|
+
@location(0) normal: vec3<f32>,
|
|
2244
|
+
@location(1) uv: vec2<f32>,
|
|
2245
|
+
@location(2) worldPosition: vec3<f32>,
|
|
2246
|
+
@location(3) tangent: vec4<f32>,
|
|
2247
|
+
};
|
|
2248
|
+
|
|
2249
|
+
@vertex
|
|
2250
|
+
fn ${vertexEntry}(@location(0) position: vec3<f32>, @location(1) normal: vec3<f32>, @location(2) uv: vec2<f32>${usesTangent ? ", @location(3) tangent: vec4<f32>" : ""}) -> VertexOutput {
|
|
2251
|
+
var output: VertexOutput;
|
|
2252
|
+
let worldPosition = (u_draw.instance0 * vec4<f32>(position, 1.0)).xyz;
|
|
2253
|
+
output.position = a3dWebGPUClipPosition(u_draw.modelViewProjection * vec4<f32>(position, 1.0));
|
|
2254
|
+
output.normal = normalize((u_draw.normalMatrix * vec4<f32>(normal, 0.0)).xyz);
|
|
2255
|
+
output.uv = uv;
|
|
2256
|
+
output.worldPosition = worldPosition;
|
|
2257
|
+
${usesTangent ? "output.tangent = vec4<f32>(normalize((u_draw.normalMatrix * vec4<f32>(tangent.xyz, 0.0)).xyz), tangent.w);" : "output.tangent = vec4<f32>(1.0, 0.0, 0.0, 1.0);"}
|
|
2258
|
+
return output;
|
|
2259
|
+
}
|
|
2260
|
+
`,
|
|
2261
|
+
fragment: `${nativePbrFragmentPrelude(marker)}
|
|
2262
|
+
@fragment
|
|
2263
|
+
fn ${fragmentEntry}(input: VertexOutput) -> @location(0) vec4<f32> {
|
|
2264
|
+
return shadePbr(input.normal, input.tangent, input.uv, input.worldPosition);
|
|
2265
|
+
}
|
|
2266
|
+
`
|
|
2267
|
+
};
|
|
2268
|
+
}
|
|
2269
|
+
function nativeInstancedPbrShader(vertexEntry, fragmentEntry, marker) {
|
|
2270
|
+
return {
|
|
2271
|
+
vertex: `// ${marker}
|
|
2272
|
+
${nativeUniformStruct()}
|
|
2273
|
+
struct VertexOutput {
|
|
2274
|
+
@builtin(position) position: vec4<f32>,
|
|
2275
|
+
@location(0) normal: vec3<f32>,
|
|
2276
|
+
@location(1) uv: vec2<f32>,
|
|
2277
|
+
@location(2) worldPosition: vec3<f32>,
|
|
2278
|
+
@location(3) tangent: vec4<f32>,
|
|
2279
|
+
};
|
|
2280
|
+
|
|
2281
|
+
fn instanceMatrix(index: u32) -> mat4x4<f32> {
|
|
2282
|
+
if (index == 1u) { return u_draw.instance1; }
|
|
2283
|
+
if (index == 2u) { return u_draw.instance2; }
|
|
2284
|
+
if (index == 3u) { return u_draw.instance3; }
|
|
2285
|
+
return u_draw.instance0;
|
|
2286
|
+
}
|
|
2287
|
+
|
|
2288
|
+
@vertex
|
|
2289
|
+
fn ${vertexEntry}(@location(0) position: vec3<f32>, @location(1) normal: vec3<f32>, @builtin(instance_index) instanceIndex: u32) -> VertexOutput {
|
|
2290
|
+
var output: VertexOutput;
|
|
2291
|
+
let model = instanceMatrix(instanceIndex);
|
|
2292
|
+
let worldPosition = (model * vec4<f32>(position, 1.0)).xyz;
|
|
2293
|
+
output.position = a3dWebGPUClipPosition(u_draw.modelViewProjection * model * vec4<f32>(position, 1.0));
|
|
2294
|
+
output.normal = normalize((model * vec4<f32>(normal, 0.0)).xyz);
|
|
2295
|
+
output.uv = vec2<f32>(0.5, 0.5);
|
|
2296
|
+
output.worldPosition = worldPosition;
|
|
2297
|
+
output.tangent = vec4<f32>(1.0, 0.0, 0.0, 1.0);
|
|
2298
|
+
return output;
|
|
2299
|
+
}
|
|
2300
|
+
`,
|
|
2301
|
+
fragment: `${nativePbrFragmentPrelude(marker)}
|
|
2302
|
+
@fragment
|
|
2303
|
+
fn ${fragmentEntry}(input: VertexOutput) -> @location(0) vec4<f32> {
|
|
2304
|
+
return shadePbr(input.normal, input.tangent, input.uv, input.worldPosition);
|
|
2305
|
+
}
|
|
2306
|
+
`
|
|
2307
|
+
};
|
|
2308
|
+
}
|
|
2309
|
+
function nativeSkinnedUnlitShader(vertexEntry, fragmentEntry, marker) {
|
|
2310
|
+
return {
|
|
2311
|
+
vertex: `// ${marker}
|
|
2312
|
+
${nativeUniformStruct()}
|
|
2313
|
+
struct VertexOutput {
|
|
2314
|
+
@builtin(position) position: vec4<f32>,
|
|
2315
|
+
};
|
|
2316
|
+
|
|
2317
|
+
fn jointMatrix(index: f32) -> mat4x4<f32> {
|
|
2318
|
+
if (index > 0.5) { return u_draw.joint1; }
|
|
2319
|
+
return u_draw.joint0;
|
|
2320
|
+
}
|
|
2321
|
+
|
|
2322
|
+
@vertex
|
|
2323
|
+
fn ${vertexEntry}(@location(0) position: vec3<f32>, @location(5) joints: vec4<f32>, @location(6) weights: vec4<f32>) -> VertexOutput {
|
|
2324
|
+
var output: VertexOutput;
|
|
2325
|
+
let skin = jointMatrix(joints.x) * weights.x + jointMatrix(joints.y) * weights.y + jointMatrix(joints.z) * weights.z + jointMatrix(joints.w) * weights.w;
|
|
2326
|
+
let weightSum = weights.x + weights.y + weights.z + weights.w;
|
|
2327
|
+
let skinned = select(vec4<f32>(position, 1.0), skin * vec4<f32>(position, 1.0), weightSum > 0.0001);
|
|
2328
|
+
output.position = a3dWebGPUClipPosition(u_draw.modelViewProjection * skinned);
|
|
2329
|
+
return output;
|
|
2330
|
+
}
|
|
2331
|
+
`,
|
|
2332
|
+
fragment: `// ${marker}
|
|
2333
|
+
${nativeUniformStruct()}
|
|
2334
|
+
@fragment
|
|
2335
|
+
fn ${fragmentEntry}() -> @location(0) vec4<f32> {
|
|
2336
|
+
return u_draw.color;
|
|
2337
|
+
}
|
|
2338
|
+
`
|
|
2339
|
+
};
|
|
2340
|
+
}
|
|
2341
|
+
function nativeMorphUnlitShader(vertexEntry, fragmentEntry, marker) {
|
|
2342
|
+
return {
|
|
2343
|
+
vertex: `// ${marker}
|
|
2344
|
+
${nativeUniformStruct()}
|
|
2345
|
+
struct VertexOutput {
|
|
2346
|
+
@builtin(position) position: vec4<f32>,
|
|
2347
|
+
};
|
|
2348
|
+
|
|
2349
|
+
fn morphDelta(index: u32) -> vec3<f32> {
|
|
2350
|
+
if (index == 0u) { return u_draw.morph0.xyz; }
|
|
2351
|
+
if (index == 1u) { return u_draw.morph1.xyz; }
|
|
2352
|
+
if (index == 2u) { return u_draw.morph2.xyz; }
|
|
2353
|
+
if (index == 3u) { return u_draw.morph3.xyz; }
|
|
2354
|
+
if (index == 4u) { return u_draw.morph4.xyz; }
|
|
2355
|
+
if (index == 5u) { return u_draw.morph5.xyz; }
|
|
2356
|
+
if (index == 6u) { return u_draw.morph6.xyz; }
|
|
2357
|
+
return u_draw.morph7.xyz;
|
|
2358
|
+
}
|
|
2359
|
+
|
|
2360
|
+
@vertex
|
|
2361
|
+
fn ${vertexEntry}(@location(0) position: vec3<f32>, @builtin(vertex_index) vertexIndex: u32) -> VertexOutput {
|
|
2362
|
+
var output: VertexOutput;
|
|
2363
|
+
let enabled = min(u_draw.reserved0.y, 1.0);
|
|
2364
|
+
let morphed = position + morphDelta(min(vertexIndex, 7u)) * u_draw.reserved0.x * enabled;
|
|
2365
|
+
output.position = a3dWebGPUClipPosition(u_draw.modelViewProjection * vec4<f32>(morphed, 1.0));
|
|
2366
|
+
return output;
|
|
2367
|
+
}
|
|
2368
|
+
`,
|
|
2369
|
+
fragment: `// ${marker}
|
|
2370
|
+
${nativeUniformStruct()}
|
|
2371
|
+
@fragment
|
|
2372
|
+
fn ${fragmentEntry}() -> @location(0) vec4<f32> {
|
|
2373
|
+
return u_draw.color;
|
|
2374
|
+
}
|
|
2375
|
+
`
|
|
2376
|
+
};
|
|
2377
|
+
}
|
|
2378
|
+
function inferWGSLVertexEntryPoint(source) {
|
|
2379
|
+
return /@vertex\s+fn\s+([A-Za-z_]\w*)/.exec(source)?.[1];
|
|
2380
|
+
}
|
|
2381
|
+
function inferWGSLFragmentEntryPoint(source) {
|
|
2382
|
+
return /@fragment\s+fn\s+([A-Za-z_]\w*)/.exec(source)?.[1];
|
|
2383
|
+
}
|
|
2384
|
+
function vertexBufferLayout(format) {
|
|
2385
|
+
return {
|
|
2386
|
+
arrayStride: format.stride,
|
|
2387
|
+
attributes: format.attributes.map((attribute) => ({
|
|
2388
|
+
shaderLocation: attribute.shaderLocation,
|
|
2389
|
+
offset: attribute.offset,
|
|
2390
|
+
format: vertexAttributeFormat(attribute.components)
|
|
2391
|
+
}))
|
|
2392
|
+
};
|
|
2393
|
+
}
|
|
2394
|
+
function vertexAttributeFormat(components) {
|
|
2395
|
+
if (components === 1)
|
|
2396
|
+
return "float32";
|
|
2397
|
+
if (components === 2)
|
|
2398
|
+
return "float32x2";
|
|
2399
|
+
if (components === 3)
|
|
2400
|
+
return "float32x3";
|
|
2401
|
+
return "float32x4";
|
|
2402
|
+
}
|
|
2403
|
+
//# sourceMappingURL=WebGPUDevice.js.map
|