CARVIEW |
Select Language
HTTP/2 200
date: Sat, 19 Jul 2025 16:55:36 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-repository-download: git clone https://github.com/immersive-web/webxr.git
etag: W/"e1a6072101d28068c00f103c90418760"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=i6lvMxfdVIwpK9H6V7L%2F4uwBQiS6%2BEE6H9gvYRhQjjuuCfL9Y%2FK%2FrgIROYMkUFG2AmwbtfcEtCKmvToXnUpbvGLr5TlrGUFOlssPoFIC93bVsvpawuP4XZRz95jpWPIqJHoqe9GCDcWFPVCBbjEI9wjuTcHMK%2FowXp2IotKS4IM1vCMWJ0PgZzvsxmy18QkEXCpr60mqxpml87YtO44lHcJXX4LVWc%2BI13BENnPPBHJ%2B%2FpKoJkZ94b5tkBrArU9%2FFO7HtddiVJ9gi2jIN6%2F56w%3D%3D--RfmZ33PK2QGaeCZF--YPq4oJH2RtZO%2F8aVomVV4w%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1376743281.1752944135; Path=/; Domain=github.com; Expires=Sun, 19 Jul 2026 16:55:35 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Sun, 19 Jul 2026 16:55:35 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: CD7A:E3E22:979B54:C43E2F:687BCE07
Fix multiplication order for transforms · immersive-web/webxr@6868682 · GitHub
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 401
Commit 6868682
Fix multiplication order for transforms
The multiplication order in the spec needs to match the matrix
semantics we've agreed on, and the usage appeared to be backwards.
Specific justifications following.
getViewerPose: if |offset| is the view offset of an eye view, the expected
semantics would be that it's a pose-like transform where the transform's
position is the eye view's coordinates in XRViewerPose space. The
corresponding matrix is viewerFromEye. XRViewerPose contains the viewer
pose in the base reference space, so its transform's position is the viewer
position in base space coordinates, and the transform is baseFromViewer.
Chaining these transforms works as follows:
```js
offset.matrix = viewerFromEye;
viewerPose.transform.matrix = baseFromViewer;
view.transform.matrix = baseFromEye
= baseFromViewer * viewerFromEye
= viewerPose.transform.matrix * offset.matrix
```
For originOffset, the logic is similar:
```js
let offsetASpace = baseSpace.getOffsetReferenceSpace(offsetAInBase);
// offsetAInBase.matrix = baseFromA
let offsetBSpace = offsetASpace.getOffsetReferenceSpace(offsetBInA);
// offsetBInA.matrix = AFromB
// equivalent to:
let offsetBSpace = baseSpace.getOffsetReferenceSpace(offsetBInBase);
// offsetBInBase.matrix = baseFromA * AFromB = offsetAInBase.matrix * offsetBInA.matrix
```
Lastly, for XRRay, the convention is to transform points or vectors by
premultiplying the transform matrix from the left, I've rephrased those usages
to make that explicit. The current text was basically saying "multiply
vector by matrix" which would be backwards.1 parent 0a11188 commit 6868682Copy full SHA for 6868682
Expand file treeCollapse file tree
1 file changed
+4
-4
lines changed+4-4Lines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
734 | 734 |
| |
735 | 735 |
| |
736 | 736 |
| |
737 |
| - | |
| 737 | + | |
738 | 738 |
| |
739 | 739 |
| |
740 | 740 |
| |
| |||
852 | 852 |
| |
853 | 853 |
| |
854 | 854 |
| |
855 |
| - | |
| 855 | + | |
856 | 856 |
| |
857 | 857 |
| |
858 | 858 |
| |
| |||
1094 | 1094 |
| |
1095 | 1095 |
| |
1096 | 1096 |
| |
1097 |
| - | |
1098 |
| - | |
| 1097 | + | |
| 1098 | + | |
1099 | 1099 |
| |
1100 | 1100 |
| |
1101 | 1101 |
| |
|
You can’t perform that action at this time.
0 commit comments