@@ -832,7 +832,6 @@ function renderWebglNoTile(
832
832
cy = H * 0.5 ;
833
833
const programs = root . programs ;
834
834
// 初始化工作
835
- const artBoardIndex : ArtBoard [ ] = [ ] ;
836
835
let pageTexture = root . pageTexture || createTexture ( gl , 0 , undefined , W , H ) ;
837
836
let artBoardTexture : WebGLTexture | undefined ; // 画布的背景色单独渲染,会干扰mbm的透明判断
838
837
let resTexture = pageTexture ;
@@ -844,6 +843,7 @@ function renderWebglNoTile(
844
843
const program = programs . program ;
845
844
gl . useProgram ( programs . program ) ;
846
845
// artboard的裁剪,以及记录artboard的画布rect来判断节点是否超出范围外
846
+ const artBoardIndex : ArtBoard [ ] = [ ] ;
847
847
let x1 = - 1 , y1 = - 1 , x2 = 1 , y2 = 1 ;
848
848
let abRect = new Float64Array ( [ 0 , 0 , W , H ] ) ;
849
849
// 循环收集数据,同一个纹理内的一次性给出,只1次DrawCall
@@ -874,7 +874,7 @@ function renderWebglNoTile(
874
874
abRect [ 3 ] = H ;
875
875
x1 = y1 = - 1 ;
876
876
x2 = y2 = 1 ;
877
- resTexture = drawArtBoard2Page ( gl , program , cx , cy , W , H , pageTexture , resTexture ) ;
877
+ // resTexture = drawArtBoard2Page(gl, program, cx, cy, W, H, pageTexture, resTexture);
878
878
}
879
879
continue ;
880
880
}
@@ -921,15 +921,15 @@ function renderWebglNoTile(
921
921
y1 = ( ab . y1 - cy ) / cy ;
922
922
x2 = ( ab . x3 - cx ) / cx ;
923
923
y2 = ( ab . y3 - cy ) / cy ;
924
- artBoardTexture = createTexture ( gl , 0 , undefined , W , H ) ;
925
- gl . framebufferTexture2D (
926
- gl . FRAMEBUFFER ,
927
- gl . COLOR_ATTACHMENT0 ,
928
- gl . TEXTURE_2D ,
929
- artBoardTexture ,
930
- 0 ,
931
- ) ;
932
- resTexture = artBoardTexture ;
924
+ // artBoardTexture = createTexture(gl, 0, undefined, W, H);
925
+ // gl.framebufferTexture2D(
926
+ // gl.FRAMEBUFFER,
927
+ // gl.COLOR_ATTACHMENT0,
928
+ // gl.TEXTURE_2D,
929
+ // artBoardTexture,
930
+ // 0,
931
+ // );
932
+ // resTexture = artBoardTexture;
933
933
}
934
934
}
935
935
// 检查画布内节点是否在画布范围内,否则可以跳过
@@ -941,7 +941,7 @@ function renderWebglNoTile(
941
941
isInScreen = checkInRect (
942
942
node . _filterBbox || node . filterBbox , // 检测用原始的渲染用取整的
943
943
matrix ,
944
- abRect [ 0 ] , abRect [ 1 ] , abRect [ 2 ] - abRect [ 0 ] , abRect [ 3 ] - abRect [ 1 ]
944
+ abRect [ 0 ] , abRect [ 1 ] , abRect [ 2 ] - abRect [ 0 ] , abRect [ 3 ] - abRect [ 1 ] ,
945
945
) ;
946
946
}
947
947
}
@@ -985,11 +985,11 @@ function renderWebglNoTile(
985
985
h : H ,
986
986
t : resTexture ,
987
987
} ) ;
988
- const isPagTex = resTexture === pageTexture ;
988
+ const isPageTex = resTexture === pageTexture ;
989
989
genBgBlur ( gl , root , wrap , matrix , outline , blur , programs , scale , W , H ) ;
990
990
// blur过程会销毁掉原本的bg纹理,赋值要特别注意原本的page纹理
991
991
resTexture = wrap . list [ 0 ] . t ! ;
992
- if ( isPagTex ) {
992
+ if ( isPageTex ) {
993
993
pageTexture = resTexture ;
994
994
}
995
995
gl . bindFramebuffer ( gl . FRAMEBUFFER , resFrameBuffer ) ;
@@ -1074,7 +1074,7 @@ function renderWebglNoTile(
1074
1074
abRect [ 3 ] = H ;
1075
1075
x1 = y1 = - 1 ;
1076
1076
x2 = y2 = 1 ;
1077
- resTexture = drawArtBoard2Page ( gl , program , cx , cy , W , H , pageTexture , resTexture ) ;
1077
+ // resTexture = drawArtBoard2Page(gl, program, cx, cy, W, H, pageTexture, resTexture);
1078
1078
}
1079
1079
}
1080
1080
renderOverlay ( gl , cx , cy , W , H , root , false ) ;
0 commit comments