@davi-ai/react-bodyengine-three 1.0.7 → 1.0.8
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/index.js +9 -24
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -48500,31 +48500,16 @@ const LS = class ja extends k.Loader {
|
|
|
48500
48500
|
}), e.parent.add(t);
|
|
48501
48501
|
}
|
|
48502
48502
|
async setHair(e) {
|
|
48503
|
-
e.material.alphaTest = e.material.reflectivity = e.material.specularIntensity = e.material.sheen = 0, e.material = new k.MeshPhysicalMaterial({
|
|
48504
|
-
color: e.material.color,
|
|
48505
|
-
metalness: e.material.metalness,
|
|
48506
|
-
roughness: e.material.roughness,
|
|
48507
|
-
map: e.material.map,
|
|
48508
|
-
normalMap: e.material.normalMap,
|
|
48509
|
-
normalScale: e.material.normalScale,
|
|
48510
|
-
roughnessMap: e.material.roughnessMap,
|
|
48511
|
-
metalnessMap: e.material.metalnessMap,
|
|
48512
|
-
side: k.DoubleSide,
|
|
48513
|
-
transparent: e.material.transparent,
|
|
48514
|
-
alphaTest: e.material.alphaTest,
|
|
48515
|
-
alphaMap: e.material.alphaMap,
|
|
48516
|
-
opacity: e.material.opacity,
|
|
48517
|
-
specularColor: new k.Color(1, 1, 1),
|
|
48518
|
-
sheen: 0.2,
|
|
48519
|
-
sheenRoughness: 0.5,
|
|
48520
|
-
sheenColor: new k.Color(1, 1, 1)
|
|
48521
|
-
});
|
|
48522
48503
|
const t = e.material;
|
|
48523
|
-
t.
|
|
48524
|
-
const i = e.clone();
|
|
48525
|
-
i.material = e.material.clone(),
|
|
48526
|
-
|
|
48527
|
-
n.
|
|
48504
|
+
t.alphaTest = t.reflectivity = t.specularIntensity = t.sheen = 0, t.side = k.DoubleSide, t.alphaHash = !1, t.premultipliedAlpha = !1, t.alphaToCoverage = !1;
|
|
48505
|
+
const i = e.clone(), n = e.clone();
|
|
48506
|
+
i.material = e.material.clone(), t.onBeforeCompile = (o) => {
|
|
48507
|
+
o.fragmentShader = o.fragmentShader.replace("#include <alphamap_fragment>", k.ShaderChunk.alphamap_fragment.replace("diffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g", "diffuseColor.a *= min(1.0, 0.10+texture2D( alphaMap, vAlphaMapUv ).g)"));
|
|
48508
|
+
}, n.material = e.material.clone(), e.name = "Hair", i.name = "HairClone", n.name = "Hair2Clone";
|
|
48509
|
+
const s = i.material;
|
|
48510
|
+
s.name = "HairMaterialClone";
|
|
48511
|
+
const a = n.material;
|
|
48512
|
+
a.name = "HairMaterial2Clone", t.opacity = 0.3, s.opacity = 0.5, a.transparent = a.alphaToCoverage = !0, a.alphaHash = !1, a.depthWrite = !1, a.alphaTest = 0, e.renderOrder = 1, i.renderOrder = 3, n.renderOrder = 2, e.parent.add(i), e.parent.add(n);
|
|
48528
48513
|
}
|
|
48529
48514
|
async setHead(e) {
|
|
48530
48515
|
ja.cavityMap || (ja.cavityMap = await Kn.textureLoader.loadAsync("https://cdn.retorik.ai/bodyengine-three/characters/common/cavity.jpg"), ja.cavityMap.wrapS = ja.cavityMap.wrapT = k.RepeatWrapping), ja.microMap || (ja.microMap = await Kn.textureLoader.loadAsync("https://cdn.retorik.ai/bodyengine-three/characters/common/micro.jpg"), ja.microMap.wrapS = ja.microMap.wrapT = k.RepeatWrapping), ja.microNormalMaskMap || (ja.microNormalMaskMap = await Kn.textureLoader.loadAsync("https://cdn.retorik.ai/bodyengine-three/characters/common/normalMask.jpg"), ja.microNormalMaskMap.flipY = !0);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@davi-ai/react-bodyengine-three",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"description": "Reactjs layer to use animations in a threejs environment",
|
|
5
5
|
"author": "DAVI",
|
|
6
6
|
"licence": "MIT",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"build-storybook": "storybook build"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@davi-ai/bodyengine-three": "^1.0.
|
|
27
|
+
"@davi-ai/bodyengine-three": "^1.0.6",
|
|
28
28
|
"@davi-ai/web-speech-cognitive-services-davi": "^2.0.10",
|
|
29
29
|
"@react-three/drei": "9.112.0",
|
|
30
30
|
"@react-three/fiber": "^8.17.9",
|