Skip to content

Commit

Permalink
perf(imgui): now load small font fnt,png
Browse files Browse the repository at this point in the history
  • Loading branch information
yyc-git committed Mar 3, 2019
1 parent b8585f2 commit c2c2b07
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"wonder-commonlib": "^0.2.28",
"wonder-hotkey": "^0.0.1",
"wonder-log": "^0.2.11",
"wonder.js": "1.0.0-beta.2.10"
"wonder.js": "1.0.0-beta.2.12"
},
"resolutions": {
"wonder-log": "^0.2.11",
Expand Down
6 changes: 6 additions & 0 deletions public/font/empty.fnt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
info face="Lato-Regular" size=64 bold=0 italic=0 charset="" unicode=1 stretchH=100 smooth=1 aa=2 padding=0,0,0,0 spacing=0,0
common lineHeight=77 base=63 scaleW=512 scaleH=512 pages=1 packed=0 alphaChnl=0 redChnl=0 greenChnl=0 blueChnl=0
page id=0 file="lato.png"
chars count=96
char id=10 x=113 y=187 width=32 height=46 xoffset=1 yoffset=17 xadvance=34 page=0 chnl=0
kerning first=123 second=113 amount=-2
Binary file added public/font/empty.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/core/utils/engine/MainUtils.re
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ let init = () =>
_getLoadData()
|> WonderBsMost.Most.flatMap(engineState =>
LoaderManagerEngineService.loadIMGUIAsset(
"./public/font/Lato-Regular-64.fnt",
"./public/font/lato.png",
"./public/font/empty.fnt",
"./public/font/empty.png",
Js.Nullable.return([|
("./public/img/camera.png", "camera"),
("./public/img/sun.png", "directionLight"),
Expand Down

0 comments on commit c2c2b07

Please sign in to comment.