Code Monkey home page Code Monkey logo

Comments (4)

langyo avatar langyo commented on June 11, 2024

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.

boxsnake avatar boxsnake commented on June 11, 2024

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.

langyo avatar langyo commented on June 11, 2024

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.

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.

boxsnake avatar boxsnake commented on June 11, 2024

@langyo

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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.