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

feat(converter): support writing 3DTILES of version 1.1 #3054

Merged
merged 12 commits into from
Sep 16, 2024

Conversation

mspivak-actionengine
Copy link
Collaborator

No description provided.

_checkNormals(normals) {
// If all normals === 0, the resulting tileset is all in black colors on Cesium
return normals.find((value) => value);
export default class B3dmConverter extends TilesConverter {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need these subclasses? They don't do much... Maybe just instantiate the TilesConverter with the different version numbers.

@@ -0,0 +1,354 @@
/* eslint-disable no-console */

import type {I3STileContent, FeatureAttribute} from '@loaders.gl/i3s';
Copy link
Collaborator

Choose a reason for hiding this comment

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

Because this became a completely new file, it is not possible to easily see what has changed.

@dsavinov-actionengine
Copy link
Collaborator

@mspivak-actionengine
I will add a bit more context here: before implementing glTF extensions writing for 3D Tiles 1.1 support, we'd like to change the default behavior of tile-converter to make 1.1 as default, leaving 1.0 only with an option set.
This is the approach to make general 1.1 writing.

correct me if needed

values: []
};
if (isTypedArray(attributeValues)) {
propertyAttribute.values = Array.prototype.slice.call(attributeValues);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think this code is correct. Function.prototype.call() expects thisArg as the first parameter. Use Array.from(attributeValues) to convert a typed array to a JS array

@mspivak-actionengine mspivak-actionengine merged commit 3fda612 into master Sep 16, 2024
1 check passed
@mspivak-actionengine mspivak-actionengine deleted the ms/writing-1.1 branch September 16, 2024 12:13
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.

4 participants