Skip to content

Commit e9d8c55

Browse files
authored
Fix for wayward duck vertex (playcanvas#3383)
1 parent de345b4 commit e9d8c55

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/resources/parser/glb-parser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ const createVertexBufferInternal = function (device, sourceDesc, disableFlipV) {
446446
sourceStride = source.stride / 4;
447447
// ensure we don't go beyond the end of the arraybuffer when dealing with
448448
// interlaced vertex formats
449-
sourceArray = new Uint32Array(source.buffer, source.offset, (source.count - 1) * sourceStride + source.size / 4);
449+
sourceArray = new Uint32Array(source.buffer, source.offset, (source.count - 1) * sourceStride + (source.size + 3) / 4);
450450

451451
let src = 0;
452452
let dst = target.offset / 4;

0 commit comments

Comments
 (0)