Skip to content

Commit 30e3ff9

Browse files
committed
更改three示例
1 parent cfc0316 commit 30e3ff9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/mapboxgl/threejsLayer_buildings.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
function addThreeLayer() {
4444

4545
//gl参数表示使用webgl渲染,forceRefresh强制不断刷新three的场景
46-
threeLayer = new mapboxgl.supermap.ThreeLayer('three', 'gl', {forceRefresh: true});
46+
threeLayer = new mapboxgl.supermap.ThreeLayer('three');
4747
threeLayer.on("initialized", render);
4848

4949
function render() {
@@ -64,7 +64,7 @@
6464
}
6565

6666
//均匀光照,与相机位置同步
67-
threeLayer.on("move", function () {
67+
threeLayer.on("render", function () {
6868
threeLayer.light.position.copy(threeLayer.renderer.camera.position);
6969
});
7070

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