MCPcopy
hub / github.com/stemkoski/stemkoski.github.com / loadTexture

Function loadTexture

MathBox/mathbox-bundle.js:13356–13385  ·  view source on GitHub ↗
( i )

Source from the content-addressed store, hash-verified

13354 var loaded = 0;
13355
13356 var loadTexture = function ( i ) {
13357
13358 loader.load( url[ i ], function ( buffer ) {
13359
13360 var texDatas = scope._parser( buffer, true );
13361
13362 images[ i ] = {
13363 width: texDatas.width,
13364 height: texDatas.height,
13365 format: texDatas.format,
13366 mipmaps: texDatas.mipmaps
13367 };
13368
13369 loaded += 1;
13370
13371 if ( loaded === 6 ) {
13372
13373 if (texDatas.mipmapCount == 1)
13374 texture.minFilter = THREE.LinearFilter;
13375
13376 texture.format = texDatas.format;
13377 texture.needsUpdate = true;
13378
13379 if ( onLoad ) onLoad( texture );
13380
13381 }
13382
13383 } );
13384
13385 };
13386
13387 for ( var i = 0, il = url.length; i < il; ++ i ) {
13388

Callers 1

mathbox-bundle.jsFile · 0.85

Calls 1

onLoadFunction · 0.50

Tested by

no test coverage detected