Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Support for bundle tree on AssetsManifest #10293

Open
danielbarion opened this issue Mar 7, 2024 · 0 comments
Open

Feature Request: Support for bundle tree on AssetsManifest #10293

danielbarion opened this issue Mar 7, 2024 · 0 comments

Comments

@danielbarion
Copy link

Description

Hey guys, first of all, thank you so much for this project, I'm following on Discord and the community is very proactive and helpful, great job, v8 looks like an amazing improvement, I'll update my pet project to v8 after I finish some things I'm learning.

I was checking the AssetsManifest typescript attributes, and as far as I understand, today it is not possible to have a tree of assets on AssetsManifest (tests).

image

So, today I'm splitting it into a few files, but I'm parsing them in the end to reach the right approach that Pixijs expects

image

image

image

image

image

image

It would be nice to have the possibility to do something like this:

[
  {
      "name": "login",
      "assets": [
          {
              "name": "login_background",
              "srcs": "http://localhost:3000/assets/login_background.jpeg"
          },
          {
              "name": "login_input_normal",
              "srcs": "http://localhost:3000/assets/input_normal.png"
          }
      ]
  },
  {
      "name": "items",
      "tree": [      // "tree" is just an example, I didn't think in a better name while writing this
    {
        "name": "weapons",
        "assets": [
            {
                "name": "sword",
                "srcs": "http://localhost:3000/assets/items/weapons/Icon_Sword_128.png"
            }
        ]
    },
    {
        "name": "books",
        "assets": [
            {
                "name": "book_1",
                "srcs": "http://localhost:3000/assets/items/books/1.png"
            },
            {
                "name": "book_2",
                "srcs": "http://localhost:3000/assets/items/books/2.png"
            },
            {
                "name": "book_3",
                "srcs": "http://localhost:3000/assets/items/books/3.png"
            }
        ]
    }
   ]
  },
]

Instead of:

[
  {
      "name": "login",
      "assets": [
          {
              "name": "login_background",
              "srcs": "http://localhost:3000/assets/login_background.jpeg"
          },
          {
              "name": "login_input_normal",
              "srcs": "http://localhost:3000/assets/input_normal.png"
          }
      ]
  },
    {
        "name": "weapons",
        "assets": [
            {
                "name": "sword",
                "srcs": "http://localhost:3000/assets/items/weapons/Icon_Sword_128.png"
            }
        ]
    },
    {
        "name": "books",
        "assets": [
            {
                "name": "book_1",
                "srcs": "http://localhost:3000/assets/items/books/1.png"
            },
            {
                "name": "book_2",
                "srcs": "http://localhost:3000/assets/items/books/2.png"
            },
            {
                "name": "book_3",
                "srcs": "http://localhost:3000/assets/items/books/3.png"
            }
        ]
    }
]

It would be nice to have more flexibility on how we can organize the assets manifest data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant