<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>

          DamooHTML5 彈幕引擎

          聯(lián)合創(chuàng)作 · 2023-09-22 06:47

          Damoo 是一個輕量級的 HTML5 彈幕引擎。可以在頁面元素上附加一層彈幕圖層并且以非常簡單的 API 調用方式使用。查看DEMO

          Damoo

          一個不起眼的 HTML5 彈幕引擎。

          Getting started 走起

          下載最新發(fā)行版本。

          需要在頁面中準備一個合適的容器。

          <div id="dm-main"> <div id="dm-screen"></div> </div>

          Then, import damoo.js or damoo.min.js.

          然后引入damoo.js或damoo.min.js。

          <script type="text/javascript" src="damoo.min.js"></script>

          Initiate Damoo.

          初始化。

          var damoo = Damoo('dm-screen', 'dm-canvas', 20);

          Or use your own font instead of "sans-serif".

          可自定義全局字體。

          var damoo = Damoo('dm-screen', 'dm-canvas', 20, "Arial");

          And run it.

          運行。

          damoo.start();

          Danmaku can be emitted by calling emit method.

          用emit方法發(fā)射彈幕。

          damoo.emit({ text: "Damoo is awesome!", color: "#f49" });

          Enable text shadow.

          開啟字體陰影。

          damoo.emit({ text: "I got a shadow!", color: "#000", shadow: true });

          Color the shadow.

          自定義陰影顏色。

          damoo.emit({ text: "Hooray!", color: "#f00", shadow: { color: "#f49" } });

          Danmaku can also be fixed at the center of the screen.

          發(fā)射固定彈幕。

          damoo.emit({ text: "I'M FIXED!", color: "#6f9", fixed: true });

          Clear the screen.

          清空屏幕。

          damoo.clear();

          You may hide Damoo.

          隱藏彈幕圖層。

          damoo.hide();

          And bring it back.

          顯示彈幕圖層。

          damoo.show();

          If needed, you may suspend the animation.

          暫停動畫。

          damoo.suspend();

          And resume it when ready to go.

          恢復動畫。

          damoo.resume();

          Contributing 填坑

          Hope you enjoy the code!

          你們城里人都很會玩,我就不多說了。

          _(:з」∠)_



          瀏覽 29
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

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

          手機掃一掃分享

          編輯 分享
          舉報
          <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>
                  白峰美羽一区二区三区 | 中文无码短视频 | 国产成人婬片A片免费V8 | JIZZ国产丝袜19学生 | 操比视频99 |