@aura3d/engine 1.5.2 → 2.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 +142 -117
- package/dist/animation/FootIk.d.ts +10 -1
- package/dist/animation/FootIk.d.ts.map +1 -1
- package/dist/animation/FootIk.js.map +1 -1
- package/dist/animation/HumanoidRetargeting.js +1 -1
- package/dist/animation/RigQuality.d.ts +1 -1
- package/dist/animation/RigQuality.js +2 -2
- package/dist/animation/RigQuality.js.map +1 -1
- package/dist/animation/SecondaryAnimationSampling.d.ts +55 -0
- package/dist/animation/SecondaryAnimationSampling.d.ts.map +1 -0
- package/dist/animation/SecondaryAnimationSampling.js +145 -0
- package/dist/animation/SecondaryAnimationSampling.js.map +1 -0
- package/dist/animation/SpringBones.d.ts.map +1 -1
- package/dist/animation/SpringBones.js +1 -2
- package/dist/animation/SpringBones.js.map +1 -1
- package/dist/animation/browser-index.d.ts +0 -2
- package/dist/animation/browser-index.d.ts.map +1 -1
- package/dist/animation/browser-index.js +0 -2
- package/dist/animation/browser-index.js.map +1 -1
- package/dist/animation/index.d.ts +0 -2
- package/dist/animation/index.d.ts.map +1 -1
- package/dist/animation/index.js +0 -2
- package/dist/animation/index.js.map +1 -1
- package/dist/assets/GLTFAnimationRuntime.d.ts +4 -0
- package/dist/assets/GLTFAnimationRuntime.d.ts.map +1 -1
- package/dist/assets/GLTFAnimationRuntime.js +29 -6
- package/dist/assets/GLTFAnimationRuntime.js.map +1 -1
- package/dist/assets/GLTFLoader.d.ts.map +1 -1
- package/dist/assets/GLTFLoader.js +13 -4
- package/dist/assets/GLTFLoader.js.map +1 -1
- package/dist/assets/browser-index.d.ts +0 -4
- package/dist/assets/browser-index.d.ts.map +1 -1
- package/dist/assets/browser-index.js +0 -2
- package/dist/assets/browser-index.js.map +1 -1
- package/dist/assets/gltf-runtime.d.ts +6 -0
- package/dist/assets/gltf-runtime.d.ts.map +1 -0
- package/dist/assets/gltf-runtime.js +4 -0
- package/dist/assets/gltf-runtime.js.map +1 -0
- package/dist/assets/index.d.ts +0 -4
- package/dist/assets/index.d.ts.map +1 -1
- package/dist/assets/index.js +0 -2
- package/dist/assets/index.js.map +1 -1
- package/dist/audio/AudioBus.d.ts +19 -1
- package/dist/audio/AudioBus.d.ts.map +1 -1
- package/dist/audio/AudioBus.js.map +1 -1
- package/dist/audio/AudioFileManager.d.ts +5 -0
- package/dist/audio/AudioFileManager.d.ts.map +1 -1
- package/dist/audio/AudioFileManager.js +13 -0
- package/dist/audio/AudioFileManager.js.map +1 -1
- package/dist/audio/AudioSource.d.ts +8 -0
- package/dist/audio/AudioSource.d.ts.map +1 -1
- package/dist/audio/AudioSource.js +56 -7
- package/dist/audio/AudioSource.js.map +1 -1
- package/dist/audio/index.d.ts +1 -7
- package/dist/audio/index.d.ts.map +1 -1
- package/dist/audio/index.js +0 -3
- package/dist/audio/index.js.map +1 -1
- package/dist/aura3d-cli/asset-core-types.d.ts +1 -1
- package/dist/aura3d-cli/asset-core-types.d.ts.map +1 -1
- package/dist/aura3d-cli/asset-manifest.d.ts.map +1 -1
- package/dist/aura3d-cli/asset-manifest.js +36 -2
- package/dist/aura3d-cli/asset-manifest.js.map +1 -1
- package/dist/aura3d-cli/asset-role-admission.js +1 -1
- package/dist/aura3d-cli/asset-role-admission.js.map +1 -1
- package/dist/aura3d-cli/cli-help.js +3 -3
- package/dist/aura3d-cli/cli-help.js.map +1 -1
- package/dist/aura3d-cli/cli-options.d.ts +1 -1
- package/dist/aura3d-cli/cli-options.d.ts.map +1 -1
- package/dist/aura3d-cli/cli-options.js +2 -2
- package/dist/aura3d-cli/cli-options.js.map +1 -1
- package/dist/aura3d-cli/cli.js +1 -1
- package/dist/aura3d-cli/cli.js.map +1 -1
- package/dist/aura3d-cli/index.d.ts.map +1 -1
- package/dist/aura3d-cli/index.js +13 -5
- package/dist/aura3d-cli/index.js.map +1 -1
- package/dist/create-aura3d/index.d.ts.map +1 -1
- package/dist/create-aura3d/index.js +10 -4
- package/dist/create-aura3d/index.js.map +1 -1
- package/dist/create-aura3d/showcase-spec-evidence.js +5 -1
- package/dist/create-aura3d/showcase-spec-evidence.js.map +1 -1
- package/dist/create-aura3d/showcase-spec-game-geometry-extractor.d.ts +8 -1
- package/dist/create-aura3d/showcase-spec-game-geometry-extractor.d.ts.map +1 -1
- package/dist/create-aura3d/showcase-spec-game-geometry-extractor.js +191 -31
- package/dist/create-aura3d/showcase-spec-game-geometry-extractor.js.map +1 -1
- package/dist/create-aura3d/showcase-spec-game-template-evidence.d.ts.map +1 -1
- package/dist/create-aura3d/showcase-spec-game-template-evidence.js +7 -0
- package/dist/create-aura3d/showcase-spec-game-template-evidence.js.map +1 -1
- package/dist/create-aura3d/showcase-spec-parser.js +1 -1
- package/dist/create-aura3d/showcase-spec-parser.js.map +1 -1
- package/dist/create-aura3d/showcase-spec-types.d.ts +50 -0
- package/dist/create-aura3d/showcase-spec-types.d.ts.map +1 -1
- package/dist/editor-runtime/index.d.ts +0 -2
- package/dist/editor-runtime/index.d.ts.map +1 -1
- package/dist/editor-runtime/index.js +0 -1
- package/dist/editor-runtime/index.js.map +1 -1
- package/dist/engine/agent-api/GameAssetValidation.js +1 -1
- package/dist/engine/agent-api/GameAssetValidation.js.map +1 -1
- package/dist/engine/agent-api/GameEvidence.js +1 -1
- package/dist/engine/agent-api/GameEvidence.js.map +1 -1
- package/dist/engine/agent-api/GameGenreKits.d.ts +63 -0
- package/dist/engine/agent-api/GameGenreKits.d.ts.map +1 -1
- package/dist/engine/agent-api/GameGenreKits.js +274 -56
- package/dist/engine/agent-api/GameGenreKits.js.map +1 -1
- package/dist/engine/agent-api/GameRuntime.d.ts +38 -1
- package/dist/engine/agent-api/GameRuntime.d.ts.map +1 -1
- package/dist/engine/agent-api/GameRuntime.js +69 -1
- package/dist/engine/agent-api/GameRuntime.js.map +1 -1
- package/dist/engine/agent-api/GameSceneGeometryBindings.d.ts +24 -0
- package/dist/engine/agent-api/GameSceneGeometryBindings.d.ts.map +1 -1
- package/dist/engine/agent-api/GameSceneGeometryBindings.js +52 -0
- package/dist/engine/agent-api/GameSceneGeometryBindings.js.map +1 -1
- package/dist/engine/agent-api/LeanArcadeRuntime.d.ts +111 -0
- package/dist/engine/agent-api/LeanArcadeRuntime.d.ts.map +1 -0
- package/dist/engine/agent-api/LeanArcadeRuntime.js +219 -0
- package/dist/engine/agent-api/LeanArcadeRuntime.js.map +1 -0
- package/dist/engine/agent-api/PhysicsRuntime.d.ts +332 -0
- package/dist/engine/agent-api/PhysicsRuntime.d.ts.map +1 -0
- package/dist/engine/agent-api/PhysicsRuntime.js +619 -0
- package/dist/engine/agent-api/PhysicsRuntime.js.map +1 -0
- package/dist/engine/agent-api/PlatformerMotion.d.ts +124 -0
- package/dist/engine/agent-api/PlatformerMotion.d.ts.map +1 -1
- package/dist/engine/agent-api/PlatformerMotion.js +101 -16
- package/dist/engine/agent-api/PlatformerMotion.js.map +1 -1
- package/dist/engine/agent-api/RootGeometry.d.ts +36 -0
- package/dist/engine/agent-api/RootGeometry.d.ts.map +1 -0
- package/dist/engine/agent-api/RootGeometry.js +152 -0
- package/dist/engine/agent-api/RootGeometry.js.map +1 -0
- package/dist/engine/agent-api/VehicleChassis.d.ts +52 -0
- package/dist/engine/agent-api/VehicleChassis.d.ts.map +1 -1
- package/dist/engine/agent-api/VehicleChassis.js +182 -8
- package/dist/engine/agent-api/VehicleChassis.js.map +1 -1
- package/dist/engine/agent-api/WorldLabelRenderer.d.ts +65 -1
- package/dist/engine/agent-api/WorldLabelRenderer.d.ts.map +1 -1
- package/dist/engine/agent-api/WorldLabelRenderer.js +48 -5
- package/dist/engine/agent-api/WorldLabelRenderer.js.map +1 -1
- package/dist/engine/agent-api/humanoid-walk-runtime.d.ts +1 -1
- package/dist/engine/agent-api/index.d.ts +206 -13
- package/dist/engine/agent-api/index.d.ts.map +1 -1
- package/dist/engine/agent-api/index.js +1388 -357
- package/dist/engine/agent-api/index.js.map +1 -1
- package/dist/engine/agent-api/lean-base.d.ts +224 -0
- package/dist/engine/agent-api/lean-base.d.ts.map +1 -0
- package/dist/engine/agent-api/lean-base.js +322 -0
- package/dist/engine/agent-api/lean-base.js.map +1 -0
- package/dist/engine/agent-api/lean-game.d.ts +3 -0
- package/dist/engine/agent-api/lean-game.d.ts.map +1 -0
- package/dist/engine/agent-api/lean-game.js +3 -0
- package/dist/engine/agent-api/lean-game.js.map +1 -0
- package/dist/engine/agent-api/lean-product.d.ts +3 -0
- package/dist/engine/agent-api/lean-product.d.ts.map +1 -0
- package/dist/engine/agent-api/lean-product.js +3 -0
- package/dist/engine/agent-api/lean-product.js.map +1 -0
- package/dist/engine/agent-api/lean.d.ts +3 -0
- package/dist/engine/agent-api/lean.d.ts.map +1 -0
- package/dist/engine/agent-api/lean.js +3 -0
- package/dist/engine/agent-api/lean.js.map +1 -0
- package/dist/engine/agent-api/media-node.d.ts +42 -0
- package/dist/engine/agent-api/media-node.d.ts.map +1 -0
- package/dist/engine/agent-api/media-node.js +44 -0
- package/dist/engine/agent-api/media-node.js.map +1 -0
- package/dist/engine/agent-api/product-viewer-runtime.d.ts.map +1 -1
- package/dist/engine/game/GameAudio.d.ts +5 -0
- package/dist/engine/game/GameAudio.d.ts.map +1 -1
- package/dist/engine/game/GameAudio.js +65 -23
- package/dist/engine/game/GameAudio.js.map +1 -1
- package/dist/engine/production-runtime/TypedGLBActor.d.ts +9 -1
- package/dist/engine/production-runtime/TypedGLBActor.d.ts.map +1 -1
- package/dist/engine/production-runtime/TypedGLBActor.js +25 -7
- package/dist/engine/production-runtime/TypedGLBActor.js.map +1 -1
- package/dist/engine/production-runtime/index.d.ts +2 -2
- package/dist/engine/production-runtime/index.d.ts.map +1 -1
- package/dist/engine/threejs-example-parity/FlagshipFoundation.d.ts +3 -3
- package/dist/engine/threejs-example-parity/FlagshipFoundation.d.ts.map +1 -1
- package/dist/environments/index.d.ts +5 -10
- package/dist/environments/index.d.ts.map +1 -1
- package/dist/environments/index.js +0 -3
- package/dist/environments/index.js.map +1 -1
- package/dist/environments/node.d.ts +7 -0
- package/dist/environments/node.d.ts.map +1 -0
- package/dist/environments/node.js +5 -0
- package/dist/environments/node.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/input/InputActionBinding.d.ts +44 -0
- package/dist/input/InputActionBinding.d.ts.map +1 -0
- package/dist/input/InputActionBinding.js +86 -0
- package/dist/input/InputActionBinding.js.map +1 -0
- package/dist/input/InputActionBindingFixtures.d.ts +8 -0
- package/dist/input/InputActionBindingFixtures.d.ts.map +1 -1
- package/dist/input/InputActionBindingFixtures.js +8 -0
- package/dist/input/InputActionBindingFixtures.js.map +1 -1
- package/dist/input/InputValueProcessors.d.ts +19 -0
- package/dist/input/InputValueProcessors.d.ts.map +1 -0
- package/dist/input/InputValueProcessors.js +24 -0
- package/dist/input/InputValueProcessors.js.map +1 -0
- package/dist/input/index.d.ts +2 -6
- package/dist/input/index.d.ts.map +1 -1
- package/dist/input/index.js +1 -3
- package/dist/input/index.js.map +1 -1
- package/dist/lean/ArcadeRuntime.d.ts +111 -0
- package/dist/lean/ArcadeRuntime.d.ts.map +1 -0
- package/dist/lean/ArcadeRuntime.js +219 -0
- package/dist/lean/ArcadeRuntime.js.map +1 -0
- package/dist/lean/base.d.ts +228 -0
- package/dist/lean/base.d.ts.map +1 -0
- package/dist/lean/base.js +322 -0
- package/dist/lean/base.js.map +1 -0
- package/dist/lean/game.d.ts +19 -0
- package/dist/lean/game.d.ts.map +1 -0
- package/dist/lean/game.js +37 -0
- package/dist/lean/game.js.map +1 -0
- package/dist/lean/index.d.ts +4 -0
- package/dist/lean/index.d.ts.map +1 -0
- package/dist/lean/index.js +10 -0
- package/dist/lean/index.js.map +1 -0
- package/dist/lean/product.d.ts +4 -0
- package/dist/lean/product.d.ts.map +1 -0
- package/dist/lean/product.js +55 -0
- package/dist/lean/product.js.map +1 -0
- package/dist/materials/index.d.ts +1 -10
- package/dist/materials/index.d.ts.map +1 -1
- package/dist/materials/index.js +1 -6
- package/dist/materials/index.js.map +1 -1
- package/dist/materials/node.d.ts +4 -0
- package/dist/materials/node.d.ts.map +1 -0
- package/dist/materials/node.js +3 -0
- package/dist/materials/node.js.map +1 -0
- package/dist/physics/ArcadeCharacterController.d.ts +53 -0
- package/dist/physics/ArcadeCharacterController.d.ts.map +1 -0
- package/dist/physics/ArcadeCharacterController.js +98 -0
- package/dist/physics/ArcadeCharacterController.js.map +1 -0
- package/dist/physics/ArcadeVehicleTelemetry.d.ts +162 -0
- package/dist/physics/ArcadeVehicleTelemetry.d.ts.map +1 -0
- package/dist/physics/ArcadeVehicleTelemetry.js +363 -0
- package/dist/physics/ArcadeVehicleTelemetry.js.map +1 -0
- package/dist/physics/CharacterController.d.ts +52 -0
- package/dist/physics/CharacterController.d.ts.map +1 -1
- package/dist/physics/CharacterController.js +380 -7
- package/dist/physics/CharacterController.js.map +1 -1
- package/dist/physics/Constraint.d.ts +20 -4
- package/dist/physics/Constraint.d.ts.map +1 -1
- package/dist/physics/Constraint.js +34 -60
- package/dist/physics/Constraint.js.map +1 -1
- package/dist/physics/FightingCharacterController.d.ts +32 -0
- package/dist/physics/FightingCharacterController.d.ts.map +1 -0
- package/dist/physics/FightingCharacterController.js +76 -0
- package/dist/physics/FightingCharacterController.js.map +1 -0
- package/dist/physics/MeshBVH.d.ts +72 -0
- package/dist/physics/MeshBVH.d.ts.map +1 -0
- package/dist/physics/MeshBVH.js +244 -0
- package/dist/physics/MeshBVH.js.map +1 -0
- package/dist/physics/PathFollowDriver.d.ts +162 -0
- package/dist/physics/PathFollowDriver.d.ts.map +1 -0
- package/dist/physics/PathFollowDriver.js +163 -0
- package/dist/physics/PathFollowDriver.js.map +1 -0
- package/dist/physics/PhysicsDebugDraw.d.ts +40 -1
- package/dist/physics/PhysicsDebugDraw.d.ts.map +1 -1
- package/dist/physics/PhysicsDebugDraw.js +87 -17
- package/dist/physics/PhysicsDebugDraw.js.map +1 -1
- package/dist/physics/PhysicsWorld.d.ts +37 -18
- package/dist/physics/PhysicsWorld.d.ts.map +1 -1
- package/dist/physics/PhysicsWorld.js +231 -630
- package/dist/physics/PhysicsWorld.js.map +1 -1
- package/dist/physics/RacingLineProfile.d.ts +116 -0
- package/dist/physics/RacingLineProfile.d.ts.map +1 -0
- package/dist/physics/RacingLineProfile.js +181 -0
- package/dist/physics/RacingLineProfile.js.map +1 -0
- package/dist/physics/Raycast.d.ts +11 -0
- package/dist/physics/Raycast.d.ts.map +1 -1
- package/dist/physics/Raycast.js +62 -8
- package/dist/physics/Raycast.js.map +1 -1
- package/dist/physics/RigidBody.d.ts +16 -9
- package/dist/physics/RigidBody.d.ts.map +1 -1
- package/dist/physics/RigidBody.js +23 -75
- package/dist/physics/RigidBody.js.map +1 -1
- package/dist/physics/SurfaceQuery.d.ts +72 -0
- package/dist/physics/SurfaceQuery.d.ts.map +1 -0
- package/dist/physics/SurfaceQuery.js +89 -0
- package/dist/physics/SurfaceQuery.js.map +1 -0
- package/dist/physics/VehicleDynamics.d.ts +10 -0
- package/dist/physics/VehicleDynamics.d.ts.map +1 -1
- package/dist/physics/VehicleDynamics.js +31 -3
- package/dist/physics/VehicleDynamics.js.map +1 -1
- package/dist/physics/VehicleMotion.d.ts +125 -0
- package/dist/physics/VehicleMotion.d.ts.map +1 -0
- package/dist/physics/VehicleMotion.js +373 -0
- package/dist/physics/VehicleMotion.js.map +1 -0
- package/dist/physics/index.d.ts +62 -17
- package/dist/physics/index.d.ts.map +1 -1
- package/dist/physics/index.js +70 -17
- package/dist/physics/index.js.map +1 -1
- package/dist/physics/solverless-entry.d.ts +41 -0
- package/dist/physics/solverless-entry.d.ts.map +1 -0
- package/dist/physics/solverless-entry.js +40 -0
- package/dist/physics/solverless-entry.js.map +1 -0
- package/dist/physics/solverless.d.ts +37 -0
- package/dist/physics/solverless.d.ts.map +1 -0
- package/dist/physics/solverless.js +36 -0
- package/dist/physics/solverless.js.map +1 -0
- package/dist/physics/world-entry.d.ts +31 -0
- package/dist/physics/world-entry.d.ts.map +1 -0
- package/dist/physics/world-entry.js +30 -0
- package/dist/physics/world-entry.js.map +1 -0
- package/dist/physics/world.d.ts +18 -0
- package/dist/physics/world.d.ts.map +1 -0
- package/dist/physics/world.js +17 -0
- package/dist/physics/world.js.map +1 -0
- package/dist/physics-rapier/index.d.ts +169 -0
- package/dist/physics-rapier/index.d.ts.map +1 -0
- package/dist/physics-rapier/index.js +311 -0
- package/dist/physics-rapier/index.js.map +1 -0
- package/dist/product-studio/ProductLighting.d.ts.map +1 -1
- package/dist/product-studio/ProductLighting.js +34 -3
- package/dist/product-studio/ProductLighting.js.map +1 -1
- package/dist/rendering/ArchitecturalLighting.d.ts +35 -0
- package/dist/rendering/ArchitecturalLighting.d.ts.map +1 -0
- package/dist/rendering/ArchitecturalLighting.js +162 -0
- package/dist/rendering/ArchitecturalLighting.js.map +1 -0
- package/dist/rendering/ArchitecturalMaterialCatalog.d.ts +1 -1
- package/dist/rendering/ArchitecturalMaterialCatalog.d.ts.map +1 -1
- package/dist/rendering/ArchitecturalMaterialCatalog.js +1 -1
- package/dist/rendering/ArchitecturalMaterialCatalog.js.map +1 -1
- package/dist/rendering/ArchitecturalMeasurement.d.ts +27 -0
- package/dist/rendering/ArchitecturalMeasurement.d.ts.map +1 -0
- package/dist/rendering/ArchitecturalMeasurement.js +112 -0
- package/dist/rendering/ArchitecturalMeasurement.js.map +1 -0
- package/dist/rendering/CanonicalProductScene.d.ts +13 -0
- package/dist/rendering/CanonicalProductScene.d.ts.map +1 -0
- package/dist/rendering/CanonicalProductScene.js +78 -0
- package/dist/rendering/CanonicalProductScene.js.map +1 -0
- package/dist/rendering/CascadedShadowMaps.d.ts +1 -1
- package/dist/rendering/CascadedShadowMaps.d.ts.map +1 -1
- package/dist/rendering/CascadedShadowMaps.js +1 -1
- package/dist/rendering/CascadedShadowMaps.js.map +1 -1
- package/dist/rendering/DepthPass.d.ts +1 -1
- package/dist/rendering/DepthPass.d.ts.map +1 -1
- package/dist/rendering/DepthPass.js +2 -2
- package/dist/rendering/DepthPass.js.map +1 -1
- package/dist/rendering/EnvironmentBackgroundPass.d.ts +1 -1
- package/dist/rendering/EnvironmentBackgroundPass.d.ts.map +1 -1
- package/dist/rendering/EnvironmentBackgroundPass.js +2 -2
- package/dist/rendering/EnvironmentBackgroundPass.js.map +1 -1
- package/dist/rendering/EnvironmentPlatform.js +2 -2
- package/dist/rendering/EnvironmentPlatform.js.map +1 -1
- package/dist/rendering/ForwardPass.d.ts +1 -1
- package/dist/rendering/ForwardPass.d.ts.map +1 -1
- package/dist/rendering/ForwardPass.js +24 -10
- package/dist/rendering/ForwardPass.js.map +1 -1
- package/dist/rendering/Geometry.d.ts +2 -0
- package/dist/rendering/Geometry.d.ts.map +1 -1
- package/dist/rendering/Geometry.js +15 -0
- package/dist/rendering/Geometry.js.map +1 -1
- package/dist/rendering/InstancedPBRMaterial.js +1 -1
- package/dist/rendering/InstancedPBRMaterial.js.map +1 -1
- package/dist/rendering/InstancedUnlitMaterial.js +1 -1
- package/dist/rendering/InstancedUnlitMaterial.js.map +1 -1
- package/dist/rendering/Material.js +2 -2
- package/dist/rendering/Material.js.map +1 -1
- package/dist/rendering/MaterialBinding.js +4 -4
- package/dist/rendering/MaterialBinding.js.map +1 -1
- package/dist/rendering/MaterialInstance.js +2 -2
- package/dist/rendering/MaterialInstance.js.map +1 -1
- package/dist/rendering/MorphUnlitMaterial.js +1 -1
- package/dist/rendering/MorphUnlitMaterial.js.map +1 -1
- package/dist/rendering/NormalMappedPBRMaterial.js +1 -1
- package/dist/rendering/NormalMappedPBRMaterial.js.map +1 -1
- package/dist/rendering/OceanSurface.d.ts +62 -0
- package/dist/rendering/OceanSurface.d.ts.map +1 -0
- package/dist/rendering/OceanSurface.js +240 -0
- package/dist/rendering/OceanSurface.js.map +1 -0
- package/dist/rendering/PBRMaterial.d.ts.map +1 -1
- package/dist/rendering/PBRMaterial.js +3 -3
- package/dist/rendering/PBRMaterial.js.map +1 -1
- package/dist/rendering/PortableShaderMaterial.d.ts +60 -0
- package/dist/rendering/PortableShaderMaterial.d.ts.map +1 -0
- package/dist/rendering/PortableShaderMaterial.js +223 -0
- package/dist/rendering/PortableShaderMaterial.js.map +1 -0
- package/dist/rendering/PostProcessPass.d.ts.map +1 -1
- package/dist/rendering/PostProcessPass.js +30 -6
- package/dist/rendering/PostProcessPass.js.map +1 -1
- package/dist/rendering/ProceduralTexture.d.ts +27 -0
- package/dist/rendering/ProceduralTexture.d.ts.map +1 -0
- package/dist/rendering/ProceduralTexture.js +336 -0
- package/dist/rendering/ProceduralTexture.js.map +1 -0
- package/dist/rendering/ProductTurntable.d.ts +96 -0
- package/dist/rendering/ProductTurntable.d.ts.map +1 -0
- package/dist/rendering/ProductTurntable.js +639 -0
- package/dist/rendering/ProductTurntable.js.map +1 -0
- package/dist/rendering/RenderDevice.d.ts +30 -0
- package/dist/rendering/RenderDevice.d.ts.map +1 -1
- package/dist/rendering/RenderDevice.js.map +1 -1
- package/dist/rendering/Renderer.d.ts +3 -2
- package/dist/rendering/Renderer.d.ts.map +1 -1
- package/dist/rendering/Renderer.js +23 -9
- package/dist/rendering/Renderer.js.map +1 -1
- package/dist/rendering/RendererPostprocessPlan.js +4 -4
- package/dist/rendering/RendererPostprocessPlan.js.map +1 -1
- package/dist/rendering/ScreenSpaceLineMaterial.js +1 -1
- package/dist/rendering/ScreenSpaceLineMaterial.js.map +1 -1
- package/dist/rendering/ShaderChunks.d.ts.map +1 -1
- package/dist/rendering/ShaderChunks.js +81 -19
- package/dist/rendering/ShaderChunks.js.map +1 -1
- package/dist/rendering/ShaderLibrary.d.ts +2 -78
- package/dist/rendering/ShaderLibrary.d.ts.map +1 -1
- package/dist/rendering/ShaderLibrary.js +127 -793
- package/dist/rendering/ShaderLibrary.js.map +1 -1
- package/dist/rendering/ShaderLibraryCore.d.ts +100 -0
- package/dist/rendering/ShaderLibraryCore.d.ts.map +1 -0
- package/dist/rendering/ShaderLibraryCore.js +800 -0
- package/dist/rendering/ShaderLibraryCore.js.map +1 -0
- package/dist/rendering/ShaderModule.d.ts +1 -1
- package/dist/rendering/ShaderModule.d.ts.map +1 -1
- package/dist/rendering/ShaderModule.js +4 -2
- package/dist/rendering/ShaderModule.js.map +1 -1
- package/dist/rendering/ShadowPass.d.ts +1 -1
- package/dist/rendering/ShadowPass.d.ts.map +1 -1
- package/dist/rendering/ShadowPass.js +6 -4
- package/dist/rendering/ShadowPass.js.map +1 -1
- package/dist/rendering/SkinnedLitMaterial.js +1 -1
- package/dist/rendering/SkinnedLitMaterial.js.map +1 -1
- package/dist/rendering/SkinnedUnlitMaterial.js +1 -1
- package/dist/rendering/SkinnedUnlitMaterial.js.map +1 -1
- package/dist/rendering/SpaceEnvironment.d.ts +54 -0
- package/dist/rendering/SpaceEnvironment.d.ts.map +1 -0
- package/dist/rendering/SpaceEnvironment.js +116 -0
- package/dist/rendering/SpaceEnvironment.js.map +1 -0
- package/dist/rendering/TerrainHeightfield.d.ts +60 -0
- package/dist/rendering/TerrainHeightfield.d.ts.map +1 -0
- package/dist/rendering/TerrainHeightfield.js +239 -0
- package/dist/rendering/TerrainHeightfield.js.map +1 -0
- package/dist/rendering/TextureBinding.d.ts +14 -0
- package/dist/rendering/TextureBinding.d.ts.map +1 -1
- package/dist/rendering/TextureBinding.js +17 -0
- package/dist/rendering/TextureBinding.js.map +1 -1
- package/dist/rendering/TexturedPBRMaterial.js +1 -1
- package/dist/rendering/TexturedPBRMaterial.js.map +1 -1
- package/dist/rendering/TexturedUnlitMaterial.js +1 -1
- package/dist/rendering/TexturedUnlitMaterial.js.map +1 -1
- package/dist/rendering/UnlitMaterial.js +1 -1
- package/dist/rendering/UnlitMaterial.js.map +1 -1
- package/dist/rendering/VegetationFixtures.d.ts +1 -1
- package/dist/rendering/VegetationFixtures.d.ts.map +1 -1
- package/dist/rendering/VegetationFixtures.js +1 -1
- package/dist/rendering/VegetationFixtures.js.map +1 -1
- package/dist/rendering/VegetationScatter.d.ts +68 -0
- package/dist/rendering/VegetationScatter.d.ts.map +1 -0
- package/dist/rendering/VegetationScatter.js +241 -0
- package/dist/rendering/VegetationScatter.js.map +1 -0
- package/dist/rendering/VoxelWorld.d.ts +51 -0
- package/dist/rendering/VoxelWorld.d.ts.map +1 -0
- package/dist/rendering/VoxelWorld.js +183 -0
- package/dist/rendering/VoxelWorld.js.map +1 -0
- package/dist/rendering/Weather.d.ts +44 -0
- package/dist/rendering/Weather.d.ts.map +1 -0
- package/dist/rendering/Weather.js +140 -0
- package/dist/rendering/Weather.js.map +1 -0
- package/dist/rendering/WebGL2Device.d.ts +22 -0
- package/dist/rendering/WebGL2Device.d.ts.map +1 -1
- package/dist/rendering/WebGL2Device.js +134 -23
- package/dist/rendering/WebGL2Device.js.map +1 -1
- package/dist/rendering/WebGPUDevice.d.ts +19 -2
- package/dist/rendering/WebGPUDevice.d.ts.map +1 -1
- package/dist/rendering/WebGPUDevice.js +188 -9
- package/dist/rendering/WebGPUDevice.js.map +1 -1
- package/dist/rendering/index.d.ts +25 -32
- package/dist/rendering/index.d.ts.map +1 -1
- package/dist/rendering/index.js +35 -19
- package/dist/rendering/index.js.map +1 -1
- package/dist/rendering/lean/LeanProductRenderer.d.ts +29 -0
- package/dist/rendering/lean/LeanProductRenderer.d.ts.map +1 -0
- package/dist/rendering/lean/LeanProductRenderer.js +38 -0
- package/dist/rendering/lean/LeanProductRenderer.js.map +1 -0
- package/dist/rendering/lean/LeanProductionRenderer.d.ts +38 -0
- package/dist/rendering/lean/LeanProductionRenderer.d.ts.map +1 -0
- package/dist/rendering/lean/LeanProductionRenderer.js +88 -0
- package/dist/rendering/lean/LeanProductionRenderer.js.map +1 -0
- package/dist/rendering/lean-runtime.d.ts +18 -0
- package/dist/rendering/lean-runtime.d.ts.map +1 -0
- package/dist/rendering/lean-runtime.js +13 -0
- package/dist/rendering/lean-runtime.js.map +1 -0
- package/dist/rendering/postprocess/EffectComposer.d.ts.map +1 -1
- package/dist/rendering/postprocess/EffectComposer.js +1 -3
- package/dist/rendering/postprocess/EffectComposer.js.map +1 -1
- package/dist/rendering/production-runtime/PBRHDRPipeline.d.ts.map +1 -1
- package/dist/rendering/production-runtime/PBRHDRPipeline.js +5 -1
- package/dist/rendering/production-runtime/PBRHDRPipeline.js.map +1 -1
- package/dist/rendering/production-runtime/ProductionRendererTypes.d.ts +9 -0
- package/dist/rendering/production-runtime/ProductionRendererTypes.d.ts.map +1 -1
- package/dist/rendering/production-runtime/ProductionRendererTypes.js.map +1 -1
- package/dist/rendering/production-runtime/ProductionRuntimeRenderer.d.ts +5 -0
- package/dist/rendering/production-runtime/ProductionRuntimeRenderer.d.ts.map +1 -1
- package/dist/rendering/production-runtime/ProductionRuntimeRenderer.js +53 -5
- package/dist/rendering/production-runtime/ProductionRuntimeRenderer.js.map +1 -1
- package/dist/rendering/production-runtime/ProductionWebGL2Renderer.d.ts +10 -0
- package/dist/rendering/production-runtime/ProductionWebGL2Renderer.d.ts.map +1 -1
- package/dist/rendering/production-runtime/ProductionWebGL2Renderer.js +21 -2
- package/dist/rendering/production-runtime/ProductionWebGL2Renderer.js.map +1 -1
- package/dist/rendering/production-runtime/ProductionWebGPURenderer.d.ts.map +1 -1
- package/dist/rendering/production-runtime/ProductionWebGPURenderer.js +4 -1
- package/dist/rendering/production-runtime/ProductionWebGPURenderer.js.map +1 -1
- package/dist/rendering/webgpu-device-entry.d.ts +25 -0
- package/dist/rendering/webgpu-device-entry.d.ts.map +1 -0
- package/dist/rendering/webgpu-device-entry.js +24 -0
- package/dist/rendering/webgpu-device-entry.js.map +1 -0
- package/dist/rendering/webgpu.d.ts +25 -0
- package/dist/rendering/webgpu.d.ts.map +1 -0
- package/dist/rendering/webgpu.js +24 -0
- package/dist/rendering/webgpu.js.map +1 -0
- package/dist/scene/MathTypes.d.ts +1 -0
- package/dist/scene/MathTypes.d.ts.map +1 -1
- package/dist/scene/MathTypes.js +3 -0
- package/dist/scene/MathTypes.js.map +1 -1
- package/dist/scene/Renderable.d.ts +6 -0
- package/dist/scene/Renderable.d.ts.map +1 -1
- package/dist/scene/Renderable.js +8 -2
- package/dist/scene/Renderable.js.map +1 -1
- package/dist/scripting/index.d.ts +0 -16
- package/dist/scripting/index.d.ts.map +1 -1
- package/dist/scripting/index.js +0 -8
- package/dist/scripting/index.js.map +1 -1
- package/dist/workflows/production-runtime/ProductionExampleRuntime.d.ts +2 -2
- package/dist/workflows/production-runtime/ProductionExampleRuntime.d.ts.map +1 -1
- package/dist/workflows/production-runtime/ProductionExampleRuntime.js +2 -2
- package/dist/workflows/production-runtime/ProductionExampleRuntime.js.map +1 -1
- package/package.json +157 -40
- package/templates/cinematic-scene/node_modules/.vite/deps/_metadata.json +8 -0
- package/templates/cinematic-scene/node_modules/.vite/deps/package.json +3 -0
- package/templates/cinematic-scene/package.json +1 -1
- package/templates/cinematic-scene/test-results/.last-run.json +6 -0
- package/templates/cinematic-scene/test-results/route-health-Aura3D-cinematic-scene-reaches-ready-state/error-context.md +64 -0
- package/templates/mini-game/README.md +3 -2
- package/templates/mini-game/package.json +1 -1
- package/templates/mini-game/src/aura-assets.ts +1 -1
- package/templates/mini-game/src/main.ts +69 -141
- package/templates/product-viewer/README.md +7 -5
- package/templates/product-viewer/index.html +1 -1
- package/templates/product-viewer/node_modules/.vite/deps/_metadata.json +8 -0
- package/templates/product-viewer/node_modules/.vite/deps/package.json +3 -0
- package/templates/product-viewer/package.json +1 -1
- package/templates/product-viewer/src/aura-assets.ts +1 -1
- package/templates/product-viewer/src/main.ts +29 -23
|
@@ -2,19 +2,17 @@ import {
|
|
|
2
2
|
camera,
|
|
3
3
|
createAuraApp,
|
|
4
4
|
game,
|
|
5
|
-
lights,
|
|
6
5
|
material,
|
|
7
6
|
model,
|
|
8
7
|
primitives,
|
|
9
8
|
scene,
|
|
10
|
-
type
|
|
11
|
-
|
|
9
|
+
type AuraLeanNodeBuilder,
|
|
10
|
+
type LeanPlatformerEvent
|
|
11
|
+
} from "@aura3d/lean/game";
|
|
12
12
|
import { assets } from "./aura-assets";
|
|
13
13
|
|
|
14
14
|
declare global {
|
|
15
|
-
interface Window {
|
|
16
|
-
__AURA3D_MINI_GAME__?: MiniGameEvidence;
|
|
17
|
-
}
|
|
15
|
+
interface Window { __AURA3D_MINI_GAME__?: MiniGameEvidence }
|
|
18
16
|
}
|
|
19
17
|
|
|
20
18
|
interface MiniGameEvidence {
|
|
@@ -24,13 +22,9 @@ interface MiniGameEvidence {
|
|
|
24
22
|
readonly deaths: number;
|
|
25
23
|
readonly checkpointId: string;
|
|
26
24
|
readonly collected: readonly string[];
|
|
27
|
-
readonly player: {
|
|
28
|
-
readonly x: number;
|
|
29
|
-
readonly y: number;
|
|
30
|
-
readonly grounded: boolean;
|
|
31
|
-
};
|
|
25
|
+
readonly player: { readonly x: number; readonly y: number; readonly grounded: boolean };
|
|
32
26
|
readonly events: readonly string[];
|
|
33
|
-
readonly evidence:
|
|
27
|
+
readonly evidence: { readonly entry: string; readonly physics: string; readonly typedAssets: number };
|
|
34
28
|
}
|
|
35
29
|
|
|
36
30
|
const level = {
|
|
@@ -49,12 +43,8 @@ const level = {
|
|
|
49
43
|
{ id: "coin-02", x: 4.8, y: 1.45, value: 75, radius: 0.55 },
|
|
50
44
|
{ id: "coin-03", x: 9.8, y: 1.05, value: 100, radius: 0.55 }
|
|
51
45
|
],
|
|
52
|
-
hazards: [
|
|
53
|
-
|
|
54
|
-
],
|
|
55
|
-
checkpoints: [
|
|
56
|
-
{ id: "mid", x: 5.2, y: 0.92, radius: 0.8 }
|
|
57
|
-
],
|
|
46
|
+
hazards: [{ id: "spikes", x: 7.7, y: 0.42, width: 0.85, height: 0.24 }],
|
|
47
|
+
checkpoints: [{ id: "mid", x: 5.2, y: 0.92, radius: 0.8 }],
|
|
58
48
|
lowerBound: -2.4,
|
|
59
49
|
moveSpeed: 5.2,
|
|
60
50
|
jumpVelocity: 8,
|
|
@@ -70,119 +60,97 @@ const input = game.input({
|
|
|
70
60
|
down: ["KeyS", "ArrowDown"],
|
|
71
61
|
reset: ["KeyR"]
|
|
72
62
|
},
|
|
73
|
-
axes: {
|
|
74
|
-
moveX: { negative: "left", positive: "right" }
|
|
75
|
-
},
|
|
63
|
+
axes: { moveX: { negative: "left", positive: "right" } },
|
|
76
64
|
bufferMs: 140
|
|
77
65
|
});
|
|
78
|
-
|
|
79
66
|
const platformer = game.platformer(level);
|
|
80
|
-
const routeEvents
|
|
81
|
-
const
|
|
82
|
-
game.hud.score({ valuePath: "appState.score" }),
|
|
83
|
-
game.hud.lives({ valuePath: "appState.lives" }),
|
|
84
|
-
game.hud.objective({ valuePath: "appState.objective" }),
|
|
85
|
-
game.hud.checkpoint({ valuePath: "appState.checkpoint" }),
|
|
86
|
-
game.hud.eventLog({ valuePath: "appState.events" })
|
|
87
|
-
]);
|
|
88
|
-
|
|
89
|
-
const app = createAuraApp("#app", {
|
|
90
|
-
diagnostics: { overlay: true, performancePanel: true },
|
|
91
|
-
scene: buildScene()
|
|
92
|
-
});
|
|
93
|
-
|
|
67
|
+
const routeEvents: string[] = [];
|
|
68
|
+
const app = createAuraApp("#app", { scene: buildScene() });
|
|
94
69
|
const player = app.nodes.require("mini-player");
|
|
95
70
|
const lift = app.nodes.require("platform-lift");
|
|
96
71
|
const coins = level.collectibles.map((coin) => [coin.id, app.nodes.require(`coin-${coin.id}`)] as const);
|
|
97
72
|
const checkpoint = app.nodes.require("checkpoint-mid");
|
|
98
73
|
const goal = app.nodes.require("goal");
|
|
99
74
|
const hudRoot = createHud();
|
|
100
|
-
|
|
101
75
|
let objective = "Collect coins, avoid spikes, reach the goal";
|
|
102
76
|
|
|
103
|
-
app.onFrame((
|
|
77
|
+
app.onFrame((dt) => {
|
|
104
78
|
input.update(dt);
|
|
105
79
|
if (input.pressed("reset")) {
|
|
106
80
|
platformer.reset();
|
|
107
|
-
routeEvents.push(
|
|
81
|
+
routeEvents.push("reset:Route reset");
|
|
108
82
|
objective = "Collect coins, avoid spikes, reach the goal";
|
|
109
83
|
}
|
|
110
|
-
|
|
111
|
-
const
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
severity: event.type === "complete" || event.type === "collect" ? "success" : event.type === "hazard" || event.type === "fall" ? "warning" : "info",
|
|
125
|
-
frame: event.frame,
|
|
126
|
-
time: event.time
|
|
84
|
+
const moveX = input.axis("moveX");
|
|
85
|
+
const jumpPressed = input.buffered("jump");
|
|
86
|
+
const dashPressed = input.pressed("dash");
|
|
87
|
+
let remaining = Math.min(0.25, Math.max(0, dt));
|
|
88
|
+
let firstSubstep = true;
|
|
89
|
+
let state = platformer.snapshot();
|
|
90
|
+
do {
|
|
91
|
+
const substep = Math.min(0.05, remaining || 1 / 60);
|
|
92
|
+
state = platformer.step(substep, {
|
|
93
|
+
moveX,
|
|
94
|
+
jumpPressed: firstSubstep && jumpPressed,
|
|
95
|
+
jumpHeld: input.held("jump"),
|
|
96
|
+
dashPressed: firstSubstep && dashPressed,
|
|
97
|
+
fastFall: input.held("down")
|
|
127
98
|
});
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
99
|
+
for (const event of state.events) updateObjective(event);
|
|
100
|
+
remaining -= substep;
|
|
101
|
+
firstSubstep = false;
|
|
102
|
+
} while (remaining > 0.000_001);
|
|
132
103
|
|
|
133
|
-
player.setPosition(state.player.x, state.player.y + 0.
|
|
104
|
+
player.setPosition(state.player.x + 0.38, state.player.y + 0.5, 0);
|
|
134
105
|
lift.setPosition(level.movingPlatforms[0].x + level.movingPlatforms[0].width / 2, movingLiftY(state.time), 0);
|
|
135
106
|
for (const [id, node] of coins) node.setVisible(!state.collected.includes(id));
|
|
136
107
|
checkpoint.setVisible(!state.activatedCheckpoints.includes("mid"));
|
|
137
108
|
goal.setScale(state.status === "completed" ? [0.28, 1.08, 0.18] : [0.22, 0.92, 0.16]);
|
|
138
|
-
|
|
139
109
|
renderHud(state);
|
|
140
110
|
publishEvidence(state);
|
|
141
111
|
});
|
|
142
112
|
|
|
143
113
|
publishEvidence(platformer.snapshot());
|
|
144
114
|
renderHud(platformer.snapshot());
|
|
115
|
+
void app.ready().then(() => {
|
|
116
|
+
const diagnostics = app.diagnostics();
|
|
117
|
+
document.body.dataset.aura3dReady = "true";
|
|
118
|
+
document.body.dataset.aura3dRuntimeBackend = diagnostics.runtimeBackend;
|
|
119
|
+
document.body.dataset.aura3dDrawCalls = String(diagnostics.drawCalls);
|
|
120
|
+
(window as unknown as { __AURA3D_ROUTE_READY__?: unknown }).__AURA3D_ROUTE_READY__ = { ready: true, diagnostics };
|
|
121
|
+
}).catch((error: unknown) => {
|
|
122
|
+
document.body.dataset.aura3dError = error instanceof Error ? error.message : String(error);
|
|
123
|
+
});
|
|
145
124
|
|
|
146
125
|
function buildScene() {
|
|
147
|
-
const nodes:
|
|
148
|
-
|
|
149
|
-
.position(
|
|
150
|
-
|
|
151
|
-
.runtime(game.runtimeNode("mini-player", { tags: ["player", "typed-asset", "runtime"] })),
|
|
152
|
-
...level.platforms.map((platform) =>
|
|
153
|
-
primitives.box({ name: `${platform.id} platform`, material: material.neon({ color: "#62d8ef", emissive: "#62d8ef", emissiveIntensity: 0.18 }) })
|
|
154
|
-
.position(platform.x + platform.width / 2, platform.y + platform.height / 2, -0.05)
|
|
155
|
-
.scale([platform.width, platform.height, 0.22])
|
|
156
|
-
),
|
|
157
|
-
primitives.box({ name: "moving lift platform", material: material.neon({ color: "#b5f77d", emissive: "#b5f77d", emissiveIntensity: 0.35 }) })
|
|
126
|
+
const nodes: AuraLeanNodeBuilder[] = [
|
|
127
|
+
...level.platforms.map((platform) => primitives.box({ name: `${platform.id} platform`, material: material.pbr({ color: "#62d8ef", roughness: 0.28 }) })
|
|
128
|
+
.position(platform.x + platform.width / 2, platform.y + platform.height / 2, -0.05).scale([platform.width, platform.height, 0.22])),
|
|
129
|
+
primitives.box({ name: "moving lift platform", material: material.pbr({ color: "#b5f77d", roughness: 0.24 }) })
|
|
158
130
|
.position(level.movingPlatforms[0].x + level.movingPlatforms[0].width / 2, movingLiftY(0), 0)
|
|
159
|
-
.scale([level.movingPlatforms[0].width, level.movingPlatforms[0].height, 0.22])
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
.position(coin.x, coin.y, 0.02)
|
|
164
|
-
.scale(0.18)
|
|
165
|
-
.runtime(game.runtimeNode(`coin-${coin.id}`, { tags: ["coin", "runtime"] }))
|
|
166
|
-
),
|
|
167
|
-
primitives.box({ name: "hazard spikes", material: material.neon({ color: "#f06b7a", emissive: "#f06b7a", emissiveIntensity: 0.7 }) })
|
|
131
|
+
.scale([level.movingPlatforms[0].width, level.movingPlatforms[0].height, 0.22]).runtime("platform-lift"),
|
|
132
|
+
...level.collectibles.map((coin) => primitives.sphere({ name: `${coin.id} collectible`, material: material.pbr({ color: "#f7d76b", metallic: 0.35, roughness: 0.22 }) })
|
|
133
|
+
.position(coin.x, coin.y, 0.02).scale(0.18).runtime(`coin-${coin.id}`)),
|
|
134
|
+
primitives.box({ name: "hazard spikes", material: material.pbr({ color: "#f06b7a", roughness: 0.2 }) })
|
|
168
135
|
.position(level.hazards[0].x + level.hazards[0].width / 2, level.hazards[0].y + level.hazards[0].height / 2, 0.05)
|
|
169
136
|
.scale([level.hazards[0].width, level.hazards[0].height, 0.2]),
|
|
170
|
-
primitives.box({ name: "checkpoint marker", material: material.
|
|
171
|
-
.position(level.checkpoints[0].x, level.checkpoints[0].y + 0.42, 0.08)
|
|
172
|
-
|
|
173
|
-
.
|
|
174
|
-
primitives.box({ name: "finish portal", material: material.neon({ color: "#ffad57", emissive: "#ffad57", emissiveIntensity: 0.82 }) })
|
|
175
|
-
.position(level.finish.x, level.finish.y + 0.7, 0.08)
|
|
176
|
-
.scale([0.22, 0.92, 0.16])
|
|
177
|
-
.runtime(game.runtimeNode("goal", { tags: ["finish", "runtime"] }))
|
|
137
|
+
primitives.box({ name: "checkpoint marker", material: material.pbr({ color: "#9df59e", roughness: 0.2 }) })
|
|
138
|
+
.position(level.checkpoints[0].x, level.checkpoints[0].y + 0.42, 0.08).scale([0.14, 0.85, 0.14]).runtime("checkpoint-mid"),
|
|
139
|
+
primitives.box({ name: "finish portal", material: material.pbr({ color: "#ffad57", metallic: 0.2, roughness: 0.18 }) })
|
|
140
|
+
.position(level.finish.x, level.finish.y + 0.7, 0.08).scale([0.22, 0.92, 0.16]).runtime("goal")
|
|
178
141
|
];
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
.background("#071015")
|
|
142
|
+
return scene().background("#071015")
|
|
143
|
+
.add(model(assets.playerModel, { name: "typed mini-game player" }).position(level.start.x + 0.38, level.start.y + 0.5, 0).scale(0.28).runtime("mini-player"))
|
|
182
144
|
.addMany(nodes)
|
|
183
|
-
.
|
|
184
|
-
|
|
185
|
-
|
|
145
|
+
.camera(camera.perspective({ position: [6.1, 3.8, 10.4], target: [6.1, 0.82, 0], fov: 46 }));
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
function updateObjective(event: LeanPlatformerEvent): void {
|
|
149
|
+
routeEvents.push(event.id ? `${event.type}:${event.id}` : event.type);
|
|
150
|
+
if (routeEvents.length > 16) routeEvents.shift();
|
|
151
|
+
if (event.type === "checkpoint") objective = "Checkpoint reached. Finish the route.";
|
|
152
|
+
if (event.type === "complete") objective = "Finished. Press R to replay.";
|
|
153
|
+
if (event.type === "respawn") objective = "Respawned. Take the safer route.";
|
|
186
154
|
}
|
|
187
155
|
|
|
188
156
|
function movingLiftY(time: number): number {
|
|
@@ -193,52 +161,16 @@ function movingLiftY(time: number): number {
|
|
|
193
161
|
function createHud(): HTMLElement {
|
|
194
162
|
const root = document.createElement("aside");
|
|
195
163
|
root.id = "mini-game-hud";
|
|
196
|
-
root.style.cssText =
|
|
197
|
-
"position:absolute",
|
|
198
|
-
"left:16px",
|
|
199
|
-
"top:16px",
|
|
200
|
-
"z-index:5",
|
|
201
|
-
"min-width:260px",
|
|
202
|
-
"font:600 13px/1.35 Inter, system-ui, sans-serif",
|
|
203
|
-
"color:#f5fbff",
|
|
204
|
-
"background:rgba(3,9,14,0.78)",
|
|
205
|
-
"border:1px solid rgba(125,220,235,0.34)",
|
|
206
|
-
"border-radius:8px",
|
|
207
|
-
"padding:12px",
|
|
208
|
-
"pointer-events:none"
|
|
209
|
-
].join(";");
|
|
164
|
+
root.style.cssText = "position:absolute;left:16px;top:16px;z-index:5;min-width:260px;font:600 13px/1.35 Inter,system-ui,sans-serif;color:#f5fbff;background:rgba(3,9,14,.78);border:1px solid rgba(125,220,235,.34);border-radius:8px;padding:12px;pointer-events:none";
|
|
210
165
|
document.body.append(root);
|
|
211
166
|
return root;
|
|
212
167
|
}
|
|
213
168
|
|
|
214
169
|
function renderHud(state: ReturnType<typeof platformer.snapshot>): void {
|
|
215
|
-
hudRoot.innerHTML =
|
|
216
|
-
`<strong>Aura3D Mini Game</strong>`,
|
|
217
|
-
`<div>Score ${state.score} | Lives ${state.lives} | Deaths ${state.deaths}</div>`,
|
|
218
|
-
`<div>Checkpoint ${state.checkpointId}</div>`,
|
|
219
|
-
`<div>${objective}</div>`,
|
|
220
|
-
`<div>Move A/D or arrows. Jump Space. Dash Shift. Reset R.</div>`
|
|
221
|
-
].join("");
|
|
170
|
+
hudRoot.innerHTML = `<strong>Aura3D Mini Game</strong><div>Score ${state.score} | Lives ${state.lives} | Deaths ${state.deaths}</div><div>Checkpoint ${state.checkpointId}</div><div>${objective}</div><div>Move A/D or arrows. Jump Space. Dash Shift. Reset R.</div>`;
|
|
222
171
|
}
|
|
223
172
|
|
|
224
173
|
function publishEvidence(state: ReturnType<typeof platformer.snapshot>): void {
|
|
225
|
-
const evidence = app.evidence({
|
|
226
|
-
input,
|
|
227
|
-
events: routeEvents,
|
|
228
|
-
hud,
|
|
229
|
-
appState: {
|
|
230
|
-
score: state.score,
|
|
231
|
-
lives: state.lives,
|
|
232
|
-
objective,
|
|
233
|
-
checkpoint: state.checkpointId,
|
|
234
|
-
events: routeEvents.events().map((event: { readonly label: string }) => event.label)
|
|
235
|
-
},
|
|
236
|
-
assets: {
|
|
237
|
-
typedAssets: Object.keys(assets).length,
|
|
238
|
-
missingAssets: []
|
|
239
|
-
},
|
|
240
|
-
source: { expectsGame: true }
|
|
241
|
-
});
|
|
242
174
|
window.__AURA3D_MINI_GAME__ = {
|
|
243
175
|
status: state.status,
|
|
244
176
|
frame: state.frame,
|
|
@@ -246,12 +178,8 @@ function publishEvidence(state: ReturnType<typeof platformer.snapshot>): void {
|
|
|
246
178
|
deaths: state.deaths,
|
|
247
179
|
checkpointId: state.checkpointId,
|
|
248
180
|
collected: state.collected,
|
|
249
|
-
player: {
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
grounded: state.player.grounded
|
|
253
|
-
},
|
|
254
|
-
events: routeEvents.events().map((event: { readonly label: string }) => event.label),
|
|
255
|
-
evidence
|
|
181
|
+
player: { x: state.player.x, y: state.player.y, grounded: state.player.grounded },
|
|
182
|
+
events: [...routeEvents],
|
|
183
|
+
evidence: { entry: "@aura3d/lean/game", physics: "solver-free deterministic arcade", typedAssets: Object.keys(assets).length }
|
|
256
184
|
};
|
|
257
185
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Aura3D Product Viewer
|
|
2
2
|
|
|
3
|
-
Agent-friendly product scene starter using the public `@aura3d/
|
|
3
|
+
Agent-friendly product scene starter using the public `@aura3d/lean/product`
|
|
4
|
+
API.
|
|
4
5
|
|
|
5
6
|
```bash
|
|
6
7
|
npm install
|
|
@@ -9,8 +10,9 @@ npx @aura3d/cli@latest assets add ./assets/product.glb --name product
|
|
|
9
10
|
npm run test
|
|
10
11
|
```
|
|
11
12
|
|
|
12
|
-
Edit `src/main.ts` to change camera, material,
|
|
13
|
+
Edit `src/main.ts` to change the camera, material, studio environment, plinth,
|
|
14
|
+
typed product, and diagnostics. Do not
|
|
13
15
|
invent asset paths; after `assets add`, use `assets.product` from
|
|
14
|
-
`src/aura-assets.ts`. The default scene
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
`src/aura-assets.ts`. The default scene composes the product, plinth, floor,
|
|
17
|
+
studio environment, and orbit interaction directly through the lean product
|
|
18
|
+
entry. It does not install physics, navigation, editor, or Node-media systems.
|
|
@@ -1,27 +1,33 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
camera,
|
|
3
|
+
createAuraApp,
|
|
4
|
+
environments,
|
|
5
|
+
interactions,
|
|
6
|
+
material,
|
|
7
|
+
model,
|
|
8
|
+
primitives,
|
|
9
|
+
scene
|
|
10
|
+
} from "@aura3d/lean/product";
|
|
2
11
|
import { assets } from "./aura-assets";
|
|
3
12
|
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"product is centered, normalized, and seated on the plinth",
|
|
15
|
-
"softboxes, reflection cards, and contact shadow shape the asset",
|
|
16
|
-
"turntable and orbit cues are visible without reading diagnostics"
|
|
17
|
-
],
|
|
18
|
-
negativeCriteria: [
|
|
19
|
-
"Do not use string asset ids or invented product URLs",
|
|
20
|
-
"Do not ship a lone GLB without plinth, contact, fit, and rotation evidence"
|
|
21
|
-
]
|
|
22
|
-
} as const);
|
|
13
|
+
const productScene = scene()
|
|
14
|
+
.background("#071018")
|
|
15
|
+
.add(primitives.plane({ name: "studio floor", material: material.pbr({ color: "#22313b", roughness: 0.32, metallic: 0.08 }) })
|
|
16
|
+
.position(0, -0.05, -0.62).scale([6.2, 1, 5.2]))
|
|
17
|
+
.add(primitives.box({ name: "product plinth", material: material.clearcoatPaint({ color: "#dce7ed", roughness: 0.2, metallic: 0.18 }) })
|
|
18
|
+
.position(0, 0.06, -0.62).scale([1.82, 0.18, 1.4]))
|
|
19
|
+
.add(model(assets.product, { name: "typed studio product" }).position(0, 1.08, -0.62).scale(0.66))
|
|
20
|
+
.add(environments.studio())
|
|
21
|
+
.add(interactions.orbit())
|
|
22
|
+
.camera(camera.perspective({ position: [2.65, 2.05, 4.55], target: [0, 1.02, -0.62], fov: 32 }));
|
|
23
23
|
|
|
24
|
-
createAuraApp("#app", {
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
const app = createAuraApp("#app", { scene: productScene });
|
|
25
|
+
void app.ready().then(() => {
|
|
26
|
+
const diagnostics = app.diagnostics();
|
|
27
|
+
document.body.dataset.aura3dReady = "true";
|
|
28
|
+
document.body.dataset.aura3dRuntimeBackend = diagnostics.runtimeBackend;
|
|
29
|
+
document.body.dataset.aura3dDrawCalls = String(diagnostics.drawCalls);
|
|
30
|
+
(window as unknown as { __AURA3D_ROUTE_READY__?: unknown }).__AURA3D_ROUTE_READY__ = { ready: true, diagnostics };
|
|
31
|
+
}).catch((error: unknown) => {
|
|
32
|
+
document.body.dataset.aura3dError = error instanceof Error ? error.message : String(error);
|
|
27
33
|
});
|