ruiyun-human 1.0.3 → 1.0.4
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/ruiyun-human.cjs.js +6 -3
- package/dist/ruiyun-human.es.js +6 -3
- package/dist/style.css +1 -1
- package/package.json +3 -3
- package/dist/human-woman.png +0 -0
package/dist/ruiyun-human.cjs.js
CHANGED
|
@@ -449,7 +449,7 @@ const _sfc_main = {
|
|
|
449
449
|
const width = image.width * scale;
|
|
450
450
|
const height = image.height * scale;
|
|
451
451
|
const x = (canvas.width - width) / 2;
|
|
452
|
-
const y =
|
|
452
|
+
const y = canvas.height - height;
|
|
453
453
|
ctx.value.drawImage(image, x, y, width, height);
|
|
454
454
|
};
|
|
455
455
|
const stop = () => {
|
|
@@ -457,6 +457,10 @@ const _sfc_main = {
|
|
|
457
457
|
cancelAnimationFrame(animationId.value);
|
|
458
458
|
animationId.value = null;
|
|
459
459
|
}
|
|
460
|
+
try {
|
|
461
|
+
currentAudio.value.pause();
|
|
462
|
+
} catch (error) {
|
|
463
|
+
}
|
|
460
464
|
frameIndex.value = 1;
|
|
461
465
|
animationState.value = "standby";
|
|
462
466
|
};
|
|
@@ -612,7 +616,6 @@ const _sfc_main = {
|
|
|
612
616
|
canvas.style.width = width + "px";
|
|
613
617
|
canvas.style.height = height + "px";
|
|
614
618
|
ctx.value = canvas.getContext("2d");
|
|
615
|
-
ctx.value.scale(dpr, dpr);
|
|
616
619
|
loadFrames();
|
|
617
620
|
waitFramesLoaded(() => {
|
|
618
621
|
draw(frames.value.standby[0]);
|
|
@@ -882,7 +885,7 @@ const _sfc_main = {
|
|
|
882
885
|
};
|
|
883
886
|
}
|
|
884
887
|
};
|
|
885
|
-
const DigitalHuman = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
888
|
+
const DigitalHuman = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-dd386539"]]);
|
|
886
889
|
DigitalHuman.install = (app) => app.component("DigitalHuman", DigitalHuman);
|
|
887
890
|
const components = [DemoButton, DemoInput, DigitalHuman];
|
|
888
891
|
const install = (app) => {
|
package/dist/ruiyun-human.es.js
CHANGED
|
@@ -447,7 +447,7 @@ const _sfc_main = {
|
|
|
447
447
|
const width = image.width * scale;
|
|
448
448
|
const height = image.height * scale;
|
|
449
449
|
const x = (canvas.width - width) / 2;
|
|
450
|
-
const y =
|
|
450
|
+
const y = canvas.height - height;
|
|
451
451
|
ctx.value.drawImage(image, x, y, width, height);
|
|
452
452
|
};
|
|
453
453
|
const stop = () => {
|
|
@@ -455,6 +455,10 @@ const _sfc_main = {
|
|
|
455
455
|
cancelAnimationFrame(animationId.value);
|
|
456
456
|
animationId.value = null;
|
|
457
457
|
}
|
|
458
|
+
try {
|
|
459
|
+
currentAudio.value.pause();
|
|
460
|
+
} catch (error) {
|
|
461
|
+
}
|
|
458
462
|
frameIndex.value = 1;
|
|
459
463
|
animationState.value = "standby";
|
|
460
464
|
};
|
|
@@ -610,7 +614,6 @@ const _sfc_main = {
|
|
|
610
614
|
canvas.style.width = width + "px";
|
|
611
615
|
canvas.style.height = height + "px";
|
|
612
616
|
ctx.value = canvas.getContext("2d");
|
|
613
|
-
ctx.value.scale(dpr, dpr);
|
|
614
617
|
loadFrames();
|
|
615
618
|
waitFramesLoaded(() => {
|
|
616
619
|
draw(frames.value.standby[0]);
|
|
@@ -880,7 +883,7 @@ const _sfc_main = {
|
|
|
880
883
|
};
|
|
881
884
|
}
|
|
882
885
|
};
|
|
883
|
-
const DigitalHuman = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
886
|
+
const DigitalHuman = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-dd386539"]]);
|
|
884
887
|
DigitalHuman.install = (app) => app.component("DigitalHuman", DigitalHuman);
|
|
885
888
|
const components = [DemoButton, DemoInput, DigitalHuman];
|
|
886
889
|
const install = (app) => {
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.demo-btn[data-v-9a48516a]{padding:6px 14px;border-radius:4px;border:none;cursor:pointer;font-size:14px}.primary[data-v-9a48516a]{background:#409eff;color:#fff}.success[data-v-9a48516a]{background:#67c23a;color:#fff}.warning[data-v-9a48516a]{background:#e6a23c;color:#fff}.demo-input-wrap[data-v-28a3493c]{display:inline-flex;align-items:center;border:1px solid #dcdcdc;border-radius:4px;padding:0 10px}.demo-input-wrap[data-v-28a3493c]:focus-within{border-color:#409eff}.demo-input[data-v-28a3493c]{border:none;outline:none;padding:8px 6px;flex:1}.prefix[data-v-28a3493c],.suffix[data-v-28a3493c]{color:#909399}.digital-human[data-v-
|
|
1
|
+
.demo-btn[data-v-9a48516a]{padding:6px 14px;border-radius:4px;border:none;cursor:pointer;font-size:14px}.primary[data-v-9a48516a]{background:#409eff;color:#fff}.success[data-v-9a48516a]{background:#67c23a;color:#fff}.warning[data-v-9a48516a]{background:#e6a23c;color:#fff}.demo-input-wrap[data-v-28a3493c]{display:inline-flex;align-items:center;border:1px solid #dcdcdc;border-radius:4px;padding:0 10px}.demo-input-wrap[data-v-28a3493c]:focus-within{border-color:#409eff}.demo-input[data-v-28a3493c]{border:none;outline:none;padding:8px 6px;flex:1}.prefix[data-v-28a3493c],.suffix[data-v-28a3493c]{color:#909399}.digital-human[data-v-dd386539]{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.digital-human canvas[data-v-dd386539]{max-width:100%;max-height:100%}
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ruiyun-human",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "数字人初步实现",
|
|
6
|
-
"main": "./dist/ruiyun-human.
|
|
6
|
+
"main": "./dist/ruiyun-human.cjs.js",
|
|
7
7
|
"module": "./dist/ruiyun-human.es.js",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
10
|
"import": "./dist/ruiyun-human.es.js",
|
|
11
|
-
"require": "./dist/ruiyun-human.
|
|
11
|
+
"require": "./dist/ruiyun-human.cjs.js"
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"files": [
|
package/dist/human-woman.png
DELETED
|
Binary file
|