);
                } else if (drawingState === 'area') {
                    currentGeometry.desc.primitive = getPrimitiveType(tempPositions);
                    for (let i = 0; i < tempPositions.length; i++) {
                        drawingPositons[i] = tempPositions[i];
                    }
                    let elements = earcut(drawingPositons, null, 3);
                    if (elements.length === 0) {
                        elements = [0, 1];
                    }
                    let lineElem