A字架box/camera位置
A-frame box/camera position
我什么都能做,但我的盒子一开始总是在镜头下。怎么了?我想创建一条街道,我想在左边放一个盒子,在右边放一个盒子。
<html>
<head>
<meta charset="utf-8">
<title>something</title>
<meta name="description" content="something">
<meta name="apple-mobile-web-app-capable" content="yes">
</head>
<body>
<a-assets>
<img id="texture_0" src="textures/floor.jpg">
<img id="texture_1" src="textures/house1.jpg">
<img id="sky" src="background/sky.jpg">
</a-assets>
<!-- LEFT HOUSE -->
<a-box color="#FFF" width="2" height="2" depth="2" position="0 0 0" rotation="0 0 45" scale="2 0.5 3" src="#texture_1">
<!-- FLOOR -->
<a-box material="src: #texture_0; repeat: 50 30" width="200" depth="200" density="40" transparent="true" opacity="0.75" position="0 -6 0">
<!-- SKY -->
<a-sky src="#sky"></a-sky>
<!-- RIGHT HOUSE -->
<!-- <a-box material="src: #texture_2; repeat: 50 30" width="200" depth="200" density="40" transparent="true" opacity="0.75" position="0 -50 0"></a-ocean> -->
<a-camera position="100 1.8 100">
<a-cursor color="#2E3A87"></a-cursor>
</a-camera>
</a-scene>
</body>
</html>
您正在更改其位置的 Y 值,这将使它们上下移动。您可能需要更改 Z 或 X 变量。
例如,在 "Right House," 而不是: position="0 -50 0"
你可能想要 position="0 0 -50"
或 position="-50 0 0"
此外,您的 Right House 结束标记是 </a-ocean>
而不是 </a-box>
并且您需要用 <a-box>
关闭 Left House 和 Floor 上的 <a-box>
标签
我什么都能做,但我的盒子一开始总是在镜头下。怎么了?我想创建一条街道,我想在左边放一个盒子,在右边放一个盒子。
<html>
<head>
<meta charset="utf-8">
<title>something</title>
<meta name="description" content="something">
<meta name="apple-mobile-web-app-capable" content="yes">
</head>
<body>
<a-assets>
<img id="texture_0" src="textures/floor.jpg">
<img id="texture_1" src="textures/house1.jpg">
<img id="sky" src="background/sky.jpg">
</a-assets>
<!-- LEFT HOUSE -->
<a-box color="#FFF" width="2" height="2" depth="2" position="0 0 0" rotation="0 0 45" scale="2 0.5 3" src="#texture_1">
<!-- FLOOR -->
<a-box material="src: #texture_0; repeat: 50 30" width="200" depth="200" density="40" transparent="true" opacity="0.75" position="0 -6 0">
<!-- SKY -->
<a-sky src="#sky"></a-sky>
<!-- RIGHT HOUSE -->
<!-- <a-box material="src: #texture_2; repeat: 50 30" width="200" depth="200" density="40" transparent="true" opacity="0.75" position="0 -50 0"></a-ocean> -->
<a-camera position="100 1.8 100">
<a-cursor color="#2E3A87"></a-cursor>
</a-camera>
</a-scene>
</body>
</html>
您正在更改其位置的 Y 值,这将使它们上下移动。您可能需要更改 Z 或 X 变量。
例如,在 "Right House," 而不是: position="0 -50 0"
你可能想要 position="0 0 -50"
或 position="-50 0 0"
此外,您的 Right House 结束标记是 </a-ocean>
而不是 </a-box>
并且您需要用 <a-box>
<a-box>
标签