You can install this extension from the Firefox and Chrome extension stores or download the latest release and follow the instructions for your browser below.
Universal bookmarklet version
Simply prefix this code with `javascript:` and save it as a bookmark on Chrome or Firefox. This is a 1-1 equivalent to the full extension with the default configuration.(()=>{let e=t=>[...t.children].reduce((t,n)=>Math.max(t,e(n)),0)+1,t=e(document.body),n=(e,n=0,o=0)=>`hsl(${n}, 75%, ${Math.min(10+e*(1+60/t),90)+o}%)`,o=document.body;o.style.overflow="visible",o.style.transformStyle="preserve-3d",o.style.perspective=1e4;let r=window.innerWidth/2,i=window.innerHeight/2;o.style.perspectiveOrigin=o.style.transformOrigin=`${r}px ${i}px`,function e(t,o,r,i){for(let l=t.childNodes,s=l.length,d=0;d<s;d++){let s=l[d];if(1!==s.nodeType)continue;let f=n(o,190,-5);Object.assign(s.style,{transform:"translateZ(20px)",overflow:"visible",transformStyle:"preserve-3d",backgroundColor:f});let a=r,c=i;s.offsetParent===t&&(a+=t.offsetLeft,c+=t.offsetTop),e(s,o+1,a,c)}}(o,0,0,0),document.addEventListener("mousemove",e=>{let t=180*(1-e.clientY/window.innerHeight)-90,n=180*e.clientX/window.innerWidth-90;o.style.transform=`rotateX(${t}deg) rotateY(${n}deg)`})})();
In Firefox
- Go to
about:debugging#/runtime/this-firefox
- Click "Load Temporary Addon"
- Select
manifest.json
in the downloaded folder - Extension should now be installed, you can find it in the top right extensions menu (puzzle piece icon) and pin it if desired
In Chrome/Chromium browsers
- Go to
chrome://extensions
- Enable "Developer Mode" in the top right
- Click "Load Unpacked"
- Select the downloaded folder
- Extension should now be installed, you can find it in the top right extensions menu (puzzle piece icon) and pin it if desired
Specific Chromium browsers may have additional steps.
- In Opera, enable "Allow access to search page results"
In Microsoft Edge
- Go to
edge://extensions
- Click "Load Unpacked"
- Select the downloaded folder. Please use the Chrome version of the extension.
- Extension should now be installed, you can find it in the top right extensions menu (puzzle piece icon) and pin it if desired
Click the extension icon to enable 3D DOM view or right-click it for options.
Option | Description |
---|---|
Show Surfaces | Toggle visibility of element surfaces |
Show Sides | Toggle visibility of element sides |
Require Drag | Only rotate when dragging |
Require Alt | Only rotate when Alt key is pressed |
Randomize Color | Apply random colors to elements |
CSS Selectors | Set CSS selectors to selectively color elements |
- Run
yarn install
- Run
yarn watch
to watch for changes and automatically rebuild the extension. - Load the extension from
dist/{browser}
following the steps above.
For Safari, you can run xcrun safari-web-extension-converter dist/safari
and try to go from there. No success so far.
All help in diagnosing and fixing these key issues is welcome! I've linked to an Issue for each of them.