flutter3d_camera 1.0.0-rc.1
flutter3d_camera: ^1.0.0-rc.1 copied to clipboard
Virtual cameras for flutter3d games: priorities and blends, framing by targets with dead zones and damping, group shots, keeping clear of walls, and shake seeded by the step.
1.0.0-rc.1 #
-
A cutscene's picture is read here.
SequenceView(new) is made once for aSequenceand turns its keys into what a frame shows:cameraOfputs the eye and the point it looks at, in metres, on curves through the keys and returns the vertical field of view in radians,fadeOfsays how dark the screen is from 0 to 1, andsubtitleOfwhat is being said, each for the step aSequencePlayerreached andalphaof the way to the next. An editor scrubbing a sequence without a player asks by the step withcameraAt,fadeAtandsubtitleAt. The player stays influtter3d_simwith the step, the signals and the actors it directs, which is all a replay or a server reads of a cutscene. -
Breaking: a framing takes one
FramingStep.CameraFraming.frametakes aFramingStep(new) with the shot to write into anddt, which the camera owns and sets before every frame, so a frame allocates none and a minor can hand a framing more without breaking one written against 1.0. -
Breaking:
CameraRig,PhotoCameraandRigSettingsare this package's, moved fromflutter3d_sim, which no longer exports them: a camera places a view and no step reads it, so the rig sits beside the virtual cameras that turn it. Importpackage:flutter3d_camera/flutter3d_camera.dart;dart run flutter3d_build:migrateadds the dependency and the import. -
Breaking: the package is
flutter3d_camera, renamed fromflutter3d_addon_camerabefore it was ever published, and its library ispackage:flutter3d_camera/flutter3d_camera.dart.dart run flutter3d_build:migratemoves the dependency and the imports. The plugin's id isflutter3d_cameratoo, where it wasflutter3d_addon_camera; a run recorded under the old id reads as naming the new one. -
Breaking: a field of view is
fovY, in radians:CameraShot.fovand every framing'sfovarefovY, andbaseFovandfovPerSpeedarebaseFovYandfovYPerSpeed(docs/CONTRACTS.md). -
Breaking: American spelling in identifiers, as Flutter and Dart use.
recentreisrecenter,recentreAboveisrecenterAbove,travellingistraveling. Only the Dart names changed: a file keeps the keys it was written with, anddart fixcarries the renames. -
One camera system, many cameras.
VirtualCamerais a framing carried out by the engine'sCameraRig, with a priority and an on switch.CameraDirectormakes the highest enabled one live, a tie going to the one switched on last, and blends to the next byCameraBlend: a cut, an ease, a straight line, or a curve of the game's own, chosen per pair of cameras, per camera, or by default. A blend interrupted halfway goes on from the shot on screen rather than jumping back. -
Framing by targets.
FollowFramingandLookAtFramingwith dead zones and per-axis damping, andGroupFraming, which keeps several weighted subjects in the picture by fitting them to the narrower field of view. -
The genres' cameras, as presets.
ChaseFraming,OrbitFraming,OverheadFramingandFirstPersonFramingare the racing, platformer, strategy and shooter cameras with their numbers and arithmetic unchanged; the four genre packages now build their cameras on them. -
Clear of the walls, blended too. Each camera's rig keeps itself out of the walls; the director does the same for a blended shot, which can pass through a wall neither camera is in.
-
Impulse shake seeded by the step.
ImpulseShakeadds decaying gradient noise, nought at the moment of the blow, felt less with distance and scaled by the player's motion setting. Its noise is chosen by the step and the event's place in it, so a replay shakes the way the run did. -
A plugin in the frame phase
camera.CameraPluginplaces the director once a displayed frame and shakes it from events on the bus's frame channel through anImpulseTable, as a view plugin on plugin API 1.0. -
OrbitFraming'spitchandyaware ordinary parameters, copied into private fields, not private parameters (this._pitch), which put a private name in the API and needed the newest language version to call. Callers pass them as before.