<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          ClayGL構(gòu)建 Web3D 應(yīng)用的 WebGL 圖形庫

          聯(lián)合創(chuàng)作 · 2023-09-19 19:52

          ClayGL 是一個 WebGL 圖形庫,用于構(gòu)建可伸縮的 Web3D 應(yīng)用程序。

          ClayGL 易于使用,可針對高質(zhì)量圖形進(jìn)行配置。得益于模塊化和 tree shaking,對于基本的3D應(yīng)用程序,它可以縮小到22k(壓縮)。

          示例

          創(chuàng)建旋轉(zhuǎn)立方體示例

          <!DOCTYPE html>
          <html lang="en">
          <head>
            <script src="lib/claygl.js"></script>
          </head>
          <body>
            <canvas id="main"></canvas>
            <script>
              clay.application.create('#main', {
          
                width: window.innerWidth,
                height: window.innerHeight,
          
                init(app) {
                  // Create camera
                  this._camera = app.createCamera([0, 2, 5], [0, 0, 0]);
          
                  // Create a RED cube
                  this._cube = app.createCube({
                      color: '#f00'
                  });
          
                  // Create light
                  this._mainLight = app.createDirectionalLight([-1, -1, -1]);
                },
                loop(app) {
                  this._cube.rotation.rotateY(app.frameTime / 1000);
                }
              });
            </script>
          </body>
          </html>

           

          瀏覽 23
          點贊
          評論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報
          評論
          圖片
          表情
          推薦
          點贊
          評論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  香页视频免费 | 靠逼视频网站久久精品 | yw.193.爆乳尤物.ccm | 黄视频欧美 | 无码av随便看 |