123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <!DOCTYPE html>
- <html lang="it">
- <head>
- <meta charset="utf-8" />
- <base href="../../../" />
- <script src="page.js"></script>
- <link type="text/css" rel="stylesheet" href="page.css" />
- </head>
- <body>
- <h1>Costanti di equazioni di blending personalizzate</h1>
- <p>
- Funzionano con tutti i tipi di materiale. Impostare prima la modalità blending del materiale
- su THREE.CustomBlending, poi impostare l'equazione di blending desiderata, il fattore sorgente
- (Source Factor) e quello di destinazione (Destination Factor).
- </p>
- <h2>Codice di Esempio</h2>
- <code>
- const material = new THREE.MeshBasicMaterial( {color: 0x00ff00} );
- material.blending = THREE.CustomBlending;
- material.blendEquation = THREE.AddEquation; //default
- material.blendSrc = THREE.SrcAlphaFactor; //default
- material.blendDst = THREE.OneMinusSrcAlphaFactor; //default
- </code>
- <h2>Esempi</h2>
- <p>[example:webgl_materials_blending_custom materials / blending / custom ]</p>
- <h2>Equazioni di Blending</h2>
- <code>
- THREE.AddEquation
- THREE.SubtractEquation
- THREE.ReverseSubtractEquation
- THREE.MinEquation
- THREE.MaxEquation
- </code>
- <h2>Fattori di Origine (Source Factors)</h2>
- <code>
- THREE.ZeroFactor
- THREE.OneFactor
- THREE.SrcColorFactor
- THREE.OneMinusSrcColorFactor
- THREE.SrcAlphaFactor
- THREE.OneMinusSrcAlphaFactor
- THREE.DstAlphaFactor
- THREE.OneMinusDstAlphaFactor
- THREE.DstColorFactor
- THREE.OneMinusDstColorFactor
- THREE.SrcAlphaSaturateFactor
- </code>
- <h2>Fattori di Destinazione (Destination Factors)</h2>
- <p>
- Tutti questi fattori di origine sono validi come fattori di destinazione ad eccezione di <code>THREE.SrcAlphaSaturateFactor</code>
- </p>
- <h2>Source</h2>
- <p>
- [link:https://github.com/mrdoob/three.js/blob/master/src/constants.js src/constants.js]
- </p>
- </body>
- </html>
|