Skip to content

Commit 8e61fdc

Browse files
committed
Fix height shader
1 parent f01603b commit 8e61fdc

File tree

6 files changed

+4
-6
lines changed

6 files changed

+4
-6
lines changed

build/geo-three.cjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,6 @@ class MapHeightNodeShader extends MapHeightNode {
721721
texture.minFilter = three.NearestFilter;
722722
texture.needsUpdate = true;
723723
this.material.userData.heightMap.value = texture;
724-
this.material.map = texture;
725724
this.material.needsUpdate = true;
726725
this.heightLoaded = true;
727726
this.nodeReady();

build/geo-three.js

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/geo-three.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/geo-three.module.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,6 @@ class MapHeightNodeShader extends MapHeightNode {
717717
texture.minFilter = NearestFilter;
718718
texture.needsUpdate = true;
719719
this.material.userData.heightMap.value = texture;
720-
this.material.map = texture;
721720
this.material.needsUpdate = true;
722721
this.heightLoaded = true;
723722
this.nodeReady();

index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,8 @@
187187
scene.add(map);
188188
map.updateMatrixWorld(true);
189189

190+
191+
190192
var camera = new THREE.PerspectiveCamera(80, 1, 1e2, 1e12);
191193

192194
// var test = new THREE.Mesh(new Geo.MapNodeGeometry(1e6, 1e6, 8.0, 8.0, true, 2e5), new THREE.MeshPhongMaterial({wireframe: false, color: 0xFFFFFF}));

source/nodes/MapHeightNodeShader.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ export class MapHeightNodeShader extends MapHeightNode
117117
throw new Error('GeoThree: MapView.heightProvider provider is null.');
118118
}
119119

120+
120121
const texture = new Texture();
121122
texture.image = await this.mapView.heightProvider.fetchTile(this.level, this.x, this.y);
122123
texture.generateMipmaps = false;
@@ -128,8 +129,6 @@ export class MapHeightNodeShader extends MapHeightNode
128129
// @ts-ignore
129130
this.material.userData.heightMap.value = texture;
130131
// @ts-ignore
131-
this.material.map = texture;
132-
// @ts-ignore
133132
this.material.needsUpdate = true;
134133

135134
this.heightLoaded = true;

0 commit comments

Comments
 (0)