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

Downgrade draco assert to warning #5312

Merged
merged 3 commits into from
May 10, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/framework/parsers/glb-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,9 @@ const createDracoMesh = (device, primitive, accessors, bufferViews, meshVariants
} else {
// create vertex buffer
const numVertices = decompressedData.vertices.byteLength / vertexFormat.size;
Debug.assert(numVertices === accessors[primitive.attributes.POSITION].count, 'mesh has invalid draco sizes');
if (numVertices !== accessors[primitive.attributes.POSITION].count) {
Debug.warn('mesh has invalid draco sizes');
}
Copy link
Contributor

Choose a reason for hiding this comment

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

add the whole thing inside Debug.call(() => { } so that even the condition gets stripped out
and maybe add that glb name if possible
and warnOnce could be good as well

Copy link
Contributor

Choose a reason for hiding this comment

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

+1 on some identifier would be great
image

Copy link
Member Author

Choose a reason for hiding this comment

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

Projects don't need reimport TBH. We'll patch the engine with this change now so we can get it out quickly, then add more debugging information later.

const vertexBuffer = new VertexBuffer(device, vertexFormat, numVertices, BUFFER_STATIC, decompressedData.vertices);

// create index buffer
Expand Down