Skip to content

Commit 5aa4102

Browse files
修复three建筑模型示例不渲染
1 parent d451020 commit 5aa4102

File tree

4 files changed

+2
-7
lines changed

4 files changed

+2
-7
lines changed

examples/mapboxgl/js/ThreeApplication.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ var SceneBuilder = {
151151
is3DDataLoaded = false;
152152
SceneBuilder.viewBuilder(app).build();
153153
clearInterval(slowLoopIntervalId);
154+
app.threeLayer.renderScene();
154155
}
155156
}, 500);
156157
}

examples/mapboxgl/threejsLayer_buildings.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,17 +93,13 @@
9393
.setTargetLayer(threeLayer)
9494
.setPosition([104.071092, 30.560304])
9595
.start();
96-
setTimeout(function() {
97-
threeLayer.renderScene();
98-
}, 1000);
9996
}
10097

10198
//均匀光照,与相机位置同步
10299
threeLayer.on("render", function () {
103100
// threeLayer.light.position.copy(threeLayer.renderer.camera.position);
104101
threeLayer.light.position.set(0, 0, 0);
105102
});
106-
107103
}
108104

109105
</script>

examples/maplibregl/js/ThreeApplication.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ var SceneBuilder = {
151151
is3DDataLoaded = false;
152152
SceneBuilder.viewBuilder(app).build();
153153
clearInterval(slowLoopIntervalId);
154+
app.threeLayer.renderScene();
154155
}
155156
}, 500);
156157
}

examples/maplibregl/threejsLayer_buildings.html

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,6 @@
9494
.setTargetLayer(threeLayer)
9595
.setPosition([104.071092, 30.560304])
9696
.start();
97-
setTimeout(function() {
98-
threeLayer.renderScene();
99-
}, 1000);
10097
}
10198

10299
//均匀光照,与相机位置同步

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy