GithubHelp home page GithubHelp logo

mettaversesociety / playcanvas-editor-ts-template Goto Github PK

View Code? Open in Web Editor NEW

This project forked from playcanvas/playcanvas-editor-ts-template

0.0 0.0 0.0 21 KB

A simple TypeScript template for PlayCanvas that can also sync with your playcanvas.com project

License: MIT License

TypeScript 100.00%

playcanvas-editor-ts-template's Introduction

A simple TypeScript template for PlayCanvas that can also sync with your playcanvas.com project

Quick start

This template uses the playcanvas-sync tool to push files to your PlayCanvas project and requires a little bit of setup with .pcconfig and pcconfig.json.

  1. Copy .pcconfig to your home directory (Mac: /Users/<username>, Windows: C:/User/<username>). .pcconfig has been preconfigured to look for a config file in the current working directory which will be this project's folder (more information here).
  2. Make a copy of pcconfig.template.json and rename to pcconfig.json. This is needed to configure playcanvas-sync to upload the file to correct PlayCanvas Editor project.
  3. Complete/Update the following properties in pcconfig.json using these instructions:
  4. On the command line, run npm install to install the packages.
  5. On the command line, run the npm script npm run watch-push:debug.
  6. This will watch the src folder for changes, compile into build/main.bundle.js and if successful, upload to your playcanvas.com project.

Please note, if you are adding new pc.ScriptTypes or attributes to existing ones, you will need to manually parse the script after upload in the PlayCanvas Editor. Please read this for more details.

npm scripts

Command Description
npm run build:debug Compiles tsc files using debug config and builds to build/main.bundle.js
npm run build:release Compiles tsc files using release config and builds to build/main.bundle.js
npm run watch:debug Compiles tsc files using debug config on code changes and builds to build/main.bundle.js
npm run watch:release Compiles tsc files using release config on code changes and builds to build/main.bundle.js
npm run push Uploads build/main.bundle.js to playcanvas.com project
npm run build-push:debug Performs build:debug and push npm scripts
npm run build-push:release Performs build:release and push npm scripts
npm run watch-push:debug Performs watch:debug and push npm scripts
npm run watch-push:release Performs watch:release and push npm scripts

playcanvas-editor-ts-template's People

Contributors

steveny-sc avatar yaustar avatar nikitaosyak avatar devpika avatar vmwxiong avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.