MCPcopy Create free account
hub / github.com/microsoft/SandDance / getProjectionMatrix

Function getProjectionMatrix

docs/app/js/sanddance-app.js:80419–80423  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

80417 };
80418}
80419function getProjectionMatrix(options) {
80420 const { fov , aspect , near , far } = getProjectionParameters(options);
80421 const projectionMatrix = _mat4.perspective([], fov, aspect, near, far);
80422 return projectionMatrix;
80423}
80424function altitudeToFovy(altitude) {
80425 return 2 * Math.atan(0.5 / altitude) * RADIANS_TO_DEGREES;
80426}

Callers 1

OrthographicViewport1Function · 0.70

Calls 3

getProjectionParametersFunction · 0.70
perspectiveMethod · 0.45
orthoMethod · 0.45

Tested by

no test coverage detected