diff --git a/BUILD.ja.md b/BUILD.ja.md new file mode 100644 index 0000000..235c7a0 --- /dev/null +++ b/BUILD.ja.md @@ -0,0 +1,333 @@ +[**日本語**](./BUILD.ja.md) | [**English**](./BUILD.md) + +# ソース取得 + +本リポジトリをクローンして、 `SSPlayerForGodot` ディレクトリ内に入ってください。 + +```bash +git clone --recursive https://github.com/SpriteStudio/SSPlayerForGodot.git +cd SSPlayerForGodot +``` + +SSPlayerForGodot ディレクトリから以下のコマンドを実行し、 Godot を取得します。 + +```bash +git clone https://github.com/godotengine/godot.git +``` + +gdextension をビルドする場合は godot-cpp を取得します。 + +```bash +git clone https://github.com/godotengine/godot-cpp.git +``` + +# ブランチ選択 + +## Godot +SSPlayerForGodot ディレクトリの `godot` ディレクトリ内でビルドする Godot Engine のブランチを選択してください。 + +### 4 + +```bash +pushd godot +git checkout 4.4 +popd +``` + +### 3.x + +```bash +pushd godot +git checkout 3.x +popd +``` + +## GDExtension + +gdextension をビルドする場合は `godot-cpp` ディレクトリで対照する Godot Engine バージョンと同じブランチ名を選択してください。 + + +```bash +pushd godot-cpp +git checkout 4.4 +popd +``` + +# ビルド環境のセットアップ + +以降でビルド環境の構築手順について説明していきます。 + +## Windows + +[Godot公式のコンパイル手順](https://docs.godotengine.org/en/stable/contributing/development/compiling/compiling_for_windows.html) + +必要なツール +* ビルドツール (いずれかを選択) + * VisualStudio 2019(推奨) or 2022 + * MSYS2 + MinGW + gcc + make +* Python 3.6 以降 +* scons 3.0 以降 + +VisualStudio 2019 でのビルド・デバッグを確認しています。 + +scons は下記でインストールできます。(上記リンクにも記載あり) + +```bat +python -m pip install scons +``` + +## macOS + +[Godot公式のコンパイル手順](https://docs.godotengine.org/ja/4.x/contributing/development/compiling/compiling_for_macos.html) + +必要なツール +* Xcode +* Python 3.6 以降 +* scons 3.0 以降 +* Vulkan SDK for MoltenVK (4 対応用) +* emscripten (optional) +* Android SDK / Android NDK (optional) + +Xcode 以外は [Homebrew](https://brew.sh/) でインストールができます。 + +```sh +brew install python3 scons +``` + +```sh +brew install molten-vk +``` + +ホストアーキテクチャとは異なるアーキテクチャの Godot Engine をビルドする場合や Universal Binary 対応 Godot Engine をビルドする場合は `molten-vk` の代わりに Universal Binary 対応している [Vulkan SDK for MoltenVK](https://vulkan.lunarg.com/sdk/home) をインストールしてください。 + +(Optional) target を Web のビルドをする際は emscripten をインストールしてください。 + +```sh +brew install emscripten +``` + +(Optional) target を Android のビルドをする際は Android NDK をインストールしてください。 + + +## Linux + +T.B.D + +# ビルド + +## Windows + +### 4 + +[build.ps1](./scripts/build.ps1) でビルド可能です。 + + +成果物は `godot\bin` に格納されます。 + +**PowerShell** + +```powershell +$env:PYTHONUTF8=1 +.\scripts\build.ps1 +``` + +**Cmd** + +```cmd +set PYTHONUTF8=1 +PowerShell.exe -ExecutionPolicy Bypass -File .\scripts\build.ps1 +``` + +### 3.x + +[build-v3.ps1](./scripts/build-v3.ps1) でビルド可能です。 +成果物は `godot\bin` に格納されます。 + +**PowerShell** + +```powershell +$env:PYTHONUTF8=1 +.\scripts\build-v3.ps1 +``` + +**Cmd** + +```cmd +set PYTHONUTF8=1 +PowerShell.exe -ExecutionPolicy Bypass -File .\scripts\build-v3.ps1 +``` + +## macOS ビルド + +### 4 + +[build.sh](./scripts/build.sh) でビルド可能です。 +成果物は `godot/bin` に格納されます。 + +```sh +./scripts/build.sh +``` + +引数を指定しない場合はホストマシンのアーキテクチャと同じアーキテクチャ向けにビルドします。 +アーキテクチャを明示的に指定する場合は `arch=` に引数を追加してください。 + +**Universal Binary (supports both arm64 and x86_64)** + +```sh +./scripts/build.sh arch=universal +``` + +**arm64 (Apple Silicon)** + +```sh +./scripts/build.sh arch=arm64 +``` + +**x86_64 (Intel)** + +```sh +./scripts/build.sh arch=x86_64 +``` + +`godot/Godot.app` を開いて起動を確認します。 + +### 3.x + +[build-v3.sh](./scripts/build-v3.sh) でビルド可能です。 +成果物は `godot/bin` に格納されます。 + +```sh +./scripts/build-v3.sh +``` + +引数を指定しない場合はホストマシンのアーキテクチャと同じアーキテクチャ向けにビルドします。 +アーキテクチャを明示的に指定する場合は `arch=` に引数を追加してください。 + +**Universal Binary (supports both arm64 and x86_64)** + +```sh +./scripts/build-v3.sh arch=universal +``` + +**arm64 (Apple Silicon)** + +```sh +./scripts/build-v3.sh arch=arm64 +``` + +**x86_64 (Intel)** + +```sh +./scripts/build-v3.sh arch=x86_64 +``` + +`godot/Godot.app` を開いて起動を確認します。 + + +# GDExtension + +## Windows + +[build-extension.ps1](./scripts/build-extension.ps1) でビルド可能です。 +成果物は `bin` ディレクトリに格納されます。 + + +**PowerShell** + +```powershell +$env:PYTHONUTF8=1 +.\scripts\build-extension.ps1 +``` + +**Cmd** + +```cmd +set PYTHONUTF8=1 +PowerShell.exe -ExecutionPolicy Bypass -File .\scripts\build-extension.ps1 +``` + +## macOS, linux, iOS, Android, Web ビルド + +macOS か Linux で実行してください。 + +[build-extension.sh](./scripts/build-extension.sh) でビルド可能です。 +成果物は `bin` ディレクトリに格納されます。 + +```sh +./scripts/build-extension.sh +``` + + +# リリースビルド + +## 4 + +各プラットフォームの godot の `editor`, `template_debug`, `template_release` をまとめてビルドスクリプトは下記の通りです。 + +windows +``` +.\scripts\release-windows.ps1 +``` + +macOS +```sh +./scripts/release-macos.sh +``` + +Linux +```sh +./scripts/release-linux.sh +``` + +iOS +```sh +./scripts/release-ios.sh +``` + +Android +```sh +./scripts/release-android.sh +``` + +Web +```sh +./scripts/release-web.sh +``` + +## GDExtension + +各プラットフォームの gdextension の `editor`, `template_debug`, `template_release` をまとめてビルドスクリプトは下記の通りです。 + +windows +``` +.\scripts\release-gdextension-windows.ps1 +``` + +macOS +```sh +./scripts/release-gdextension-macos.sh +``` + +Linux +```sh +./scripts/release-gdextension-linux.sh +``` + +iOS +```sh +./scripts/release-gdextension-ios.sh +``` + +Android +```sh +./scripts/release-gdextension-android.sh +``` + +Web +```sh +./scripts/release-gdextension-web.sh +``` + +## 3.x + +... \ No newline at end of file diff --git a/BUILD.md b/BUILD.md index 26610df..2c1f672 100644 --- a/BUILD.md +++ b/BUILD.md @@ -1,34 +1,38 @@ -# ソース取得 +[**日本語**](./BUILD.ja.md) | [**English**](./BUILD.md) -本リポジトリをクローンして、 `SSPlayerForGodot` ディレクトリ内に入ってください。 +# Source Retrieval + +Clone this repository and place it inside a directory named `SSPlayerForGodot`. ```bash git clone --recursive https://github.com/SpriteStudio/SSPlayerForGodot.git cd SSPlayerForGodot ``` -SSPlayerForGodot ディレクトリから以下のコマンドを実行し、 Godot を取得します。 +From the SSPlayerForGodot directory, run the following command to obtain Godot: ```bash git clone https://github.com/godotengine/godot.git ``` -gdextension をビルドする場合は godot-cpp を取得します。 +If you will build the GDExtension, retrieve `godot-cpp` as well: ```bash git clone https://github.com/godotengine/godot-cpp.git ``` -# ブランチ選択 +# Selecting Branches + ## Godot -SSPlayerForGodot ディレクトリの `godot` ディレクトリ内でビルドする Godot Engine のブランチを選択してください。 + +In the `godot` directory under SSPlayerForGodot, select the branch of the Godot Engine you want to build. ### 4 ```bash pushd godot git checkout 4.4 -popd +popd ``` ### 3.x @@ -36,37 +40,38 @@ popd ```bash pushd godot git checkout 3.x -popd +popd ``` ## GDExtension -gdextension をビルドする場合は `godot-cpp` ディレクトリで対照する Godot Engine バージョンと同じブランチ名を選択してください。 +When building a GDExtension, select the same branch name in the `godot-cpp` directory that matches the Godot Engine version. ```bash pushd godot-cpp git checkout 4.4 -popd +popd ``` -# ビルド環境のセットアップ +# Setting Up the Build Environment -以降でビルド環境の構築手順について説明していきます。 +The following describes the setup steps for each platform. ## Windows -[Godot公式のコンパイル手順](https://docs.godotengine.org/en/stable/contributing/development/compiling/compiling_for_windows.html) +[Godot official compilation instructions](https://docs.godotengine.org/en/stable/contributing/development/compiling/compiling_for_windows.html) + +Required tools: -必要なツール -* ビルドツール (いずれかを選択) - * VisualStudio 2019(推奨) or 2022 - * MSYS2 + MinGW + gcc + make -* Python 3.6 以降 -* scons 3.0 以降 +* Build tools (choose one): + * Visual Studio 2019 (recommended) or Visual Studio 2022 + * MSYS2 + MinGW + gcc + make +* Python 3.6 or later +* scons 3.0 or later -VisualStudio 2019 でのビルド・デバッグを確認しています。 +Build/debug has been verified with Visual Studio 2019. -scons は下記でインストールできます。(上記リンクにも記載あり) +You can install scons using the following command (also listed in the official documentation): ```bat python -m pip install scons @@ -74,48 +79,49 @@ python -m pip install scons ## macOS -[Godot公式のコンパイル手順](https://docs.godotengine.org/ja/4.x/contributing/development/compiling/compiling_for_macos.html) +[Godot official compilation instructions](https://docs.godotengine.org/ja/4.x/contributing/development/compiling/compiling_for_macos.html) -必要なツール -* Xcode -* Python 3.6 以降 -* scons 3.0 以降 -* Vulkan SDK for MoltenVK (4 対応用) -* emscripten (optional) -* Android SDK / Android NDK (optional) +Required tools: -Xcode 以外は [Homebrew](https://brew.sh/) でインストールができます。 +* Xcode +* Python 3.6 or later +* scons 3.0 or later +* Vulkan SDK for MoltenVK (required for Godot 4) +* emscripten (optional) +* Android SDK / Android NDK (optional) + +Except for Xcode, you can install the necessary tools with [Homebrew](https://brew.sh/): ```sh -brew install python3 scons +brew install python3 scons ``` ```sh brew install molten-vk ``` -ホストアーキテクチャとは異なるアーキテクチャの Godot Engine をビルドする場合や Universal Binary 対応 Godot Engine をビルドする場合は `molten-vk` の代わりに Universal Binary 対応している [Vulkan SDK for MoltenVK](https://vulkan.lunarg.com/sdk/home) をインストールしてください。 +When building Godot Engine for an architecture different from the host, or for Universal Binary support, install the Universal Binary–compatible version of the [Vulkan SDK for MoltenVK](https://vulkan.lunarg.com/sdk/home) instead of `molten-vk` from Homebrew. -(Optional) target を Web のビルドをする際は emscripten をインストールしてください。 +(Optional) When building for Web targets, install emscripten: ```sh brew install emscripten ``` -(Optional) target を Android のビルドをする際は Android NDK をインストールしてください。 - +(Optional) When building for Android targets, install the Android NDK. ## Linux -T.B.D -# ビルド -## Windows -### 4 +T.B.D. -[build.ps1](./scripts/build.ps1) でビルド可能です。 +# Build +## Windows + +### 4 -成果物は `godot\bin` に格納されます。 +You can build using [build.ps1](./scripts/build.ps1). +Outputs are stored in `godot\bin`. **PowerShell** @@ -133,8 +139,8 @@ PowerShell.exe -ExecutionPolicy Bypass -File .\scripts\build.ps1 ### 3.x -[build-v3.ps1](./scripts/build-v3.ps1) でビルド可能です。 -成果物は `godot\bin` に格納されます。 +You can build using [build-v3.ps1](./scripts/build-v3.ps1). +Outputs are stored in `godot\bin`. **PowerShell** @@ -150,19 +156,19 @@ set PYTHONUTF8=1 PowerShell.exe -ExecutionPolicy Bypass -File .\scripts\build-v3.ps1 ``` -## macOS ビルド +## macOS Build ### 4 -[build.sh](./scripts/build.sh) でビルド可能です。 -成果物は `godot/bin` に格納されます。 +You can build using [build.sh](./scripts/build.sh). +Outputs are stored in `godot/bin`. ```sh ./scripts/build.sh ``` -引数を指定しない場合はホストマシンのアーキテクチャと同じアーキテクチャ向けにビルドします。 -アーキテクチャを明示的に指定する場合は `arch=` に引数を追加してください。 +If no architecture argument is provided, the build will target the same architecture as the host machine. +To explicitly specify an architecture, add an argument to `arch=`. **Universal Binary (supports both arm64 and x86_64)** @@ -182,19 +188,19 @@ PowerShell.exe -ExecutionPolicy Bypass -File .\scripts\build-v3.ps1 ./scripts/build.sh arch=x86_64 ``` -`godot/Godot.app` を開いて起動を確認します。 +Open `godot/Godot.app` to verify the build runs. ### 3.x -[build-v3.sh](./scripts/build-v3.sh) でビルド可能です。 -成果物は `godot/bin` に格納されます。 +You can build using [build-v3.sh](./scripts/build-v3.sh). +Outputs are stored in `godot/bin`. ```sh ./scripts/build-v3.sh ``` -引数を指定しない場合はホストマシンのアーキテクチャと同じアーキテクチャ向けにビルドします。 -アーキテクチャを明示的に指定する場合は `arch=` に引数を追加してください。 +If no architecture argument is provided, the build will target the same architecture as the host machine. +To explicitly specify an architecture, add an argument to `arch=`. **Universal Binary (supports both arm64 and x86_64)** @@ -214,14 +220,14 @@ PowerShell.exe -ExecutionPolicy Bypass -File .\scripts\build-v3.ps1 ./scripts/build-v3.sh arch=x86_64 ``` -`godot/Godot.app` を開いて起動を確認します。 - +Open `godot/Godot.app` to verify it launches properly. # GDExtension -## Windows -[build-extension.ps1](./scripts/build-extension.ps1) でビルド可能です。 -成果物は `bin` ディレクトリに格納されます。 +## Windows + +You can build using [build-extension.ps1](./scripts/build-extension.ps1). +Outputs are placed in the `bin` directory. **PowerShell** @@ -237,82 +243,94 @@ set PYTHONUTF8=1 PowerShell.exe -ExecutionPolicy Bypass -File .\scripts\build-extension.ps1 ``` -## macOS, linux, iOS, Android, Web ビルド - -macOS か Linux で実行してください。 +## macOS, Linux, iOS, Android, Web Builds -[build-extension.sh](./scripts/build-extension.sh) でビルド可能です。 -成果物は `bin` ディレクトリに格納されます。 +Run on macOS or Linux. +You can build using [build-extension.sh](./scripts/build-extension.sh). +Outputs are stored in the `bin` directory. ```sh ./scripts/build-extension.sh ``` +# Release Build -# リリースビルド ## 4 -各プラットフォームの godot の `editor`, `template_debug`, `template_release` をまとめてビルドスクリプトは下記の通りです。 +Below are the scripts that build all Godot platform binaries (`editor`, `template_debug`, `template_release`). + +Windows -windows ``` .\scripts\release-windows.ps1 ``` macOS + ```sh ./scripts/release-macos.sh ``` Linux + ```sh ./scripts/release-linux.sh ``` iOS + ```sh ./scripts/release-ios.sh ``` Android + ```sh ./scripts/release-android.sh ``` Web + ```sh ./scripts/release-web.sh ``` ## GDExtension -各プラットフォームの gdextension の `editor`, `template_debug`, `template_release` をまとめてビルドスクリプトは下記の通りです。 -windows +Below are the scripts that build all GDExtension platform binaries (`editor`, `template_debug`, `template_release`). + +Windows + ``` .\scripts\release-gdextension-windows.ps1 ``` macOS + ```sh ./scripts/release-gdextension-macos.sh ``` Linux + ```sh ./scripts/release-gdextension-linux.sh ``` iOS + ```sh ./scripts/release-gdextension-ios.sh ``` Android + ```sh ./scripts/release-gdextension-android.sh ``` Web + ```sh ./scripts/release-gdextension-web.sh ``` diff --git a/README.ja.md b/README.ja.md new file mode 100644 index 0000000..d8777ff --- /dev/null +++ b/README.ja.md @@ -0,0 +1,85 @@ +[**日本語**](./README.ja.md) | [**English**](./README.md) + +# SpriteStudioPlayer for Godot + +# はじめに + +本プラグインは [OPTPiX SpriteStudio](https://www.webtech.co.jp/spritestudio/index.html) で作成したアニメーションを [Godot Engine](https://godotengine.org/) 上で再生するためのプラグインです。 + +実行時パフォーマンスを優先するため C++ モジュールの形態になっています。 +SpriteStudioPlayer for Godot を利用する場合、SpriteStudioPlayer の[カスタムモジュール](https://docs.godotengine.org/en/stable/contributing/development/core_and_modules/custom_modules_in_cpp.html) を組み込んだ Godot Engine の Editor を手元でビルドするか、 SpriteStudioPlayer の [GDExtension](https://docs.godotengine.org/en/stable/tutorials/scripting/gdextension/what_is_gdextension.html) をプロジェクトへ入れる必要があります。 + +## 対応する [OPTPiX SpriteStudio](https://www.webtech.co.jp/spritestudio/index.html) のバージョン + +Ver.6 と Ver.7 に対応しています。 +ただし、Ver.7.1 で追加された新機能(テキスト、サウンド等)には未対応です。 + +## 対応する [Godot Engine](https://github.com/godotengine/godot) のバージョン + +- [4.4 ブランチ](https://github.com/godotengine/godot/tree/4.4)で Windows / macOS でビルド、および実行を確認しています。 +- [3.x ブランチ](https://github.com/godotengine/godot/tree/3.x)で Windows / macOS でビルド、および実行を確認しています。 + +# ビルド + +[BUILD.md](BUILD.md) を参照してください。 + +# 使い方 + +[USAGE.md](USAGE.md) を参照してください。 + +# サンプル + +[examples フォルダ](./examples/)にサンプルプロジェクトがあります。 + +**サンプルプロジェクトは 3.x 向けに作っているため、4.4 で利用する際は "Convert Full Project" を実行してから利用してください。** + +## [feature_test](./examples/feature_test) + +基本機能のテストプロジェクトです。 +以下のシーンがあります。 + +- [v6_feature.tscn](./examples/feature_test/v6_feature.tscn) + - SpriteStudio v6.0~v7.0 までの各機能の再生状態を確認できます。 + - 確認したい機能ノードの可視性を有効にしてください。 + - Signal、UserData はそれぞれシグナル、ユーザーデータのキーに到達したタイミングでGodotのシグナルを発行するようになっています。 + - シーンを実行するとコンソールに受信したパラメータが出力されます。 + - ssdata サブフォルダにインポート元のプロジェクトファイル(v6_all.sspj)があります。 +- [sspj_load.tscn](./examples/feature_test/sspj_load.tscn) + - GDスクリプトからSSプロジェクトをロードしアニメーションを指定して再生するサンプルです。 + - アニメーション終了時に別のSSプロジェクトに読み替えるようになっています。 +- [texture_change.tscn](./examples/feature_test/texture_change.tscn) + - 再生中にセルマップリソースのテクスチャを変更するサンプルです。 + - インスペクタにある Change のチェックをOn/Offすると切り替わります。 + +## [mesh_bone](./examples/mesh_bone) + +メッシュ、ボーン、エフェクトなどを利用したキャラクターアニメのサンプルです。 + +## [particle_effect](./examples/particle_effect) + +エフェクト機能を利用したサンプルです。 +シーンに表示されるアニメーションは40種類のうちの一部になります。 +インスペクタの Anime Pack からその他のアニメーションも確認できます。 + +## [feature_test_gdextension](./examples/feature_test_gdextension) + +gdextension の動作確認用プロジェクトです。 + +確認できるサンプルは [feature_test](./examples/feature_test) と同じものになります。 + +# お問い合わせ + +ご質問、ご要望、不具合のご報告は [Issues](../../issues) に投稿してください。 +非公開でのお問い合わせを希望される場合は、[ヘルプセンター](https://www.webtech.co.jp/help/ja/spritestudio7/inquiries/ssplayer_tool/) よりお寄せください。 +再現データなどの送付が必要な場合も、上記ヘルプセンター経由でファイルを送信してください。 + +========================================================= + +株式会社CRI・ミドルウェア +​https://www.cri-mw.co.jp/ +Copyright © CRI Middleware Co., Ltd. + +========================================================= + +* SpriteStudio, Web Technologyは、株式会社ウェブテクノロジの登録商標です。 +* その他の商品名は各社の登録商標または商標です。 diff --git a/README.md b/README.md index a7ebb27..b44dfd3 100644 --- a/README.md +++ b/README.md @@ -1,83 +1,96 @@ +[**日本語**](./README.ja.md) | [**English**](./README.md) + # SpriteStudioPlayer for Godot -# はじめに +## Introduction + +This plugin enables playback of animations created with +[OPTPiX SpriteStudio](https://www.webtech.co.jp/spritestudio/index.html) +within the [Godot Engine](https://godotengine.org/). + +To prioritize runtime performance, the plugin is implemented as a C++ module. + +To use SpriteStudioPlayer for Godot, you must either: + +- Build the Godot Engine editor with the SpriteStudioPlayer [custom module](https://docs.godotengine.org/en/stable/contributing/development/core_and_modules/custom_modules_in_cpp.html), **or** +- Add the SpriteStudioPlayer [GDExtension](https://docs.godotengine.org/en/stable/tutorials/scripting/gdextension/what_is_gdextension.html) to your project. -本プラグインは [OPTPiX SpriteStudio](https://www.webtech.co.jp/spritestudio/index.html) で作成したアニメーションを [Godot Engine](https://godotengine.org/) 上で再生するためのプラグインです。 +## Supported Versions of OPTPiX SpriteStudio -実行時パフォーマンスを優先するため C++ モジュールの形態になっています。 -SpriteStudioPlayer for Godot を利用する場合、SpriteStudioPlayer の[カスタムモジュール](https://docs.godotengine.org/en/stable/contributing/development/core_and_modules/custom_modules_in_cpp.html) を組み込んだ Godot Engine の Editor を手元でビルドするか、 SpriteStudioPlayer の [GDExtension](https://docs.godotengine.org/en/stable/tutorials/scripting/gdextension/what_is_gdextension.html) をプロジェクトへ入れる必要があります。 +Supports SpriteStudio **Ver.6** and **Ver.7**. +*Note: New features added in Ver. 7.1 (text, sound, etc.) are not supported.* -## 対応する [OPTPiX SpriteStudio](https://www.webtech.co.jp/spritestudio/index.html) のバージョン +## Supported Versions of Godot Engine -Ver.6 と Ver.7 に対応しています。 -ただし、Ver.7.1 で追加された新機能(テキスト、サウンド等)には未対応です。 +- [4.4 branch](https://github.com/godotengine/godot/tree/4.4): + Verified build and execution on Windows / macOS +- [3.x branch](https://github.com/godotengine/godot/tree/3.x): + Verified build and execution on Windows / macOS -## 対応する [Godot Engine](https://github.com/godotengine/godot) のバージョン +## Build -- [4.4 ブランチ](https://github.com/godotengine/godot/tree/4.4)で Windows / macOS でビルド、および実行を確認しています。 -- [3.x ブランチ](https://github.com/godotengine/godot/tree/3.x)で Windows / macOS でビルド、および実行を確認しています。 +See **[BUILD.md](BUILD.md)**. -# ビルド +## Usage -[BUILD.md](BUILD.md) を参照してください。 +See **[USAGE.md](USAGE.md)**. -# 使い方 +## Samples -[USAGE.md](USAGE.md) を参照してください。 +Sample projects are available in the **[examples folder](./examples/)**. -# サンプル +**Note:** +These samples were created for **Godot 3.x**. +For use with **Godot 4.4**, please run **“Convert Full Project”** first. -[examples フォルダ](./examples/)にサンプルプロジェクトがあります。 +### [feature_test](./examples/feature_test) -**サンプルプロジェクトは 3.x 向けに作っているため、4.4 で利用する際は "Convert Full Project" を実行してから利用してください。** +Basic functional test project with the following scenes: -## [feature_test](./examples/feature_test) +- **v6_feature.tscn** + - Verify features supported from SpriteStudio v6.0 to v7.0 + - Enable visibility of nodes you want to inspect + - `Signal` & `UserData` trigger Godot signals when reaching their keys + - Parameters appear in the console + - Original project (`v6_all.sspj`) is located under `ssdata/` -基本機能のテストプロジェクトです。 -以下のシーンがあります。 +- **sspj_load.tscn** + - Loads SS projects via GDScript and plays selected animations + - Automatically switches to another SS project when playback finishes -- [v6_feature.tscn](./examples/feature_test/v6_feature.tscn) - - SpriteStudio v6.0~v7.0 までの各機能の再生状態を確認できます。 - - 確認したい機能ノードの可視性を有効にしてください。 - - Signal、UserData はそれぞれシグナル、ユーザーデータのキーに到達したタイミングでGodotのシグナルを発行するようになっています。 - - シーンを実行するとコンソールに受信したパラメータが出力されます。 - - ssdata サブフォルダにインポート元のプロジェクトファイル(v6_all.sspj)があります。 -- [sspj_load.tscn](./examples/feature_test/sspj_load.tscn) - - GDスクリプトからSSプロジェクトをロードしアニメーションを指定して再生するサンプルです。 - - アニメーション終了時に別のSSプロジェクトに読み替えるようになっています。 -- [texture_change.tscn](./examples/feature_test/texture_change.tscn) - - 再生中にセルマップリソースのテクスチャを変更するサンプルです。 - - インスペクタにある Change のチェックをOn/Offすると切り替わります。 +- **texture_change.tscn** + - Demonstrates dynamic texture replacement + - Toggle “Change” in Inspector to switch textures -## [mesh_bone](./examples/mesh_bone) +### [mesh_bone](./examples/mesh_bone) -メッシュ、ボーン、エフェクトなどを利用したキャラクターアニメのサンプルです。 +Sample using mesh, bone, and effect features for character animation. -## [particle_effect](./examples/particle_effect) +### [particle_effect](./examples/particle_effect) -エフェクト機能を利用したサンプルです。 -シーンに表示されるアニメーションは40種類のうちの一部になります。 -インスペクタの Anime Pack からその他のアニメーションも確認できます。 +Sample demonstrating effect animation features. +Displays one of 40 possible animations. +More animations can be tested through the Anime Pack. -## [feature_test_gdextension](./examples/feature_test_gdextension) +### [feature_test_gdextension](./examples/feature_test_gdextension) -gdextension の動作確認用プロジェクトです。 +Test project for GDExtension operation. +Provides the same samples as `feature_test`. -確認できるサンプルは [feature_test](./examples/feature_test) と同じものになります。 +## Contact -# お問い合わせ +For questions, feature requests, or bug reports, please post to **[Issues](../../issues)**. -ご質問、ご要望、不具合のご報告は [Issues](../../issues) に投稿してください。 -非公開でのお問い合わせを希望される場合は、[ヘルプセンター](https://www.webtech.co.jp/help/ja/spritestudio7/inquiries/ssplayer_tool/) よりお寄せください。 -再現データなどの送付が必要な場合も、上記ヘルプセンター経由でファイルを送信してください。 +For private inquiries, contact us via the +[Help Center](https://www.webtech.co.jp/help/ja/spritestudio7/inquiries/ssplayer_tool/). ========================================================= -株式会社CRI・ミドルウェア -​https://www.cri-mw.co.jp/ +CRI Middleware Co., Ltd. +https://www.cri-mw.co.jp/ Copyright © CRI Middleware Co., Ltd. ========================================================= -* SpriteStudio, Web Technologyは、株式会社ウェブテクノロジの登録商標です。 -* その他の商品名は各社の登録商標または商標です。 +* SpriteStudio and Web Technology are registered trademarks of Web Technology Corp. +* Other product names are registered trademarks or trademarks of their respective companies. diff --git a/USAGE.ja.md b/USAGE.ja.md new file mode 100644 index 0000000..ce541ee --- /dev/null +++ b/USAGE.ja.md @@ -0,0 +1,200 @@ +[**日本語**](./USAGE.ja.md) | [**English**](./USAGE.md) + +# エディタの選択 +下記どちらかの方法で利用してください。 + +## SpriteStudioPlayer のカスタムモジュールを組み込んだ Godot Engine を利用する +[BUILD.md](BUILD.md) を参照して SpriteStudioPlayer のカスタムモジュールを組み込んだ Godot をビルドしてください。 + +## SpriteStudioPlayer の GDExtension ファイルを利用する +1. 本家サイト(https://godotengine.org/download/) より、該当するバージョンの Godot ダウンロードします。 +2. SpriteStudioPlayer の GDExtension ファイルを用意します。 + - [リリース](https://github.com/SpriteStudio/SSPlayerForGodot/releases) に GDExtension ファイルの成果物を用意しているので、そちらを利用してください。 + - GDExtension を自前でビルドする場合は [BUILD.md](BUILD.md) を参照してください +3. SpriteStudioPlayer の GDExtension ファイルをプロジェクトディレクトリの `bin` ディレクトリへ格納します。 + + +# SpriteStudioデータのインポート + +SpriteStudioデータのインポート手順について説明します。 +現在の SpriteStudio for Godot プラグインでは sspj ファイルを直接指定する形態になっています。 +ご利用のプロジェクト下のフォルダに sspj、ssae、ssce と画像ファイルなどの一式を配置します。 + +# SpriteStudioノードの作成と sspj ファイルの指定 + +1. 「Node を新規作成」から「GdNodeSsPlayer」を選択し、「作成」ボタンを押します。 +2. インスペクターの「Res Player」から「新規 GdResourceSsPlayer」を選択します。 +3. GdResourceSsPlayer の「Res Project」から「読み込み」を選択します。 +4. 「ファイルを開く」ダイアログから「*.sspj」ファイルを選択して開きます。 + +# アニメーションの指定 + +1. 「Animation Settings」を展開「Anime Pack」から再生させる「*.ssae」ファイルを選択します。 +2. 続いて「Animation」から再生させるアニメーションを選択します。 +3. Frame をドラッグしたり、Play フラグをオンにすることでプレビューできます。 + +## インスペクターの各プロパティの意味 + +![image](./doc_images/ssnode_inspector.png) + +``` +GdNodeSsPlayer - SsPlayer を扱うノード +├── Res Player - SsPlayer が使用するリソース +│ └── Res Project - sspj ファイル +│ └── CellMap Settings - セルマップの設定 +│ ├── ssce File 01 - セルマップ +│ └── ssce File 02 - セルマップ +│ +└── Animation Settings - アニメーションの設定 + ├── Anime Pack - アニメパック + ├── Animation - アニメーション + ├── Frame - 現在のフレーム + ├── Loop - ループ再生フラグ + ├── Playing - 再生フラグ + └── Texture Interpolate - テクスチャ補間フラグ +``` + +## テクスチャ補間フラグについて + +SSPlayer for Godot の実装(v1.2.0時点)では、一度アニメーションをテクスチャにレンダリングした後、Godot のレンダラーによってスクリーンバッファに描画されます。 +このテクスチャにレンダリングする際にバイリニア補間をかける場合はフラグをオンに設定します。 +この状態では回転して斜めになったパーツのエッジにアンチエイリアスがかかりますが、この動作が好ましくない場合はオフにしてください。 +このフラグをオフに設定し、CanvasItem の Texture の FilterMode も Nearest にしておくとスクリーンバッファに描画する際にも補間がかからずピクセルのエッジが明確になります。 +例えばピクセルアート系のゲームで利用する場合は、この設定を試してみて下さい。 + +### レンダリングするテクスチャのサイズ +レンダリングするテクスチャのサイズはSpriteStudio上でアニメーションに設定した「基準枠」のサイズが採用されます。(v1.2.0時点) + +# クラス + +GDScript からコントロールできるクラスの役割と主要なメソッドについて説明します。 +各クラスが持っている全てのメソッド、プロパティ、シグナルについては Godot の Script 画面で確認してみてください。 + +## リソース管理クラス + +SpriteStudio の各種 .ss** ファイルに相当するリソースを管理するクラスがあります。 + +### [GdResourceSsProject](./gd_spritestudio/gd_resource_ssproject.h) クラス + +1つの sspj ファイルに相当するリソースを取り扱うクラスです。 +sspj に登録された ssae, ssce, ssee 各々のリソースの取得と設定を行います。 + +### [GdResourceSsCellMap](./gd_spritestudio/gd_resource_sscellmap.h) クラス + +1つの ssce ファイルに相当するリソースを取り扱うクラスです。 +現在テクスチャの取得と設定を行うメンバーのみ対応しています。 + +### [GdResourceSsAnimePack](./gd_spritestudio/gd_resource_ssanimepack.h) クラス + +1つの ssae ファイルに相当するリソースを取り扱うクラスです。 +内包しているアニメーションの数、とアニメーション名の取得を行えます。 + +### [GdResourceSsPlayer](./gd_spritestudio/gd_resource_ssplayer.h) クラス + +現在 GdResourceSsProject リソースを設定、取得するアクセサのみです。 + +## 再生のためのクラス + +GdNodeSsPlayer に前述のリソースを指定することで再生を行います。 +以下はファイルの読み込みから再生開始までのシンプルなサンプルコードです。 + +```python +# GdNodeSsPlayerノードを指します。 +## Godot 4 +@onread var ssnode = $target +## Godot 3.x +# onready var ssnode = $target + +func _ready(): + # sspj ファイルを読み込みます。 + ssnode.res_player.res_project = ResourceLoader.load("Sample.sspj") + + # ssaeファイルとアニメーションを指定します。 + ssnode.set_anime_pack("Sample.ssae") + ssnode.set_animation("anime_1") + + # アニメーション終了時コールバックの設定 + ## Godot 4 + ssnode.connect("animation_finished", Callable(self, "_on_animation_finished")) + ## Godot 3.x + # ssnode.connect("animation_finished", self, "_on_animation_finished") + + # ループを指定して再生を開始します。 + ssnode.set_loop(true) + ssnode.play() + +# アニメ終了時のコールバック関数です +func _on_animation_finished(name): + print("SIGNAL _on_animation_finished from " + name) +``` + +他にもカレントフレームの指定、一時停止、開始、終了フレーム、FPSの取得など一般的なメソッドがあります。 +一覧は Godot の Script 画面で確認してみてください。 + +### シグナル + +GdNodeSsPlayer が発行するシグナルについて説明します。 + +### on_animation_changed(name: String) + +アニメーション変更時に発行されます。 +name:変更したアニメーション名 + +### on_animation_finished(name: String) + +再生中のアニメーションが終了フレームに到達した時に発行されます。 +ループ再生オンでも毎周発行されます。 +name:変更したアニメーション名 + +### on_animepack_changed(name: String) + +アニメパック変更時に発行されます。 +name:変更したアニメパック名 + +### on_frame_changed(frame: int) + +フレーム位置変更時に発行されます。 +frame:変更したフレーム位置 + +### on_signal(command: String, value: Dictionary) + +SpriteStudioのシグナルアトリビュートのキーフレーム到達時に発行されます。 +command:コマンド名 +value:パラメータ名と値のコレクション + +### on_user_data(flag: int, intValue: int, rectValue: Rect2, pointValue: Vector2, stringValue: String) + +ユーザーデータのキーフレーム到達時に発行されます。 + +- flag:後続の引数が有効かどうかの論理値 + - 1:整数が有効 + - 2:範囲が有効 + - 4:位置が有効 + - 8:文字列が有効 +- intValue:整数 +- rectValue:範囲 +- pointValue:位置 +- stringValue:文字列 + +# 制限事項 + +## 動作しないもの + +- マスク機能 +- 描画モード:ミックス以外もミックス相当になります。 +- SpriteStudio Ver.7.1 で追加された新機能(テキスト・サウンド・9スライス・シェイプ) + +## 表示が異なるもの + +- パーツカラー + - [x] v1.1.1 で修正済:ミックスの頂点単位の時にX状(三角形の辺部分)の輝度が高くなっています。 + - [x] v1.1 で修正済:乗算でテクスチャカラーの割合がエディタより大きくなります。 + +## その他の制限 + +- インスタンスの独立動作がOnのパーツの再生について + - シーン上で Frame プロパティが 0 以外の状態で Play プロパティを On にして再生開始した場合、独立動作がOnに設定されたインスタンスパーツを再生させた場合、インスタンスパーツの再生フレームがずれることがあります。 + - この場合、一旦 Frame プロパティの値を 0 以外に変更後、0 に戻してから再生開始することで一致させられます。 +- シェーダー + - SpriteStudio公式の一部のみ対応しています。 + - カスタムシェーダーは独自に追加・対応する必要があります。 diff --git a/USAGE.md b/USAGE.md index b01108e..1a7d505 100644 --- a/USAGE.md +++ b/USAGE.md @@ -1,198 +1,207 @@ -# エディタの選択 -下記どちらかの方法で利用してください。 +[**日本語**](./USAGE.ja.md) | [**English**](./USAGE.md) -## SpriteStudioPlayer のカスタムモジュールを組み込んだ Godot Engine を利用する -[BUILD.md](BUILD.md) を参照して SpriteStudioPlayer のカスタムモジュールを組み込んだ Godot をビルドしてください。 +# Choosing the Editor -## SpriteStudioPlayer の GDExtension ファイルを利用する -1. 本家サイト(https://godotengine.org/download/) より、該当するバージョンの Godot ダウンロードします。 -2. SpriteStudioPlayer の GDExtension ファイルを用意します。 - - [リリース](https://github.com/SpriteStudio/SSPlayerForGodot/releases) に GDExtension ファイルの成果物を用意しているので、そちらを利用してください。 - - GDExtension を自前でビルドする場合は [BUILD.md](BUILD.md) を参照してください -3. SpriteStudioPlayer の GDExtension ファイルをプロジェクトディレクトリの `bin` ディレクトリへ格納します。 +Use one of the following methods: +## Using Godot Engine with the SpriteStudioPlayer Custom Module -# SpriteStudioデータのインポート +Build Godot with the SpriteStudioPlayer custom module included. +See [BUILD.md](BUILD.md) for instructions. -SpriteStudioデータのインポート手順について説明します。 -現在の SpriteStudio for Godot プラグインでは sspj ファイルを直接指定する形態になっています。 -ご利用のプロジェクト下のフォルダに sspj、ssae、ssce と画像ファイルなどの一式を配置します。 +## Using the SpriteStudioPlayer GDExtension Files -# SpriteStudioノードの作成と sspj ファイルの指定 +1. Download the appropriate version of Godot from the official website: + https://godotengine.org/download/ +2. Prepare the SpriteStudioPlayer GDExtension files: + - Prebuilt binaries are available under [Releases](https://github.com/SpriteStudio/SSPlayerForGodot/releases). + - To build the GDExtension yourself, see [BUILD.md](BUILD.md). +3. Place the SpriteStudioPlayer GDExtension files into your project’s `bin` directory. -1. 「Node を新規作成」から「GdNodeSsPlayer」を選択し、「作成」ボタンを押します。 -2. インスペクターの「Res Player」から「新規 GdResourceSsPlayer」を選択します。 -3. GdResourceSsPlayer の「Res Project」から「読み込み」を選択します。 -4. 「ファイルを開く」ダイアログから「*.sspj」ファイルを選択して開きます。 +# Importing SpriteStudio Data -# アニメーションの指定 +This section explains how to import SpriteStudio data. +With the current SpriteStudio for Godot plugin, `.sspj` files are specified directly. +Place the `.sspj`, `.ssae`, `.ssce`, and related image files in a folder under your project. -1. 「Animation Settings」を展開「Anime Pack」から再生させる「*.ssae」ファイルを選択します。 -2. 続いて「Animation」から再生させるアニメーションを選択します。 -3. Frame をドラッグしたり、Play フラグをオンにすることでプレビューできます。 +# Creating a SpriteStudio Node and Specifying the SSPJ File -## インスペクターの各プロパティの意味 +1. Create a new node and select **GdNodeSsPlayer**, then click **Create**. +2. In the Inspector, select **New GdResourceSsPlayer** under **Res Player**. +3. Under **Res Project**, select **Load**. +4. Choose the `*.sspj` file from the file dialog. + +# Selecting an Animation + +1. Expand **Animation Settings**, then select the `*.ssae` file you want to play from **Anime Pack**. +2. Next, choose the animation you want to play under **Animation**. +3. You can preview the animation by dragging the **Frame** slider or enabling the **Play** flag. + +## Meaning of Inspector Properties ![image](./doc_images/ssnode_inspector.png) ``` -GdNodeSsPlayer - SsPlayer を扱うノード -├── Res Player - SsPlayer が使用するリソース -│ └── Res Project - sspj ファイル -│ └── CellMap Settings - セルマップの設定 -│ ├── ssce File 01 - セルマップ -│ └── ssce File 02 - セルマップ +GdNodeSsPlayer - Node that handles the SsPlayer +├── Res Player - Resource used by the SsPlayer +│ └── Res Project - SSPJ file +│ └── CellMap Settings - Cellmap settings +│ ├── ssce File 01 - Cellmap +│ └── ssce File 02 - Cellmap │ -└── Animation Settings - アニメーションの設定 - ├── Anime Pack - アニメパック - ├── Animation - アニメーション - ├── Frame - 現在のフレーム - ├── Loop - ループ再生フラグ - ├── Playing - 再生フラグ - └── Texture Interpolate - テクスチャ補間フラグ +└── Animation Settings - Animation settings + ├── Anime Pack - Animation pack + ├── Animation - Animation + ├── Frame - Current frame + ├── Loop - Loop playback flag + ├── Playing - Playback flag + └── Texture Interpolate - Texture interpolation flag ``` -## テクスチャ補間フラグについて +## About the Texture Interpolation Flag -SSPlayer for Godot の実装(v1.2.0時点)では、一度アニメーションをテクスチャにレンダリングした後、Godot のレンダラーによってスクリーンバッファに描画されます。 -このテクスチャにレンダリングする際にバイリニア補間をかける場合はフラグをオンに設定します。 -この状態では回転して斜めになったパーツのエッジにアンチエイリアスがかかりますが、この動作が好ましくない場合はオフにしてください。 -このフラグをオフに設定し、CanvasItem の Texture の FilterMode も Nearest にしておくとスクリーンバッファに描画する際にも補間がかからずピクセルのエッジが明確になります。 -例えばピクセルアート系のゲームで利用する場合は、この設定を試してみて下さい。 +In the current implementation of SSPlayer for Godot (as of v1.2.0), the animation is first rendered into a texture and then drawn to the screen buffer by Godot’s renderer. +Enable this flag if you want bilinear interpolation applied when rendering to the texture. +When enabled, anti-aliasing is applied to the edges of parts that have been rotated or angled. If this is undesirable, disable the flag. +If you turn this flag off and also set the CanvasItem’s **Texture → FilterMode** to **Nearest**, interpolation will not be applied when drawing to the screen buffer, resulting in crisp pixel edges. +This is especially useful for pixel‑art style games, so consider trying this configuration. -### レンダリングするテクスチャのサイズ -レンダリングするテクスチャのサイズはSpriteStudio上でアニメーションに設定した「基準枠」のサイズが採用されます。(v1.2.0時点) +### Texture Size Used for Rendering -# クラス +The texture size used during rendering is based on the **“Base Frame”** size configured for the animation in SpriteStudio. (As of v1.2.0) -GDScript からコントロールできるクラスの役割と主要なメソッドについて説明します。 -各クラスが持っている全てのメソッド、プロパティ、シグナルについては Godot の Script 画面で確認してみてください。 +# Classes -## リソース管理クラス +This section describes the roles and primary methods of the classes that can be controlled via GDScript. +For the full list of methods, properties, and signals for each class, refer to the Script view in Godot. -SpriteStudio の各種 .ss** ファイルに相当するリソースを管理するクラスがあります。 +## Resource Management Classes -### [GdResourceSsProject](./gd_spritestudio/gd_resource_ssproject.h) クラス +These classes correspond to the various `.ss**` files of SpriteStudio. -1つの sspj ファイルに相当するリソースを取り扱うクラスです。 -sspj に登録された ssae, ssce, ssee 各々のリソースの取得と設定を行います。 +### [GdResourceSsProject](./gd_spritestudio/gd_resource_ssproject.h) -### [GdResourceSsCellMap](./gd_spritestudio/gd_resource_sscellmap.h) クラス +Manages a single `sspj` file. +Handles retrieving and setting the resources registered in the sspj: `ssae`, `ssce`, and `ssee`. -1つの ssce ファイルに相当するリソースを取り扱うクラスです。 -現在テクスチャの取得と設定を行うメンバーのみ対応しています。 +### [GdResourceSsCellMap](./gd_spritestudio/gd_resource_sscellmap.h) -### [GdResourceSsAnimePack](./gd_spritestudio/gd_resource_ssanimepack.h) クラス +Manages a single `ssce` file. +Currently supports only retrieving and setting the texture. -1つの ssae ファイルに相当するリソースを取り扱うクラスです。 -内包しているアニメーションの数、とアニメーション名の取得を行えます。 +### [GdResourceSsAnimePack](./gd_spritestudio/gd_resource_ssanimepack.h) -### [GdResourceSsPlayer](./gd_spritestudio/gd_resource_ssplayer.h) クラス +Manages a single `ssae` file. +Allows retrieving the number of animations and the animation names. -現在 GdResourceSsProject リソースを設定、取得するアクセサのみです。 +### [GdResourceSsPlayer](./gd_spritestudio/gd_resource_ssplayer.h) -## 再生のためのクラス +Provides accessors for setting and retrieving the current `GdResourceSsProject`. -GdNodeSsPlayer に前述のリソースを指定することで再生を行います。 -以下はファイルの読み込みから再生開始までのシンプルなサンプルコードです。 +## Classes for Playback + +Assign the described resources to `GdNodeSsPlayer` to play animations. +Below is a simple example showing file loading and playback: ```python -# GdNodeSsPlayerノードを指します。 +# Reference to the GdNodeSsPlayer node. ## Godot 4 -@onread var ssnode = $target +@onready var ssnode = $target ## Godot 3.x # onready var ssnode = $target func _ready(): - # sspj ファイルを読み込みます。 - ssnode.res_player.res_project = ResourceLoader.load("Sample.sspj") - - # ssaeファイルとアニメーションを指定します。 - ssnode.set_anime_pack("Sample.ssae") - ssnode.set_animation("anime_1") - - # アニメーション終了時コールバックの設定 - ## Godot 4 - ssnode.connect("animation_finished", Callable(self, "_on_animation_finished")) - ## Godot 3.x - # ssnode.connect("animation_finished", self, "_on_animation_finished") - - # ループを指定して再生を開始します。 - ssnode.set_loop(true) - ssnode.play() - -# アニメ終了時のコールバック関数です + # Load the sspj file. + ssnode.res_player.res_project = ResourceLoader.load("Sample.sspj") + + # Specify the ssae file and animation. + ssnode.set_anime_pack("Sample.ssae") + ssnode.set_animation("anime_1") + + # Set the callback for animation completion. + ## Godot 4 + ssnode.connect("animation_finished", Callable(self, "_on_animation_finished")) + ## Godot 3.x + # ssnode.connect("animation_finished", self, "_on_animation_finished") + + # Enable looping and start playback. + ssnode.set_loop(true) + ssnode.play() + +# Callback function for when the animation finishes. func _on_animation_finished(name): - print("SIGNAL _on_animation_finished from " + name) + print("SIGNAL _on_animation_finished from " + name) ``` -他にもカレントフレームの指定、一時停止、開始、終了フレーム、FPSの取得など一般的なメソッドがあります。 -一覧は Godot の Script 画面で確認してみてください。 +Other standard methods include selecting the current frame, pausing, playing, setting the end frame, retrieving FPS, and more. +The full list can be checked in Godot's Script view. -### シグナル +### Signals -GdNodeSsPlayer が発行するシグナルについて説明します。 +The signals emitted by `GdNodeSsPlayer` are described below. ### on_animation_changed(name: String) -アニメーション変更時に発行されます。 -name:変更したアニメーション名 +Emitted when the animation changes. +`name`: Name of the new animation ### on_animation_finished(name: String) -再生中のアニメーションが終了フレームに到達した時に発行されます。 -ループ再生オンでも毎周発行されます。 -name:変更したアニメーション名 +Emitted when the animation reaches its final frame. +This is emitted each loop when looping is enabled. +`name`: Name of the animation that finished ### on_animepack_changed(name: String) -アニメパック変更時に発行されます。 -name:変更したアニメパック名 +Emitted when the anime pack changes. +`name`: Name of the new anime pack ### on_frame_changed(frame: int) -フレーム位置変更時に発行されます。 -frame:変更したフレーム位置 +Emitted when the frame position changes. +`frame`: Updated frame index ### on_signal(command: String, value: Dictionary) -SpriteStudioのシグナルアトリビュートのキーフレーム到達時に発行されます。 -command:コマンド名 -value:パラメータ名と値のコレクション +Emitted when reaching a keyframe containing a SpriteStudio signal attribute. +`command`: Command name +`value`: Dictionary of parameter names and values ### on_user_data(flag: int, intValue: int, rectValue: Rect2, pointValue: Vector2, stringValue: String) -ユーザーデータのキーフレーム到達時に発行されます。 +Emitted when reaching a keyframe with user data. + +- `flag`: Bitmask indicating which values are valid + - `1`: Integer is valid + - `2`: Rect is valid + - `4`: Position is valid + - `8`: String is valid +- `intValue`: Integer +- `rectValue`: Rect +- `pointValue`: Position +- `stringValue`: String -- flag:後続の引数が有効かどうかの論理値 - - 1:整数が有効 - - 2:範囲が有効 - - 4:位置が有効 - - 8:文字列が有効 -- intValue:整数 -- rectValue:範囲 -- pointValue:位置 -- stringValue:文字列 +# Limitations -# 制限事項 +## Not Supported -## 動作しないもの +- Mask functionality +- Drawing modes: all modes behave like Mix +- New features added in SpriteStudio Ver. 7.1 + (Text, Sound, 9‑slice, Shape) -- マスク機能 -- 描画モード:ミックス以外もミックス相当になります。 -- SpriteStudio Ver.7.1 で追加された新機能(テキスト・サウンド・9スライス・シェイプ) +## Differences in Display -## 表示が異なるもの +- Parts Color + - [x] Fixed in v1.1.1: Brightness of X‑shaped (triangle edge) portions was too high when using vertex‑level Mix mode + - [x] Fixed in v1.1: Texture color ratio differed from the editor when using Multiply mode -- パーツカラー - - [x] v1.1.1 で修正済:ミックスの頂点単位の時にX状(三角形の辺部分)の輝度が高くなっています。 - - [x] v1.1 で修正済:乗算でテクスチャカラーの割合がエディタより大きくなります。 +## Other Limitations -## その他の制限 +- Independent Instance Behavior + - If **Frame** is set to a non‑zero value when **Play** is turned on, and an instance part with independent playback is used, the instance animation may become misaligned. + - Workaround: Change **Frame** to a non‑zero value, then change it back to 0 before starting playback. -- インスタンスの独立動作がOnのパーツの再生について - - シーン上で Frame プロパティが 0 以外の状態で Play プロパティを On にして再生開始した場合、独立動作がOnに設定されたインスタンスパーツを再生させた場合、インスタンスパーツの再生フレームがずれることがあります。 - - この場合、一旦 Frame プロパティの値を 0 以外に変更後、0 に戻してから再生開始することで一致させられます。 -- シェーダー - - SpriteStudio公式の一部のみ対応しています。 - - カスタムシェーダーは独自に追加・対応する必要があります。 +- Shaders + - Only some of the official SpriteStudio shaders are supported. + - Custom shaders must be implemented manually.