CubismFramework/README.md

172 lines
5.1 KiB
Markdown
Raw Permalink Normal View History

2022-09-08 10:20:20 +08:00
[English](README.md) / [日本語](README.ja.md)
---
2021-06-10 10:26:53 +08:00
# Cubism Web Framework
2020-01-30 17:28:13 +08:00
This is a framework for using models output by Live2D Cubism Editor in applications.
2020-01-30 17:28:13 +08:00
2022-09-08 10:20:20 +08:00
It provides various functions for displaying and manipulating the model.
It is used in conjunction with the Live2D Cubism Core library to load the model.
2020-01-30 17:28:13 +08:00
2022-09-08 10:20:20 +08:00
You can use it as a JavaScript library that can be used in the browser by building.
2020-01-30 17:28:13 +08:00
2022-09-08 10:20:20 +08:00
## License
2020-01-30 17:28:13 +08:00
2022-09-08 10:20:20 +08:00
Please check the [license](LICENSE.md) before using this SDK.
2020-01-30 17:28:13 +08:00
## Compatibility with Cubism 5 new features and previous Cubism SDK versions
This SDK is compatible with Cubism 5.
For SDK compatibility with new features in Cubism 5 Editor, please refer to [here](https://docs.live2d.com/en/cubism-sdk-manual/cubism-5-new-functions/).
For compatibility with previous versions of Cubism SDK, please refer to [here](https://docs.live2d.com/en/cubism-sdk-manual/compatibility-with-cubism-5/).
2022-09-08 10:20:20 +08:00
## Development environment
2020-01-30 17:28:13 +08:00
### Node.js
* 20.7.0
* 18.18.0
2020-01-30 17:28:13 +08:00
### TypeScript
5.2.2
2020-01-30 17:28:13 +08:00
2022-09-08 10:20:20 +08:00
## Development environment construction
2020-01-30 17:28:13 +08:00
2022-09-08 10:20:20 +08:00
1. Install [Node.js] and [Visual Studio Code]
1. Open this project in Visual Studio Code and install the recommended extensions
* You can check them by typing `@recommended` from the Extensions tab
1. Enter `>Tasks: Run Task` in the command palette (*View > Command Palette...*) to display the task list
1. Select `npm: install` to download the dependent packages
2020-01-30 17:28:13 +08:00
2022-09-08 10:20:20 +08:00
You can execute various commands from the task list on the command palette.
2020-01-30 17:28:13 +08:00
2022-09-08 10:20:20 +08:00
NOTE: Settings for debugging are described in `.vscode/tasks.json`.
2020-01-30 17:28:13 +08:00
2022-09-08 10:20:20 +08:00
## Task list
2020-01-30 17:28:13 +08:00
### `npm: build`
2022-09-08 10:20:20 +08:00
Builds the source file and outputs to the `dist` directory.
2020-01-30 17:28:13 +08:00
2022-09-08 10:20:20 +08:00
You can change the settings by editing `tsconfig.json`.
2020-01-30 17:28:13 +08:00
### `npm: test`
2022-09-08 10:20:20 +08:00
Performs a TypeScript type check test.
2020-01-30 17:28:13 +08:00
2022-09-08 10:20:20 +08:00
You can change the settings by editing `tsconfig.json`.
2020-01-30 17:28:13 +08:00
### `npm: lint`
2022-09-08 10:20:20 +08:00
Performs static analysis of TypeScript files in the `src` directory.
2020-01-30 17:28:13 +08:00
2022-09-08 10:20:20 +08:00
You can change the settings by editing `.eslintrc.yml`.
2020-01-30 17:28:13 +08:00
### `npm: lint:fix`
2022-09-08 10:20:20 +08:00
Performs static analysis and automatic modification of TypeScript files in the `src` directory.
2020-01-30 17:28:13 +08:00
2022-09-08 10:20:20 +08:00
You can change the settings by editing `.eslintrc.yml`.
2020-01-30 17:28:13 +08:00
### `npm: clean`
2022-09-08 10:20:20 +08:00
Deletes the build deliverable directory (`dist`).
2020-01-30 17:28:13 +08:00
2022-09-08 10:20:20 +08:00
## Components
2020-01-30 17:28:13 +08:00
### effect
2022-09-08 10:20:20 +08:00
Provides functions such as automatic blinking and lip sync to add motion information as an effect to the model.
2020-01-30 17:28:13 +08:00
### id
2022-09-08 10:20:20 +08:00
Provides functions to manage the parameter name, part name, and Drawable name set in the model with unique types.
2020-01-30 17:28:13 +08:00
### math
2022-09-08 10:20:20 +08:00
Provides arithmetic functions required for manipulating and drawing the model, such as matrix and vector calculations.
2020-01-30 17:28:13 +08:00
### model
2022-09-08 10:20:20 +08:00
Provides various functions (generate, update, destroy) for handling the model.
2020-01-30 17:28:13 +08:00
### motion
2022-09-08 10:20:20 +08:00
Provides various functions (motion playback, parameter blending) for applying motion data to the model.
2020-01-30 17:28:13 +08:00
### physics
2022-09-08 10:20:20 +08:00
Provides functions for applying transformation manipulations due to physics to the model.
2020-01-30 17:28:13 +08:00
### rendering
2022-09-08 10:20:20 +08:00
Provides a renderer that implements graphics instructions for drawing the model.
2020-01-30 17:28:13 +08:00
### type
2022-09-08 10:20:20 +08:00
Provides type definitions for use within the framework.
2020-01-30 17:28:13 +08:00
### utils
2022-09-08 10:20:20 +08:00
Provides utility functions such as JSON parser and log output.
2020-01-30 17:28:13 +08:00
## Live2D Cubism Core for Web
2022-09-08 10:20:20 +08:00
Cubism Core for Web is not included in this repository.
2020-01-30 17:28:13 +08:00
2022-09-08 10:20:20 +08:00
Please download it from the [Cubism SDK for Web].
2020-01-30 17:28:13 +08:00
[Cubism SDK for Web]: https://www.live2d.com/download/cubism-sdk/download-web/
2022-09-08 10:20:20 +08:00
## Samples
2020-01-30 17:28:13 +08:00
2022-09-08 10:20:20 +08:00
Please refer to [CubismWebSamples] for implementation examples of standard applications.
2020-01-30 17:28:13 +08:00
[CubismWebSamples]: https://github.com/Live2D/CubismWebSamples
2022-09-08 10:20:20 +08:00
## Manual
2020-01-30 17:28:13 +08:00
[Cubism SDK Manual](https://docs.live2d.com/cubism-sdk-manual/top/)
2022-09-08 10:20:20 +08:00
## Changelog
Please refer to [CHANGELOG.md](CHANGELOG.md) for the changelog of this repository.
## Contributing
There are many ways to contribute to the project: logging bugs, submitting pull requests on this GitHub, and reporting issues and making suggestions in Live2D Community.
### Forking And Pull Requests
We very much appreciate your pull requests, whether they bring fixes, improvements, or even new features. Note, however, that the wrapper is designed to be as lightweight and shallow as possible and should therefore only be subject to bug fixes and memory/performance improvements. To keep the main repository as clean as possible, create a personal fork and feature branches there as needed.
### Bugs
We are regularly checking issue-reports and feature requests at Live2D Community. Before filing a bug report, please do a search in Live2D Community to see if the issue-report or feature request has already been posted. If you find your issue already exists, make relevant comments and add your reaction.
### Suggestions
2020-01-30 17:28:13 +08:00
2022-09-08 10:20:20 +08:00
We're also interested in your feedback for the future of the SDK. You can submit a suggestion or feature request at Live2D Community. To make this process more effective, we're asking that you include more information to help define them more clearly.
2021-12-09 13:12:23 +08:00
## Forum
2021-12-09 13:12:23 +08:00
If you want to suggest or ask questions about how to use the Cubism SDK between users, please use the forum.
2021-12-09 13:12:23 +08:00
- [Live2D Creator's Forum](https://community.live2d.com/)
- [Live2D 公式クリエイターズフォーラム (Japanese)](https://creatorsforum.live2d.com/)