diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-04-02 17:05:31 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-04-02 17:05:31 -0400 |
| commit | c6eea0f4887ba14e5a6ecfff8c9e8480ae6421c1 (patch) | |
| tree | ec20a90df31e662224e0e73d09229ced17e751ff /public/assets/javascripts/rectangles/models/vec3.js | |
| parent | f9112718b560d4cc8380dd905d6cb60c497230bb (diff) | |
placing objects on the floor
Diffstat (limited to 'public/assets/javascripts/rectangles/models/vec3.js')
| -rw-r--r-- | public/assets/javascripts/rectangles/models/vec3.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/public/assets/javascripts/rectangles/models/vec3.js b/public/assets/javascripts/rectangles/models/vec3.js index c44dfe6..97329ed 100644 --- a/public/assets/javascripts/rectangles/models/vec3.js +++ b/public/assets/javascripts/rectangles/models/vec3.js @@ -32,3 +32,12 @@ vec3.prototype.apply_projection = function (m) { return this; } + +vec3.prototype.serialize = function(){ + return [ round(this.a), round(this.b), round(this.c) ] +} +vec3.prototype.deserialize = function(data){ + this.a = data[0] + this.b = data[1] + this.c = data[2] +}
\ No newline at end of file |
