Skip to content

Commit

Permalink
Reduce minimum three version
Browse files Browse the repository at this point in the history
  • Loading branch information
tentone committed Dec 17, 2022
1 parent 17a077d commit df63910
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build/geo-three.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/nodes/MapNode.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export declare abstract class MapNode extends Mesh {
static baseGeometry: BufferGeometry;
static baseScale: Vector3;
static childrens: number;
isMesh: boolean;
isMesh: true;
constructor(parentNode?: MapNode, mapView?: MapView, location?: number, level?: number, x?: number, y?: number, geometry?: BufferGeometry, material?: Material);
initialize(): Promise<void>;
createChildNodes(): void;
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "geo-three",
"version": "0.1.8",
"version": "0.1.9",
"type": "module",
"description": "geo-three is library for tile based geographic map layers in with three.js supporting selective loading/unloading of real-time generated 3D tiles",
"main": "build/Main.d.ts",
Expand Down Expand Up @@ -38,7 +38,7 @@
"author": "Tentone",
"license": "MIT",
"peerDependencies": {
"three": "^0.147.0"
"three": "^0.120.0"
},
"devDependencies": {
"@rollup/plugin-strip": "~2.1.0",
Expand Down
4 changes: 3 additions & 1 deletion source/nodes/MapNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export abstract class MapNode extends Mesh
* Used to toggle the visibility of the node. The renderer skips the node rendering if this is set false.
*/
// @ts-ignore
public isMesh: boolean = true;
public isMesh: true = true;

public constructor(parentNode: MapNode = null, mapView: MapView = null, location: number = QuadTreePosition.root, level: number = 0, x: number = 0, y: number = 0, geometry: BufferGeometry = null, material: Material = null)
{
Expand Down Expand Up @@ -189,6 +189,7 @@ export abstract class MapNode extends Mesh

if (this.mapView.cacheTiles && this.childrenCache !== null)
{
// @ts-ignore
this.isMesh = false;
this.children = this.childrenCache;
this.nodesLoaded = this.childrenCache.length;
Expand Down Expand Up @@ -311,6 +312,7 @@ export abstract class MapNode extends Mesh
{
if (this.parentNode.subdivided === true)
{
// @ts-ignore
this.parentNode.isMesh = false;
}

Expand Down

0 comments on commit df63910

Please sign in to comment.