优化渲染效果
This commit is contained in:
parent
bb113deea5
commit
43f4245cac
BIN
public/test.view
BIN
public/test.view
Binary file not shown.
@ -140,7 +140,7 @@ const ladderAnalog_GL_WidthShifts = new Float32Array([
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
||||||
const lineAnalog_WidthShift = 0.0015;
|
const lineAnalog_WidthShift = 0.002;
|
||||||
const lineAnlog_GL_WidthShifts = new Float32Array([
|
const lineAnlog_GL_WidthShifts = new Float32Array([
|
||||||
0, lineAnalog_WidthShift, // 0
|
0, lineAnalog_WidthShift, // 0
|
||||||
- lineAnalog_WidthShift, lineAnalog_WidthShift, // 1
|
- lineAnalog_WidthShift, lineAnalog_WidthShift, // 1
|
||||||
|
@ -35,7 +35,7 @@ class WebGL2WaveRender {
|
|||||||
const gl = canvas.getContext('webgl2', {
|
const gl = canvas.getContext('webgl2', {
|
||||||
premultipliedAlpha: false,
|
premultipliedAlpha: false,
|
||||||
alpha: true,
|
alpha: true,
|
||||||
antialias: false,
|
antialias: true,
|
||||||
depth: false
|
depth: false
|
||||||
});
|
});
|
||||||
this.webglLocation = this.initProgram(gl);
|
this.webglLocation = this.initProgram(gl);
|
||||||
@ -507,7 +507,7 @@ class WebGL2WaveRender {
|
|||||||
// 如果是 vec,根据设定的渲染模式和进行设置
|
// 如果是 vec,根据设定的渲染模式和进行设置
|
||||||
const vecRenderModal = _this.getVecRenderModal(globalLookup, signal.link);
|
const vecRenderModal = _this.getVecRenderModal(globalLookup, signal.link);
|
||||||
if (vecRenderModal === 0) {
|
if (vecRenderModal === 0) {
|
||||||
// 普通数字渲染模式、
|
// 普通数字渲染模式
|
||||||
gl.uniform2fv(webglLocation.widthShifts, gl_WidthShifts);
|
gl.uniform2fv(webglLocation.widthShifts, gl_WidthShifts);
|
||||||
gl.uniform2fv(webglLocation.shifts, gl_Shifts_for_bar);
|
gl.uniform2fv(webglLocation.shifts, gl_Shifts_for_bar);
|
||||||
gl.bindVertexArray(signalItem.lineVao);
|
gl.bindVertexArray(signalItem.lineVao);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user