File tree Expand file tree Collapse file tree 6 files changed +36
-10
lines changed Expand file tree Collapse file tree 6 files changed +36
-10
lines changed Original file line number Diff line number Diff line change 594
594
xrHand . hand = 2 ;
595
595
}
596
596
xrHand . enabled = 1 ;
597
- frame . fillPoses ( inputSource . hand , refSpace , xrHand . poses ) ;
598
- frame . fillJointRadii ( inputSource . hand , xrHand . radii ) ;
597
+ if ( inputSource . hand . values ) {
598
+ frame . fillPoses ( inputSource . hand . values ( ) , refSpace , xrHand . poses ) ;
599
+ frame . fillJointRadii ( inputSource . hand . values ( ) , xrHand . radii ) ;
600
+ } else {
601
+ frame . fillPoses ( inputSource . hand , refSpace , xrHand . poses ) ;
602
+ frame . fillJointRadii ( inputSource . hand , xrHand . radii ) ;
603
+ }
599
604
for ( let j = 0 ; j < 25 ; j ++ ) {
600
605
xrHand . jointIndex = j * 16 ;
601
606
if ( ! isNaN ( xrHand . poses [ xrHand . jointIndex ] ) ) {
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
## [ Unreleased]
8
8
### Added
9
9
- GetLocalRotation and GetLocalPosition to WebXRCamera.
10
+ - Support for the new/updated WebXR Hands API.
10
11
11
12
### Changed
12
13
- Using ` frame.fillPoses ` and ` frame.fillJointRadii ` instead of ` frame.getJointPose ` for XRHand.
Original file line number Diff line number Diff line change 594
594
xrHand . hand = 2 ;
595
595
}
596
596
xrHand . enabled = 1 ;
597
- frame . fillPoses ( inputSource . hand , refSpace , xrHand . poses ) ;
598
- frame . fillJointRadii ( inputSource . hand , xrHand . radii ) ;
597
+ if ( inputSource . hand . values ) {
598
+ frame . fillPoses ( inputSource . hand . values ( ) , refSpace , xrHand . poses ) ;
599
+ frame . fillJointRadii ( inputSource . hand . values ( ) , xrHand . radii ) ;
600
+ } else {
601
+ frame . fillPoses ( inputSource . hand , refSpace , xrHand . poses ) ;
602
+ frame . fillJointRadii ( inputSource . hand , xrHand . radii ) ;
603
+ }
599
604
for ( let j = 0 ; j < 25 ; j ++ ) {
600
605
xrHand . jointIndex = j * 16 ;
601
606
if ( ! isNaN ( xrHand . poses [ xrHand . jointIndex ] ) ) {
Original file line number Diff line number Diff line change 594
594
xrHand . hand = 2 ;
595
595
}
596
596
xrHand . enabled = 1 ;
597
- frame . fillPoses ( inputSource . hand , refSpace , xrHand . poses ) ;
598
- frame . fillJointRadii ( inputSource . hand , xrHand . radii ) ;
597
+ if ( inputSource . hand . values ) {
598
+ frame . fillPoses ( inputSource . hand . values ( ) , refSpace , xrHand . poses ) ;
599
+ frame . fillJointRadii ( inputSource . hand . values ( ) , xrHand . radii ) ;
600
+ } else {
601
+ frame . fillPoses ( inputSource . hand , refSpace , xrHand . poses ) ;
602
+ frame . fillJointRadii ( inputSource . hand , xrHand . radii ) ;
603
+ }
599
604
for ( let j = 0 ; j < 25 ; j ++ ) {
600
605
xrHand . jointIndex = j * 16 ;
601
606
if ( ! isNaN ( xrHand . poses [ xrHand . jointIndex ] ) ) {
Original file line number Diff line number Diff line change 594
594
xrHand . hand = 2 ;
595
595
}
596
596
xrHand . enabled = 1 ;
597
- frame . fillPoses ( inputSource . hand , refSpace , xrHand . poses ) ;
598
- frame . fillJointRadii ( inputSource . hand , xrHand . radii ) ;
597
+ if ( inputSource . hand . values ) {
598
+ frame . fillPoses ( inputSource . hand . values ( ) , refSpace , xrHand . poses ) ;
599
+ frame . fillJointRadii ( inputSource . hand . values ( ) , xrHand . radii ) ;
600
+ } else {
601
+ frame . fillPoses ( inputSource . hand , refSpace , xrHand . poses ) ;
602
+ frame . fillJointRadii ( inputSource . hand , xrHand . radii ) ;
603
+ }
599
604
for ( let j = 0 ; j < 25 ; j ++ ) {
600
605
xrHand . jointIndex = j * 16 ;
601
606
if ( ! isNaN ( xrHand . poses [ xrHand . jointIndex ] ) ) {
Original file line number Diff line number Diff line change 594
594
xrHand . hand = 2 ;
595
595
}
596
596
xrHand . enabled = 1 ;
597
- frame . fillPoses ( inputSource . hand , refSpace , xrHand . poses ) ;
598
- frame . fillJointRadii ( inputSource . hand , xrHand . radii ) ;
597
+ if ( inputSource . hand . values ) {
598
+ frame . fillPoses ( inputSource . hand . values ( ) , refSpace , xrHand . poses ) ;
599
+ frame . fillJointRadii ( inputSource . hand . values ( ) , xrHand . radii ) ;
600
+ } else {
601
+ frame . fillPoses ( inputSource . hand , refSpace , xrHand . poses ) ;
602
+ frame . fillJointRadii ( inputSource . hand , xrHand . radii ) ;
603
+ }
599
604
for ( let j = 0 ; j < 25 ; j ++ ) {
600
605
xrHand . jointIndex = j * 16 ;
601
606
if ( ! isNaN ( xrHand . poses [ xrHand . jointIndex ] ) ) {
You can’t perform that action at this time.
0 commit comments