Skip to content

Commit

Permalink
export math and map.getContainerPointRay
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzhenn committed Sep 19, 2024
1 parent 2ca50c1 commit 2581ca6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/core/math/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { default as Ray } from './Ray';
export { default as Plane } from './Plane';
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import * as DomUtil from './core/util/dom';
import * as StringUtil from './core/util/strings';
import * as MapboxUtil from './core/mapbox';
import * as BBOXUtil from './core/util/bbox';
/** @namespace math */
export * as math from './core/math';

import * as MicroTask from './core/MicroTask';
export { Util, DomUtil, StringUtil, MapboxUtil, MicroTask, BBOXUtil };
Expand Down
5 changes: 2 additions & 3 deletions src/map/Map.Camera.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ declare module "./Map" {
_pointToContainerPoint(point: Point, zoom?: number, out?: Point): Point;
//@internal
_pointsAtResToContainerPoints(point: Point[], res?: number, altitude?: number[], out?: Point[]): Point[];
//@internal
getContainerPointRay(from: Vector3, to: Vector3, containerPoint: Point, near: number, far: number);
getContainerPointRay(from: Vector3, to: Vector3, containerPoint: Point, near?: number, far?: number);
//@internal
_query3DTilesInfo(containerPoint: Point);
//@internal
Expand Down Expand Up @@ -644,7 +643,7 @@ Map.include(/** @lends Map.prototype */{
const cp = [0, 0, 0],
coord0 = [0, 0, 0, 1],
coord1 = [0, 0, 0, 1];
return function (from: Vector3, to: Vector3, containerPoint: Point, near = 0, far = 1) {
return function (from: Vector3, to: Vector3, containerPoint: Point, near:number = 0, far:number = 1) {
const w2 = this.width / 2 || 1,
h2 = this.height / 2 || 1;
const p = containerPoint;
Expand Down

0 comments on commit 2581ca6

Please sign in to comment.