Hi,
Welcome to the forum!
I’ve exported the default cube from Blender (with default options) and then imported it in p5js with this simple code :
let cube;
let angle = 0;
function preload() {
cube = loadModel('cube.obj');
}
function setup() {
createCanvas(500, 500, WEBGL);
}
function draw() {
background(255);
scale(50);
rotateX(sin(angle) * TWO_PI);
rotateY(cos(angle / 2) * TWO_PI);
fill(255, 0, 0);
model(cube);
angle += 0.01;
}
And this is working fine, there’s no gaps between the faces.
This might be an issue with your 3d model → in Blender select your object, enter in edit mode (Tab
) then press A
to select all points then press M
for merge then select By Distance
in order to merge all the points that are close enough to each other just in case your faces were not connected.
Hope it helps