From 81465b1e318edc5ec622c730ae925a06cbf5122f Mon Sep 17 00:00:00 2001 From: shrekshao Date: Mon, 30 Oct 2017 15:42:10 -0700 Subject: [PATCH] try to setup --- .gitignore | 59 +++++++++++++++++++++++++++++++++++++++++++++++ README.md | 3 +++ index.js | 0 package.json | 26 +++++++++++++++++++++ src/app.js | 0 webpack.config.js | 53 ++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 141 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 index.js create mode 100644 package.json create mode 100644 src/app.js create mode 100644 webpack.config.js diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..00cbbdf --- /dev/null +++ b/.gitignore @@ -0,0 +1,59 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Typescript v1 declaration files +typings/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env + diff --git a/README.md b/README.md new file mode 100644 index 0000000..06b838b --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# gl-avatar-threejs viewer (editor?) + +For avatar 3d community \ No newline at end of file diff --git a/index.js b/index.js new file mode 100644 index 0000000..e69de29 diff --git a/package.json b/package.json new file mode 100644 index 0000000..64ee6fb --- /dev/null +++ b/package.json @@ -0,0 +1,26 @@ +{ + "name": "gl-avatar-threejs", + "version": "0.0.1", + "description": "threejs viewer supporting gl avatar", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/shrekshao/gl-avatar-threejs.git" + }, + "author": "shrekshao", + "license": "ISC", + "bugs": { + "url": "https://github.com/shrekshao/gl-avatar-threejs/issues" + }, + "homepage": "https://github.com/shrekshao/gl-avatar-threejs#readme", + "dependencies": { + "three": "^0.87.1" + }, + "devDependencies": { + "webpack": "^3.8.1", + "webpack-dev-server": "^2.9.3" + } +} diff --git a/src/app.js b/src/app.js new file mode 100644 index 0000000..e69de29 diff --git a/webpack.config.js b/webpack.config.js new file mode 100644 index 0000000..631df3a --- /dev/null +++ b/webpack.config.js @@ -0,0 +1,53 @@ +var path = require('path'); +var webpack = require('webpack'); +var HtmlWebpackPlugin = require('html-webpack-plugin'); +// const UglifyJSPlugin = require('uglifyjs-webpack-plugin'); + +module.exports = { + entry: { + app: './index.js' + }, + resolve: { + alias: { + // Lib: path.resolve(__dirname, 'demo/lib/'), + // Shaders: path.resolve(__dirname, 'demo/lib/src/shaders') + } + }, + output: { + filename: '[name].js', + path: path.resolve(__dirname, 'build') + }, + module: { + rules: [ + // { + // test: /\.css$/, + // use: [ + // 'style-loader', + // 'css-loader' + // ] + // }, + // { + // test: /\.(png|jpg|gif)$/, + // use: [ + // 'file-loader' + // ] + // }, + // { + // test: /\.(glsl|vs|fs)$/, + // use: [ + // 'shader-loader' + // ] + // } + ] + }, + plugins: [ + new HtmlWebpackPlugin({ + title: "glAvatar demo" + }) + ], + devServer: { + // contentBase: path.join(__dirname, "demo"), + contentBase: __dirname, + port: 7000 + } +}; \ No newline at end of file