1234567891011121314151617181920212223242526272829303132333435 |
- <template>
- <div class="three-model">
- <div id="threeModel"></div>
- </div>
- </template>
- <script>
- import threeControls from '@/uitls/threeControls';
- export default {
- name: 'app',
- created() {
- this.$nextTick(() => {
- let threeObj = new threeControls({
- container: document.getElementById('threeModel')
- });
- // threeObj.setAxisHelper();
- threeObj.loaderGLTF('https://file-node.oss-cn-shanghai.aliyuncs.com/youji/ec455ebd72664531acfcb81657d44266');
- // threeObj.setState();
- threeObj.OrbitControls();
- // threeObj.inserClickFunc();
- // threeObj.initPointerLockControls();
- // threeObj.FlyControls();
- threeObj.render();
- })
- }
- }
- </script>
- <style lang="scss">
- .three-model,
- #threeModel {
- width: 100%;
- height: 100%;
- }
- </style>
|