Skip to content

Commit 63c4cf8

Browse files
committed
fix(soba): adjust setUpdateRange to use start instead of offset
1 parent de7184d commit 63c4cf8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

libs/soba/misc/src/lib/deprecated.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ import type * as THREE from 'three';
55
*/
66
export const setUpdateRange = (
77
attribute: THREE.BufferAttribute,
8-
updateRange: { offset: number; count: number },
8+
updateRange: { start: number; count: number },
99
): void => {
1010
if ('updateRanges' in attribute) {
1111
// attribute.updateRanges[0] = updateRange;
12-
attribute.addUpdateRange(updateRange.offset, updateRange.count);
12+
attribute.addUpdateRange(updateRange.start, updateRange.count);
1313
} else {
1414
Object.assign(attribute, { updateRange });
1515
}

libs/soba/performances/src/lib/instances/instances.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,9 @@ export class NgtsInstances {
139139

140140
count = Math.min(limit, range !== undefined ? range : limit, this.instances.length);
141141
instancedMesh.count = count;
142-
setUpdateRange(instancedMesh.instanceMatrix, { offset: 0, count: count * 16 });
142+
setUpdateRange(instancedMesh.instanceMatrix, { start: 0, count: count * 16 });
143143
if (instancedMesh.instanceColor) {
144-
setUpdateRange(instancedMesh.instanceColor, { offset: 0, count: count * 3 });
144+
setUpdateRange(instancedMesh.instanceColor, { start: 0, count: count * 3 });
145145
}
146146

147147
for (let i = 0; i < this.instances.length; i++) {

0 commit comments

Comments
 (0)