| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>ColorConverter - Three.js Docs</title>
- <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
- <script src="../scripts/highlight.min.js"></script>
- <link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
- <link type="text/css" rel="stylesheet" href="../styles/page.css">
- </head>
- <body>
- <h1 translate="no">ColorConverter</h1>
- <section>
- <header>
- <div class="class-description"><p>A utility class with helper functions for color conversion.</p></div>
- </header>
- <article>
- <h2 class="subsection-title">Import</h2>
- <p><span translate="no">ColorConverter</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank" rel="noopener">Installation#Addons</a>.</p>
- <pre><code class="language-js">import { ColorConverter } from 'three/addons/math/ColorConverter.js';</code></pre>
- <div class="container-overview">
- <div class="method">
- </div>
- </div>
- <h2 class="subsection-title">Static Methods</h2>
- <h3 class="name name-method" id=".getHSV" translate="no">.<a href="#.getHSV">getHSV</a><span class="signature">( color : <span class="param-type"><a href="Color.html">Color</a></span>, target : <span class="param-type">Object</span> )</span><span class="type-signature"> : Object</span> </h3>
- <div class="method">
- <div class="description">
- <p>Returns a HSV color representation of the given color object.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>color</strong>
- </td>
- <td class="description last">
- <p>The color to get HSV values from.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>target</strong>
- </td>
- <td class="description last">
- <p>The target object that is used to store the method's result.</p>
- </td>
- </tr>
- </tbody>
- </table>
- <dl class="details">
- <dt class="tag-returns"><strong>Returns:</strong> The HSV color.</dt>
- </dl>
- </div>
- <h3 class="name name-method" id=".setHSV" translate="no">.<a href="#.setHSV">setHSV</a><span class="signature">( color : <span class="param-type"><a href="Color.html">Color</a></span>, h : <span class="param-type">number</span>, s : <span class="param-type">number</span>, v : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="Color.html">Color</a></span> </h3>
- <div class="method">
- <div class="description">
- <p>Sets the given HSV color definition to the given color object.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>color</strong>
- </td>
- <td class="description last">
- <p>The color to set.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>h</strong>
- </td>
- <td class="description last">
- <p>The hue.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>s</strong>
- </td>
- <td class="description last">
- <p>The saturation.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>v</strong>
- </td>
- <td class="description last">
- <p>The value.</p>
- </td>
- </tr>
- </tbody>
- </table>
- <dl class="details">
- <dt class="tag-returns"><strong>Returns:</strong> The update color.</dt>
- </dl>
- </div>
- <h2 class="subsection-title">Source</h2>
- <p>
- <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/math/ColorConverter.js" translate="no" target="_blank" rel="noopener">examples/jsm/math/ColorConverter.js</a>
- </p>
- </article>
- </section>
- <script src="../scripts/linenumber.js"></script>
- <script src="../scripts/page.js"></script>
- </body>
- </html>
|