Skip to content
This repository was archived by the owner on Dec 15, 2019. It is now read-only.

Updated Getting Started #188

Open
wants to merge 8 commits into
base: 0.7.0
Choose a base branch
from
Open

Updated Getting Started #188

wants to merge 8 commits into from

Conversation

Coolbeans007
Copy link

@Coolbeans007 Coolbeans007 commented May 21, 2018

So this is the current code:

require.config({
baseUrl: './',
// ...
packages: [
{
name: 'physicsjs',
location: 'path/to/physicsjs',
main: 'physicsjs-VERSION.min'
}
],
//...
});

And this is the code I spent like days trying to figure out how to make work

require.config({
baseUrl: 'Your Project Folder/Your Scripts Folder/physicsjs's Folder Name/dist',

packages: [
    {
      name: 'physicsjs',
      location: 'dist',
      main: 'physicsjs-VERSION.min'
    }
],

});

Then If you want to take it a step further you could do this:

const jquery = 'https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js'
const full = 'scripts/physicsjs/dist/physicsjs-full.min.js';
const min = 'scripts/physicsjs/dist/physicsjs.min.js';
const pixi = 'https://cdnjs.cloudflare.com/ajax/libs/pixi.js/4.7.3/pixi.js'; //If you don't want to start a webserver then just use this CDN
const code = 'scripts/Code.js'
require([
//Require Your Dependencies or just require the full version
code,
pixi
]);

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants