MCPcopy
hub / github.com/aframevr/aframe / loadTexture

Function loadTexture

src/components/text.js:420–429  ·  view source on GitHub ↗

* @returns {Promise}

(src)

Source from the content-addressed store, hash-verified

418 * @returns {Promise}
419 */
420function loadTexture (src) {
421 return new Promise(function (resolve, reject) {
422 new THREE.ImageLoader().load(src, function (image) {
423 resolve(image);
424 }, undefined, function () {
425 error('Error loading font image', src);
426 reject(null);
427 });
428 });
429}
430
431function createShader (el, shaderName, data) {
432 var shader;

Callers 1

text.jsFile · 0.85

Calls 1

loadMethod · 0.45

Tested by

no test coverage detected