Use RealityKit ARView on macOS - macos

I'm trying to use an ARView in a macOS-only project. I can load a scene (tested with a Reality file from Reality Composer), and it renders fine.
But how do I control the camera with the mouse?
An example of this is Reality Composer, Reality Converter, and previewing a Reality file in Xcode where you can drag anywhere on the view and the camera pans, rotates, etc. In SceneKit the equivalent is allowsCameraControl
There's no cameraMode on the macOS ARView, probably because it only supports nonAR anyway.
I tried adding a PerspectiveCamera hoping it would unlock interactivity, but no luck.
I guess I could just implement all the gestures myself, but that's a lot of work, and Apple seems to be using a standard way to interact with the scene with a mouse - and also a standard grid, which I'd love to use, too.
I'm using macOS 12 beta 1, but it shouldn't make a big difference since ARView requires macOS 10.15

Neither in macOS nor in iOS, RealityKit has a property similar to SceneKit's .allowsCameraControl. However, using this code as a starting point, you can create your own camera control in RealityKit.
This post can also be helpful for you.

Related

Metal app on macOS lags when for example using the menu

I'm playing around with Metal and MetalKit on macOS. It works fine for the most part, but in everything I've built so far the rendering will lag for a brief moment when I do things in the menu bar or hover my mouse over the dock. It's kind of annoying.
The easiest way to reproduce this effect is by trying Apple's own 'Device Selection and Fallback for Graphics Rendering' Sample. I've observed the issue on macOS 10.13 and 10.14.
Does anyone have an idea how to fix this issue?
Core Animation won't lag like that, but it's not suitable for what I would like to do. I believe it's built on top of Metal these days though, making me believe that it should be possible to get rid of the lag.

On MacOS with Qt5.3.1 QToolBar is black when attached

I have a QMainWindow Application that uses several QToolBars. My program works on Linux, Windows and MacOS, however on MacOs the QToolbar behaves a little bit funky. When attached to the MainWindow it is just black as shown here
When I detach it it is grey as you would expect it to be
Also when I maximize to program the toolbar creates artifacts like this
Do I need any MacOS specific things for the QToolBar?
I'm hitting this bug too. I think it is linked to using non-alien widgets inside the toolbar or app wide.
Are you using setAttribute(Qt::AA_NativeWindows);? If so, try removing it.
Would you happen to have a QGLWidget-based UI element in your application? If so, apparently this is a known issue.
https://bugreports.qt.io/browse/QTBUG-41679
I am experiencing the "double-vision" aspect of this on a Qt 5.7.0-based app.

MONODROID camera preview with opengl overlay

I have created an augmented reality application using Monodroid and it works fine on a technical basis. However, the graphics I used were drawn on a canvas and are really too slow.
The application is a simple heads-up compass and speed display a-la luke-skywalkers binoculars.
I am trying to get a camera preview going with an openGL translucent/transparent overlay and yes, I have read whats available but its all pure Android SDK / Java.
Does anyone know of a method of getting this effect in C# and Monodroid possibly using the AndroidGameView? Whatever I do I can see one or the other but never both at the same time.
Unhelpful jerks are a pleasure to work with.
http://bobpowelldotnet.blogspot.fr/2012/10/monodroid-camera-preview-as-opengl.html

Add flash animations to Xcode?

For my application, there are many features that need to include animations. For example, while loading a ViewController, I need the images and buttons that appear on the screen an intricate Animations that cannot be done in Xcode. So far, I have made only simple animations through Xcode such as shrinking images, buttons moving to a CGPoint, etc. Simple things. If I make these intricate animations in Adobe Flash or another animation software, is there anyway to incorporate it within my application?
Depending on the nature of your application, you could consider writing the application using Flash, and then use Adobe AIR to compile it to run natively on iPhone and iPad. Best of all, Adobe AIR could also compile it to run on Android, Blackberry Playbook and traditional Windows and Mac, so you can write once and run everywhere. By doing so, you can also take advantage of the animation power of Flash.
Apple dod not support flash on iphone or ipad.only youtube can be played. if you want to use any animation make a gif or use HTML5.

Core Animation in Interface Builder

So, I'm working on a mac app, and I'm trying to add a shadow via core animation to a button. I used the effects pane in Interface Builder and set the shadow and color, and made sure to check the "Want's Core Animation Layer" checkbox. But when simulating the interface or building the app, there is no shadow. I would appreciate it if someone knows what's wrong.
Thanks!
Edit: I've tried several things, including cleaning the project and turning on and off core animation. Nothing fixes it.
I fixed it. I ended up going through every interface element in the tab view and turned off core animation on each one (I had some strange transparency stuff going on). Then I went back to add the shadow, and it worked fine.

Resources