Files
OrbitalCamera/README.md
2026-01-05 23:46:44 +05:00

41 lines
1.2 KiB
Markdown

```
// Public API
function isContolsDisabled() { return isContolsDisabled }
function getTargetVob() { return targetVob }
function getTargetNode() { return targetNode }
function getXAxisSensitivity() { return yawSpeed }
function getYAxisSensitivity() { return pitchSpeed }
function getZoomSensitivity() { return zoomSpeed }
function isYAxisInverted() { return isPitchInverted }
function getMinDistance() { return minDistance }
function getMaxDistance() { return maxDistance }
function getCurrentDistance() { return distance }
function setTargetVob(vob, node = "") {
targetVob = vob
targetNode = node
targetVobMatrix = targetVob.getTrafoModelNodeToWorld(targetNode)
currentMatrix = Camera.targetVob.matrix
currentVisualAlpha = targetVob.visualAlpha
maxVisualAlpha = currentVisualAlpha
}
function setControlsDisabled(value) { isControlsDisabled = value }
function setXAxisSensitivity(value) { yawSpeed = value }
function setYAxisSensitivity(value) { pitchSpeed = value }
function setZoomSensitivity(value) { zoomSpeed = value }
function setYAxisInverted(value) { isPitchInverted = value }
function setMinDistance(value) { minDistance = clamp(value, value, maxDistance) }
function setMaxDistance(value) { maxDistance = clamp(value, minDistance, value) }
```