简体   繁体   English

使用A形框架在2个点之间绘制一个A圆柱

[英]Draw a-cylinder between 2 dots with A-frame

i just newbie in a-frame, and i cant find information about it. 我只是一个框架的新手,我找不到有关它的信息。

I have 2 dots, start and end, ex: {x: 0, y: 0, z: 0} and { x: 10, y: 0, z: 0 } How can i place a cylinder between them, or i must do transform with translate and rotate manually? 我有2个点,开始和结束,例如: {x: 0, y: 0, z: 0}{ x: 10, y: 0, z: 0 }我如何在它们之间放置圆柱,否则我必须手动平移和旋转进行变换?

When arranging your scene way, it's helpful to use the A-Frame inspector to visually drag things around and resize them. 安排场景方式时,使用A框架检查器以视觉方式拖动事物并调整其大小会很有帮助。 This inspector is be opened with ctrl + alt + i . 使用ctrl + alt + i打开此检查器。

In this particular case, the tube component might actually be closer to what you want. 在这种特殊情况下, tube组件实际上可能更接近您想要的组件。 It draws a cylinder along an arbitrary list of points you provide: 它沿着您提供的任意点列表绘制圆柱体:

<a-tube path="5 0 5, 5 0 -5, -5 0 -5" radius="0.5" material="color: red"></a-tube>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM