I don't speak English well... :(
Is it possible to adjust the Inter-lens distance in an Aframe as well as adjust the Inter-lens distance of Google Cardboard Site?
Google Cardboard URL : https://vr.google.com/cardboard/viewerprofilegenerator/
I know this is from the webVR api, is this adjustable in the javascript? (
Because the distance between eyes is different for each person, I want to show more accurate screen on cellphone + cardboard. )
No, there's no way to change the distance (IPD) in cardboard devices. Lenses are fixed in position. You could potentially manufacture multiple devices with different IPDs.
Related
I have a flashing icon on a Mapbox GLJS map that shows the location of my software.
I would now like to indicate the direction of travel, similar to how google maps shows it. See image.
Once this is implemented, I would also like to adjust the width of the heading indicator based on the current FOV of my real-world camera. Ie Current camera FOV at 20 degrees would be shown as a 20-degree cone on the map.
Id have thought this is quite a common need, so is there any styling that can simply be plugged in? If not, any pointers of how to go about this would be welcome. Cheers
icon image
I first apologize if this question is in the wrong place or is formatted wrong. I am young and this is my first post ever here. I was planning on creating a camera app when I get my macbook but before that I was looking at other cameras and noticed that there is an app that shoots 4000x3000 24fps H.265 video on my iPhone 7 plus. How is this possible? Does the API easily let you choose resolutions above 4K or do you have to use a trick?
No, it's not really possible. An app that's allegedly doing it is interpolating pixels between the actual pixels that the camera is delivering. That means it's basically making up extra pixels, typically by averaging the colors of nearby pixels.
I have used the gestures code based on the provided Kivy examples to record and recognize single touch gestures. However, I am not sure how to extend this code to recognize multi-touch gestures. Let's say, for example, a pinch.
My problem becomes specially complicated because I use a laptop with zero multi-touch functionality. How do I combine two single gestures? Is there any example available?
From 1.9.0, Kivy got a multi-touch gesture recognizer integrated: have a look at kivy.multistroke. I personally didn't got time to test it yet.
If you want to map or act depending of the gesture, you might be interested by the Scatter. Pinch can be done with 2 to N touch, with rotation and translation integrated. You can restrict the transformation to just scale and not rotation / translation. And, when all the touches are released, you could animate the scale to the closest wanted value. You can also set a limit for the minimum scale and maximum scale.
With few parameters and code, you can pinch to zoom, de/un pinch to unzoom, etc. Maybe that's what you want :) (like pinch to zoom in a image, or put an image in fullscreen).
You can also just use the Scatter's scale parameters, or Scale's matrix to do your own things :)
I would like draw a filled polygon on iPhone with Google map (Version 1.1.1, the last one).
Anyone knows how to do like that on ios :
(My code on Android)
mMap.addPolygon(new PolygonOptions()
.addAll(latLngList)
.fillColor(Color.BLUE)
.strokeColor(Color.RED)
.strokeWidth(3));
Regards,
PS : If you have many solutions, keep in mind that I have many Polygon to draw.
The SDK currently doesn't support filled polygons, however there is a feature request to add them here:
https://code.google.com/p/gmaps-api-issues/issues/detail?id=5070
In the meantime, one option could be to draw your polygons into an image, and then add them as a ground overlay. This would be very limiting, but might work as a temporary workaround.
Another option is to add another view over the top of the map view and draw the polygons into it, and then update them whenever the map view moves. It isn't possible to perfectly synchronize another view with the map view, so your polygons will lag behind a bit as you pan/zoom around, but this might also be okay for you as a temporary workaround.
UPDATE
These are just some random ideas to try for the ground overlay approach, I'm not sure if they would work, but they might get you started:
I would suggest converting the lat/lon corners of the rectangle into MKMapPoint (using MKMapPointForCoordinate). These are equivalent to Google's coordinate system at zoom level 20.
You can then use the aspect ratio of the width/height of the rectangle in MKMapPoint coordinates to determine the aspect ratio of your ground overlay UIImage. Once you have the aspect ratio, you'll just need to experiment with actual sizes (ie guess a width, calculate the height from the aspect ratio) to find one which looks okay. The bigger it is, the finer the detail of your rectangle will be, but the more memory it will use, and probably the slower the performance will be. Also you might hit a hard limit at some size - I'm guessing the UIImage gets converted by the Google Maps SDK into a texture, and textures have a max size of 2048x2048 on iPhone 3GS+.
Then, use something similar to How to setRegion with google maps sdk for iOS? to calculate a zoom level and centre lat/lon. Instead of the map view width/height you would use your UIImage width/height, and you'd use the bounds of your rectangle instead of the bounds of the desired view. You also wouldn't need to calculate the scale from both the width and height (as the scale should be the same) - so just use one of them. Instead of creating a camera with the zoom level and centre lat/lon, set them on the GMSGroundOverlayOptions. Also set the ground overlay's anchor to the centre of the image (ie 0.5, 0.5).
The above describes how to add one GroundOverlay per rectangle. If you have lots of overlapping or nearby rectangles you could probably combine them into a single UIImage, but that would be a bit more complicated.
I want to display "natural size" pictures of goods on web site.
First of course i calculate size of picture :
<Height of picture in pixels> * <real height of item in mm>
-----------------------------------------------------------
<height of item on the picture in pixels>
Formula is logicaly correct and it works fine on
desktop 17'' 4:3 monitor 1280*1024.
Any other device shows metrics wrong.
I test:
2 smartphone.
22'' 1920*1080 desktop monitor
13.3'' 1366*768 notebook
14'' 1600*900 notebook
They all not 4:3 aspect ratio.
what's wrong with that? How can i reach my goal?
I search web but only workaround i found is to display piece of A4 size paper and ask user zoom page.
I better ask user to setup their system, but how to do it?
Unfortunately, although methods exist to query the browser for the exact pixels per inch of its display, the browser vendors decided to agree to a convenient lie... all browsers report 96 pixels per inch. Although you can get a browser to report this fact to you, there is no way to get the real pixels per inch.
A famous example is that there is no way through Javascript, HTML, or CSS to detect the difference between an IPad 2 and an IPad Mini, despite having radically different pixel density.
Actually I find the approach of using the paper and asking the user to zoom to calibrate the "real displayed size" rather clever. If you make it easy to use, I'm sure they will appreciate this feature!
In theory, by CSS 2.1 specs, the mm unit (and similar units like cm and in) relate to physical units. So if you set an image width in mm units, browsers should scale the image to the given physical measure, with the accuracy allowed by the resolution of the device.
In reality, browsers behave more the way described in the CSS3 Values and Units CR. The section on physical units says that 1in equals 96px by definition, and on high-resolution devices like printers, the inch is the anchor unit, corresponding to real physical inch, whereas on lower-resolution devices like displays, the pixel is the anchor unit. It adds: “Note that if the anchor unit is the pixel unit, the physical units might not match their physical measurements.” (Besides, even in printers, the correspondence between CSS in and a physical inch is not necessarily exact.)
So, mission impossible.
For calibration by the user, I would not use an A4 paper. It’s large, and not everyone has A4 papers at hand, especially in countries with a different standard paper size. A ruler, with both inches and millimeters, would be better. And perhaps you could add a zooming widget to make the zooming easier.
Thanks to all! I combined all of tips and make picture :
http://www.clker.com/clipart-258249.html
user takes one of common thing and fit it to picture by zoom.