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

Provide a way to skip asset list creation in kha.Assets #135

Closed
sh-dave opened this issue Mar 27, 2018 · 1 comment
Closed

Provide a way to skip asset list creation in kha.Assets #135

sh-dave opened this issue Mar 27, 2018 · 1 comment

Comments

@sh-dave
Copy link
Contributor

sh-dave commented Mar 27, 2018

Projects not necessarily need access to the embedded asset lists. In our case, we only load assets via kha.Assset.loadFromPath() so everything in these lists is superfluous, but these 1500 assets increase the generated kha.js filesize from 1.2mb to 2.6mb in html5 builds, and won't even compile in windows debug builds without workarounds, see #133.

So the new option would convert assets as usual, but wouldn't add fields to the internal kha.Assets lists.
This could ideally be set for each prj.addAssets() call in khafile.js. In our case, i'd only exclude the first 2 calls from the following example.

project.addAssets('assets/**');
project.addAssets('assets-highres/**');
project.addAssets('assets-ui/**', { nameBaseDir: 'assets-ui', destination: '{dir}/{name}', name: '{dir}/{name}' });
project.addAssets('settings/**');
@RobDangerous
Copy link
Member

Done, use the new notinlist option like so:

project.addAssets('Assets/Music/*', { quality: 0.5, notinlist: true });

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

2 participants