From bf8952a4902596f8de80440505b4391995d498e0 Mon Sep 17 00:00:00 2001 From: mattmcw Date: Sun, 9 Feb 2025 12:22:36 -0500 Subject: [PATCH] Update layout to alternate core colors --- layout.js | 38 +++++++++++++++++++++++--------------- meta.json | 48 ++++++++++++++++++++++++------------------------ 2 files changed, 47 insertions(+), 39 deletions(-) diff --git a/layout.js b/layout.js index 3dec7ab..4899b74 100644 --- a/layout.js +++ b/layout.js @@ -6,30 +6,38 @@ function rotatePoint(centerX, centerY, distance, angleInDegrees) { return { x, y, z : 0 }; } +let plastic = [ + 'white_plastic', + 'green_plastic', + 'neonblue_plastic', + 'white_plastic', + 'green_plastic', + 'neonblue_plastic' +] let obj = [ - "16mm_2in", - //"16mm_2in_np", - "16mm_3in", - //"16mm_3in_np", + '16mm_2in', + //'16mm_2in_np', + '16mm_3in', + //'16mm_3in_np', - "8mm_2in", - //"8mm_2in_np", - "8mm_3in", - //"8mm_3in_np", + '8mm_2in', + //'8mm_2in_np', + '8mm_3in', + //'8mm_3in_np', - "35mm_2in", - //"35mm_2in_np", - "35mm_3in"//, - //"35mm_3in_np" + '35mm_2in', + //'35mm_2in_np', + '35mm_3in'//, + //'35mm_3in_np' ]; let meta = { objects : [] } -let starting = (360 / (obj.length * 2)); +let starting = 15; //(360 / (obj.length * 2)); for (let i = 0; i < obj.length; i++) { meta.objects.push ({ - name : 'film_core_' + obj[i], - material : "green_plastic", + name : `film_core_${obj[i]}`, + material : plastic[i], position : rotatePoint(0, 0, 120, starting + (i * (360 / obj.length))), rotation : { x : 0, diff --git a/meta.json b/meta.json index 77b5322..201e9a9 100644 --- a/meta.json +++ b/meta.json @@ -3,92 +3,92 @@ "x" : 120, "y" : -120, "z" : 0, - "focus_x" : 130, - "focus_y" : -130 + "focus_x" : 118, + "focus_y" : -118 }, "objects": [ { "name": "film_core_16mm_2in", - "material": "green_plastic", + "material": "white_plastic", "position": { - "x": 103.92304845413264, - "y": 59.99999999999999, + "x": 115.9110991546882, + "y": 31.05828541230249, "z": 0 }, "rotation": { "x": 0, "y": 90, - "z": 30 + "z": 15 } }, { "name": "film_core_16mm_3in", "material": "green_plastic", "position": { - "x": 7.34788079488412e-15, - "y": 120, + "x": 31.05828541230249, + "y": 115.9110991546882, "z": 0 }, "rotation": { "x": 0, "y": 90, - "z": 90 + "z": 75 } }, { "name": "film_core_8mm_2in", - "material": "green_plastic", + "material": "neonblue_plastic", "position": { - "x": -103.92304845413264, - "y": 59.99999999999999, + "x": -84.85281374238569, + "y": 84.8528137423857, "z": 0 }, "rotation": { "x": 0, "y": 90, - "z": 150 + "z": 135 } }, { "name": "film_core_8mm_3in", - "material": "green_plastic", + "material": "white_plastic", "position": { - "x": -103.92304845413263, - "y": -60.000000000000014, + "x": -115.9110991546882, + "y": -31.058285412302496, "z": 0 }, "rotation": { "x": 0, "y": 90, - "z": 210 + "z": 195 } }, { "name": "film_core_35mm_2in", "material": "green_plastic", "position": { - "x": -2.2043642384652355e-14, - "y": -120, + "x": -31.058285412302475, + "y": -115.9110991546882, "z": 0 }, "rotation": { "x": 0, "y": 90, - "z": 270 + "z": 255 } }, { "name": "film_core_35mm_3in", - "material": "green_plastic", + "material": "neonblue_plastic", "position": { - "x": 103.92304845413261, - "y": -60.00000000000006, + "x": 84.85281374238568, + "y": -84.85281374238572, "z": 0 }, "rotation": { "x": 0, "y": 90, - "z": 330 + "z": 315 } } ],