aframevr / aframe-inspector

:mag: Visual inspector tool for A-Frame. Hit *<ctrl> + <alt> + i* on any A-Frame scene.
https://aframe.io/aframe-inspector/examples/
MIT License
655 stars 203 forks source link

Exported HTML has broken interface #528

Closed goopypanther closed 5 years ago

goopypanther commented 6 years ago

If you export a page to HTML, open the downloaded page and enter the inspector again you can not pan or rotate the display or click anything in the 3d environment. Both side panels still function and the environment will respond to changes made using them.

This appears to be due to a pair of canvas tags that are injected immediately after the first <a-scene> tag: <canvas class="a-canvas" data-aframe-canvas="true" width="300" height="150"></canvas>

Removing these tags fixes the issue and allows for normal interaction again. Tested in both firefox 57.0.1 and chrome 63.0.3239.84 on linux.

goopypanther commented 6 years ago

On closer inspection the insertion is actually occurring in this expression: https://github.com/aframevr/aframe-inspector/blob/b39deddfc245a7f83c10d5c54a36947e7dd94d49/src/lib/exporter.js#L71-L73 at getClipboardRepresentation(sceneEl)

Which is calling: https://github.com/aframevr/aframe-inspector/blob/b39deddfc245a7f83c10d5c54a36947e7dd94d49/src/actions/entity.js#L147-L169

ngokevin commented 5 years ago

I've removed this feature, Inspector was made for working/tweaking a project, not building a project from scratch (there are other projects have been made for that! ottifox/hologram.cool). So exporting an entire project (which has assets, multiple files, paths) without any clue of the source code could never really work well beyond hello world.