| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>WebGPU - 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">WebGPU</h1>
- <section>
- <header>
- <div class="class-description"><p>A utility module with basic WebGPU capability testing.</p></div>
- </header>
- <article>
- <h2 class="subsection-title">Import</h2>
- <p><span translate="no">WebGPU</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 WebGPU from 'three/addons/capabilities/WebGPU.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=".getErrorMessage" translate="no">.<a href="#.getErrorMessage">getErrorMessage</a><span class="signature">()</span><span class="type-signature"> : HTMLDivElement</span> </h3>
- <div class="method">
- <div class="description">
- <p>Returns a <code>div</code> element representing a formatted error message that can be appended in
- web sites if WebGPU isn't supported.</p>
- </div>
- <dl class="details">
- <dt class="tag-returns"><strong>Returns:</strong> A <code>div</code> element representing a formatted error message that WebGPU isn't supported.</dt>
- </dl>
- </div>
- <h3 class="name name-method" id=".isAvailable" translate="no">.<a href="#.isAvailable">isAvailable</a><span class="signature">()</span><span class="type-signature"> : boolean</span> </h3>
- <div class="method">
- <div class="description">
- <p>Returns <code>true</code> if WebGPU is available.</p>
- </div>
- <dl class="details">
- <dt class="tag-returns"><strong>Returns:</strong> Whether WebGPU is available or not.</dt>
- </dl>
- </div>
- <h2 class="subsection-title">Source</h2>
- <p>
- <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/capabilities/WebGPU.js" translate="no" target="_blank" rel="noopener">examples/jsm/capabilities/WebGPU.js</a>
- </p>
- </article>
- </section>
- <script src="../scripts/linenumber.js"></script>
- <script src="../scripts/page.js"></script>
- </body>
- </html>
|