Skip to content

Basic project utilizing webpack, and HMR for creating webGL experiments, and bundling for usage.

Notifications You must be signed in to change notification settings

christiankaseburg/webGLDevelopment

Repository files navigation

WebGL Development Environment

This is a basic project utilizing webpack, and Hot Module Reloading for creating webGL experiments. Also, you are able to bundle each individual experiment into there own bundle for publishing online.

Installation

First run npm install to install all the node modules.

Commands

To start the development environment use the command npm run start. To bundle each project into there directory use the command npm run build.

Setting up

To create a new experiment add the folder into src/experiments/. Next, copy over index.html from experiments/godrays to your experiments directory. Inside src there is a file called index.js and you will need to import your experiment i.e. import './experiments/yourexperiment/experiment. Now you will need to add another entry into webpack.config.export.js and it should look like this example: './src/experiments/example/example.ts'. Now that your experiment is added into the experiments directory, and imported into the index.js the Hot Module Reloading will work. lastly, if you added an entry for your experiment in webpack.config.export.js then the command npm run build will create a bundle in your experiments directory under dist/.

Build structure

Using the command npm run build will create a bundle for each experiment you added an entry for in webpack.config.export.js. The bundle will be stored in src/experiments/experimentName/dist/. If you read through webpack.config.export.js you will notice that webpack will create a bundle for each entry because of the way the output is setup. Do not forget to add an entry for experiments you want bundled.

About

Basic project utilizing webpack, and HMR for creating webGL experiments, and bundling for usage.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published