├── .gitignore ├── .idea ├── codeStyles │ └── Project.xml ├── flutter_plugin2.iml ├── libraries │ ├── Dart_SDK.xml │ └── Flutter_Plugins.xml ├── modules.xml ├── vcs.xml └── workspace.xml ├── .metadata ├── CHANGELOG.md ├── LICENSE ├── README.md ├── android ├── .gitignore ├── .idea │ ├── .name │ ├── caches │ │ └── build_file_checksums.ser │ ├── codeStyles │ │ └── Project.xml │ ├── gradle.xml │ ├── jarRepositories.xml │ ├── misc.xml │ ├── modules.xml │ └── runConfigurations.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── settings.gradle └── src │ └── main │ ├── AndroidManifest.xml │ └── java │ └── com │ └── planet │ └── flutter_plugin2 │ ├── Contact.java │ ├── CustomTextViewFactory.java │ ├── FlutterPlugin2Plugin.java │ └── Live2dView.java ├── example ├── .gitignore ├── .metadata ├── README.md ├── android │ ├── .gitignore │ ├── app │ │ ├── build.gradle │ │ └── src │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── planet │ │ │ │ │ └── flutter_plugin2_example │ │ │ │ │ └── MainActivity.java │ │ │ └── res │ │ │ │ ├── drawable │ │ │ │ └── launch_background.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ └── values │ │ │ │ └── styles.xml │ │ │ └── profile │ │ │ └── AndroidManifest.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ ├── res │ │ └── values │ │ │ └── strings_en.arb │ ├── settings.gradle │ └── settings_aar.gradle ├── ios │ ├── .gitignore │ ├── Flutter │ │ ├── AppFrameworkInfo.plist │ │ ├── Debug.xcconfig │ │ └── Release.xcconfig │ ├── Podfile │ ├── Podfile.lock │ ├── Runner.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ │ └── WorkspaceSettings.xcsettings │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── Runner │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ └── Icon-App-83.5x83.5@2x.png │ │ └── LaunchImage.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ └── README.md │ │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ │ ├── Epsilon │ │ ├── Epsilon.cmox │ │ ├── Epsilon_expressions.canx │ │ ├── Epsilon_motions.canx │ │ └── runtime │ │ │ ├── Epsilon.1024 │ │ │ ├── texture_00.png │ │ │ ├── texture_01.png │ │ │ └── texture_02.png │ │ │ ├── Epsilon.moc │ │ │ ├── Epsilon.model.json │ │ │ ├── Epsilon.physics.json │ │ │ ├── expressions │ │ │ ├── f01.exp.json │ │ │ ├── f02.exp.json │ │ │ ├── f03.exp.json │ │ │ ├── f04.exp.json │ │ │ ├── f05.exp.json │ │ │ ├── f06.exp.json │ │ │ ├── f07.exp.json │ │ │ └── f08.exp.json │ │ │ └── motions │ │ │ ├── Epsilon_idle_01.mtn │ │ │ ├── Epsilon_m_01.mtn │ │ │ ├── Epsilon_m_02.mtn │ │ │ ├── Epsilon_m_03.mtn │ │ │ ├── Epsilon_m_04.mtn │ │ │ ├── Epsilon_m_05.mtn │ │ │ ├── Epsilon_m_06.mtn │ │ │ ├── Epsilon_m_07.mtn │ │ │ ├── Epsilon_m_08.mtn │ │ │ ├── Epsilon_m_sp_01.mtn │ │ │ ├── Epsilon_m_sp_02.mtn │ │ │ ├── Epsilon_m_sp_03.mtn │ │ │ ├── Epsilon_m_sp_04.mtn │ │ │ ├── Epsilon_m_sp_05.mtn │ │ │ └── Epsilon_shake_01.mtn │ │ ├── Haru │ │ ├── Haru.1024 │ │ │ ├── texture_00.png │ │ │ ├── texture_01.png │ │ │ └── texture_02.png │ │ ├── Haru.moc │ │ ├── README │ │ └── model.plist │ │ ├── HaruFullPack │ │ ├── haru.model.json │ │ ├── haru.physics.json │ │ ├── haru.pose.json │ │ ├── haru_01.1024 │ │ │ ├── texture_00.png │ │ │ ├── texture_01.png │ │ │ └── texture_02.png │ │ ├── haru_01.moc │ │ ├── haru_01.model.json │ │ ├── haru_02.1024 │ │ │ ├── texture_00.png │ │ │ ├── texture_01.png │ │ │ └── texture_02.png │ │ ├── haru_02.moc │ │ ├── haru_02.model.json │ │ ├── motions │ │ │ ├── expressions │ │ │ │ ├── f01.exp.json │ │ │ │ ├── f02.exp.json │ │ │ │ ├── f03.exp.json │ │ │ │ ├── f04.exp.json │ │ │ │ ├── f05.exp.json │ │ │ │ ├── f06.exp.json │ │ │ │ ├── f07.exp.json │ │ │ │ └── f08.exp.json │ │ │ ├── flick │ │ │ │ └── haru_normal_06.mtn │ │ │ ├── idle │ │ │ │ ├── haru_idle_01.mtn │ │ │ │ ├── haru_idle_02.mtn │ │ │ │ └── haru_idle_03.mtn │ │ │ ├── pinch │ │ │ │ ├── haru_normal_01.mtn │ │ │ │ └── haru_normal_07.mtn │ │ │ ├── shake │ │ │ │ └── haru_normal_03.mtn │ │ │ └── tap │ │ │ │ ├── haru_m_01.mtn │ │ │ │ ├── haru_m_02.mtn │ │ │ │ ├── haru_m_03.mtn │ │ │ │ ├── haru_m_04.mtn │ │ │ │ ├── haru_m_05.mtn │ │ │ │ ├── haru_m_06.mtn │ │ │ │ ├── haru_m_07.mtn │ │ │ │ ├── haru_normal_02.mtn │ │ │ │ ├── haru_normal_04.mtn │ │ │ │ └── haru_normal_05.mtn │ │ └── sounds │ │ │ ├── flick │ │ │ └── haru_normal_06.mp3 │ │ │ ├── pinch │ │ │ ├── haru_normal_01.mp3 │ │ │ └── haru_normal_07.mp3 │ │ │ ├── shake │ │ │ └── haru_normal_03.mp3 │ │ │ └── tap │ │ │ ├── haru_normal_02.mp3 │ │ │ ├── haru_normal_04.mp3 │ │ │ └── haru_normal_05.mp3 │ │ ├── Info.plist │ │ ├── Miku │ │ ├── Miku.2048 │ │ │ └── texture_00.png │ │ ├── Miku.moc │ │ └── model.plist │ │ ├── ShizukuFullPack │ │ ├── motions │ │ │ ├── expressions │ │ │ │ ├── f01.exp.json │ │ │ │ ├── f02.exp.json │ │ │ │ ├── f03.exp.json │ │ │ │ └── f04.exp.json │ │ │ ├── flick │ │ │ │ ├── flickHead01.mtn │ │ │ │ ├── flickHead02.mtn │ │ │ │ └── flickHead03.mtn │ │ │ ├── idle │ │ │ │ ├── idl_00.mtn │ │ │ │ ├── idl_01.mtn │ │ │ │ └── idl_02.mtn │ │ │ ├── pinch │ │ │ │ ├── pinchIn01.mtn │ │ │ │ ├── pinchIn02.mtn │ │ │ │ ├── pinchIn03.mtn │ │ │ │ ├── pinchOut01.mtn │ │ │ │ ├── pinchOut02.mtn │ │ │ │ └── pinchOut03.mtn │ │ │ ├── shake │ │ │ │ ├── shake01.mtn │ │ │ │ ├── shake02.mtn │ │ │ │ └── shake03.mtn │ │ │ └── tap │ │ │ │ ├── tapBody01.mtn │ │ │ │ ├── tapBody02.mtn │ │ │ │ └── tapBody03.mtn │ │ ├── shizuku.1024 │ │ │ ├── texture_00.png │ │ │ ├── texture_01.png │ │ │ ├── texture_02.png │ │ │ ├── texture_03.png │ │ │ ├── texture_04.png │ │ │ └── texture_05.png │ │ ├── shizuku.moc │ │ ├── shizuku.model.json │ │ ├── shizuku.physics.json │ │ ├── shizuku.pose.json │ │ └── sounds │ │ │ ├── flick │ │ │ ├── flickHead01.mp3 │ │ │ ├── flickHead02.mp3 │ │ │ └── flickHead03.mp3 │ │ │ ├── pinch │ │ │ ├── pinchIn01.mp3 │ │ │ ├── pinchIn02.mp3 │ │ │ ├── pinchIn03.mp3 │ │ │ ├── pinchOut01.mp3 │ │ │ ├── pinchOut02.mp3 │ │ │ └── pinchOut03.mp3 │ │ │ ├── shake │ │ │ ├── shake01.mp3 │ │ │ ├── shake02.mp3 │ │ │ └── shake03.mp3 │ │ │ └── tap │ │ │ ├── tapBody01.mp3 │ │ │ ├── tapBody02.mp3 │ │ │ └── tapBody03.mp3 │ │ ├── WankoFullPack │ │ ├── motions │ │ │ ├── idle │ │ │ │ ├── idl_01.mtn │ │ │ │ ├── idl_02.mtn │ │ │ │ ├── idl_03.mtn │ │ │ │ └── idl_04.mtn │ │ │ ├── shake │ │ │ │ ├── shake_01.mtn │ │ │ │ └── shake_02.mtn │ │ │ └── tap │ │ │ │ ├── 01_ote.mtn │ │ │ │ ├── 02_okawari.mtn │ │ │ │ ├── 03_tatsu.mtn │ │ │ │ ├── 04_wan.mtn │ │ │ │ ├── 05_wanwan.mtn │ │ │ │ ├── 06_runrun.mtn │ │ │ │ ├── 07_buruburu.mtn │ │ │ │ ├── 08_petan.mtn │ │ │ │ ├── 09_doya.mtn │ │ │ │ ├── 10_kiri.mtn │ │ │ │ ├── 11_dance01.mtn │ │ │ │ ├── 12_dance02.mtn │ │ │ │ └── 13_dance03.mtn │ │ ├── wanko.1024 │ │ │ └── texture_00.png │ │ ├── wanko.moc │ │ └── wanko.model.json │ │ ├── Wankoromochi │ │ ├── Wankoromochi.1024 │ │ │ └── texture_00.png │ │ ├── Wankoromochi.moc │ │ └── model.plist │ │ ├── back_class_normal.png │ │ ├── back_class_normal1.png │ │ ├── hibiki │ │ ├── hibiki.cmox │ │ ├── hibiki_expressions.canx │ │ ├── hibiki_voice.canx │ │ └── runtime │ │ │ ├── expressions │ │ │ ├── f01.exp.json │ │ │ ├── f02.exp.json │ │ │ ├── f03.exp.json │ │ │ ├── f04.exp.json │ │ │ ├── f05.exp.json │ │ │ └── f06.exp.json │ │ │ ├── hibiki.2048 │ │ │ └── texture_00.png │ │ │ ├── hibiki.moc │ │ │ ├── hibiki.model.json │ │ │ ├── hibiki.physics.json │ │ │ ├── motions │ │ │ ├── hibiki_01.mtn │ │ │ ├── hibiki_02.mtn │ │ │ ├── hibiki_03.mtn │ │ │ ├── hibiki_04.mtn │ │ │ ├── hibiki_05.mtn │ │ │ ├── idle_01.mtn │ │ │ ├── idle_02.mtn │ │ │ ├── idle_03.mtn │ │ │ └── idle_04.mtn │ │ │ └── sounds │ │ │ ├── hibiki_01.mp3 │ │ │ ├── hibiki_02.mp3 │ │ │ ├── hibiki_03.mp3 │ │ │ ├── hibiki_04.mp3 │ │ │ └── hibiki_05.mp3 │ │ ├── hiyori_pro_en │ │ ├── ReadMe.txt │ │ ├── hiyori_pro_en_t02.can3 │ │ └── hiyori_pro_en_t07.cmo3 │ │ └── main.m ├── lib │ ├── generated │ │ └── i18n.dart │ └── main.dart ├── pubspec.lock ├── pubspec.yaml └── test │ └── widget_test.dart ├── flutter_plugin2.iml ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── ios ├── .gitignore ├── Assets │ └── .gitkeep ├── Classes │ ├── FLNativeView.h │ ├── FLNativeView.m │ ├── FlutterPlugin2Plugin.h │ ├── FlutterPlugin2Plugin.m │ ├── PPLive2dView.h │ └── PPLive2dView.mm ├── PPLive2D │ ├── Assets │ │ └── .gitkeep │ ├── Live2D │ │ ├── framework │ │ │ ├── IPlatformManager.h │ │ │ ├── L2DBaseModel.cpp │ │ │ ├── L2DBaseModel.h │ │ │ ├── L2DExpressionMotion.cpp │ │ │ ├── L2DExpressionMotion.h │ │ │ ├── L2DEyeBlink.cpp │ │ │ ├── L2DEyeBlink.h │ │ │ ├── L2DMatrix44.cpp │ │ │ ├── L2DMatrix44.h │ │ │ ├── L2DModelMatrix.cpp │ │ │ ├── L2DModelMatrix.h │ │ │ ├── L2DMotionManager.cpp │ │ │ ├── L2DMotionManager.h │ │ │ ├── L2DPhysics.cpp │ │ │ ├── L2DPhysics.h │ │ │ ├── L2DPose.cpp │ │ │ ├── L2DPose.h │ │ │ ├── L2DStandardID.h │ │ │ ├── L2DTargetPoint.cpp │ │ │ ├── L2DTargetPoint.h │ │ │ ├── L2DTextureDesc.cpp │ │ │ ├── L2DTextureDesc.h │ │ │ ├── L2DViewMatrix.cpp │ │ │ ├── L2DViewMatrix.h │ │ │ ├── Live2DFramework.cpp │ │ │ └── Live2DFramework.h │ │ ├── include │ │ │ ├── ALive2DModel.h │ │ │ ├── DEF.h │ │ │ ├── Live2D.h │ │ │ ├── Live2DModelIPhone.h │ │ │ ├── ModelContext.h │ │ │ ├── avatar │ │ │ │ └── AvatarPartsItem.h │ │ │ ├── base │ │ │ │ ├── BDAffine.h │ │ │ │ ├── BDBoxGrid.h │ │ │ │ ├── IBaseContext.h │ │ │ │ ├── IBaseData.h │ │ │ │ └── private │ │ │ │ │ └── AffineEnt.h │ │ │ ├── draw │ │ │ │ ├── DDTexture.h │ │ │ │ ├── IDrawContext.h │ │ │ │ └── IDrawData.h │ │ │ ├── graphics │ │ │ │ ├── DrawParam.h │ │ │ │ ├── DrawParam_OpenGLES1.h │ │ │ │ ├── DrawProfileCocos2D.h │ │ │ │ ├── DrawProfileUnity.h │ │ │ │ ├── UtOpenGLDebug.h │ │ │ │ └── UtOpenGLES2.h │ │ │ ├── id │ │ │ │ ├── BaseDataID.h │ │ │ │ ├── DrawDataID.h │ │ │ │ ├── ID.h │ │ │ │ ├── ParamID.h │ │ │ │ └── PartsDataID.h │ │ │ ├── io │ │ │ │ ├── BReader.h │ │ │ │ ├── ByteBuffer.h │ │ │ │ ├── FileFormat2.h │ │ │ │ ├── ISerializableV2.h │ │ │ │ ├── RefString.h │ │ │ │ └── data │ │ │ │ │ └── Arrays2D.h │ │ │ ├── memory │ │ │ │ ├── AMemoryHolder.h │ │ │ │ ├── APageHeader.h │ │ │ │ ├── LDAllocator.h │ │ │ │ ├── LDObject.h │ │ │ │ ├── LDUnmanagedObject.h │ │ │ │ ├── MemoryParam.h │ │ │ │ ├── UtMemory.h │ │ │ │ ├── debug │ │ │ │ │ ├── MemoryInfo.h │ │ │ │ │ └── MemoryInfoSet.h │ │ │ │ ├── fixed │ │ │ │ │ ├── MHPageHeaderFixed.h │ │ │ │ │ └── MemoryHolderFixed.h │ │ │ │ └── tmp │ │ │ │ │ ├── MHBin.h │ │ │ │ │ ├── MHPageHeaderTmp.h │ │ │ │ │ └── MemoryHolderTmp.h │ │ │ ├── model │ │ │ │ ├── ModelImpl.h │ │ │ │ ├── PartsData.h │ │ │ │ └── UtModel.h │ │ │ ├── motion │ │ │ │ ├── AMotion.h │ │ │ │ ├── EyeBlinkMotion.h │ │ │ │ ├── Live2DMotion.h │ │ │ │ ├── Live2DMotionBin.h │ │ │ │ ├── MotionQueueEnt.h │ │ │ │ └── MotionQueueManager.h │ │ │ ├── param │ │ │ │ ├── ParamDefFloat.h │ │ │ │ ├── ParamDefSet.h │ │ │ │ ├── ParamPivots.h │ │ │ │ └── PivotManager.h │ │ │ ├── physics │ │ │ │ ├── PhysicsHair.h │ │ │ │ └── PhysicsParams.h │ │ │ ├── type │ │ │ │ ├── LDAffineTransform.h │ │ │ │ ├── LDColor.h │ │ │ │ ├── LDMap.h │ │ │ │ ├── LDPoint.h │ │ │ │ ├── LDPointF.h │ │ │ │ ├── LDRect.h │ │ │ │ ├── LDRectF.h │ │ │ │ ├── LDString.h │ │ │ │ └── LDVector.h │ │ │ └── util │ │ │ │ ├── Json.h │ │ │ │ ├── UtArray.h │ │ │ │ ├── UtDebug.h │ │ │ │ ├── UtFile.h │ │ │ │ ├── UtInterpolate.h │ │ │ │ ├── UtMath.h │ │ │ │ ├── UtMotion.h │ │ │ │ ├── UtOS_iPhone.h │ │ │ │ ├── UtString.h │ │ │ │ └── UtSystem.h │ │ └── lib │ │ │ └── libLive2D.a │ └── Tools │ │ ├── AccelHelper.h │ │ ├── AccelHelper.mm │ │ ├── FileManager.h │ │ ├── FileManager.m │ │ ├── LAppDefine.h │ │ ├── LAppLive2DManager.h │ │ ├── LAppLive2DManager.mm │ │ ├── LAppModel.h │ │ ├── LAppModel.mm │ │ ├── LAppRenderer.h │ │ ├── LAppRenderer.mm │ │ ├── LAppTextureDesc.h │ │ ├── LAppTextureDesc.mm │ │ ├── LAppView.h │ │ ├── LAppView.mm │ │ ├── LModelConfig.h │ │ ├── LModelConfig.mm │ │ ├── ModelSetting.h │ │ ├── ModelSetting.mm │ │ ├── OffScreenImage.h │ │ ├── OffScreenImage.m │ │ ├── PlatformManager.h │ │ ├── PlatformManager.mm │ │ ├── SimpleImage.h │ │ ├── SimpleImage.m │ │ ├── TouchManager.h │ │ └── TouchManager.m └── flutter_plugin2.podspec ├── lib ├── Live2dViewPlatform.dart ├── flutter_plugin2.dart └── live2d_view.dart ├── local.properties ├── pubspec.lock ├── pubspec.yaml ├── settings.gradle └── test └── flutter_plugin2_test.dart /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .dart_tool/ 3 | 4 | .packages 5 | .pub/ 6 | 7 | build/ 8 | -------------------------------------------------------------------------------- /.idea/flutter_plugin2.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /.idea/libraries/Dart_SDK.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /.idea/libraries/Flutter_Plugins.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 216dee60c0cc9449f0b29bcf922974d612263e24 8 | channel: stable 9 | 10 | project_type: plugin 11 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.0.1 2 | 3 | * TODO: Describe initial release. 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | TODO: Add your license here. 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # flutter_plugin2 2 | 3 | A new Flutter plugin. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter 8 | [plug-in package](https://flutter.dev/developing-packages/), 9 | a specialized package that includes platform-specific implementation code for 10 | Android and/or iOS. 11 | 12 | For help getting started with Flutter, view our 13 | [online documentation](https://flutter.dev/docs), which offers tutorials, 14 | samples, guidance on mobile development, and a full API reference. 15 | 16 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | -------------------------------------------------------------------------------- /android/.idea/.name: -------------------------------------------------------------------------------- 1 | flutter_plugin2 -------------------------------------------------------------------------------- /android/.idea/caches/build_file_checksums.ser: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/android/.idea/caches/build_file_checksums.ser -------------------------------------------------------------------------------- /android/.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 19 | 20 | -------------------------------------------------------------------------------- /android/.idea/jarRepositories.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 14 | 15 | 19 | 20 | 24 | 25 | 29 | 30 | 34 | 35 | -------------------------------------------------------------------------------- /android/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | -------------------------------------------------------------------------------- /android/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | group 'com.planet.flutter_plugin2' 2 | version '1.0' 3 | 4 | buildscript { 5 | repositories { 6 | google() 7 | jcenter() 8 | maven { url "http://pub.flutter-io.cn" } 9 | 10 | } 11 | 12 | dependencies { 13 | classpath 'com.android.tools.build:gradle:3.5.0' 14 | } 15 | } 16 | 17 | rootProject.allprojects { 18 | repositories { 19 | maven { url 'http://121.89.214.48:8181/repository/maven-public/' } 20 | maven { url 'https://androidx.dev/snapshots/builds/6787662/artifacts/repository/' } 21 | 22 | maven { url "http://pub.flutter-io.cn" } 23 | google() 24 | jcenter() 25 | } 26 | } 27 | 28 | apply plugin: 'com.android.library' 29 | 30 | android { 31 | compileSdkVersion 28 32 | 33 | defaultConfig { 34 | minSdkVersion 16 35 | } 36 | lintOptions { 37 | disable 'InvalidPackage' 38 | } 39 | compileOptions { 40 | sourceCompatibility JavaVersion.VERSION_1_8 41 | targetCompatibility JavaVersion.VERSION_1_8 42 | } 43 | buildToolsVersion '30.0.0' 44 | 45 | } 46 | //repositories { 47 | // // Depending on AndroidX Snapshot Builds to get the latest CameraX libs. 48 | // maven { url 'https://androidx.dev/snapshots/builds/6787662/artifacts/repository/' } 49 | //} 50 | dependencies { 51 | implementation 'com.planet:live2d:1.3.7' 52 | 53 | } 54 | configurations { 55 | cleanedAnnotations 56 | compile.exclude group: 'org.jetbrains' , module:'annotations' 57 | } -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableR8=true 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip 6 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'flutter_plugin2' 2 | -------------------------------------------------------------------------------- /android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | -------------------------------------------------------------------------------- /android/src/main/java/com/planet/flutter_plugin2/Contact.java: -------------------------------------------------------------------------------- 1 | package com.planet.flutter_plugin2; 2 | 3 | public interface Contact { 4 | static final String face="faceType"; 5 | static final String normal="normal"; 6 | 7 | } -------------------------------------------------------------------------------- /android/src/main/java/com/planet/flutter_plugin2/CustomTextViewFactory.java: -------------------------------------------------------------------------------- 1 | package com.planet.flutter_plugin2; 2 | 3 | import android.content.Context; 4 | import android.view.View; 5 | 6 | import java.util.Map; 7 | 8 | import io.flutter.plugin.common.BinaryMessenger; 9 | import io.flutter.plugin.common.MessageCodec; 10 | import io.flutter.plugin.platform.PlatformView; 11 | import io.flutter.plugin.platform.PlatformViewFactory; 12 | 13 | public class CustomTextViewFactory extends PlatformViewFactory { 14 | private final BinaryMessenger messenger; 15 | private final View containerView; 16 | 17 | 18 | /** 19 | * @param createArgsCodec the codec used to decode the args parameter of {@link #create}. 20 | * @param 21 | */ 22 | public CustomTextViewFactory(BinaryMessenger messenger, MessageCodec createArgsCodec, View containerView) { 23 | super(createArgsCodec); 24 | this.messenger = messenger; 25 | this.containerView = containerView; 26 | 27 | } 28 | 29 | @Override 30 | public PlatformView create(Context context, int viewId, Object args) { 31 | Map param = (Map)args; 32 | // String text = (String)param.get("text"); 33 | return new Live2dView(context,messenger,viewId,param,containerView); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Exceptions to above rules. 44 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 45 | -------------------------------------------------------------------------------- /example/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 216dee60c0cc9449f0b29bcf922974d612263e24 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /example/README.md: -------------------------------------------------------------------------------- 1 | # flutter_plugin2_example 2 | 3 | Demonstrates how to use the flutter_plugin2 plugin. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.dev/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /example/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | -------------------------------------------------------------------------------- /example/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 26 | 27 | android { 28 | compileSdkVersion 28 29 | 30 | lintOptions { 31 | disable 'InvalidPackage' 32 | } 33 | 34 | defaultConfig { 35 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 36 | applicationId "com.planet.flutter_plugin2_example" 37 | minSdkVersion 21 38 | targetSdkVersion 28 39 | versionCode flutterVersionCode.toInteger() 40 | versionName flutterVersionName 41 | } 42 | 43 | buildTypes { 44 | release { 45 | // TODO: Add your own signing config for the release build. 46 | // Signing with the debug keys for now, so `flutter run --release` works. 47 | signingConfig signingConfigs.debug 48 | } 49 | } 50 | } 51 | 52 | flutter { 53 | source '../..' 54 | } 55 | -------------------------------------------------------------------------------- /example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/android/app/src/main/java/com/planet/flutter_plugin2_example/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.planet.flutter_plugin2_example; 2 | 3 | import io.flutter.embedding.android.FlutterActivity; 4 | 5 | public class MainActivity extends FlutterActivity { 6 | } 7 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /example/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:3.5.0' 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | jcenter() 16 | } 17 | } 18 | 19 | rootProject.buildDir = '../build' 20 | subprojects { 21 | project.buildDir = "${rootProject.buildDir}/${project.name}" 22 | } 23 | subprojects { 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableR8=true 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip 7 | -------------------------------------------------------------------------------- /example/android/res/values/strings_en.arb: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /example/android/settings_aar.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /example/ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/app.flx 22 | Flutter/app.zip 23 | Flutter/flutter_assets/ 24 | Flutter/flutter_export_environment.sh 25 | ServiceDefinitions.json 26 | Runner/GeneratedPluginRegistrant.* 27 | 28 | # Exceptions to above rules. 29 | !default.mode1v3 30 | !default.mode2v3 31 | !default.pbxuser 32 | !default.perspectivev3 33 | -------------------------------------------------------------------------------- /example/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /example/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /example/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /example/ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def flutter_root 14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 | unless File.exist?(generated_xcode_build_settings_path) 16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 | end 18 | 19 | File.foreach(generated_xcode_build_settings_path) do |line| 20 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 | return matches[1].strip if matches 22 | end 23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24 | end 25 | 26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 | 28 | flutter_ios_podfile_setup 29 | 30 | target 'Runner' do 31 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 32 | end 33 | 34 | post_install do |installer| 35 | installer.pods_project.targets.each do |target| 36 | flutter_additional_ios_build_settings(target) 37 | end 38 | end 39 | -------------------------------------------------------------------------------- /example/ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Flutter (1.0.0) 3 | - flutter_plugin2 (0.0.1): 4 | - Flutter 5 | - path_provider (0.0.1): 6 | - Flutter 7 | - shared_preferences (0.0.1): 8 | - Flutter 9 | 10 | DEPENDENCIES: 11 | - Flutter (from `Flutter`) 12 | - flutter_plugin2 (from `.symlinks/plugins/flutter_plugin2/ios`) 13 | - path_provider (from `.symlinks/plugins/path_provider/ios`) 14 | - shared_preferences (from `.symlinks/plugins/shared_preferences/ios`) 15 | 16 | EXTERNAL SOURCES: 17 | Flutter: 18 | :path: Flutter 19 | flutter_plugin2: 20 | :path: ".symlinks/plugins/flutter_plugin2/ios" 21 | path_provider: 22 | :path: ".symlinks/plugins/path_provider/ios" 23 | shared_preferences: 24 | :path: ".symlinks/plugins/shared_preferences/ios" 25 | 26 | SPEC CHECKSUMS: 27 | Flutter: 0e3d915762c693b495b44d77113d4970485de6ec 28 | flutter_plugin2: 2a8d05efaae2da2a901ea51fdb20323718e68c3f 29 | path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c 30 | shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d 31 | 32 | PODFILE CHECKSUM: 8e679eca47255a8ca8067c4c67aab20e64cb974d 33 | 34 | COCOAPODS: 1.10.0.beta.2 35 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : FlutterAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /example/ios/Runner/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "AppDelegate.h" 2 | #import "GeneratedPluginRegistrant.h" 3 | 4 | @implementation AppDelegate 5 | 6 | - (BOOL)application:(UIApplication *)application 7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 8 | [GeneratedPluginRegistrant registerWithRegistry:self]; 9 | // Override point for customization after application launch. 10 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 11 | } 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /example/ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /example/ios/Runner/Epsilon/Epsilon.cmox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/Epsilon/Epsilon.cmox -------------------------------------------------------------------------------- /example/ios/Runner/Epsilon/Epsilon_expressions.canx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/Epsilon/Epsilon_expressions.canx -------------------------------------------------------------------------------- /example/ios/Runner/Epsilon/Epsilon_motions.canx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/Epsilon/Epsilon_motions.canx -------------------------------------------------------------------------------- /example/ios/Runner/Epsilon/runtime/Epsilon.1024/texture_00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/Epsilon/runtime/Epsilon.1024/texture_00.png -------------------------------------------------------------------------------- /example/ios/Runner/Epsilon/runtime/Epsilon.1024/texture_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/Epsilon/runtime/Epsilon.1024/texture_01.png -------------------------------------------------------------------------------- /example/ios/Runner/Epsilon/runtime/Epsilon.1024/texture_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/Epsilon/runtime/Epsilon.1024/texture_02.png -------------------------------------------------------------------------------- /example/ios/Runner/Epsilon/runtime/Epsilon.moc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/Epsilon/runtime/Epsilon.moc -------------------------------------------------------------------------------- /example/ios/Runner/Epsilon/runtime/Epsilon.model.json: -------------------------------------------------------------------------------- 1 | { 2 | "version":"Sample 1.0.0", 3 | "model":"Epsilon.moc", 4 | "textures":[ 5 | "Epsilon.1024/texture_00.png", 6 | "Epsilon.1024/texture_01.png", 7 | "Epsilon.1024/texture_02.png" 8 | ], 9 | "motions":{ 10 | "idle":[ 11 | { 12 | "file":"motions/Epsilon_idle_01.mtn" 13 | } 14 | ], 15 | "null":[ 16 | { 17 | "file":"motions/Epsilon_m_01.mtn" 18 | }, 19 | { 20 | "file":"motions/Epsilon_m_02.mtn" 21 | }, 22 | { 23 | "file":"motions/Epsilon_m_03.mtn" 24 | }, 25 | { 26 | "file":"motions/Epsilon_m_04.mtn" 27 | }, 28 | { 29 | "file":"motions/Epsilon_m_05.mtn" 30 | }, 31 | { 32 | "file":"motions/Epsilon_m_06.mtn" 33 | }, 34 | { 35 | "file":"motions/Epsilon_m_07.mtn" 36 | }, 37 | { 38 | "file":"motions/Epsilon_m_08.mtn" 39 | }, 40 | { 41 | "file":"motions/Epsilon_m_sp_01.mtn" 42 | }, 43 | { 44 | "file":"motions/Epsilon_m_sp_02.mtn" 45 | }, 46 | { 47 | "file":"motions/Epsilon_m_sp_03.mtn" 48 | }, 49 | { 50 | "file":"motions/Epsilon_m_sp_04.mtn" 51 | }, 52 | { 53 | "file":"motions/Epsilon_m_sp_05.mtn" 54 | }, 55 | { 56 | "file":"motions/Epsilon_shake_01.mtn" 57 | } 58 | ] 59 | }, 60 | "expressions":[ 61 | {"name":"f01.exp.json","file":"expressions/f01.exp.json"}, 62 | {"name":"f02.exp.json","file":"expressions/f02.exp.json"}, 63 | {"name":"f03.exp.json","file":"expressions/f03.exp.json"}, 64 | {"name":"f04.exp.json","file":"expressions/f04.exp.json"}, 65 | {"name":"f05.exp.json","file":"expressions/f05.exp.json"}, 66 | {"name":"f06.exp.json","file":"expressions/f06.exp.json"}, 67 | {"name":"f07.exp.json","file":"expressions/f07.exp.json"}, 68 | {"name":"f08.exp.json","file":"expressions/f08.exp.json"} 69 | ], 70 | "physics":"Epsilon.physics.json" 71 | } -------------------------------------------------------------------------------- /example/ios/Runner/Epsilon/runtime/Epsilon.physics.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Physics", 3 | "physics_hair":[ 4 | { 5 | "lebel":"BACK", 6 | "setup":{ 7 | "length":0.24, 8 | "regist":0.5, 9 | "mass":0.18 10 | }, 11 | "src":[ 12 | { 13 | "id":"PARAM_ANGLE_X", 14 | "ptype":"x", 15 | "scale":0.005, 16 | "weight":1 17 | }, 18 | { 19 | "id":"PARAM_ANGLE_Z", 20 | "ptype":"angle", 21 | "scale":0.8, 22 | "weight":1 23 | } 24 | ], 25 | "targets":[ 26 | { 27 | "id":"PARAM_HAIR_BACK_L", 28 | "ptype":"angle", 29 | "scale":0.005, 30 | "weight":1 31 | }, 32 | { 33 | "id":"PARAM_HAIR_BACK_R", 34 | "ptype":"angle", 35 | "scale":0.005, 36 | "weight":1 37 | } 38 | ] 39 | }, 40 | { 41 | "lebel":"SIDE", 42 | "setup":{ 43 | "length":0.2, 44 | "regist":0.5, 45 | "mass":0.14 46 | }, 47 | "src":[ 48 | { 49 | "id":"PARAM_ANGLE_X", 50 | "ptype":"x", 51 | "scale":0.004, 52 | "weight":1 53 | }, 54 | { 55 | "id":"PARAM_ANGLE_Z", 56 | "ptype":"angle", 57 | "scale":0.8, 58 | "weight":1 59 | } 60 | ], 61 | "targets":[ 62 | { 63 | "id":"PARAM_HAIR_SIDE_L", 64 | "ptype":"angle", 65 | "scale":0.01, 66 | "weight":1 67 | }, 68 | { 69 | "id":"PARAM_HAIR_SIDE_R", 70 | "ptype":"angle", 71 | "scale":0.01, 72 | "weight":1 73 | } 74 | ] 75 | } 76 | ] 77 | } -------------------------------------------------------------------------------- /example/ios/Runner/Epsilon/runtime/expressions/f01.exp.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Expression", 3 | "fade_in":500, 4 | "fade_out":500 5 | } -------------------------------------------------------------------------------- /example/ios/Runner/Epsilon/runtime/expressions/f02.exp.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Expression", 3 | "fade_in":500, 4 | "fade_out":500, 5 | "params":[ 6 | {"id":"PARAM_EYE_L_OPEN","val":0,"calc":"mult"}, 7 | {"id":"PARAM_EYE_L_SMILE","val":1}, 8 | {"id":"PARAM_EYE_R_OPEN","val":0,"calc":"mult"}, 9 | {"id":"PARAM_EYE_R_SMILE","val":1}, 10 | {"id":"PARAM_BROW_L_ANGLE","val":0.48}, 11 | {"id":"PARAM_BROW_R_ANGLE","val":0.46} 12 | ] 13 | } -------------------------------------------------------------------------------- /example/ios/Runner/Epsilon/runtime/expressions/f03.exp.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Expression", 3 | "fade_in":500, 4 | "fade_out":500, 5 | "params":[ 6 | {"id":"PARAM_EYE_L_OPEN","val":0.87,"calc":"mult"}, 7 | {"id":"PARAM_EYE_L_SMILE","val":1}, 8 | {"id":"PARAM_EYE_R_OPEN","val":0.87,"calc":"mult"}, 9 | {"id":"PARAM_BROW_L_Y","val":-1}, 10 | {"id":"PARAM_BROW_R_Y","val":-1}, 11 | {"id":"PARAM_BROW_L_ANGLE","val":1}, 12 | {"id":"PARAM_BROW_R_ANGLE","val":1}, 13 | {"id":"PARAM_BROW_L_FORM","val":-0.51}, 14 | {"id":"PARAM_BROW_R_FORM","val":-0.51}, 15 | {"id":"PARAM_MOUTH_FORM","val":-1,"def":1} 16 | ] 17 | } -------------------------------------------------------------------------------- /example/ios/Runner/Epsilon/runtime/expressions/f04.exp.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Expression", 3 | "fade_in":500, 4 | "fade_out":500, 5 | "params":[ 6 | {"id":"PARAM_BROW_L_Y","val":-0.59}, 7 | {"id":"PARAM_BROW_R_Y","val":-0.59}, 8 | {"id":"PARAM_BROW_L_X","val":-1}, 9 | {"id":"PARAM_BROW_R_X","val":-1}, 10 | {"id":"PARAM_BROW_L_ANGLE","val":-1}, 11 | {"id":"PARAM_BROW_R_ANGLE","val":-1}, 12 | {"id":"PARAM_BROW_L_FORM","val":-1}, 13 | {"id":"PARAM_BROW_R_FORM","val":-1}, 14 | {"id":"PARAM_MOUTH_FORM","val":-1,"def":1} 15 | ] 16 | } -------------------------------------------------------------------------------- /example/ios/Runner/Epsilon/runtime/expressions/f05.exp.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Expression", 3 | "fade_in":500, 4 | "fade_out":500, 5 | "params":[ 6 | {"id":"PARAM_BROW_L_Y","val":-0.42}, 7 | {"id":"PARAM_BROW_R_Y","val":-0.44}, 8 | {"id":"PARAM_BROW_L_X","val":-0.07}, 9 | {"id":"PARAM_BROW_L_ANGLE","val":1}, 10 | {"id":"PARAM_BROW_R_ANGLE","val":1}, 11 | {"id":"PARAM_TERE","val":1} 12 | ] 13 | } -------------------------------------------------------------------------------- /example/ios/Runner/Epsilon/runtime/expressions/f06.exp.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Expression", 3 | "fade_in":500, 4 | "fade_out":500, 5 | "params":[ 6 | {"id":"PARAM_BROW_L_Y","val":-1}, 7 | {"id":"PARAM_BROW_R_Y","val":-1}, 8 | {"id":"PARAM_BROW_L_X","val":-0.07}, 9 | {"id":"PARAM_BROW_L_ANGLE","val":0.73}, 10 | {"id":"PARAM_BROW_R_ANGLE","val":0.71}, 11 | {"id":"PARAM_BROW_L_FORM","val":-0.81}, 12 | {"id":"PARAM_BROW_R_FORM","val":-0.81}, 13 | {"id":"PARAM_MOUTH_FORM","val":-1,"def":1} 14 | ] 15 | } -------------------------------------------------------------------------------- /example/ios/Runner/Epsilon/runtime/expressions/f07.exp.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Expression", 3 | "fade_in":500, 4 | "fade_out":500, 5 | "params":[ 6 | {"id":"PARAM_EYE_L_OPEN","val":1.5,"calc":"mult"}, 7 | {"id":"PARAM_EYE_R_OPEN","val":1.5,"calc":"mult"}, 8 | {"id":"PARAM_BROW_L_Y","val":1}, 9 | {"id":"PARAM_BROW_R_Y","val":1}, 10 | {"id":"PARAM_BROW_L_ANGLE","val":0.28}, 11 | {"id":"PARAM_BROW_R_ANGLE","val":0.31}, 12 | {"id":"PARAM_BROW_L_FORM","val":1}, 13 | {"id":"PARAM_BROW_R_FORM","val":1}, 14 | {"id":"PARAM_MOUTH_FORM","val":-1,"def":1} 15 | ] 16 | } -------------------------------------------------------------------------------- /example/ios/Runner/Epsilon/runtime/expressions/f08.exp.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Expression", 3 | "fade_in":500, 4 | "fade_out":500, 5 | "params":[ 6 | {"id":"PARAM_EYE_L_OPEN","val":0.75,"calc":"mult"}, 7 | {"id":"PARAM_EYE_R_OPEN","val":0.75,"calc":"mult"}, 8 | {"id":"PARAM_BROW_L_Y","val":-0.31}, 9 | {"id":"PARAM_BROW_R_Y","val":-0.36}, 10 | {"id":"PARAM_BROW_L_ANGLE","val":0.61}, 11 | {"id":"PARAM_BROW_R_ANGLE","val":0.62}, 12 | {"id":"PARAM_BROW_L_FORM","val":-1}, 13 | {"id":"PARAM_BROW_R_FORM","val":-1}, 14 | {"id":"PARAM_MOUTH_FORM","val":-0.53,"def":1} 15 | ] 16 | } -------------------------------------------------------------------------------- /example/ios/Runner/Epsilon/runtime/motions/Epsilon_m_01.mtn: -------------------------------------------------------------------------------- 1 | # Live2D Animator Motion Data 2 | $fps=30 3 | PARAM_ANGLE_X=0 4 | PARAM_ANGLE_Y=0,0,0,0,0,0,0,0,0,0,0,0,0,1.31,4.14,7.68,11.34,14.69,17.47,19.31,20,17.28,10.48,1.02,-9.24,-18.35,-25,-28.99,-30,-30,-30,-28.8,-25.57,-20.9,-15.36,-9.64,-4.1,0.57,3.8,5,4.67,3.96,3.08,2.16,1.33,0.63,0.17,0,0,0,0,0,0,0,0,0,0 5 | PARAM_ANGLE_Z=0 6 | PARAM_EYE_L_OPEN=1 7 | PARAM_EYE_L_SMILE=0 8 | PARAM_EYE_R_OPEN=1 9 | PARAM_EYE_R_SMILE=0 10 | PARAM_EYE_FORM=0 11 | PARAM_EYE_BALL_X=0 12 | PARAM_EYE_BALL_Y=0 13 | PARAM_BROW_L_Y=0 14 | PARAM_BROW_R_Y=0 15 | PARAM_BROW_L_X=0 16 | PARAM_BROW_R_X=0 17 | PARAM_BROW_L_ANGLE=0 18 | PARAM_BROW_R_ANGLE=0 19 | PARAM_BROW_L_FORM=0 20 | PARAM_BROW_R_FORM=0 21 | PARAM_MOUTH_FORM=1 22 | PARAM_MOUTH_OPEN_Y=0 23 | PARAM_TERE=0 24 | PARAM_TEAR=0 25 | PARAM_SWEAT=0 26 | PARAM_RAGE=0 27 | PARAM_BODY_ANGLE_X=0 28 | PARAM_BODY_ANGLE_Z=0 29 | PARAM_BODY_ANGLE_Y=0,0,0,0,0,0,0,0,0,0,0,0,0,0.46,1.45,2.69,3.97,5.14,6.11,6.76,7,6.21,4.51,2.39,0.19,-1.82,-3.48,-4.59,-5,-4.83,-4.37,-3.7,-2.91,-2.09,-1.3,-0.63,-0.17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 30 | PARAM_ARM_L=0 31 | PARAM_ARM_R=0 32 | PARAM_BREATH=0 33 | PARAM_HAIR_FRONT=0 34 | PARAM_HAIR_SIDE=0 35 | PARAM_HAIR_SIDE_L=0 36 | PARAM_HAIR_SIDE_R=0 37 | PARAM_HAIR_BACK=0 38 | PARAM_HAIR_BACK_L=0 39 | PARAM_HAIR_BACK_R=0 40 | VISIBLE:PARTS_01_FACE_001_c=0 -------------------------------------------------------------------------------- /example/ios/Runner/Haru/Haru.1024/texture_00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/Haru/Haru.1024/texture_00.png -------------------------------------------------------------------------------- /example/ios/Runner/Haru/Haru.1024/texture_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/Haru/Haru.1024/texture_01.png -------------------------------------------------------------------------------- /example/ios/Runner/Haru/Haru.1024/texture_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/Haru/Haru.1024/texture_02.png -------------------------------------------------------------------------------- /example/ios/Runner/Haru/Haru.moc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/Haru/Haru.moc -------------------------------------------------------------------------------- /example/ios/Runner/Haru/README: -------------------------------------------------------------------------------- 1 | // 頭部左右旋轉 2 | PARAM_ANGLE_X 3 | -30.0 ~ 30.0 4 | 5 | // 上下點頭 6 | PARAM_ANGLE_Y 7 | -30.0 ~ 30.0 8 | 9 | // 左右搖頭晃腦 10 | PARAM_ANGLE_Z 11 | -30.0 ~ 30.0 12 | 13 | // 左眼開啟大小程度 14 | PARAM_EYE_L_OPEN 15 | 0.0 ~ 2.0 16 | 17 | // 右眼開啟大小程度 18 | PARAM_EYE_R_OPEN 19 | 0.0 ~ 2.0 20 | 21 | // 左眼微笑程度 22 | PARAM_EYE_L_SMILE 23 | 0.0 ~ 1.0 24 | 25 | // 右眼微笑程度 26 | PARAM_EYE_R_SMILE 27 | 0.0 ~ 1.0 28 | 29 | // 眼睛的樣子, -1.0 看起來比較兇, 1.0 看起來比較楚楚可憐 30 | PARAM_EYE_FORM 31 | -1.0 ~ 1.0 32 | 33 | // 眼球看左看右 34 | PARAM_EYE_BALL_X 35 | -1.0 ~ 1.0 36 | 37 | // 眼球看上看下 38 | PARAM_EYE_BALL_Y 39 | -1.0 ~ 1.0 40 | 41 | // 眼球大小 42 | PARAM_EYE_BALL_FORM 43 | -1.0 ~ 0.0 44 | 45 | // 左邊眉毛的高低 46 | PARAM_BROW_L_Y 47 | -1.0 ~ 1.0 48 | 49 | // 右邊眉毛的高低 50 | PARAM_BROW_R_Y 51 | -1.0 ~ 1.0 52 | 53 | // 左邊眉毛的前高後低, 或是後高前低 54 | PARAM_BROW_L_X 55 | -1.0 ~ 1.0 56 | 57 | // 右邊眉毛的前高後低, 或是後高前低 58 | PARAM_BROW_R_X 59 | -1.0 ~ 1.0 60 | 61 | // 左邊眉毛加強版的前高後低, 後高前低 62 | PARAM_BROW_L_ANGLE 63 | -1.0 ~ 1.0 64 | 65 | // 右邊眉毛加強版的前高後低, 後高前低 66 | PARAM_BROW_R_ANGLE 67 | -1.0 ~ 1.0 68 | 69 | // 左邊眉毛生氣或是高興 70 | PARAM_BROW_L_FORM 71 | -1.0 ~ 1.0 72 | 73 | // 右邊眉毛生氣或是高興 74 | PARAM_BROW_R_FORM 75 | -1.0 ~ 1.0 76 | 77 | // 微笑或是凹凹嘴 78 | PARAM_MOUTH_FORM 79 | -1.0 ~ 1.0 80 | 81 | // 嘴巴打開或是關閉 82 | PARAM_MOUTH_OPEN_Y 83 | 0.0 ~ 1.0 84 | 85 | // 臉頰紅暈 86 | PARAM_TERE 87 | 0.0 ~ 1.0 88 | 89 | // 身體中心朝向的方向 90 | PARAM_BODY_ANGLE_X 91 | -10.0 ~ 10.0 92 | 93 | // 身體上下起伏 94 | PARAM_BODY_ANGLE_Y 95 | -10.0 ~ 10.0 96 | 97 | // 身體左右搖擺 98 | PARAM_BODY_ANGLE_Z 99 | -10.0 ~ 10.0 100 | 101 | // 呼吸起伏 102 | PARAM_BREATH 103 | 0.0 ~ 1.0 104 | 105 | // 左手動作(A 類型) 106 | PARAM_ARM_L_A 107 | -1.0 ~ 1.0 108 | 109 | // 右手動作(A 類型) 110 | PARAM_ARM_R_A 111 | -1.0 ~ 1.0 112 | 113 | // 左手動作(B 類型) 114 | PARAM_ARM_L_B 115 | -1.0 ~ 1.0 116 | 117 | // 右手動作(B 類型) 118 | PARAM_ARM_R_B 119 | -1.0 ~ 1.0 120 | -------------------------------------------------------------------------------- /example/ios/Runner/HaruFullPack/haru.physics.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Physics", 3 | "physics_hair": 4 | [ 5 | { 6 | "comment":"hair front", 7 | "setup": 8 | { 9 | "length":0.17, 10 | "regist":0.5, 11 | "mass":0.1 12 | }, 13 | "src": 14 | [ 15 | { 16 | "id":"PARAM_ANGLE_X", 17 | "ptype":"x", 18 | "scale":0.005, 19 | "weight":1 20 | }, 21 | { 22 | "id":"PARAM_ANGLE_Z", 23 | "ptype":"angle", 24 | "scale":0.8, 25 | "weight":1 26 | } 27 | ], 28 | "targets": 29 | [ 30 | { 31 | "id":"PARAM_HAIR_FRONT", 32 | "ptype":"angle", 33 | "scale":0.025, 34 | "weight":1 35 | } 36 | ] 37 | }, 38 | { 39 | "comment":"hair back", 40 | "setup": 41 | { 42 | "length":0.34, 43 | "regist":0.5, 44 | "mass":0.2 45 | }, 46 | "src": 47 | [ 48 | { 49 | "id":"PARAM_ANGLE_X", 50 | "ptype":"x", 51 | "scale":0.005, 52 | "weight":1 53 | }, 54 | { 55 | "id":"PARAM_ANGLE_Z", 56 | "ptype":"angle", 57 | "scale":0.8, 58 | "weight":1 59 | } 60 | ], 61 | "targets": 62 | [ 63 | { 64 | "id":"PARAM_HAIR_BACK", 65 | "ptype":"angle", 66 | "scale":0.025, 67 | "weight":1 68 | } 69 | ] 70 | } 71 | ] 72 | } -------------------------------------------------------------------------------- /example/ios/Runner/HaruFullPack/haru.pose.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Pose", 3 | 4 | "parts_visible": 5 | [ 6 | { 7 | "group": 8 | [ 9 | { 10 | "id":"PARTS_01_ARM_L_A_001", 11 | "link": 12 | [ 13 | "PARTS_01_ARM_L_A_002" 14 | ] 15 | }, 16 | { 17 | "id":"PARTS_01_ARM_L_B_001", 18 | "link": 19 | [ 20 | "PARTS_01_ARM_L_B_002" 21 | ] 22 | } 23 | ] 24 | }, 25 | { 26 | "group": 27 | [ 28 | { 29 | "id":"PARTS_01_ARM_R_A_001", 30 | "link": 31 | [ 32 | "PARTS_01_ARM_R_A_002" 33 | ] 34 | }, 35 | { 36 | "id":"PARTS_01_ARM_R_B_001", 37 | "link": 38 | [ 39 | "PARTS_01_ARM_R_B_002" 40 | ] 41 | } 42 | ] 43 | } 44 | ] 45 | 46 | } 47 | -------------------------------------------------------------------------------- /example/ios/Runner/HaruFullPack/haru_01.1024/texture_00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/HaruFullPack/haru_01.1024/texture_00.png -------------------------------------------------------------------------------- /example/ios/Runner/HaruFullPack/haru_01.1024/texture_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/HaruFullPack/haru_01.1024/texture_01.png -------------------------------------------------------------------------------- /example/ios/Runner/HaruFullPack/haru_01.1024/texture_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/HaruFullPack/haru_01.1024/texture_02.png -------------------------------------------------------------------------------- /example/ios/Runner/HaruFullPack/haru_01.moc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/HaruFullPack/haru_01.moc -------------------------------------------------------------------------------- /example/ios/Runner/HaruFullPack/haru_01.model.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Model Setting", 3 | "name":"haru", 4 | "model":"haru_01.moc", 5 | "textures": 6 | [ 7 | "haru_01.1024/texture_00.png", 8 | "haru_01.1024/texture_01.png", 9 | "haru_01.1024/texture_02.png" 10 | ], 11 | "physics":"haru.physics.json", 12 | "pose":"haru.pose.json", 13 | "expressions": 14 | [ 15 | {"name":"f01","file":"motions/expressions/f01.exp.json"}, 16 | {"name":"f02","file":"motions/expressions/f02.exp.json"}, 17 | {"name":"f03","file":"motions/expressions/f03.exp.json"}, 18 | {"name":"f04","file":"motions/expressions/f04.exp.json"}, 19 | {"name":"f05","file":"motions/expressions/f05.exp.json"}, 20 | {"name":"f06","file":"motions/expressions/f06.exp.json"}, 21 | {"name":"f07","file":"motions/expressions/f07.exp.json"}, 22 | {"name":"f08","file":"motions/expressions/f08.exp.json"} 23 | ], 24 | "layout": 25 | { 26 | "center_x":0, 27 | "y":1.2, 28 | "width":2.9 29 | }, 30 | "hit_areas": 31 | [ 32 | {"name":"head", "id":"D_REF.HEAD"}, 33 | {"name":"body", "id":"D_REF.BODY"} 34 | ], 35 | "motions": 36 | { 37 | "idle": 38 | [ 39 | {"file":"motions/idle/haru_idle_01.mtn" ,"fade_in":2000, "fade_out":2000}, 40 | {"file":"motions/idle/haru_idle_02.mtn" ,"fade_in":2000, "fade_out":2000}, 41 | {"file":"motions/idle/haru_idle_03.mtn" ,"fade_in":2000, "fade_out":2000} 42 | ], 43 | "tap_body": 44 | [ 45 | { "file":"motions/tap/haru_m_01.mtn" }, 46 | { "file":"motions/tap/haru_m_02.mtn" }, 47 | { "file":"motions/tap/haru_m_03.mtn" }, 48 | { "file":"motions/tap/haru_m_04.mtn" }, 49 | { "file":"motions/tap/haru_m_05.mtn" }, 50 | { "file":"motions/tap/haru_m_06.mtn" }, 51 | { "file":"motions/tap/haru_m_07.mtn" } 52 | ] 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /example/ios/Runner/HaruFullPack/haru_02.1024/texture_00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/HaruFullPack/haru_02.1024/texture_00.png -------------------------------------------------------------------------------- /example/ios/Runner/HaruFullPack/haru_02.1024/texture_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/HaruFullPack/haru_02.1024/texture_01.png -------------------------------------------------------------------------------- /example/ios/Runner/HaruFullPack/haru_02.1024/texture_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/HaruFullPack/haru_02.1024/texture_02.png -------------------------------------------------------------------------------- /example/ios/Runner/HaruFullPack/haru_02.moc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/HaruFullPack/haru_02.moc -------------------------------------------------------------------------------- /example/ios/Runner/HaruFullPack/haru_02.model.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Model Setting", 3 | "model":"haru_02.moc", 4 | "textures": 5 | [ 6 | "haru_02.1024/texture_00.png", 7 | "haru_02.1024/texture_01.png", 8 | "haru_02.1024/texture_02.png" 9 | ], 10 | "physics":"haru.physics.json", 11 | "pose":"haru.pose.json", 12 | "expressions": 13 | [ 14 | {"name":"f01","file":"motions/expressions/f01.exp.json"}, 15 | {"name":"f02","file":"motions/expressions/f02.exp.json"}, 16 | {"name":"f03","file":"motions/expressions/f03.exp.json"}, 17 | {"name":"f04","file":"motions/expressions/f04.exp.json"}, 18 | {"name":"f05","file":"motions/expressions/f05.exp.json"}, 19 | {"name":"f06","file":"motions/expressions/f06.exp.json"}, 20 | {"name":"f07","file":"motions/expressions/f07.exp.json"}, 21 | {"name":"f08","file":"motions/expressions/f08.exp.json"} 22 | ], 23 | "layout": 24 | { 25 | "center_x":0, 26 | "y":1.2, 27 | "width":2.9 28 | }, 29 | "hit_areas": 30 | [ 31 | {"name":"head", "id":"D_REF.HEAD"}, 32 | {"name":"body", "id":"D_REF.BODY"} 33 | ], 34 | "motions": 35 | { 36 | "idle": 37 | [ 38 | {"file":"motions/idle/haru_idle_01.mtn" ,"fade_in":2000, "fade_out":2000}, 39 | {"file":"motions/idle/haru_idle_02.mtn" ,"fade_in":2000, "fade_out":2000}, 40 | {"file":"motions/idle/haru_idle_03.mtn" ,"fade_in":2000, "fade_out":2000} 41 | ], 42 | "tap_body": 43 | [ 44 | { "file":"motions/tap/haru_m_01.mtn" }, 45 | { "file":"motions/tap/haru_m_02.mtn" }, 46 | { "file":"motions/tap/haru_m_03.mtn" }, 47 | { "file":"motions/tap/haru_m_04.mtn" }, 48 | { "file":"motions/tap/haru_m_05.mtn" }, 49 | { "file":"motions/tap/haru_m_06.mtn" }, 50 | { "file":"motions/tap/haru_m_07.mtn" } 51 | ] 52 | } 53 | } -------------------------------------------------------------------------------- /example/ios/Runner/HaruFullPack/motions/expressions/f01.exp.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Expression", 3 | "fade_in":500, 4 | "fade_out":500 5 | } -------------------------------------------------------------------------------- /example/ios/Runner/HaruFullPack/motions/expressions/f02.exp.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Expression", 3 | "fade_in":500, 4 | "fade_out":500, 5 | "params": 6 | [ 7 | { "id":"PARAM_EYE_FORM" , "val":0.5 }, 8 | { "id":"PARAM_BROW_L_FORM" , "val":0.2 }, 9 | { "id":"PARAM_BROW_R_FORM" , "val":0.2 }, 10 | { "id":"PARAM_MOUTH_FORM" , "val":1 } 11 | ] 12 | } -------------------------------------------------------------------------------- /example/ios/Runner/HaruFullPack/motions/expressions/f03.exp.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Expression", 3 | "fade_in":500, 4 | "fade_out":500, 5 | "params": 6 | [ 7 | { "id":"PARAM_EYE_FORM" , "val":-0.5 }, 8 | { "id":"PARAM_BROW_L_ANGLE" , "val":-0.5 }, 9 | { "id":"PARAM_BROW_R_ANGLE" , "val":-0.5 }, 10 | { "id":"PARAM_BROW_L_FORM" , "val":-0.5 }, 11 | { "id":"PARAM_BROW_R_FORM" , "val":-0.5 }, 12 | { "id":"PARAM_MOUTH_FORM" , "val":-1 } 13 | ] 14 | } -------------------------------------------------------------------------------- /example/ios/Runner/HaruFullPack/motions/expressions/f04.exp.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Expression", 3 | "fade_in":500, 4 | "fade_out":500, 5 | "params": 6 | [ 7 | { "id":"PARAM_EYE_L_OPEN" , "val":0.9 , "def":1 ,"calc":"mult"}, 8 | { "id":"PARAM_EYE_R_OPEN" , "val":0.9 , "def":1 ,"calc":"mult"}, 9 | { "id":"PARAM_EYE_FORM" , "val":1 }, 10 | { "id":"PARAM_BROW_L_ANGLE" , "val":0.3 }, 11 | { "id":"PARAM_BROW_R_ANGLE" , "val":0.3 }, 12 | { "id":"PARAM_BROW_L_FORM" , "val":-0.5 }, 13 | { "id":"PARAM_BROW_R_FORM" , "val":-0.5 }, 14 | { "id":"PARAM_MOUTH_FORM" , "val":-0.5 } 15 | ] 16 | } -------------------------------------------------------------------------------- /example/ios/Runner/HaruFullPack/motions/expressions/f05.exp.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Expression", 3 | "fade_in":500, 4 | "fade_out":500, 5 | "params": 6 | [ 7 | { "id":"PARAM_EYE_L_OPEN" , "val":0 , "def":1 ,"calc":"mult"}, 8 | { "id":"PARAM_EYE_R_OPEN" , "val":0 , "def":1 ,"calc":"mult"}, 9 | { "id":"PARAM_EYE_L_SMILE" , "val":1 }, 10 | { "id":"PARAM_EYE_R_SMILE" , "val":1 }, 11 | { "id":"PARAM_BROW_L_Y" , "val":0.3 }, 12 | { "id":"PARAM_BROW_R_Y" , "val":0.3 }, 13 | { "id":"PARAM_BROW_L_FORM" , "val":0.2 }, 14 | { "id":"PARAM_BROW_R_FORM" , "val":0.2 }, 15 | { "id":"PARAM_MOUTH_FORM" , "val":1 } 16 | ] 17 | } -------------------------------------------------------------------------------- /example/ios/Runner/HaruFullPack/motions/expressions/f06.exp.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Expression", 3 | "fade_in":500, 4 | "fade_out":500, 5 | "params": 6 | [ 7 | { "id":"PARAM_EYE_L_OPEN" , "val":2 , "def":1 ,"calc":"mult"}, 8 | { "id":"PARAM_EYE_R_OPEN" , "val":2 , "def":1 ,"calc":"mult"}, 9 | { "id":"PARAM_EYE_BALL_FORM" , "val":-1 }, 10 | { "id":"PARAM_BROW_L_Y" , "val":0.3 }, 11 | { "id":"PARAM_BROW_R_Y" , "val":0.3 }, 12 | { "id":"PARAM_BROW_L_FORM" , "val":0.5 }, 13 | { "id":"PARAM_BROW_R_FORM" , "val":0.5 }, 14 | { "id":"PARAM_MOUTH_FORM" , "val":-0.21 } 15 | ] 16 | } -------------------------------------------------------------------------------- /example/ios/Runner/HaruFullPack/motions/expressions/f07.exp.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Expression", 3 | "fade_in":500, 4 | "fade_out":500, 5 | "params": 6 | [ 7 | { "id":"PARAM_EYE_L_OPEN" , "val":0.9 , "def":1 ,"calc":"mult"}, 8 | { "id":"PARAM_EYE_R_OPEN" , "val":0.9 , "def":1 ,"calc":"mult"}, 9 | { "id":"PARAM_EYE_FORM" , "val":0.3 }, 10 | { "id":"PARAM_TERE" , "val":1 }, 11 | { "id":"PARAM_BROW_L_ANGLE" , "val":0.25 }, 12 | { "id":"PARAM_BROW_R_ANGLE" , "val":0.25 }, 13 | { "id":"PARAM_BROW_L_FORM" , "val":-0.47 }, 14 | { "id":"PARAM_BROW_R_FORM" , "val":-0.43 }, 15 | { "id":"PARAM_MOUTH_FORM" , "val":0.5 } 16 | ] 17 | } -------------------------------------------------------------------------------- /example/ios/Runner/HaruFullPack/motions/expressions/f08.exp.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Expression", 3 | "fade_in":500, 4 | "fade_out":500, 5 | "params": 6 | [ 7 | { "id":"PARAM_EYE_L_OPEN" , "val":0.8 , "def":1 ,"calc":"mult"}, 8 | { "id":"PARAM_EYE_R_OPEN" , "val":0.8 , "def":1 ,"calc":"mult"}, 9 | { "id":"PARAM_BROW_L_FORM" , "val":-0.5 }, 10 | { "id":"PARAM_BROW_R_FORM" , "val":-0.5 }, 11 | { "id":"PARAM_MOUTH_FORM" , "val":-1 } 12 | ] 13 | } -------------------------------------------------------------------------------- /example/ios/Runner/HaruFullPack/motions/flick/haru_normal_06.mtn: -------------------------------------------------------------------------------- 1 | # Live2D Animator Motion Data 2 | $fps=30 3 | PARAM_BROW_L_ANGLE=0 4 | PARAM_ANGLE_Z=14,13.79,13.18,12.23,10.96,9.42,7.64,5.72,3.61,1.4,-0.88,-3.12,-5.4,-7.61,-9.72,-11.64,-13.42,-14.96,-16.23,-17.18,-17.79,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18,-18 5 | PARAM_BODY_ANGLE_X=3 6 | PARAM_BODY_ANGLE_Y=0,0.15,0.5,0.94,1.37,1.71,1.93,2,1.97,1.9,1.79,1.65,1.48,1.29,1.1,0.9,0.71,0.52,0.35,0.21,0.1,0.03,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 7 | PARAM_BODY_ANGLE_Z=1,0.94,0.76,0.48,0.12,-0.3,-0.76,-1.25,-1.75,-2.24,-2.7,-3.12,-3.48,-3.76,-3.94,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4 8 | PARAM_ARM_R_B=0 9 | PARAM_BREATH=0 10 | PARAM_ANGLE_Y=8 11 | PARAM_BROW_R_Y=0 12 | PARAM_ANGLE_X=0 13 | PARAM_BROW_R_X=0 14 | PARAM_MOUTH_OPEN_Y=0,0,0,0,0,0,0,0,0.4,0.79,0.796,0.8,0.7,0.61,0.51,0.42,0.55,0.67,0.55,0.42,0.52,0.61,0.51,0.4,0.396,0.392,0.2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 15 | PARAM_MOUTH_FORM=1 16 | PARAM_EYE_L_OPEN=0 17 | PARAM_BUST_Y=0 18 | PARAM_EYE_FORM=0 19 | PARAM_EYE_L_SMILE=1 20 | PARAM_BROW_L_FORM=0 21 | PARAM_EYE_BALL_FORM=0 22 | PARAM_BROW_L_X=0 23 | PARAM_BROW_L_Y=0 24 | PARAM_BROW_R_ANGLE=0 25 | PARAM_EYE_R_SMILE=1 26 | PARAM_ARM_R_A=1 27 | PARAM_BROW_R_FORM=0 28 | PARAM_EYE_R_OPEN=0 29 | PARAM_TERE=0 30 | PARAM_HAIR_BACK=0 31 | PARAM_HAIR_FRONT=0 32 | PARAM_ARM_L_A=1 33 | PARAM_EYE_BALL_X=0 34 | PARAM_EYE_BALL_Y=0 35 | PARAM_ARM_L_B=0 -------------------------------------------------------------------------------- /example/ios/Runner/HaruFullPack/sounds/flick/haru_normal_06.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/HaruFullPack/sounds/flick/haru_normal_06.mp3 -------------------------------------------------------------------------------- /example/ios/Runner/HaruFullPack/sounds/pinch/haru_normal_01.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/HaruFullPack/sounds/pinch/haru_normal_01.mp3 -------------------------------------------------------------------------------- /example/ios/Runner/HaruFullPack/sounds/pinch/haru_normal_07.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/HaruFullPack/sounds/pinch/haru_normal_07.mp3 -------------------------------------------------------------------------------- /example/ios/Runner/HaruFullPack/sounds/shake/haru_normal_03.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/HaruFullPack/sounds/shake/haru_normal_03.mp3 -------------------------------------------------------------------------------- /example/ios/Runner/HaruFullPack/sounds/tap/haru_normal_02.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/HaruFullPack/sounds/tap/haru_normal_02.mp3 -------------------------------------------------------------------------------- /example/ios/Runner/HaruFullPack/sounds/tap/haru_normal_04.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/HaruFullPack/sounds/tap/haru_normal_04.mp3 -------------------------------------------------------------------------------- /example/ios/Runner/HaruFullPack/sounds/tap/haru_normal_05.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/HaruFullPack/sounds/tap/haru_normal_05.mp3 -------------------------------------------------------------------------------- /example/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | flutter_plugin2_example 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /example/ios/Runner/Miku/Miku.2048/texture_00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/Miku/Miku.2048/texture_00.png -------------------------------------------------------------------------------- /example/ios/Runner/Miku/Miku.moc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/Miku/Miku.moc -------------------------------------------------------------------------------- /example/ios/Runner/ShizukuFullPack/motions/expressions/f01.exp.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Expression", 3 | "fade_in":500, 4 | "fade_out":500 5 | 6 | } 7 | -------------------------------------------------------------------------------- /example/ios/Runner/ShizukuFullPack/motions/expressions/f02.exp.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Expression", 3 | "fade_in":500, 4 | "fade_out":500, 5 | "params": 6 | [ 7 | { "id":"PARAM_EYE_BALL_X", "val":-0.4 }, 8 | { "id":"PARAM_EYE_BALL_Y", "val":-0.7 }, 9 | { "id":"PARAM_EYE_L_OPEN","val":0.7,"def":1 ,"calc":"mult"}, 10 | { "id":"PARAM_EYE_R_OPEN", "val":0.7 , "def":1 ,"calc":"mult"}, 11 | { "id":"PARAM_DONYORI", "val":0.7 }, 12 | { "id":"PARAM_EYE_FORM", "val":0.3 }, 13 | { "id":"PARAM_BODY_Y", "val":-0.5 }, 14 | { "id":"PARAM_BROW_L_Y", "val":-0.3 }, 15 | { "id":"PARAM_BROW_R_Y", "val":-0.3 }, 16 | { "id":"PARAM_BROW_L_X", "val":-0.3 }, 17 | { "id":"PARAM_BROW_R_X", "val":-0.3 }, 18 | { "id":"PARAM_BROW_L_ANGLE", "val":0.5 }, 19 | { "id":"PARAM_BROW_R_ANGLE", "val":0.5 }, 20 | { "id":"PARAM_BROW_L_FORM", "val":-0.5 }, 21 | { "id":"PARAM_BROW_R_FORM", "val": -0.5 }, 22 | { "id":"PARAM_MOUTH_FORM", "val":-1 , "def":1 }, 23 | { "id":"PARAM_MOUTH_SIZE", "val":-1 } 24 | ] 25 | } -------------------------------------------------------------------------------- /example/ios/Runner/ShizukuFullPack/motions/expressions/f03.exp.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Expression", 3 | "fade_in":500, 4 | "fade_out":500, 5 | "params": 6 | [ 7 | { "id":"PARAM_EYE_BALL_Y", "val":0.2 }, 8 | { "id":"PARAM_BODY_Y", "val":-0.5 }, 9 | { "id":"PARAM_BROW_L_Y", "val":-0.2 }, 10 | { "id":"PARAM_BROW_R_Y", "val":-0.2 }, 11 | { "id":"PARAM_BROW_L_X", "val":-0.4 }, 12 | { "id":"PARAM_BROW_R_X", "val":-0.4 }, 13 | { "id":"PARAM_BROW_L_FORM", "val":-1 }, 14 | { "id":"PARAM_BROW_R_FORM", "val": -1 }, 15 | { "id":"PARAM_MOUTH_FORM", "val":-0.7 , "def":1 }, 16 | { "id":"PARAM_MOUTH_SIZE", "val":0.3 } 17 | ] 18 | } -------------------------------------------------------------------------------- /example/ios/Runner/ShizukuFullPack/motions/expressions/f04.exp.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Expression", 3 | "fade_in":500, 4 | "fade_out":500, 5 | "params": 6 | [ 7 | { "id":"PARAM_EYE_BALL_X", "val":-0.4 }, 8 | { "id":"PARAM_EYE_BALL_Y", "val":-0.7 }, 9 | { "id":"PARAM_EYE_BALL_KIRAKIRA", "val":1 }, 10 | { "id":"PARAM_EYE_L_OPEN","val":1.5,"def":1 ,"calc":"mult"}, 11 | { "id":"PARAM_EYE_R_OPEN", "val":1.5 , "def":1 ,"calc":"mult"}, 12 | { "id":"PARAM_BROW_L_FORM", "val":0.5 }, 13 | { "id":"PARAM_BROW_R_FORM", "val": 0.5 }, 14 | { "id":"PARAM_KAMIYURE_TWIN_L_02", "val": 0.3 }, 15 | { "id":"PARAM_KAMIYURE_TWIN_R_02", "val": -0.3 }, 16 | { "id":"PARAM_MOUTH_SIZE", "val":1 }, 17 | { "id":"PARAM_TERE", "val":1 , "def":0.6 } 18 | ] 19 | } -------------------------------------------------------------------------------- /example/ios/Runner/ShizukuFullPack/shizuku.1024/texture_00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/ShizukuFullPack/shizuku.1024/texture_00.png -------------------------------------------------------------------------------- /example/ios/Runner/ShizukuFullPack/shizuku.1024/texture_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/ShizukuFullPack/shizuku.1024/texture_01.png -------------------------------------------------------------------------------- /example/ios/Runner/ShizukuFullPack/shizuku.1024/texture_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/ShizukuFullPack/shizuku.1024/texture_02.png -------------------------------------------------------------------------------- /example/ios/Runner/ShizukuFullPack/shizuku.1024/texture_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/ShizukuFullPack/shizuku.1024/texture_03.png -------------------------------------------------------------------------------- /example/ios/Runner/ShizukuFullPack/shizuku.1024/texture_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/ShizukuFullPack/shizuku.1024/texture_04.png -------------------------------------------------------------------------------- /example/ios/Runner/ShizukuFullPack/shizuku.1024/texture_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/ShizukuFullPack/shizuku.1024/texture_05.png -------------------------------------------------------------------------------- /example/ios/Runner/ShizukuFullPack/shizuku.moc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/ShizukuFullPack/shizuku.moc -------------------------------------------------------------------------------- /example/ios/Runner/ShizukuFullPack/shizuku.pose.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Pose", 3 | 4 | "parts_visible": 5 | [ 6 | { 7 | "group": 8 | [ 9 | { "id":"PARTS_01_ARM_L_01" }, 10 | { "id":"PARTS_01_ARM_L_02" } 11 | ] 12 | }, 13 | { 14 | "group": 15 | [ 16 | { "id":"PARTS_01_ARM_R_01" }, 17 | { "id":"PARTS_01_ARM_R_02" } 18 | ] 19 | } 20 | ] 21 | 22 | } 23 | -------------------------------------------------------------------------------- /example/ios/Runner/ShizukuFullPack/sounds/flick/flickHead01.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/ShizukuFullPack/sounds/flick/flickHead01.mp3 -------------------------------------------------------------------------------- /example/ios/Runner/ShizukuFullPack/sounds/flick/flickHead02.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/ShizukuFullPack/sounds/flick/flickHead02.mp3 -------------------------------------------------------------------------------- /example/ios/Runner/ShizukuFullPack/sounds/flick/flickHead03.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/ShizukuFullPack/sounds/flick/flickHead03.mp3 -------------------------------------------------------------------------------- /example/ios/Runner/ShizukuFullPack/sounds/pinch/pinchIn01.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/ShizukuFullPack/sounds/pinch/pinchIn01.mp3 -------------------------------------------------------------------------------- /example/ios/Runner/ShizukuFullPack/sounds/pinch/pinchIn02.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/ShizukuFullPack/sounds/pinch/pinchIn02.mp3 -------------------------------------------------------------------------------- /example/ios/Runner/ShizukuFullPack/sounds/pinch/pinchIn03.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/ShizukuFullPack/sounds/pinch/pinchIn03.mp3 -------------------------------------------------------------------------------- /example/ios/Runner/ShizukuFullPack/sounds/pinch/pinchOut01.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/ShizukuFullPack/sounds/pinch/pinchOut01.mp3 -------------------------------------------------------------------------------- /example/ios/Runner/ShizukuFullPack/sounds/pinch/pinchOut02.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/ShizukuFullPack/sounds/pinch/pinchOut02.mp3 -------------------------------------------------------------------------------- /example/ios/Runner/ShizukuFullPack/sounds/pinch/pinchOut03.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/ShizukuFullPack/sounds/pinch/pinchOut03.mp3 -------------------------------------------------------------------------------- /example/ios/Runner/ShizukuFullPack/sounds/shake/shake01.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/ShizukuFullPack/sounds/shake/shake01.mp3 -------------------------------------------------------------------------------- /example/ios/Runner/ShizukuFullPack/sounds/shake/shake02.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/ShizukuFullPack/sounds/shake/shake02.mp3 -------------------------------------------------------------------------------- /example/ios/Runner/ShizukuFullPack/sounds/shake/shake03.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/ShizukuFullPack/sounds/shake/shake03.mp3 -------------------------------------------------------------------------------- /example/ios/Runner/ShizukuFullPack/sounds/tap/tapBody01.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/ShizukuFullPack/sounds/tap/tapBody01.mp3 -------------------------------------------------------------------------------- /example/ios/Runner/ShizukuFullPack/sounds/tap/tapBody02.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/ShizukuFullPack/sounds/tap/tapBody02.mp3 -------------------------------------------------------------------------------- /example/ios/Runner/ShizukuFullPack/sounds/tap/tapBody03.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/ShizukuFullPack/sounds/tap/tapBody03.mp3 -------------------------------------------------------------------------------- /example/ios/Runner/WankoFullPack/motions/tap/01_ote.mtn: -------------------------------------------------------------------------------- 1 | # Live2D Animator Motion Data 2 | $fps=30 3 | PARAM_HAND_R=0,0,0,0,0,0.07,0.25,0.47,0.68,0.85,0.96,1,0.91,0.76,0.63,0.53,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49 4 | PARAM_HAND_L=0 -------------------------------------------------------------------------------- /example/ios/Runner/WankoFullPack/motions/tap/02_okawari.mtn: -------------------------------------------------------------------------------- 1 | # Live2D Animator Motion Data 2 | $fps=30 3 | PARAM_HAND_R=0 4 | PARAM_HAND_L=0,0,0,0,0,0.07,0.25,0.47,0.68,0.85,0.96,1,0.91,0.76,0.63,0.53,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49 -------------------------------------------------------------------------------- /example/ios/Runner/WankoFullPack/motions/tap/03_tatsu.mtn: -------------------------------------------------------------------------------- 1 | # Live2D Animator Motion Data 2 | $fps=30 3 | PARAM_ANGLE_Z=0,0,0,0,0,0,0,0,0,0.18,0.66,1.41,2.34,3.38,4.5,5.62,6.66,7.59,8.34,8.82,9,8.69,7.86,6.66,5.24,3.76,2.34,1.14,0.31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 4 | PARAM_BODY_ANGLE_Y=0,-0.2,-0.62,-1.15,-1.7,-2.2,-2.62,-2.9,-3,-2.74,-2.04,-0.97,0.38,1.88,3.5,5.12,6.62,7.97,9.04,9.74,10,9.86,9.49,8.96,8.33,7.67,7.04,6.51,6.14,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6 5 | PARAM_BODY_ANGLE_Z=0,0,0,0,0,0,0,0,0,0.1,0.37,0.78,1.3,1.88,2.5,3.12,3.7,4.22,4.63,4.9,5,4.83,4.37,3.7,2.91,2.09,1.3,0.63,0.17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 6 | PARAM_ANGLE_Y=0,-0.92,-2.9,-5.37,-7.94,-10.29,-12.23,-13.52,-14,-13.2,-11.06,-7.75,-3.59,1.01,6,10.99,15.59,19.75,23.06,25.2,26,25.72,24.99,23.92,22.65,21.35,20.08,19.01,18.28,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18 7 | PARAM_ANGLE_X=0 8 | PARAM_EYE_L_OPEN=1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.76,0.36,0.09,0,0.08,0.26,0.5,0.74,0.92,1,1,1,1,1,1,1,1,1 9 | PARAM_HAND_R=0,0,0,0,0,0,0,0,0,0.02,0.07,0.16,0.26,0.38,0.5,0.62,0.74,0.84,0.93,0.98,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 10 | PARAM_HAND_L=0,0,0,0,0,0,0,0,0,0.02,0.07,0.16,0.26,0.38,0.5,0.62,0.74,0.84,0.93,0.98,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 11 | PARAM_EYE_R_OPEN=1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.76,0.36,0.09,0,0.08,0.26,0.5,0.74,0.92,1,1,1,1,1,1,1,1,1 -------------------------------------------------------------------------------- /example/ios/Runner/WankoFullPack/motions/tap/04_wan.mtn: -------------------------------------------------------------------------------- 1 | # Live2D Animator Motion Data 2 | $fps=30 3 | PARAM_ANGLE_Z=0 4 | PARAM_BODY_ANGLE_Y=0,0.44,1.51,2.82,4.1,5.13,5.78,6,5.61,4.76,3.7,2.6,1.59,0.76,0.21,0,0,0,0,0,0,0,0,0 5 | PARAM_BODY_ANGLE_Z=0,0.51,1.77,3.3,4.79,5.98,6.74,7,6.54,5.55,4.31,3.03,1.86,0.89,0.24,0,0,0,0,0,0,0,0,0 6 | PARAM_ANGLE_Y=0,1.84,6.31,11.77,17.09,21.36,24.08,25,23.36,19.82,15.41,10.82,6.63,3.17,0.86,0,0,0,0,0,0,0,0,0 7 | PARAM_ANGLE_X=0 8 | PARAM_MOUTH_OPEN_Y=0,0.07,0.25,0.47,0.68,0.85,0.96,1,0.93,0.79,0.62,0.43,0.27,0.13,0.03,0,0,0,0,0,0,0,0,0 9 | PARAM_EYE_L_OPEN=1,1,1,0.82,0.54,0.27,0.08,0,0.07,0.21,0.38,0.57,0.73,0.87,0.97,1,1,1,1,1,1,1,1,1 10 | PARAM_HAND_R=0 11 | PARAM_HAND_L=0 12 | PARAM_EYE_R_OPEN=1,1,1,0.82,0.54,0.27,0.08,0,0.07,0.21,0.38,0.57,0.73,0.87,0.97,1,1,1,1,1,1,1,1,1 -------------------------------------------------------------------------------- /example/ios/Runner/WankoFullPack/motions/tap/05_wanwan.mtn: -------------------------------------------------------------------------------- 1 | # Live2D Animator Motion Data 2 | $fps=30 3 | PARAM_ANGLE_Z=0 4 | PARAM_BODY_ANGLE_Y=0,0.45,1.55,3,4.45,5.55,6,5.55,4.45,3,1.55,0.45,0,0.44,1.51,2.82,4.1,5.13,5.78,6,5.56,4.49,3.18,1.9,0.87,0.22,0 5 | PARAM_BODY_ANGLE_Z=0,0.53,1.8,3.5,5.2,6.47,7,6.47,5.2,3.5,1.8,0.53,0,0.51,1.77,3.3,4.79,5.98,6.74,7,6.49,5.23,3.7,2.21,1.02,0.26,0 6 | PARAM_ANGLE_Y=0,1.88,6.44,12.5,18.56,23.12,25,23.5,19.85,15,10.15,6.5,5,6.47,10.05,14.41,18.67,22.09,24.26,25,23.16,18.69,13.23,7.91,3.64,0.92,0 7 | PARAM_ANGLE_X=0 8 | PARAM_MOUTH_OPEN_Y=0,0.08,0.26,0.5,0.74,0.92,1,0.92,0.74,0.5,0.26,0.08,0,0.07,0.25,0.47,0.68,0.85,0.96,1,0.93,0.75,0.53,0.32,0.15,0.04,0 9 | PARAM_EYE_L_OPEN=1,1,1,0.76,0.36,0.09,0,0.08,0.26,0.5,0.74,0.92,1,0.93,0.75,0.53,0.32,0.15,0.04,0,0.07,0.25,0.47,0.68,0.85,0.96,1 10 | PARAM_HAND_R=0 11 | PARAM_HAND_L=0 12 | PARAM_EYE_R_OPEN=1,1,1,0.76,0.36,0.09,0,0.08,0.26,0.5,0.74,0.92,1,0.93,0.75,0.53,0.32,0.15,0.04,0,0.07,0.25,0.47,0.68,0.85,0.96,1 -------------------------------------------------------------------------------- /example/ios/Runner/WankoFullPack/motions/tap/06_runrun.mtn: -------------------------------------------------------------------------------- 1 | # Live2D Animator Motion Data 2 | $fps=30 3 | PARAM_BOWL_LID=50 4 | PARAM_BODY_ANGLE_X=0 5 | PARAM_ANGLE_Z=0,-0.96,-3.28,-6.12,-8.89,-11.11,-12.52,-13,-12.63,-11.6,-9.98,-7.92,-5.46,-2.78,0.06,2.94,5.78,8.46,10.92,12.98,14.6,15.63,16,14.95,12.68,9.86,6.92,4.25,2.03,0.55,0 6 | PARAM_BODY_ANGLE_Y=0,0.22,0.76,1.41,2.05,2.56,2.89,3,2.78,2.24,1.59,0.95,0.44,0.11,0,0.2,0.62,1.15,1.7,2.2,2.62,2.9,3,2.8,2.38,1.85,1.3,0.8,0.38,0.1,0 7 | PARAM_FACE_01=0 8 | PARAM_BODY_ANGLE_Z=0,-0.74,-2.52,-4.71,-6.84,-8.55,-9.63,-10,-9.75,-9.04,-7.92,-6.49,-4.8,-2.95,-0.99,0.99,2.95,4.8,6.49,7.92,9.04,9.75,10,9.34,7.93,6.16,4.33,2.65,1.27,0.34,0 9 | PARAM_ANGLE_Y=0,0.96,3.28,6.12,8.89,11.11,12.52,13,11.46,7.7,3.11,-1.36,-4.95,-7.23,-8,-6.29,-2.61,1.98,6.75,11.1,14.71,17.11,18,16.82,14.27,11.09,7.79,4.78,2.28,0.62,0 10 | PARAM_ANGLE_X=0,0.07,0.25,0.47,0.68,0.85,0.96,1,0.93,0.75,0.53,0.32,0.15,0.04,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 11 | PARAM_MOUTH_OPEN_Y=1,1,1,1,1,1,1,1,0.93,0.75,0.53,0.32,0.15,0.04,0,0.07,0.21,0.38,0.57,0.73,0.87,0.97,1,1,1,1,1,1,1,1,1 12 | PARAM_EYE_L_OPEN=1,1,1,1,1,1,1,1,1,1,1,0.76,0.36,0.09,0,0.07,0.25,0.47,0.68,0.85,0.96,1,1,1,1,1,1,1,1,1,1 13 | PARAM_HAND_R=0 14 | PARAM_EAR_L=0 15 | PARAM_HAND_L=0 16 | PARAM_EAR_R=0 17 | PARAM_EYE_R_OPEN=1,1,1,1,1,1,1,1,1,1,1,0.76,0.36,0.09,0,0.07,0.25,0.47,0.68,0.85,0.96,1,1,1,1,1,1,1,1,1,1 -------------------------------------------------------------------------------- /example/ios/Runner/WankoFullPack/motions/tap/07_buruburu.mtn: -------------------------------------------------------------------------------- 1 | # Live2D Animator Motion Data 2 | $fps=30 3 | PARAM_BOWL_LID=50 4 | PARAM_BODY_ANGLE_X=0 5 | PARAM_ANGLE_Z=0 6 | PARAM_BODY_ANGLE_Y=0,0.34,1.27,2.6,4.18,5.82,7.4,8.73,9.66,10,9.76,9.12,8.15,6.94,5.6,4.18,2.78,1.47,0.31,-0.66,-1.39,-1.84,-2,-1.64,-1.07,-0.54,-0.15,0,0,0,0 7 | PARAM_FACE_01=0 8 | PARAM_BODY_ANGLE_Z=0,-0.73,-1.92,-2.73,-3,-1.55,0.83,2.47,3,1.79,-0.19,-1.56,-2,-1.03,0.56,1.65,2,1.85,1.48,1,0.52,0.15,0,0,0,0,0,0,0,0,0 9 | PARAM_ANGLE_Y=0,7.26,19.17,27.34,30,30,30,30,30,27.67,23.66,20.57,19,17.95,17.41,16.81,16,13.83,10.64,6.96,3.5,1.01,0,0,0,0,0,0,0,0,0 10 | PARAM_ANGLE_X=0,-7.26,-19.17,-27.34,-30,-15.48,8.34,24.68,30,17.65,-2.59,-16.47,-21,-10.11,7.75,20.01,24,22.2,17.82,12,6.18,1.8,0,0,0,0,0,0,0,0,0 11 | PARAM_MOUTH_OPEN_Y=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.18,0.46,0.73,0.92,1,1,1,1 12 | PARAM_EYE_L_OPEN=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.18,0.46,0.73,0.92,1,1,1,1 13 | PARAM_HAND_R=0 14 | PARAM_EAR_L=0 15 | PARAM_HAND_L=0 16 | PARAM_EAR_R=0 17 | PARAM_EYE_R_OPEN=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.18,0.46,0.73,0.92,1,1,1,1 -------------------------------------------------------------------------------- /example/ios/Runner/WankoFullPack/motions/tap/08_petan.mtn: -------------------------------------------------------------------------------- 1 | # Live2D Animator Motion Data 2 | $fps=30 3 | PARAM_BODY_ANGLE_X=0 4 | PARAM_ANGLE_Z=0,0,0,0,0,0,0.6,2.21,4.62,7.65,11,14.56,18.06,21.32,24.22,26.65,28.47,29.61,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30 5 | PARAM_BODY_ANGLE_Y=0,1.43,3.72,5.86,7.4,8,7.8,7.26,6.46,5.45,4.33,3.15,1.98,0.89,-0.07,-0.88,-1.49,-1.87,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2 6 | PARAM_BODY_ANGLE_Z=0,0.09,0.34,0.74,1.27,1.88,2.59,3.36,4.17,5,5.83,6.64,7.41,8.12,8.73,9.26,9.66,9.91,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10 7 | PARAM_ANGLE_Y=0,2.86,7.44,11.71,14.8,16,15.78,15.19,14.31,13.2,11.97,10.66,9.38,8.18,7.12,6.23,5.56,5.14,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5 8 | PARAM_ANGLE_X=0,0,0,0,0,0,-0.14,-0.51,-1.08,-1.78,-2.57,-3.4,-4.21,-4.98,-5.65,-6.22,-6.64,-6.91,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7 9 | PARAM_MOUTH_OPEN_Y=1,1,1,1,1,1,1,1,1,1,1,1,0.93,0.75,0.53,0.32,0.15,0.04,0,0.03,0.13,0.26,0.42,0.58,0.74,0.87,0.97,1,1,1,1,1,1,1,1,1,1 10 | PARAM_EYE_L_OPEN=1,1,1,1,1,1,1,1,1,1,1,1,0.93,0.75,0.53,0.32,0.15,0.04,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 11 | PARAM_EYE_R_OPEN=1,1,1,1,1,1,1,1,1,1,1,1,0.93,0.75,0.53,0.32,0.15,0.04,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -------------------------------------------------------------------------------- /example/ios/Runner/WankoFullPack/motions/tap/09_doya.mtn: -------------------------------------------------------------------------------- 1 | # Live2D Animator Motion Data 2 | $fps=30 3 | PARAM_ANGLE_Z=0,0.14,0.53,1.15,1.93,2.86,3.88,4.95,6.05,7.12,8.14,9.07,9.85,10.47,10.86,11,11,11,11,11,11,11,11,11,11,11 4 | PARAM_BODY_ANGLE_Y=0 5 | PARAM_FACE_01=0,-0.013,-0.05,-0.1,-0.18,-0.26,-0.35,-0.45,-0.55,-0.65,-0.74,-0.82,-0.9,-0.95,-0.99,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 6 | PARAM_BODY_ANGLE_Z=0,0.13,0.48,1.04,1.75,2.6,3.53,4.5,5.5,6.47,7.4,8.25,8.96,9.52,9.87,10,10,10,10,10,10,10,10,10,10,10 7 | PARAM_ANGLE_Y=0,0.23,0.87,1.88,3.16,4.68,6.35,8.1,9.9,11.65,13.32,14.84,16.12,17.13,17.77,18,18,18,18,18,18,18,18,18,18,18 8 | PARAM_ANGLE_X=0,0.03,0.1,0.21,0.35,0.52,0.71,0.9,1.1,1.29,1.48,1.65,1.79,1.9,1.97,2,2,2,2,2,2,2,2,2,2,2 9 | PARAM_MOUTH_OPEN_Y=0.82,0.82,0.82,0.82,0.82,0.82,0.82,0.82,0.82,0.82,0.82,0.82,0.82,0.82,0.82,0.82,0.82,0.82,0.82,0.82,0.82,0.82,0.82,0.82,0.82,0.82 10 | PARAM_EYE_L_OPEN=1,0.995,0.979,0.96,0.92,0.89,0.85,0.81,0.76,0.72,0.68,0.65,0.61,0.59,0.575,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57 11 | PARAM_HAND_R=0 12 | PARAM_HAND_L=0 13 | PARAM_EYE_R_OPEN=1,0.995,0.979,0.96,0.92,0.89,0.85,0.81,0.76,0.72,0.68,0.65,0.61,0.59,0.575,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57,0.57 -------------------------------------------------------------------------------- /example/ios/Runner/WankoFullPack/motions/tap/10_kiri.mtn: -------------------------------------------------------------------------------- 1 | # Live2D Animator Motion Data 2 | $fps=30 3 | PARAM_ANGLE_Z=0 4 | PARAM_BODY_ANGLE_Y=0,1.43,3.72,5.86,7.4,8,7.4,5.94,4,2.06,0.6,0,0,0,0,0,0,0,0,0,0,0,0 5 | PARAM_FACE_01=0,0.03,0.11,0.22,0.35,0.48,0.61,0.74,0.84,0.93,0.98,1,1,1,1,1,1,1,1,1,1,1,1 6 | PARAM_BODY_ANGLE_Z=0 7 | PARAM_ANGLE_Y=0,2.15,5.58,8.78,11.1,12,11.1,8.91,6,3.09,0.9,0,0,0,0,0,0,0,0,0,0,0,0 8 | PARAM_ANGLE_X=0 9 | PARAM_MOUTH_OPEN_Y=1,0.97,0.89,0.78,0.65,0.52,0.39,0.26,0.16,0.07,0.02,0,0,0,0,0,0,0,0,0,0,0,0 10 | PARAM_EYE_L_OPEN=1 11 | PARAM_HAND_R=0 12 | PARAM_HAND_L=0 13 | PARAM_EYE_R_OPEN=1 -------------------------------------------------------------------------------- /example/ios/Runner/WankoFullPack/motions/tap/13_dance03.mtn: -------------------------------------------------------------------------------- 1 | # Live2D Animator Motion Data 2 | $fps=30 3 | PARAM_BODY_ANGLE_X=0 4 | PARAM_ANGLE_Z=0,-1.03,-3.74,-7.65,-12.12,-16.75,-21.08,-24.77,-27.6,-29.37,-30,-28.8,-25.59,-20.63,-14.39,-7.49,0,7.49,14.39,20.63,25.59,28.8,30,26.76,18.9,9.29,-0.08,-7.6,-12.38,-14,-12.1,-7.99,-2.87,2.45,7.3,11.33,14,15,13.75,11.06,7.71,4.22,1.04,-1.59,-3.35,-4,-3.86,-3.49,-2.96,-2.33,-1.67,-1.04,-0.51,-0.14,0,0,0,0 5 | PARAM_BODY_ANGLE_Y=0,0.74,2.52,4.71,6.84,8.55,9.63,10,9.21,7.51,5.39,3.19,1.18,-0.48,-1.59,-2,-0.95,0.95,2,1.52,0.72,0.18,0,0.74,2.52,4.71,6.84,8.55,9.63,10,9.21,7.51,5.39,3.19,1.18,-0.48,-1.59,-2,-0.95,0.95,2,1.52,0.72,0.18,0,0,0,0,0,0,0,0,0,0,0,0,0,0 6 | PARAM_BODY_ANGLE_Z=0,-0.74,-2.52,-4.71,-6.84,-8.55,-9.63,-10,-9.6,-8.53,-6.88,-4.8,-2.5,0,2.5,4.8,6.88,8.53,9.6,10,9.997,9.983,9.95,9.88,9.77,9.61,9.38,9.09,8.71,8.24,7.68,7,5.98,4.81,3.59,2.33,1.14,0.03,-0.98,-1.8,-2.45,-2.85,-3,-2.9,-2.66,-2.33,-1.95,-1.55,-1.16,-0.79,-0.48,-0.22,-0.06,0,0,0,0,0 7 | PARAM_ANGLE_Y=30 8 | PARAM_ANGLE_X=0 9 | PARAM_MOUTH_OPEN_Y=1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.92,0.74,0.5,0.26,0.08,0,0.07,0.25,0.47,0.68,0.85,0.96,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 10 | PARAM_EYE_L_OPEN=0 11 | PARAM_HAND_R=0,0,0,0,0,0,0.24,0.64,0.91,1,0.74,0.26,0,0.1,0.28,0.38,0.28,0.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.26,0.74,1,0.74,0.26,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 12 | PARAM_HAND_L=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.24,0.64,0.91,1,0.74,0.26,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 13 | PARAM_EYE_R_OPEN=0 -------------------------------------------------------------------------------- /example/ios/Runner/WankoFullPack/wanko.1024/texture_00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/WankoFullPack/wanko.1024/texture_00.png -------------------------------------------------------------------------------- /example/ios/Runner/WankoFullPack/wanko.moc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/WankoFullPack/wanko.moc -------------------------------------------------------------------------------- /example/ios/Runner/WankoFullPack/wanko.model.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Model Setting", 3 | "name":"wanko", 4 | "model":"wanko.moc", 5 | "textures": 6 | [ 7 | "wanko.1024/texture_00.png" 8 | ], 9 | "hit_areas": 10 | [ 11 | {"name":"body","id":"D_REF.PT_SOBA_01"} 12 | ], 13 | "layout": 14 | { 15 | "center_x":0, 16 | "y":1.8, 17 | "width":2.9 18 | }, 19 | "motions": 20 | { 21 | "idle": 22 | [ 23 | {"file":"motions/idle/idl_01.mtn" ,"fade_in":500, "fade_out":200}, 24 | {"file":"motions/idle/idl_02.mtn" ,"fade_in":500, "fade_out":200}, 25 | {"file":"motions/idle/idl_03.mtn" ,"fade_in":500, "fade_out":200}, 26 | {"file":"motions/idle/idl_04.mtn" ,"fade_in":500, "fade_out":200} 27 | ], 28 | "shake": 29 | [ 30 | { "file":"motions/shake/shake_01.mtn","fade_in":500 }, 31 | { "file":"motions/shake/shake_02.mtn","fade_in":500 } 32 | ], 33 | "tap_body": 34 | [ 35 | {"file":"motions/tap/01_ote.mtn" ,"fade_in":500}, 36 | {"file":"motions/tap/02_okawari.mtn" ,"fade_in":500}, 37 | {"file":"motions/tap/03_tatsu.mtn" ,"fade_in":500}, 38 | {"file":"motions/tap/04_wan.mtn" ,"fade_in":500}, 39 | {"file":"motions/tap/05_wanwan.mtn" ,"fade_in":500}, 40 | {"file":"motions/tap/06_runrun.mtn" ,"fade_in":500}, 41 | {"file":"motions/tap/07_buruburu.mtn","fade_in":500}, 42 | {"file":"motions/tap/08_petan.mtn" ,"fade_in":500}, 43 | {"file":"motions/tap/09_doya.mtn" ,"fade_in":500}, 44 | {"file":"motions/tap/10_kiri.mtn" ,"fade_in":500}, 45 | {"file":"motions/tap/11_dance01.mtn" ,"fade_in":500}, 46 | {"file":"motions/tap/12_dance02.mtn" ,"fade_in":500}, 47 | {"file":"motions/tap/13_dance03.mtn" ,"fade_in":500} 48 | ] 49 | } 50 | } -------------------------------------------------------------------------------- /example/ios/Runner/Wankoromochi/Wankoromochi.1024/texture_00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/Wankoromochi/Wankoromochi.1024/texture_00.png -------------------------------------------------------------------------------- /example/ios/Runner/Wankoromochi/Wankoromochi.moc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/Wankoromochi/Wankoromochi.moc -------------------------------------------------------------------------------- /example/ios/Runner/back_class_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/back_class_normal.png -------------------------------------------------------------------------------- /example/ios/Runner/back_class_normal1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/back_class_normal1.png -------------------------------------------------------------------------------- /example/ios/Runner/hibiki/hibiki.cmox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/hibiki/hibiki.cmox -------------------------------------------------------------------------------- /example/ios/Runner/hibiki/hibiki_expressions.canx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/hibiki/hibiki_expressions.canx -------------------------------------------------------------------------------- /example/ios/Runner/hibiki/hibiki_voice.canx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/hibiki/hibiki_voice.canx -------------------------------------------------------------------------------- /example/ios/Runner/hibiki/runtime/expressions/f01.exp.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Expression", 3 | "fade_in":500, 4 | "fade_out":500 5 | } -------------------------------------------------------------------------------- /example/ios/Runner/hibiki/runtime/expressions/f02.exp.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Expression", 3 | "fade_in":500, 4 | "fade_out":500, 5 | "params":[ 6 | {"id":"PARAM_BROW_L_FORM","val":-1}, 7 | {"id":"PARAM_BROW_R_FORM","val":-1}, 8 | {"id":"PARAM_MOUTH_FORM","val":0,"def":1} 9 | ] 10 | } -------------------------------------------------------------------------------- /example/ios/Runner/hibiki/runtime/expressions/f03.exp.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Expression", 3 | "fade_in":500, 4 | "fade_out":500, 5 | "params":[ 6 | {"id":"PARAM_BROW_L_X","val":-0.42}, 7 | {"id":"PARAM_BROW_R_X","val":-0.42}, 8 | {"id":"PARAM_BROW_L_ANGLE","val":0.62}, 9 | {"id":"PARAM_BROW_R_ANGLE","val":0.68}, 10 | {"id":"PARAM_BROW_L_FORM","val":-1}, 11 | {"id":"PARAM_BROW_R_FORM","val":-1}, 12 | {"id":"PARAM_MOUTH_FORM","val":0.15,"def":1} 13 | ] 14 | } -------------------------------------------------------------------------------- /example/ios/Runner/hibiki/runtime/expressions/f04.exp.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Expression", 3 | "fade_in":500, 4 | "fade_out":500, 5 | "params":[ 6 | {"id":"PARAM_BROW_L_Y","val":0.39}, 7 | {"id":"PARAM_BROW_R_Y","val":0.33}, 8 | {"id":"PARAM_BROW_L_ANGLE","val":0.19}, 9 | {"id":"PARAM_BROW_R_ANGLE","val":0.19}, 10 | {"id":"PARAM_BROW_L_FORM","val":1}, 11 | {"id":"PARAM_BROW_R_FORM","val":1}, 12 | {"id":"PARAM_MOUTH_FORM","val":0.31,"def":1} 13 | ] 14 | } -------------------------------------------------------------------------------- /example/ios/Runner/hibiki/runtime/expressions/f05.exp.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Expression", 3 | "fade_in":500, 4 | "fade_out":500, 5 | "params":[ 6 | {"id":"PARAM_BROW_L_Y","val":-0.25}, 7 | {"id":"PARAM_BROW_R_Y","val":-0.25}, 8 | {"id":"PARAM_BROW_L_ANGLE","val":0.54}, 9 | {"id":"PARAM_BROW_R_ANGLE","val":0.59}, 10 | {"id":"PARAM_BROW_L_FORM","val":-0.42}, 11 | {"id":"PARAM_BROW_R_FORM","val":-0.45}, 12 | {"id":"PARAM_MOUTH_FORM","val":0.79,"def":1}, 13 | {"id":"PARAM_TERE","val":1} 14 | ] 15 | } -------------------------------------------------------------------------------- /example/ios/Runner/hibiki/runtime/expressions/f06.exp.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Live2D Expression", 3 | "fade_in":500, 4 | "fade_out":500, 5 | "params":[ 6 | {"id":"PARAM_BROW_L_ANGLE","val":0.1}, 7 | {"id":"PARAM_BROW_R_ANGLE","val":0.16}, 8 | {"id":"PARAM_BROW_L_FORM","val":-0.51}, 9 | {"id":"PARAM_BROW_R_FORM","val":-0.51}, 10 | {"id":"PARAM_MOUTH_FORM","val":0.5,"def":1} 11 | ] 12 | } -------------------------------------------------------------------------------- /example/ios/Runner/hibiki/runtime/hibiki.2048/texture_00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/hibiki/runtime/hibiki.2048/texture_00.png -------------------------------------------------------------------------------- /example/ios/Runner/hibiki/runtime/hibiki.moc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/hibiki/runtime/hibiki.moc -------------------------------------------------------------------------------- /example/ios/Runner/hibiki/runtime/hibiki.model.json: -------------------------------------------------------------------------------- 1 | { 2 | "version":"Sample 1.0.0", 3 | "model":"hibiki.moc", 4 | "textures":[ 5 | "hibiki.2048/texture_00.png" 6 | ], 7 | "motions":{ 8 | "null":[ 9 | { 10 | "file":"motions/hibiki_01.mtn", 11 | "sound":"sounds/hibiki_01.mp3" 12 | }, 13 | { 14 | "file":"motions/hibiki_02.mtn", 15 | "sound":"sounds/hibiki_02.mp3" 16 | }, 17 | { 18 | "file":"motions/hibiki_03.mtn", 19 | "sound":"sounds/hibiki_03.mp3" 20 | }, 21 | { 22 | "file":"motions/hibiki_04.mtn", 23 | "sound":"sounds/hibiki_04.mp3" 24 | }, 25 | { 26 | "file":"motions/hibiki_05.mtn", 27 | "sound":"sounds/hibiki_05.mp3" 28 | } 29 | ], 30 | "idle":[ 31 | { 32 | "file":"motions/idle_01.mtn" 33 | }, 34 | { 35 | "file":"motions/idle_02.mtn" 36 | }, 37 | { 38 | "file":"motions/idle_03.mtn" 39 | }, 40 | { 41 | "file":"motions/idle_04.mtn" 42 | } 43 | ] 44 | }, 45 | "expressions":[ 46 | {"name":"f01.mtn","file":"expressions/f01.exp.json"}, 47 | {"name":"f02.mtn","file":"expressions/f02.exp.json"}, 48 | {"name":"f03.mtn","file":"expressions/f03.exp.json"}, 49 | {"name":"f04.mtn","file":"expressions/f04.exp.json"}, 50 | {"name":"f05.mtn","file":"expressions/f05.exp.json"}, 51 | {"name":"f06.mtn","file":"expressions/f06.exp.json"} 52 | ], 53 | "physics":"hibiki.physics.json" 54 | } -------------------------------------------------------------------------------- /example/ios/Runner/hibiki/runtime/sounds/hibiki_01.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/hibiki/runtime/sounds/hibiki_01.mp3 -------------------------------------------------------------------------------- /example/ios/Runner/hibiki/runtime/sounds/hibiki_02.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/hibiki/runtime/sounds/hibiki_02.mp3 -------------------------------------------------------------------------------- /example/ios/Runner/hibiki/runtime/sounds/hibiki_03.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/hibiki/runtime/sounds/hibiki_03.mp3 -------------------------------------------------------------------------------- /example/ios/Runner/hibiki/runtime/sounds/hibiki_04.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/hibiki/runtime/sounds/hibiki_04.mp3 -------------------------------------------------------------------------------- /example/ios/Runner/hibiki/runtime/sounds/hibiki_05.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/hibiki/runtime/sounds/hibiki_05.mp3 -------------------------------------------------------------------------------- /example/ios/Runner/hiyori_pro_en/ReadMe.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/hiyori_pro_en/ReadMe.txt -------------------------------------------------------------------------------- /example/ios/Runner/hiyori_pro_en/hiyori_pro_en_t02.can3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/hiyori_pro_en/hiyori_pro_en_t02.can3 -------------------------------------------------------------------------------- /example/ios/Runner/hiyori_pro_en/hiyori_pro_en_t07.cmo3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/example/ios/Runner/hiyori_pro_en/hiyori_pro_en_t07.cmo3 -------------------------------------------------------------------------------- /example/ios/Runner/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char* argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /example/test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:flutter_plugin2_example/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Verify Platform version', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(MyApp()); 17 | 18 | // Verify that platform version is retrieved. 19 | expect( 20 | find.byWidgetPredicate( 21 | (Widget widget) => widget is Text && 22 | widget.data.startsWith('Running on:'), 23 | ), 24 | findsOneWidget, 25 | ); 26 | }); 27 | } 28 | -------------------------------------------------------------------------------- /flutter_plugin2.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Sep 21 17:39:42 CST 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip 7 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vagrant/ 3 | .sconsign.dblite 4 | .svn/ 5 | 6 | .DS_Store 7 | *.swp 8 | profile 9 | 10 | DerivedData/ 11 | build/ 12 | GeneratedPluginRegistrant.h 13 | GeneratedPluginRegistrant.m 14 | 15 | .generated/ 16 | 17 | *.pbxuser 18 | *.mode1v3 19 | *.mode2v3 20 | *.perspectivev3 21 | 22 | !default.pbxuser 23 | !default.mode1v3 24 | !default.mode2v3 25 | !default.perspectivev3 26 | 27 | xcuserdata 28 | 29 | *.moved-aside 30 | 31 | *.pyc 32 | *sync/ 33 | Icon? 34 | .tags* 35 | 36 | /Flutter/Generated.xcconfig 37 | /Flutter/flutter_export_environment.sh -------------------------------------------------------------------------------- /ios/Assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/ios/Assets/.gitkeep -------------------------------------------------------------------------------- /ios/Classes/FLNativeView.h: -------------------------------------------------------------------------------- 1 | // 2 | // FLNativeView.h 3 | // flutter_plugin2 4 | // 5 | // Created by mac on 2020/11/5. 6 | // 7 | 8 | #import 9 | 10 | @interface FLNativeViewFactory : NSObject 11 | - (instancetype)initWithMessenger:(NSObject*)messenger; 12 | @end 13 | 14 | @interface FLNativeView : NSObject 15 | 16 | - (instancetype)initWithFrame:(CGRect)frame 17 | viewIdentifier:(int64_t)viewId 18 | arguments:(id _Nullable)args 19 | binaryMessenger:(NSObject*)messenger; 20 | 21 | - (UIView*)view; 22 | @end 23 | -------------------------------------------------------------------------------- /ios/Classes/FlutterPlugin2Plugin.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface FlutterPlugin2Plugin : NSObject 4 | @end 5 | -------------------------------------------------------------------------------- /ios/Classes/FlutterPlugin2Plugin.m: -------------------------------------------------------------------------------- 1 | #import "FlutterPlugin2Plugin.h" 2 | #import "FLNativeView.h" 3 | #import "PPLive2dView.h" 4 | @implementation FlutterPlugin2Plugin 5 | + (void)registerWithRegistrar:(NSObject*)registrar { 6 | FlutterMethodChannel* channel = [FlutterMethodChannel 7 | methodChannelWithName:@"flutter_plugin2" 8 | binaryMessenger:[registrar messenger]]; 9 | FlutterPlugin2Plugin* instance = [[FlutterPlugin2Plugin alloc] init]; 10 | FLNativeViewFactory* factory = 11 | [[FLNativeViewFactory alloc] initWithMessenger:registrar.messenger]; 12 | [registrar registerViewFactory:factory withId:@"platform-live2dView"]; 13 | [registrar addMethodCallDelegate:instance channel:channel]; 14 | } 15 | 16 | - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result { 17 | 18 | } 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /ios/Classes/PPLive2dView.h: -------------------------------------------------------------------------------- 1 | // 2 | // PPLive2dView.h 3 | // flutter_plugin2 4 | // 5 | // Created by mac on 2020/11/5. 6 | // 7 | 8 | #import 9 | NS_ASSUME_NONNULL_BEGIN 10 | 11 | @interface PPLive2dView : UIView 12 | - (BOOL)startRandomMotion:(NSString *)name priority:(int)priority; 13 | - (BOOL)startMotion:(NSString *)name no:(int)no priority:(int)priority; 14 | - (BOOL)startExpression:(NSString *)name; 15 | - (void)shakeEvent; 16 | - (void)speakMotion:(BOOL)isSpeaking; 17 | - (void)setModelJsonPath:(NSString *)modelPath; 18 | //设置模型所在视图Tag 19 | - (void)setModelViewTag:(int)viewTag centerX:(double)center_x y:(double)y; 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /ios/Classes/PPLive2dView.mm: -------------------------------------------------------------------------------- 1 | // 2 | // PPLive2dView.m 3 | // flutter_plugin2 4 | // 5 | // Created by mac on 2020/11/5. 6 | // 7 | 8 | #import "PPLive2dView.h" 9 | #import "LAppLive2DManager.h" 10 | #import "LAppDefine.h" 11 | #import "LModelConfig.h" 12 | @implementation PPLive2dView 13 | { 14 | LAppLive2DManager *_live2DMgr; 15 | int modelViewTag; 16 | } 17 | - (void)drawRect:(CGRect)rect { 18 | _live2DMgr = new LAppLive2DManager(); 19 | LAppView *lview = _live2DMgr->createView(rect); 20 | _live2DMgr->addModel([@"HaruFullPack/haru.model.json" UTF8String], [@"123123" UTF8String],NULL); 21 | _live2DMgr->setModelViewTag(modelViewTag); 22 | [self addSubview:lview]; 23 | } 24 | 25 | -(BOOL)startRandomMotion:(NSString *)name priority:(int)priority{ 26 | _live2DMgr->startRandomMotion([name UTF8String], priority); 27 | return true; 28 | } 29 | 30 | -(BOOL)startMotion:(NSString *)name no:(int)no priority:(int)priority{ 31 | _live2DMgr->startMotion([name UTF8String], no, priority); 32 | return true; 33 | } 34 | 35 | -(BOOL)startExpression:(NSString *)name{ 36 | _live2DMgr->setExpression([name UTF8String]); 37 | return true; 38 | } 39 | 40 | -(void)shakeEvent{ 41 | _live2DMgr->shakeEvent(); 42 | } 43 | 44 | - (void)speakMotion:(BOOL)isSpeaking{ 45 | _live2DMgr->speakMotion(isSpeaking); 46 | } 47 | 48 | - (void)setModelJsonPath:(NSString *)modelPath{ 49 | // _live2DMgr->loadModel([modelPath UTF8String]); 50 | LModelConfig *modelConfig = [[LModelConfig alloc] init]; 51 | modelConfig.center_x = 0; 52 | modelConfig.y = 0; 53 | modelConfig.weight = 2; 54 | _live2DMgr->addModel([modelPath UTF8String], [@"111111" UTF8String],modelConfig); 55 | _live2DMgr->setModelViewTag(modelViewTag); 56 | } 57 | 58 | //设置模型所在视图Tag 59 | - (void)setModelViewTag:(int)viewTag{ 60 | modelViewTag = viewTag; 61 | } 62 | @end 63 | -------------------------------------------------------------------------------- /ios/PPLive2D/Assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/ios/PPLive2D/Assets/.gitkeep -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/framework/IPlatformManager.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * You can modify and use this source freely 4 | * only for the development of application related Live2D. 5 | * 6 | * (c) Live2D Inc. All rights reserved. 7 | */ 8 | #pragma once 9 | 10 | #include "ALive2DModel.h" 11 | #include "L2DTextureDesc.h" 12 | 13 | namespace live2d 14 | { 15 | namespace framework 16 | { 17 | class IPlatformManager 18 | { 19 | public: 20 | virtual ~IPlatformManager(){} 21 | virtual unsigned char* loadBytes(const char* path,size_t* size)=0; 22 | virtual void releaseBytes(void* data)=0; 23 | virtual live2d::ALive2DModel* loadLive2DModel(const char* path)=0; 24 | virtual L2DTextureDesc* loadTexture(live2d::ALive2DModel* model, int no, const char* path)=0; 25 | virtual void log(const char* txt)=0; 26 | }; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/framework/L2DExpressionMotion.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * You can modify and use this source freely 4 | * only for the development of application related Live2D. 5 | * 6 | * (c) Live2D Inc. All rights reserved. 7 | */ 8 | #pragma once 9 | 10 | 11 | //Live2D lib 12 | #include "AMotion.h" 13 | #include "Json.h" 14 | #include "ALive2DModel.h" 15 | #include "UtFile.h" 16 | #include 17 | #include 18 | 19 | namespace live2d 20 | { 21 | namespace framework 22 | { 23 | struct L2DExpressionParam 24 | { 25 | std::string pid; 26 | //int index=-1; 27 | int type; 28 | float value; 29 | 30 | }; 31 | 32 | class L2DExpressionMotion : public AMotion 33 | { 34 | private: 35 | static const char EXPRESSION_DEFAULT[];// 旧表情設定ファイルのデフォルト値要素のキー 36 | static const int TYPE_ADD;// 通常。指定の値を足し合わせる 37 | static const int TYPE_MULT;// 指定の値を掛け合わせる 38 | static const int TYPE_SET;// 指定の値を上書きする 39 | 40 | std::vector paramList; 41 | 42 | public: 43 | virtual ~L2DExpressionMotion(void){} 44 | 45 | // 読み込み 46 | static L2DExpressionMotion* loadJson( const void *buf ,int size ) ; 47 | static L2DExpressionMotion* loadJson(const std::string & filepath ); 48 | static void loadExpressionJsonV09( 49 | live2d::LDMap& expressions , 50 | const void *buf ,int size ) ; 51 | 52 | static L2DExpressionMotion* loadJsonV09( live2d::Value &defaultExpr , live2d::Value &expr ) ; 53 | 54 | // 更新 55 | virtual void updateParamExe( 56 | live2d::ALive2DModel * model , l2d_int64 timeMSec , 57 | float weight , MotionQueueEnt *motionQueueEnt ) ; 58 | }; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/framework/L2DEyeBlink.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * You can modify and use this source freely 4 | * only for the development of application related Live2D. 5 | * 6 | * (c) Live2D Inc. All rights reserved. 7 | */ 8 | #pragma once 9 | 10 | #include 11 | #include 12 | #include 13 | //Live2D lib 14 | #include "ALive2DModel.h" 15 | #include "UtSystem.h" 16 | 17 | namespace live2d 18 | { 19 | namespace framework 20 | { 21 | class L2DEyeBlink 22 | { 23 | public: 24 | // 眼の状態定数 25 | enum EYE_STATE{ 26 | STATE_FIRST = 0 , 27 | STATE_INTERVAL , 28 | STATE_CLOSING ,// 閉じていく途中 29 | STATE_CLOSED , // 閉じている状態 30 | STATE_OPENING// 開いていく途中 31 | }; 32 | 33 | L2DEyeBlink(); 34 | virtual ~L2DEyeBlink(){} 35 | 36 | l2d_int64 calcNextBlink() ; 37 | void setInterval( int blinkIntervalMsec) ; 38 | void setEyeMotion( int closingMotionMsec , int closedMotionMsec , int openingMotionMsec ) ; 39 | 40 | // モデルのパラメータを更新 41 | void setParam( live2d::ALive2DModel *model ) ; 42 | 43 | private: 44 | l2d_int64 nextBlinkTime ;// 次回眼パチする時刻(msec) 45 | int eyeState ;// 現在の状態 46 | l2d_int64 stateStartTime ;// 現在のstateが開始した時刻 47 | bool closeIfZero;// IDで指定された眼のパラメータが、0のときに閉じるなら true 、1の時に閉じるなら false 48 | 49 | // 左右の目のパラメータ 50 | std::string eyeID_L ; 51 | std::string eyeID_R ; 52 | 53 | // 設定 54 | int blinkIntervalMsec ;// 瞬きの間隔 55 | int closingMotionMsec ;// 眼が閉じるまでの時間 56 | int closedMotionMsec ;// 閉じたままでいる時間 57 | int openingMotionMsec ;// 眼が開くまでの時間 58 | }; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/framework/L2DMatrix44.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * You can modify and use this source freely 4 | * only for the development of application related Live2D. 5 | * 6 | * (c) Live2D Inc. All rights reserved. 7 | */ 8 | #pragma once 9 | 10 | namespace live2d 11 | { 12 | namespace framework 13 | { 14 | class L2DMatrix44 15 | { 16 | protected: 17 | float tr[16];// 行列データ 18 | 19 | public: 20 | L2DMatrix44(); 21 | virtual ~L2DMatrix44(){} 22 | 23 | // 単位行列に初期化 24 | void identity() ; 25 | 26 | // 行列配列を取得 27 | float* getArray(){ return tr; } 28 | 29 | // 行列を設定 30 | void setMatrix( float* _tr ); 31 | 32 | // xの拡大率を取得 33 | float getScaleX(){return tr[0] ;} 34 | 35 | // yの拡大率を取得 36 | float getScaleY(){return tr[5] ;} 37 | 38 | float getTranslateX(){return tr[12] ;} 39 | 40 | float getTranslateY(){return tr[13] ;} 41 | 42 | // xの値を現在の行列で計算する 43 | float transformX( float src ); 44 | 45 | // yの値を現在の行列で計算する 46 | float transformY( float src ); 47 | 48 | // xの値を現在の行列で逆計算する 49 | float invertTransformX( float src ); 50 | 51 | // yの値を現在の行列で逆計算する 52 | float invertTransformY( float src ); 53 | 54 | // 移動量の計算 55 | void multTranslate( float shiftX, float shiftY ); 56 | void translate( float shiftX, float shiftY ); 57 | void translateX( float shiftX ) {tr[12]=shiftX;} 58 | void translateY( float shiftY ) {tr[13]=shiftY;} 59 | 60 | // 拡大率の計算 61 | void multScale( float scaleX,float scaleY ); 62 | void scale( float scaleX,float scaleY ); 63 | 64 | // 受け取った2つの行列の掛け算を行う 65 | static void mul( float* a, float* b, float* dst ); 66 | 67 | void append(L2DMatrix44* m); 68 | }; 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/framework/L2DModelMatrix.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * You can modify and use this source freely 4 | * only for the development of application related Live2D. 5 | * 6 | * (c) Live2D Inc. All rights reserved. 7 | */ 8 | 9 | #pragma once 10 | 11 | #include "L2DMatrix44.h" 12 | #include 13 | #include 14 | 15 | namespace live2d 16 | { 17 | namespace framework 18 | { 19 | /* 20 | * モデルの位置指定に使うと便利な行列 21 | */ 22 | class L2DModelMatrix : public L2DMatrix44 23 | { 24 | private: 25 | float width;// モデルのサイズ 26 | float height; 27 | 28 | public: 29 | L2DModelMatrix(float w,float h); 30 | ~L2DModelMatrix(){} 31 | 32 | void setWidth(float w); 33 | void setHeight(float h); 34 | 35 | void setPosition(float x,float y){translate(x, y);} 36 | void setCenterPosition(float x,float y); 37 | 38 | void top(float y){setY(y);} 39 | void bottom(float y); 40 | void left(float x){setX(x);} 41 | void right(float x); 42 | 43 | void centerX(float x); 44 | void setX(float x){translateX(x);} 45 | void centerY(float y); 46 | void setY(float y){translateY(y);} 47 | void setupLayout(std::map& layout); 48 | }; 49 | } 50 | } -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/framework/L2DMotionManager.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * You can modify and use this source freely 4 | * only for the development of application related Live2D. 5 | * 6 | * (c) Live2D Inc. All rights reserved. 7 | */ 8 | #include "L2DMotionManager.h" 9 | 10 | namespace live2d 11 | { 12 | namespace framework 13 | { 14 | L2DMotionManager::L2DMotionManager() 15 | :currentPriority(0),reservePriority(0) 16 | { 17 | 18 | } 19 | 20 | 21 | int L2DMotionManager::startMotionPrio( AMotion* motion, bool isDelete, int priority ) 22 | { 23 | if(priority==reservePriority) 24 | { 25 | reservePriority=0;// 予約を解除 26 | } 27 | currentPriority=priority;// 再生中モーションの優先度を設定 28 | return super::startMotion(motion, isDelete); 29 | } 30 | 31 | 32 | bool L2DMotionManager::updateParam(ALive2DModel* model) 33 | { 34 | bool updated=super::updateParam(model); 35 | if(isFinished()) 36 | { 37 | currentPriority=0;// 再生中モーションの優先度を解除 38 | } 39 | return updated; 40 | } 41 | 42 | 43 | bool L2DMotionManager::reserveMotion(int priority) 44 | { 45 | if ( priority <= reservePriority || priority <= currentPriority ) 46 | { 47 | return false; 48 | } 49 | reservePriority=priority; 50 | return true; 51 | } 52 | } 53 | } -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/framework/L2DMotionManager.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * You can modify and use this source freely 4 | * only for the development of application related Live2D. 5 | * 6 | * (c) Live2D Inc. All rights reserved. 7 | */ 8 | #pragma once 9 | 10 | //Live2D lib 11 | #include "ALive2DModel.h" 12 | #include "AMotion.h" 13 | #include "MotionQueueManager.h" 14 | 15 | namespace live2d 16 | { 17 | namespace framework 18 | { 19 | class L2DMotionManager : public MotionQueueManager 20 | { 21 | typedef MotionQueueManager super; 22 | public: 23 | L2DMotionManager(); 24 | virtual ~L2DMotionManager(){} 25 | 26 | private: 27 | int currentPriority;// 現在再生中のモーションの優先度 28 | int reservePriority;// 再生予定のモーションの優先度。再生中は0になる。モーションファイルを別スレッドで読み込むときの機能。 29 | 30 | public: 31 | // 再生中のモーションの優先度 32 | int getCurrentPriority(){return currentPriority;} 33 | 34 | // 予約中のモーションの優先度 35 | int getReservePriority(){return reservePriority;} 36 | 37 | // モーションを予約する 38 | void setReservePriority( int val ){reservePriority=val;} 39 | 40 | // モーション開始 41 | int startMotionPrio( live2d::AMotion* motion, bool isDelete, int priority ); 42 | 43 | bool updateParam(live2d::ALive2DModel* model); 44 | 45 | bool reserveMotion(int priority); 46 | }; 47 | } 48 | } 49 | 50 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/framework/L2DPhysics.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * You can modify and use this source freely 4 | * only for the development of application related Live2D. 5 | * 6 | * (c) Live2D Inc. All rights reserved. 7 | */ 8 | #pragma once 9 | 10 | #include "PhysicsHair.h" 11 | #include "ALive2DModel.h" 12 | #include "UtFile.h" 13 | #include 14 | #include 15 | 16 | namespace live2d 17 | { 18 | namespace framework 19 | { 20 | class L2DPhysics 21 | { 22 | private: 23 | std::vector physicsObjects; 24 | std::vector paramIDs; 25 | l2d_int64 startTimeMSec; 26 | 27 | public: 28 | L2DPhysics(void); 29 | ~L2DPhysics(void); 30 | 31 | void updateParam(live2d::ALive2DModel* model) ; 32 | 33 | // JSONファイルから読み込み 34 | static L2DPhysics* load(const void* buf , int size ) ; 35 | static L2DPhysics* load(const std::string & filepath ); 36 | }; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/framework/L2DTargetPoint.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * You can modify and use this source freely 4 | * only for the development of application related Live2D. 5 | * 6 | * (c) Live2D Inc. All rights reserved. 7 | */ 8 | #pragma once 9 | 10 | 11 | //Live2D lib 12 | #include "Live2D.h" 13 | #include "UtMath.h" 14 | 15 | namespace live2d 16 | { 17 | namespace framework 18 | { 19 | class L2DTargetPoint 20 | { 21 | private: 22 | float faceTargetX; // 顔の向きのX目標値(この値に近づいていく) 23 | float faceTargetY; // 顔の向きのY目標値(この値に近づいていく) 24 | float faceX; // 顔の向きX(-1~1) 25 | float faceY; // 顔の向きY(-1~1) 26 | float faceVX; // 顔の向きの変化速度X 27 | float faceVY; // 顔の向きの変化速度Y 28 | l2d_int64 timeSec; 29 | l2d_int64 lastTimeSec; 30 | 31 | public: 32 | static const int FRAME_RATE = 30; 33 | 34 | public: 35 | L2DTargetPoint(); 36 | 37 | virtual ~L2DTargetPoint(){} 38 | 39 | void update(); 40 | 41 | float getX(){return this->faceX;} 42 | 43 | float getY(){return this->faceY;} 44 | 45 | void set( float x, float y ); 46 | }; 47 | } 48 | } 49 | 50 | 51 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/framework/L2DTextureDesc.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * You can modify and use this source freely 4 | * only for the development of application related Live2D. 5 | * 6 | * (c) Live2D Inc. All rights reserved. 7 | */ 8 | #include "L2DTextureDesc.h" 9 | 10 | namespace live2d 11 | { 12 | namespace framework 13 | { 14 | L2DTextureDesc::L2DTextureDesc() 15 | { 16 | } 17 | 18 | L2DTextureDesc::~L2DTextureDesc() 19 | { 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/framework/L2DTextureDesc.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * You can modify and use this source freely 4 | * only for the development of application related Live2D. 5 | * 6 | * (c) Live2D Inc. All rights reserved. 7 | */ 8 | #pragma once 9 | 10 | 11 | namespace live2d 12 | { 13 | namespace framework 14 | { 15 | class L2DTextureDesc 16 | { 17 | public: 18 | L2DTextureDesc(); 19 | virtual ~L2DTextureDesc(); 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/framework/L2DViewMatrix.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * You can modify and use this source freely 4 | * only for the development of application related Live2D. 5 | * 6 | * (c) Live2D Inc. All rights reserved. 7 | */ 8 | #pragma once 9 | #include "L2DMatrix44.h" 10 | #include "UtDebug.h" 11 | 12 | namespace live2d 13 | { 14 | namespace framework 15 | { 16 | // カメラの位置変更に使うと便利な行列 17 | class L2DViewMatrix : public L2DMatrix44{ 18 | private: 19 | float max; 20 | float min; 21 | 22 | float screenLeft;// デバイスに対応する論理座標上の範囲 23 | float screenRight; 24 | float screenTop; 25 | float screenBottom; 26 | float maxLeft;// 論理座標上の移動可能範囲(ここからははみ出さない) 27 | float maxRight; 28 | float maxTop; 29 | float maxBottom; 30 | 31 | public: 32 | L2DViewMatrix(){} 33 | 34 | void adjustTranslate(float shiftX, float shiftY) ; 35 | void adjustScale(float scaleCenterX,float scaleCenterY,float scale); 36 | void setScreenRect(float left, float right, float bottom, float top) ; 37 | void setMaxScreenRect(float left, float right, float bottom, float top) ; 38 | 39 | float getMaxScale(){return max ;} 40 | float getMinScale(){return min ;} 41 | void setMaxScale(float v){max=v;} 42 | void setMinScale(float v){min=v;} 43 | bool isMaxScale(){return getScaleX()>=max ;} 44 | bool isMinScale(){return getScaleX()<=min ;} 45 | float getScreenLeft(){return screenLeft;} 46 | float getScreenRight(){return screenRight; } 47 | float getScreenBottom(){return screenBottom;} 48 | float getScreenTop(){ return screenTop;} 49 | float getMaxLeft(){return maxLeft;} 50 | float getMaxRight(){return maxRight;} 51 | float getMaxBottom(){ return maxBottom;} 52 | float getMaxTop(){return maxTop;} 53 | }; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/framework/Live2DFramework.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * You can modify and use this source freely 4 | * only for the development of application related Live2D. 5 | * 6 | * (c) Live2D Inc. All rights reserved. 7 | */ 8 | #include "Live2DFramework.h" 9 | 10 | namespace live2d 11 | { 12 | namespace framework 13 | { 14 | IPlatformManager* Live2DFramework::platformManager=0; 15 | 16 | IPlatformManager* Live2DFramework::getPlatformManager() 17 | { 18 | return platformManager; 19 | } 20 | 21 | void Live2DFramework::setPlatformManager(IPlatformManager* pm) 22 | { 23 | platformManager=pm; 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/framework/Live2DFramework.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * You can modify and use this source freely 4 | * only for the development of application related Live2D. 5 | * 6 | * (c) Live2D Inc. All rights reserved. 7 | */ 8 | #pragma once 9 | 10 | #include "IPlatformManager.h" 11 | 12 | namespace live2d 13 | { 14 | namespace framework 15 | { 16 | class Live2DFramework 17 | { 18 | private: 19 | static IPlatformManager* platformManager; 20 | public: 21 | static IPlatformManager* getPlatformManager(); 22 | static void setPlatformManager(IPlatformManager* platformManager); 23 | }; 24 | } 25 | } -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/Live2DModelIPhone.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Live2DModelIPhone.h 3 | * 4 | * Copyright(c) Live2D Inc. All rights reserved. 5 | * [[ CONFIDENTIAL ]] 6 | */ 7 | #ifndef __LIVE2D_L2DMODE_IPHONE_H__ 8 | #define __LIVE2D_L2DMODE_IPHONE_H__ 9 | 10 | 11 | #include "Live2D.h" 12 | 13 | #ifdef L2D_TARGET_IPHONE 14 | 15 | 16 | #include "ALive2DModel.h" 17 | #include "ModelImpl.h" 18 | #include "DrawParam_OpenGLES1.h" 19 | 20 | //--------- LIVE2D NAMESPACE ------------ 21 | namespace live2d 22 | { 23 | 24 | class ModelContext ; 25 | 26 | 27 | 28 | class Live2DModelIPhone : public live2d::ALive2DModel 29 | { 30 | public: 31 | Live2DModelIPhone(void) ; 32 | virtual ~Live2DModelIPhone(void) ; 33 | 34 | public: 35 | virtual void draw() ; 36 | 37 | void setTexture( int textureNo , GLuint openGLTextureNo ) ; 38 | 39 | static Live2DModelIPhone * loadModel( const live2d::LDString & filepath ) ; 40 | static Live2DModelIPhone * loadModel( const void * buf , int bufSize ) ; 41 | 42 | // 新しく利用できるModelのテクスチャ番号を確保(Avatar用) 43 | virtual int generateModelTextureNo() ; 44 | 45 | // Modelのテクスチャ番号を生成(Avatar用) 46 | virtual void releaseModelTextureNo(int no) ; 47 | 48 | virtual live2d::DrawParam* getDrawParam(){ return drawParamOpenGL ; } 49 | 50 | void setTextureColor(int textureNo, float r, float g, float b, float a=1); 51 | void setTextureInterpolate(int textureNo, float interpolate); 52 | void setTextureBlendMode(int textureNo, int mode); 53 | 54 | private: 55 | //Prevention of copy Constructor 56 | Live2DModelIPhone( const Live2DModelIPhone & ) ; 57 | Live2DModelIPhone& operator=( const Live2DModelIPhone & ) ; 58 | 59 | private: 60 | live2d::DrawParam_OpenGLES1 * drawParamOpenGL ; 61 | 62 | }; 63 | } 64 | //--------- LIVE2D NAMESPACE ------------ 65 | 66 | 67 | #endif // L2D_TARGET_IPHONE 68 | #endif // __LIVE2D_L2DMODE_IPHONE_H__ 69 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/avatar/AvatarPartsItem.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AvatarPartsItem.h 3 | * 4 | * Copyright 2010 Live2D Inc. All rights reserved. 5 | * [[ CONFIDENTIAL ]] 6 | */ 7 | #ifndef __LIVE2D_AVATAR_PARTS_ITEM_H__ 8 | #define __LIVE2D_AVATAR_PARTS_ITEM_H__ 9 | 10 | 11 | #ifndef __SKIP_DOC__ 12 | 13 | 14 | #include 15 | #include "../Live2D.h" 16 | #include "../io/ISerializableV2.h" 17 | #include "../model/PartsData.h" 18 | 19 | //------------ LIVE2D NAMESPACE ------------ 20 | namespace live2d 21 | { 22 | class BReader ; 23 | class IBaseData ; 24 | class IDrawData ; 25 | class PartsDataID ; 26 | 27 | class AvatarPartsItem : public ISerializableV2 28 | { 29 | public: 30 | static int INSTANCE_COUNT; 31 | 32 | public: 33 | AvatarPartsItem() ; 34 | virtual ~AvatarPartsItem() ; 35 | 36 | public: 37 | virtual void readV2(BReader & br , MemoryParam* memParam ) ; 38 | void replacePartsData( PartsData* parts ) ; 39 | 40 | public: 41 | LDVector* getBaseDataList(){ return baseDataList ; } 42 | LDVector* getDrawDataList(){ return drawDataList ; } 43 | 44 | private: 45 | // Prevention of copy Constructor 46 | AvatarPartsItem( const AvatarPartsItem & ) ; 47 | AvatarPartsItem& operator=(const AvatarPartsItem &) ; 48 | 49 | private: 50 | PartsDataID * partsID ; 51 | 52 | LDVector* baseDataList ; 53 | LDVector* drawDataList ; 54 | 55 | } ; 56 | //------------ LIVE2D NAMESPACE ------------ 57 | } 58 | 59 | #endif // __SKIP_DOC__ 60 | 61 | #endif // __LIVE2D_AVATAR_PARTS_ITEM_H__ 62 | 63 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/base/private/AffineEnt.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AffineEnt.h 3 | * 4 | * Copyright(c) Live2D Inc. All rights reserved. 5 | * [[ CONFIDENTIAL ]] 6 | */ 7 | #ifndef _AFFINE_ENT_H 8 | #define _AFFINE_ENT_H 9 | 10 | 11 | #ifndef __SKIP_DOC__ 12 | 13 | 14 | #include "../../io/ISerializableV2.h" 15 | 16 | //--------- LIVE2D NAMESPACE ------------ 17 | namespace live2d 18 | { 19 | class AffineEnt : public ISerializableV2 20 | { 21 | 22 | public : 23 | AffineEnt() ; 24 | virtual ~AffineEnt() ; 25 | 26 | public: 27 | void init( AffineEnt &ent ) ; 28 | virtual void readV2(BReader & br , MemoryParam* memParam ) ; 29 | 30 | #ifdef L2D_SAMPLE 31 | void DUMP() ; 32 | #endif 33 | 34 | public: 35 | float originX; // 原点X 36 | float originY; // 原点Y 37 | float scaleX; // 拡大率X 38 | float scaleY; // 拡大率Y。拡大率はXしか使用しない 39 | float rotateDeg; // 度。範囲なしで、n回転を表現できる。 40 | 41 | bool reflectX ; //SDK2.0 42 | bool reflectY ; //SDK2.0 43 | }; 44 | } 45 | //------------------------- LIVE2D NAMESPACE ------------ 46 | 47 | #endif // __SKIP_DOC__ 48 | 49 | #endif // _AFFINE_ENT_H 50 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/draw/IDrawContext.h: -------------------------------------------------------------------------------- 1 | /* 2 | * IContextData.h 3 | * 4 | * ImmutableのDrawData、BaseDataの描画用のデータを保持する。 5 | * 6 | * Created by joe on 11/04/29. 7 | * Copyright 2011 Live2D Inc. All rights reserved. 8 | */ 9 | 10 | #ifndef __LIVE2D_I_DRAW_DATA_H__ 11 | #define __LIVE2D_I_DRAW_DATA_H__ 12 | 13 | 14 | #ifndef __SKIP_DOC__ 15 | 16 | #include "../memory/LDObject.h" 17 | 18 | //------------ LIVE2D NAMESPACE ------------ 19 | namespace live2d 20 | { 21 | class IDrawData ; 22 | 23 | class IDrawContext : public live2d::LDObject 24 | { 25 | public: 26 | IDrawContext(IDrawData* src) ; 27 | virtual ~IDrawContext(){} 28 | 29 | void* getSrcPtr(){ return this->srcPtr ; } 30 | 31 | // パーツ番号セット 32 | void setPartsIndex( int p ){ this->partsIndex = p ; } 33 | 34 | // パーツ番号取得 35 | int getPartsIndex() { return this->partsIndex ; } 36 | 37 | // 利用できるか取得 TODO 更新 38 | bool isAvailable(){ return available && ! paramOutside ; } 39 | 40 | public: 41 | int interpolatedDrawOrder ; // 描画順の補間結果 42 | float interpolatedOpacity ; // 不透明度の補間結果 43 | 44 | bool paramOutside ; // 補間結果として、パラメータが範囲外のときに true 45 | 46 | float partsOpacity ; // パーツの不透明度 47 | bool available ; // TODO 更新 48 | 49 | float baseOpacity; // SDK2.0 所属するデフォーマの累積透明度 50 | 51 | private: 52 | IDrawData* srcPtr ; 53 | int partsIndex ; 54 | }; 55 | } 56 | //------------ LIVE2D NAMESPACE ------------ 57 | 58 | #endif // __SKIP_DOC__ 59 | 60 | #endif // __LIVE2D_I_DRAW_DATA_H__ 61 | 62 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/graphics/DrawProfileCocos2D.h: -------------------------------------------------------------------------------- 1 | /** 2 | * DrawProfileCocos2D.h 3 | * 4 | * Created by Live2D on 2013/08/02. 5 | * Copyright(c) Live2D Inc. All rights reserved. 6 | * [[ CONFIDENTIAL ]] 7 | */ 8 | 9 | #ifndef __Live2D__DrawProfileCocos2D__ 10 | #define __Live2D__DrawProfileCocos2D__ 11 | #include "../Live2D.h" 12 | 13 | #if defined(L2D_TARGET_IPHONE_ES2) || defined(L2D_TARGET_ANDROID_ES2) || defined(L2D_TARGET_WIN_GL) 14 | //------------ LIVE2D NAMESPACE ------------ 15 | namespace live2d 16 | { 17 | 18 | class DrawProfileCocos2D { 19 | public: 20 | static void preDraw ( ); 21 | static void postDraw ( ); 22 | }; 23 | 24 | } 25 | //------------ LIVE2D NAMESPACE ------------ 26 | 27 | #endif //L2D_TARGET_IPHONE_ES2 28 | 29 | 30 | #endif /* defined(__Live2D__DrawProfileCocos2D__) */ 31 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/graphics/DrawProfileUnity.h: -------------------------------------------------------------------------------- 1 | /** 2 | * DrawProfileUnity.h 3 | * 4 | * Created by Live2D on 2013/08/02. 5 | * Copyright(c) Live2D Inc. All rights reserved. 6 | * [[ CONFIDENTIAL ]] 7 | */ 8 | 9 | #ifndef __Live2D__DrawProfileUnity__ 10 | #define __Live2D__DrawProfileUnity__ 11 | #include "../Live2D.h" 12 | #ifdef L2D_BUILD_FOR_UNITY 13 | 14 | 15 | #ifndef __SKIP_DOC__ 16 | 17 | //------------ LIVE2D NAMESPACE ------------ 18 | namespace live2d 19 | { 20 | 21 | class DrawProfileUnity { 22 | public: 23 | static void preDraw ( ); 24 | static void postDraw ( ); 25 | }; 26 | 27 | } 28 | //------------ LIVE2D NAMESPACE ------------ 29 | 30 | #endif //L2D_BUILD_FOR_UNITY 31 | #endif //__SKIP_DOC__ 32 | #endif /* defined(__Live2D__DrawProfileUnity__) */ 33 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/graphics/UtOpenGLDebug.h: -------------------------------------------------------------------------------- 1 | /** 2 | * UtOpenGLDebug.h 3 | * 4 | * Copyright(c) Live2D Inc. All rights reserved. 5 | * [[ CONFIDENTIAL ]] 6 | */ 7 | #ifndef __UT_OPENGL_DEBUG__ 8 | #define __UT_OPENGL_DEBUG__ 9 | 10 | 11 | #ifndef __SKIP_DOC__ 12 | 13 | #ifdef L2D_GRAPHICS_OPENGL_ES2 14 | 15 | 16 | 17 | //------------ LIVE2D NAMESPACE ------------ 18 | namespace live2d 19 | { 20 | 21 | 22 | class UtOpenGLDebug 23 | { 24 | public: 25 | static void dumpState() ; 26 | static int checkError( const char* str ) ; 27 | 28 | }; 29 | 30 | 31 | } //------------ LIVE2D NAMESPACE ------------ 32 | 33 | 34 | #endif 35 | 36 | 37 | #endif // __SKIP_DOC__ 38 | 39 | #endif // __UT_OPENGL_DEBUG__ 40 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/graphics/UtOpenGLES2.h: -------------------------------------------------------------------------------- 1 | /** 2 | * UtOpenGLES2.h 3 | * 4 | * Copyright(c) Live2D Inc. All rights reserved. 5 | * [[ CONFIDENTIAL ]] 6 | */ 7 | #ifndef __UT_OPENGLES2__ 8 | #define __UT_OPENGLES2__ 9 | 10 | 11 | #ifndef __SKIP_DOC__ 12 | 13 | #ifdef L2D_GRAPHICS_OPENGL_ES2 14 | 15 | 16 | //------------ LIVE2D NAMESPACE ------------ 17 | namespace live2d 18 | { 19 | 20 | 21 | class UtOpenGLES2 22 | { 23 | public: 24 | static void disposeShader() ; 25 | static bool compileShader(GLuint *shader , GLenum type , const char *shaderSource ) ; 26 | static bool linkProgram(GLuint prog) ; 27 | static bool validateProgram(GLuint prog) ; 28 | static GLuint loadShaders(const char* vertShaderSrc, const char * fragShaderSrc ) ; 29 | 30 | static GLuint fboTextureNo; 31 | static void setFramebufferTexture( GLuint fbo ); 32 | static GLuint getFramebufferTexture(); 33 | }; 34 | 35 | 36 | } //------------ LIVE2D NAMESPACE ------------ 37 | 38 | 39 | #endif 40 | 41 | 42 | #endif // __SKIP_DOC__ 43 | 44 | #endif // __UT_OPENGLES2__ 45 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/id/BaseDataID.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BaseDataID.h 3 | * 4 | * オーバーライドしないこと 5 | * 6 | * Copyright(c) Live2D Inc. All rights reserved. 7 | * [[ CONFIDENTIAL ]] 8 | */ 9 | #ifndef __LIVE2D_BASE_DATA_ID_H__ 10 | #define __LIVE2D_BASE_DATA_ID_H__ 11 | 12 | 13 | #include "../Live2D.h" 14 | #include "../type/LDVector.h" 15 | #include "ID.h" 16 | 17 | //------------ LIVE2D NAMESPACE ------------ 18 | namespace live2d 19 | { 20 | 21 | class BaseDataID : public ID 22 | { 23 | public: 24 | const static int L2D_BASEDATA_ID_INITIAL_CAPACITY = 128 ; 25 | 26 | public: 27 | 28 | // IDを取得する 29 | // ・同一の値を持つ全てのIDが、同じポインタを指すことを保証する (同一の確認が == 比較 で良い) \n 30 | // ・Live2D::dispose()時に解放される 31 | static BaseDataID * getID(const live2d::LDString &str ) ; 32 | 33 | static BaseDataID * getID( const RefString& refStr ) ; 34 | 35 | static BaseDataID * DST_BASE_ID() 36 | { 37 | if( dstBaseId == NULL ) 38 | { 39 | dstBaseId = getID("DST_BASE"); 40 | } 41 | return dstBaseId ; 42 | } 43 | 44 | 45 | // リリース用メソッド(Live2D::diposeから呼ばれる) 46 | static void releaseStored_notForClientCall() ; 47 | 48 | public: 49 | 50 | const char * toChar(){ return id.c_str() ; } 51 | 52 | private: 53 | BaseDataID() ; 54 | BaseDataID(const live2d::LDString &str ); 55 | BaseDataID( const char* str ) ; 56 | BaseDataID( const RefString& refStr ) ; 57 | 58 | //Prevention of copy Constructor 59 | BaseDataID( const BaseDataID & ) ; 60 | BaseDataID& operator=( const BaseDataID & ) ; 61 | 62 | 63 | virtual ~BaseDataID(); 64 | 65 | private: 66 | static LDVector* idlist_BaseDataID ; 67 | static BaseDataID * dstBaseId ; 68 | 69 | private: 70 | live2d::LDString id ; // 生成時に複製されているため、Destructorで開放する 71 | }; 72 | 73 | } 74 | 75 | #endif // __LIVE2D_BASE_DATA_ID_H__ 76 | //------------ LIVE2D NAMESPACE ------------ 77 | 78 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/id/DrawDataID.h: -------------------------------------------------------------------------------- 1 | /** 2 | * DrawDataID.h 3 | * 4 | * Copyright(c) Live2D Inc. All rights reserved. 5 | * [[ CONFIDENTIAL ]] 6 | */ 7 | #ifndef __LIVE2D_DRAW_DATA_ID_H__ 8 | #define __LIVE2D_DRAW_DATA_ID_H__ 9 | 10 | 11 | #include "Live2D.h" 12 | #include "ID.h" 13 | 14 | //------------ LIVE2D NAMESPACE ------------ 15 | namespace live2d 16 | { 17 | 18 | class DrawDataID : public ID 19 | { 20 | public: 21 | const static int L2D_DRAWDATA_ID_INITIAL_CAPACITY = 256 ; 22 | 23 | 24 | public: 25 | 26 | // IDを取得する 27 | // ・同一の値を持つ全てのIDが、同じポインタを指すことを保証する (同一の確認が == 比較 で良い) \n 28 | // ・Live2D::dispose()時に解放される 29 | static DrawDataID * getID( const LDString & str ) ; 30 | 31 | static DrawDataID * getID( const RefString& refStr ) ; 32 | 33 | static void releaseStored_notForClientCall() ; 34 | 35 | 36 | public: 37 | /**************************************************************************** 38 | @~english 39 | 40 | @~japanese 41 | @brief IDをC言語の文字列として取得 42 | @return ID文字列 43 | ****************************************************************************/ 44 | const char * toChar(){ return id.c_str() ; } 45 | 46 | 47 | private: 48 | DrawDataID() ; 49 | DrawDataID( const char* str ) ; 50 | DrawDataID( const RefString& refStr ) ; 51 | DrawDataID(const LDString & tmp_str); 52 | 53 | //Prevention of copy Constructor 54 | DrawDataID( const DrawDataID & ) ; 55 | DrawDataID& operator=( const DrawDataID & ) ; 56 | 57 | virtual ~DrawDataID(); 58 | 59 | private: 60 | static LDVector* idlist ; 61 | 62 | private: 63 | LDString id ; 64 | }; 65 | } 66 | //------------ LIVE2D NAMESPACE ------------ 67 | 68 | #endif // __LIVE2D_DRAW_DATA_ID_H__ 69 | 70 | 71 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/id/ID.h: -------------------------------------------------------------------------------- 1 | /** 2 | * ID.h 3 | * 4 | * Copyright(c) Live2D Inc. All rights reserved. 5 | * [[ CONFIDENTIAL ]] 6 | */ 7 | #ifndef __LIVE2D_ID_H__ 8 | #define __LIVE2D_ID_H__ 9 | 10 | 11 | #include "ISerializableV2.h" 12 | #include "LDObject.h" 13 | 14 | //--------- LIVE2D NAMESPACE ------------ 15 | namespace live2d 16 | { 17 | 18 | class ID : public live2d::LDObject 19 | { 20 | public: 21 | ID(); 22 | virtual ~ID(); 23 | 24 | public: 25 | // リリース用メソッド(Live2D::diposeから呼ばれる) 26 | static void staticInit_notForClientCall() ; 27 | 28 | // リリース用メソッド(Live2D::diposeから呼ばれる) 29 | static void staticRelease_notForClientCall() ; 30 | 31 | protected: 32 | static MemoryParam* memParam ; 33 | static live2d::AMemoryHolder* memoryHolderFixedMain ; 34 | 35 | }; 36 | 37 | } 38 | //------------------------- LIVE2D NAMESPACE ------------ 39 | 40 | 41 | #endif // __LIVE2D_ID_H__ 42 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/id/ParamID.h: -------------------------------------------------------------------------------- 1 | /** 2 | * ParamID.h 3 | * 4 | * Copyright(c) Live2D Inc. All rights reserved. 5 | * [[ CONFIDENTIAL ]] 6 | */ 7 | #ifndef __LIVE2D_PARAM_ID_H__ 8 | #define __LIVE2D_PARAM_ID_H__ 9 | 10 | 11 | #include "Live2D.h" 12 | #include "ID.h" 13 | 14 | //------------ LIVE2D NAMESPACE ------------ 15 | namespace live2d 16 | { 17 | 18 | class ParamID : public ID 19 | { 20 | public: 21 | const static int L2D_PARAM_ID_INITIAL_CAPACITY = 64 ; 22 | 23 | 24 | public: 25 | 26 | const char * toChar() const { return id.c_str() ; } 27 | 28 | 29 | // IDを生成する 30 | // ・同一の値を持つ全てのIDが、同じポインタを指すことを保証する (同一の確認が == 比較 で良い) \n 31 | // ・Live2D::dispose()時に解放される 32 | static ParamID * getID( const live2d::LDString & tmp_idstr ) ; 33 | static ParamID * getID( const char* tmp_idstr ) ; 34 | static ParamID * getID( const RefString& refStr ) ; 35 | 36 | /* 37 | * リリース用メソッド(Live2D::diposeから呼ばれる) 38 | */ 39 | static void releaseStored_notForClientCall() ; 40 | 41 | 42 | 43 | 44 | #if L2D_SAMPLE 45 | static ParamID* SAMPLE_ID_X(){ return getID("ANGLE_X") ; } 46 | static ParamID* SAMPLE_ID_Y(){ return getID("ANGLE_Y") ; } 47 | static ParamID* SAMPLE_ID_ANGLE_Z(){ return getID("ANGLE_Z") ; } 48 | static ParamID* SAMPLE_ID_SMILE(){ return getID("SMILE") ; } 49 | #endif 50 | 51 | 52 | 53 | private: 54 | ParamID() ; 55 | ParamID( const char* str ) ; 56 | ParamID( const live2d::LDString& _tmp_str); 57 | ParamID( const RefString& refStr ) ; 58 | //Prevention of copy Constructor 59 | ParamID( const ParamID & ) ; 60 | ParamID& operator=( const ParamID & ) ; 61 | 62 | virtual ~ParamID(); 63 | 64 | private: 65 | static LDVector* idlist ; 66 | 67 | private: 68 | live2d::LDString id ; // ID文字列 69 | }; 70 | } 71 | //------------ LIVE2D NAMESPACE ------------ 72 | 73 | #endif // __LIVE2D_PARAM_ID_H__ 74 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/io/ISerializableV2.h: -------------------------------------------------------------------------------- 1 | /** 2 | * ISerializable.h 3 | * 4 | * Copyright(c) Live2D Inc. All rights reserved. 5 | * [[ CONFIDENTIAL ]] 6 | */ 7 | #ifndef __LIVE2D_I_SERIALIZABLE_V2_H__ 8 | #define __LIVE2D_I_SERIALIZABLE_V2_H__ 9 | 10 | #include "BReader.h" 11 | 12 | #include "LDObject.h" 13 | 14 | //--------- LIVE2D NAMESPACE ------------ 15 | namespace live2d 16 | { 17 | class MemoryParam ; 18 | 19 | 20 | class ISerializableV2 : public LDObject 21 | { 22 | public: 23 | ISerializableV2(); 24 | virtual ~ISerializableV2(); 25 | 26 | public: 27 | virtual void readV2(BReader &br , MemoryParam* memParam ) = 0 ; 28 | }; 29 | } //------------------------- LIVE2D NAMESPACE ------------ 30 | 31 | #endif //__LIVE2D_I_SERIALIZABLE_V2_H__ 32 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/io/RefString.h: -------------------------------------------------------------------------------- 1 | /* 2 | * RefString.h 3 | * 4 | * ロード中に使用する文字列参照 5 | * 破棄してはならない 6 | * 7 | * Copyright(c) Live2D Inc. All rights reserved. 8 | * [[ CONFIDENTIAL ]] 9 | */ 10 | 11 | #ifndef __LIVE2D_REF_STRING__ 12 | #define __LIVE2D_REF_STRING__ 13 | 14 | 15 | #ifndef __SKIP_DOC__ 16 | 17 | //--------- LIVE2D NAMESPACE ------------ 18 | namespace live2d 19 | { 20 | 21 | class RefString 22 | { 23 | public: 24 | RefString(); 25 | RefString(const char* ptr , int length ) 26 | { 27 | this->ptr_not_zero_end = ptr ; 28 | this->length = length ; 29 | } 30 | ~RefString(); 31 | 32 | 33 | void set(const char* ptr , int length ) 34 | { 35 | this->ptr_not_zero_end = ptr ; 36 | this->length = length ; 37 | } 38 | 39 | public: 40 | const char* ptr_not_zero_end ;// 終端が\0とは限らない 41 | int length ; 42 | }; 43 | 44 | } 45 | //--------- LIVE2D NAMESPACE ------------ 46 | 47 | #endif // __SKIP_DOC__ 48 | 49 | #endif // __LIVE2D_REF_STRING__ 50 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/io/data/Arrays2D.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Arrays2D.h 3 | * 4 | * Copyright(c) Live2D Inc. All rights reserved. 5 | * [[ CONFIDENTIAL ]] 6 | */ 7 | #ifndef __LIVE2D_ARRAYS2D_H__ 8 | #define __LIVE2D_ARRAYS2D_H__ 9 | 10 | 11 | #ifndef __SKIP_DOC__ 12 | 13 | #include "../../memory/LDObject.h" 14 | 15 | //--------- LIVE2D NAMESPACE ------------ 16 | namespace live2d 17 | { 18 | 19 | /********************************************************************** 20 | @brief 多次元配列を戻り値にするためのクラス 21 | 22 | 展開後は、単純なポインタとして扱う 23 | Destructorでは、中身は削除されない!! 24 | **********************************************************************/ 25 | class Arrays2D : public live2d::LDObject 26 | { 27 | public: 28 | Arrays2D( void** ptr , int size1 , int size2 ); 29 | virtual ~Arrays2D(); 30 | 31 | private: 32 | void ** ptr ; 33 | int size1 ; 34 | int size2 ; 35 | }; 36 | 37 | 38 | } 39 | //------------------------- LIVE2D NAMESPACE ------------ 40 | 41 | #endif // __SKIP_DOC__ 42 | 43 | #endif // __LIVE2D_ARRAYS2D_H__ 44 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/memory/AMemoryHolder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AMemoryHolder.h 3 | * 4 | * メモリ保持のための抽象クラス 5 | * 6 | * 通常のメモリ管理と、寿命管理型のメモリ管理を抽象化 7 | * 8 | * 9 | * Copyright(c) Live2D Inc. All rights reserved. 10 | * [[ CONFIDENTIAL ]] 11 | */ 12 | 13 | #pragma once 14 | 15 | 16 | #ifndef __SKIP_DOC__ 17 | 18 | #include "LDObject.h" 19 | #include "LDAllocator.h" 20 | #include "APageHeader.h" 21 | 22 | //--------- LIVE2D NAMESPACE ------------ 23 | namespace live2d 24 | { 25 | 26 | //========================================================== 27 | //========================================================== 28 | class AllocHeader 29 | { 30 | // 継承しない(vtableを持たせない) 31 | public: 32 | void free_exe( void* ptr ){ ptrToPageHeader->free_exe( ptr ) ; } 33 | 34 | 35 | private: 36 | AllocHeader() ; 37 | ~AllocHeader() ; 38 | 39 | public: 40 | APageHeader* ptrToPageHeader ; 41 | } ; 42 | 43 | 44 | 45 | //========================================================== 46 | //========================================================== 47 | class AMemoryHolder : public LDObject // 48 | { 49 | public: 50 | static const int CHECK_VALUE = 0x600DC0DE ;// Oはゼロであることに注意 51 | static const int MIN_CHUNK_REST = 32 ;// これ以下の残り容量の場合は、filledPageへ 52 | static const int MIN_ALIGN = 4 ;// アライメントがコレ以下の場合はこの値にする 53 | 54 | 55 | AMemoryHolder(); 56 | virtual ~AMemoryHolder() ; 57 | 58 | void setMemoryParam( MemoryParam* group ){ this->memParam = group ; } 59 | 60 | virtual void* malloc_exe( l2d_size_t size , int align) = 0 ; 61 | 62 | virtual void free_exe( APageHeader* header ,void* ptr ) = 0 ; 63 | virtual void clear() = 0 ; 64 | 65 | virtual void healthCheck() { }; 66 | 67 | int getCheckValue(){ return CHECK_VALUE ; } 68 | 69 | 70 | protected: 71 | MemoryParam* memParam ; 72 | 73 | }; 74 | 75 | 76 | } 77 | //---------- namespace live2d ------------- 78 | 79 | #endif // __SKIP_DOC__ 80 | 81 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/memory/APageHeader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * APageHeader.h 3 | * 4 | * メモリ保持のための抽象クラス 5 | * 6 | * 通常のメモリ管理と、寿命管理型のメモリ管理を抽象化 7 | * 8 | * 9 | * Copyright(c) Live2D Inc. All rights reserved. 10 | * [[ CONFIDENTIAL ]] 11 | */ 12 | 13 | #pragma once 14 | 15 | 16 | #ifndef __SKIP_DOC__ 17 | 18 | #include "LDUnmanagedObject.h" 19 | //#include "../memory/MemoryPage.h" 20 | #include "LDAllocator.h" 21 | 22 | 23 | //--------- LIVE2D NAMESPACE ------------ 24 | namespace live2d 25 | { 26 | 27 | 28 | //========================================================== 29 | //========================================================== 30 | class APageHeader // placement newを使い、deleteしない 31 | //class APageHeader : public LDUnmanagedObject // メモリ管理対象外 32 | { 33 | public: 34 | const static int ENTRY_OFFSET = 64 ;// ページの最初のデータへのオフセット(chunkは-4(32bit) -8(64bit)) 35 | 36 | APageHeader(){} 37 | 38 | 39 | virtual void free_exe( void* ptr ) = 0 ; 40 | 41 | 42 | protected: 43 | ~APageHeader(){}// placement newを使い/deleteはしない 44 | 45 | }; 46 | 47 | 48 | } 49 | //--------- LIVE2D NAMESPACE ------------ 50 | 51 | #endif // __SKIP_DOC__ 52 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/memory/LDAllocator.h: -------------------------------------------------------------------------------- 1 | /* 2 | * LDAllocator.h 3 | * 4 | * Live2Dで使用するメモリを確保・破棄するためのクラス 5 | * 6 | * カスタマイズしたい場合は、サブクラスを作り、malloc, freeをオーバーライドし、 7 | * Live2Dの初期化時に登録する 8 | * 9 | * Live2D::init( live2d::LDAllocator* allocator ) ; 10 | * 11 | * Copyright(c) Live2D Inc. All rights reserved. 12 | * [[ CONFIDENTIAL ]] 13 | */ 14 | 15 | #ifndef __LIVE2D_LDALLOCATOR_H__ 16 | #define __LIVE2D_LDALLOCATOR_H__ 17 | 18 | //#include "../Live2D.h" 19 | 20 | //--------- LIVE2D NAMESPACE ------------ 21 | namespace live2d { 22 | 23 | 24 | 25 | class LDAllocator // LDObjectを継承しない 26 | { 27 | public: 28 | typedef enum { 29 | MAIN = 0 , 30 | GPU 31 | #ifdef L2D_TARGET_PS4 32 | ,SHADER, 33 | #endif 34 | } Type ; 35 | 36 | public: 37 | LDAllocator(); 38 | virtual ~LDAllocator(); 39 | 40 | 41 | virtual void* pageAlloc( unsigned int size , LDAllocator::Type allocType ) = 0 ; 42 | 43 | 44 | 45 | virtual void pageFree( void* ptr , LDAllocator::Type allocType ) = 0 ; 46 | 47 | 48 | 49 | virtual void init(){} 50 | 51 | 52 | virtual void dispose(){} 53 | 54 | }; 55 | 56 | } 57 | //------------------------- LIVE2D NAMESPACE ------------ 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/memory/LDObject.h: -------------------------------------------------------------------------------- 1 | /** 2 | * LDObject.h 3 | * 4 | * Copyright(c) Live2D Inc. All rights reserved. 5 | * [[ CONFIDENTIAL ]] 6 | */ 7 | 8 | #ifndef __LIVE2D_LDOBJECT_H__ 9 | #define __LIVE2D_LDOBJECT_H__ 10 | 11 | #include "Live2D.h" 12 | 13 | 14 | namespace live2d { //--------- LIVE2D NAMESPACE ------------ 15 | 16 | 17 | class MemoryParam ; 18 | class AMemoryHolder ; 19 | 20 | 21 | class LDObject 22 | { 23 | public: 24 | 25 | LDObject(void) ; 26 | virtual ~LDObject(void) ; 27 | 28 | // --- L2D_MEM_TMPにメモリを配置 --- 29 | static void* operator new(l2d_size_t size) ; 30 | static void operator delete(void* ptr ) ; 31 | 32 | static void* operator new[](l2d_size_t size) ; 33 | static void operator delete[](void* ptr ) ; 34 | 35 | //placement new 36 | static void* operator new(l2d_size_t size, void* ptr) ; 37 | static void operator delete(void* ptr, void* ptr2) ;//dummy 38 | 39 | //--- memory managed --- 40 | static void* operator new(l2d_size_t size , MemoryParam* memParam ) ; 41 | static void operator delete(void* ptr, MemoryParam* memParam ) ; 42 | 43 | //--- debug file & line 44 | static void* operator new(l2d_size_t size , MemoryParam* memParam , const char* filename , int line ) ; 45 | static void operator delete(void* ptr, MemoryParam* memParam , const char* filename , int line ) ; 46 | 47 | public: 48 | #ifdef L2D_DEBUG 49 | static int object_instanceCount ; 50 | static int object_totalCount ; 51 | #endif //L2D_DEBUG 52 | 53 | }; 54 | 55 | } //------------------------- LIVE2D NAMESPACE ------------ 56 | 57 | #endif //__LIVE2D_LDOBJECT_H__ 58 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/memory/LDUnmanagedObject.h: -------------------------------------------------------------------------------- 1 | /** 2 | * LDUnmanagedObject.h 3 | * 4 | * Copyright(c) Live2D Inc. All rights reserved. 5 | * [[ CONFIDENTIAL ]] 6 | */ 7 | #pragma once 8 | 9 | 10 | #include "Live2D.h" 11 | 12 | 13 | namespace live2d { //--------- LIVE2D NAMESPACE ------------ 14 | 15 | 16 | class MemoryParam ; 17 | 18 | 19 | 20 | class LDUnmanagedObject 21 | { 22 | public: 23 | static int instanceCount ; 24 | 25 | LDUnmanagedObject(void) ; 26 | virtual ~LDUnmanagedObject(void) ; 27 | 28 | static void* operator new(l2d_size_t size) ; 29 | static void operator delete(void* ptr ) ; 30 | 31 | static void* operator new[](l2d_size_t size) ; 32 | static void operator delete[](void* ptr ) ; 33 | 34 | //placement new 35 | static void* operator new(l2d_size_t size, void* ptr) ; 36 | static void operator delete(void* ptr, void* ptr2) ;//dummy 37 | 38 | //--- debug file & line 39 | static void* operator new(l2d_size_t size , const char* filename , int line ) ; 40 | static void operator delete(void* ptr, const char* filename , int line ) ; 41 | 42 | static void* operator new[](l2d_size_t size , const char* filename , int line ) ; 43 | static void operator delete[](void* ptr , const char* filename , int line ) ; 44 | 45 | public: 46 | #ifdef L2D_DEBUG 47 | static int object_instanceCount ; 48 | static int object_totalCount ; 49 | #endif 50 | 51 | }; 52 | 53 | } //------------------------- LIVE2D NAMESPACE ------------ 54 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/memory/debug/MemoryInfo.h: -------------------------------------------------------------------------------- 1 | /** 2 | * MemoryInfo.h 3 | * 4 | * Copyright(c) Live2D Inc. All rights reserved. 5 | * [[ CONFIDENTIAL ]] 6 | */ 7 | #pragma once 8 | 9 | 10 | #ifndef __SKIP_DOC__ 11 | 12 | #include "../../Live2D.h" 13 | 14 | 15 | //--------- LIVE2D NAMESPACE ------------ 16 | namespace live2d 17 | { 18 | 19 | class AMemoryHolder ; 20 | 21 | #ifndef NULL 22 | # define NULL 0 23 | #endif 24 | 25 | 26 | //****************************************************** 27 | class MemoryInfo // デバッグ用なので管理外 28 | { 29 | friend class UtMemory ; 30 | friend class MemoryInfoSet ; 31 | public: 32 | MemoryInfo(void); 33 | ~MemoryInfo(void); 34 | 35 | void dump(const char* message , l2d_size_t cur , l2d_size_t peak) ; 36 | #ifdef L2D_DEBUG 37 | const char* getFileName( const char* path ) ; 38 | #endif 39 | 40 | private: 41 | int index ; 42 | void* ptr ; 43 | l2d_size_t size ; 44 | const char* fileName ; 45 | int lineNo ; 46 | 47 | AMemoryHolder* allocator ; 48 | MemoryInfo* next ; 49 | 50 | }; 51 | 52 | } 53 | //--------- LIVE2D NAMESPACE ------------ 54 | 55 | #endif // __SKIP_DOC__ 56 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/memory/fixed/MHPageHeaderFixed.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MHPageHeaderFixed.h 3 | * 4 | * 一括破棄のみ対応したメモリページ 5 | * Copyright(c) Live2D Inc. All rights reserved. 6 | * [[ CONFIDENTIAL ]] 7 | */ 8 | 9 | #pragma once 10 | 11 | 12 | #ifndef __SKIP_DOC__ 13 | 14 | #include "../../Live2D.h" 15 | #include "../LDUnmanagedObject.h" 16 | #include "../APageHeader.h" 17 | #include "../AMemoryHolder.h" 18 | 19 | 20 | //--------- LIVE2D NAMESPACE ------------ 21 | namespace live2d 22 | { 23 | 24 | class MHPageHeaderFixed : public APageHeader // MemoryManagement対象外 25 | { 26 | public: 27 | MHPageHeaderFixed(); 28 | 29 | int getPageNo(){ return pageNo ; } 30 | int getPageAmount(){ return pageAmount ; } 31 | 32 | void* getStartPtr(){ return (char*)this + ENTRY_OFFSET - sizeof(AllocHeader) ; } 33 | 34 | virtual void free_exe( void* ptr ) ; 35 | 36 | protected: 37 | ~MHPageHeaderFixed(){}// placement newを使い/deleteはしない 38 | 39 | public:// --- 以下、パブリック参照を許可 --- 40 | MHPageHeaderFixed* nextPage ; // [4-8]隣のページ 41 | 42 | // char* startPtr ; // [4-8]ここに記憶する(確保後は固定) 43 | char* endPtr ; // [4-8]ポインタの終端(確保後は固定、このアドレス自体は範囲外) 44 | l2d_uint32 size ; // [4-8]このページのメモリサイズ(確保後は固定) 45 | 46 | char* curPtr ; // [4-8]次に確保できるポインタ(AllocHeaderの先頭になる)(可変) 47 | l2d_uint32 rest ; // [4-8]このページの残りサイズ(可変) 48 | l2d_uint32 pageNo ; // [4]このページの通し番号(ID) 49 | 50 | 51 | //--- static --- 52 | static int pageAmount ; // 全体のページ数(開放しても減らさない) 53 | }; 54 | 55 | 56 | 57 | } 58 | //--------- LIVE2D NAMESPACE ------------ 59 | 60 | #endif // __SKIP_DOC__ 61 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/memory/fixed/MemoryHolderFixed.h: -------------------------------------------------------------------------------- 1 | /** 2 | * MemoryHolderFixed.h 3 | * 4 | * 固定寿命インスタンス用のメモリ保持用クラス 5 | * 6 | * Copyright(c) Live2D Inc. All rights reserved. 7 | * [[ CONFIDENTIAL ]] 8 | */ 9 | 10 | #pragma once 11 | 12 | 13 | #ifndef __SKIP_DOC__ 14 | 15 | #include "LDObject.h" 16 | #include "AMemoryHolder.h" 17 | 18 | //--------- LIVE2D NAMESPACE ------------ 19 | namespace live2d 20 | { 21 | 22 | class MHPageHeaderFixed ; 23 | 24 | class MemoryHolderFixed : public AMemoryHolder 25 | { 26 | public: 27 | 28 | MemoryHolderFixed(LDAllocator::Type allocType , const char* holderName , l2d_size_t pageSize = defaultPageSize ); 29 | virtual ~MemoryHolderFixed() ; 30 | 31 | virtual void* malloc_exe( l2d_size_t size , int align) ; 32 | 33 | virtual void free_exe( APageHeader* header , void* ptr ) ; 34 | virtual void clear() ; 35 | 36 | virtual void healthCheck() ; 37 | 38 | static void setDefaultPageSize( l2d_size_t size ) { defaultPageSize = size ; } 39 | 40 | void dumpPages(MHPageHeaderFixed* c) ; 41 | void checkPages(MHPageHeaderFixed* c) ; 42 | 43 | private: 44 | char* createNewPage( l2d_size_t size , int align ) ; 45 | 46 | char* getAvailablePtr( MHPageHeaderFixed* page , l2d_size_t size , int align ) ; 47 | 48 | void clear_exe( MHPageHeaderFixed* page ) ; 49 | 50 | private: 51 | MHPageHeaderFixed* curPages ; // 未使用領域が残るList 52 | MHPageHeaderFixed* filledPages ; // 全て使い切ったList 53 | LDAllocator::Type allocType ; 54 | const char* holderName ; // MemoryHolderの識別名 55 | int holderNo ; // MemoryHolderの何番目のインスタンスか 56 | l2d_size_t pageSize ; // 新規作成時のPageのサイズ 57 | static l2d_size_t defaultPageSize ; 58 | }; 59 | 60 | } 61 | //--------- LIVE2D NAMESPACE ------------ 62 | 63 | #endif // __SKIP_DOC__ 64 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/memory/tmp/MHBin.h: -------------------------------------------------------------------------------- 1 | /** 2 | * MHBin.h 3 | * 4 | * 一時インスタンス用のメモリ保持用クラス 5 | * 6 | * 通常の確保・破棄を行うメモリ実装 7 | * 8 | * Copyright(c) Live2D Inc. All rights reserved. 9 | * [[ CONFIDENTIAL ]] 10 | */ 11 | #pragma once 12 | 13 | 14 | #ifndef __SKIP_DOC__ 15 | 16 | #include "Live2D.h" 17 | #include "LDObject.h" 18 | #include "AMemoryHolder.h" 19 | #include "APageHeader.h" 20 | 21 | //--------- LIVE2D NAMESPACE ------------ 22 | namespace live2d 23 | { 24 | 25 | class MemoryHolderTmp ; 26 | class MHPageHeaderTmp ; 27 | 28 | 29 | //========================================================== 30 | //  Bin(ビン)クラス 31 | //  32 , 64 , 128等バイトサイズごとにページデータを格納する 32 | //========================================================== 33 | class MHBin 34 | { 35 | public: 36 | MHBin() ; 37 | 38 | void init( l2d_uint16 binNo , l2d_size_t _chunkSize , l2d_size_t _pageSize ) ; 39 | 40 | l2d_size_t getChunkSize( l2d_size_t malloc_size ) ; 41 | 42 | public:// 仮 43 | l2d_size_t chunkSize ; // 1つのチャンクサイズ。AllocHeaderを含む。0の時は自由なサイズ 44 | l2d_size_t pageSize ; // ページ全体のサイズ。AllocHeaderを含む。0の時は自由なサイズ 45 | l2d_uint16 pageChunkCount ; // 1つのページに入るチャンク数 46 | l2d_uint16 binNo ; // 自身のBin番号(index) 47 | l2d_uint32 bitmask[3] ; // 使用可能なビットを1とする(使用中という意味ではない)。0は使用不可 48 | 49 | MHPageHeaderTmp* filledPages ; // 全部使用中 50 | MHPageHeaderTmp* curPages ; // 使用可能ページ 51 | } ; 52 | 53 | } 54 | //--------- LIVE2D NAMESPACE ------------ 55 | 56 | #endif // __SKIP_DOC__ 57 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/model/ModelImpl.h: -------------------------------------------------------------------------------- 1 | /** 2 | * ModelImpl.h 3 | * 4 | * Copyright(c) Live2D Inc. All rights reserved. 5 | * [[ CONFIDENTIAL ]] 6 | */ 7 | #ifndef __LIVE2D_MODEL_IMPL_H__ 8 | #define __LIVE2D_MODEL_IMPL_H__ 9 | 10 | #include 11 | #include "ISerializableV2.h" 12 | 13 | //------------ LIVE2D NAMESPACE ------------ 14 | namespace live2d 15 | { 16 | class BReader ; 17 | class PartsData ; 18 | class IBaseData ; 19 | class ParamDefSet ; 20 | class MemoryParam ; 21 | 22 | 23 | class ModelImpl : public ISerializableV2 24 | { 25 | public: 26 | static int INSTANCE_COUNT ; 27 | 28 | public: 29 | ModelImpl(void) ; 30 | virtual ~ModelImpl(void) ; 31 | 32 | public: 33 | void initDirect() ; 34 | virtual void readV2(BReader & br , MemoryParam* memParam ) ; 35 | 36 | void reset() ; 37 | 38 | 39 | void addPartsData( PartsData * parts ){ partsDataList->push_back( parts , false ) ; } 40 | 41 | 42 | LDVector * getPartsDataList(){ return partsDataList ; } 43 | 44 | 45 | ParamDefSet* getParamDefSet(){ return paramDefSet ; } 46 | 47 | 48 | float getCanvasWidth(){ return (float)canvasWidth ; } 49 | 50 | 51 | float getCanvasHeight(){ return (float)canvasHeight ; } 52 | 53 | #ifdef L2D_DEBUG 54 | void dump() ; 55 | #endif 56 | 57 | private: 58 | // Prevention of copy Constructor 59 | ModelImpl( const ModelImpl & ) ; 60 | ModelImpl& operator=( const ModelImpl & ) ; 61 | 62 | 63 | private: 64 | ParamDefSet* paramDefSet ; 65 | LDVector* partsDataList ; 66 | 67 | int canvasWidth ; 68 | int canvasHeight ; 69 | 70 | MemoryParam* memoryManagement ;// 自身と同時に破棄されるオブジェクトのメモリを管理 71 | AMemoryHolder* memoryHolderFixedMain ; 72 | AMemoryHolder* memoryHolderFixedGPU ; 73 | }; 74 | 75 | } 76 | //------------ LIVE2D NAMESPACE ------------ 77 | 78 | #endif // __LIVE2D_MODEL_IMPL_H__ 79 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/model/UtModel.h: -------------------------------------------------------------------------------- 1 | /** 2 | * UtModel.h 3 | * 4 | * Copyright(c) Live2D Inc. All rights reserved. 5 | * [[ CONFIDENTIAL ]] 6 | */ 7 | #ifndef __LIVE2D_UT_MODEL_H__ 8 | #define __LIVE2D_UT_MODEL_H__ 9 | 10 | 11 | #ifndef __SKIP_DOC__ 12 | 13 | #include "../Live2D.h" 14 | 15 | 16 | //------------ LIVE2D NAMESPACE ------------ 17 | namespace live2d 18 | { 19 | class ALive2DModel ; 20 | 21 | class UtModel 22 | { 23 | public: 24 | 25 | 26 | private: 27 | UtModel(); 28 | 29 | // Prevention of copy Constructor 30 | UtModel( const UtModel & ) ; 31 | UtModel& operator=( const UtModel & ) ; 32 | 33 | ~UtModel(); 34 | }; 35 | } 36 | //------------ LIVE2D NAMESPACE ------------ 37 | 38 | #endif // __SKIP_DOC__ 39 | 40 | #endif // __LIVE2D_UT_MODEL_H__ 41 | 42 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/motion/EyeBlinkMotion.h: -------------------------------------------------------------------------------- 1 | /** 2 | * EyeBlinkMotion.h 3 | * 4 | * Copyright(c) Live2D Inc. All rights reserved. 5 | * [[ CONFIDENTIAL ]] 6 | */ 7 | #ifndef __LIVE2D_EYE_BLINK_MOTION_H__ 8 | #define __LIVE2D_EYE_BLINK_MOTION_H__ 9 | 10 | 11 | #include "../memory/LDObject.h" 12 | 13 | #include "../type/LDVector.h" 14 | 15 | #include "../ALive2DModel.h" 16 | 17 | 18 | //--------- LIVE2D NAMESPACE ------------ 19 | namespace live2d 20 | { 21 | 22 | 23 | class EyeBlinkMotion : public live2d::LDObject 24 | { 25 | 26 | public: 27 | // 眼の状態定数 28 | enum EYE_STATE{ 29 | STATE_FIRST = 0 , 30 | STATE_INTERVAL , 31 | STATE_CLOSING ,// 閉じていく途中 32 | STATE_CLOSED , // 閉じている状態 33 | STATE_OPENING ,// 開いていく途中 34 | }; 35 | 36 | public: 37 | // Constructor 38 | EyeBlinkMotion(); 39 | 40 | // Destructor 41 | virtual ~EyeBlinkMotion(); 42 | 43 | public: 44 | // 次回のまばたきモーションの時刻を設定 45 | long long calcNextBlink() ; 46 | 47 | // インターバル時間の設定 48 | void setInterval( int blinkIntervalMsec) ; 49 | 50 | // まばたきモーションの設定 51 | void setEyeMotion( int closingMotionMsec , int closedMotionMsec , int openingMotionMsec ) ; 52 | 53 | // 指定したモデルのパラメータ設定 54 | void setParam( live2d::ALive2DModel *model ) ; 55 | 56 | private: 57 | long long nextBlinkTime ; // 次回眼パチする時刻(msec) 58 | 59 | int eyeState ; // 現在の状態 60 | long long stateStartTime ; // 現在のstateが開始した時刻 61 | 62 | bool closeIfZero; // IDで指定された眼のパラメータが、0のときに閉じるなら true 、1の時に閉じるなら false 63 | 64 | live2d::LDString eyeID_L ; // 左目のID 65 | live2d::LDString eyeID_R ; // 右目のID 66 | 67 | int blinkIntervalMsec ; // 68 | int closingMotionMsec ; // 眼が閉じるまでの時間 69 | int closedMotionMsec ; // 閉じたままでいる時間 70 | int openingMotionMsec ; // 眼が開くまでの時間 71 | 72 | }; 73 | 74 | } 75 | //--------- LIVE2D NAMESPACE ------------ 76 | 77 | 78 | #endif // __LIVE2D_EYE_BLINK_MOTION_H__ 79 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/motion/MotionQueueManager.h: -------------------------------------------------------------------------------- 1 | /** 2 | * MotionQueueManager.h 3 | * 4 | * Copyright(c) Live2D Inc. All rights reserved. 5 | * [[ CONFIDENTIAL ]] 6 | */ 7 | #ifndef __LIVE2D_MOTION_QUEUE_MANAGER_H__ 8 | #define __LIVE2D_MOTION_QUEUE_MANAGER_H__ 9 | 10 | 11 | #include "LDObject.h" 12 | #include "ALive2DModel.h" 13 | 14 | #include "LDVector.h" 15 | #include "AMotion.h" 16 | 17 | //--------- LIVE2D NAMESPACE ------------ 18 | namespace live2d 19 | { 20 | class Live2DMotion ; 21 | class MotionQueueEnt ; 22 | class MemoryParam ; 23 | 24 | 25 | 26 | class MotionQueueManager : public live2d::LDObject 27 | { 28 | public: 29 | MotionQueueManager(); 30 | virtual ~MotionQueueManager(); 31 | 32 | // 指定のモーションを開始する 33 | // 同じタイプのモーションが既にある場合は、既存のモーションに終了フラグを立て、フェードアウトを開始させる。 34 | int startMotion( AMotion * motion , bool autoDelete ) ; 35 | 36 | // モデルのパラメータを設定、更新する(動きを反映する) 37 | bool updateParam( live2d::ALive2DModel * model ) ; 38 | 39 | // 全てのモーションが終了しているか 40 | bool isFinished() ; 41 | 42 | // 引数で指定したモーションが終了しているかを返す。(0.8.09追加) 43 | bool isFinished(int motionQueueEntNo ) ; 44 | 45 | 46 | // 全てのモーションを停止する 47 | void stopAllMotions() ; 48 | 49 | // モーションの開始・終了をダンプする 50 | void setMotionDebugMode( bool f ){ this->motionDebugMode = f ; } 51 | 52 | // MotionQueueEntを取得 53 | MotionQueueEnt* getMotionQueueEnt( int entNo ) ; 54 | 55 | #if L2D_VERBOSE 56 | void DUMP() ; 57 | #endif 58 | 59 | private: 60 | live2d::LDVector *motions ; 61 | 62 | bool motionDebugMode ;// モーションの再生・停止をダンプするフラグ 63 | 64 | live2d::MemoryParam* memoryManagement ; 65 | live2d::AMemoryHolder* memoryHolderFixedMain ; 66 | }; 67 | 68 | } 69 | //--------- LIVE2D NAMESPACE ------------ 70 | 71 | #endif // __LIVE2D_MOTION_QUEUE_MANAGER_H__ 72 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/param/ParamDefFloat.h: -------------------------------------------------------------------------------- 1 | /** 2 | * ParamDefFloat.h 3 | * 4 | * Copyright(c) Live2D Inc. All rights reserved. 5 | * [[ CONFIDENTIAL ]] 6 | */ 7 | #ifndef __LIVE2D_PARAM_DEF_FLOAT_H__ 8 | #define __LIVE2D_PARAM_DEF_FLOAT_H__ 9 | 10 | 11 | #include "../id/ParamID.h" 12 | #include "../io/ISerializableV2.h" 13 | 14 | //--------- LIVE2D NAMESPACE ------------ 15 | namespace live2d 16 | { 17 | 18 | class ParamDefFloat : public ISerializableV2 19 | { 20 | public: 21 | ParamDefFloat(); 22 | virtual ~ParamDefFloat(); 23 | 24 | public: 25 | virtual void readV2(BReader & br , MemoryParam* memParam ) ; 26 | 27 | public: 28 | 29 | inline float getMinValue(){ return minValue ; } 30 | 31 | 32 | inline float getMaxValue(){ return maxValue ; } 33 | 34 | 35 | inline float getDefaultValue(){ return defaultValue ; } 36 | 37 | 38 | inline ParamID* getParamID(){ return paramID ; } 39 | 40 | private: 41 | float minValue ; // パラメータの最小値 42 | float maxValue ; // パラメータの最大値 43 | float defaultValue; // パラメータのデフォルト値 44 | 45 | ParamID * paramID ; //shared 46 | 47 | }; 48 | 49 | } 50 | //------------------------- LIVE2D NAMESPACE ------------ 51 | #endif //__LIVE2D_PARAM_DEF_FLOAT_H__ 52 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/param/ParamDefSet.h: -------------------------------------------------------------------------------- 1 | /** 2 | * ParamDefSet.h 3 | * 4 | * Copyright(c) Live2D Inc. All rights reserved. 5 | * [[ CONFIDENTIAL ]] 6 | */ 7 | #ifndef __LIVE2D_PARAMDEFSET_H__ 8 | #define __LIVE2D_PARAMDEFSET_H__ 9 | 10 | 11 | 12 | #include "../io/ISerializableV2.h" 13 | #include "ParamDefFloat.h" 14 | 15 | //--------- LIVE2D NAMESPACE ------------ 16 | namespace live2d 17 | { 18 | 19 | class ParamDefSet : public ISerializableV2 20 | { 21 | public: 22 | ParamDefSet(); 23 | virtual ~ParamDefSet(); 24 | 25 | public: 26 | void initDirect(MemoryParam* memParam) ; 27 | 28 | 29 | LDVector* getParamDefFloatList(){ return paramDefList ; } 30 | 31 | 32 | virtual void readV2(BReader & br , MemoryParam* memParam ) ; 33 | 34 | private: 35 | LDVector* paramDefList ; // パラメータ定義リスト 36 | 37 | }; 38 | } 39 | //------------------------- LIVE2D NAMESPACE ------------ 40 | 41 | #endif // __LIVE2D_PARAMDEFSET_H__ 42 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/param/PivotManager.h: -------------------------------------------------------------------------------- 1 | /** 2 | * PivotManager.h 3 | * 4 | * 5 | * Copyright(c) Live2D Inc. All rights reserved. 6 | * [[ CONFIDENTIAL ]] 7 | */ 8 | #ifndef __LIVE2D_PIVOT_MANAGER_H__ 9 | #define __LIVE2D_PIVOT_MANAGER_H__ 10 | 11 | 12 | #ifndef __SKIP_DOC__ 13 | 14 | #include "../Live2D.h" 15 | #include "../ModelContext.h" 16 | #include "../io/ISerializableV2.h" 17 | 18 | //------------ LIVE2D NAMESPACE ------------ 19 | namespace live2d 20 | { 21 | class ParamPivots ; 22 | class ParamID ; 23 | 24 | 25 | 26 | class PivotManager : public ISerializableV2 27 | { 28 | public: 29 | PivotManager(); 30 | virtual ~PivotManager(); 31 | 32 | public: 33 | virtual void readV2(BReader & br , MemoryParam* memParam ) ; 34 | void initDirect(MemoryParam* memParam) ; 35 | int calcPivotValue(ModelContext & mdc , bool *ret_paramOutside ); 36 | void calcPivotIndexies( unsigned short* array64 , float * tmpT_array , int interpolateCount); 37 | bool checkParamUpdated( ModelContext & mdc ) const ; 38 | 39 | public: 40 | 41 | int getParamCount() const { return (int)paramPivotTable->size() ; } 42 | 43 | 44 | LDVector* getParamPivotTableRef() const { return paramPivotTable ; } 45 | 46 | 47 | 48 | // ---------------------------------サンプル用------------------------------------- 49 | #if L2D_SAMPLE 50 | void DUMP_PIVOT_STR( int pivotArrayNo ); 51 | #endif 52 | //-------------------------------------------------------------------------------- 53 | 54 | private: 55 | //Prevention of copy Constructor 56 | PivotManager( const PivotManager & ) ; 57 | PivotManager& operator=( const PivotManager & ) ; 58 | 59 | 60 | private: 61 | LDVector* paramPivotTable; // パラメータ(paramID)ごとのピボットを設定する 62 | 63 | }; 64 | } 65 | //------------ LIVE2D NAMESPACE ------------ 66 | 67 | #endif // __SKIP_DOC__ 68 | 69 | #endif // __LIVE2D_PIVOT_MANAGER_H__ 70 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/type/LDColor.h: -------------------------------------------------------------------------------- 1 | /** 2 | * LDColor.h 3 | * 4 | * Copyright(c) Live2D Inc. All rights reserved. 5 | * [[ CONFIDENTIAL ]] 6 | */ 7 | 8 | #ifndef __LIVE2D_LDCOLOR_H__ 9 | #define __LIVE2D_LDCOLOR_H__ 10 | 11 | 12 | #ifndef __SKIP_DOC__ 13 | 14 | #include "../memory/LDObject.h" 15 | 16 | 17 | //--------- LIVE2D NAMESPACE ------------ 18 | namespace live2d 19 | { 20 | 21 | 22 | class LDColor : public live2d::LDObject 23 | { 24 | public: 25 | LDColor(); 26 | LDColor(int color , bool useAlpha); 27 | 28 | virtual ~LDColor(); 29 | 30 | private: 31 | int color; 32 | }; 33 | } 34 | //------------------------- LIVE2D NAMESPACE ------------ 35 | 36 | #endif // __SKIP_DOC__ 37 | 38 | #endif // __LIVE2D_LDCOLOR_H__ 39 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/type/LDPoint.h: -------------------------------------------------------------------------------- 1 | /** 2 | * LDPoint.h 3 | * 4 | * Copyright(c) Live2D Inc. All rights reserved. 5 | * [[ CONFIDENTIAL ]] 6 | */ 7 | 8 | #ifndef __LIVE2D_LDPOINT_H__ 9 | #define __LIVE2D_LDPOINT_H__ 10 | 11 | 12 | #ifndef __SKIP_DOC__ 13 | 14 | #include "../memory/LDObject.h" 15 | 16 | 17 | //--------- LIVE2D NAMESPACE ------------ 18 | namespace live2d 19 | { 20 | 21 | 22 | 23 | class LDPoint : public live2d::LDObject 24 | { 25 | public: 26 | LDPoint(); 27 | LDPoint(int x , int y); 28 | 29 | virtual ~LDPoint(); 30 | 31 | public: 32 | int x ; // 33 | int y ; // 34 | 35 | }; 36 | 37 | } 38 | //------------------------- LIVE2D NAMESPACE ------------ 39 | 40 | #endif //__SKIP_DOC__ 41 | 42 | #endif // __LIVE2D_LDPOINT_H__ 43 | 44 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/type/LDPointF.h: -------------------------------------------------------------------------------- 1 | /** 2 | * LDPointF.h 3 | * 4 | * Copyright(c) Live2D Inc. All rights reserved. 5 | * [[ CONFIDENTIAL ]] 6 | */ 7 | #ifndef __LIVE2D_LDPOINTF_H__ 8 | #define __LIVE2D_LDPOINTF_H__ 9 | 10 | 11 | #ifndef __SKIP_DOC__ 12 | 13 | #include "../Live2D.h" 14 | #include "../memory/LDObject.h" 15 | 16 | //--------- LIVE2D NAMESPACE ------------ 17 | namespace live2d 18 | { 19 | 20 | class LDPointF : public live2d::LDObject 21 | { 22 | public: 23 | LDPointF(); 24 | LDPointF( l2d_pointf x , l2d_pointf y ) ; 25 | 26 | virtual ~LDPointF(); 27 | 28 | public: 29 | l2d_pointf x; // X 30 | l2d_pointf y; // Y 31 | }; 32 | 33 | } //------------------------- LIVE2D NAMESPACE ------------ 34 | 35 | #endif // __SKIP_DOC__ 36 | 37 | #endif // __LIVE2D_LDPOINTF_H__ 38 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/type/LDRect.h: -------------------------------------------------------------------------------- 1 | /** 2 | * LDRect.h 3 | * 4 | * Copyright(c) Live2D Inc. All rights reserved. 5 | * [[ CONFIDENTIAL ]] 6 | */ 7 | #ifndef __LIVE2D_LD_RECT_H__ 8 | #define __LIVE2D_LD_RECT_H__ 9 | 10 | 11 | #ifndef __SKIP_DOC__ 12 | 13 | #include "../memory/LDObject.h" 14 | 15 | //--------- LIVE2D NAMESPACE ------------ 16 | namespace live2d 17 | { 18 | 19 | 20 | 21 | class LDRect : public live2d::LDObject 22 | { 23 | public: 24 | // Constructor 25 | LDRect(); 26 | LDRect(int x , int y , int w , int h ); 27 | 28 | // Destructor 29 | virtual ~LDRect(); 30 | 31 | public: 32 | // 中央X座標取得 33 | int getCenterX(){ return x + width/2 ; } 34 | 35 | // 中央Y座標取得 36 | int getCenterY(){ return y + height/2 ; } 37 | 38 | // 右端取得 39 | int getRight(){ return x + width ; } 40 | 41 | // 一番下取得 42 | int geBottom(){ return y + height ; } 43 | 44 | public: 45 | int x; // 左端となるX座標 46 | int y; // 上端となるY座標 47 | int width; // 矩形の幅 48 | int height; // 矩形の高さ 49 | 50 | }; 51 | 52 | } 53 | //------------------------- LIVE2D NAMESPACE ------------ 54 | 55 | #endif // __SKIP_DOC__ 56 | 57 | #endif // __LIVE2D_LD_RECT_H__ 58 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/type/LDRectF.h: -------------------------------------------------------------------------------- 1 | /** 2 | * LDRectF.h 3 | * 4 | * Copyright(c) Live2D Inc. All rights reserved. 5 | * [[ CONFIDENTIAL ]] 6 | */ 7 | #ifndef __LIVE2D_LDRECTF_H__ 8 | #define __LIVE2D_LDRECTF_H__ 9 | 10 | 11 | #ifndef __SKIP_DOC__ 12 | 13 | 14 | #include "../Live2D.h" 15 | #include "../memory/LDObject.h" 16 | 17 | //--------- LIVE2D NAMESPACE ------------ 18 | namespace live2d 19 | { 20 | 21 | class LDRectF : public live2d::LDObject 22 | { 23 | 24 | public: 25 | // Constructor 26 | LDRectF(); 27 | LDRectF(l2d_pointf x , l2d_pointf y , l2d_pointf w , l2d_pointf h ); 28 | 29 | // Destructor 30 | virtual ~LDRectF(); 31 | 32 | public: 33 | // 中央X取得 34 | l2d_pointf getCenterX(){ return x + 0.5f*width ; } 35 | 36 | // 中央Y取得 37 | l2d_pointf getCenterY(){ return y + 0.5f*height; } 38 | 39 | // 右端取得 40 | l2d_pointf getRight(){ return x + width ; } 41 | 42 | // 下端取得 43 | l2d_pointf geBottom(){ return y + height ; } 44 | 45 | public: 46 | l2d_pointf x; // 左端X 47 | l2d_pointf y; // 上端Y 48 | l2d_pointf width; // 幅 49 | l2d_pointf height; // 高さ 50 | }; 51 | } 52 | //------------------------- LIVE2D NAMESPACE ------------ 53 | 54 | #endif // __SKIP_DOC__ 55 | 56 | #endif // __LIVE2D_LDRECTF_H__ 57 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/util/UtArray.h: -------------------------------------------------------------------------------- 1 | /** 2 | * UtArray.h 3 | * 4 | * 5 | * Copyright(c) Live2D Inc. All rights reserved. 6 | * [[ CONFIDENTIAL ]] 7 | */ 8 | 9 | #ifndef __LIVE2D_UTARRAY_H__ 10 | #define __LIVE2D_UTARRAY_H__ 11 | 12 | 13 | #ifndef __SKIP_DOC__ 14 | 15 | 16 | //------------ LIVE2D NAMESPACE ------------ 17 | namespace live2d 18 | { 19 | class MemoryParam ; 20 | 21 | 22 | class UtArray 23 | { 24 | public: 25 | // 26 | static float * floatArray( MemoryParam* memParam ,int num , ... ) ; 27 | // 28 | static void dumpPoints( float * array , int w , int h ) ; 29 | 30 | private: 31 | UtArray(); // インスタンス化させない 32 | 33 | //Prevention of copy Constructor 34 | UtArray( const UtArray & ) ; 35 | UtArray& operator=( const UtArray & ) ; 36 | 37 | // Destructor 38 | ~UtArray(); 39 | 40 | }; 41 | } 42 | //------------ LIVE2D NAMESPACE ------------ 43 | 44 | #endif // __SKIP_DOC__ 45 | 46 | #endif // __LIVE2D_UTARRAY_H__ 47 | 48 | 49 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/util/UtFile.h: -------------------------------------------------------------------------------- 1 | /** 2 | * UtFile.h 3 | * 4 | * Copyright(c) Live2D Inc. All rights reserved. 5 | * [[ CONFIDENTIAL ]] 6 | */ 7 | 8 | #ifndef __LIVE2D_UTFILE_H__ 9 | #define __LIVE2D_UTFILE_H__ 10 | 11 | 12 | #include "LDVector.h" 13 | 14 | 15 | //--------- LIVE2D NAMESPACE ------------ 16 | namespace live2d 17 | { 18 | 19 | class UtFile 20 | { 21 | public: 22 | // ファイルからバイナリデータをロードして返す。失敗した場合は NULL が返る。 23 | // 必ず UtFile::releaseLoadBuffer() で破棄する。 24 | static char* loadFile( const live2d::LDString &filepath , int * ret_bufsize ) ; 25 | 26 | // ファイルからバイナリデータをロードして返す。失敗した場合は NULL が返る。 27 | // 必ず UtFile::releaseLoadBuffer() で破棄する。 28 | static char* loadFile( const char * filepath , int * ret_bufsize ) ; 29 | 30 | // loadFile()でロードしたバッファを破棄する 31 | static void releaseLoadBuffer( char * buf ) ; 32 | 33 | private: 34 | UtFile(); 35 | 36 | //Prevention of copy Constructor 37 | UtFile( const UtFile & ) ; 38 | UtFile& operator=( const UtFile & ) ; 39 | 40 | ~UtFile(); 41 | 42 | }; 43 | } 44 | //------------------------- LIVE2D NAMESPACE ------------ 45 | 46 | #endif // __LIVE2D_UTFILE_H__ 47 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/util/UtInterpolate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * UtInterpolate.h 3 | * 4 | * Copyright(c) Live2D Inc. All rights reserved. 5 | * [[ CONFIDENTIAL ]] 6 | */ 7 | 8 | 9 | #ifndef __LIVE2D_UTINTERPOLATE_H__ 10 | #define __LIVE2D_UTINTERPOLATE_H__ 11 | 12 | 13 | #ifndef __SKIP_DOC__ 14 | 15 | #include "../Live2D.h" 16 | #include "../type/LDVector.h" 17 | 18 | 19 | 20 | //------------ LIVE2D NAMESPACE ------------ 21 | namespace live2d 22 | { 23 | class ModelContext ; 24 | class PivotManager ; 25 | 26 | 27 | class UtInterpolate 28 | { 29 | public: 30 | // 点列を補間する 31 | static void interpolatePoints( 32 | ModelContext &mdc 33 | , PivotManager &pivotManager 34 | , bool *ret_paramOutside // パラメータが定義範囲外の時に、trueがセットされて返される 35 | ,int numPts 36 | , LDVector &pivotPoints // [][]に相当 37 | , l2d_pointf * dst_points 38 | , int pt_offset , int pt_step ) ; 39 | 40 | // float補間 41 | static float interpolateFloat( 42 | ModelContext &mdc , 43 | PivotManager &pivotManager , 44 | bool *ret_paramOutside ,// パラメータが定義範囲外の時に、trueがセットされて返される 45 | LDVector & pivotValue 46 | ) ; // []に相当 47 | 48 | // int補間 49 | static int interpolateInt( 50 | ModelContext &mdc , 51 | PivotManager &pivotManager , 52 | bool *ret_paramOutside ,// パラメータが定義範囲外の時に、trueがセットされて返される 53 | LDVector & pivotValue ) ; // []に相当 54 | 55 | private: 56 | UtInterpolate(); 57 | 58 | //Prevention of copy Constructor 59 | UtInterpolate( const UtInterpolate & ) ; 60 | UtInterpolate& operator=( const UtInterpolate & ) ; 61 | 62 | ~UtInterpolate(); 63 | }; 64 | } 65 | //------------ LIVE2D NAMESPACE ------------ 66 | 67 | #endif // __SKIP_DOC__ 68 | 69 | #endif // __LIVE2D_UTINTERPOLATE_H__ 70 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/util/UtMotion.h: -------------------------------------------------------------------------------- 1 | /** 2 | * UtMotion.h 3 | * 4 | * Copyright(c) Live2D Inc. All rights reserved. 5 | * [[ CONFIDENTIAL ]] 6 | */ 7 | 8 | #ifndef __LIVE2D_UTMOTION_H__ 9 | #define __LIVE2D_UTMOTION_H__ 10 | 11 | 12 | #ifndef __SKIP_DOC__ 13 | 14 | // --------- LIVE2D NAMESPACE ------------ 15 | namespace live2d 16 | { 17 | 18 | class UtMotion 19 | { 20 | public: 21 | // シンプルなイージングを掛けた値を返す(スロースタート/スローストップ) 22 | static float getEasingSine(float value) ; 23 | 24 | private: 25 | UtMotion(); 26 | ~UtMotion(); 27 | 28 | // Prevention of copy Constructor 29 | UtMotion( const UtMotion & ) ; 30 | UtMotion& operator=( const UtMotion & ) ; 31 | }; 32 | 33 | } 34 | //------------------------- LIVE2D NAMESPACE ------------ 35 | 36 | #endif // __SKIP_DOC__ 37 | 38 | #endif // __LIVE2D_UTMOTION_H__ 39 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/util/UtOS_iPhone.h: -------------------------------------------------------------------------------- 1 | /** 2 | * UtOS_iphone.h 3 | * 4 | * Created by joe on 11/05/05. 5 | * Copyright 2011 Live2D Inc. All rights reserved. 6 | * [[ CONFIDENTIAL ]] 7 | */ 8 | 9 | #ifndef __LIVE2D_UTOS_IPHONE_H__ 10 | #define __LIVE2D_UTOS_IPHONE_H__ 11 | 12 | 13 | #ifndef __SKIP_DOC__ 14 | 15 | //--------- LIVE2D NAMESPACE ------------ 16 | namespace live2d 17 | { 18 | 19 | class UtOS_iPhone 20 | { 21 | public: 22 | // 23 | static void println( const char * format , va_list va ) ; 24 | 25 | // 26 | static long long getTimeMSec() ; 27 | 28 | private: 29 | UtOS_iPhone();// インスタンス化させない 30 | 31 | //Prevention of copy Constructor 32 | UtOS_iPhone( const UtOS_iPhone & ) ; 33 | UtOS_iPhone& operator=( const UtOS_iPhone & ) ; 34 | ~UtOS_iPhone(); 35 | 36 | 37 | }; 38 | 39 | } 40 | //--------- LIVE2D NAMESPACE ------------ 41 | 42 | #endif // __SKIP_DOC__ 43 | 44 | #endif // __LIVE2D_UTOS_IPHONE_H__ 45 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/util/UtString.h: -------------------------------------------------------------------------------- 1 | /** 2 | * UtString.h 3 | * 4 | * Copyright(c) Live2D Inc. All rights reserved. 5 | * [[ CONFIDENTIAL ]] 6 | */ 7 | 8 | #ifndef __LIVE2D_UTSTRING_H__ 9 | #define __LIVE2D_UTSTRING_H__ 10 | 11 | 12 | 13 | #ifndef __SKIP_DOC__ 14 | 15 | #include "../type/LDVector.h" 16 | 17 | 18 | 19 | //--------- LIVE2D NAMESPACE ------------ 20 | namespace live2d 21 | { 22 | class UtString 23 | { 24 | public: 25 | 26 | // 戻り値が複製されるのでオーバーヘッドは大きい。デバッグなどで使う 27 | static live2d::LDString toString( const char * msg , ... ) ; 28 | 29 | // textがstartWordで始まっている場合にtrueを返す 30 | static bool startsWith( const char * text , const char * startWord ) ; 31 | 32 | // mtnで定義されるfloat文字を解釈する。指数表示には未対応 33 | static float strToFloat( const char* str , int len , int pos , int* ret_endpos ) ; 34 | 35 | private: 36 | UtString(); 37 | 38 | //Prevention of copy Constructor 39 | UtString( const UtString & ) ; 40 | UtString& operator=( const UtString & ) ; 41 | 42 | ~UtString(); 43 | 44 | }; 45 | 46 | } 47 | //------------------------- LIVE2D NAMESPACE ------------ 48 | 49 | #endif // __SKIP_DOC__ 50 | 51 | #endif // __LIVE2D_UTSTRING_H__ 52 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/include/util/UtSystem.h: -------------------------------------------------------------------------------- 1 | /** 2 | * UtSystem.h 3 | * 4 | * Copyright(c) Live2D Inc. All rights reserved. 5 | * [[ CONFIDENTIAL ]] 6 | */ 7 | 8 | #ifndef __LIVE2D_UTSYSTEM_H__ 9 | #define __LIVE2D_UTSYSTEM_H__ 10 | 11 | #include "Live2D.h" 12 | 13 | //--------- LIVE2D NAMESPACE ------------ 14 | namespace live2d 15 | { 16 | 17 | 18 | 19 | class UtSystem 20 | { 21 | public: 22 | // ビッグエンディアンかどうか 23 | static bool isBigEndian() ; 24 | 25 | // システム時刻(ミリ秒)の取得 26 | static l2d_int64 getTimeMSec() ; 27 | 28 | //------------------------------------------------------------- 29 | // ユーザ定義時刻 ( 0.8.15以降 ) 30 | // モーションなどをシステム時刻で行うと、計算処理の途中でシステム時刻が進み 31 | // 違う時刻で動きを計算する可能性がある。 32 | // ユーザ時刻では、描画の開始前に明示的に時刻を設定し、描画開始から描画終了まで 33 | // 同じ「ユーザ時刻」で処理が完了するように同期する。 34 | // 一度もユーザ時刻を設定していない場合は、getTimeMSec()と同じ値が返る 35 | //------------------------------------------------------------- 36 | // ユーザ定義の時刻を取得 37 | static l2d_int64 getUserTimeMSec() ; 38 | 39 | // ユーザ定義時刻を設定 40 | static void setUserTimeMSec(l2d_int64 t) ; 41 | 42 | // ユーザ定義時刻に、現在時刻をセット. 43 | // setUserTimeMSec( getTimeMSec() )と同じ効果 44 | static l2d_int64 updateUserTimeMSec() ; 45 | 46 | 47 | // ユーザ定義時刻をリセット 48 | static void resetUserTimeMSec(); 49 | 50 | 51 | static void exit(int code) ; 52 | 53 | private: 54 | UtSystem(); 55 | 56 | // Prevention of copy Constructor 57 | UtSystem( const UtSystem & ) ; 58 | UtSystem& operator=( const UtSystem & ) ; 59 | 60 | ~UtSystem(); 61 | 62 | 63 | private: 64 | static const int USER_TIME_AUTO = -1 ; // UserタイムをSystem時刻に追従させる 65 | static long long userTimeMSec ; // 66 | 67 | }; 68 | } 69 | //------------------------- LIVE2D NAMESPACE ------------ 70 | 71 | #endif // __LIVE2D_UTSYSTEM_H__ 72 | -------------------------------------------------------------------------------- /ios/PPLive2D/Live2D/lib/libLive2D.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/ios/PPLive2D/Live2D/lib/libLive2D.a -------------------------------------------------------------------------------- /ios/PPLive2D/Tools/AccelHelper.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * You can modify and use this source freely 4 | * only for the development of application related Live2D. 5 | * 6 | * (c) Live2D Inc. All rights reserved. 7 | * 8 | * Modify By DaidoujiChen https://github.com/DaidoujiChen 9 | * 10 | */ 11 | 12 | #import 13 | 14 | @interface AccelHelper : NSObject 15 | 16 | /* 17 | * 横方向の回転を取得。 18 | * 寝かせた状態で0。(表裏関係なく) 19 | * 左に回転させると-1,右に回転させると1になる。 20 | **取得横向的旋转。 21 | *睡觉的状态下0。(表里如一) 22 | *向左旋转为-1,向右旋转为1。 23 | * @return 24 | */ 25 | @property (nonatomic, readonly) float accelX; 26 | 27 | /* 28 | * 上下の回転を取得。 29 | * 寝かせた状態で0。(表裏関係なく) 30 | * デバイスが垂直に立っているときに-1、逆さまにすると1になる。 31 | * 32 | * @return 33 | */ 34 | @property (nonatomic, readonly) float accelY; 35 | 36 | /* 37 | * 上下の回転を取得。 38 | * 立たせた状態で0。 39 | * 表向きに寝かせると-1、裏向きに寝かせると1になる 40 | * @return 41 | */ 42 | @property (nonatomic, readonly) float accelZ; 43 | 44 | /* 45 | * デバイスを振ったときなどにどのくらい揺れたかを取得。 46 | * 1を超えるとそれなりに揺れた状態。 47 | * resetShake()を使ってリセットできる。 48 | * @return 49 | */ 50 | @property (nonatomic, readonly) float shake; 51 | 52 | - (void)update; 53 | 54 | /* 55 | * シェイクイベントが連続で発生しないように揺れをリセットする。 56 | */ 57 | - (void)resetShake; 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /ios/PPLive2D/Tools/FileManager.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * You can modify and use this source freely 4 | * only for the development of application related Live2D. 5 | * 6 | * (c) Live2D Inc. All rights reserved. 7 | * 8 | * Modify By DaidoujiChen https://github.com/DaidoujiChen 9 | * 10 | */ 11 | 12 | #import 13 | #import 14 | 15 | @interface FileManager : NSObject 16 | 17 | + (NSData *)openBundle:(NSString *)fileName; 18 | + (NSData *)openBundleWithCString:(const char *)fileName; 19 | + (NSData *)openDocuments:(NSString *)fileName; 20 | + (NSData *)openDocumentsWithCString:(const char *)fileName; 21 | + (const char *)pathForResource:(const char *)fileName; 22 | + (NSURL *)fileURLWithCString:(const char *)fileName; 23 | + (GLuint)loadGLTexture:(NSString *)fileName; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /ios/PPLive2D/Tools/LAppModel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * You can modify and use this source freely 4 | * only for the development of application related Live2D. 5 | * 6 | * (c) Live2D Inc. All rights reserved. 7 | * 8 | * Modify By DaidoujiChen https://github.com/DaidoujiChen 9 | * 10 | */ 11 | 12 | #import 13 | #import 14 | #import "L2DBaseModel.h" 15 | #import "ModelSetting.h" 16 | #import "LModelConfig.h" 17 | class LAppModel : public live2d::framework::L2DBaseModel { 18 | 19 | private: 20 | 21 | // モデルの設定 22 | ModelSetting *modelSetting; 23 | std::string modelHomeDir; 24 | 25 | // 音声用のサウンド 26 | AVAudioPlayer *voice; 27 | 28 | // 是否正在说话 29 | bool isSpeaking; 30 | int modelViewTag; 31 | 32 | public: 33 | LAppModel(); 34 | ~LAppModel(void); 35 | //模型所在视图Tag 36 | void setModelViewTag(int tag); 37 | // model.jsonの読み込み 38 | void load(const char path[],LModelConfig *modelConfig); 39 | // その他の読み込み 40 | void preloadMotionGroup(const char name[]); 41 | 42 | // 更新 43 | void update(); 44 | void draw(); 45 | 46 | // モーション 47 | int startMotion(const char name[], int no, int priority); 48 | int startRandomMotion(const char name[], int priority); 49 | //说话动作 50 | void speakMotion(bool isSpeaking); 51 | // 表情 52 | void setExpression(const char name[]); 53 | void setRandomExpression(); 54 | 55 | // 当たり判定 56 | bool hitTest(const char pid[], float testX, float testY); 57 | 58 | // 音声 59 | void startVoice(const char fileName[]); 60 | 61 | // 表示 62 | void feedIn(); 63 | 64 | private: 65 | // デバッグ用当たり判定の表示 66 | void drawHitRect(); 67 | }; 68 | -------------------------------------------------------------------------------- /ios/PPLive2D/Tools/LAppRenderer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * You can modify and use this source freely 4 | * only for the development of application related Live2D. 5 | * 6 | * (c) Live2D Inc. All rights reserved. 7 | * 8 | * Modify By DaidoujiChen https://github.com/DaidoujiChen 9 | * 10 | */ 11 | 12 | #import 13 | #import 14 | #import "LAppModel.h" 15 | class LAppLive2DManager; 16 | 17 | @interface LAppRenderer : NSObject 18 | @property (nonatomic) LAppModel *appModel; 19 | - (id)init; 20 | - (void)render; 21 | - (BOOL)resizeFromLayer:(CAEAGLLayer *)layer; 22 | 23 | // Live2DManagerの参照を設定する 24 | //设定Live2DManager的参照 25 | - (void)setDelegate:(LAppLive2DManager *)delegate; 26 | 27 | // 別スレッドでテクスチャをロードするような場合に使用する 28 | //在不同线程加载纹理的情况下使用 29 | - (void)setContextCurrent; 30 | 31 | @end 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /ios/PPLive2D/Tools/LAppTextureDesc.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * You can modify and use this source freely 4 | * only for the development of application related Live2D. 5 | * 6 | * (c) Live2D Inc. All rights reserved. 7 | * 8 | * Modify By DaidoujiChen https://github.com/DaidoujiChen 9 | * 10 | */ 11 | 12 | #import "L2DTextureDesc.h" 13 | 14 | class LAppTextureDesc : public live2d::framework::L2DTextureDesc { 15 | 16 | public: 17 | LAppTextureDesc(unsigned int tex); 18 | virtual ~LAppTextureDesc(); 19 | 20 | private: 21 | unsigned int data; 22 | }; 23 | -------------------------------------------------------------------------------- /ios/PPLive2D/Tools/LAppTextureDesc.mm: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * You can modify and use this source freely 4 | * only for the development of application related Live2D. 5 | * 6 | * (c) Live2D Inc. All rights reserved. 7 | * 8 | * Modify By DaidoujiChen https://github.com/DaidoujiChen 9 | * 10 | */ 11 | 12 | #import "LAppTextureDesc.h" 13 | #import 14 | #import 15 | 16 | LAppTextureDesc::LAppTextureDesc(unsigned int tex) { 17 | data = tex; 18 | } 19 | 20 | LAppTextureDesc::~LAppTextureDesc() { 21 | glDeleteTextures(1, &data); 22 | } 23 | -------------------------------------------------------------------------------- /ios/PPLive2D/Tools/LAppView.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * You can modify and use this source freely 4 | * only for the development of application related Live2D. 5 | * 6 | * (c) Live2D Inc. All rights reserved. 7 | * 8 | * Modify By DaidoujiChen https://github.com/DaidoujiChen 9 | * 10 | */ 11 | 12 | #import 13 | #import "L2DViewMatrix.h" 14 | 15 | class LAppLive2DManager; 16 | 17 | @interface LAppView : UIView 18 | 19 | // 画面の拡大縮小、移動用の行列 20 | @property (nonatomic, readonly) live2d::framework::L2DViewMatrix *viewMatrix; 21 | 22 | - (void)startAnimation; 23 | - (void)stopAnimation; 24 | - (void)setDelegate:(LAppLive2DManager *)delegate; 25 | - (void)terminate; 26 | 27 | @end 28 | 29 | 30 | -------------------------------------------------------------------------------- /ios/PPLive2D/Tools/LModelConfig.h: -------------------------------------------------------------------------------- 1 | // 2 | // LModelConfig.h 3 | // flutter_plugin2 4 | // 5 | // Created by mac on 2020/11/11. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface LModelConfig : NSObject 13 | @property (nonatomic) double center_x; 14 | @property (nonatomic) double y; 15 | @property (nonatomic) double width; 16 | @property (nonatomic) double weight; 17 | @property (nonatomic) double height; 18 | @end 19 | 20 | NS_ASSUME_NONNULL_END 21 | -------------------------------------------------------------------------------- /ios/PPLive2D/Tools/LModelConfig.mm: -------------------------------------------------------------------------------- 1 | // 2 | // LModelConfig.m 3 | // flutter_plugin2 4 | // 5 | // Created by mac on 2020/11/11. 6 | // 7 | 8 | #import "LModelConfig.h" 9 | 10 | @implementation LModelConfig 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /ios/PPLive2D/Tools/OffScreenImage.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * You can modify and use this source freely 4 | * only for the development of application related Live2D. 5 | * 6 | * (c) Live2D Inc. All rights reserved. 7 | * 8 | * Modify By DaidoujiChen https://github.com/DaidoujiChen 9 | * 10 | */ 11 | 12 | #import 13 | 14 | @interface OffscreenImage : NSObject 15 | 16 | + (void)createFrameBuffer:(float)width height:(float)height defaultFrameBuffer:(GLuint)defaultFrameBuffer; 17 | + (void)releaseFrameBuffer; 18 | + (void)setOffscreen; 19 | + (void)setOnscreen; 20 | 21 | /* 22 | * オフスクリーンのバッファを描画する。 23 | * @param gl 24 | * @param opacity 25 | */ 26 | + (void)drawDisplay:(float)opacity; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /ios/PPLive2D/Tools/PlatformManager.h: -------------------------------------------------------------------------------- 1 | /** 2 | * You can modify and use this source freely 3 | * only for the development of application related Live2D. 4 | * 5 | * (c) Live2D Inc. All rights reserved. 6 | * 7 | * Modify By DaidoujiChen https://github.com/DaidoujiChen 8 | * 9 | */ 10 | 11 | #import "IPlatformManager.h" 12 | 13 | class PlatformManager : public live2d::framework::IPlatformManager { 14 | 15 | public: 16 | PlatformManager(void); 17 | ~PlatformManager(void); 18 | 19 | unsigned char *loadBytes(const char *path, size_t *size); 20 | void releaseBytes(void *data){} 21 | live2d::ALive2DModel *loadLive2DModel(const char *path); 22 | live2d::framework::L2DTextureDesc *loadTexture(live2d::ALive2DModel *model, int no, const char *path); 23 | void log(const char *txt); 24 | 25 | }; 26 | -------------------------------------------------------------------------------- /ios/PPLive2D/Tools/PlatformManager.mm: -------------------------------------------------------------------------------- 1 | /** 2 | * You can modify and use this source freely 3 | * only for the development of application related Live2D. 4 | * 5 | * (c) Live2D Inc. All rights reserved. 6 | * 7 | * Modify By DaidoujiChen https://github.com/DaidoujiChen 8 | * 9 | */ 10 | 11 | #import "PlatformManager.h" 12 | #import "FileManager.h" 13 | #import "Live2DModelIPhone.h" 14 | #import "LAppTextureDesc.h" 15 | 16 | using namespace live2d; 17 | using namespace live2d::framework; 18 | 19 | #pragma mark - Public Function 20 | 21 | unsigned char *PlatformManager::loadBytes(const char *path, size_t *size) { 22 | NSString *pathString = [NSString stringWithCString:path encoding:NSUTF8StringEncoding]; 23 | NSData *data = [FileManager openBundle:pathString]; 24 | *size = data.length; 25 | unsigned char *buf = (unsigned char *)data.bytes; 26 | return buf; 27 | } 28 | 29 | ALive2DModel *PlatformManager::loadLive2DModel(const char *path) { 30 | size_t size; 31 | unsigned char *buf = loadBytes(path, &size); 32 | 33 | //Create Live2D Model Instance 34 | ALive2DModel *live2DModel = Live2DModelIPhone::loadModel(buf, (int)size); 35 | return live2DModel; 36 | } 37 | 38 | L2DTextureDesc *PlatformManager::loadTexture(ALive2DModel *model, int no, const char *path) { 39 | GLuint glTexNo = [FileManager loadGLTexture:[NSString stringWithCString:path encoding:NSUTF8StringEncoding]]; 40 | 41 | // テクスチャとモデルを結びつける 42 | ((Live2DModelIPhone *)model)->setTexture(no, glTexNo); 43 | 44 | LAppTextureDesc *desc = new LAppTextureDesc(glTexNo); 45 | return desc; 46 | } 47 | 48 | void PlatformManager::log(const char *txt) { 49 | NSLog(@"%@", [NSString stringWithCString:txt encoding:NSUTF8StringEncoding]); 50 | } 51 | 52 | #pragma mark - Life Cycle 53 | 54 | PlatformManager::PlatformManager(void) { 55 | } 56 | 57 | 58 | PlatformManager::~PlatformManager(void) { 59 | } 60 | -------------------------------------------------------------------------------- /ios/PPLive2D/Tools/SimpleImage.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * You can modify and use this source freely 4 | * only for the development of application related Live2D. 5 | * 6 | * (c) Live2D Inc. All rights reserved. 7 | * 8 | * Modify By DaidoujiChen https://github.com/DaidoujiChen 9 | * 10 | */ 11 | 12 | #import 13 | 14 | @interface SimpleImage : NSObject 15 | 16 | - (id)initWithPath:(NSString *)path; 17 | - (void)draw; 18 | - (void)deleteTexture; 19 | 20 | /* 21 | * テクスチャの描画先の座標を設定(デフォルトは 0,0,1,1 に描かれる) 22 | * 23 | * @param left 24 | * @param right 25 | * @param bottom 26 | * @param top 27 | */ 28 | - (void)setDrawRect:(float)left right:(float)right bottom:(float)bottom top:(float)top; 29 | 30 | /* 31 | * テクスチャの使用範囲を設定(テクスチャは0..1座標) 32 | * @param left 33 | * @param right 34 | * @param bottom 35 | * @param top 36 | */ 37 | - (void)setUVRect:(float)left right:(float)right bottom:(float)bottom top:(float)top; 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /ios/flutter_plugin2.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. 3 | # Run `pod lib lint flutter_plugin2.podspec' to validate before publishing. 4 | # 5 | Pod::Spec.new do |s| 6 | s.name = 'flutter_plugin2' 7 | s.version = '0.0.1' 8 | s.summary = 'A new Flutter plugin.' 9 | s.description = <<-DESC 10 | A new Flutter plugin. 11 | DESC 12 | s.homepage = 'http://example.com' 13 | s.license = { :file => '../LICENSE' } 14 | s.author = { 'Your Company' => 'email@example.com' } 15 | s.source = { :path => '.' } 16 | s.source_files = ['Classes/**/*','PPLive2D/Live2D/include/**/*','PPLive2D/Live2D/framework/**/*','PPLive2D/Tools/**/*'] 17 | s.public_header_files = 'Classes/**/*.h' 18 | s.vendored_library = 'PPLive2D/Live2D/lib/*' 19 | s.dependency 'Flutter' 20 | s.platform = :ios, '8.0' 21 | s.libraries = 'c++' 22 | s.frameworks = 'GLKit', 'OpenGLES','CoreMotion','AVFoundation' 23 | s.xcconfig = { 24 | 'GCC_PREPROCESSOR_DEFINITIONS' => 'L2D_TARGET_IPHONE', 25 | 'ENABLE_BITCODE' => 'NO' 26 | } 27 | # Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported. 28 | s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' } 29 | end 30 | -------------------------------------------------------------------------------- /lib/Live2dViewPlatform.dart: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PlanetWalkDev/flutter_live2d_plugin/d7b4c50010df581e5216d5f408f2080186de6d3d/lib/Live2dViewPlatform.dart -------------------------------------------------------------------------------- /lib/flutter_plugin2.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'dart:async'; 3 | 4 | import 'package:flutter/services.dart'; 5 | 6 | class FlutterPlugin2 { 7 | static const MethodChannel _channel = const MethodChannel('flutter_plugin2'); 8 | static const _live2dChannel = const MethodChannel('plugins.felix.angelov/textview'); 9 | 10 | static Future get platformVersion async { 11 | final String version = await _channel.invokeMethod('getPlatformVersion'); 12 | return version; 13 | } 14 | //测试方法 15 | static Future test() async { 16 | await _live2dChannel.invokeMethod('shakeEvent'); 17 | } 18 | 19 | } 20 | class Live2dContact{ 21 | static int id_1=1001; 22 | static int id_2=1002; 23 | 24 | } -------------------------------------------------------------------------------- /local.properties: -------------------------------------------------------------------------------- 1 | ## This file must *NOT* be checked into Version Control Systems, 2 | # as it contains information specific to your local configuration. 3 | # 4 | # Location of the SDK. This is only used by Gradle. 5 | # For customization when using a Version Control System, please read the 6 | # header note. 7 | #Mon Sep 21 17:39:41 CST 2020 8 | sdk.dir=/Users/mac/Library/Android/sdk 9 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':mylibrary' 2 | project(':mylibrary').projectDir = new File(rootDir, 'android/mylibrary/') -------------------------------------------------------------------------------- /test/flutter_plugin2_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/services.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | import 'package:flutter_plugin2/flutter_plugin2.dart'; 4 | 5 | void main() { 6 | const MethodChannel channel = MethodChannel('flutter_plugin2'); 7 | 8 | TestWidgetsFlutterBinding.ensureInitialized(); 9 | 10 | setUp(() { 11 | channel.setMockMethodCallHandler((MethodCall methodCall) async { 12 | return '42'; 13 | }); 14 | }); 15 | 16 | tearDown(() { 17 | channel.setMockMethodCallHandler(null); 18 | }); 19 | 20 | test('getPlatformVersion', () async { 21 | expect(await FlutterPlugin2.platformVersion, '42'); 22 | }); 23 | } 24 | --------------------------------------------------------------------------------