A static website boilerplate for ThreeJS + ARJS projects managed via Webpack5.
Open this live demo and show this hiro marker to the camera!
Open this live demo and show this pinball image to the camera!
You can also checkout this simulated-image version. (might need a page refresh, still a bug to fix there..)
Thanks to Tania Rascia. I reused her Webpack5 boilerplate as a base for this code.
Thanks to ARJS team for their amazing Web AR plugin.
Thanks to ThreeJS team for bringing 3D magic on the web.
Clone this repo and yarn install.
yarn install
yarn start
You can view the development server at localhost:8080
and use the hiro marker.
Or you can access a marker simulation mode from http://localhost:8080/?mode=simulation
.
You can view the development server at localhost:8080/?type=nft
and use the pinball image.
Or you can access a image simulation mode from http://localhost:8080/?mode=simulation&type=nft
.
Keep the development server opened, open a new terminal tab. Install ngrok and run:
ngrok http 8080 -host-header="localhost:8080"
yarn build
Run this command:
yarn deploy
And setup Github pages on your repo:
- Source:
gh-pages
branch - Folder
root
.
webpack
- Module and asset bundler.webpack-cli
- Command line interface for webpackwebpack-dev-server
- Development server for webpackwebpack-merge
- Simplify development/production configurationcross-env
- Cross platform configuration
@babel/core
- Transpile ES6+ to backwards compatible JavaScript@babel/plugin-proposal-class-properties
- Use properties directly on a class (an example Babel config)@babel/preset-env
- Smart defaults for Babel
babel-loader
- Transpile files with Babel and webpacksass-loader
- Load SCSS and compile to CSSnode-sass
- Node Sass
postcss-loader
- Process CSS with PostCSSpostcss-preset-env
- Sensible defaults for PostCSS
css-loader
- Resolve CSS importsstyle-loader
- Inject CSS into the DOM
clean-webpack-plugin
- Remove/clean build folderscopy-webpack-plugin
- Copy files to build directoryhtml-webpack-plugin
- Generate HTML files from templatemini-css-extract-plugin
- Extract CSS into separate filescss-minimizer-webpack-plugin
- Optimize and minimize CSS assets
This project is open source and available under the MIT License.