|
|
|
@ -15,7 +15,7 @@
|
|
|
|
|
:width="375"
|
|
|
|
|
:height="667"
|
|
|
|
|
ref="model"
|
|
|
|
|
src="http://localhost/3dmodel/2.obj"
|
|
|
|
|
src="https://www.jichuanglanhai.com/demo/3dmodel/2.obj"
|
|
|
|
|
:rotation="rotation"
|
|
|
|
|
:position="position"
|
|
|
|
|
:scale="scale"
|
|
|
|
@ -23,12 +23,11 @@
|
|
|
|
|
@on-load="onLoad"
|
|
|
|
|
:controls-options="{}"
|
|
|
|
|
/>
|
|
|
|
|
<!--getCenter src="http://localhost/3dmodel/dancing.fbx" -->
|
|
|
|
|
<!-- src="http://localhost/3dmodel/dancing.fbx" -->
|
|
|
|
|
<!-- <model-fbx src="http://localhost/3dmodel/1.fbx" /> -->
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import { reactive } from "vue";
|
|
|
|
|
import { ModelObj } from "../utils/vue3dmodel";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
@ -81,9 +80,8 @@ export default {
|
|
|
|
|
// el.style["transform"] = "rotateY(45deg)";
|
|
|
|
|
},
|
|
|
|
|
rotate(e) {
|
|
|
|
|
// this.rotation.x = e.x;
|
|
|
|
|
// this.rotation.y -= 0.002;
|
|
|
|
|
// this.rotation.z = e.z;
|
|
|
|
|
// this.rotation.z += 0.01;
|
|
|
|
|
|
|
|
|
|
this.val += 1;
|
|
|
|
|
let el = this.$refs.model.$el.childNodes[0];
|
|
|
|
|
el.style["transform"] = `rotateY(${this.val}deg)`;
|
|
|
|
|