Last active
November 23, 2016 21:51
-
-
Save MortimerGoro/3e75c5925101c31c195c53d82a3b035b to your computer and use it in GitHub Desktop.
VRDisplay DOM struct example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[dom_struct] | |
pub struct VRDisplay { | |
eventtarget: EventTarget, | |
#[ignore_heap_size_of = "Defined in rust-webvr"] | |
display: DOMRefCell<WebVRDisplayData>, | |
depth_near: Cell<f64>, | |
depth_far: Cell<f64>, | |
presenting: Cell<bool>, | |
left_eye_params: MutHeap<JS<VREyeParameters>>, | |
right_eye_params: MutHeap<JS<VREyeParameters>>, | |
capabilities: MutHeap<JS<VRDisplayCapabilities>>, | |
stage_params: MutNullableHeap<JS<VRStageParameters>>, | |
#[ignore_heap_size_of = "Defined in rust-webvr"] | |
frame_data: DOMRefCell<WebVRFrameData>, | |
#[ignore_heap_size_of = "Defined in rust-webvr"] | |
layer: DOMRefCell<WebVRLayer>, | |
layer_ctx: MutNullableHeap<JS<WebGLRenderingContext>>, | |
next_raf_id: Cell<u32>, | |
/// List of request animation frame callbacks | |
#[ignore_heap_size_of = "closures are hard"] | |
raf_callback_list: DOMRefCell<Vec<(u32, Option<Box<FnBox(f64)>>)>>, | |
// Compositor VRFrameData synchonization | |
frame_data_status: Cell<VRFrameDataStatus>, | |
#[ignore_heap_size_of = "channels are hard"] | |
frame_data_receiver: DOMRefCell<Option<IpcReceiver<Result<Vec<u8>,()>>>> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment