How To Create A Surface With Background Opacity But Not Text
Posted by blogmeister on
July 4, 2014
Simply set the property backgroundColor with an rgba() value. RGBA means RGB (red, green, blue) + Alpha where you set the opacity.
If you want it to be invisible, set it to 0, else 1. If you want it to be semi transparent then set values between 0 and 1.
This is an example on how to set the background of a Surface to transparent.
|
1 |
surface.setProperties({ backgroundColor: 'rgba(0, 0, 0, 0)' }); |
And this is how to set it back to normal.
|
1 |
surface.setProperties({ backgroundColor: 'rgba(0, 0, 0, 1)' }); |
Share the post "How To Create A Surface With Background Opacity But Not Text"
tags: background, color, opacity, property, rgba, surface, transparent
No Comments
Array Of ImageSurface Overlaps When Displayed In Famo.us
Posted by blogmeister on
June 30, 2014
So I was working with an array of ImageSurface that after doing a shuffle procedure, once displayed, the images of the ImageSurface overlapped incorrectly.
I mean, when I created each ImageSurface at startup and added them to the view, it displayed correctly, overlapping each other sequentially in the correct manner.
However, once that shuffle procedure happened the overlapping got messed up. I did not understand what was happening until I came across a post in the StackOverflow forum that said when you instantiate an ImageSurface, regardless if you had not added it to the context or view, it is automatically added in the rendering tree.
So if you do this:
|
1 2 |
surface2 = new Surface(); surface1 = new Surface(); |
And add these ImageSurface objects to a view like this:
|
1 2 3 |
view = new View(); view.add(surface1); view.add(surface2); |
The surface2 object will always be below surface1. So since my case had to do with shuffling the ImageSurface, the solution was to call the setOptions() method and set its z-index order like this:
|
1 2 |
surface1.setOptions({ properties: { zIndex : 1 } }); surface2.setOptions({ properties: { zIndex : 2 } }); |
In this example, surface2 will then always be on top of surface1.
Share the post "Array Of ImageSurface Overlaps When Displayed In Famo.us"
tags: array, dom, famo.us, imagesurface, overlap, rendering tree, surface, z-index, zindex
No Comments
Microsoft’s OmniTouch Turns Any Surface Into A Touchscreen
Posted by blogmeister on
October 18, 2011
Microsoft’s OmniTouch turns any surface into a touchscreen Yes. Any. According to the article at Digital Trends, a team of researchers working at Microsoft have developed a more focused, personal multi-touch device.
“With the combined effort of the Carnegie Mellon Human Computer Interaction Institute and Microsoft, researchers have developed wearable hardware that turns any surface into a usable workspace.
Similar in design to the Microsoft Kinect for the Xbox 360, the OmniTouch device uses a camera that senses short-range depth, a small pico projector and a 3D modeling system to understand where the user is touching.
The projector and the camera have to be calibrated to the user in order for the touch system to accurately match up to the user’s actions. The device can sense when a user’s hand if hovering over the surface as well as understand the depth when a user taps a button on the main surface.”
Wow! Once they release this technology to the public I would be utterly impressed. I already am impressed with their Kinect technology, seeing as how it is more amazing than that of Nintendo’s Wii technology. This one though, will surely bring to fruition what we see in sci-fi movies.
Still, what they have accomplished now is very much amazing. Imagine what the possibilities are once companies will adopt this technology.
Share the post "Microsoft’s OmniTouch Turns Any Surface Into A Touchscreen"









