-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path242.53320f1d872026e28294.bundle.js
More file actions
39 lines (39 loc) · 1.85 KB
/
242.53320f1d872026e28294.bundle.js
File metadata and controls
39 lines (39 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
"use strict";
(self.webpackChunkmetapress = self.webpackChunkmetapress || []).push([
[242], {
242: (e, i, t) => {
t.r(i), t.d(i, {
default: () => s
});
class s {
id = "core.compatibility.mixamo";
name = "Mixamo Compatibility";
description = "This plugin handles converting models and animations from Mixamo.com.";
version = "1.0.0";
prefixes = ["mixamorig1:", "mixamorig:", "mixamorig1", "mixamorig"];
$onEntityRendererLoad(e) {
if (!e.object?.isObject3D) return;
let i = !1;
e.object.traverse((e => {
if (e.isBone && e.name)
for (let t of this.prefixes)
if (e.name.startsWith(t)) {
e.name = e.name.substring(t.length), i = !0;
break
}
}));
for (let t of e.animationClips || [])
for (let s of t.tracks)
if (s.name) {
for (let e of this.prefixes)
if (s.name.startsWith(e)) {
s.name = s.name.substring(e.length), i = !0;
break
} if (i && !s.name.startsWith("Hips.") && (s.name.endsWith(".position") || s.name.endsWith(".scale")) && (t.tracks = t.tracks.filter((e => e != s))), i && e.modelInfo?.isFBX && "Hips.position" == s.name)
for (let e = 0; e < s.values.length; e++) s.values[e] *= .01
}
}
}
}
}
]);