Skip to content

Commit

Permalink
fixed fonts on mobile platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmtech committed Mar 15, 2018
1 parent 433ec64 commit e18ba58
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vts-browser-js",
"version": "2.14.3",
"version": "2.14.4",
"description": "JavaScript WebGL 3D maps rendering engine",
"main": "src/browser/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/core/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ string getCoreVersion()
*/

function getCoreVersion(full) {
return (full ? 'Core: ' : '') + '2.14.3';
return (full ? 'Core: ' : '') + '2.14.4';
}


Expand Down
4 changes: 3 additions & 1 deletion src/core/renderer/gpu/shaders.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ GpuShaders.text2VertexShader =
'gl_Position = uMVP * vec4(8.0, 0.0, 0.0, 1.0);\n'+
'}else{\n'+
'float file = floor(aTexCoord.y/4.0);\n'+
'vTexCoord.y = mod(aTexCoord.y,4.0);\n'+
'if (file != floor(uFile)) {\n'+
'gl_Position = uMVP * vec4(8.0, 0.0, 0.0, 1.0);\n'+
'}else{\n'+
Expand Down Expand Up @@ -366,6 +367,7 @@ GpuShaders.icon2VertexShader =
'void main(){ \n'+
'vTexCoord = aTexCoord.xy * uScale[2];\n'+
'float file = floor(aTexCoord.y/4.0);\n'+
'vTexCoord.y = mod(aTexCoord.y,4.0);\n'+
'if (file != floor(uFile)) {\n'+
'gl_Position = uMVP * vec4(8.0, 0.0, 0.0, 1.0);\n'+
'}else{\n'+
Expand Down Expand Up @@ -397,7 +399,7 @@ GpuShaders.text2FragmentShader = 'precision mediump float;\n'+

'void main() {\n'+
'vec4 mask;\n'+
'int i=int(round(mod(floor(vTexCoord.y),4.0)));\n'+
'int i=int(floor(vTexCoord.y));\n'+
'if (i == 0) mask=vec4(1.0,0.0,0.0,0.0);else\n'+
'if (i == 1) mask=vec4(0.0,1.0,0.0,0.0);else\n'+
'if (i == 2) mask=vec4(0.0,0.0,1.0,0.0);\n'+
Expand Down

0 comments on commit e18ba58

Please sign in to comment.