CustomBlendingEquations.html 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <!DOCTYPE html>
  2. <html lang="ko">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  6. <script src="page.js"></script>
  7. <link type="text/css" rel="stylesheet" href="page.css" />
  8. </head>
  9. <body>
  10. <h1>사용자 지정 혼합 방정식 상수</h1>
  11. <p>
  12. 모든 재질 타입에 사용할 수 있습니다. 먼저 THREE.CustomBlending에 머티리얼의 혼합 모드를 설정하고, 필요한 혼합방정식, 소스 인자, 표적 인자를 추가합니다.
  13. </p>
  14. <h2>코드 예제</h2>
  15. <code>
  16. const material = new THREE.MeshBasicMaterial( {color: 0x00ff00} );
  17. material.blending = THREE.CustomBlending;
  18. material.blendEquation = THREE.AddEquation; //default
  19. material.blendSrc = THREE.SrcAlphaFactor; //default
  20. material.blendDst = THREE.OneMinusSrcAlphaFactor; //default
  21. </code>
  22. <h2>예제</h2>
  23. <p>[example:webgl_materials_blending_custom materials / blending / custom ]</p>
  24. <h2>Blending Equations</h2>
  25. <code>
  26. THREE.AddEquation
  27. THREE.SubtractEquation
  28. THREE.ReverseSubtractEquation
  29. THREE.MinEquation
  30. THREE.MaxEquation
  31. </code>
  32. <h2>소스 인자</h2>
  33. <code>
  34. THREE.ZeroFactor
  35. THREE.OneFactor
  36. THREE.SrcColorFactor
  37. THREE.OneMinusSrcColorFactor
  38. THREE.SrcAlphaFactor
  39. THREE.OneMinusSrcAlphaFactor
  40. THREE.DstAlphaFactor
  41. THREE.OneMinusDstAlphaFactor
  42. THREE.DstColorFactor
  43. THREE.OneMinusDstColorFactor
  44. THREE.SrcAlphaSaturateFactor
  45. </code>
  46. <h2>표적 인자</h2>
  47. <p>
  48. 모든 소스 인자는 <code>THREE.SrcAlphaSaturateFactor</code>를 제외하고 표적 인자로 사용할 수 있습니다
  49. </p>
  50. <h2>소스 코드</h2>
  51. <p>
  52. [link:https://github.com/mrdoob/three.js/blob/master/src/constants.js src/constants.js]
  53. </p>
  54. </body>
  55. </html>