cleanup build
This commit is contained in:
parent
9436f149c6
commit
3961318ff0
29
README.md
29
README.md
@ -6,19 +6,38 @@
|
||||
## About
|
||||
|
||||
Potree is a free open-source WebGL based point cloud renderer for large point clouds.
|
||||
|
||||
It is based on the [TU Wien Scanopy project](https://www.cg.tuwien.ac.at/research/projects/Scanopy/)
|
||||
and it was part of the [Harvest4D Project](https://harvest4d.org/).
|
||||
|
||||
|
||||
<a href="http://potree.org/wp/demo/" target="_blank">  </a>
|
||||
|
||||
Potree was part of the [Harvest4D Project](https://harvest4d.org/)
|
||||
|
||||
Newest information and work in progress is usually available on [twitter](https://twitter.com/m_schuetz)
|
||||
|
||||
General infos, downloads, showcase, etc. at [potree.org](http://potree.org/)
|
||||
Contact: Markus Schütz (mschuetz@potree.org)
|
||||
|
||||
Contact: Markus Schütz - mschuetz@potree.org
|
||||
Reference: [Potree: Rendering Large Point Clouds in Web Browsers](https://www.cg.tuwien.ac.at/research/publications/2016/SCHUETZ-2016-POT/SCHUETZ-2016-POT-thesis.pdf)
|
||||
|
||||
## Build
|
||||
|
||||
Make sure you have [node.js](http://nodejs.org/) installed
|
||||
|
||||
Install all dependencies, as specified in package.json,
|
||||
then, install the gulp build tool:
|
||||
|
||||
cd <potree_directory>
|
||||
npm install
|
||||
npm install -g gulp
|
||||
|
||||
Use the ```gulp watch``` command to
|
||||
|
||||
* create ./build/potree
|
||||
* watch for changes to the source code and automatically create a new build on change
|
||||
* start a web server at localhost:1234. Go to http://localhost:1234/examples/ to test the examples.
|
||||
|
||||
```
|
||||
gulp watch
|
||||
```
|
||||
|
||||
## Downloads
|
||||
|
||||
|
||||
@ -5,14 +5,25 @@
|
||||
|
||||
Make sure you have [node.js](http://nodejs.org/) installed
|
||||
|
||||
Setting up gulp:
|
||||
First, install all dependencies, as specified in package.json,
|
||||
then, install the gulp build tool.
|
||||
|
||||
cd potree_directory
|
||||
cd <potree_directory>
|
||||
npm install
|
||||
npm install -g gulp
|
||||
npm install --save-dev
|
||||
|
||||
## Usage
|
||||
|
||||
gulp build
|
||||
Use this command to
|
||||
|
||||
This will create a single build/js/potree.js file
|
||||
* create ./build/potree
|
||||
* watch for changes to the source code and automatically create a new build on change
|
||||
* start a web server at localhost:1234. Go to http://localhost:1234/examples/ to test the examples.
|
||||
|
||||
If the source code changes, a new build will be done automatically.
|
||||
|
||||
gulp watch
|
||||
|
||||
Or do a build once, without watching for changes.
|
||||
|
||||
gulp build
|
||||
37
gulpfile.js
37
gulpfile.js
@ -12,6 +12,8 @@ const through = require('through');
|
||||
const os = require('os');
|
||||
const File = gutil.File;
|
||||
const connect = require('gulp-connect');
|
||||
const watch = require('glob-watcher');
|
||||
|
||||
|
||||
let server;
|
||||
|
||||
@ -155,7 +157,6 @@ gulp.task("workers", function(){
|
||||
|
||||
gulp.src(workers[workerName])
|
||||
.pipe(concat(`${workerName}.js`))
|
||||
.pipe(size({showFiles: true}))
|
||||
.pipe(gulp.dest('build/potree/workers'));
|
||||
|
||||
}
|
||||
@ -165,19 +166,16 @@ gulp.task("workers", function(){
|
||||
gulp.task("shaders", function(){
|
||||
return gulp.src(shaders)
|
||||
.pipe(encodeShader('shaders.js', "Potree.Shader"))
|
||||
.pipe(size({showFiles: true}))
|
||||
.pipe(gulp.dest('build/shaders'));
|
||||
});
|
||||
|
||||
gulp.task("scripts", ['workers','shaders', "icons_viewer", "examples_page"], function(){
|
||||
gulp.src(paths.potree)
|
||||
.pipe(concat('potree.js'))
|
||||
.pipe(size({showFiles: true}))
|
||||
.pipe(gulp.dest('build/potree'));
|
||||
|
||||
gulp.src(paths.laslaz)
|
||||
.pipe(concat('laslaz.js'))
|
||||
.pipe(size({showFiles: true}))
|
||||
.pipe(gulp.dest('build/potree'));
|
||||
|
||||
gulp.src(paths.html)
|
||||
@ -354,7 +352,7 @@ gulp.task('examples_page', function() {
|
||||
if(err){
|
||||
console.log(err);
|
||||
}else{
|
||||
console.log(`examples/page.html`);
|
||||
console.log(`created examples/page.html`);
|
||||
}
|
||||
});
|
||||
|
||||
@ -426,8 +424,8 @@ gulp.task('icons_viewer', function() {
|
||||
gulp.task('watch', function() {
|
||||
gulp.run("build");
|
||||
gulp.run("webserver");
|
||||
|
||||
gulp.watch([
|
||||
|
||||
let watchlist = [
|
||||
'src/**/*.js',
|
||||
'src/**/*.css',
|
||||
'src/**/*.html',
|
||||
@ -435,7 +433,28 @@ gulp.task('watch', function() {
|
||||
'src/**/*.fs',
|
||||
'resources/**/*',
|
||||
'examples//**/*.json',
|
||||
], ["build"]);
|
||||
];
|
||||
|
||||
let blacklist = [
|
||||
'resources/icons/index.html'
|
||||
];
|
||||
|
||||
let watcher = watch(watchlist, cb => {
|
||||
|
||||
{ // abort if blacklisted
|
||||
let file = cb.path.replace(/\\/g, "/");
|
||||
let isOnBlacklist = blacklist.some(blacklisted => file.indexOf(blacklisted) >= 0);
|
||||
if(isOnBlacklist){
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
console.log("===============================");
|
||||
console.log("watch event:");
|
||||
console.log(cb);
|
||||
gulp.run("build");
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
@ -508,7 +527,7 @@ let encodeShader = function(fileName, varname, opt){
|
||||
let file = files[i];
|
||||
|
||||
let fname = file.path.replace(file.base, "");
|
||||
console.log(fname);
|
||||
//console.log(fname);
|
||||
|
||||
let content = new Buffer(b).toString();
|
||||
|
||||
|
||||
3857
package-lock.json
generated
3857
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
23
package.json
23
package.json
@ -8,28 +8,23 @@
|
||||
"test": "npm run lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"process-nextick-args": "^1.0.7",
|
||||
"safe-buffer": "^5.1.1",
|
||||
"util-deprecate": "^1.0.2"
|
||||
},
|
||||
"author": "Markus Schütz",
|
||||
"license": "BSD-2-CLAUSE",
|
||||
"devDependencies": {
|
||||
"eslint": "^4.4.1",
|
||||
"eslint": "^4.18.2",
|
||||
"eslint-config-happiness": "^10.2.1",
|
||||
"eslint-plugin-import": "^2.7.0",
|
||||
"eslint-plugin-node": "^5.1.1",
|
||||
"eslint-plugin-promise": "^3.5.0",
|
||||
"eslint-plugin-import": "^2.9.0",
|
||||
"eslint-plugin-node": "^5.2.1",
|
||||
"eslint-plugin-promise": "^3.6.0",
|
||||
"eslint-plugin-standard": "^3.0.1",
|
||||
"gulp": "~3.5.2",
|
||||
"gulp": "~3.9.1",
|
||||
"gulp-concat": "~2.1.7",
|
||||
"gulp-connect": "^2.3.1",
|
||||
"gulp-jshint": "^2.0.4",
|
||||
"gulp-jshint": "^2.1.0",
|
||||
"gulp-rename": "~1.0.0",
|
||||
"gulp-size": "^2.1.0",
|
||||
"gulp-uglify": "~0.2.1",
|
||||
"gulp-util": "~2.2.20",
|
||||
"jshint": "^2.9.5",
|
||||
"through": "~2.3.4"
|
||||
}
|
||||
},
|
||||
"author": "Markus Schütz",
|
||||
"license": "BSD-2-CLAUSE"
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user