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
654 stars 202 forks source link

Posibility to save the scene to codepen or other hosting service #27

Closed dmarcos closed 5 years ago

dmarcos commented 8 years ago

That would allow for quick iteration and easy sharing of derivative work.

dmarcos commented 8 years ago

Besides saving the scene locally.

fernandojsg commented 8 years ago

Some info: https://blog.codepen.io/documentation/api/prefill/

cvan commented 8 years ago

Check out https://react.rocks/example/esnextbin - it uses anonymous GitHub Gists well. If you have questions, let me know.

dmarcos commented 7 years ago

This is a differentiation with respect to native tools like Unity. Open, Edit and Share workflow is much harder in native

cvan commented 7 years ago

Check out http://hyperdev.com/ too

jsantell commented 7 years ago

How would this work (along with #382) when using local assets or scripts/components?

cvan commented 7 years ago

With budo, browsersync, webpack, etc. dev tools, a local dev server could rewrite the routes.

Gomix (formerly Hyperdev) offers a nice integrated Assets uploader that lets you reference assets locally and rewrites the paths to use absolute URLs on its CDN. Check out this boilerplate project: https://devilish-hip.gomix.me

Something similar to that approach would be the easiest. I've got a few ideas if someone wants to help tackle this workflow in Q1.

ngokevin commented 7 years ago

Local scripts can be XHRed and be turned into a script tag with innerHTML.

dmarcos commented 7 years ago

I would not handle local stuff for V1. The use case would be similar to codepen. Open an existing online scene, tweak it and share it. We can later look at more advanced stuff

Utopiah commented 7 years ago

Had a similar discussion this morning, definitely needed. Newcomers have usually no sysadmin skills so being able to visually edit a scene get them very excited until they try to save their result and get completely lost.

What about sending UploadCare then referring to it like with Apainter?

cvan commented 7 years ago

A few services to point to:

Utopiah commented 7 years ago

Naive version https://www.youtube.com/watch?v=CFH7cK1tJME

dmarcos commented 7 years ago

@Utopiah nice! Can you describe a bit the approach?

Utopiah commented 7 years ago

@dmarcos shamefully basic

  1. endpoint that saves the HTML to an .html file then sends back the URL to the inspector
  2. inspector send the HTML to the endpoint then open pages with received URL

cf https://vatelier.net/MyDemo/aframe-inspector/saving/doc.html

PS: can use for testing (make sure to go in and out of the inspector once on the saved scene, older bug from inspector, solved using document.getElementById('camera').setAttribute("camera", "active:true"))

Utopiah commented 7 years ago

With all the recent work on fixing saveSceneToHTML() and cleaning up the resulting HTML #482 #485 #443 #487 #488 #489 #490 #478 this could be worked on again.

Investigating for JSBin https://jsbin.com/help/api#writeapi and glitch https://twitter.com/utopiah/status/827193459937271810 cf prior exploration.

ngokevin commented 5 years ago

not a common workflow and saving the scene without having access to source is pretty impossible. glitch has worked well for remixing