A-Frame: Break in “Perspective Screenshot” functionality between releases 0.9.0 and 0.9.2?

假如想象 提交于 2019-12-11 07:49:12

问题


In this glitch.com page:

https://glitch.com/~query-aframe-perspective-screenshot
click into the 3D scene (or click the "show" button) and press spacebar
the page will attempt to download a perspective screenshot described here:
https://aframe.io/docs/0.9.0/components/screenshot.html#perspective-screenshot

~the scene will freeze

edit the project and reset the a-frame release to 0.9.0
click through to the scene, and press the spacebar
the page will again attempt to download a perspective screenshot

~the scene may pause, but should resume

under release 0.9.2:

console throws:
- three.js:23652 THREE.WebGLRenderer.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead.
- three.js:23652 three.js:23659 THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead.

below is my entire a-frame component, with space-grab applied to the scene itself:

AFRAME.registerComponent("space_pause",

{
    init: function()
    {
      var scenic = document.querySelector("#scenic");
      document.body.onkeyup = function(e){
        if(e.keyCode == 32){
            scenic.components.screenshot.capture('perspective');
        }
      }
    }
});  

Have I identified a bug?

Note:
- for my purposes (at the moment) ignore any distortions you may observe in downloaded screenshots


回答1:


This is a known issue that has been fixed. Use a build from master




回答2:


Three.js r102 changed WebGLRenderer public API. Since A-Frame 0.9.2 still wasn't updated to these changes, warnings are thrown, but functionality is still working.

This is also the reason why screen freezes for a brief moment. Issue has already been reported and fixed. So, everything should be good on the next release.



来源:https://stackoverflow.com/questions/56760557/a-frame-break-in-perspective-screenshot-functionality-between-releases-0-9-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!