mirror of
https://github.com/tengge1/ShadowEditor.git
synced 2026-02-01 16:08:17 +00:00
渲染顺序问题,暂时去除GIS背景。
This commit is contained in:
parent
5357bd21cd
commit
4d755f251b
@ -13,14 +13,15 @@ Scene.prototype.start = function () {
|
||||
var editor = this.app.editor;
|
||||
|
||||
this.oldBackground = editor.scene.background;
|
||||
editor.scene.background = new THREE.CubeTextureLoader().load([
|
||||
'assets/textures/MilkyWay/dark-s_px.jpg',
|
||||
'assets/textures/MilkyWay/dark-s_nx.jpg',
|
||||
'assets/textures/MilkyWay/dark-s_py.jpg',
|
||||
'assets/textures/MilkyWay/dark-s_ny.jpg',
|
||||
'assets/textures/MilkyWay/dark-s_pz.jpg',
|
||||
'assets/textures/MilkyWay/dark-s_nz.jpg',
|
||||
]);
|
||||
editor.scene.background = null;
|
||||
// editor.scene.background = new THREE.CubeTextureLoader().load([
|
||||
// 'assets/textures/MilkyWay/dark-s_px.jpg',
|
||||
// 'assets/textures/MilkyWay/dark-s_nx.jpg',
|
||||
// 'assets/textures/MilkyWay/dark-s_py.jpg',
|
||||
// 'assets/textures/MilkyWay/dark-s_ny.jpg',
|
||||
// 'assets/textures/MilkyWay/dark-s_pz.jpg',
|
||||
// 'assets/textures/MilkyWay/dark-s_nz.jpg',
|
||||
// ]);
|
||||
editor.sceneHelpers.visible = false
|
||||
|
||||
editor.controls.enabled = false;
|
||||
@ -31,7 +32,8 @@ Scene.prototype.start = function () {
|
||||
|
||||
this.globe = new Globe(editor.camera, editor.renderer);
|
||||
editor.scene.add(this.globe);
|
||||
this.app.on(`afterRender.${this.id}`, this.update.bind(this));
|
||||
this.oldSceneBeforeRender = editor.scene.onBeforeRender;
|
||||
editor.scene.onBeforeRender = this.update.bind(this);
|
||||
};
|
||||
|
||||
Scene.prototype.update = function () {
|
||||
@ -45,8 +47,12 @@ Scene.prototype.stop = function () {
|
||||
|
||||
var editor = this.app.editor;
|
||||
|
||||
editor.scene.onBeforeRender = this.oldSceneBeforeRender;
|
||||
delete this.oldSceneBeforeRender;
|
||||
|
||||
editor.background = this.oldBackground;
|
||||
delete this.oldBackground;
|
||||
// delete this.oldBackground;
|
||||
|
||||
editor.sceneHelpers.visible = true;
|
||||
|
||||
editor.controls = new THREE.EditorControls(editor.camera, editor.renderer.domElement);
|
||||
|
||||
@ -163,7 +163,7 @@ TiledLayerRenderer.prototype.renderMesh = function () {
|
||||
gl.cullFace(gl.BACK);
|
||||
gl.frontFace(gl.CW);
|
||||
|
||||
gl.enable(gl.DEPTH_TEST);
|
||||
gl.disable(gl.DEPTH_TEST);
|
||||
// gl.depthFunc(gl.LEQUAL);
|
||||
|
||||
gl.uniformMatrix4fv(this.uniforms.modelMatrix, false, this.mesh.matrix.elements);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user