@charivo/render-live2d 0.4.3 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CubismSdkForWeb-5-r.4/Core/LICENSE.md +7 -0
- package/CubismSdkForWeb-5-r.4/Core/RedistributableFiles.txt +6 -0
- package/CubismSdkForWeb-5-r.4/Framework/LICENSE.md +45 -0
- package/CubismSdkForWeb-5-r.4/LICENSE.md +66 -0
- package/CubismSdkForWeb-5-r.4/NOTICE.md +38 -0
- package/LICENSE.md +124 -0
- package/README.md +21 -3
- package/dist/{live2dcubismcore.min-V7VE6BAG.js → live2dcubismcore.min-Q4IRHBR5.js} +29 -2
- package/dist/live2dcubismcore.min-Q4IRHBR5.js.map +1 -0
- package/dist/renderer.js +32 -11
- package/dist/renderer.js.map +1 -1
- package/dist/src/cubism/lappdefine.d.ts +5 -0
- package/dist/src/cubism/lappdefine.d.ts.map +1 -1
- package/dist/src/cubism/lappmodel.d.ts +3 -2
- package/dist/src/cubism/lappmodel.d.ts.map +1 -1
- package/package.json +11 -5
- package/LICENSE +0 -21
- package/dist/live2dcubismcore.min-V7VE6BAG.js.map +0 -1
package/dist/renderer.js
CHANGED
|
@@ -1,6 +1,32 @@
|
|
|
1
1
|
import { subscribeBrowserLifecycle } from '@charivo/core';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
/*!
|
|
4
|
+
* @charivo/render-live2d bundles Live2D Cubism SDK for Web components.
|
|
5
|
+
* The notices below are reproduced verbatim from the bundled sources.
|
|
6
|
+
*
|
|
7
|
+
* Live2D Cubism Framework (Framework/src/) and the sample-derived code in
|
|
8
|
+
* src/cubism/:
|
|
9
|
+
*
|
|
10
|
+
* Copyright(c) Live2D Inc. All rights reserved.
|
|
11
|
+
*
|
|
12
|
+
* Use of this source code is governed by the Live2D Open Software license
|
|
13
|
+
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
|
14
|
+
*
|
|
15
|
+
* Live2D Cubism Core (live2dcubismcore.min.js), whose own notice also travels
|
|
16
|
+
* inside this bundle alongside the Core source:
|
|
17
|
+
*
|
|
18
|
+
* Live2D Cubism Core
|
|
19
|
+
* (C) 2019 Live2D Inc. All rights reserved.
|
|
20
|
+
*
|
|
21
|
+
* This file is licensed pursuant to the license agreement below.
|
|
22
|
+
* This file corresponds to the "Redistributable Code" in the agreement.
|
|
23
|
+
* https://www.live2d.com/eula/live2d-proprietary-software-license-agreement_en.html
|
|
24
|
+
*
|
|
25
|
+
* Do not remove or modify these notices. Shipping a product built on this code
|
|
26
|
+
* may require a Live2D Publication License or Cubism SDK Release License —
|
|
27
|
+
* see LICENSE.md in this package.
|
|
28
|
+
*/
|
|
29
|
+
|
|
4
30
|
|
|
5
31
|
// CubismSdkForWeb-5-r.4/Framework/src/type/csmvector.ts
|
|
6
32
|
var csmVector = class _csmVector {
|
|
@@ -13770,14 +13796,9 @@ var LAppModel = class extends CubismUserModel {
|
|
|
13770
13796
|
if (this._physics) {
|
|
13771
13797
|
this._physics.evaluate(this._model, deltaTimeSeconds);
|
|
13772
13798
|
}
|
|
13773
|
-
if (this._lipsync) {
|
|
13774
|
-
|
|
13775
|
-
|
|
13776
|
-
lipSyncValue = this.realtimeLipSyncRms * 1.8;
|
|
13777
|
-
} else {
|
|
13778
|
-
this.wavHandler.update(deltaTimeSeconds);
|
|
13779
|
-
lipSyncValue = this.wavHandler.getRms();
|
|
13780
|
-
}
|
|
13799
|
+
if (this._lipsync && !this.useRealtimeLipSync) {
|
|
13800
|
+
this.wavHandler.update(deltaTimeSeconds);
|
|
13801
|
+
const lipSyncValue = this.wavHandler.getRms();
|
|
13781
13802
|
for (let i = 0; i < this.lipSyncIds.getSize(); i++) {
|
|
13782
13803
|
this._model.addParameterValueById(
|
|
13783
13804
|
this.lipSyncIds.at(i),
|
|
@@ -13789,7 +13810,7 @@ var LAppModel = class extends CubismUserModel {
|
|
|
13789
13810
|
if (this._pose) {
|
|
13790
13811
|
this._pose.updateParameters(this._model, deltaTimeSeconds);
|
|
13791
13812
|
}
|
|
13792
|
-
if (this.useRealtimeLipSync
|
|
13813
|
+
if (this.useRealtimeLipSync) {
|
|
13793
13814
|
const lipSyncValue = this.realtimeLipSyncRms * 1.8;
|
|
13794
13815
|
for (let i = 0; i < this.lipSyncIds.getSize(); i++) {
|
|
13795
13816
|
this._model.setParameterValueById(this.lipSyncIds.at(i), lipSyncValue);
|
|
@@ -14379,7 +14400,7 @@ var CubismModelHost = class {
|
|
|
14379
14400
|
async function loadCubismCore() {
|
|
14380
14401
|
if (typeof window === "undefined") return;
|
|
14381
14402
|
if (isCubismCoreReady()) return;
|
|
14382
|
-
const { default: coreScript } = await import('./live2dcubismcore.min-
|
|
14403
|
+
const { default: coreScript } = await import('./live2dcubismcore.min-Q4IRHBR5.js');
|
|
14383
14404
|
const script = document.createElement("script");
|
|
14384
14405
|
script.text = coreScript;
|
|
14385
14406
|
document.head.appendChild(script);
|