修改threejs挂载

This commit is contained in:
sunzhenyu 2019-08-08 10:52:06 +08:00
parent e86be938f3
commit 9f9236361a
6 changed files with 977 additions and 11 deletions

View File

@ -5,7 +5,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title></title>
<script src="/static/inflate.min.js"></script>
</head>
<body>

View File

@ -6,6 +6,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" href="<%= BASE_URL %>favicon.png">
<title><%= webpackConfig.name %></title>
<script src="/static/inflate.min.js"></script>
<script src="/static/three.min.js"></script>
</head>
<body>
<noscript>

View File

@ -1,10 +1,4 @@
export function SetRender(dom) {
console.log(dom.clientWidth);
console.log(dom.clientHeight);
console.log(dom.innerWidth);
console.log(dom.innerHeight);
console.log(dom.offsetWidth);
console.log(dom.offsetHeight);
var renderer = new THREE.WebGLRenderer({antialias: true});
renderer.setSize(dom.offsetWidth, dom.offsetHeight);
//renderer.setSize( window.innerWidth, window.innerHeight );

View File

@ -18,9 +18,9 @@ import '@/icons'; // icon
import '@/permission'; // permission control
import '@/scripts/GlobalPlugin';
import '@/directives';
window.THREE = require('@/jlmap3d/main/three.min.js');
window.zlib = require('@/jlmap3d/main/inflate.min.js');
console.log(zlib);
// window.THREE = require('@/jlmap3d/main/three.min.js');
// window.zlib = require('@/jlmap3d/main/inflate.min.js');
// console.log(zlib);
Vue.use(ElementUI);
Vue.config.productionTip = false;

View File

@ -66,7 +66,6 @@ export function mmiimage() {
this.m10['shiwei'] = '/static/jl3d/mmi/m10-shiwei.png';
this.m10['querenxinhao'] = '/static/jl3d/mmi/m10-querenxinhao.png';
this.m10['none'] = '/static/jl3d/mmi/none.png';
console.log(scope);
this.c1 = [];
this.c1['qianyin'] = '/static/jl3d/mmi/c1-qianyin.png';

971
static/three.min.js vendored Normal file

File diff suppressed because one or more lines are too long