* Return a three.js constant determining blending * * @param {string} [blending=normal] - `none`, additive`, `subtractive`,`multiply` or `normal`. * @returns {number}
(blending)
| 228 | * @returns {number} |
| 229 | */ |
| 230 | function 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. |