From bffde87473a59abed465b5a0e0dc6f3771743078 Mon Sep 17 00:00:00 2001 From: laozt <2721205210@qq.com> Date: Tue, 31 Oct 2023 16:49:59 +0800 Subject: [PATCH] =?UTF-8?q?3d=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 - src/utils/vue3dmodel/CHANGELOG.md | 117 +++++ src/utils/vue3dmodel/LICENSE | 21 + src/utils/vue3dmodel/README.md | 120 ++++++ src/utils/vue3dmodel/package.json | 93 ++++ src/utils/vue3dmodel/preview.gif | Bin 0 -> 279438 bytes src/utils/vue3dmodel/src/index.js | 67 +++ src/utils/vue3dmodel/src/model-collada.vue | 48 +++ src/utils/vue3dmodel/src/model-fbx.vue | 42 ++ src/utils/vue3dmodel/src/model-gltf.vue | 60 +++ src/utils/vue3dmodel/src/model-mixin.vue | 475 +++++++++++++++++++++ src/utils/vue3dmodel/src/model-obj.vue | 137 ++++++ src/utils/vue3dmodel/src/model-ply.vue | 47 ++ src/utils/vue3dmodel/src/model-stl.vue | 45 ++ src/utils/vue3dmodel/src/model-three.vue | 18 + src/utils/vue3dmodel/src/util.js | 160 +++++++ src/views/3dmodel.vue | 78 +++- 17 files changed, 1522 insertions(+), 7 deletions(-) create mode 100644 src/utils/vue3dmodel/CHANGELOG.md create mode 100644 src/utils/vue3dmodel/LICENSE create mode 100644 src/utils/vue3dmodel/README.md create mode 100644 src/utils/vue3dmodel/package.json create mode 100644 src/utils/vue3dmodel/preview.gif create mode 100644 src/utils/vue3dmodel/src/index.js create mode 100644 src/utils/vue3dmodel/src/model-collada.vue create mode 100644 src/utils/vue3dmodel/src/model-fbx.vue create mode 100644 src/utils/vue3dmodel/src/model-gltf.vue create mode 100644 src/utils/vue3dmodel/src/model-mixin.vue create mode 100644 src/utils/vue3dmodel/src/model-obj.vue create mode 100644 src/utils/vue3dmodel/src/model-ply.vue create mode 100644 src/utils/vue3dmodel/src/model-stl.vue create mode 100644 src/utils/vue3dmodel/src/model-three.vue create mode 100644 src/utils/vue3dmodel/src/util.js diff --git a/package.json b/package.json index 96e6292..7d42b65 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,6 @@ "screenfull": "5.0.2", "sortablejs": "1.10.2", "vue": "2.6.12", - "vue-3d-model": "^1.4.1", "vue-count-to": "1.0.13", "vue-cropper": "0.5.5", "vue-meta": "2.4.0", diff --git a/src/utils/vue3dmodel/CHANGELOG.md b/src/utils/vue3dmodel/CHANGELOG.md new file mode 100644 index 0000000..44b89da --- /dev/null +++ b/src/utils/vue3dmodel/CHANGELOG.md @@ -0,0 +1,117 @@ +## [1.4.1](https://github.com/hujiulong/vue-3d-model/compare/v1.4.0...v1.4.1) (2022-08-15) + + +### Bug Fixes + +* fix order of calculations ([f58bf72](https://github.com/hujiulong/vue-3d-model/commit/f58bf72be93c7c088c73e64919deaea3f20301a1)) + + + +# [1.4.0](https://github.com/hujiulong/vue-3d-model/compare/v1.3.1...v1.4.0) (2021-06-26) + + +### Bug Fixes + +* **demo:** fix json loader demo ([3236bc2](https://github.com/hujiulong/vue-3d-model/commit/3236bc2c990905f812835a81f1c96c318d06a3d5)) +* remove calls to removed methods ([ff01a19](https://github.com/hujiulong/vue-3d-model/commit/ff01a19d8715d0b44b9cb98ae4e51e070ad44915)) +* the default props should return a new object ([e5cf0e1](https://github.com/hujiulong/vue-3d-model/commit/e5cf0e106c3cb95738c7201ee322b41a28d824a6)) + + +### Features + +* loaders should use setRequestHeader ([#267](https://github.com/hujiulong/vue-3d-model/issues/267)) ([40b077a](https://github.com/hujiulong/vue-3d-model/commit/40b077a3513f0830d1ba28a3c653b401b7ac97b2)) + + + +## [1.3.1](https://github.com/hujiulong/vue-3d-model/compare/v1.3.0...v1.3.1) (2020-06-30) + + + +# [1.3.0](https://github.com/hujiulong/vue-3d-model/compare/v1.2.0...v1.3.0) (2020-06-30) + + +### Bug Fixes + +* fix controlsOptions ([be18b78](https://github.com/hujiulong/vue-3d-model/commit/be18b783eee5fca2fceacc42ec002a80478f50e0)) +* publicPath ([b69a2c7](https://github.com/hujiulong/vue-3d-model/commit/b69a2c7a6146c43849640926a97dbf11f65b75cb)) +* resolve gammaOutput removed warning and update the README.md ([#172](https://github.com/hujiulong/vue-3d-model/issues/172)) ([f4ab34b](https://github.com/hujiulong/vue-3d-model/commit/f4ab34bc7663be40be122def73c7dcbed636eeb8)) + + +### Features + +* model-fbx and update three.js ([#167](https://github.com/hujiulong/vue-3d-model/issues/167)) ([c700a0f](https://github.com/hujiulong/vue-3d-model/commit/c700a0f9181ef5f1bb8f474cbf59c079a41e2b33)) + + + +# [1.2.0](https://github.com/hujiulong/vue-3d-model/compare/v1.1.0...v1.2.0) (2019-10-23) + + +### Bug Fixes + +* dispose objects before component destroy ([02adf5b](https://github.com/hujiulong/vue-3d-model/commit/02adf5bc53f9911daa46c8dc0daa0aa3a61e396a)) + + +### Features + +* add a new prop: glOptions. closes [#111](https://github.com/hujiulong/vue-3d-model/issues/111) ([7d3448e](https://github.com/hujiulong/vue-3d-model/commit/7d3448eee51ebbf603c859ba62bc28efd9f4ec89)) +* allow override OrbitControls Properties ([#123](https://github.com/hujiulong/vue-3d-model/issues/123)) ([55e29f6](https://github.com/hujiulong/vue-3d-model/commit/55e29f678b7278bd36ae52b67c028182931b871a)) + + + +# [1.1.0-alpha.0](https://github.com/hujiulong/vue-3d-model/compare/v1.0.2...1.1.0-alpha.0) (2019-06-21) + + +### Bug Fixes + +* fix camera options ([#67](https://github.com/hujiulong/vue-3d-model/issues/67)) ([f5a0fe5](https://github.com/hujiulong/vue-3d-model/commit/f5a0fe5fea94774437c215a47008157637edc43e)) +* fix props check ([693295b](https://github.com/hujiulong/vue-3d-model/commit/693295b764bd780732f420ad7e2d19881ceef8f1)) +* updated background example ([#68](https://github.com/hujiulong/vue-3d-model/issues/68)) ([3760535](https://github.com/hujiulong/vue-3d-model/commit/3760535879ea71dbf92e647bd393d27e2b133d38)) + + +### Features + +* **gltf:** set the default value of gammaOutput to true ([e609c91](https://github.com/hujiulong/vue-3d-model/commit/e609c9145a95c425a4de1ba6e2d866881b7ecb73)) + + + +## [1.0.2](https://github.com/hujiulong/vue-3d-model/compare/v1.0.1...v1.0.2) (2018-08-11) + + +### Bug Fixes + +* fix the config of dev(close [#43](https://github.com/hujiulong/vue-3d-model/issues/43)) ([e0468c0](https://github.com/hujiulong/vue-3d-model/commit/e0468c0736a2db001e4a1c4a8747ed0c3bad4a32)) + + +### Features + +* add crossOrigin option(fix [#33](https://github.com/hujiulong/vue-3d-model/issues/33)) ([1c815de](https://github.com/hujiulong/vue-3d-model/commit/1c815de53fea93f5e787c7c8ed3eb58ef610b164)) + + + +## [1.0.1](https://github.com/hujiulong/vue-3d-model/compare/v1.0.0...v1.0.1) (2018-05-01) + + + +# [1.0.0](https://github.com/hujiulong/vue-3d-model/compare/v0.0.15...v1.0.0) (2018-02-08) + + + +## [0.0.15](https://github.com/hujiulong/vue-3d-model/compare/3dc003e51745d500d8e7faed945088e70664d029...v0.0.15) (2018-01-03) + + +### Bug Fixes + +* export `model-ply`.([#22](https://github.com/hujiulong/vue-3d-model/issues/22)) ([945930c](https://github.com/hujiulong/vue-3d-model/commit/945930c427e8a9d7c753e3c326b71a56ec78f07d)) +* fix `on-error` event and add `on-progress` event([#15](https://github.com/hujiulong/vue-3d-model/issues/15)). ([0a92d7b](https://github.com/hujiulong/vue-3d-model/commit/0a92d7b160bdf495dbda47385e83e688874e14a0)) +* fix `PointLight` not imported in `vue-mixin`([#16](https://github.com/hujiulong/vue-3d-model/issues/16)). ([01427f6](https://github.com/hujiulong/vue-3d-model/commit/01427f6c90159e0e87939e454831b96e0a81347a)) +* fix rotate example ([5b5535e](https://github.com/hujiulong/vue-3d-model/commit/5b5535e43f8e3b07a43ff90aa7a7a30a064e937d)) +* update OBJLoader to fix som bugs([#19](https://github.com/hujiulong/vue-3d-model/issues/19)). ([1889732](https://github.com/hujiulong/vue-3d-model/commit/1889732f7bc5055d4ed3c2da5e7accb70dd31d5c)) + + +### Features + +* add `model-gltf` to support the gltf format model. ([ad952a5](https://github.com/hujiulong/vue-3d-model/commit/ad952a58ede84c754e3dc7a5b9be9f462f30d703)) +* model-obj supports MTL file ([3dc003e](https://github.com/hujiulong/vue-3d-model/commit/3dc003e51745d500d8e7faed945088e70664d029)) + + + diff --git a/src/utils/vue3dmodel/LICENSE b/src/utils/vue3dmodel/LICENSE new file mode 100644 index 0000000..9943c4a --- /dev/null +++ b/src/utils/vue3dmodel/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017-present, Jiulong Hu + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/src/utils/vue3dmodel/README.md b/src/utils/vue3dmodel/README.md new file mode 100644 index 0000000..122315a --- /dev/null +++ b/src/utils/vue3dmodel/README.md @@ -0,0 +1,120 @@ +# vue-3d-model + +
+ +vue.js 3D model viewer component, based on threejs, inspired by [model-tag](https://github.com/mrdoob/model-tag) + +一个展示三维模型的Vue组件,支持模型操作和模型点击事件,能自动缩放模型到合适大小并校正偏移,支持多种格式的模型。 + +
+
+