diff --git a/README.md b/README.md index 2eb65381..cb8612ce 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,17 @@ [](https://www.npmjs.com/@openglobus/og)  + # Openglobus English | [简体中文](README_CN.md) | [Portuguese-BR](README_pt-BR.md) -[Openglobus](http://www.openglobus.org/) is a javascript library designed to display interactive 3d maps and planets -with map tiles, imagery and vector data, markers and 3d objects. It uses the WebGL technology, open source and +[Openglobus](http://www.openglobus.org/) is a typescript/javascript library designed to display interactive 3D maps at a +scale from planet to bee. +It supports various high-resolution terrain providers, imagery layers, renders thousands of 3D objects, provides +geometry measurement tools, and more. It uses the WebGL technology, open-source and completely free. -Openglobus main goal is to make 3d map features fast, good lookin, user friendly and easy to implement in any +Openglobus main goal is to make 3D map features fast, good looking, user friendly and easy to implement in any related project. ## Getting Start @@ -24,65 +27,72 @@ yarn add @openglobus/og ### Code: using umd lib ```html - - + + +
``` ### Code: using esm lib -``` html - +```html + + ``` ## Frameworks integrations -Openglobus integrates well with front-end frameworks like React, Angular or Vuejs [Read more here](./framework-intergration.md). +Openglobus integrates well with front-end frameworks like React, Angular or +Vuejs [Read more here](./framework-intergration.md). ## Documentation + UNDER CONSTRUCTION -Check out the [hosted examples](http://www.openglobus.org/examples.html), or +Here is a [Wiki](https://github.com/openglobus/openglobus/wiki), also +check out the [hosted examples](http://www.openglobus.org/examples.html), and the [API documentation](http://www.openglobus.org/api/). ## Get Started to contribute @@ -113,20 +123,39 @@ Then, it will generate 5 files at `dist/@openglobus/`: - og.esm.js - og.esm.js.map - og.css +- ./res/... -All JavaScript files are compressed by `terser` plugin. +### Run examples + +First, it starts by watching sources and building into dist folder esm module: + +```sh +npm run dev +``` + +Second, runs local server, then you can browse 127.0.0.1:8080: + +```sh +npm run serve +``` + +Third, try an example from the sandbox: + +```sh + http://127.0.0.1:8080/sandbox/osm/osm.html +``` ### Other scripts -`npm run core` - build og.core (rendering engine) stand-alone - -`npm run webgl` - build og.webgl (webgl wrap) stand-alone - `npm run docs` - build [api documentation](https://www.openglobus.org/api/) into /api folder `npm run serve` - run local web server for develop and watch examples -`npm run font` - generate custom font atlas +`npm run lint` - run code linter + +`npm run test` - run tests + +`tsc` - run typescript parser ## Support the Project diff --git a/README_CN.md b/README_CN.md index ae798fc1..5ee19a07 100644 --- a/README_CN.md +++ b/README_CN.md @@ -20,26 +20,29 @@ yarn add @openglobus/og ### 代码:使用 umd 引用 -``` html - - +```html + + + ``` @@ -47,39 +50,39 @@ yarn add @openglobus/og ### 代码:使用 esm 引用 ```html - + + ``` - - ## 文档 -查看[在线示例](http://www.openglobus.org/examples.html),或者查看 [API 帮助文档](http://www.openglobus.org/api/)。 - - +UNDER CONSTRUCTION +Here is a [Wiki](https://github.com/openglobus/openglobus/wiki), also +check out the [hosted examples](http://www.openglobus.org/examples.html), and +the [API documentation](http://www.openglobus.org/api/). ## 如何贡献你的代码 @@ -109,21 +112,39 @@ npm run build - og.esm.js - og.esm.js.map - og.css +- ./res/... -其中,js 文件均使用 `terser` 插件进行了代码压缩。 +### 新情况 + +First, it starts by watching sources and building into dist folder esm module: + +```sh +npm run dev +``` + +Second, runs local server, then you can browse 127.0.0.1:8080: + +```sh +npm run serve +``` + +Third, try an example from the sandbox: + +```sh + http://127.0.0.1:8080/sandbox/osm/osm.html +``` ### 其他命令 -`npm run core` - 仅构建 og.core (渲染引擎) - -`npm run webgl` - 仅构建 og.webgl (WebGL 的封装部分) - `npm run docs` - 本地构建 API 帮助文档至 `/api` 目录 `npm run serve` - 运行本地 Web 服务器以便开发以及查看示例代码 -`npm run font` - 生成自定义的字体集 +`npm run lint` - run code linter +`npm run test` - run tests + +`tsc` - run typescript parser ## 支持此项目 diff --git a/README_pt-BR.md b/README_pt-BR.md index 28842336..628bfe60 100644 --- a/README_pt-BR.md +++ b/README_pt-BR.md @@ -22,54 +22,58 @@ yarn add @openglobus/og ### Código: usando umd lib ```html - - + + + ``` ### Código: usando esm lib -``` html - +```html + + ``` @@ -80,7 +84,9 @@ Openglobus se integra bem com frameworks como React, Angular ou Vuejs [Read more ## Documentação -De uma olhada em: [hosted examples](http://www.openglobus.org/examples.html), or +UNDER CONSTRUCTION +Here is a [Wiki](https://github.com/openglobus/openglobus/wiki), also +check out the [hosted examples](http://www.openglobus.org/examples.html), and the [API documentation](http://www.openglobus.org/api/). ## Comece a contribuir @@ -111,20 +117,40 @@ Then, it will generate 5 files at `dist/@openglobus/`: - og.esm.js - og.esm.js.map - og.css +- ./res/... -All JavaScript files are compressed by `terser` plugin. +### Run examples + +First, it starts by watching sources and building into dist folder esm module: + +```sh +npm run dev +``` + +Second, runs local server, then you can browse 127.0.0.1:8080: + +```sh +npm run serve +``` + +Third, try an example from the sandbox: + +```sh + http://127.0.0.1:8080/sandbox/osm/osm.html +``` ### Outros scripts -`npm run core` - build og.core (rendering engine) stand-alone - -`npm run webgl` - build og.webgl (webgl wrap) stand-alone - `npm run docs` - build [documentation](https://www.openglobus.org/api/) into /api folder `npm run serve` - run local web server for develop and watch examples -`npm run font` - generate custom font atlas +`npm run lint` - run code linter + +`npm run test` - run tests + +`tsc` - run typescript parser + ## Ajude o projeto diff --git a/res/fonts/DancingScript-Regular.ttf b/bmfont/DancingScript-Regular.ttf similarity index 100% rename from res/fonts/DancingScript-Regular.ttf rename to bmfont/DancingScript-Regular.ttf diff --git a/res/fonts/Karla-Bold.ttf b/bmfont/Karla-Bold.ttf similarity index 100% rename from res/fonts/Karla-Bold.ttf rename to bmfont/Karla-Bold.ttf diff --git a/res/fonts/Karla-Light.ttf b/bmfont/Karla-Light.ttf similarity index 100% rename from res/fonts/Karla-Light.ttf rename to bmfont/Karla-Light.ttf diff --git a/res/fonts/Karla-Medium.ttf b/bmfont/Karla-Medium.ttf similarity index 100% rename from res/fonts/Karla-Medium.ttf rename to bmfont/Karla-Medium.ttf diff --git a/res/fonts/NotoSansArabic-Regular.ttf b/bmfont/NotoSansArabic-Regular.ttf similarity index 100% rename from res/fonts/NotoSansArabic-Regular.ttf rename to bmfont/NotoSansArabic-Regular.ttf diff --git a/res/fonts/Roboto-Regular.ttf b/bmfont/Roboto-Regular.ttf similarity index 100% rename from res/fonts/Roboto-Regular.ttf rename to bmfont/Roboto-Regular.ttf diff --git a/res/fonts/arial.ttf b/bmfont/arial.ttf similarity index 100% rename from res/fonts/arial.ttf rename to bmfont/arial.ttf diff --git a/res/fonts/run.cmd b/bmfont/bmfont.cmd similarity index 59% rename from res/fonts/run.cmd rename to bmfont/bmfont.cmd index c4cdd324..f3b64461 100644 --- a/res/fonts/run.cmd +++ b/bmfont/bmfont.cmd @@ -1 +1 @@ -npx msdf-bmfont-xml --reuse -i .\charset.txt -m 1024,1024 -f json -o %1.png -s 32 -r 24 -p 1 -t msdf %1 \ No newline at end of file +npx msdf-bmfont-xml --reuse -i .\charset.txt -m 1024,1024 -f json -o %2/%1.png -s 32 -r 24 -p 1 -t msdf %1 \ No newline at end of file diff --git a/res/fonts/run_rtl.cmd b/bmfont/bmfont_rtl.cmd similarity index 55% rename from res/fonts/run_rtl.cmd rename to bmfont/bmfont_rtl.cmd index 85aa229f..37c8d3f2 100644 --- a/res/fonts/run_rtl.cmd +++ b/bmfont/bmfont_rtl.cmd @@ -1 +1 @@ -msdf-bmfont.cmd --reuse -i .\charset-arabic.txt -m 1024,1024 -f json -o %1.png -s 42 -r 14 -p 1 -t msdf --rtl %1 \ No newline at end of file +msdf-bmfont.cmd --reuse -i .\charset-arabic.txt -m 1024,1024 -f json -o %2/%1.png -s 42 -r 14 -p 1 -t msdf --rtl %1 \ No newline at end of file diff --git a/res/fonts/charset-arabic.txt b/bmfont/charset-arabic.txt similarity index 100% rename from res/fonts/charset-arabic.txt rename to bmfont/charset-arabic.txt diff --git a/res/fonts/charset.txt b/bmfont/charset.txt similarity index 100% rename from res/fonts/charset.txt rename to bmfont/charset.txt diff --git a/res/fonts/NotoSansTC-Regular.otf b/res/fonts/NotoSansTC-Regular.otf deleted file mode 100644 index 64b52e68..00000000 Binary files a/res/fonts/NotoSansTC-Regular.otf and /dev/null differ