xxxxxxxxxx
let strap_pts;
let mesh
let meshX
let sPts = [];
let ends_A, ends_B;
let text_Input, button;
let gScale = 1;
let sIDs = [];
let xlst;
let ylst;
let zlst;
let camState = {
distance: 250,
center: [0, 0, 0],
rotation: [1, 0, 0, 0],
};
function setup() {
createCanvas(windowWidth, windowHeight, WEBGL);
perspective(PI / 3, width / height, 0.1, 3000);
easycam = createEasyCam({
distance: 450
});
easycam.setState(camState, 2000);
sPt_partition();
drawGUI();
//print(ends_A);
}
function draw() {
//noLoop();
//noFill();
directionalLight(255, 255, 255, 0, 1, -1);
ambientLight(255);
background(90);
sDraw();
sHighlight();
fill(255,90);
noStroke();
push();
scale(-1);
//model(mesh);
model(meshX);
pop();
}
function preload() {
strap_pts = loadStrings("strap_pts_4.txt");
meshX = loadModel("MeshX_Simple.obj");
mesh = loadModel("Mesh.obj");
ends_A = loadTable("End_A.csv");
ends_B = loadTable("End_B.csv");
}