summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/rectangles/models
diff options
context:
space:
mode:
Diffstat (limited to 'public/assets/javascripts/rectangles/models')
-rw-r--r--public/assets/javascripts/rectangles/models/floor.js7
-rw-r--r--public/assets/javascripts/rectangles/models/vec3.js9
2 files changed, 12 insertions, 4 deletions
diff --git a/public/assets/javascripts/rectangles/models/floor.js b/public/assets/javascripts/rectangles/models/floor.js
index 7b020a9..530de2b 100644
--- a/public/assets/javascripts/rectangles/models/floor.js
+++ b/public/assets/javascripts/rectangles/models/floor.js
@@ -79,9 +79,8 @@
if (Scenery.nextMedia) {
e.preventDefault()
- var sculpture = Sculpture.addNextToWall({
- index: index,
- position: pos,
+ var sculpture = Sculpture.addNext({
+ position: { x: x, y: 0, z: z },
})
// scenery was not placed
@@ -91,7 +90,7 @@
}
app.controller.toolbar.resetPermissions()
- Sculpture.resize.show(sculpture)
+ // Sculpture.resize.show(sculpture)
Sculpture.hovering = true
// app.controller.pick(sculpture)
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