npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

danmukuku

v0.0.3

Published

1. **Frame都和视框同大小,(width:100%), 发射后移动两阶段 -100%, -300%, 完毕销毁。** 2. 只有Slide Frame模式 3. 可以初始化多个Slide Frame模式的层 4. 共用TraceManager

Downloads

3

Readme

基本思路

  1. Frame都和视框同大小,(width:100%), 发射后移动两阶段 -100%, -300%, 完毕销毁。
  2. 只有Slide Frame模式
  3. 可以初始化多个Slide Frame模式的层
  4. 共用TraceManager

特性

  1. 支持1500+弹幕同时在屏幕,实际节点可能大于4000
  2. FPS稳定 1200+弹幕 稳定在 50+
  3. 可以自定义弹幕样式,添加图片等

在做


  • [x] 弹幕最长宽度 width 300%的时候,弹幕最长的长度为屏宽的50%
    width 400%的时候,弹幕最长的长度为屏宽的100%
    计算公式 长度倍数/2 - 1 , 例如5倍, 弹幕最大长度为150%

  • [x] 不使用getComputedStyle
    使用计时来控制 --已支持

  • ~~[ ] 普通弹幕位置left采用百分比~~

  • [x] 支持style和class

  • [ ] 节点回收改进

    • [ ] 标记length或者添加的时候记录长度
    • [ ] 标记复用节点次数
    • [x] innerHTML=""
  • [x] 弹幕最长长度可配置|可选

  • [x] resize

  • [x] 弹幕自身有速度

  • [ ] 预创建弹幕节点
    requestildecallback

  • [ ] destroy

ISSUE

  • [ ] 弹幕覆盖问题
  • [x] 慢速轨道问题
    需要记录每条轨道最后的tail,现在存在问题
    需要 x + len, 这需要Factory记录走过的屏数
  • [ ] 引入shedule概念

尝试

普通弹幕

  • ~~三个frame走~~
    • [x] getComputedStyle获取当前位移
  • ~~iframe作为容器~~
  • ~~translate代替弹幕元素的left,top~~
  • ~~transition~~

加速弹幕

  • ~~StyleSheet~~: 性能低下
            this.styleSheet.insertRule(`
                @keyframes animation-acc-${id} {
                    from {
                        transform: translate3d(0, 0, 0);
                    }
                    to {
                        transform: translate3d(-${this.WIDTH + len}px, 0, 0);
                    }
                }
            `, this.styleSheet.rules.length);
  • CSS Scope / Style Scope