@memori.ai/memori-react 7.7.0 → 7.8.0-rc.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/CHANGELOG.md +34 -0
- package/dist/components/Avatar/Avatar.js +2 -2
- package/dist/components/Avatar/Avatar.js.map +1 -1
- package/dist/components/Avatar/AvatarView/AvatarComponent/avatarComponent.d.ts +2 -0
- package/dist/components/Avatar/AvatarView/AvatarComponent/avatarComponent.js +2 -2
- package/dist/components/Avatar/AvatarView/AvatarComponent/avatarComponent.js.map +1 -1
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/fullbodyAvatar.d.ts +2 -0
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/fullbodyAvatar.js +1 -1
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/fullbodyAvatar.js.map +1 -1
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/halfbodyAvatar.d.ts +3 -1
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/halfbodyAvatar.js +77 -50
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/halfbodyAvatar.js.map +1 -1
- package/dist/components/Avatar/AvatarView/index.d.ts +3 -1
- package/dist/components/Avatar/AvatarView/index.js +2 -2
- package/dist/components/Avatar/AvatarView/index.js.map +1 -1
- package/dist/components/MemoriWidget/MemoriWidget.js +127 -113
- package/dist/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/dist/components/layouts/ZoomedFullBody.js +1 -8
- package/dist/components/layouts/ZoomedFullBody.js.map +1 -1
- package/dist/components/layouts/zoomed-full-body.css +6 -2
- package/dist/context/visemeContext.d.ts +1 -0
- package/dist/context/visemeContext.js +19 -9
- package/dist/context/visemeContext.js.map +1 -1
- package/dist/styles.css +0 -1
- package/esm/components/Avatar/Avatar.js +2 -2
- package/esm/components/Avatar/Avatar.js.map +1 -1
- package/esm/components/Avatar/AvatarView/AvatarComponent/avatarComponent.d.ts +2 -0
- package/esm/components/Avatar/AvatarView/AvatarComponent/avatarComponent.js +2 -2
- package/esm/components/Avatar/AvatarView/AvatarComponent/avatarComponent.js.map +1 -1
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/fullbodyAvatar.d.ts +2 -0
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/fullbodyAvatar.js +1 -1
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/fullbodyAvatar.js.map +1 -1
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/halfbodyAvatar.d.ts +3 -1
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/halfbodyAvatar.js +81 -53
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/halfbodyAvatar.js.map +1 -1
- package/esm/components/Avatar/AvatarView/index.d.ts +3 -1
- package/esm/components/Avatar/AvatarView/index.js +2 -2
- package/esm/components/Avatar/AvatarView/index.js.map +1 -1
- package/esm/components/MemoriWidget/MemoriWidget.js +127 -113
- package/esm/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/esm/components/layouts/ZoomedFullBody.js +1 -8
- package/esm/components/layouts/ZoomedFullBody.js.map +1 -1
- package/esm/components/layouts/zoomed-full-body.css +6 -2
- package/esm/context/visemeContext.d.ts +1 -0
- package/esm/context/visemeContext.js +20 -10
- package/esm/context/visemeContext.js.map +1 -1
- package/esm/styles.css +0 -1
- package/package.json +1 -1
- package/src/components/Avatar/Avatar.stories.tsx +5 -7
- package/src/components/Avatar/Avatar.tsx +3 -1
- package/src/components/Avatar/AvatarView/AvatarComponent/avatarComponent.tsx +13 -0
- package/src/components/Avatar/AvatarView/AvatarComponent/components/fullbodyAvatar.tsx +3 -1
- package/src/components/Avatar/AvatarView/AvatarComponent/components/halfbodyAvatar.tsx +116 -65
- package/src/components/Avatar/AvatarView/AvatarView.stories.tsx +12 -36
- package/src/components/Avatar/AvatarView/index.tsx +6 -0
- package/src/components/MemoriWidget/MemoriWidget.tsx +164 -136
- package/src/components/layouts/ZoomedFullBody.test.tsx +1 -1
- package/src/components/layouts/ZoomedFullBody.tsx +4 -9
- package/src/components/layouts/zoomed-full-body.css +6 -2
- package/src/context/visemeContext.tsx +104 -70
- package/src/index.stories.tsx +23 -21
- package/src/styles.css +0 -1
- package/dist/components/AttachmentMediaModal/AttachmentMediaModal.d.ts +0 -14
- package/dist/components/AttachmentMediaModal/AttachmentMediaModal.js +0 -66
- package/dist/components/AttachmentMediaModal/AttachmentMediaModal.js.map +0 -1
- package/dist/components/Avatar/AvatarView/components/controls.d.ts +0 -23
- package/dist/components/Avatar/AvatarView/components/controls.js +0 -55
- package/dist/components/Avatar/AvatarView/components/controls.js.map +0 -1
- package/dist/components/Avatar/AvatarView/components/fullbodyAvatar.d.ts +0 -19
- package/dist/components/Avatar/AvatarView/components/fullbodyAvatar.js +0 -61
- package/dist/components/Avatar/AvatarView/components/fullbodyAvatar.js.map +0 -1
- package/dist/components/Avatar/AvatarView/components/halfbodyAvatar.d.ts +0 -9
- package/dist/components/Avatar/AvatarView/components/halfbodyAvatar.js +0 -39
- package/dist/components/Avatar/AvatarView/components/halfbodyAvatar.js.map +0 -1
- package/dist/components/Avatar/AvatarView/components/loader.d.ts +0 -5
- package/dist/components/Avatar/AvatarView/components/loader.js +0 -12
- package/dist/components/Avatar/AvatarView/components/loader.js.map +0 -1
- package/dist/components/Avatar/AvatarView/utils/useMouthSpeaking.d.ts +0 -2
- package/dist/components/Avatar/AvatarView/utils/useMouthSpeaking.js +0 -68
- package/dist/components/Avatar/AvatarView/utils/useMouthSpeaking.js.map +0 -1
- package/dist/components/AvatarView/components/avatar.d.ts +0 -9
- package/dist/components/AvatarView/components/avatar.js +0 -35
- package/dist/components/AvatarView/components/avatar.js.map +0 -1
- package/dist/components/AvatarView/components/fullbodyAvatar.d.ts +0 -10
- package/dist/components/AvatarView/components/fullbodyAvatar.js +0 -62
- package/dist/components/AvatarView/components/fullbodyAvatar.js.map +0 -1
- package/dist/components/AvatarView/components/loader.d.ts +0 -5
- package/dist/components/AvatarView/components/loader.js +0 -12
- package/dist/components/AvatarView/components/loader.js.map +0 -1
- package/dist/components/AvatarView/index.d.ts +0 -17
- package/dist/components/AvatarView/index.js +0 -35
- package/dist/components/AvatarView/index.js.map +0 -1
- package/dist/components/AvatarView/utils/useEyeBlink.d.ts +0 -2
- package/dist/components/AvatarView/utils/useEyeBlink.js +0 -40
- package/dist/components/AvatarView/utils/useEyeBlink.js.map +0 -1
- package/dist/components/AvatarView/utils/useHeadMovement.d.ts +0 -2
- package/dist/components/AvatarView/utils/useHeadMovement.js +0 -53
- package/dist/components/AvatarView/utils/useHeadMovement.js.map +0 -1
- package/dist/components/AvatarView/utils/useLoadingMorphAnim.d.ts +0 -2
- package/dist/components/AvatarView/utils/useLoadingMorphAnim.js +0 -34
- package/dist/components/AvatarView/utils/useLoadingMorphAnim.js.map +0 -1
- package/dist/components/AvatarView/utils/useMouthSpeaking.d.ts +0 -2
- package/dist/components/AvatarView/utils/useMouthSpeaking.js +0 -60
- package/dist/components/AvatarView/utils/useMouthSpeaking.js.map +0 -1
- package/dist/components/AvatarView/utils/useSmile.d.ts +0 -2
- package/dist/components/AvatarView/utils/useSmile.js +0 -30
- package/dist/components/AvatarView/utils/useSmile.js.map +0 -1
- package/dist/components/AvatarView/utils/utils.d.ts +0 -13
- package/dist/components/AvatarView/utils/utils.js +0 -42
- package/dist/components/AvatarView/utils/utils.js.map +0 -1
- package/dist/components/ImageUpload/ImageUpload.css +0 -168
- package/dist/components/ImageUpload/ImageUpload.d.ts +0 -28
- package/dist/components/ImageUpload/ImageUpload.js +0 -163
- package/dist/components/ImageUpload/ImageUpload.js.map +0 -1
- package/dist/components/layouts/Default.d.ts +0 -17
- package/dist/components/layouts/Default.js +0 -8
- package/dist/components/layouts/Default.js.map +0 -1
- package/dist/components/ui/Message.d.ts +0 -17
- package/dist/components/ui/Message.js +0 -13
- package/dist/components/ui/Message.js.map +0 -1
- package/esm/components/AttachmentMediaModal/AttachmentMediaModal.d.ts +0 -14
- package/esm/components/AttachmentMediaModal/AttachmentMediaModal.js +0 -63
- package/esm/components/AttachmentMediaModal/AttachmentMediaModal.js.map +0 -1
- package/esm/components/Avatar/AvatarView/components/controls.d.ts +0 -23
- package/esm/components/Avatar/AvatarView/components/controls.js +0 -52
- package/esm/components/Avatar/AvatarView/components/controls.js.map +0 -1
- package/esm/components/Avatar/AvatarView/components/fullbodyAvatar.d.ts +0 -19
- package/esm/components/Avatar/AvatarView/components/fullbodyAvatar.js +0 -57
- package/esm/components/Avatar/AvatarView/components/fullbodyAvatar.js.map +0 -1
- package/esm/components/Avatar/AvatarView/components/halfbodyAvatar.d.ts +0 -9
- package/esm/components/Avatar/AvatarView/components/halfbodyAvatar.js +0 -35
- package/esm/components/Avatar/AvatarView/components/halfbodyAvatar.js.map +0 -1
- package/esm/components/Avatar/AvatarView/components/loader.d.ts +0 -5
- package/esm/components/Avatar/AvatarView/components/loader.js +0 -9
- package/esm/components/Avatar/AvatarView/components/loader.js.map +0 -1
- package/esm/components/Avatar/AvatarView/utils/useMouthSpeaking.d.ts +0 -2
- package/esm/components/Avatar/AvatarView/utils/useMouthSpeaking.js +0 -65
- package/esm/components/Avatar/AvatarView/utils/useMouthSpeaking.js.map +0 -1
- package/esm/components/AvatarView/components/avatar.d.ts +0 -9
- package/esm/components/AvatarView/components/avatar.js +0 -31
- package/esm/components/AvatarView/components/avatar.js.map +0 -1
- package/esm/components/AvatarView/components/fullbodyAvatar.d.ts +0 -10
- package/esm/components/AvatarView/components/fullbodyAvatar.js +0 -58
- package/esm/components/AvatarView/components/fullbodyAvatar.js.map +0 -1
- package/esm/components/AvatarView/components/loader.d.ts +0 -5
- package/esm/components/AvatarView/components/loader.js +0 -9
- package/esm/components/AvatarView/components/loader.js.map +0 -1
- package/esm/components/AvatarView/index.d.ts +0 -17
- package/esm/components/AvatarView/index.js +0 -31
- package/esm/components/AvatarView/index.js.map +0 -1
- package/esm/components/AvatarView/utils/useEyeBlink.d.ts +0 -2
- package/esm/components/AvatarView/utils/useEyeBlink.js +0 -37
- package/esm/components/AvatarView/utils/useEyeBlink.js.map +0 -1
- package/esm/components/AvatarView/utils/useHeadMovement.d.ts +0 -2
- package/esm/components/AvatarView/utils/useHeadMovement.js +0 -50
- package/esm/components/AvatarView/utils/useHeadMovement.js.map +0 -1
- package/esm/components/AvatarView/utils/useLoadingMorphAnim.d.ts +0 -2
- package/esm/components/AvatarView/utils/useLoadingMorphAnim.js +0 -31
- package/esm/components/AvatarView/utils/useLoadingMorphAnim.js.map +0 -1
- package/esm/components/AvatarView/utils/useMouthSpeaking.d.ts +0 -2
- package/esm/components/AvatarView/utils/useMouthSpeaking.js +0 -57
- package/esm/components/AvatarView/utils/useMouthSpeaking.js.map +0 -1
- package/esm/components/AvatarView/utils/useSmile.d.ts +0 -2
- package/esm/components/AvatarView/utils/useSmile.js +0 -27
- package/esm/components/AvatarView/utils/useSmile.js.map +0 -1
- package/esm/components/AvatarView/utils/utils.d.ts +0 -13
- package/esm/components/AvatarView/utils/utils.js +0 -33
- package/esm/components/AvatarView/utils/utils.js.map +0 -1
- package/esm/components/ImageUpload/ImageUpload.css +0 -168
- package/esm/components/ImageUpload/ImageUpload.d.ts +0 -28
- package/esm/components/ImageUpload/ImageUpload.js +0 -160
- package/esm/components/ImageUpload/ImageUpload.js.map +0 -1
- package/esm/components/layouts/Default.d.ts +0 -17
- package/esm/components/layouts/Default.js +0 -5
- package/esm/components/layouts/Default.js.map +0 -1
- package/esm/components/ui/Message.d.ts +0 -17
- package/esm/components/ui/Message.js +0 -10
- package/esm/components/ui/Message.js.map +0 -1
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const drei_1 = require("@react-three/drei");
|
|
6
|
-
const Spin_1 = tslib_1.__importDefault(require("../../ui/Spin"));
|
|
7
|
-
const Loader = ({ fallbackImg }) => {
|
|
8
|
-
const { progress } = (0, drei_1.useProgress)();
|
|
9
|
-
return ((0, jsx_runtime_1.jsx)(drei_1.Html, { center: true, className: "avatar-loader", children: (0, jsx_runtime_1.jsx)(Spin_1.default, { spinning: true, children: fallbackImg ? ((0, jsx_runtime_1.jsxs)("figure", { children: [(0, jsx_runtime_1.jsx)("img", { src: fallbackImg, alt: `${Math.round(progress)}% loaded`, title: `${Math.round(progress)}% loaded` }), (0, jsx_runtime_1.jsx)("figcaption", { children: `${Math.round(progress)}%` })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [Math.round(progress), " % loaded"] })) }) }));
|
|
10
|
-
};
|
|
11
|
-
exports.default = Loader;
|
|
12
|
-
//# sourceMappingURL=loader.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"loader.js","sourceRoot":"","sources":["../../../../src/components/AvatarView/components/loader.tsx"],"names":[],"mappings":";;;;AACA,4CAAsD;AACtD,iEAAiC;AAMjC,MAAM,MAAM,GAAG,CAAC,EAAE,WAAW,EAAS,EAAE,EAAE;IACxC,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAA,kBAAW,GAAE,CAAC;IACnC,OAAO,CACL,uBAAC,WAAI,IAAC,MAAM,QAAC,SAAS,EAAC,eAAe,YACpC,uBAAC,cAAI,IAAC,QAAQ,kBACX,WAAW,CAAC,CAAC,CAAC,CACb,+CACE,gCACE,GAAG,EAAE,WAAW,EAChB,GAAG,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,UAAU,EACtC,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,UAAU,GACxC,EACF,iDAAa,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,GAAc,IAC9C,CACV,CAAC,CAAC,CAAC,CACF,6DAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,iBAAa,CACrC,GACI,GACF,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,MAAM,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { CSSProperties } from 'react';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { AvatarProps } from './components/fullbodyAvatar';
|
|
4
|
-
export interface Props {
|
|
5
|
-
url: string;
|
|
6
|
-
sex: 'MALE' | 'FEMALE';
|
|
7
|
-
fallbackImg?: string;
|
|
8
|
-
eyeBlink?: boolean;
|
|
9
|
-
headMovement?: boolean;
|
|
10
|
-
rotateAvatar?: boolean;
|
|
11
|
-
speaking?: boolean;
|
|
12
|
-
style?: CSSProperties;
|
|
13
|
-
fallback?: React.ReactNode;
|
|
14
|
-
halfBody?: boolean;
|
|
15
|
-
animation?: AvatarProps['animation'];
|
|
16
|
-
}
|
|
17
|
-
export default function AvatarView({ url, sex, fallbackImg, style, rotateAvatar, eyeBlink, headMovement, speaking, fallback, halfBody, animation, }: Props): JSX.Element;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
const avatar_1 = tslib_1.__importDefault(require("./components/avatar"));
|
|
7
|
-
const fullbodyAvatar_1 = tslib_1.__importDefault(require("./components/fullbodyAvatar"));
|
|
8
|
-
const loader_1 = tslib_1.__importDefault(require("./components/loader"));
|
|
9
|
-
const fiber_1 = require("@react-three/fiber");
|
|
10
|
-
const drei_1 = require("@react-three/drei");
|
|
11
|
-
const utils_1 = require("../../helpers/utils");
|
|
12
|
-
const defaultStylesHalfBody = {
|
|
13
|
-
width: '250px',
|
|
14
|
-
height: '250px',
|
|
15
|
-
backgroundColor: 'white',
|
|
16
|
-
borderRadius: '100%',
|
|
17
|
-
};
|
|
18
|
-
const defaultStylesFullBody = {
|
|
19
|
-
width: '500px',
|
|
20
|
-
height: '500px',
|
|
21
|
-
backgroundColor: 'white',
|
|
22
|
-
};
|
|
23
|
-
function AvatarView({ url, sex, fallbackImg, style, rotateAvatar, eyeBlink, headMovement, speaking, fallback, halfBody = true, animation, }) {
|
|
24
|
-
const defaultStyles = halfBody
|
|
25
|
-
? defaultStylesHalfBody
|
|
26
|
-
: defaultStylesFullBody;
|
|
27
|
-
return ((0, jsx_runtime_1.jsx)(fiber_1.Canvas, { style: style || defaultStyles, camera: halfBody
|
|
28
|
-
? {
|
|
29
|
-
fov: 40,
|
|
30
|
-
position: [0, 0, 0.6],
|
|
31
|
-
}
|
|
32
|
-
: { fov: 40, position: [0, 0.0000175, 3] }, children: (0, jsx_runtime_1.jsxs)(react_1.Suspense, { fallback: fallback || (0, jsx_runtime_1.jsx)(loader_1.default, { fallbackImg: fallbackImg }), children: [(0, utils_1.isAndroid)() || (0, utils_1.isiOS)() ? ((0, jsx_runtime_1.jsx)(drei_1.SpotLight, { distance: 100, position: [-0.3, 0.2, 1.25], angle: Math.PI / 2, attenuation: 5, anglePower: 5 })) : ((0, jsx_runtime_1.jsx)(drei_1.Environment, { files: "https://raw.githack.com/pmndrs/drei-assets/456060a26bbeb8fdf79326f224b6d99b8bcce736/hdri/venice_sunset_1k.hdr" })), rotateAvatar && halfBody && ((0, jsx_runtime_1.jsx)(drei_1.OrbitControls, { enablePan: false, enableZoom: false })), halfBody ? ((0, jsx_runtime_1.jsx)(avatar_1.default, { url: url, eyeBlink: eyeBlink, headMovement: headMovement, speaking: speaking })) : ((0, jsx_runtime_1.jsx)(fullbodyAvatar_1.default, { url: url, sex: sex, eyeBlink: eyeBlink, headMovement: headMovement, speaking: speaking, animation: animation }))] }) }));
|
|
33
|
-
}
|
|
34
|
-
exports.default = AvatarView;
|
|
35
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/AvatarView/index.tsx"],"names":[],"mappings":";;;;AACA,iCAAwC;AAC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ClB,WAAW,EAAE,CAAC,EACd,UAAU,EAAE,CAAC,GACb,CACH,CAAC,CAAC,CAAC,CACF,uBAAC,kBAAW,IAAC,KAAK,EAAC,+GAA+G,GAAG,CACtI,EACA,YAAY,IAAI,QAAQ,IAAI,CAC3B,uBAAC,oBAAa,IAAC,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,GAAI,CACvD,EACA,QAAQ,CAAC,CAAC,CAAC,CACV,uBAAC,gBAAM,IACL,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAC,CAAC,CAAC,CACF,uBAAC,wBAAc,IACb,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,SAAS,GACpB,CACH,IACQ,GACJ,CACV,CAAC;AACJ,CAAC;AAhED,6BAgEC"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const react_1 = require("react");
|
|
4
|
-
const fiber_1 = require("@react-three/fiber");
|
|
5
|
-
let blinkTime = 999;
|
|
6
|
-
let timeout;
|
|
7
|
-
let headMesh;
|
|
8
|
-
let morphIndex = 0;
|
|
9
|
-
const setNextBlink = () => {
|
|
10
|
-
blinkTime = 0;
|
|
11
|
-
timeout = setTimeout(setNextBlink, Math.random() * 5000 + 2000);
|
|
12
|
-
};
|
|
13
|
-
function useEyeBlink(enabled, nodes) {
|
|
14
|
-
(0, react_1.useEffect)(() => {
|
|
15
|
-
if (!enabled)
|
|
16
|
-
return;
|
|
17
|
-
headMesh = (nodes.Wolf3D_Head || nodes.Wolf3D_Avatar);
|
|
18
|
-
if ((headMesh === null || headMesh === void 0 ? void 0 : headMesh.morphTargetDictionary) && (headMesh === null || headMesh === void 0 ? void 0 : headMesh.morphTargetInfluences)) {
|
|
19
|
-
morphIndex = headMesh.morphTargetDictionary.eyesClosed;
|
|
20
|
-
}
|
|
21
|
-
timeout = setTimeout(setNextBlink, 3000);
|
|
22
|
-
return () => {
|
|
23
|
-
clearTimeout(timeout);
|
|
24
|
-
};
|
|
25
|
-
}, [nodes, enabled]);
|
|
26
|
-
(0, fiber_1.useFrame)((_, delta) => {
|
|
27
|
-
if (!enabled)
|
|
28
|
-
return;
|
|
29
|
-
if (blinkTime < 2 && (headMesh === null || headMesh === void 0 ? void 0 : headMesh.morphTargetInfluences)) {
|
|
30
|
-
let value = Math.abs(Math.sin((blinkTime * Math.PI) / 2));
|
|
31
|
-
blinkTime += delta * 10;
|
|
32
|
-
headMesh.morphTargetInfluences[morphIndex] = value;
|
|
33
|
-
}
|
|
34
|
-
else if (headMesh === null || headMesh === void 0 ? void 0 : headMesh.morphTargetInfluences) {
|
|
35
|
-
headMesh.morphTargetInfluences[morphIndex] = 0;
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
exports.default = useEyeBlink;
|
|
40
|
-
//# sourceMappingURL=useEyeBlink.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useEyeBlink.js","sourceRoot":"","sources":["../../../../src/components/AvatarView/utils/useEyeBlink.ts"],"names":[],"mappings":";;AAEA,iCAAkC;AAClC,8CAA8C;AAE9C,IAAI,SAAS,GAAW,GAAG,CAAC;AAC5B,IAAI,OAAuB,CAAC;AAE5B,IAAI,QAAqB,CAAC;AAC1B,IAAI,UAAU,GAAW,CAAC,CAAC;AAE3B,MAAM,YAAY,GAAG,GAAG,EAAE;IACxB,SAAS,GAAG,CAAC,CAAC;IACd,OAAO,GAAG,UAAU,CAAC,YAAY,EAAE,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;AAClE,CAAC,CAAC;AAEF,SAAwB,WAAW,CACjC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,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const three_1 = require("three");
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
const utils_1 = require("./utils");
|
|
6
|
-
const fiber_1 = require("@react-three/fiber");
|
|
7
|
-
const rad = Math.PI / 180;
|
|
8
|
-
let reset = false;
|
|
9
|
-
let timeout;
|
|
10
|
-
const targetPos = new three_1.Vector2(0, 0);
|
|
11
|
-
const currentPos = new three_1.Vector2(0, 0);
|
|
12
|
-
const setResetTrue = () => {
|
|
13
|
-
timeout = setTimeout(() => {
|
|
14
|
-
reset = true;
|
|
15
|
-
}, 1000);
|
|
16
|
-
};
|
|
17
|
-
const setResetFalse = () => {
|
|
18
|
-
clearTimeout(timeout);
|
|
19
|
-
reset = false;
|
|
20
|
-
};
|
|
21
|
-
function useHeadMovement(enabled, nodes) {
|
|
22
|
-
const { gl } = (0, fiber_1.useThree)();
|
|
23
|
-
(0, react_1.useEffect)(() => {
|
|
24
|
-
if (!enabled)
|
|
25
|
-
return;
|
|
26
|
-
gl.domElement.addEventListener('mouseleave', setResetTrue);
|
|
27
|
-
gl.domElement.addEventListener('mouseenter', setResetFalse);
|
|
28
|
-
return () => {
|
|
29
|
-
gl.domElement.removeEventListener('mouseleave', setResetTrue);
|
|
30
|
-
gl.domElement.removeEventListener('mouseenter', setResetFalse);
|
|
31
|
-
};
|
|
32
|
-
}, [gl.domElement, enabled]);
|
|
33
|
-
(0, fiber_1.useFrame)(state => {
|
|
34
|
-
if (!enabled || !(nodes === null || nodes === void 0 ? void 0 : nodes.Neck) || !(nodes === null || nodes === void 0 ? void 0 : nodes.Head))
|
|
35
|
-
return;
|
|
36
|
-
const cameraRotation = Math.abs(state.camera.rotation.z);
|
|
37
|
-
if (!reset && cameraRotation < 0.2) {
|
|
38
|
-
targetPos.x = (0, utils_1.mapRange)(state.mouse.y, -1, 1, 5 * rad, -5 * rad);
|
|
39
|
-
targetPos.y = (0, utils_1.mapRange)(state.mouse.x, -1, 1, -10 * rad, 10 * rad);
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
targetPos.set(0, 0);
|
|
43
|
-
}
|
|
44
|
-
currentPos.x = (0, utils_1.lerp)(currentPos.x, targetPos.x);
|
|
45
|
-
currentPos.y = (0, utils_1.lerp)(currentPos.y, targetPos.y);
|
|
46
|
-
nodes.Neck.rotation.x = currentPos.x + 0.1;
|
|
47
|
-
nodes.Neck.rotation.y = currentPos.y;
|
|
48
|
-
nodes.Head.rotation.x = currentPos.x * 2;
|
|
49
|
-
nodes.Head.rotation.y = currentPos.y * 2;
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
exports.default = useHeadMovement;
|
|
53
|
-
//# sourceMappingURL=useHeadMovement.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useHeadMovement.js","sourceRoot":"","sources":["../../../../src/components/AvatarView/utils/useHeadMovement.ts"],"names":[],"mappings":";;AACA,iCAAgC;AAChC,iCAAkC;AAClC,mCAAyC;AACzC,8CAAwD;AAExD,MAAM,GAAG,GAAG,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC;AAG1B,IAAI,KAAK,GAAY,KAAK,CAAC;AAC3B,IAAI,OAAuB,CAAC;AAE5B,MAAM,SAAS,GAAG,IAAI,eAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACpC,MAAM,UAAU,GAAG,IAAI,eAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAErC,MAAM,YAAY,GAAG,GAAG,EAAE;IACxB,OAAO,GAAG,UAAU,CAAC,GAAG,EAAE;QACxB,KAAK,GAAG,IAAI,CAAC;IACf,CAAC,EAAE,IAAI,CAAC,CAAC;AACX,CAAC,CAAC;AAEF,MAAM,aAAa,GAAG,GAAG,EAAE;IACzB,YAAY,CAAC,OAAO,CAAC,CAAC;IACtB,KAAK,GAAG,KAAK,CAAC;AAChB,CAAC,CAAC;AAEF,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AC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,GAAG,EAAE,EAAE,GAAG,GAAG,CAAC,CAAC;SACnE;aAAM;YACL,SAAS,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;SACrB;QAED,UAAU,CAAC,CAAC,GAAG,IAAA,YAAI,EAAC,UAAU,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;QAC/C,UAAU,CAAC,CAAC,GAAG,IAAA,YAAI,EAAC,UAAU,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;QAE/C,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,GAAG,GAAG,CAAC;QAC3C,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC;QAErC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC;QACzC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC;IAO3C,CAAC,CAAC,CAAC;AACL,CAAC;AA7CD,kCA6CC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const react_1 = require("react");
|
|
4
|
-
const fiber_1 = require("@react-three/fiber");
|
|
5
|
-
let headMesh;
|
|
6
|
-
let eyesClosedMorphIndex = 0;
|
|
7
|
-
let viseme_UMorphIndex = 0;
|
|
8
|
-
function useLoadingMorphAnim(loading, nodes) {
|
|
9
|
-
(0, react_1.useEffect)(() => {
|
|
10
|
-
if (!loading)
|
|
11
|
-
return;
|
|
12
|
-
headMesh = (nodes.Wolf3D_Head ||
|
|
13
|
-
nodes.Wolf3D_Avatar ||
|
|
14
|
-
nodes.Wolf3D_Avatar001);
|
|
15
|
-
if ((headMesh === null || headMesh === void 0 ? void 0 : headMesh.morphTargetDictionary) && (headMesh === null || headMesh === void 0 ? void 0 : headMesh.morphTargetInfluences)) {
|
|
16
|
-
eyesClosedMorphIndex = headMesh.morphTargetDictionary.mouthOpen;
|
|
17
|
-
viseme_UMorphIndex = headMesh.morphTargetDictionary.viseme_U;
|
|
18
|
-
}
|
|
19
|
-
}, [nodes, loading]);
|
|
20
|
-
(0, fiber_1.useFrame)(() => {
|
|
21
|
-
if (!loading) {
|
|
22
|
-
if (headMesh === null || headMesh === void 0 ? void 0 : headMesh.morphTargetInfluences) {
|
|
23
|
-
headMesh.morphTargetInfluences[eyesClosedMorphIndex] = 0;
|
|
24
|
-
headMesh.morphTargetInfluences[viseme_UMorphIndex] = 0;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
else if (headMesh === null || headMesh === void 0 ? void 0 : headMesh.morphTargetInfluences) {
|
|
28
|
-
headMesh.morphTargetInfluences[eyesClosedMorphIndex] = 0.56;
|
|
29
|
-
headMesh.morphTargetInfluences[viseme_UMorphIndex] = 0.67;
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
exports.default = useLoadingMorphAnim;
|
|
34
|
-
//# sourceMappingURL=useLoadingMorphAnim.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useLoadingMorphAnim.js","sourceRoot":"","sources":["../../../../src/components/AvatarView/utils/useLoadingMorphAnim.ts"],"names":[],"mappings":";;AAEA,iCAAkC;AAClC,8CAA8C;AAE9C,IAAI,QAAqB,CAAC;AAC1B,IAAI,oBAAoB,GAAW,CAAC,CAAC;AACrC,IAAI,kBAAkB,GAAW,CAAC,CAAC;AAEnC,SAAwB,mBAAmB,CACzC,OAA4B,EAC5B,KAAY;IAEZ,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,CAAC,OAAO;YAAE,OAAO;QAErB,QAAQ,GAAG,CAAC,KAAK,CAAC,WAAW;YAC3B,KAAK,CAAC,aAAa;YACnB,KAAK,CAAC,gBAAgB,CAAgB,CAAC;QAEzC,IAAI,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,qBAAqB,MAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,qBAAqB,CAAA,EAAE;YACtE,oBAAoB,GAAG,QAAQ,CAAC,qBAAqB,CAAC,SAAS,CAAC;YAChE,kBAAkB,GAAG,QAAQ,CAAC,qBAAqB,CAAC,QAAQ,CAAC;SAC9D;IACH,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;IAErB,IAAA,gBAAQ,EAAC,GAAG,EAAE;QACZ,IAAI,CAAC,OAAO,EAAE;YACZ,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,qBAAqB,EAAE;gBACnC,QAAQ,CAAC,qBAAqB,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC;gBACzD,QAAQ,CAAC,qBAAqB,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC;aACxD;SACF;aAAM,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,qBAAqB,EAAE;YAC1C,QAAQ,CAAC,qBAAqB,CAAC,oBAAoB,CAAC,GAAG,IAAI,CAAC;YAC5D,QAAQ,CAAC,qBAAqB,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAAC;SAC3D;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AA5BD,sCA4BC"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const react_1 = require("react");
|
|
4
|
-
const fiber_1 = require("@react-three/fiber");
|
|
5
|
-
let mouthMoveTime = 999;
|
|
6
|
-
let timeout;
|
|
7
|
-
let mouthMesh;
|
|
8
|
-
let mouthOpenMorphIndex = 0;
|
|
9
|
-
let mouthSmileMorphIndex = 0;
|
|
10
|
-
let mouthFunnerMorphIndex = 0;
|
|
11
|
-
let mouthPuckerMorphIndex = 0;
|
|
12
|
-
const setNextMouthOpen = () => {
|
|
13
|
-
mouthMoveTime = 0;
|
|
14
|
-
timeout = setTimeout(setNextMouthOpen, Math.random() * 500);
|
|
15
|
-
};
|
|
16
|
-
function useMouthSpeaking(speaking, nodes) {
|
|
17
|
-
(0, react_1.useEffect)(() => {
|
|
18
|
-
if (!speaking)
|
|
19
|
-
return;
|
|
20
|
-
mouthMesh = (nodes.Wolf3D_Head ||
|
|
21
|
-
nodes.Wolf3D_Avatar ||
|
|
22
|
-
nodes.Wolf3D_Avatar001);
|
|
23
|
-
if ((mouthMesh === null || mouthMesh === void 0 ? void 0 : mouthMesh.morphTargetDictionary) && (mouthMesh === null || mouthMesh === void 0 ? void 0 : mouthMesh.morphTargetInfluences)) {
|
|
24
|
-
mouthOpenMorphIndex = mouthMesh.morphTargetDictionary.mouthOpen;
|
|
25
|
-
mouthSmileMorphIndex = mouthMesh.morphTargetDictionary.mouthSmile;
|
|
26
|
-
mouthFunnerMorphIndex = mouthMesh.morphTargetDictionary.mouthFunner;
|
|
27
|
-
mouthPuckerMorphIndex = mouthMesh.morphTargetDictionary.mouthPucker;
|
|
28
|
-
}
|
|
29
|
-
timeout = setTimeout(setNextMouthOpen, 200);
|
|
30
|
-
return () => {
|
|
31
|
-
clearTimeout(timeout);
|
|
32
|
-
};
|
|
33
|
-
}, [nodes, speaking]);
|
|
34
|
-
(0, fiber_1.useFrame)((_, delta) => {
|
|
35
|
-
if (!speaking) {
|
|
36
|
-
if (mouthMesh === null || mouthMesh === void 0 ? void 0 : mouthMesh.morphTargetInfluences) {
|
|
37
|
-
mouthMesh.morphTargetInfluences[mouthOpenMorphIndex] = 0;
|
|
38
|
-
mouthMesh.morphTargetInfluences[mouthSmileMorphIndex] = 0;
|
|
39
|
-
mouthMesh.morphTargetInfluences[mouthFunnerMorphIndex] = 0;
|
|
40
|
-
mouthMesh.morphTargetInfluences[mouthPuckerMorphIndex] = 0;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
else if (mouthMoveTime < 2 && (mouthMesh === null || mouthMesh === void 0 ? void 0 : mouthMesh.morphTargetInfluences)) {
|
|
44
|
-
let value = Math.abs(Math.sin((mouthMoveTime * Math.PI) / 2));
|
|
45
|
-
mouthMoveTime += delta * 10;
|
|
46
|
-
mouthMesh.morphTargetInfluences[mouthOpenMorphIndex] = value / 3;
|
|
47
|
-
mouthMesh.morphTargetInfluences[mouthSmileMorphIndex] = value / 10;
|
|
48
|
-
mouthMesh.morphTargetInfluences[mouthFunnerMorphIndex] = value / 7;
|
|
49
|
-
mouthMesh.morphTargetInfluences[mouthPuckerMorphIndex] = value / 5;
|
|
50
|
-
}
|
|
51
|
-
else if (mouthMesh === null || mouthMesh === void 0 ? void 0 : mouthMesh.morphTargetInfluences) {
|
|
52
|
-
mouthMesh.morphTargetInfluences[mouthOpenMorphIndex] = 0;
|
|
53
|
-
mouthMesh.morphTargetInfluences[mouthSmileMorphIndex] = 0;
|
|
54
|
-
mouthMesh.morphTargetInfluences[mouthFunnerMorphIndex] = 0;
|
|
55
|
-
mouthMesh.morphTargetInfluences[mouthPuckerMorphIndex] = 0;
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
exports.default = useMouthSpeaking;
|
|
60
|
-
//# sourceMappingURL=useMouthSpeaking.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useMouthSpeaking.js","sourceRoot":"","sources":["../../../../src/components/AvatarView/utils/useMouthSpeaking.ts"],"names":[],"mappings":";;AAEA,iCAAkC;AAClC,8CAA8C;AAE9C,IAAI,aAAa,GAAW,GAAG,CAAC;AAChC,IAAI,OAAuB,CAAC;AAE5B,IAAI,SAAsB,CAAC;AAC3B,IAAI,mBAAmB,GAAW,CAAC,CAAC;AACpC,IAAI,oBAAoB,GAAW,CAAC,CAAC;AACrC,IAAI,qBAAqB,GAAW,CAAC,CAAC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 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const react_1 = require("react");
|
|
4
|
-
const fiber_1 = require("@react-three/fiber");
|
|
5
|
-
let headMesh;
|
|
6
|
-
let mouthSmileMorphIndex = 0;
|
|
7
|
-
function useSmile(smiling, nodes) {
|
|
8
|
-
(0, react_1.useEffect)(() => {
|
|
9
|
-
if (!smiling)
|
|
10
|
-
return;
|
|
11
|
-
headMesh = (nodes.Wolf3D_Head ||
|
|
12
|
-
nodes.Wolf3D_Avatar ||
|
|
13
|
-
nodes.Wolf3D_Avatar001);
|
|
14
|
-
if ((headMesh === null || headMesh === void 0 ? void 0 : headMesh.morphTargetDictionary) && (headMesh === null || headMesh === void 0 ? void 0 : headMesh.morphTargetInfluences)) {
|
|
15
|
-
mouthSmileMorphIndex = headMesh.morphTargetDictionary.mouthSmile;
|
|
16
|
-
}
|
|
17
|
-
}, [nodes, smiling]);
|
|
18
|
-
(0, fiber_1.useFrame)(() => {
|
|
19
|
-
if (!smiling) {
|
|
20
|
-
if (headMesh === null || headMesh === void 0 ? void 0 : headMesh.morphTargetInfluences) {
|
|
21
|
-
headMesh.morphTargetInfluences[mouthSmileMorphIndex] = 0;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
else if (headMesh === null || headMesh === void 0 ? void 0 : headMesh.morphTargetInfluences) {
|
|
25
|
-
headMesh.morphTargetInfluences[mouthSmileMorphIndex] = 1 / 3;
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
exports.default = useSmile;
|
|
30
|
-
//# sourceMappingURL=useSmile.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useSmile.js","sourceRoot":"","sources":["../../../../src/components/AvatarView/utils/useSmile.ts"],"names":[],"mappings":";;AAEA,iCAAkC;AAClC,8CAA8C;AAE9C,IAAI,QAAqB,CAAC;AAC1B,IAAI,oBAAoB,GAAW,CAAC,CAAC;AAErC,SAAwB,QAAQ,CAAC,OAA4B,EAAE,KAAY;IACzE,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,CAAC,OAAO;YAAE,OAAO;QAErB,QAAQ,GAAG,CAAC,KAAK,CAAC,WAAW;YAC3B,KAAK,CAAC,aAAa;YACnB,KAAK,CAAC,gBAAgB,CAAgB,CAAC;QAEzC,IAAI,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,qBAAqB,MAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,qBAAqB,CAAA,EAAE;YACtE,oBAAoB,GAAG,QAAQ,CAAC,qBAAqB,CAAC,UAAU,CAAC;SAClE;IACH,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;IAErB,IAAA,gBAAQ,EAAC,GAAG,EAAE;QACZ,IAAI,CAAC,OAAO,EAAE;YACZ,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,qBAAqB,EAAE;gBACnC,QAAQ,CAAC,qBAAqB,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC;aAC1D;SACF;aAAM,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,qBAAqB,EAAE;YAC1C,QAAQ,CAAC,qBAAqB,CAAC,oBAAoB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;SAC9D;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAtBD,2BAsBC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Material, Object3D } from 'three';
|
|
2
|
-
export interface Nodes {
|
|
3
|
-
[name: string]: Object3D;
|
|
4
|
-
}
|
|
5
|
-
export interface Materials {
|
|
6
|
-
[name: string]: Material;
|
|
7
|
-
}
|
|
8
|
-
export declare const clamp: (value: number, min: number, max: number) => number;
|
|
9
|
-
export declare const lerp: (start: number, end: number, time?: number) => number;
|
|
10
|
-
export declare const mapRange: (value: number, inMin: number, inMax: number, outMin: number, outMax: number) => number;
|
|
11
|
-
export declare const hideHands: (nodes: Nodes) => void;
|
|
12
|
-
export declare const correctMaterials: (materials: Materials) => void;
|
|
13
|
-
export declare const isSkinnedMesh: (node: Object3D) => boolean;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isSkinnedMesh = exports.correctMaterials = exports.hideHands = exports.mapRange = exports.lerp = exports.clamp = void 0;
|
|
4
|
-
const three_1 = require("three");
|
|
5
|
-
const clamp = (value, min, max) => {
|
|
6
|
-
return Math.min(Math.max(value, min), max);
|
|
7
|
-
};
|
|
8
|
-
exports.clamp = clamp;
|
|
9
|
-
const lerp = (start, end, time = 0.05) => {
|
|
10
|
-
return start * (1 - time) + end * time;
|
|
11
|
-
};
|
|
12
|
-
exports.lerp = lerp;
|
|
13
|
-
const mapRange = (value, inMin, inMax, outMin, outMax) => {
|
|
14
|
-
value = (0, exports.clamp)(value, inMin, inMax);
|
|
15
|
-
return ((value - inMin) * (outMax - outMin)) / (inMax - inMin) + outMin;
|
|
16
|
-
};
|
|
17
|
-
exports.mapRange = mapRange;
|
|
18
|
-
const hideHands = (nodes) => {
|
|
19
|
-
if (nodes.Wolf3D_Hands) {
|
|
20
|
-
nodes.Wolf3D_Hands.visible = false;
|
|
21
|
-
}
|
|
22
|
-
if (nodes.RightHand && nodes.LeftHand) {
|
|
23
|
-
nodes.RightHand.position.set(0, -2, 0);
|
|
24
|
-
nodes.LeftHand.position.set(0, -2, 0);
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
exports.hideHands = hideHands;
|
|
28
|
-
const correctMaterials = (materials) => {
|
|
29
|
-
Object.values(materials).forEach((material) => {
|
|
30
|
-
if (material.map)
|
|
31
|
-
material.map.minFilter = three_1.LinearFilter;
|
|
32
|
-
if (material)
|
|
33
|
-
material.depthWrite = true;
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
exports.correctMaterials = correctMaterials;
|
|
37
|
-
const SkinnedMeshType = 'SkinnedMesh';
|
|
38
|
-
const isSkinnedMesh = (node) => {
|
|
39
|
-
return node.type === SkinnedMeshType;
|
|
40
|
-
};
|
|
41
|
-
exports.isSkinnedMesh = isSkinnedMesh;
|
|
42
|
-
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/components/AvatarView/utils/utils.ts"],"names":[],"mappings":";;;AACA,iCAAqC;AAU9B,MAAM,KAAK,GAAG,CAAC,KAAa,EAAE,GAAW,EAAE,GAAW,EAAE,EAAE;IAC/D,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;AAC7C,CAAC,CAAC;AAFW,QAAA,KAAK,SAEhB;AAEK,MAAM,IAAI,GAAG,CAAC,KAAa,EAAE,GAAW,EAAE,OAAe,IAAI,EAAE,EAAE;IACtE,OAAO,KAAK,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC;AACzC,CAAC,CAAC;AAFW,QAAA,IAAI,QAEf;AAEK,MAAM,QAAQ,GAAG,CACtB,KAAa,EACb,KAAa,EACb,KAAa,EACb,MAAc,EACd,MAAc,EACd,EAAE;IACF,KAAK,GAAG,IAAA,aAAK,EAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IACnC,OAAO,CAAC,CAAC,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC,GAAG,CAAC,KAAK,GAAG,KAAK,CAAC,GAAG,MAAM,CAAC;AAC1E,CAAC,CAAC;AATW,QAAA,QAAQ,YASnB;AAEK,MAAM,SAAS,GAAG,CAAC,KAAY,EAAE,EAAE;IACxC,IAAI,KAAK,CAAC,YAAY,EAAE;QACtB,KAAK,CAAC,YAAY,CAAC,OAAO,GAAG,KAAK,CAAC;KACpC;IAED,IAAI,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,QAAQ,EAAE;QACrC,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACvC,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;KACvC;AACH,CAAC,CAAC;AATW,QAAA,SAAS,aASpB;AAEK,MAAM,gBAAgB,GAAG,CAAC,SAAoB,EAAE,EAAE;IACvD,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC,QAAa,EAAE,EAAE;QAEjD,IAAI,QAAQ,CAAC,GAAG;YAAE,QAAQ,CAAC,GAAG,CAAC,SAAS,GAAG,oBAAY,CAAC;QAGxD,IAAI,QAAQ;YAAE,QAAQ,CAAC,UAAU,GAAG,IAAI,CAAC;IAC3C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AARW,QAAA,gBAAgB,oBAQ3B;AAEF,MAAM,eAAe,GAAG,aAAa,CAAC;AAC/B,MAAM,aAAa,GAAG,CAAC,IAAc,EAAE,EAAE;IAC9C,OAAO,IAAI,CAAC,IAAI,KAAK,eAAe,CAAC;AACvC,CAAC,CAAC;AAFW,QAAA,aAAa,iBAExB"}
|
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
legend.helper {
|
|
2
|
-
display: inline-block;
|
|
3
|
-
width: auto;
|
|
4
|
-
border: 0;
|
|
5
|
-
margin: 0;
|
|
6
|
-
margin-bottom: 1rem;
|
|
7
|
-
font-size: 0.9em;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
legend.helper p {
|
|
11
|
-
margin-bottom: 0;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.memori--upload .ant-upload-list-picture-card-container,
|
|
15
|
-
.memori--upload .ant-upload.ant-upload-select-picture-card {
|
|
16
|
-
width: auto;
|
|
17
|
-
min-width: 100px;
|
|
18
|
-
max-width: 200px;
|
|
19
|
-
height: auto;
|
|
20
|
-
min-height: 100px;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.memori--upload .ant-upload.ant-upload-select-picture-card {
|
|
24
|
-
flex-direction: column;
|
|
25
|
-
align-items: center;
|
|
26
|
-
justify-content: center;
|
|
27
|
-
padding: 2rem 1.5rem;
|
|
28
|
-
border: 2px var(--medium-gray) dashed;
|
|
29
|
-
border-radius: 7px;
|
|
30
|
-
background: none;
|
|
31
|
-
opacity: 0.7;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.memori--upload .ant-upload.ant-upload-select-picture-card .ant-upload {
|
|
35
|
-
transition: color 0.3s ease;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.memori--upload .ant-upload.ant-upload-select-picture-card:hover,
|
|
39
|
-
.memori--upload .ant-upload.ant-upload-select-picture-card:focus {
|
|
40
|
-
border-color: var(--memori-primary);
|
|
41
|
-
opacity: 1;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.memori--upload .ant-upload.ant-upload-select-picture-card:hover .ant-upload,
|
|
45
|
-
.memori--upload .ant-upload.ant-upload-select-picture-card:focus .ant-upload {
|
|
46
|
-
color: var(--memori-primary);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.memori--upload .ant-upload-list {
|
|
50
|
-
display: flex;
|
|
51
|
-
flex-wrap: wrap;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.memori--upload .ant-upload-list-item {
|
|
55
|
-
overflow: hidden;
|
|
56
|
-
padding: 0;
|
|
57
|
-
border: 0;
|
|
58
|
-
border-radius: 5px;
|
|
59
|
-
box-shadow: 0 0 0.5rem 0 rgba(0, 0, 0, 0.1);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.memori--upload .ant-upload-list-picture-card-container {
|
|
63
|
-
margin-bottom: 1rem;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.memori--list-item-wrapper {
|
|
67
|
-
position: relative;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.memori--list-item-wrapper .ant-spin-nested-loading,
|
|
71
|
-
.memori--list-item-wrapper .ant-spin-container {
|
|
72
|
-
height: 100%;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.memori--list-item-wrapper figure {
|
|
76
|
-
margin-bottom: 0;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.memori--list-item-wrapper figure img {
|
|
80
|
-
max-height: 200px;
|
|
81
|
-
border-radius: 5px;
|
|
82
|
-
object-fit: contain;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.memori--list-item-wrapper figure figcaption {
|
|
86
|
-
padding: 1rem;
|
|
87
|
-
font-size: 0.8rem;
|
|
88
|
-
text-align: center;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.memori--list-item-wrapper .ant-upload-list-item-error .ant-upload-list-item-name {
|
|
92
|
-
position: static;
|
|
93
|
-
margin: 0 0 1rem;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.memori--list-item-wrapper .list-item-actions {
|
|
97
|
-
position: absolute;
|
|
98
|
-
top: 50%;
|
|
99
|
-
left: 50%;
|
|
100
|
-
display: flex;
|
|
101
|
-
overflow: hidden;
|
|
102
|
-
width: 0;
|
|
103
|
-
height: 0;
|
|
104
|
-
align-items: center;
|
|
105
|
-
justify-content: center;
|
|
106
|
-
border-radius: 5px;
|
|
107
|
-
background: rgba(0, 0, 0, 0.1);
|
|
108
|
-
opacity: 0;
|
|
109
|
-
transition: all 0.2s ease;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.attachment-media-modal .memori-modal--panel {
|
|
113
|
-
min-width: 50%;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.ant-upload-list-item-container {
|
|
117
|
-
width: 200px !important;
|
|
118
|
-
height: auto !important;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.ant-upload.ant-upload-select {
|
|
122
|
-
width: 200px !important;
|
|
123
|
-
height: 200px !important;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.memori--list-item-wrapper .list-item-actions a.action-button,
|
|
127
|
-
.memori--list-item-wrapper .list-item-actions button.action-button {
|
|
128
|
-
color: #fff;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.memori--list-item-wrapper .list-item-actions a.action-button + .action-button,
|
|
132
|
-
.memori--list-item-wrapper .list-item-actions button.action-button + .action-button {
|
|
133
|
-
margin-left: 0.5rem;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.memori--list-item-wrapper .list-item-actions a.action-button:hover,
|
|
137
|
-
.memori--list-item-wrapper .list-item-actions button.action-button:hover,
|
|
138
|
-
.memori--list-item-wrapper .list-item-actions a.action-button:focus,
|
|
139
|
-
.memori--list-item-wrapper .list-item-actions button.action-button:focus {
|
|
140
|
-
color: #fff;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
.memori--list-item-wrapper:hover .list-item-actions,
|
|
144
|
-
.memori--list-item-wrapper:focus .list-item-actions {
|
|
145
|
-
top: 0;
|
|
146
|
-
left: 0;
|
|
147
|
-
width: 100%;
|
|
148
|
-
height: 100%;
|
|
149
|
-
background: rgba(0, 0, 0, 0.4);
|
|
150
|
-
opacity: 1;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
.media-title-label {
|
|
154
|
-
display: block;
|
|
155
|
-
margin-bottom: 0.5rem;
|
|
156
|
-
font-size: 0.9rem;
|
|
157
|
-
font-weight: 600;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
.media-title-input {
|
|
161
|
-
width: 100%;
|
|
162
|
-
padding: 0.5rem 0.75rem;
|
|
163
|
-
border: 1px solid #d9d9d9;
|
|
164
|
-
border-radius: 5px;
|
|
165
|
-
background: #fff;
|
|
166
|
-
font-size: 0.9rem;
|
|
167
|
-
font-weight: 400;
|
|
168
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { UploadFile } from 'antd/lib/upload/interface';
|
|
2
|
-
import { Asset } from '@memori.ai/memori-api-client/dist/types';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
export interface Props {
|
|
5
|
-
uploadMultipleImages: boolean;
|
|
6
|
-
maxNumberOfVisualizedUploads?: number;
|
|
7
|
-
fileList?: any[];
|
|
8
|
-
uploadUrl: string;
|
|
9
|
-
apiUrl?: string;
|
|
10
|
-
tenantID: string;
|
|
11
|
-
maxFileSizeInMB?: number;
|
|
12
|
-
fileResolution?: number[];
|
|
13
|
-
useImageCrop?: boolean;
|
|
14
|
-
uploadMessage: string;
|
|
15
|
-
imageProportions?: number;
|
|
16
|
-
imageProportionsHelper?: string;
|
|
17
|
-
allowedMimeTypes?: string[];
|
|
18
|
-
onRemove?: (file: UploadFile<any>) => Promise<boolean>;
|
|
19
|
-
onUploadFinished?: (file: UploadFile) => void;
|
|
20
|
-
onFileChanged?: (assetID: string, asset: Partial<Asset>) => void;
|
|
21
|
-
onFileNotValid?: () => void;
|
|
22
|
-
disabled?: boolean;
|
|
23
|
-
showHelper?: boolean;
|
|
24
|
-
additionalHelper?: string;
|
|
25
|
-
resourceType?: 'avatar' | 'cover' | undefined;
|
|
26
|
-
}
|
|
27
|
-
declare const ImageUpload: React.FC<Props>;
|
|
28
|
-
export default ImageUpload;
|