PlayCanvas Package Manager (beta)

Making the PlayCanvas Editor even more awesome with modern web tooling

What?
The PlayCanvas Package Manager is a browser extension that upgrades the PlayCanvas Editor with first class support for TypeScript, JSX and more. Your game scripts become JS modules, meaning you can import, export and share code between them. It also ships with a package manager so you can import libraries from NPM and use them in your games.

Example

import config from './config'
import { someFunction } from './utils/math'
import { firebaseApp } from 'firebase/app'

var MyScript = pc.createScript('myScript')
MyScript.prototype.initialize = function() {
    // Import your own modules
    const value = someFunction(20, 0, 1)
    // Use NPM modules
    const app = firebaseApp(config)
}

export const myFunction = n => n * n

Find publicly available NPM packages and import them into your project

package-manager

Features

  • First class support for TypeScript
  • Import/Export Code into game scripts
  • Install and manage libraries from NPM
  • Fully integrates with collaborative editing

How?
Packaged as a Chrome extension, PCPM ships with a fast transpiler and bundler that runs in parallel to the editor. The transpiler has been optimized to use the Asset Registry as a virtual file system, syncing up with any local or remote code changes. As code updates the compiler kicks in and bundles everything into a built file which syncs across your team transparently.

Beta Testers
We are currently looking to rollout this extension and looking for a group of beta testers.
Note; We’re currently waiting for Chrome Store Approval and for Chrome 102 stable to land. We will then begin gradually rolling this out to testers.

If you want to join the beta, please drop me a DM with a valid email.

9 Likes