aframe icon indicating copy to clipboard operation
aframe copied to clipboard

Adding a camera to an embedded A-Frame scene incorrectly renders the camera's aspect ratio

Open roskelld opened this issue 7 years ago • 3 comments

Adding a camera to an embedded A-Frame scene incorrectly renders the camera's aspect ratio.

The camera's aspect ratio can be fixed by manipulating the window via an action such as resize, open console etc...

  • A-Frame Version: 0.7.0
  • Platform / Device: PC Windows
  • Reproducible Code Snippet or URL: I simulated this by adding a camera to a loaded scene a few seconds after it loads. https://glitch.com/edit/#!/boulder-viscose

roskelld avatar Nov 20 '17 02:11 roskelld

@roskelld Did you find a solution to this?

jhnoor avatar Nov 17 '18 20:11 jhnoor

@jhnoor Sadly not that I recall. I haven't been using A-Frame for a while now so I'm not up to speed on things.

roskelld avatar Nov 17 '18 20:11 roskelld

Sorry for being a few years late to the party.

For anyone still looking for an answer to this, you can move your a-frame work in a separate file, remove the "embedded" on your <a-scene>, then use <iframe allowfullscreen="yes" allowvr="yes" src="/a-frame_scenes/test.html"> </iframe> in your regular HTML document to embed the scene.

Source : https://aframe.io/docs/1.2.0/components/embedded.html#using-i-frames

zhakk-harn avatar Oct 20 '21 09:10 zhakk-harn