12 |
- (function(e){function t(t){for(var r,a,s=t[0],c=t[1],l=t[2],u=0,h=[];u<s.length;u++)a=s[u],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&h.push(o[a][0]),o[a]=0;for(r in c)Object.prototype.hasOwnProperty.call(c,r)&&(e[r]=c[r]);d&&d(t);while(h.length)h.shift()();return i.push.apply(i,l||[]),n()}function n(){for(var e,t=0;t<i.length;t++){for(var n=i[t],r=!0,s=1;s<n.length;s++){var c=n[s];0!==o[c]&&(r=!1)}r&&(i.splice(t--,1),e=a(a.s=n[0]))}return e}var r={},o={app:0},i=[];function a(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=e,a.c=r,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(n,r,function(t){return e[t]}.bind(null,r));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="/";var s=window["webpackJsonp"]=window["webpackJsonp"]||[],c=s.push.bind(s);s.push=t,s=s.slice();for(var l=0;l<s.length;l++)t(s[l]);var d=c;i.push([0,"chunk-vendors"]),n()})({0:function(e,t,n){e.exports=n("56d7")},3184:function(e,t,n){},"56d7":function(e,t,n){"use strict";n.r(t);var r=n("2b0e"),o=function(){var e=this;e._self._c;return e._m(0)},i=[function(){var e=this,t=e._self._c;return t("div",{attrs:{id:"app"}},[t("div",{attrs:{id:"container"}})])}],a=n("5a89"),s=n("8710"),c=n("4721"),l={name:"App",components:{},data(){return{publicPath:"http://127.0.0.1:5173/",mesh:null,camera:null,scene:null,renderer:null,controls:null}},methods:{init(){this.createScene(),this.loadGLTF(),this.createLight(),this.createCamera(),this.createRender(),this.createControls(),this.render()},createScene(){this.scene=new a["J"],console.log(this.scene)},loadGLTF(){const e=new s["a"],t="3.FBX";e.load(t,e=>{console.log(e,"MMMM"),e.scale.set(1,1,1),this.scene.add(e)})},createLight(){const e=new a["a"](16777215,.5);this.scene.add(e);const t=new a["N"](16777215);t.position.set(150,150,150),t.castShadow=!0,this.scene.add(t)},createCamera(){const e=document.getElementById("container"),t=e.clientWidth,n=e.clientHeight,r=t/n;this.camera=new a["D"](35,r,.1,1e3),this.camera.position.set(150,150,150),this.camera.lookAt(new a["T"](10,40,0)),this.scene.add(this.camera)},createRender(){const e=document.getElementById("container");this.renderer=new a["W"]({antialias:!0,alpha:!0}),this.renderer.setSize(e.clientWidth,e.clientHeight),this.renderer.shadowMap.enabled=!0,this.renderer.shadowMap.type=a["C"],this.renderer.setClearColor(4144959,1),e.appendChild(this.renderer.domElement)},render(){this.mesh&&(this.mesh.rotation.z+=.006),this.renderer.render(this.scene,this.camera),requestAnimationFrame(this.render)},createControls(){this.controls=new c["a"](this.camera,this.renderer.domElement)}},mounted(){console.log("mead"),this.init()}},d=l,u=(n("8664"),n("2877")),h=Object(u["a"])(d,o,i,!1,null,null,null),p=h.exports;r["a"].config.productionTip=!1,new r["a"]({render:e=>e(p)}).$mount("#app")},8664:function(e,t,n){"use strict";n("3184")}});
- //# sourceMappingURL=app.cdfcce20.js.map
|