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

Function createShader

src/components/text.js:431–450  ·  view source on GitHub ↗
(el, shaderName, data)

Source from the content-addressed store, hash-verified

429}
430
431function createShader (el, shaderName, data) {
432 var shader;
433 var shaderObject;
434
435 // Set up Shader.
436 shaderObject = new shaders[shaderName].Shader();
437 shaderObject.el = el;
438 shaderObject.init(data);
439 shaderObject.update(data);
440
441 // Get material.
442 shader = shaderObject.material;
443 // Apparently, was not set on `init` nor `update`.
444 shader.transparent = data.transparent;
445
446 return {
447 material: shader,
448 shader: shaderObject
449 };
450}
451
452/**
453 * Determine wrap pixel count. Either specified or by experimental fudge factor.

Callers 1

text.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected