All Projects → hujiulong → Vue 3d Model

hujiulong / Vue 3d Model

Licence: mit
📷 vue.js 3D model viewer component

Programming Languages

Vue
7211 projects
javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to Vue 3d Model

Ternion
A simple starter kit to prototype quickly your ideas with Three.js
Stars: ✭ 89 (-95.38%)
Mutual labels:  webgl, threejs
React 3d Viewer
A 3D model viewer component based on react.js 一个基于react.js的组件化3d模型查看工具
Stars: ✭ 100 (-94.81%)
Mutual labels:  webgl, threejs
Sky Shader
☀️ WebGL sky and sun shader editor
Stars: ✭ 90 (-95.32%)
Mutual labels:  webgl, threejs
Ipyvolume
3d plotting for Python in the Jupyter notebook based on IPython widgets using WebGL
Stars: ✭ 1,696 (-11.9%)
Mutual labels:  webgl, threejs
Partykals
Particles system library for THREE.js
Stars: ✭ 109 (-94.34%)
Mutual labels:  webgl, threejs
Three Forcegraph
Force-directed graph as a ThreeJS 3d object
Stars: ✭ 84 (-95.64%)
Mutual labels:  webgl, threejs
Fe Daily Record
📚前端书籍汇集点 + 每日好文推荐 + 公开课学习资料 + 各种大会资料
Stars: ✭ 94 (-95.12%)
Mutual labels:  webgl, threejs
Water
waterdrop 3D 《三体 · 水滴计划》
Stars: ✭ 74 (-96.16%)
Mutual labels:  webgl, threejs
Three.meshline
Mesh replacement for THREE.Line
Stars: ✭ 1,644 (-14.6%)
Mutual labels:  webgl, threejs
Solar System Threejs
The Solar System: Modeled to scale with Three.js
Stars: ✭ 107 (-94.44%)
Mutual labels:  webgl, threejs
Thehallaframe
WebVR demo that displays art
Stars: ✭ 120 (-93.77%)
Mutual labels:  webgl, threejs
Webxr Handtracking
👐 WebXR hand tracking examples
Stars: ✭ 116 (-93.97%)
Mutual labels:  webgl, threejs
Lol Heroes
LOL 3D gallery based on WebGL
Stars: ✭ 82 (-95.74%)
Mutual labels:  webgl, threejs
Threejs Starter
Stars: ✭ 89 (-95.38%)
Mutual labels:  webgl, threejs
Sketch Threejs
Interactive sketches made with three.js.
Stars: ✭ 1,227 (-36.26%)
Mutual labels:  webgl, threejs
Hlviewer.js
Half-Life in WebGL
Stars: ✭ 93 (-95.17%)
Mutual labels:  webgl, threejs
Vimeo Depth Player
A WebVR volumetric video renderer that uses color-depth based videos hosted on Vimeo.
Stars: ✭ 65 (-96.62%)
Mutual labels:  webgl, threejs
Webgl Globes
Stars: ✭ 66 (-96.57%)
Mutual labels:  webgl, threejs
Giojs
🌏 A Declarative 3D Globe Data Visualization Library built with Three.js
Stars: ✭ 1,528 (-20.62%)
Mutual labels:  webgl, threejs
Decoraki
🏠 3D Simulator for interior design
Stars: ✭ 110 (-94.29%)
Mutual labels:  webgl, threejs

vue-3d-model

Version Build License 996.icu

vue.js 3D model viewer component, based on threejs, inspired by model-tag

一个展示三维模型的Vue组件,支持模型操作和模型点击事件,能自动缩放模型到合适大小并校正偏移,支持多种格式的模型。

Example

DEMO

Install

using npm

npm install vue-3d-model --save

Or using script tag for global use

<script src="https://unpkg.com/vue-3d-model/dist/vue-3d-model.umd.js"></script>

Or Download vue-3d-model.js and include it in your html

Usage

<template>
  <model-obj src="example/models/obj/LeePerrySmith.obj"></model-obj>
</template>
<script>
import { ModelObj } from 'vue-3d-model';
export default {
  components: { ModelObj }
}
</script>

Or

<!DOCTYPE html>
<html>
<head>
 <meta charset="UTF-8"></head>
<body>
  <div id="app">
    <model-obj src="example/models/obj/LeePerrySmith.obj"></model-obj>
  </div>
<script src="vue.js"></script>
<script src="vue-3d-model.js"></script>
<script>
  new Vue({ el: '#app' });
</script>
</body>

Documents

props

prop type default example
src string - './exapmle.obj'
width number - 300
height number - 300
position object { x: 0, y: 0, z: 0 } { x: 100, y: 20, z: -10 }
rotation object { x: 0, y: 0, z: 0 } { x: Math.PI / 2, y: 0, z: - Math.PI / 4 }
cameraPosition object { x: 0, y: 0, z: 0 } { x: 1, y: 2, z: -3 }
cameraRotation object { x: 0, y: 0, z: 0 } { x: 3, y: 2, z: -1 }
scale object { x: 1, y: 1, z: 1 } { x: 2, y: 2, z: 3 }
lights array -
backgroundColor number/string 0xffffff 0xffffff/'#f00'/'rgb(255,255,255)'
backgroundAlpha number 1 0.5
controlsOptions object - see OrbitControls Properties
crossOrigin string anonymous anonymous/use-credentials
requestHeader object - { 'Authorization: Bearer token' }
outputEncoding number THREE.LinearEncoding see WebGLRenderer OutputEncoding
glOptions object { antialias: true, alpha: true } see WebGLRenderer Parameters

events

event
on-mousedown
on-mousemove
on-mouseup
on-click
on-load
on-progress
on-error

Model Format Support

model format component tag
obj <model-obj>
json <model-three>
stl <model-stl>
dae <model-collada>
ply <model-ply>
fbx <model-fbx>
gltf(2.0) <model-gltf>

Browser Support

Modern browsers and IE 11.

You can click on this for more information.

TODO List

  • Support for more model formats
  • Animation
  • Post-processing

LICENSE

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].