Screenshot as preview for new content #108

Open
opened 1 month ago by utopiah · 0 comments
Owner
screenshotcanvas = document.querySelector('a-scene').components.screenshot.getCanvas('perspective')	
var sel = document.createElement("a-image")	
AFRAME.scenes[0].appendChild(sel) 	
sel.setAttribute("src", screenshotcanvas.toDataURL() )
sel.setAttribute("height", .1)
sel.setAttribute("width", .2)
sel.setAttribute("position", "0 1.4 -0.1")
targets.push(sel)

from https://git.benetou.fr/utopiah/text-code-xr-engine/src/branch/screenshot/index.html#L2006 could be use for new content, e.g https://git.benetou.fr/utopiah/text-code-xr-engine/src/branch/game-multiple-levels/index.html#L95

This means probably sending the screenshot itself to a backend.

```javascript screenshotcanvas = document.querySelector('a-scene').components.screenshot.getCanvas('perspective') var sel = document.createElement("a-image") AFRAME.scenes[0].appendChild(sel) sel.setAttribute("src", screenshotcanvas.toDataURL() ) sel.setAttribute("height", .1) sel.setAttribute("width", .2) sel.setAttribute("position", "0 1.4 -0.1") targets.push(sel) ``` from https://git.benetou.fr/utopiah/text-code-xr-engine/src/branch/screenshot/index.html#L2006 could be use for new content, e.g https://git.benetou.fr/utopiah/text-code-xr-engine/src/branch/game-multiple-levels/index.html#L95 This means probably sending the screenshot itself to a backend.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: utopiah/text-code-xr-engine#108
Loading…
There is no content yet.