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

chore(examples): Example with loading of slpk in browser implementation #2904

Merged
merged 1 commit into from
Mar 4, 2024

Conversation

dariaterekhova-actionengine
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@ibgreen ibgreen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work. How big SPLKs have you tested it on?

"@loaders.gl/loader-utils": "^4.0.0",
"@loaders.gl/mvt": "^4.0.0",
"@loaders.gl/terrain": "^4.0.0",
"@testing-library/jest-dom": "^5.17.0",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a LOT of dependencies. Do we really need the test libraries for an example? Can they go into devDependencies?

"react-app/jest"
]
},
"browserslist": {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need these?

<title>React App</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like some really old boilerplate... What browser doesn't have JS enabled these days?

* Gets an unsigned 8-bit integer at the specified byte offset from the start of the file.
* @param offset The offset, in bytes, from the start of the file where to read the data.
*/
async getUint8(offset: number | bigint): Promise<number> {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel you should separate this out of your File implementation.

You read ArrayBuffer's from the FIle, and you create DataViews on those ArrayBuffers to read individual binary values.

If you want a help class to wrap DataView that is fine, but I would suggest keeping it separate from File to keep things separate and simple

"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you really need all these options? Simpler is better.

@belom88
Copy link
Collaborator

belom88 commented Mar 4, 2024

I will fix comments in the next PR

@belom88 belom88 merged commit 562f781 into master Mar 4, 2024
3 checks passed
@belom88 belom88 deleted the dt/slpk_in_browser branch March 4, 2024 10:22
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

Successfully merging this pull request may close these issues.

3 participants