| 1128 | Napi::ObjectReference m_jsPose{}; |
| 1129 | |
| 1130 | Napi::Value GetViewerPose(const Napi::CallbackInfo& info) |
| 1131 | { |
| 1132 | // TODO: Support reference spaces. |
| 1133 | // auto& space = *XRReferenceSpace::Unwrap(info[0].As<Napi::Object>()); |
| 1134 | |
| 1135 | // Updating the reference space is currently not supported. Until it is, we assume the |
| 1136 | // reference space is unmoving at identity (which is usually true). |
| 1137 | |
| 1138 | m_xrViewerPose.Update(info, {{{0, 0, 0}, {0, 0, 0, 1}}}, m_frame->Views); |
| 1139 | |
| 1140 | return m_jsXRViewerPose.Value(); |
| 1141 | } |
| 1142 | |
| 1143 | Napi::Value GetPose(const Napi::CallbackInfo& info) |
| 1144 | { |