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

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

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

点光源跟随相机移动

<template>
  <vue3dLoader
    filePath="/vue-3d-loader-docs/models/collada/elf/elf.dae"
    :lights="lights"
    :cameraPosition="{ x: 0, y: 10, z: 10 }"
    :pointLightFollowCamera="true"
    :height="350"
  />
</template>
<script setup lang="ts">
import { ref } from "vue";
import { vue3dLoader } from "vue-3d-loader";

const lights = ref();
lights.value = [
  {
    type: "point", // or pointLight
    color: "#ffffff",
    position: { x: 0, y: 0, z: 400 },
    intensity: 1
  }
]
</script>

在 GitHub 上编辑此页
上次更新: 2023/11/2 01:16
Contributors: king2088
Prev
设置摄像头向内外的距离
Next
克隆相同模型