| | |
| | | <template> |
| | | <div class="map-container" > |
| | | <div class="map-container"> |
| | | <canvas class="world" ref="worldContainer"></canvas> |
| | | </div> |
| | | </template> |
| | |
| | | watch: { |
| | | loadEnd: { |
| | | handler(newVal) { |
| | | console.log(newVal); |
| | | if(newVal) { |
| | | if (newVal) { |
| | | world = new Experience(this.$refs.worldContainer); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | } |
| | | |
| | | }, |
| | | beforeDestroy() { |
| | | world.destroy(); |
| | | world = null; |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .map-container { |
| | | width: 100%; |
| | | height: 100%; |
| | | position: absolute; |
| | | left: 0; |
| | | top: 0; |
| | | height:100%; |
| | | // position: absolute; |
| | | // left: 25%; |
| | | // top: 65px; |
| | | z-index: 0; |
| | | // background: url("../../../../assets/images/screen/cardBg.png"); |
| | | // background-size: cover !important; |
| | | // background-repeat: no-repeat !important; |
| | | // background-position: center center !important; |
| | | .world { |
| | | width: 100%; |
| | | height: 100%; |