mirror of
https://github.com/photonstorm/phaser
synced 2025-02-20 07:58:31 +00:00
browserify/requirejs error with SAT module fixed
This commit is contained in:
parent
16fa37081f
commit
b7bb52696f
1 changed files with 57 additions and 83 deletions
|
@ -6,33 +6,7 @@
|
|||
// polygons using the Separating Axis Theorem.
|
||||
/** @preserve SAT.js - Version 0.2 - Copyright 2013 - Jim Riecken <jimr@jimr.ca> - released under the MIT License. https://github.com/jriecken/sat-js */
|
||||
|
||||
/*global define: false, module: false*/
|
||||
/*jshint shadow:true, sub:true, forin:true, noarg:true, noempty:true,
|
||||
eqeqeq:true, bitwise:true, strict:true, undef:true,
|
||||
curly:true, browser:true */
|
||||
|
||||
// Create a UMD wrapper for SAT. Works in:
|
||||
//
|
||||
// - Plain browser via global SAT variable
|
||||
// - AMD loader (like require.js)
|
||||
// - Node.js
|
||||
//
|
||||
// The quoted properties all over the place are used so that the Closure Compiler
|
||||
// does not mangle the exposed API in advanced mode.
|
||||
/**
|
||||
* @param {*} root - The global scope
|
||||
* @param {Function} factory - Factory that creates SAT module
|
||||
*/
|
||||
(function (root, factory) {
|
||||
"use strict";
|
||||
if (typeof define === 'function' && define['amd']) {
|
||||
define(factory);
|
||||
} else if (typeof exports === 'object') {
|
||||
module['exports'] = factory();
|
||||
} else {
|
||||
root['SAT'] = factory();
|
||||
}
|
||||
}(this, function () {
|
||||
var SAT = (function () {
|
||||
"use strict";
|
||||
|
||||
var SAT = {};
|
||||
|
@ -859,4 +833,4 @@
|
|||
SAT['testPolygonPolygon'] = testPolygonPolygon;
|
||||
|
||||
return SAT;
|
||||
}));
|
||||
})();
|
||||
|
|
Loading…
Add table
Reference in a new issue