Skip to content

playcanvas/playcanvas-webpack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PlayCanvas Webpack Template

There are lots of options for building a PlayCanvas app. One is to use Webpack, a popular JavaScript bundler.

This project doesn't load the PlayCanvas engine via a script tag. Instead, it imports the engine as an NPM package (see the repo's package.json file). The src/index.js script then imports the PlayCanvas (pc) API with the following statement:

import * as pc from 'playcanvas';

How to Build

Run:

npm install
npm run build

This will output the built PlayCanvas app to the dist folder.

How to Run

Run:

npm run dev

Open http://localhost:5000/ in your browser of choice. You should see a spinning cube:

About

Demonstration of building a PlayCanvas app with Webpack

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published