Comments (4)
I have roughly understood the purpose of this part of the source code.
Why not store the file directly in a JSON file?
from yuan-shen-map.
I have roughly understood the purpose of this part of the source code.
Why not store the file directly in a JSON file?
This generated Item_Features.js
is originally the trailing part of Item_Json.js
. We just simply split the file into two files Item_Json.js
and Item_Features.js
, and load in <script>
tags in sequence.
Former:
<script src="Item_Json.js"></script>
Now:
<script src="Item_Json.js"></script>
<script src="Item_Features.js"></script>
Since it is too hard to make modifications in this project, we did not do anything more.
If we made it to a JSON file, we have to load it by AJAX in the web pages. However, we are not sure about the side effects of doing this.
from yuan-shen-map.
I have roughly understood the purpose of this part of the source code.
Why not store the file directly in a JSON file?This generated
Item_Features.js
is originally the trailing part ofItem_Json.js
. We just simply split the file into two filesItem_Json.js
andItem_Features.js
, and load in<script>
tags in sequence.Former:
<script src="Item_Json.js"></script>
Now:
<script src="Item_Json.js"></script> <script src="Item_Features.js"></script>
Since it is too hard to make modifications in this project, we did not do anything more.
If we made it to a JSON file, we have to load it by AJAX in the web pages. However, we are not sure about the side effects of doing this.
I have no idea for it...
However, we can use Webpack's own packer to split all of these data into some source code files automatically, what can communicate with each other by the global scope's variants.
Maybe we should use the other's library instead of our works about it.
from yuan-shen-map.
Webpack is hard for this v1 map. The v1 map is totally written in raw html, js and css. Webpack stuff will be a totally refactor.
from yuan-shen-map.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yuan-shen-map.