3D Cube scrolling on hover, working on tablets - ipad

The only thing I want to know is if this is possible,
I want an 3d cube that scrolls(horizontally) if you move with your finger at the tablet screen. I want to use HTML5 + CSS3 For this, I am just not sure if this is possible.
Needs to work on iPads, iPhones, Galaxy tabs, etcetra.
I apprentice ur help if you you any more about this.

Since you're asking whether if this is possible or not, the answer is yes, it can be done.
Here's a demo that can at least point you to the right direction : http://www.paulrhayes.com/experiments/cube-3d/touch.html

Related

iOS Heavy image switching

I'm developing a app that will showcase products. One of the features of this app is that you will be able to "rotate" the product, using your finger/Pan-Gesture.
I was thinking in implementing this by taking photos of the product from different angles so when you "drag" the image, all I would have to do is switch the image according. If you drag a little, i switch only 1 image... if you drag a lot, i will switch them in cadence making it look like a movie... but i have a concerns and a probable solution:
Is this "performatic"? Since its a art/museum product showcase, the photos will be quite large in size/definition, and loading/switching when "dragged a lot" might be a problem because it would cause "flickering"... And the solution would be: instead of loading pic-by-pic i would put them all inside one massive sheet, and work through them as if they were a sprite...
Is that a good ideia? Or should I stick with the pic-by-pic rotation?
Edit 1: There`s a complicator: the user will be able to zoom in/out and to rotate the product in any axis (X, Y and Z)...
My personal opinion, I don't think this will work the way you hope or the performance and/or aesthetics will not be what you want.
1) Taking individuals shots that you then try to keyframe to based on touch events won't work well because you will have inevitable inconsistencies in 'framing' the shots such that the playback won't be smooth
2) The best way to do this, I suspect, will be to shoot it with video and shoot it with some sort of rig that allows you to keep the camera fixed while rotating the object
3) I'm pretty sure this is how most 'professional' grade product carousel type presentations work
4) Even then you will have more image frames than you need -- not sure whether you plan to embed the images files in app or download on demand -- but that is also a consideration in terms of how much downsampling you'll need to do to reduce frames/file size
Suggestion
Look at shooting these as video (somewhat like described above) and downsampling and removing excess frames using a video editor. Then you could use AVFoundation for playback and use your gestures to 'scrub' into the video frames. I worked on something like this for HTML playback at a large company and I can assure you it was done with video.
Alternatively, if video won't work for you. Your sprite sheet solution might work (consider using SpriteKit). But then keep in mind what I said about trying to keyframe one off camera shots together -- it just won't work well. Maybe a compromise would be to shoot static images but do so by fixing the camera and rotating the objects at very specific increments. That could work as well I suppose but you will need to be very careful about light and other atmospehrics. It doesn't take much variation at all to be detectable to the human eye causing the whole presentation to seem strange. Good luck.
A coder from my company did something like this before using 360 images of an object and it worked just great but it didn't have zoom. Maybe you could add zoom by adding a pinch gesture recognizer and placing the image view into a scroll view to zoom in on the static image.
This scenario sounds like what you really need is a simple 3D model loader library or write it in OpenGL yourself. But this pan and zoom behavior is really basic when you make that jump to 3D so it should be easy to find lots of examples.
All depends on your situation and time constraints :)

XNA game on Xbox screen dimming

I have a made a game for the Xbox 360 using XNA and whilst testing the game the screen seems to dim every 30 seconds. The way it dims is as if I have been away from the Xbox for a while. If I press the Xbox guide it goes back to normal. I've tried googling this issue and i've found a few people who have had the same problem but I couldn't seem to find any replies on those posts. If anyone knows what the issue is and how I could fix it it would be of great help as this is the last kink i'm trying to resolve with my game.
Just to convert my comment into an answer:
Many modern TVs and some monitors have a "dynamic contrast" feature where, if the displayed image is predominantly black, the intensity of the backlight will be reduced.
(Often it's really annoying, just making high-contrast black-background scenes go dark for no reason.)
The backlight can also be turned down as a power-saving feature, kind of like a screen-saver.
You could test on a monitor without this feature, disable this feature in your TV settings, or use a scene that isn't so dark.

Detect vertical or horizontal position iOS

I have an iPhone 4 and I would like to detect whether the phone is vertically straight (see first image) or horizontal (see second image). I am not talking about portrait vs landscape view detection.
I am new to iOS development and I think what I am looking for is the accelerometer (specifically the pitch property perhaps) or gyroscope. I have looked online and I am not quite understanding the code or whether I am looking for the right properties. Can someone please tell me how this can be done?
Thank you!
Try the accelerometer api and check the position of the phone.
here is a tutorial: http://tech.pro/tutorial/968/iphone-tutorial-reading-the-accelerometer

How to add continuous movement to iPad app

I'm writing a 3d car designer ipad app and I want to add a little "life" to it. I want it to be similar to what "3D Car Builder" iPad app does, in that from the moment the app starts, there's just the slightest amount of "movement" in the scene. Even if the iPad is sitting on the table, there's movement going on.
I'm testing on a 1st gen iPad, so whatever they've implemented, works on my device. I have (iOS 5 installed). I've looked up several things, thinking this was developed with the accelerometer, or possibly magnetometer, core motion of some sort...I can't figure out where to start. It might something as simple as moving the 3D scene in the x direction for a small amount, then y-direction, the negative x, then negative y. I dunno, it's something simple.
Anyone know how I/they might have implemented this?
Okay, nevermind...I figured this one out. Worked great using CCActionInterval

How to zoom a circular region with Cocos2d?

I am working on a Cocos2d project for iPad and iPhone, and now I need to develop something that looks too small for iPhone.
My first approach was to redesign it to make it possible to look bigger, but then I though that a region zoom effect would be great. The bad point is that I don't know how to do it... I really don't know what would be the correct/best approach to do it.
I have already checked out the Cocos2D CCLens3D build in effect, but it doesn't give me the results I want.
I would love to get the same result than when you long-press a textview/textfield on the UIKit:
Thanks in advance for your help!
If your still looking for a solution:
http://rombosblog.wordpress.com/2012/06/03/magnifierglassforcocos2d/
Uses CoreGraphics to render. Although this implementation works (requires some tweaking), I found that it lacked that Gaussian distribution effect I was looking for and was quite expensive if you updated the magnifying effect in a small interval.

Resources