ThirdPersonPerspective
@zylem/game-lib / core / ThirdPersonPerspective
Class: ThirdPersonPerspective
Defined in: packages/game-lib/src/lib/camera/perspectives/third-person-perspective.ts:79
Third-person 3D perspective.
- 0 targets: returns a static pose behind the origin.
- 1 target: camera positioned behind and above the target, looking at it.
- 2+ targets: weighted-centroid framing with dynamic distance.
Implements
Constructors
Constructor
new ThirdPersonPerspective(
options?):ThirdPersonPerspective
Defined in: packages/game-lib/src/lib/camera/perspectives/third-person-perspective.ts:96
Parameters
options?
Returns
ThirdPersonPerspective
Properties
defaults
readonlydefaults:object
Defined in: packages/game-lib/src/lib/camera/perspectives/third-person-perspective.ts:87
Slightly looser than the previous 0.15 to compose better with the trailing-delay follow: the trail absorbs short, fast moves and the damping smooths the rest.
damping
damping:
number=0.12
Implementation of
id
readonlyid:"third-person"='third-person'
Defined in: packages/game-lib/src/lib/camera/perspectives/third-person-perspective.ts:80
Implementation of
projection
readonlyprojection:"perspective"
Defined in: packages/game-lib/src/lib/camera/perspectives/third-person-perspective.ts:81
Projection the Three.js camera must use. When omitted, the runtime keeps a perspective camera. Orthographic perspectives set this so a runtime switch replaces the camera instance.
Implementation of
Methods
getBasePose()
getBasePose(
ctx):CameraPose
Defined in: packages/game-lib/src/lib/camera/perspectives/third-person-perspective.ts:107
Compute the raw desired pose for this frame given the current context.