mirror of
https://github.com/storytold/spark.git
synced 2026-10-14 23:52:59 +00:00
Add examples/webxr/ single-html example. Linked in index.html. Improved the experimental hands.ts interface. Fixed issue with single-camera WebXR. Added valley.spz to assets.json, added to assets repo.
This commit is contained in:
committed by
Andreas Sundquist
parent
6f08561914
commit
d4f174677c
+1
-4
@@ -240,8 +240,6 @@ export class XrHands {
|
||||
onFrame: () => {
|
||||
let splatIndex = 0;
|
||||
for (const handedness of HANDS) {
|
||||
const active = this.values[`${handedness}MiddleThumb`];
|
||||
|
||||
const xrHand = this.hands[handedness];
|
||||
for (const [index, segment] of JOINT_SEGMENTS.entries()) {
|
||||
for (let i = 1; i < segment.length; ++i) {
|
||||
@@ -274,8 +272,6 @@ export class XrHands {
|
||||
if (handedness === "right") {
|
||||
color.set(1 - color.r, 1 - color.g, 1 - color.b);
|
||||
}
|
||||
|
||||
color.lerp(WHITE, active);
|
||||
opacity = 0.75;
|
||||
}
|
||||
mesh.packedSplats.setSplat(
|
||||
@@ -294,6 +290,7 @@ export class XrHands {
|
||||
mesh.packedSplats.numSplats = splatIndex;
|
||||
mesh.packedSplats.needsUpdate = true;
|
||||
mesh.numSplats = splatIndex;
|
||||
mesh.updateVersion();
|
||||
},
|
||||
});
|
||||
return mesh;
|
||||
|
||||
Reference in New Issue
Block a user