在A-Frame中:使用超级手抓住“ textarea”实体有麻烦

时间:2018-07-24 07:27:05

标签: aframe-super-hands

我能够移动原始box的实例,但不能移动实体textarea的实例。我正在尝试的代码如下(仅显示了相关代码。多维数据集是可移动的,textarea没那么多。)。

关于如何解决textarea组件以便接受grabbable事件的任何想法吗?

<script src="https://unpkg.com/aframe-textarea-component/dist/aframe-textarea-component.min.js"></script>

<a-mixin id="cube" geometry="primitive: box; width: 0.5; height: 0.5; depth: 0.5"
hoverable grabbable
event-set__hoveron="_event: hover-start; material.opacity: 0.7; transparent: true"
event-set__hoveroff="_event: hover-end; material.opacity: 1; transparent: false">
</a-mixin>

<a-mixin id="movetext1" a-entity:"textarea; width: 0.5; height: 0.5; depth: 0.5"
hoverable grabbable
event-set__hoveron="_event: hover-start; material.opacity: 0.7; transparent: true"
event-set__hoveroff="_event: hover-end; material.opacity: 1; transparent: false">
</a-mixin>
.
.
.
<a-entity id="cube01" class="cube" mixin="cube" position="-0.9 1 -0.9" material="color: yellow"></a-entity>

<a-entity id="movetext1" cursor-listener position="0 0 -1" look-at="#cam" textarea="cols: 20; rows: 4; text: Replace this text; backgroundColor: #01579b; color: white;">
</a-entity>

0 个答案:

没有答案