This commit is contained in:
liteng 2019-08-21 07:52:21 +08:00
parent 9c2690ae7a
commit 472b2bc52b
6 changed files with 47 additions and 0 deletions

1
.gitignore vendored
View File

@ -90,3 +90,4 @@ typings/
/ShadowEditor.Web/test/unit/build
/ShadowEditor.Web/temp
/.vscode
/ShadowEditor.Web/test/weekend/build

View File

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Ray Tracing In One Weekend</title>
<style>
#canvas {
width: 200px;
height: 200px;
}
</style>
</head>
<body>
<canvas id="canvas"></canvas>
<script src="build/weekend.js"></script>
<script>
var app = new Weekend.Application();
app.start();
</script>
</body>
</html>

View File

@ -0,0 +1,12 @@
export default {
input: 'ShadowEditor.Web/test/weekend/src/index.js',
output: {
indent: '\t',
format: 'umd',
name: 'Weekend',
file: 'ShadowEditor.Web/test/weekend/build/weekend.js'
},
treeshake: true,
external: [],
plugins: []
};

View File

@ -0,0 +1,7 @@
class Application {
start() {
}
}
export default Application;

View File

@ -0,0 +1 @@
export { default as Application } from './Application';

View File

@ -25,6 +25,7 @@
"dev": "rollup -c ShadowEditor.Web/rollup.config.js --watch",
"ai": "python ShadowEditor.AI/start.py",
"translate": "python ShadowEditor.AI/translate.py",
"weekend": "rollup -c ShadowEditor.Web/test/weekend/rollup.config.js --watch",
"build-docs": "gitbook build docs-dev",
"test": "rollup -c ShadowEditor.Web/test/unit/rollup.config.js",
"clear": "npm prune"