Skip to content

Commit d3d7168

Browse files
add docs for spine
1 parent 03a48d9 commit d3d7168

6 files changed

Lines changed: 314 additions & 0 deletions

File tree

src/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@
3030

3131
- [在编辑器更新后迁移游戏文件](migration.md)
3232

33+
- [如何添加 Live2D 支持](live2D.md)
34+
35+
- [如何添加 Spine 支持](spine.md)
36+
3337
## WebGAL 脚本教程
3438

3539
- [基础](webgal-script/base.md)

src/en/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@
3030

3131
- [Migrating Game Files After Editor Update](migration.md)
3232

33+
- [How to add Live2D support](live2d.md)
34+
35+
- [How to add Spine support](spine.md)
36+
37+
3338
## WebGAL Script Tutorial
3439

3540
- [The Basics](webgal-script/base.md)

src/en/spine.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# About Spine
2+
3+
According to the Spine Runtime Integration Agreement, if you integrate the Spine Runtime into WebGAL, you need to obtain a license for the Spine Editor.
4+
5+
https://esotericsoftware.com/spine-runtimes-license#spine-runtimes
6+
7+
```
8+
Spine Runtimes License Agreement
9+
Last updated February 20, 2024. Replaces all prior versions.
10+
11+
Copyright (c) 2013-2024, Esoteric Software LLC
12+
13+
Integration of the Spine Runtimes into software or otherwise creating derivative works of the Spine Runtimes is permitted under the terms and conditions of Section 2 of the Spine Editor License Agreement:
14+
http://esotericsoftware.com/spine-editor-license
15+
16+
Otherwise, it is permitted to integrate the Spine Runtimes into software or otherwise create derivative works of the Spine Runtimes (collectively, "Products"), provided that each user of the Products must obtain their own Spine Editor license and redistribution of the Products in any form must include this license and copyright notice.
17+
18+
THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
19+
```
20+
21+
**Therefore, WebGAL has removed the `pixi-spine` package from the project to avoid impacting users who do not need to use Spine features.** If you want to use Spine, please refer to the following steps:
22+
23+
:::info
24+
Note: The following steps are based on the WebGAL source code. You can find the WebGAL source code on GitHub.
25+
26+
[WebGAL Source Code](https://github.com/OpenWebGAL/WebGAL)
27+
:::
28+
29+
1. Obtain a Spine Editor license [http://esotericsoftware.com/](http://esotericsoftware.com/)
30+
31+
2. Install `pixi-spine` using yarn in the `package/webgal` directory:
32+
33+
```
34+
cd package/webgal
35+
yarn add pixi-spine@3.1.2
36+
```
37+
38+
3. Navigate to the following file: `packages/webgal/src/Core/controller/stage/pixi/spine.ts`
39+
40+
Uncomment the following commented lines (starting around line 30):
41+
42+
```
43+
// pixiSpineLoading = import('pixi-spine')
44+
// .then((module) => {
45+
// spineLoader = new PIXI.Loader();
46+
// pixiSpineModule = module;
47+
// return module;
48+
// })
49+
// .catch((error) => {
50+
// console.error('Failed to load pixi-spine. Spine features will be disabled.', error);
51+
// return null;
52+
// })
53+
// .finally(() => {
54+
// pixiSpineLoading = null;
55+
// });
56+
```
57+
58+
4. Run the following script in the project root directory to debug WebGAL:
59+
60+
`yarn dev`
61+
62+
5. Now you can use Spine for character sprites. You need to place the entire model directory into the `game/figure` directory. The method to call a sprite is to call the sprite's JSON file.
63+
64+
For example:
65+
```
66+
game/
67+
figure/
68+
exampleSpine/
69+
data.json
70+
atlas.atlas
71+
skeleton.skel
72+
```
73+
74+
If you are using a JSON format Spine sprite, you need to pass in the type using a script similar to the following, so that the engine recognizes its type as Spine.
75+
76+
```
77+
changeFigure:exampleSpine/data.json?type=spine;
78+
```
79+
80+
6. If you need to build a production package or use it in WebGAL Terre, run the `yarn build` command to build WebGAL. After completion, please refer to [How to use a custom engine](derivative) to use the modified engine.
81+
82+
### Important Notice
83+
84+
According to the Spine Runtime Integration Agreement, **each user using Spine features must have a valid Spine Editor license.** Please ensure you have obtained the appropriate authorization to legally use Spine features.
85+
86+
### Disclaimer
87+
88+
Please carefully read and understand the following:
89+
90+
Before using the WebGAL version integrated with Spine functionality, you must ensure that you have obtained a legally authorized license for the Spine Editor. Spine, as third-party software, has its runtime components governed by the Spine Editor License Agreement. According to this agreement, any use of software integrating the Spine Runtime requires you to obtain your own legal license for the Spine Editor.
91+
92+
If you privately integrate or use the WebGAL version integrated with the Spine Runtime without obtaining a Spine Editor license, all resulting legal liabilities, economic losses, reputational damage, and any other consequences shall be borne solely by you or your organization. The WebGAL project team assumes no responsibility for this. We do not provide Spine licenses, nor do we participate in any license acquisition or distribution process. WebGAL only serves as a technical platform, supporting integration with Spine, but does not supervise or take responsibility for your usage.
93+
94+
Unauthorized use of the Spine Runtime will be considered an infringement and may lead to third-party legal action against you for damages. You agree that any legal disputes or economic compensation claims arising from your violation of the Spine Editor License Agreement shall be resolved by you independently, and you will fully compensate the WebGAL project team and its affiliates for any losses incurred due to your actions, including but not limited to legal fees, compensation, and other related expenses.
95+
96+
Furthermore, the WebGAL project team expressly disclaims any responsibility for any direct or indirect damage, inconvenience, or loss you may suffer during the integration or use of Spine functionality. Whether due to technical failures, software errors, unauthorized use, or any consequences resulting from your failure to comply with the license agreement, WebGAL shall not bear any responsibility. You must assume full responsibility for all risks and liabilities associated with using the WebGAL version integrated with Spine.
97+
98+
In summary, if you choose to integrate or use Spine functionality in WebGAL, you must ensure that you have legally obtained a Spine Editor license and commit to complying with all relevant license terms and regulations. Otherwise, all risks, liabilities, and consequences arising therefrom shall be borne by you or your organization and are unrelated to the WebGAL project team.
99+
100+
By using this software, you acknowledge that you have read, understood, and agreed to all contents of the above disclaimer. If you do not agree to these terms, please immediately cease using the WebGAL version integrated with Spine functionality.

src/ja/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@
3030

3131
- [移行ゲームファイル](migration.md)
3232

33+
- [Live2Dサポートの追加方法](live2D.md)
34+
35+
- [Spineサポートの追加方法](spine.md)
36+
3337
## WebGAL スクリプトチュートリアル
3438

3539
- [基本](webgal-script/base.md)

src/ja/spine.md

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# Spineについて
2+
3+
WebGALでSpine Runtimeを統合する場合、以下のSpine Runtime統合契約に基づき、Spineエディターのライセンスを取得する必要があります。
4+
5+
https://esotericsoftware.com/spine-runtimes-license#spine-runtimes
6+
7+
```
8+
Spine Runtimes License Agreement
9+
Last updated February 20, 2024. Replaces all prior versions.
10+
11+
Copyright (c) 2013-2024, Esoteric Software LLC
12+
13+
Spine Runtimesのソフトウェアへの統合、またはその他のSpine Runtimesの派生物の作成は、Spine Editor License Agreementのセクション2の条項に基づいて許可されます。
14+
http://esotericsoftware.com/spine-editor-license
15+
16+
それ以外の場合は、製品の各ユーザーが自身のSpine Editorライセンスを取得し、いかなる形式での製品の再配布にもこのライセンスと著作権表示を含めることを条件として、Spine Runtimesをソフトウェアに統合したり、Spine Runtimesの派生物を作成したりすることができます(まとめて「製品」)。
17+
18+
SPINE RUNTIMESは、ESOTERIC SOFTWARE LLCによって「現状のまま」提供され、商品性および特定目的への適合性に関する黙示の保証を含むがこれらに限定されない、明示または黙示の保証はすべて否認されます。いかなる場合においても、ESOTERIC SOFTWARE LLCは、SPINE RUNTIMESの使用に起因する、直接的、間接的、偶発的、特別、懲罰的、または結果的な損害(代替の商品またはサービスの調達、事業の中断、使用、データ、または利益の損失を含むがこれらに限定されない)について、原因の如何を問わず、契約、厳格責任、または不法行為(過失を含む)のいずれの責任の理論に基づいても、たとえそのような損害の可能性について知らされていたとしても、責任を負わないものとします。
19+
```
20+
21+
**そのため、Spine機能を必要としないユーザーへの影響を避けるため、WebGALはプロジェクトから`pixi-spine`パッケージを削除しました。** Spineを使用したい場合は、以下の手順を参照してください。
22+
23+
:::info
24+
注意:以下の手順はすべてWebGALのソースコードに基づいています。ソースコードはGitHubで入手できます。
25+
26+
[WebGAL ソースコード](https://github.com/OpenWebGAL/WebGAL)
27+
:::
28+
29+
1. Spineエディターのライセンスを取得する [http://esotericsoftware.com/](http://esotericsoftware.com/)
30+
31+
2. `package/webgal`パッケージでyarnを使用してpixi-spineをインストールする
32+
33+
```
34+
cd package/webgal
35+
yarn add pixi-spine@3.1.2
36+
```
37+
38+
3. 次のファイルに移動します: `packages/webgal/src/Core/controller/stage/pixi/spine.ts`
39+
40+
以下のコメントアウトされた行(約30行目から)のコメントを外します。
41+
42+
```
43+
// pixiSpineLoading = import('pixi-spine')
44+
// .then((module) => {
45+
// spineLoader = new PIXI.Loader();
46+
// pixiSpineModule = module;
47+
// return module;
48+
// })
49+
// .catch((error) => {
50+
// console.error('Failed to load pixi-spine. Spine features will be disabled.', error);
51+
// return null;
52+
// })
53+
// .finally(() => {
54+
// pixiSpineLoading = null;
55+
// });
56+
```
57+
58+
4. プロジェクトのルートディレクトリで以下のスクリプトを実行してWebGALをデバッグします
59+
60+
`yarn dev`
61+
62+
5. これでSpineを立ち絵として使用できるようになりました。モデル全体のディレクトリを`game/figure`ディレクトリに配置する必要があります。立ち絵を呼び出す方法は、立ち絵のjsonファイルを呼び出すことです。
63+
64+
例:
65+
```
66+
game/
67+
figure/
68+
exampleSpine/
69+
data.json
70+
atlas.atlas
71+
skeleton.skel
72+
```
73+
74+
JSON形式のSpine立ち絵を使用している場合は、エンジンがSpineタイプとして認識できるように、以下のようなスクリプトを使用してタイプを渡す必要があります。
75+
76+
```
77+
changeFigure:exampleSpine/data.json?type=spine;
78+
```
79+
80+
6. 本番用パッケージをビルドする場合、またはWebGAL Terreで使用する場合は、`yarn build`コマンドを実行してWebGALをビルドします。完了したら、[カスタムエンジンの使用方法](derivative) を参照して、変更後のエンジンを使用してください。
81+
82+
83+
### 重要な注意点
84+
85+
Spine Runtime統合契約に基づき、**Spine機能を使用する各ユーザーは、Spineエディターの有効なライセンスを所有している必要があります。** Spine機能を合法的に使用するために、適切なライセンスを取得していることを確認してください。
86+
87+
### 免責事項
88+
89+
以下の内容をよくお読みになり、ご理解ください。
90+
91+
Spine機能を統合したWebGALバージョンを使用する前に、Spineエディターの正式なライセンスを取得していることを確認する必要があります。Spineはサードパーティ製ソフトウェアであり、そのランタイムコンポーネントはSpineエディターのライセンス契約の制約を受けます。この契約に基づき、Spine Runtimeを統合したソフトウェアを使用する場合は、Spineエディターの正式なライセンスを各自で取得する必要があります。
92+
93+
Spineエディターのライセンスを取得せずに、Spine Runtimeを統合したWebGALを個人的に統合または使用した場合、それによって生じるすべての法的責任、経済的損失、評判の損害、およびその他のあらゆる形式の結果は、個人または組織が全責任を負います。WebGALプロジェクトチームは一切の責任を負いません。私たちはSpineライセンスを提供せず、ライセンスの取得または配布プロセスにも関与しません。WebGALは技術プラットフォームとしてのみ機能し、Spineとの統合をサポートしますが、ユーザーの使用行為を監督または責任を負うことはありません。
94+
95+
許可なくSpine Runtimeを使用することは、著作権侵害とみなされ、サードパーティから損害賠償を求める訴訟を起こされる可能性があります。Spineエディターのライセンス契約に違反したために発生した法的紛争または経済的賠償請求は、すべてユーザー自身で解決することに同意するものとします。また、ユーザーの行為によってWebGALプロジェクトチームおよびその関連会社に発生した損失(弁護士費用、賠償金、およびその他の関連費用を含むがこれらに限定されない)を全額補償することに同意するものとします。
96+
97+
さらに、WebGALプロジェクトチームは、Spine機能の統合または使用中に発生した直接的または間接的な損害、不便、または損失について、一切の責任を負いません。技術的な不具合、ソフトウェアエラー、無許可の使用、またはライセンス契約の不遵守によって生じた結果について、WebGALは一切責任を負いません。Spineを統合したWebGALバージョンの使用に伴うすべてのリスクと責任は、ユーザーが完全に負うものとします。
98+
99+
要約すると、WebGALでSpine機能を統合または使用する場合、Spineエディターの正式なライセンスを取得済みであり、すべての関連ライセンス条項と規制を遵守することを約束する必要があります。そうでない場合、発生するすべてのリスク、責任、および結果は、個人または組織が負担し、WebGALプロジェクトチームとは無関係です。
100+
101+
本ソフトウェアを使用することにより、上記の免責事項のすべてを読み、理解し、同意したものとみなされます。これらの条項に同意しない場合は、Spine機能を統合したWebGALバージョンの使用を直ちに中止してください。

0 commit comments

Comments
 (0)