This repository was archived by the owner on Dec 15, 2019. It is now read-only.
Updated Getting Started #188
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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',
});
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
]);