Linux Firefox X11: Turn On 3D View Button

by on August 17, 2012 · 2 comments· LAST UPDATED August 18, 2012

in Open Source, Web Developer

Mozilla Firefox version 11.x+ has support for 3D view. It is a WebGL based website visualization tool that highlights page structure. You can see relationship between your code and the page output by stacking elements as they are nested in the DOM and lets you see elements that are hidden or off the page. You can zoom in and out, rotate and pan the view to see the page from any angle that is helpful to you. In this blog post I will explain how to enable 3D view on X11. Please note that the 3D view is not for your daily browsing needs. It is useful for finding out bugs such as nesting issues or even XSS vulnerabilities. Personally, I use 3D view as a tool to understand divs, spans, and other elements on the page.

Requirements

You need to 3d accelerator graphics card such as NVIDIA, ATI/AMD and Intel cards with WebGL support - a JavaScript API for rendering interactive 3D graphics and 2D graphics. However, not all cards are supported. See this page for more information.

How do I enable 3D view under X11?

You need to turn on inspector.
Right-click page > Select inspect element (Q)

Fig.01: Turning on the 3D view

Fig.01: Turning on the 3D view

You will see bar at the bottom with a "3D View" button as follows:

Fig.02: 3D view button at the bottom

Fig.02: 3D view button at the bottom

How do I rotate and view pages in 3D?

  1. You can use mouse wheel to zoom in/out.
  2. Mouse button to select element.
  3. Hold mouse button move left / right / up / down.

Keyboard functions

  1. Zoom in/out : + / -
  2. Rotate left/right : a / d
  3. Rotate up/down : w / s
  4. Pan left/right : /
  5. Pan up/down : /
  6. Reset zoom level : 0
  7. Focus on selected node : f
  8. Reset view : r
  9. Hide current node : x

Sample outputs:

Fig.03: 3D view in action

Fig.03: 3D view in action (click to enlarge)

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!
  • memberjoe

    It is a fantastic trick!!!!! Thanks!

  • Karim

    Hi thanks for this article,
    but I have 3d accelerator and I don’t find 3d view button

Previous post:

Next post: