Vue 3d loaderVue 3d loader
指南
  • English
  • 简体中文
GitHub
指南
  • English
  • 简体中文
GitHub
  • 指南

    • 介绍
    • 快速上手
    • 事件
    • API
    • 捐助
  • 样例

    • 加载一个模型
    • 加载多个模型并单独设置模型位置
    • 加载JSON模型
    • 加载Draco压缩模型
    • 设置场景高宽
    • 材质及纹理
    • 背景颜色及透明度
    • 交互控制
    • 旋转模型
    • 事件
    • 灯光
    • 相机位置及旋转
    • 并行加载多模型
    • 标注
    • 播放/停止动画
    • 开启阻尼
    • 加载进度
    • 控制相机垂直/水平旋转
    • 开启坐标轴及网格
    • 设置摄像头向内外的距离
    • 点光源跟随相机移动
    • 克隆相同模型

并行加载多模型

<template>
  <vue3dLoader
    :filePath="filePath"
    :scale="scale"
    :position="position"
    :rotation="rotation"
    :cameraPosition="{ x: 100, y: 200, z: 3000 }"
    :parallelLoad="true"
  ></vue3dLoader>
</template>
<script setup lang="ts">
import { vue3dLoader } from "vue-3d-loader";
import { ref } from "vue";
const filePath = ref();
filePath.value = [
  "/models/fbx/Samba Dancing.fbx",
  "/models/collada/pump/pump.dae",
  "/models/ply/Lucy100k.ply",
];
const position = ref();
position.value = [
  { x: 100, y: 100, z: 100 },
  { x: 300, y: 300, z: 300 },
];
const rotation = ref();
rotation.value = [
  { x: 0, y: 0, z: 0 },
  { x: 10, y: 1, z: 1 },
];
const scale = ref();
scale.value = [
  { x: 5, y: 5, z: 5 },
  { x: 3, y: 3, z: 3 },
];
</script>
在 GitHub 上编辑此页
上次更新: 2022/10/30 21:09
Contributors: Tony Tao
Prev
相机位置及旋转
Next
标注