Snapshot to Entity texture (proof-of-concept / demo to try)


#1

Here is a quick experiment using snapshots as part of generated in-world content:

#####SnapshotRezzer v0.0.1
http://imgur.com/OjhFTvA
Client Script: SnapshotRezzer.js
(URL can be loaded into Interface using Ctrl+Shift+o)

Once the script starts an initial dialog appears to confirm, which you can then hide. Later when snapshots are taken (ie: using Ctrl+s) the dialog reappears automatically, offering to generate a new ATP texture and Model Entity using the most recent image:

Assuming sufficient Domain permissions, when you click generate it will:

  1. Upload your last snapshot to the ATP server.
  2. Spawn a new photo frame Model Entity.
  3. Assign the resulting atp: URL as a texture.

So far I’ve only tested this in non-HMD mode. If curious to see how the prototype works both the .js and .qml are up as a Gist: https://gist.github.com/humbletim/251e7b875a3244d13bf79ac4dbb0d887

Here is an example of how the resulting Entity properties look:

...
   "type": "Model",
   "name": "SnapshotShare",
   "modelURL": "http://cdn.xoigo.com/hifi/pod_frame.fbx#20160712",
   "compoundShapeURL": "http://cdn.xoigo.com/hifi/pod_frame.fbx#20160712",
   "shapeType": "compound",
   "textures": "{\"backlight\":\"atp:/snapshots/hifi-snap-by-humbletim--on-2016-08-21_00-39-33.jpg\"}",
   "userData": "{\"location\":\"hifi://127.0.0.1/1.00488,-0.912559,-14.3754/0,0.230939,0,0.972968\",\"hash\":\"765d707bc8f343db615b8ad93b014576c5d0bdacf860c8d3e8ca220547d16c16\"}",
...

(The userData isn’t used for anything yet, but maybe someone wants to make an Entity script for teleporting to the stored location?)

… heh, time to make a VR :cloud_tornado: !