Home

Awesome

DanmakuFrostMaster

UWP开源弹幕引擎·寒霜弹幕使 ~

一个UWP上基于Win2D渲染API的开源弹幕解析和绘制引擎项目/An open-source project of danmaku parsing/rendering engine based on Win2D API on UWP

主要特性/Key Features

快速开始/Quick Start

Prerequisite

Install Win2D from https://www.nuget.org/packages/Microsoft.Graphics.Win2D

Page.xaml

xmlns:canvas="using:Microsoft.Graphics.Canvas.UI.Xaml"

<canvas:CanvasAnimatedControl x:Name="_canvasDanmaku"/>

Page.xaml.cs

using Atelier39;
private DanmakuFrostMaster _danmakuController;
_danmakuController = new DanmakuFrostMaster(_canvasDanmaku);

_danmakuController.AddRealtimeDanmaku(danmakuItem, false);

List<DanmakuItem> danmakuList = BilibiliDanmakuXmlParser.GetDanmakuList(danmakuXml, null, true, out _, out _, out _);
_danmakuController.SetDanmakuList(danmakuList);

_danmakuController.UpdateTime((uint)playTime.TotalMilliseconds);

效果演示/Demo

Demo for real-time danmaku sending

demo1

Demo for Bilibili video (Video: BV1Js411o76u)

demo2-1

Demo for Bilibili mode7 danmaku (Video: BV1Js411o76u)

demo2-2

Demo for Bilibili CC subtitle (Video: BV1Ws411m7VY)

demo3

Demo for ASS subtitle (Video: ?)

demo4