Skip to content

Commit

Permalink
Merge pull request #45 from iSpring/develop
Browse files Browse the repository at this point in the history
merge develop to master
  • Loading branch information
iSpring committed Jan 30, 2017
2 parents 8517c45 + 0d81c53 commit b1cb493
Show file tree
Hide file tree
Showing 74 changed files with 110 additions and 47 deletions.
Empty file modified .gitignore 100644 → 100755
Empty file.
10 changes: 10 additions & 0 deletions .travis.yml
@@ -0,0 +1,10 @@
language: node_js

before_install:
- nvm install 6

install:
- npm install

script:
- npm run test
Empty file modified .vscode/settings.json 100644 → 100755
Empty file.
23 changes: 21 additions & 2 deletions README.md 100644 → 100755
Expand Up @@ -8,6 +8,23 @@


## WebGlobe
[![Build Status](https://travis-ci.org/iSpring/WebGlobe.svg?branch=develop)](https://travis-ci.org/iSpring/WebGlobe)
[![Release](https://img.shields.io/badge/release-0.4.4-blue.svg)](https://github.com/iSpring/WebGlobe/releases)
[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/iSpring/WebGlobe)

[![Chrome 8+](https://img.shields.io/badge/Chrome-8+-1DA362.svg)](http://caniuse.com/#search=WebGL)
[![Firefox 4+](https://img.shields.io/badge/Firefox-4+-E77827.svg)](http://caniuse.com/#search=WebGL)
[![IE11](https://img.shields.io/badge/IE-11+-00BCF2.svg)](http://caniuse.com/#search=WebGL)
[![Edge12+](https://img.shields.io/badge/Edge-12+-2F78BD.svg)](http://caniuse.com/#search=WebGL)
[![Safari 5.1+](https://img.shields.io/badge/Safari-5.1+-07C0F2.svg)](http://caniuse.com/#search=WebGL)
[![Opera 12.1+](https://img.shields.io/badge/Opera-12.1+-E23232.svg)](http://caniuse.com/#search=WebGL)

[![Chrome for Android 25+](https://img.shields.io/badge/Chrome%20for%20Android-25+-1DA362.svg)](http://caniuse.com/#search=WebGL)
[![Firefox Mobile 4+](https://img.shields.io/badge/Firefox%20Mobile-4+-E77827.svg)](http://caniuse.com/#search=WebGL)
[![Safari Mobile 8.1+](https://img.shields.io/badge/Safari%20Mobile-8.1%2B-07C0F2.svg)](http://caniuse.com/#search=WebGL)
[![Opera Mobile 12+](https://img.shields.io/badge/Opera%20Mobile-12+-E23232.svg)](http://caniuse.com/#search=WebGL)


WebGlobe是基于HTML5原生WebGL实现的轻量级Google Earth三维地图引擎,支持Google地图、微软Bing地图、OpenStreetMap等。

没有使用第三方框架,无需插件,所有支持WebGL的浏览器均可使用。效率高,内存占用少。会持续完善,目标是使其成为三维在线地图服务网站。
Expand All @@ -24,9 +41,11 @@ Demo: https://ispring.github.io/WebGlobe/index.html
3. 在项目的根目录下执行npm install,安装所需模块。

4. package.json中定义了npm scripts:
- npm run clear 用于清除编译打包的结果
- npm run clean 用于清除编译打包的结果
- npm run build:dev 对代码进行编译打包,代码没有压缩混淆,用于开发环境
- npm run build:prod 对代码进行编译打包,代码进行了压缩混淆,用于生产环境
- npm start 用于执行build:dev

5. 有问题的话欢迎大家提issue或者到 https://gitter.im/iSpring/Lobby 进行讨论,这样更方便沟通。
5. 开发过程中,在WebGlobe根目录下执行npm start即可进行打包编译

6. 有问题的话欢迎大家提issue或者到 https://gitter.im/iSpring/WebGlobe 进行讨论
Empty file modified images/WebGL.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified images/iSpring.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified images/logo.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified index.css 100644 → 100755
Empty file.
2 changes: 2 additions & 0 deletions index.ts 100644 → 100755
@@ -1,6 +1,8 @@
import Kernel = require("./src/world/Kernel");
import Globe = require("./src/world/Globe");

import "./index.css";

(function () {
var canvas = <HTMLCanvasElement>document.getElementById("canvasId");
var globe = new Globe(canvas);
Expand Down
93 changes: 50 additions & 43 deletions package.json 100644 → 100755
@@ -1,44 +1,51 @@
{
"name": "webglobe",
"version": "0.4.4",
"description": "A WebGL virtual globe and map engine.",
"main": "require.js",
"scripts": {
"clear": "rimraf buildOutput",
"prebuild:dev": "npm run clear",
"build:dev": "cross-env NODE_ENV=development webpack --progress --colors",
"prebuild:prod": "npm run clear",
"build:prod": "cross-env NODE_ENV=production webpack --progress --colors",
"start": "npm run build:dev"
},
"repository": {
"type": "git",
"url": "git+https://github.com/iSpring/WebGlobe.git"
},
"keywords": [
"WebGL",
"Map",
"Globe",
"Earth",
"3D",
"HTML5"
],
"author": "iSpring",
"license": "ISC",
"bugs": {
"url": "https://github.com/iSpring/WebGlobe/issues"
},
"homepage": "https://github.com/iSpring/WebGlobe#readme",
"devDependencies": {
"cross-env": "^3.1.3",
"ejs-loader": "^0.3.0",
"html-webpack-plugin": "^2.26.0",
"rimraf": "^2.5.4",
"ts-loader": "^1.3.3",
"typescript": "^2.0.3",
"webpack": "^1.14.0"
},
"dependencies": {
"es6-promise": "^4.0.5"
}
}
"name": "webglobe",
"version": "0.4.4",
"description": "A WebGL virtual globe and map engine.",
"main": "require.js",
"scripts": {
"clean": "rimraf buildOutput && rimraf index.html",
"prebuild:dev": "npm run clean",
"build:dev": "cross-env NODE_ENV=development webpack --progress --colors",
"prebuild:prod": "npm run clean",
"build:prod": "cross-env NODE_ENV=production webpack --progress --colors",
"start": "npm run build:dev",
"test": "cross-env NODE_ENV=development webpack --progress --colors --ci"
},
"repository": {
"type": "git",
"url": "git+https://github.com/iSpring/WebGlobe.git"
},
"keywords": [
"WebGL",
"Map",
"Globe",
"Earth",
"3D",
"HTML5"
],
"author": "iSpring",
"engines": {
"node": ">=6.0.0"
},
"license": "ISC",
"bugs": {
"url": "https://github.com/iSpring/WebGlobe/issues"
},
"homepage": "https://github.com/iSpring/WebGlobe#readme",
"devDependencies": {
"chalk": "^1.1.3",
"cross-env": "^3.1.3",
"css-loader": "^0.26.1",
"ejs-loader": "^0.3.0",
"html-webpack-plugin": "^2.26.0",
"rimraf": "^2.5.4",
"style-loader": "^0.13.1",
"ts-loader": "^1.3.3",
"typescript": "^2.0.3",
"webpack": "^1.14.0"
},
"dependencies": {
"es6-promise": "^4.0.5"
}
}
Empty file modified src/world/Camera.ts 100644 → 100755
Empty file.
Empty file modified src/world/Definitions.d.ts 100644 → 100755
Empty file.
Empty file modified src/world/EventHandler.ts 100644 → 100755
Empty file.
Empty file modified src/world/Extent.ts 100644 → 100755
Empty file.
Empty file modified src/world/Globe.ts 100644 → 100755
Empty file.
Empty file modified src/world/GraphicGroup.ts 100644 → 100755
Empty file.
Empty file modified src/world/Image.ts 100644 → 100755
Empty file.
Empty file modified src/world/Kernel.ts 100644 → 100755
Empty file.
Empty file modified src/world/LocationService.ts 100644 → 100755
Empty file.
Empty file modified src/world/Object3D.ts 100644 → 100755
Empty file.
Empty file modified src/world/Program.ts 100644 → 100755
Empty file.
Empty file modified src/world/Renderer.ts 100644 → 100755
Empty file.
Empty file modified src/world/Scene.ts 100644 → 100755
Empty file.
Empty file modified src/world/TileGrid.ts 100644 → 100755
Empty file.
Empty file modified src/world/Utils.ts 100644 → 100755
Empty file.
Empty file modified src/world/VertexBufferObject.ts 100644 → 100755
Empty file.
Empty file modified src/world/geometries/Atmosphere.ts 100644 → 100755
Empty file.
Empty file modified src/world/geometries/Box.ts 100644 → 100755
Empty file.
Empty file modified src/world/geometries/Geometry.ts 100644 → 100755
Empty file.
Empty file modified src/world/geometries/Marker.ts 100644 → 100755
Empty file.
Empty file modified src/world/geometries/Mesh.ts 100644 → 100755
Empty file.
Empty file modified src/world/geometries/MeshVertice.ts 100644 → 100755
Empty file.
Empty file modified src/world/geometries/TileGeometry.ts 100644 → 100755
Empty file.
Empty file modified src/world/geometries/Triangle.ts 100644 → 100755
Empty file.
Empty file modified src/world/graphics/Atmosphere.ts 100644 → 100755
Empty file.
Empty file modified src/world/graphics/Graphic.ts 100644 → 100755
Empty file.
Empty file modified src/world/graphics/Locator.ts 100644 → 100755
Empty file.
Empty file modified src/world/graphics/MeshGraphic.ts 100644 → 100755
Empty file.
Empty file modified src/world/graphics/Tile.ts 100644 → 100755
Empty file.
Empty file modified src/world/images/atmosphere.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src/world/images/location.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src/world/images/pin.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src/world/images/poi.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src/world/layers/ArcGISTiledLayer.ts 100644 → 100755
Empty file.
Empty file modified src/world/layers/Autonavi.ts 100644 → 100755
Empty file.
Empty file modified src/world/layers/BingTiledLayer.ts 100644 → 100755
Empty file.
Empty file modified src/world/layers/BlendTiledLayer.ts 100644 → 100755
Empty file.
Empty file modified src/world/layers/Google.ts 100644 → 100755
Empty file.
Empty file modified src/world/layers/LabelLayer.ts 100644 → 100755
Empty file.
Empty file modified src/world/layers/NokiaTiledLayer.ts 100644 → 100755
Empty file.
Empty file modified src/world/layers/OsmTiledLayer.ts 100644 → 100755
Empty file.
Empty file modified src/world/layers/PoiLayer.ts 100644 → 100755
Empty file.
Empty file modified src/world/layers/Qihu.ts 100644 → 100755
Empty file.
Empty file modified src/world/layers/Soso.ts 100644 → 100755
Empty file.
Empty file modified src/world/layers/SubTiledLayer.ts 100644 → 100755
Empty file.
Empty file modified src/world/layers/TiledLayer.ts 100644 → 100755
Empty file.
Empty file modified src/world/layers/TrafficLayer.ts 100644 → 100755
Empty file.
Empty file modified src/world/materials/Material.ts 100644 → 100755
Empty file.
Empty file modified src/world/materials/MeshColorMaterial.ts 100644 → 100755
Empty file.
Empty file modified src/world/materials/MeshTextureMaterial.ts 100644 → 100755
Empty file.
Empty file modified src/world/materials/PoiMaterial.ts 100644 → 100755
Empty file.
Empty file modified src/world/materials/TileMaterial.ts 100644 → 100755
Empty file.
Empty file modified src/world/math/Line.ts 100644 → 100755
Empty file.
Empty file modified src/world/math/Matrix.ts 100644 → 100755
Empty file.
Empty file modified src/world/math/Plan.ts 100644 → 100755
Empty file.
Empty file modified src/world/math/Ray.ts 100644 → 100755
Empty file.
Empty file modified src/world/math/Utils.ts 100644 → 100755
Empty file.
Empty file modified src/world/math/Vector.ts 100644 → 100755
Empty file.
Empty file modified src/world/math/Vertice.ts 100644 → 100755
Empty file.
1 change: 0 additions & 1 deletion template.html 100644 → 100755
Expand Up @@ -13,7 +13,6 @@
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />
<link rel="shortcut icon" href="images/logo.png" />
<link rel="stylesheet" type="text/css" href="index.css" />
</head>

<body onselectstart="return false;">
Expand Down
Empty file modified tsconfig.json 100644 → 100755
Empty file.
Empty file modified versions.txt 100644 → 100755
Empty file.
Empty file modified webglobe.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 27 additions & 1 deletion webpack.config.js 100644 → 100755
@@ -1,7 +1,10 @@
var path = require('path');
var chalk = require('chalk');
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');

//https://github.com/webpack/webpack/issues/708

module.exports = {
entry: path.resolve(__dirname, "./index.ts"),
output: {
Expand All @@ -13,7 +16,8 @@ module.exports = {
},
module: {
loaders: [
{ test: /\.tsx?$/, loader: "ts-loader" }
{ test: /\.tsx?$/, loader: "ts-loader" },
{ test: /\.css$/, loader: "style!css"}
]
},
plugins: [
Expand All @@ -26,6 +30,28 @@ module.exports = {
]
};

if(process.argv.indexOf("--ci") >= 0){
module.exports.plugins.push(
function(){
this.plugin("done", function(stats){
var errors = stats.compilation.errors;
if(errors && errors.length > 0){
console.log("");
console.log(chalk.red("----------------------------------------------------------------"));
errors.forEach(function(err){
var msg = chalk.red(`ERROR in ${err.module.userRequest},`);
msg += chalk.blue(`(${err.location.line},${err.location.character}),`);
msg += chalk.red(err.rawMessage);
console.log(msg);
});
console.log(chalk.red("----------------------------------------------------------------"));
process.exit(1);
}
});
}
);
}

if(process.env.NODE_ENV === 'production'){
module.exports.plugins.push(new webpack.optimize.UglifyJsPlugin());
}

0 comments on commit b1cb493

Please sign in to comment.