summaryrefslogtreecommitdiff
path: root/test/mocks/mx.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2014-07-29 18:19:13 -0400
committerJules Laplace <jules@okfoc.us>2014-07-29 18:19:13 -0400
commit7f7262473b844bc48f59f0a6e6ef2c7231b33987 (patch)
tree1b74a3e6ec3ce499d30869b9808b853086485987 /test/mocks/mx.js
parente082a27d835495f7ea27292ffdc62688a22a67a1 (diff)
parent1e044ca74467d5ff46292822a274e678bd74a9b3 (diff)
merge
Diffstat (limited to 'test/mocks/mx.js')
-rw-r--r--test/mocks/mx.js22
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)
+ }
+}
+