spiralScene = {
const scene = new THREE.Scene();
scene.background = new THREE.Color(0xffffff);
const positions = [];
const colors = [];
for (let i = 0; i < spiralMaxT; i += 0.1) {
positions.push(...spiral(i));
}
const lineGeo = new THREE.BufferGeometry();
lineGeo.addAttribute(
'position',
new THREE.Float32BufferAttribute(positions, 3)
);
const lineMat = new THREE.LineBasicMaterial({
color: 0x000000
});
const line = new THREE.Line(lineGeo, lineMat);
scene.add(line);
const gridHelper = new THREE.GridHelper(30, 1);
scene.add(gridHelper);
yield scene;
}