Skip to content

flutter_scene 0.20.0

Choose a tag to compare

@bdero bdero released this 27 Jul 09:14
  • The .fscene document core (document model, stable ids, JSON/binary serialization, prefab composition, diffing) moved to the new pure-Dart scene package; flutter_scene re-exports it, so existing imports are unchanged.
  • Fixed the web backend dropping every uniform-block draw on drivers that pad uniform block sizes (Mesa on Linux).
  • New declarative scene API. SceneView.declarative, SceneNode, SceneMesh, and SceneModel describe scenes in build(), with bridges to and from the imperative API, which is unchanged.
  • Declarative animation control via SceneModel.animations (SceneAnimationSpec), plus cached model templates so equal sources load once and share GPU resources.
  • KHR_materials_variants support in both import paths via MaterialsVariantsComponent, declaratively via SceneModel.variant, with a new Configurator example.
  • Fixed animation blending collapsing rigs with mirrored bones.
  • Fixed slerp taking the long arc when interpolating between quaternions in opposite hemispheres.
  • Automatic exposure (eye adaptation) via Scene.autoExposure, metered entirely on the GPU.
  • Imported materials keep their source names via the new Material.name.
  • Fixed cloned skinned meshes all drawing with the last-updated skeleton.
  • Physics backends now implement the pure PhysicsSimulation contract from the scene package and no longer depend on Flutter, so the same simulations run under plain dart run.
  • One generic physics component layer for every backend. PhysicsWorld(RapierWorld()), plus concrete RigidBody, Collider, the joint components, and KinematicCharacterController; the backend-specific component classes are gone.
  • Backend-specific physics features stay first-class. RigidBody.handle, Collider.handles, and Joint.handle are public, so downcasting PhysicsWorld.simulation to a backend reaches capabilities beyond the shared contract, and the components subclass for typed backend components.
  • Physics is now an optional sub-barrel. Import package:flutter_scene/physics.dart (or package:scene/physics.dart for the pure contract); the core package:flutter_scene/scene.dart no longer carries physics types.
  • BasicSimulation (queries and triggers, pure Dart) replaces BasicPhysicsWorld/BasicCollider/BasicKinematicBody.
  • Colliders without a sibling RigidBody now attach as static geometry instead of throwing.
  • Spatial audio through an optional pluggable-backend contract. AudioEngine (implemented by flutter_scene_soloud and flutter_scene_fmod), with AudioListener, AudioSource/ClipAudioSource, AudioBus, and distance attenuation. Import package:flutter_scene/audio.dart; it is not in the core barrel.
  • CPU particle systems are now public. ParticleEmitterComponent (camera-facing billboards), MeshParticleEmitterComponent (instanced 3D debris), and TrailComponent (ribbon trails), all driven by a ParticleSystem built from emitter shapes, spawners, over-life distributions, and a module stack (acceleration, drag, size/color-over-life, rotation, flipbook, curl-noise turbulence), with new Particles and Explosion examples.
  • Sprites and billboard particles depth-test against opaque geometry again, so closer objects occlude them.