Comments (5)
In particular, for services that take ownership of some parameters, the VRServiceCreator
API is not ideal:
let foo_creator = FooServiceCreator::new(this, that);
let foo1 = foo_creator.new_service(); // foo1 now owns this and that
let foo2 = foo_creator.new_service(); // What happens now? panic?
from rust-webvr.
The only reason I can see for its existence is for this code, but it's not clear to me that that abstraction is necessary.
from rust-webvr.
Indeed, why not keep an array of VRService
objects rather than VRServiceCreator
objects?
from rust-webvr.
It's used to register services based on cargo features and in order to do lazy initialization (only initialize services when first requested from JavaScript thread, otherwise some system UI may trigger (e.g Steam VR state UI on HTC Vive).
I think we could switch to a VRService array as long as we mantain a lazy initialization
from rust-webvr.
The VRService
doesn't need to do any initialization until initialize
is called, which won't happen until JS fetches the displays or gamepads.
from rust-webvr.
Related Issues (20)
- Any chance of a tutorial? HOT 1
- Using openvr on windows leads to TrackedDevicePose_t uninitilized error HOT 6
- Getting eye parameters requires memory allocation
- Add android build to travisCI
- Why is `register_vrexternal` safe? HOT 1
- Supporting devices that require code to run on the main thread HOT 2
- Why does `synced_frame_data` take a `&self` rather than a `&mut self`? HOT 9
- Why is `VRDisplay` marked `Send` and `Sync`? HOT 2
- `start_present` and `stop_present` aren't called by Servo HOT 4
- `VRServiceManager` isn't `Send` HOT 1
- Can we avoid blocking the WebVR render thread? HOT 4
- The VRDisplay is not provided with a Gl instance HOT 3
- Deprecate some APIs HOT 1
- Implement a test VRDisplay that renders to a GL window HOT 1
- Redesign the main API of this crate to be XR-focused
- Support multiple displays in GoogleVR
- We should have a way to get gamepad state asynchronously
- Fill out mocking features in the mock API
- VREyeParameters API incompatible with canted displays HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust-webvr.