@charivo/render-live2d 0.2.9 → 0.3.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/dist/renderer.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { subscribeBrowserLifecycle } from '@charivo/core';
|
|
2
2
|
|
|
3
|
-
// src/renderer.ts
|
|
3
|
+
// src/live2d-renderer.ts
|
|
4
4
|
|
|
5
5
|
// CubismSdkForWeb-5-r.4/Framework/src/type/csmvector.ts
|
|
6
6
|
var csmVector = class _csmVector {
|
|
@@ -14362,8 +14362,8 @@ function setupResponsiveResize(canvas, resize) {
|
|
|
14362
14362
|
};
|
|
14363
14363
|
}
|
|
14364
14364
|
|
|
14365
|
-
// src/renderer.ts
|
|
14366
|
-
var
|
|
14365
|
+
// src/live2d-renderer.ts
|
|
14366
|
+
var Live2DRendererImpl = class _Live2DRendererImpl {
|
|
14367
14367
|
static cubismStarted = false;
|
|
14368
14368
|
canvas;
|
|
14369
14369
|
host;
|
|
@@ -14474,13 +14474,13 @@ var Live2DRenderer = class _Live2DRenderer {
|
|
|
14474
14474
|
this.teardownResize = void 0;
|
|
14475
14475
|
}
|
|
14476
14476
|
initializeCubism() {
|
|
14477
|
-
if (!
|
|
14477
|
+
if (!_Live2DRendererImpl.cubismStarted) {
|
|
14478
14478
|
const option = new Option();
|
|
14479
14479
|
option.logFunction = (message) => LAppPal.printMessage(message);
|
|
14480
14480
|
option.loggingLevel = CubismLoggingLevel;
|
|
14481
14481
|
CubismFramework.startUp(option);
|
|
14482
14482
|
CubismFramework.initialize();
|
|
14483
|
-
|
|
14483
|
+
_Live2DRendererImpl.cubismStarted = true;
|
|
14484
14484
|
}
|
|
14485
14485
|
LAppPal.updateTime();
|
|
14486
14486
|
}
|
|
@@ -14678,13 +14678,15 @@ var Live2DRenderer = class _Live2DRenderer {
|
|
|
14678
14678
|
}
|
|
14679
14679
|
}
|
|
14680
14680
|
};
|
|
14681
|
-
function createLive2DRenderer(options) {
|
|
14682
|
-
return new Live2DRenderer(options);
|
|
14683
|
-
}
|
|
14684
14681
|
function clamp(value, min, max) {
|
|
14685
14682
|
return Math.max(min, Math.min(max, value));
|
|
14686
14683
|
}
|
|
14687
14684
|
|
|
14688
|
-
|
|
14685
|
+
// src/renderer.ts
|
|
14686
|
+
function createLive2DRenderer(options) {
|
|
14687
|
+
return new Live2DRendererImpl(options);
|
|
14688
|
+
}
|
|
14689
|
+
|
|
14690
|
+
export { createLive2DRenderer };
|
|
14689
14691
|
//# sourceMappingURL=renderer.js.map
|
|
14690
14692
|
//# sourceMappingURL=renderer.js.map
|