diff --git a/examples/editVoxels.js b/examples/editVoxels.js index ff096973a3..439921d412 100644 --- a/examples/editVoxels.js +++ b/examples/editVoxels.js @@ -178,7 +178,7 @@ var currentCursor = 0; function addLineOverlay() { return Overlays.addOverlay("line3d", { - position: { x: 0, y: 0, z: 0}, + start: { x: 0, y: 0, z: 0}, end: { x: 0, y: 0, z: 0}, color: { red: 255, green: 255, blue: 255}, alpha: 1, @@ -474,7 +474,7 @@ function initImport() { }); xImportGuide = Overlays.addOverlay("line3d", { - position: { x: 0, y: 0, z: 0}, + start: { x: 0, y: 0, z: 0}, end: { x: 0, y: 0, z: 0}, color: { red: 255, green: 0, blue: 0}, alpha: 1, @@ -482,7 +482,7 @@ function initImport() { lineWidth: previewLineWidth }); yImportGuide = Overlays.addOverlay("line3d", { - position: { x: 0, y: 0, z: 0}, + start: { x: 0, y: 0, z: 0}, end: { x: 0, y: 0, z: 0}, color: { red: 0, green: 255, blue: 0}, alpha: 1, @@ -490,7 +490,7 @@ function initImport() { lineWidth: previewLineWidth }); zImportGuide = Overlays.addOverlay("line3d", { - position: { x: 0, y: 0, z: 0}, + start: { x: 0, y: 0, z: 0}, end: { x: 0, y: 0, z: 0}, color: { red: 0, green: 0, blue: 255}, alpha: 1, @@ -519,15 +519,15 @@ function moveImport(position) { Overlays.editOverlay(xImportGuide, { - position: { x: importPosition.x, y: 0, z: importPosition.z }, + start: { x: importPosition.x, y: 0, z: importPosition.z }, end: { x: importPosition.x + scaleSelector.scale, y: 0, z: importPosition.z } }); Overlays.editOverlay(yImportGuide, { - position: { x: importPosition.x, y: importPosition.y, z: importPosition.z }, + start: { x: importPosition.x, y: importPosition.y, z: importPosition.z }, end: { x: importPosition.x, y: 0, z: importPosition.z } }); Overlays.editOverlay(zImportGuide, { - position: { x: importPosition.x, y: 0, z: importPosition.z }, + start: { x: importPosition.x, y: 0, z: importPosition.z }, end: { x: importPosition.x, y: 0, z: importPosition.z + scaleSelector.scale } }); rescaleImport(); diff --git a/examples/fallingSand.js b/examples/fallingSand.js index c85196f10e..e4161334dd 100644 --- a/examples/fallingSand.js +++ b/examples/fallingSand.js @@ -28,7 +28,7 @@ var MIN_VOXEL_SCALE = Math.pow(2.0, MIN_VOXEL_SCALE_POWER); var linePreviewTop = Overlays.addOverlay("line3d", { - position: { x: 0, y: 0, z: 0}, + start: { x: 0, y: 0, z: 0}, end: { x: 0, y: 0, z: 0}, color: { red: 0, green: 0, blue: 255}, alpha: 1, @@ -37,7 +37,7 @@ var linePreviewTop = Overlays.addOverlay("line3d", { }); var linePreviewBottom = Overlays.addOverlay("line3d", { - position: { x: 0, y: 0, z: 0}, + start: { x: 0, y: 0, z: 0}, end: { x: 0, y: 0, z: 0}, color: { red: 0, green: 0, blue: 255}, alpha: 1, @@ -46,7 +46,7 @@ var linePreviewBottom = Overlays.addOverlay("line3d", { }); var linePreviewLeft = Overlays.addOverlay("line3d", { - position: { x: 0, y: 0, z: 0}, + start: { x: 0, y: 0, z: 0}, end: { x: 0, y: 0, z: 0}, color: { red: 0, green: 0, blue: 255}, alpha: 1, @@ -55,7 +55,7 @@ var linePreviewLeft = Overlays.addOverlay("line3d", { }); var linePreviewRight = Overlays.addOverlay("line3d", { - position: { x: 0, y: 0, z: 0}, + start: { x: 0, y: 0, z: 0}, end: { x: 0, y: 0, z: 0}, color: { red: 0, green: 0, blue: 255}, alpha: 1, @@ -362,10 +362,10 @@ function showPreviewLines() { if (intersection.intersects) { var resultVoxel = calculateVoxelFromIntersection(intersection, ""); - Overlays.editOverlay(linePreviewTop, { position: resultVoxel.topLeft, end: resultVoxel.topRight, visible: true }); - Overlays.editOverlay(linePreviewBottom, { position: resultVoxel.bottomLeft, end: resultVoxel.bottomRight, visible: true }); - Overlays.editOverlay(linePreviewLeft, { position: resultVoxel.topLeft, end: resultVoxel.bottomLeft, visible: true }); - Overlays.editOverlay(linePreviewRight, { position: resultVoxel.topRight, end: resultVoxel.bottomRight, visible: true }); + Overlays.editOverlay(linePreviewTop, { start: resultVoxel.topLeft, end: resultVoxel.topRight, visible: true }); + Overlays.editOverlay(linePreviewBottom, { start: resultVoxel.bottomLeft, end: resultVoxel.bottomRight, visible: true }); + Overlays.editOverlay(linePreviewLeft, { start: resultVoxel.topLeft, end: resultVoxel.bottomLeft, visible: true }); + Overlays.editOverlay(linePreviewRight, { start: resultVoxel.topRight, end: resultVoxel.bottomRight, visible: true }); } else { Overlays.editOverlay(linePreviewTop, { visible: false }); Overlays.editOverlay(linePreviewBottom, { visible: false }); @@ -645,4 +645,4 @@ Script.update.connect(update); Script.scriptEnding.connect(scriptEnding); Voxels.setMaxPacketSize(1); //this is needed or a bug occurs :( -Voxels.setPacketsPerSecond(10000); \ No newline at end of file +Voxels.setPacketsPerSecond(10000); diff --git a/examples/gamepad.js b/examples/gamepad.js index cc275e6267..5a11f49cb2 100644 --- a/examples/gamepad.js +++ b/examples/gamepad.js @@ -75,7 +75,7 @@ var warpSphere = Overlays.addOverlay("sphere", { var WARP_LINE_HEIGHT = 10; var warpLine = Overlays.addOverlay("line3d", { - position: { x: 0, y: 0, z:0 }, + start: { x: 0, y: 0, z:0 }, end: { x: 0, y: 0, z: 0 }, color: { red: 0, green: 255, blue: 255}, alpha: 1, @@ -131,7 +131,7 @@ function updateWarp() { visible: true, }); Overlays.editOverlay(warpLine, { - position: warpPosition, + start: warpPosition, end: Vec3.sum(warpPosition, { x: 0, y: WARP_LINE_HEIGHT, z: 0 }), visible: true, }); diff --git a/examples/growTrees.js b/examples/growTrees.js index a5b55eecd6..8a23d0ee1c 100644 --- a/examples/growTrees.js +++ b/examples/growTrees.js @@ -27,7 +27,7 @@ var MIN_VOXEL_SCALE = Math.pow(2.0, MIN_VOXEL_SCALE_POWER); var linePreviewTop = Overlays.addOverlay("line3d", { - position: { x: 0, y: 0, z: 0}, + start: { x: 0, y: 0, z: 0}, end: { x: 0, y: 0, z: 0}, color: { red: 0, green: 255, blue: 0}, alpha: 1, @@ -36,7 +36,7 @@ var linePreviewTop = Overlays.addOverlay("line3d", { }); var linePreviewBottom = Overlays.addOverlay("line3d", { - position: { x: 0, y: 0, z: 0}, + start: { x: 0, y: 0, z: 0}, end: { x: 0, y: 0, z: 0}, color: { red: 0, green: 255, blue: 0}, alpha: 1, @@ -45,7 +45,7 @@ var linePreviewBottom = Overlays.addOverlay("line3d", { }); var linePreviewLeft = Overlays.addOverlay("line3d", { - position: { x: 0, y: 0, z: 0}, + start: { x: 0, y: 0, z: 0}, end: { x: 0, y: 0, z: 0}, color: { red: 0, green: 255, blue: 0}, alpha: 1, @@ -54,7 +54,7 @@ var linePreviewLeft = Overlays.addOverlay("line3d", { }); var linePreviewRight = Overlays.addOverlay("line3d", { - position: { x: 0, y: 0, z: 0}, + start: { x: 0, y: 0, z: 0}, end: { x: 0, y: 0, z: 0}, color: { red: 0, green: 255, blue: 0}, alpha: 1, @@ -362,10 +362,10 @@ function showPreviewLines() { if (intersection.intersects) { var resultVoxel = calculateVoxelFromIntersection(intersection, ""); - Overlays.editOverlay(linePreviewTop, { position: resultVoxel.topLeft, end: resultVoxel.topRight, visible: true }); - Overlays.editOverlay(linePreviewBottom, { position: resultVoxel.bottomLeft, end: resultVoxel.bottomRight, visible: true }); - Overlays.editOverlay(linePreviewLeft, { position: resultVoxel.topLeft, end: resultVoxel.bottomLeft, visible: true }); - Overlays.editOverlay(linePreviewRight, { position: resultVoxel.topRight, end: resultVoxel.bottomRight, visible: true }); + Overlays.editOverlay(linePreviewTop, { start: resultVoxel.topLeft, end: resultVoxel.topRight, visible: true }); + Overlays.editOverlay(linePreviewBottom, { start: resultVoxel.bottomLeft, end: resultVoxel.bottomRight, visible: true }); + Overlays.editOverlay(linePreviewLeft, { start: resultVoxel.topLeft, end: resultVoxel.bottomLeft, visible: true }); + Overlays.editOverlay(linePreviewRight, { start: resultVoxel.topRight, end: resultVoxel.bottomRight, visible: true }); } else { Overlays.editOverlay(linePreviewTop, { visible: false }); Overlays.editOverlay(linePreviewBottom, { visible: false }); diff --git a/examples/headMove.js b/examples/headMove.js index 943664b70f..3152976383 100644 --- a/examples/headMove.js +++ b/examples/headMove.js @@ -36,7 +36,7 @@ var warpSphere = Overlays.addOverlay("sphere", { var WARP_LINE_HEIGHT = 5; var warpLine = Overlays.addOverlay("line3d", { - position: { x: 0, y: 0, z:0 }, + start: { x: 0, y: 0, z:0 }, end: { x: 0, y: 0, z: 0 }, color: { red: 0, green: 255, blue: 255}, alpha: 1, @@ -120,7 +120,7 @@ function updateWarp() { visible: willMove, }); Overlays.editOverlay(warpLine, { - position: Vec3.sum(warpPosition, { x: 0, y: -WARP_LINE_HEIGHT / 2.0, z: 0 }), + start: Vec3.sum(warpPosition, { x: 0, y: -WARP_LINE_HEIGHT / 2.0, z: 0 }), end: Vec3.sum(warpPosition, { x: 0, y: WARP_LINE_HEIGHT / 2.0, z: 0 }), visible: willMove, }); diff --git a/examples/overlaysExample.js b/examples/overlaysExample.js index 4aa5b1cd75..821f8a11d1 100644 --- a/examples/overlaysExample.js +++ b/examples/overlaysExample.js @@ -154,7 +154,7 @@ var sphere = Overlays.addOverlay("sphere", { }); var line3d = Overlays.addOverlay("line3d", { - position: { x: 0, y: 0, z:0 }, + start: { x: 0, y: 0, z:0 }, end: { x: 10, y: 10, z:10 }, color: { red: 0, green: 255, blue: 255}, alpha: 1,