Git Product home page Git Product logo

danma's Introduction

查看demo

重构代码,复用弹幕对象并且优化代码,性能提升。可以投入生产环境

示例

当弹幕列表为空时,停止render,只有当有新的弹幕时重新开始渲染

	this._isRunning = false

实例划分

舞台实例,用于初始化整个舞台,提供整个舞台的相关信息

	new Stage()

弹幕池实例,用于管理整个弹幕列表, doCheck方法用于检测弹幕池

	new Pool()

弹幕实例,用于保存每个弹幕的状态

	new Shoot()

入口实例,对外api为emit方法。 入口用于初始化舞台和弹幕池实例。

	new DanMa()

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.