Skip to content
Open
Show file tree
Hide file tree
Changes from all 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: 1 addition & 3 deletions packages/core/src/core/SnapResolver/src/snap-resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,7 @@ export class SnapResolver implements Disposable {
// Compare to the previous `_getElements([localId])` path, which
// scanned the full sample table (~1 s on superbig regardless of
// how few items you ask for).
const data = (await (model as any)._getItemSnapData(
itemId,
)) as FRAGS.ElementData | null;
const data = await model._getItemSnapData(itemId);
if (!data) return null;

const modelWorldMatrix = model.object.matrixWorld;
Expand Down
8 changes: 1 addition & 7 deletions packages/front/src/fragments/Outliner/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -498,13 +498,7 @@ export class Outliner extends OBC.Component implements OBC.Disposable {
// `getItemDrawChunks` accepts an iterable; we pass the Set
// straight through to avoid materializing an array for very
// large selections.
const chunks = (await (model as any).getItemDrawChunks(
localIds,
)) as Array<{
tileId: number;
position: Uint32Array;
size: Uint32Array;
}>;
const chunks = await model.getItemDrawChunks(localIds);
return { modelId, chunks };
})(),
);
Expand Down
4 changes: 1 addition & 3 deletions packages/front/src/utils/measure-volume.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,7 @@ export class MeasureVolume {
if (!localIds || (localIds as Set<number>).size === 0) continue;
let chunks: ItemDrawChunks[];
try {
chunks = (await (model as any).getItemDrawChunks(
localIds,
)) as ItemDrawChunks[];
chunks = await model.getItemDrawChunks(localIds);
} catch {
continue;
}
Expand Down