diff --git a/demo/client/html/3d-demo.html b/demo/client/html/3d-demo.html new file mode 100644 index 00000000..4b6f3d83 --- /dev/null +++ b/demo/client/html/3d-demo.html @@ -0,0 +1,22 @@ + + + + 3D — Pathfinder Demo + + ${require('./include/header.html')} + + + + ${require('./include/navbar.html')} +
0 ms
+ +
+ +
+ + diff --git a/demo/client/html/include/navbar.html b/demo/client/html/include/navbar.html index e75c0220..e7896d54 100644 --- a/demo/client/html/include/navbar.html +++ b/demo/client/html/include/navbar.html @@ -8,6 +8,7 @@ diff --git a/demo/client/src/3d-demo.ts b/demo/client/src/3d-demo.ts new file mode 100644 index 00000000..9895876e --- /dev/null +++ b/demo/client/src/3d-demo.ts @@ -0,0 +1,11 @@ +// pathfinder/client/src/3d-demo.ts +// +// Copyright © 2017 The Pathfinder Project Developers. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +require('../html/3d-demo.html'); diff --git a/demo/client/webpack.config.js b/demo/client/webpack.config.js index 78d48ab9..1195c324 100644 --- a/demo/client/webpack.config.js +++ b/demo/client/webpack.config.js @@ -3,6 +3,7 @@ const ExtractTextPlugin = require('extract-text-webpack-plugin'); module.exports = { devtool: 'inline-source-map', entry: { + '3d-demo': "./src/3d-demo.ts", 'svg-demo': "./src/svg-demo.ts", 'text-demo': "./src/text-demo.ts", }, diff --git a/demo/server/src/main.rs b/demo/server/src/main.rs index e82c37c0..1033a8d7 100644 --- a/demo/server/src/main.rs +++ b/demo/server/src/main.rs @@ -40,6 +40,7 @@ use std::u32; static STATIC_TEXT_DEMO_PATH: &'static str = "../client/text-demo.html"; static STATIC_SVG_DEMO_PATH: &'static str = "../client/svg-demo.html"; +static STATIC_3D_DEMO_PATH: &'static str = "../client/3d-demo.html"; static STATIC_CSS_BOOTSTRAP_PATH: &'static str = "../client/node_modules/bootstrap/dist/css"; static STATIC_CSS_PATHFINDER_PATH: &'static str = "../client/css/pathfinder.css"; static STATIC_JS_BOOTSTRAP_PATH: &'static str = "../client/node_modules/bootstrap/dist/js"; @@ -479,6 +480,10 @@ fn static_text_demo() -> io::Result { fn static_svg_demo() -> io::Result { NamedFile::open(STATIC_SVG_DEMO_PATH) } +#[get("/demo/3d")] +fn static_3d_demo() -> io::Result { + NamedFile::open(STATIC_3D_DEMO_PATH) +} #[get("/css/bootstrap/")] fn static_css_bootstrap(file: PathBuf) -> Option { NamedFile::open(Path::new(STATIC_CSS_BOOTSTRAP_PATH).join(file)).ok() @@ -528,6 +533,7 @@ fn main() { partition_svg_paths, static_text_demo, static_svg_demo, + static_3d_demo, static_css_bootstrap, static_css_pathfinder_css, static_js_bootstrap,