Methods
-
<static> adaptContext(viewport, focus, context, desiredScale)
-
Adjusts the camera transform to ensure focus+context conditions are met for a given lens
Parameters:
Name Type Description viewport
Viewport The current viewport
focus
Focus The lens object
context
Transform The camera transform to be updated
desiredScale
number Target scale for the camera transform
- Source:
-
<static> pan(viewport, focus, context, delta, imageSize)
-
Distributes a pan operation between lens movement and camera transform to maintain focus+context
Parameters:
Name Type Description viewport
Viewport The current viewport
focus
Focus The lens object to be updated
context
Transform The camera transform to be updated
delta
Object Pan amount in dataset pixels
Properties
Name Type Description x
number Horizontal pan amount
y
number Vertical pan amount
imageSize
Object Dataset dimensions
Properties
Name Type Description w
number Dataset width
h
number Dataset height
- Source:
-
<static> scale(camera, focus, context, dz)
-
Distributes a scale operation between lens radius and camera zoom to maintain focus+context
Parameters:
Name Type Description camera
Camera The camera object containing viewport and zoom constraints
focus
Focus The lens object to be updated
context
Transform The camera transform to be updated
dz
number Scale factor to be applied (multiplier)
- Source: