How is "examine" mode enabled in an A-Frame scene?
This is the mode that the Visual Inspector uses to browse through the scene and it is also the mode used in this showcase example.
VRML had the NavigationInfo node which provided three viewing modes (through the type attribute): Walk, Fly, Examine.
A-Frame provides the "wasd-controls component" which has an attribute fly (this basically implies two modes: Fly, Walk) and the "look-controls component" which could be used to control a scene's orientation (?)
It is not entirely clear if it is possible to enter "examine" mode via a scene attribute (or "mode") or if this is something that has to be implemented via a code snippet (?)
What does "examine" mode look like in A-Frame?
Related
I want to set FileChooser dialog preferred size. For now, it cannot be set and just appears with fixed size always (occupied with almost full screen). I can't find resizing method in FileChooser intance and even control dialog after it appears.
I don't think that this is possible. The documentation of FileChooser states
Provides support for standard platform file dialogs. (...) The configuration of the displayed dialog is controlled by the values of the FileChooser properties set before the corresponding show*Dialog method is called. This configuration includes the dialog's title, the initial directory displayed in the dialog and the extension filter(s) for the listed files.
The popup dialog is provided by your operating system, so it cannot be customized directly. Your only option is using the bit of API that the FileChooser class itself provides. Since JavaFX is a cross platform UI framework, the customization options probably have been limited to the ones that are supported natively by all major platforms.
If you absolutely must customize the file chooser, you can try to embed a Swing JFileChooser in your JavaFX app.
As noted here, the JavaFX FileChooser is provided by the host platform. In particular, "For configuration properties which values haven't been set explicitly, the displayed dialog uses their platform default values." Presumably, this includes size.
On macOS, Java/FX 17 LTS, if you resize the dialog, the new dialog size is saved as a preference; when invoked again, the last used dialog size is restored.
Please feel free to add your user experience on other platforms. This FileChooserDemo can be used for testing.
I'm using A-Frame and I'm trying to figure out how to easily support multiple types of controllers at once (Oculus Touch, HTC Vive controllers, and Windows Mixed Reality controllers), preferably with controller models rendered in the scene and with lasers that would allow the user to click on things.
How do I do this?
I figured out how to do this, so here's my solution.
In your HTML, you can have these to create the controllers (this should be inside an a-scene element):
<a-entity laser-controls="hand: left" raycaster="showLine: true; objects: .clickable;"></a-entity>
<a-entity laser-controls="hand: right" raycaster="showLine: true; objects: .clickable;"></a-entity>
These should also render with the actual controller models in the scene, and each have a laser pointer.
This is what it looks like with the Oculus Touch controllers (ignore the other stuff in the view):
As new types of headsets come out and are supported by A-Frame (e.g. the Valve Index controllers aren't supported yet), the laser-controls component should automatically be updated to support them.
See the docs for a bit more information on how to use controllers in your A-Frame scene.
I still haven't figured out exactly how to make it possible to click on buttons or objects in the environment using the laser, I'll need to figure that out next.
I am attempting to implement the Daydream keyboard into an app built in Unity and am not able to get this to work. I have added the keyboard prefab as a sibling of the main camera and added two input fields with the onpointerclick function added as instructed. I however get a null reference exception and assume this is due to the daydream keyboard delegate field being blank. The example scene in the SDK shows the daydream delegate example prefab but I am unsure how to implement this for two input fields. Also does the keyboard render in the Unity editor or must it be built and run on a phone?
This is an old question and has probably already been answered, but I figured I'd publicize my answer anyway.
For those reading, if you haven't checked out the Keyboard Demo scene that can be found within the Demos folder of the Google VR Unity package, I would highly recommend doing so. Following this object hierarchy has worked for me in the past.
To answer your first question, it seems that they have included a KeyboardDelegateExample object within the scene's hierarchy, and then used this object as the Keyboard Delegate in the GVRKeyboardManager.
They manage to fake an Input Field by creating a background and overlaying a Text object on top. If this method does not suffice and using an Input Field is crucial in your particular case, then drop your Input Fields into two separate GVRKeyboardCanvas objects.
Clicking on either canvas will activate the GVR Keyboard. You may have to add a small script to manage the transitioning of the input field.
Lastly, no the GVR Keyboard does not render in the Unity Editor, it only appears while running a build. Hopefully this will be addressed in later releases. There are also Keyboard plugins that you may find useful on the Asset Store.
I have a requirement to build multiple scenes in web VR A-frame. Each scene will have a button which when clicked, will load a new scene with different background.
What is the recommended way to build scenes in A-frame?
Create just one scene and swap the entities at runtime. Each entity can correspond to a button, background, etc.
Create multiple pages(eg. index.html), each having its own scene and load each page on click event.
Approach (1) seems to be the preferred one as the second approach would mean that 'Back' button in browser will be enabled on loading new pages, which is undesirable and affects the user experience in VR.
Can anyone confirm that approach (1) is preferred?
Definitely a better experience if you can keep everything in a "single-page app" (1) and swap out entities. Especially if you are doing something as simple as swapping a background. Only a couple browsers have implemented proper in-VR link traversal, and the link traversal UX at the moment is non-existent.
https://aframe.io/docs/0.6.0/guides/building-a-360-image-gallery.html
I have an AIR application with a system tray icon. When clicked it shows and activates the app. This is working as expected when the app is hidden (docked), however if I select another application so my app is in the background clicking on the system tray icon does nothing.
Oddly I also have a contextual menu on the system tray icon, which has an option to restore, this calls the same event handler as ScreenMouseEvent.CLICK, yet works.
I expect it's something to do with the contextual menu changing the focus, perhaps it's a bug in how AIR works with the system tray, perhaps it's just something I'm missing. Would be good to know if that's the case.
Thanks in advance
Rob
//instead of just calling
activate();
//call
nativeApplication.activate()
//or even better
nativeApplication.activate(nativeWindow);
Update based on OP's input: if you have multiple windows open for the application, use:
nativeApplication.activate(nativeApplication.openedWindows[0]);
If you are not in the main WindowedApplication class, you can use the static property NativeApplication.nativeApplication to get a reference to the singleton object.
WindowedApplication.activate()
Activates the underlying NativeWindow (even if this application is not the active one).
NativeApplication.activate(window:NativeWindow = null)
Activates this application. If the operating system allows activation, then the specified window is activated and brought to the desktop foreground; that is, in front of the windows of other applications. (If the window parameter is null, then a visible window of this application is activated.)
livedocs is not clear on why this is happening. It says activate() activates the underlying native window - one would expect it to be brought to the front when it is activated, but that's not happening.