From a372dac9ca0a5aa36eebef44ef38fe445760eac2 Mon Sep 17 00:00:00 2001 From: Jun Koyama Date: Thu, 3 Sep 2020 20:11:05 +0900 Subject: [PATCH] Fix Int to Float when getting PhysicsSettings.Vertices.Radius in physics3.json parsing --- CHANGELOG.md | 8 ++++++++ src/physics/cubismphysicsjson.ts | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ae6709..940fe0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). * Fix implementation of `iterator#increment` in `csmmap` and `csmvector`. * Fix delay in starting fade-out for expressions. +* Fix `Int` to `Float` when getting `PhysicsSettings.Vertices.Radius` in `physics3.json` parsing. + * **[INFO]** This fix may change the behavior of the physics operations. + The behavior changes if the value of `PhysicsSettings.Vertices.Radius` in `physics3.json` is less than `1.0`. + If you want to return to the behavior before Cubism SDK for Web R1, + change the value of the corresponding `PhysicsSettings.Vertices.Radius` to `0`. + * This fix is related to fix applied to `Cubism Editor 4.0.05 beta1` and later. + Please see [Cubism Editor Changelog](https://docs.live2d.com/cubism-editor-manual/updates4/). + * **Fix physics and scene blending settings where the length of the pendulum would be converted to an integer when displayed.** ### Changed diff --git a/src/physics/cubismphysicsjson.ts b/src/physics/cubismphysicsjson.ts index 10956c1..296765b 100644 --- a/src/physics/cubismphysicsjson.ts +++ b/src/physics/cubismphysicsjson.ts @@ -609,7 +609,7 @@ export namespace Live2DCubismFramework { .getValueByString(Vertices) .getValueByIndex(vertexIndex) .getValueByString(Radius) - .toInt(); + .toFloat(); } /**