Skip to content

Commit a3fcc7f

Browse files
authored
Add intersect property to raycast result type (#137)
1 parent 0810ef8 commit a3fcc7f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

types/iterators.d.ts

+4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ export type RaycastBlock = {
1717
face: BlockFace;
1818
};
1919

20+
export type RaycastResult = RaycastBlock & {
21+
intersect: Vec3;
22+
}
23+
2024
export type RaycastIntersection = {
2125
pos: Vec3;
2226
face: BlockFace;

types/world.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ export declare class WorldSync extends EventEmitter {
162162
direction: Vec3,
163163
range: number,
164164
matcher?: (block: Block) => boolean,
165-
): RaycastBlock | null;
165+
): RaycastResult | null;
166166

167167
private _emitBlockUpdate(
168168
oldBlock: Block,

0 commit comments

Comments
 (0)