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
feat(tile-converter): support attributes data from textures #2511
Conversation
@ibgreen Hi Ib, could you please review the PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ibgreen we need feedback for the change in parse-gltf.ts
@@ -50,12 +50,13 @@ export class GLTFScenegraph { | |||
byteLength: number; | |||
|
|||
// TODO - why is this not GLTFWithBuffers - what happens to images? | |||
constructor(gltf?: {json: GLTF; buffers?: any[]}) { | |||
constructor(gltf?: {json: GLTF; buffers?: any[]; images?: any[]}) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
constructor(gltf?: {json: GLTF; buffers?: any[]; images?: any[]}) { | |
constructor(gltf?: GLTFWithBuffers) { |
See comment above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Declined. The problem is that GLTFWithBuffers has REQUIRED field "buffers", which results in necessity to change many calls of the constructor, where "gltf" doesn't have "buffers" assigned.
modules/gltf/src/lib/extensions/deprecated/EXT_feature_metadata.ts
Outdated
Show resolved
Hide resolved
modules/gltf/src/lib/extensions/deprecated/EXT_feature_metadata.ts
Outdated
Show resolved
Hide resolved
* @param n | ||
* @param m | ||
*/ | ||
function emod(n: number): number { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ibgreen it looks like candidate to move to @math.gl . Probably we already have this function implemented in some place?
modules/gltf/src/lib/extensions/deprecated/EXT_feature_metadata.ts
Outdated
Show resolved
Hide resolved
promises.push(promise); | ||
|
||
// Parallelize image loading and buffer loading/extension decoding | ||
await Promise.all(promises); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are removing Promise.all
, that is potential performance change. The reason is we need images loaded during decodeExtensions
.
@ibgreen what do you think?
modules/tile-converter/test/i3s-converter/helpers/batch-ids-extensions.spec.js
Show resolved
Hide resolved
@@ -38,6 +38,32 @@ setLoaderOptions({ | |||
_worker: 'test' | |||
}); | |||
|
|||
test('tile-converter - Converters#texure attributes', async (t) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea was to remove this test because the testing the whole converter takes a lot of time and diminishes CI speed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have we described this extension in the documentation for the gltf module?
@@ -1083,6 +1084,8 @@ type FeatureTexture = { | |||
extras?: any; | |||
[key: string]: any; | |||
}; | |||
export type {FeatureTexture as EXT_feature_metadata_feature_texture}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Can we have these exports at the bottom together with the other exports?
- Can we minimize the arbitrary renaming of things? - why do these need to be renamed where as other extension exports do not?
I will check an finish other comments in a separate PR |
No description provided.