camera_zoom
Zooms by factor (< 1 zooms in) about at (default the target), which stays under the same pixel. Stops at the precision floor and the scene-relative ceiling.
Usage
surface.execute('camera_zoom', { factor, at?, animate?, durationMs?, easing?, from?, viewport? })Parameters
factornumberatobjectf64 world-space point or direction
animatebooleandurationMsnumbereasing"linear" | "cubic-in" | "cubic-out" | "cubic-in-out"from"goal" | "live"viewportstringthe slot (viewport id); the first by default
Returns
object with eye, target, up, projection, transition, in the ok: true envelope.
{
"type": "object",
"properties": {
"eye": {
"type": "object",
"description": "f64 world-space point or direction",
"properties": {
"x": {
"type": "number"
},
"y": {
"type": "number"
},
"z": {
"type": "number"
}
},
"required": [
"x",
"y",
"z"
]
},
"target": {
"type": "object",
"description": "f64 world-space point or direction",
"properties": {
"x": {
"type": "number"
},
"y": {
"type": "number"
},
"z": {
"type": "number"
}
},
"required": [
"x",
"y",
"z"
]
},
"up": {
"type": "object",
"description": "f64 world-space point or direction",
"properties": {
"x": {
"type": "number"
},
"y": {
"type": "number"
},
"z": {
"type": "number"
}
},
"required": [
"x",
"y",
"z"
]
},
"projection": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"perspective",
"orthographic"
]
},
"fovYDeg": {
"type": "number"
},
"height": {
"type": "number"
}
},
"required": [
"kind"
]
},
"transition": {
"type": "integer",
"minimum": 1
}
},
"required": [
"eye",
"target",
"up",
"projection"
]
}