You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
1.7 KiB
64 lines
1.7 KiB
<!DOCTYPE html>
|
|
<html lang="pt-br">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<base href="../../../" />
|
|
<script src="page.js"></script>
|
|
<link type="text/css" rel="stylesheet" href="page.css" />
|
|
</head>
|
|
<body>
|
|
<h1>Constantes de Equação de Mesclagem Personalizada (Custom Blending Equation)</h1>
|
|
|
|
<p>
|
|
Funcionam com todos os tipos de materiais. Primeiro defina o modo de mesclagem do material para THREE.CustomBlending, em seguida, defina a equação de mesclagem desejada, o fator de origem e o fator de destino.
|
|
</p>
|
|
|
|
<h2>Exemplo de Código</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>Exemplos</h2>
|
|
<p>[example:webgl_materials_blending_custom materials / blending / custom ]</p>
|
|
|
|
<h2>Equações de Mesclagem</h2>
|
|
<code>
|
|
THREE.AddEquation
|
|
THREE.SubtractEquation
|
|
THREE.ReverseSubtractEquation
|
|
THREE.MinEquation
|
|
THREE.MaxEquation
|
|
</code>
|
|
|
|
<h2>Fatores de Origem</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>Fatores de Destino</h2>
|
|
<p>
|
|
Todos os Fatores de Origem são válidos como Fatores de Destino, exceto, <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>
|
|
|