Код: Выделить всё
let shape;
function setup() {
createCanvas(100, 100, WEBGL);
shape = buildGeometry(createShape);
}
function draw() {
background(200);
orbitControl();
model(shape);
}
function createShape() {
strokeWeight(10)
stroke("red")
fill("green")
cone();
strokeWeight("5")
fill("yellow")
stroke("blue")
box();
}< /code>
html,
body {
margin: 0;
padding: 0;
}
canvas {
display: block;
}< /code>
Подробнее здесь: https://stackoverflow.com/questions/794 ... ldgeometry
Мобильная версия