Code Monkey home page Code Monkey logo

Comments (5)

ctiao avatar ctiao commented on July 16, 2024

第2个问题已经修复了, 使用master最新commit, 是因为v0.1.6之后修改CacheManagingDrawTask代码导致的问题

from danmakuflamemaster.

ctiao avatar ctiao commented on July 16, 2024

第1个问题, -1是给隐藏弹幕时候用的, 当然没有弹幕的情况也可以这么优化,但是现在的流程并不能精确知道下几百毫秒屏幕上有没有弹幕, 所以这里还要稍微想下怎么减少占用并且又能及时绘制

from danmakuflamemaster.

renruir avatar renruir commented on July 16, 2024

你好,我我想判断当前屏幕是否有弹幕?有什么方法吗?如果没有,有什么思路吗?我现在没有什么思路。谢谢!

from danmakuflamemaster.

ctiao avatar ctiao commented on July 16, 2024

可以尝试以下思路:

  1. danmakus.subnew(timer.currMillisecond - DanmakuFactory.MAX_DURATION, timer.currMillisecond);
    判断size()>0 。
    2.给DanmakuRenderer.draw增加返回值,返回实际绘制到屏蔽上的弹幕数量

from danmakuflamemaster.

ctiao avatar ctiao commented on July 16, 2024

优化了问题1所说的问题, 现在可以判断当前两屏弹幕是否为空,并且使得绘制线程进入休眠

from danmakuflamemaster.

Related Issues (20)

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.