aframe
aframe copied to clipboard
Adding a camera to an embedded A-Frame scene incorrectly renders the camera's aspect ratio
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 Did you find a solution to this?
@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.
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