移除three不必要的模块basic material

This commit is contained in:
mipha.ly 2019-03-01 11:15:33 +08:00
parent d6829f30b9
commit 664bdb08bb
3 changed files with 3 additions and 4 deletions

View File

@ -84,8 +84,8 @@ export default class Layer extends Base {
object.onBeforeRender = () => {
const zoom = this.scene.getZoom();
object.material.setUniformsValue('u_time', this.scene._engine.clock.getElapsedTime());
object.material.setUniformsValue('u_zoom', zoom);
// object.material.setUniformsValue('u_time', this.scene._engine.clock.getElapsedTime());
// object.material.setUniformsValue('u_zoom', zoom);
this._preRender();
};

View File

@ -23,7 +23,6 @@ export { Vector4 } from 'three/src/math/Vector4.js';
export { Vector3 } from 'three/src/math/Vector3.js';
export { Vector2 } from 'three/src/math/Vector2.js';
export { ShaderMaterial } from 'three/src/materials/ShaderMaterial.js';
export { MeshBasicMaterial } from 'three/src/materials/MeshBasicMaterial.js';
export { DataTexture } from 'three/src/textures/DataTexture.js';
export { Color } from 'three/src/math/Color.js';
export {

View File

@ -72,7 +72,7 @@ function createIntensityPass(layer, bbox) {
requestAnimationFrame(render);
const zoom = scene.getZoom();
mesh.material.uniforms.u_zoom.value = zoom;
const passWidth = Math.min(10000, Math.pow(zoom, 2.0) * 200);
const passWidth = Math.min(10000, Math.pow(zoom, 2.0) * 300);
const passHeight = passWidth * (bbox.height / bbox.width);
renderpass.pass.setSize(passWidth, passHeight);
renderpass.render();