MCPcopy Index your code
hub / github.com/aframevr/aframe / computeWidth

Function computeWidth

src/components/text.js:456–458  ·  view source on GitHub ↗

* Determine wrap pixel count. Either specified or by experimental fudge factor. * Note that experimental factor will never be correct for variable width fonts.

(wrapPixels, wrapCount, widthFactor)

Source from the content-addressed store, hash-verified

454 * Note that experimental factor will never be correct for variable width fonts.
455 */
456function computeWidth (wrapPixels, wrapCount, widthFactor) {
457 return wrapPixels || ((0.5 + wrapCount) * widthFactor);
458}
459
460/**
461 * Compute default font width factor to use.

Callers 1

text.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected