如何在 a-frame a-scene 中显示自定义尺寸的 360 度图像?
How do I show 360 image in a-frame a-scene with custom size?
我有这样的代码
HTML
<a-scene embedded>
<a-sky src="modules/core/client/img/images/some.jpg" rotation="0 -130 0"></a-sky>
</a-scene>
CSS
a-scene {
height: 300px;
width: 50%;
}
header
<script src="../../../dist/aframe-master.js"></script>
它可以全屏显示(没有添加嵌入到 a-scene 标签)。添加 embedded 后,它给了我这些一堆 WebGL 错误和警告。
three.js:17443 THREE.WebGLShader: Shader couldn't compile.
WebGL: INVALID_OPERATION: useProgram: program not valid
three.js:16803 WebGL: INVALID_OPERATION: drawArrays: no valid shader program in use
您需要像这样的包装器元素:
<div id="wrapper" style="height:600px;width:600px">
<a-scene embedded style="height:100%;width:100%>
</a-scene>
</div>
直播fiddlehere
我有这样的代码
HTML
<a-scene embedded>
<a-sky src="modules/core/client/img/images/some.jpg" rotation="0 -130 0"></a-sky>
</a-scene>
CSS
a-scene {
height: 300px;
width: 50%;
}
header
<script src="../../../dist/aframe-master.js"></script>
它可以全屏显示(没有添加嵌入到 a-scene 标签)。添加 embedded 后,它给了我这些一堆 WebGL 错误和警告。
three.js:17443 THREE.WebGLShader: Shader couldn't compile.
WebGL: INVALID_OPERATION: useProgram: program not valid
three.js:16803 WebGL: INVALID_OPERATION: drawArrays: no valid shader program in use
您需要像这样的包装器元素:
<div id="wrapper" style="height:600px;width:600px">
<a-scene embedded style="height:100%;width:100%>
</a-scene>
</div>
直播fiddlehere