From e18ba58b06aaed163aa0517efe20db930f04c2b1 Mon Sep 17 00:00:00 2001 From: David Levinsky Date: Thu, 15 Mar 2018 15:32:09 +0100 Subject: [PATCH] fixed fonts on mobile platforms --- package.json | 2 +- src/core/core.js | 2 +- src/core/renderer/gpu/shaders.js | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 5af97924..9f2979b7 100755 --- a/package.json +++ b/package.json @@ -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": { diff --git a/src/core/core.js b/src/core/core.js index 07783f6e..dce3eb2d 100755 --- a/src/core/core.js +++ b/src/core/core.js @@ -481,7 +481,7 @@ string getCoreVersion() */ function getCoreVersion(full) { - return (full ? 'Core: ' : '') + '2.14.3'; + return (full ? 'Core: ' : '') + '2.14.4'; } diff --git a/src/core/renderer/gpu/shaders.js b/src/core/renderer/gpu/shaders.js index 168ae4a9..64b31aef 100755 --- a/src/core/renderer/gpu/shaders.js +++ b/src/core/renderer/gpu/shaders.js @@ -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'+ @@ -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'+ @@ -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'+