diff options
| author | Jules Laplace <jules@okfoc.us> | 2014-07-24 19:24:15 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2014-07-24 19:24:15 -0400 |
| commit | eb026c75c729f857703474b416a1358ad67574ca (patch) | |
| tree | d36d9645169ac56082d977c08f5d6c3e3388828b | |
| parent | de9a0ec966a20540cafdad1019d498530b60700f (diff) | |
mock version of MX
| -rw-r--r-- | test/mocks/mx.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/mocks/mx.js b/test/mocks/mx.js new file mode 100644 index 0000000..2a76ffc --- /dev/null +++ b/test/mocks/mx.js @@ -0,0 +1,22 @@ +// Non-DOM-dependent stub MX library +// Used for testing code that builds MX elements, without a DOM dependency + +var MX = module.exports = {} + +MX.Object3D = function (klass) { + this.klass = klass + this.width = this.height = this.scaleX = this.scaleY = this.scaleZ = 1 + this.z = this.y = this.x = 0 + this.side = 0 + this.type = "Face" + this.el = { style: {} } + this.rect = null +} + +MX.Scene = { + els: [], + add: function (el) { + els.push(el) + } +} + |
