Complete the code to select the vector node for editing.
const vectorNode = figma.currentPage.findOne(node => node.type === [1]);The type VECTOR selects vector nodes in Figma.
Complete the code to access the vector node's vector network for editing points.
const vectorNetwork = vectorNode.[1];The vectorNetwork property contains the points and segments of a vector node.
Fix the error in the code to update the first point's x coordinate in the vector network.
vectorNode.vectorNetwork.vertices[0].[1] = 100;
The x property sets the horizontal position of a vertex.
Fill both blanks to create a new vertex and add it to the vector network vertices array.
const newVertex = { x: [1], y: [2] };
vectorNode.vectorNetwork.vertices.push(newVertex);The new vertex is created with x=100 and y=200 coordinates before adding to vertices.
Fill all three blanks to update the vector network with the new vertices and segments.
vectorNode.vectorNetwork = {
vertices: [1],
segments: [2],
regions: [3]
};We assign the existing vertices, segments, and regions arrays back to the vectorNetwork to update it.