THREE

@

概述

如有不明白的可以加QQ:2354528292;wx: aichitudousien
更多教学视频请访问:https://space.bilibili.com/236087412

使用aframe加载模型,然后使用语音识别功能对模型进行控制,模型可做起跳,奔跑等动作,详细请看视频:

[video(video-SoCPRoxD-1636879210261)(type-csdn)(url-https://live.csdn.net/v/embed/179928)(image-https://vedu.csdnimg.cn/61edd565896b42509b97a59beac23675/snapshots/08c73dbd239e4139a27b635ecd2dd692-00003.jpg)(title-Three.js + 语音识别控制模型动画)]

aframe核心代码

  <a-scene>
    <div class="dropdown">
      <el-select v-model="walkAnimation" placeholder="请选择">
        <el-option v-for="(item, key) in animate" :key="key" :label="item" :value="key">
        </el-option>
      </el-select>
    </div>
    <div class="voice">
      <el-button @click="startVoice" type="primary" round>{{ text }}</el-button>
    </div>
    <a-sky src="sky.jpg"> </a-sky>
    <a-entity id="walker2" position="0 0 -5" visible="true">
      <a-entity
        gltf-model="model/dino.glb"
        id="dino"
        scale="1.5 1.5 1.5"
        animation-mixer="clip:Idle"
        rotation="0 90 0"
        shadow="cast: true"
      >
      </a-entity>
    </a-entity>
  </a-scene>

posted @ 2023-04-26 20:53  爱吃土豆丝嗯  阅读(52)  评论(0编辑  收藏  举报