Using Threejs Canvas Renderer in JavaFX Webview Issue with transparency - three.js

I was messing around with Threejs inside of JavaFX webview and I sort of ran into a problem i was wondering if anyone had any idea.
I basically just dropped the canvas_interactive_cubes demo into a javaFX webview component and it works for the most part except for the fact that the ThreeJs scene always just seems to want to render solid black behind itself and not let the underlying web page show through. It works perfectly fine if I run the same demo out of firefox and mess with the page under the scene canvas.
I understand that threejs was never really meant to support FX Webview but I was just wondering if anyone had any idea what could be going on to cause this?
Thanks,
Josh

Related

WebVR Vive Viewport flickering Firefox 55

atm I am trying to create a webVR experience for the HTC Vive on Firefox 55.0.3. It seems there are some performance issues with that. I can not show you code or screenshots from my application, but i also noticed the strange effects of the viewport 'flickering' in the following example from the A-Frame website.
https://aframe.io/examples/showcase/museum/
whenever I look at the center of the room, the viewport starts shaking like crazy. In other examples limke A-Blast this doesn't happen.
Now I am wondering hwhy this happens, as the HMD'S orientation obtained from vrDisplay.pose has to be correct. Then why does the camera, which gets rotated via this pose shakes?
There is also another performance issue with webvr on firefox. at some point, OpenVR/SteamVR just claims firefox is unresponsive, alternating between displaying VIVE Home and the webvr scene in quivk succession.
Did anyone of you also noticed this behavior and has any idea how to fix it?

Is there a way to implement pinch-zoom and panning on an Image without relying on animations?

I’m working with an Image control and I’m trying to implement pinch-zoom and panning.
None of the ready-to-go samples on the web, which handles the zoom and pan, worked as smoothly as the native Photos app on Windows Phone or like when viewing an image in Internet Explorer.
This led me to implement my own way of handling them which included me trying the following ways: (Scaling works as of now and I’m trying to get the panning to work too)
Putting the Image inside a ViewportControl; resulted in incredibly jerky scaling, but panning works smoothly. Setting UseOptimizedManipulationRouting="False" on the image didn't make a difference.
Putting the Image inside a ScrollViewer; scaling doesn't even work and panning is glitchy (jerky sometimes).
Using only the Image control and making use of animations to handle the smooth panning.
I haven't implemented step 3 yet, because I can't shake the feeling I've missed something. How can something so widely used be this hard to implement? :|
So my question is
What do I need to do to implement pinch-zoom and panning as smooth as in the Photos app?
If animations are the way to go can they be used to smooth scaling and translations to match that of the native experience?

CoreAnimation layer causes WebView to not redraw properly

In a project I have been working on I wanted to use CoreAnimation layers to improve tableview rendering, however when i turned on Core Animation for certain layers it caused issues with my WebView.
https://github.com/jozefdransfield/TestWebView demonstrates a WebView inside a view displaying a large image. Which reproduces the issue I am seeing.
If View has Core Animation Layer checked then the WebView does not draw the image properly if you scroll within the webView, with it uncheck the webView behaves as expected.
Has anyone seen this issue before and have an idea how to fix/work around it. Or can you simply not mix webviews with CALayers?

How to replicate code for Facebook image gestures?

I am developing an educational app that is made of multiple images. I am also new at coding and XCode. I wanted to know how to get my images so they respond to the gesture similar to the photos on facebook (swiping, min/max zooming, scrolling all on one image). I have the UIImage in UIScrollview.
Can I add all the gestures in UIScrollView or do I have to add each gesture separately? Because the app is made up of multiple png images do I have to connect each image separately or is there a method to implement one code for the entire program?
I am using Storyboard and have minimal coding.
If this information is already out there I would greatly appreciate some direction. I have tried to use "Basic Zooming Using the Pinch Gestures" from the iOS library with little success.
Check out this tutorial.
http://www.raywenderlich.com/6567/uigesturerecognizer-tutorial-in-ios-5-pinches-pans-and-more
In this they go over exactly what your wanting, zooming in and out images and swiping. Pretty much you use UIGestureRecognizers. :)

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