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

Function parseBlending

src/components/material.js:230–248  ·  view source on GitHub ↗

* Return a three.js constant determining blending * * @param {string} [blending=normal] - `none`, additive`, `subtractive`,`multiply` or `normal`. * @returns {number}

(blending)

Source from the content-addressed store, hash-verified

228 * @returns {number}
229 */
230function parseBlending (blending) {
231 switch (blending) {
232 case 'none': {
233 return THREE.NoBlending;
234 }
235 case 'additive': {
236 return THREE.AdditiveBlending;
237 }
238 case 'subtractive': {
239 return THREE.SubtractiveBlending;
240 }
241 case 'multiply': {
242 return THREE.MultiplyBlending;
243 }
244 default: {
245 return THREE.NormalBlending;
246 }
247 }
248}
249
250/**
251 * Dispose of material from memory and unsubscribe material from scene updates like fog.

Callers 1

material.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected