You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// //Create the D3 functions that we will use to scale our data dimensions to desired output ranges for our visualization
81
+
// let scaleX = d3.scaleBand().domain(Object.values(data.map(d => d.model))).range([-1,1]).paddingInner(1).paddingOuter(0.5);
82
+
// let scaleY = d3.scaleLinear().domain(d3.extent(data.map(d => d.maxAltitude))).range([-0.25, 0.25]);
83
+
// let scaleZ = d3.scaleLinear().domain([0, Math.max(...data.map(d => d.maxSpeed))]).range([-1, 1]).nice();
84
+
// let scaleSize = d3.scaleLinear().domain([0, Math.max(...data.map(d => d.weight))]).range([0, 2]);
85
85
86
-
//Create a Center of Transform TransformNode that serves the parent node for all our meshes that make up our chart
87
-
letCoT=anu.create('cot','cot');
88
-
//Select our CoT so that we have it as a Selection object
89
-
letchart=anu.selectName('cot',scene);
86
+
// //Create a Center of Transform TransformNode that serves the parent node for all our meshes that make up our chart
87
+
// let CoT = anu.create('cot', 'cot');
88
+
// //Select our CoT so that we have it as a Selection object
89
+
// let chart = anu.selectName('cot', scene);
90
90
91
-
//Create clones of the plane mesh as children of our CoT for each row of our data and set their visual encodings using method chaining
92
-
letplanes=chart.bindClone(planeMesh,data)
93
-
.position((d)=>newBABYLON.Vector3(scaleX(d.model),scaleY(d.maxAltitude)-0.125,scaleZ(d.maxSpeed)))//Offset y a little as the plane model's origin is not centered
// //Create clones of the plane mesh as children of our CoT for each row of our data and set their visual encodings using method chaining
92
+
// let planes = chart.bindClone(planeMesh, data)
93
+
// .position((d) => new BABYLON.Vector3(scaleX(d.model), scaleY(d.maxAltitude) - 0.125, scaleZ(d.maxSpeed))) //Offset y a little as the plane model's origin is not centered
94
+
// .rotation(new BABYLON.Vector3(0, 0, 0))
95
+
// .scaling((d) => new BABYLON.Vector3(scaleSize(d.weight), 1, scaleSize(d.weight)));
0 commit comments