【问题标题】:How do I show 360 image in a-frame a-scene with custom size?如何在具有自定义尺寸的一帧场景中显示 360 度图像?
【发布时间】:2017-10-31 06:40:24
【问题描述】:

我有这样的代码

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%;
}

标题

<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

【问题讨论】:

    标签: meanjs aframe


    【解决方案1】:

    你需要有一个像这样的包装元素:

    <div id="wrapper" style="height:600px;width:600px">
        <a-scene embedded style="height:100%;width:100%>
        </a-scene>
    </div>
    

    现场小提琴here

    【讨论】:

      猜你喜欢
      • 2018-01-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-05-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多