Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

LIlGG/halo-live2d

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

Halo-Live2D

Halo 版本的看板娘插件,前端源码

预览 | 使用 | 关于

说明

【Halo 2.0 版本已拥有插件化功能,后续本功能使用 plugin-live2d 替代,详见 https://github.com/LIlGG/plugin-live2d

本版本 Live2D 基于 live2d_demo 改造。在原有的基础上适配了Halo。

【由于Halo目前没有插件功能,因此只能使用硬性约定的方式来执行live2d,具体操作方式请看 使用

基于 Halo 1.3.x

特性

  • 基于 API 加载模型,支持定制提示语
  • 使用参数定制看板娘,halo可使用主题设置
  • 支持原版本的一言接口
  • 支持Halo简易部署,开箱即用
  • 原生改造,方便扩展

使用

目录结构

live2d
    │── css
    │       flat-ui-icons-regular.eot   // Flat UI 字体
    │       flat-ui-icons-regular.svg   // Flat UI 字体
    │       flat-ui-icons-regular.ttf   // Flat UI 字体
    │       flat-ui-icons-regular.woff  // Flat UI 字体
    │       takagi.min.css              // Live2D 看板娘 样式表
    │── ftl
    |       live2d.ftl                  // Halo 自动加载插件
    │── js
    │       live2d.min.js               // Live2D 核心代码
    │       takigi-tips.min.js          // Live2D 扩展代码
    └─── json
            takagi-tips.json            // Live2D 内置提示语
settings.yaml   // 与halo配套的配置信息(可选)  

食用方法

  1. 点击下载
  2. 将压缩包解压至 Halo主题根目录/plugins 下,如没有plugins目录,请新建一个。完整路径为 halo主题根目录/plugins/live2d/**
  3. 在ftl文件内引入live2d插件。推荐在footer.ftl内引入
<!-- takagi-tips.js 依赖于 jquery,如已存在则可删除 -->
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<!-- 实现拖拽效果需要,如无须拖拽则可删除 -->
<script src="https://cdn.bootcdn.net/ajax/libs/jqueryui/1.12.1/jquery-ui.js"></script>
<!-- live2d start -->
<#if settings.live2d_switch!true>
<#include "plugins/live2d/ftl/live2d.ftl">
<@live2d />
</#if>
<!-- live2d end -->
  1. 修改配置文件(可选)

    将包中 settings.yaml 内的所有配置,复制到主题根目录下同名的文件内。(可以根据自己的需求删减)

  2. 定制提示语(可选)

About

一款好用的halo live2d集成插件

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published