sure up test (#3220)

This commit is contained in:
Kurt Hutten
2024-08-01 22:30:08 +10:00
committed by GitHub
parent 4006c28479
commit b8c623e1ec
2 changed files with 11 additions and 7 deletions

View File

@ -186,6 +186,7 @@ export function useSetupEngineManager(
}
function getDimensions(streamWidth?: number, streamHeight?: number) {
const factorOf = 4
const maxResolution = 2000
const width = streamWidth ? streamWidth : 0
const height = streamHeight ? streamHeight : 0
@ -193,7 +194,7 @@ function getDimensions(streamWidth?: number, streamHeight?: number) {
Math.min(maxResolution / width, maxResolution / height),
1.0
)
const quadWidth = Math.round((width * ratio) / 4) * 4
const quadHeight = Math.round((height * ratio) / 4) * 4
const quadWidth = Math.round((width * ratio) / factorOf) * factorOf
const quadHeight = Math.round((height * ratio) / factorOf) * factorOf
return { width: quadWidth, height: quadHeight }
}