0.0.13 • Published 6 months ago

@zhengyuzi/gltf-viewer-for-vue v0.0.13

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

@zhengyuzi/gltf-viewer-for-vue

Vue3 gltf 3D model viewer, based on @zhengyuzi/gltf-viewer.

Installing

# install peer dependency
npm install three
# install package
npm install @zhengyuzi/gltf-viewer-for-vue

Usage

import "@zhengyuzi/gltf-viewer-for-vue/dist/style.css"

Basic

<script setup lang="ts">
import { ref } from 'vue'
import { Viewer } from '@zhengyuzi/gltf-viewer-for-vue'

const _Viewer = ref<InstanceType<typeof Viewer> | null>(null)
</script>

<template>
  <div style="width: 100vw; height: 100vh;">
    <Viewer ref="_Viewer" url="/test.glb" />
  </div>
</template>

Using ControlPanel

<script setup lang="ts">
import { ref } from 'vue'
import { Viewer, ViewerControlPanel } from '@zhengyuzi/gltf-viewer-for-vue'

const _Viewer = ref<InstanceType<typeof Viewer> | null>(null)
</script>

<template>
  <div style="width: 100vw; height: 100vh;">
    <Viewer ref="_Viewer" url="/test.glb">
      <ViewerControlPanel />
    </Viewer>
  </div>
</template>
0.0.13

6 months ago

0.0.12

6 months ago

0.0.11

6 months ago

0.0.10

6 months ago

0.0.9

6 months ago

0.0.8

6 months ago

0.0.6

7 months ago

0.0.7

7 months ago

0.0.5

7 months ago

0.0.4

7 months ago

0.0.3

7 months ago

0.0.2

7 months ago

0.0.1

7 months ago