Giter Site home page Giter Site logo

trung0246 / bulletml.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from daishihmr/bulletml.js

0.0 2.0 0.0 23.13 MB

弾幕記述言語BulletMLをJavaScriptで利用するためのユーティリティ集。enchant.js用プラグイン、tmlib.js用プラグインもあるよ。

JavaScript 96.96% HTML 3.04%

bulletml.js's Introduction

bulletml.js

弾幕記述言語BulletMLをJavaScriptで利用するためのユーティリティ集。

enchant.js用プラグイン、tmlib.js用プラグインもあるよ。

Modules

  • bulletml.js ... BulletMLをJavaScriptで読み込んでいろいろやるためのライブラリ。
  • bulletml.enchant.js ... enchant.jsでBulletMLを利用するためのプラグイン。
  • tmlib.bulletml.js ... tmlib.jsでBulletMLを利用するためのプラグイン。

Download

https://github.com/daishihmr/bulletml.js/releases/

CDN site

bulletml.min.js

https://cdn.rawgit.com/daishihmr/bulletml.js/master/build/bulletml.min.js

bulletml.enchant.js

https://cdn.rawgit.com/daishihmr/bulletml.js/master/build/plugins/bulletml.enchant.js

tmlib.bulletml.js

https://cdn.rawgit.com/daishihmr/bulletml.js/master/build/plugins/tmlib.bulletml.js

DEMO

enchant.js使用

tmlib.js使用

独自実装

This library is used by ...

FEATURES

Parser

従来型の、XMLで記述されたBulletMLをロードして実行することができます

// enchant.js
var game = new Game();
game.preload("bulletml.xml");
game.onload = function() {
    var attackPattern = game.assets["bulletml.xml");
};
game.start();

DSL

JavaScriptによるDSLで弾幕定義を記述することができます

XMLで書くとこんな弾幕も…

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE bulletml SYSTEM "http://www.asahi-net.or.jp/~cs8k-cyu/bulletml/bulletml.dtd">
<bulletml xmlns="http://www.asahi-net.or.jp/~cs8k-cyu/bulletml">
    <action label="top">
        <repeat>
            <times>10</times>
            <action>
                <fire>
                    <direction type="absolute">60</direction>
                    <bullet />
                </fire>
                <wait>5</wait>
            </action>
        </repeat>
    </action>
</bulletml>

DSLで書くとこんなにスッキリ!

var spec = new bulletml.Root({
    top: action([
        repeat(10, [
            fire(direction(60, "absolute"), bullet),
            wait(5),
        ]),
    ]),
});

bulletml.js's People

Contributors

daishihmr avatar minimo avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.