Note about Updating to Cubism 4 SDK for Web R1 or Later

Updated: 01/30/2020

Summary

With the release of the official version of the Cubism 4 SDK for Web R1 from the previous beta version, the package and repository structure has been changed to improve convenience.
The reason for this change is to avoid mixing files that require unnecessary user management, in addition to operating without changing the structure from Cubism 4 SDK for Native.

Structural Changes

Package

Prior to the Cubism 4 SDK for Web beta2, the structure was [package root folder]/Framework/[Framework sources]. In the Cubism 4 SDK for Web R1 or later, the structure of managing the Framework source, such as [package root folder]/Framework/src/[Framework sources], has been lowered one level across the src folder to match the structure of the Framework structure of the Cubism 4 SDK for Native.

This adjustment changes the location of references to the Framework source in each source on the Sample side.

GitHub repository

In addition to the package changes in the CubismWebSamples repository in Live2D GitHub, the Cubism 4 SDK for Web beta2 and earlier repositories were managed using only the following.

  • CubismWebSamples
    • Core
    • Framework (directory containing sources)
    • Sample

The Cubism 4 SDK for WebR1 or later has the same repository management structure as the Cubism 4 SDK for Native, as shown below.

  • CubismWebFramework
    • src (directory containing Framework sources)
  • CubismWebSamples
    • Core
    • Framework (sub-module)
    • Samples

With this change, CubismWebSamples is now structured as a sub-module of CubismWebFramework.


How to Update from Projects Prior to the Cubism 4 SDK for Web Beta2

When updating from a project prior to the Cubism 4 SDK for Web beta2, if you overwrite your project with the Cubism 4 SDK for Web R1 package, the changes may not be applied, or errors may occur and the project may not work.

This section will guide users of the Cubism 4 SDK for Web beta2 or earlier projects on how to update their projects to be able to use the Cubism 4 SDK for Web R1.

If you are using a package

For users who have downloaded the Cubism 4 SDK for Web beta2 or earlier packages and wish to replace them with the Cubism 4 SDK for Web R1 or later, in each case, the following steps are required.

If the Framework structure is used without modification

1. Decide whether or not to change the structure of the Framework to a “Framework/src” configuration.

  • If you want to make changes, overwrite the Framework folder of Cubism 4 SDK for Web R1 after modifying the structure.
  • If you do not change it, update it with a diff against the file of the same name as the Framework source for that structure.

2. [Only when the structure of Framework is changed to the “Framework/src” configuration]

  • Change references to Framework to the correct location.

If you are not using the Sample as-is and have modified the structure or source of the Framework

  • Update the files with the same name as the source files of the Framework you are using.

Note: If you are using the Sample as-is, please change the part of each source that refers to the Framework, or use the same operation as the Cubism 4 SDK for Web R1.
Note: The above procedures may not apply to some environments, so please make changes according to the project environment.

If you are using a clone from the Live2D GitHub repository

For users who have created projects using the Cubism 4 SDK for Web beta2 or earlier repository (CubismWebSamples) and wish to replace it with the Cubism 4 SDK for Web R1 or later, please note the following when updating, although certain procedures cannot be followed depending on the environment.

  • Check to see if the project referencing the Framework is in the correct location
    • Framework sources are managed in Framework/src.
  • Check if the submodules are updated with the git submodule update
    • Framework(CubismWebFramework) isa sub-module of CubismWebSamples, so be sure to update the sub-module when using it with Sample.
Was this article helpful?
YesNo
Please let us know what you think about this article.