Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,5 @@ application-local.properties

/admin-frontend/node_modules/
/workplace/

/node_modules/
21 changes: 21 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "plugin-live2d",
"private": true,
"author": {
"name": "LIlGG",
"url": "https://github.com/LIlGG"
},
"contributors": [
{
"name": "LIlGG",
"email": "mail@e.lixingyong.com",
"url": "https://github.com/LIlGG"
}
],
"license": "MIT",
"devDependencies": {
"@biomejs/biome": "^1.9.3",
"typescript": "^5.7.2"
},
"packageManager": "pnpm@9.4.0+sha512.f549b8a52c9d2b8536762f99c0722205efc5af913e77835dbccc3b0b0b2ca9e7dc8022b78062c17291c48e88749c70ce88eb5a74f1fa8c4bf5e18bb46c8bd83a"
}
11 changes: 11 additions & 0 deletions packages/live2d/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = false
13 changes: 13 additions & 0 deletions packages/live2d/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Local
.DS_Store
*.local
*.log*

# Dist
node_modules
dist/

# IDE
.vscode/*
!.vscode/extensions.json
.idea
29 changes: 29 additions & 0 deletions packages/live2d/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Rsbuild Project

## Setup

Install the dependencies:

```bash
pnpm install
```

## Get Started

Start the dev server:

```bash
pnpm dev
```

Build the app for production:

```bash
pnpm build
```

Preview the production build locally:

```bash
pnpm preview
```
30 changes: 30 additions & 0 deletions packages/live2d/biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.0/schema.json",
"organizeImports": {
"enabled": true
},
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"formatter": {
"indentStyle": "space"
},
"javascript": {
"formatter": {
"quoteStyle": "single"
}
},
"css": {
"parser": {
"cssModules": true
}
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
}
}
13 changes: 13 additions & 0 deletions packages/live2d/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Live2d Demo</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/Demo.tsx"></script>
</body>
</html>
43 changes: 43 additions & 0 deletions packages/live2d/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"name": "live2d",
"private": true,
"version": "1.0.0",
"type": "module",
"files": [
"dist"
],
"main": "./dist/live2d.umd.cjs",
"module": "./dist/live2d.js",
"exports": {
".": {
"import": "./dist/live2d.js",
"require": "./dist/live2d.umd.cjs"
}
},
"scripts": {
"dev": "vite --open",
"build": "tsc -b && vite build",
"check": "biome check --write"
},
"dependencies": {
"@lit/context": "^1.1.3",
"@lit/react": "^1.0.7",
"iconify-icon": "^2.3.0",
"lit": "^3.2.1",
"pixi-live2d-display": "^0.4.0",
"pixi.js": "^6.5.2",
"query-string": "^9.1.1",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@unocss/postcss": "^65.4.3",
"@vitejs/plugin-react": "^4.3.4",
"ts-lit-plugin": "^2.0.2",
"unocss": "^65.4.3",
"vite": "^6.1.0",
"vite-tsconfig-paths": "^5.1.4"
}
}
5 changes: 5 additions & 0 deletions packages/live2d/postcss.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import UnoCSS from '@unocss/postcss';

export default {
plugins: [UnoCSS()],
};
13 changes: 13 additions & 0 deletions packages/live2d/src/Demo.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import { Live2dContextComponent } from './components/Live2dContext';

const rootEl = document.getElementById('root');
if (rootEl) {
const root = ReactDOM.createRoot(rootEl);
root.render(
<React.StrictMode>
<Live2dContextComponent />
</React.StrictMode>,
);
}
Loading
Loading