-
Notifications
You must be signed in to change notification settings - Fork 0
/
XRFrame.cljs
56 lines (39 loc) · 1.63 KB
/
XRFrame.cljs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
(ns web.ar.XRFrame
"The XRFrame interface of the WebXR Device API provides information
to render a single frame of an AR/VR scene to the display. An
of this object is passed to each call of the callback provided
`XRSession.requestAnimationFrame`."
(:refer-clojure :exclude []))
(defn get-pose
"Method.
The getPose() method of the `web.ar.XRFrame` interface turns
`web.other.XRPose` object representing the relative relationship
any two `XRSpace` objects.
`var xrPose = XRFrame.getPose(space, baseSpace);`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/XRFrame/getPose`"
[this space base-space]
(-> this (.getPose space base-space)))
(defn get-viewer-pose
"Method.
The XRFrame.getViewerPose() method of the `web.ar.XRFrame` interface
an `XRViewerPose` corresponding to the viewer's pose in a given
`var xrViewerPose = XRFrame.getViewerPose(referenceSpace);`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/XRFrame/getViewerPose`"
[this reference-space]
(-> this (.getViewerPose reference-space)))
(defn session
"Property.
The session readonly property of `web.ar.XRFrame` interface references
`web.ar.XRSession` that produced it.
`var xrSession = XRFrame.session`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/XRFrame/session`"
[this]
(-> this (.-session)))
(defn set-session!
"Property.
The session readonly property of `web.ar.XRFrame` interface references
`web.ar.XRSession` that produced it.
`var xrSession = XRFrame.session`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/XRFrame/session`"
[this val]
(aset this "session" val))