Well done Sriram, this looks awesome! Suggestions:
1- Make the layers cubes instead of planes - all the other sides of the
cube can just be some generic colour, but adding a bit of thickness
will help distinguish the layers better (the 3D layout inspector in
Firefox does this, for example)
2- To select a layer by clicking, you'll find it much easier to use
colour picking rather than doing the vector maths - Render the scene
with each layer as a unique colour (and don't rely on perfect colour
readback - 12 bits of accuracy is usually a good amount of accuracy to
rely on) and read back the colour at the cursor point. If you want to
be really clever about this, set a scissor rect so that only that pixel
renders, and really really clever, set a viewport instead of a scissor
rect because it's faster
3- Layer outlines would be nice - if you don't mind manky old GL stuff,
GL_LINE would do nicely, otherwise a shader based on the distance to
the edge of the surface would do the job too
So cool.
--Chris
On 30 July 2013 20:08:15, Sriram Ramasubramanian wrote:
Hi Firefox-Devs,
I've been working on an Eclipse Plugin for Android development and …
Thanks,
Sriram.
Begin forwarded message:
*From: *Sriram Ramasubramanian <[email protected]
<mailto:[email protected]>>
*Subject: **Eclipse Plugin*
*Date: *July 30, 2013 11:46:29 AM PDT
*To: *"[email protected]
<mailto:[email protected]>" <[email protected]
<mailto:[email protected]>>
Namaste front-end-ers,
I've been working on an Eclipse Plugin for Android development. With
the standard set of tools, it's really hard to find what all views
are currently visible in an application. The hierarchy viewer shows
the tree view that none can understand, and the UI automator viewer
shows a screenshot of the device with the bounds mapped over it. How
can one find what a view draws? We've seen problems with ImageView
drawing a background and an image on top of it. To mitigate such
problems, my plugin, tentatively named as Droid Inspector (though the
name varies a lot inside the plugin now :P ), helps visualize each
view separately in 3D (glass-free), and find problems. It captures
the background and content for each view as separate layers, so they
can be shown/hidden separately.
What does it look like?
http://cl.ly/image/273d0l3H212B is how it looks. A 3D view, a
hierarchy tree and a box model (thanks Faaborg).
How do I get it?
This is still in development and tentatively parked at:
http://sriramramani.com/downloads/Droid%20Inspector/
You can install this by Help > Install New Software… in Eclipse.
(Remove %20 in eclipse).
I am facing issues. How do I..?
1. Please install LWJGL from
http://jevopi.de/updatesite/org.lwjgl.updatesite
This is a pre-requisite as this gives the 3D view. (I couldn't find a
better update site for it :( ).
2. Please update your eclipse/ADT. There would be dependency clashes
from ADT. Resolving is a pain, but I hope you can get through it ;)
3. Now try installing this plugin. It should go smooth.
I think I've installed. How can I be sure?
After re-starting, open DDMS perspective. In the Device view, there
should be a "Copy" icon. (Ya! I'm still working on icons. :( ).
That's my plugin!
"So you are telling me that I spent so much time to install your
plugin to get this small copy icon here??"
Umm… ya! But no. This works on the same way as HierarchyViewer. After
a couple of settings tweak, we are good to go.
Go to Eclipse > Preferences > Android > DDMS and enable "Use ADBHOST".
Now the eclipse plugin side is all fine. To use this plugin with any
application, the application needs to add a library and 3 lines of
code. The library can be found at:
https://dl.dropboxusercontent.com/u/3017599/Droid%20Inspector/droidinspector.jar
But I'm not going to put you through the series of adding this
library to Fennec and trying the plugin. I made that for you:
http://cl.ly/381d3E3x1Y2x
After installing Fennec sriramramasub… please go back to DDMS. It
should show the Fennec. Select it and click on my plugin. It should
collect all info, and open the file. If this all works you could see
something like in the screenshot :D
Operations:
Click-and-drag to rotate the 3D view.
Mouse scroll (mac-swipe) to zoom-in and zoom-out.
Shift + Click-and-drag to move entire model.
Alright, so what do you want now?
:D :D How does it feel? Is it working fine? Worth the pain of
installing the plugin? What features do you want more?
Known issues:
1. Background check box doesn't work.
2. Selecting a view in 3D window doesn't work -- I'm refreshing my
8th grade math on planes and normal vectors for this.
Extras:
1. To use it with other application, add the droidinspector.jar to
your class path and add this code:
http://www.pastebin.mozilla.org/2746064
Currently only the first registered application shows up. So, please
run only one application to monitor. I'll fix it this weekend.
2. I'll post this to mobile-firefox-dev once Android UI team can
install it easily :D
That's all folks!
Oh! As Gary says, "DO NOT TWEET" :D :D
Thanks,
Sriram.
_______________________________________________
mobile-frontend mailing list
[email protected] <mailto:[email protected]>
https://mail.mozilla.org/listinfo/mobile-frontend
_______________________________________________
mobile-firefox-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/mobile-firefox-dev
_______________________________________________
mobile-firefox-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/mobile-firefox-dev