All Questions
Tagged with vector-graphics javascript
99
questions
0
votes
0
answers
81
views
Generating random SVG arrow shapes
So I have a task, which intends to generate random SVG images of curved entangled arrows.
Here are few examples of the expected output:
Example 1
Example 2
Example 3
There are few main requirements:
...
0
votes
5
answers
298
views
Simplify any SVG path to create a solid black shape (UPDATED)
Is it possible to transform any SVG into a solid black shape in an automated way (in javascript or otherwise) by simplifying the path?
Is there a library to do this, or is there another way?
Let's ...
-2
votes
1
answer
224
views
SVG: generate a grid with random fill colour for each cell/rect?
Is there a way to generate an SVG grid with specified columns/rows and give each cell a different fill colour?
1
vote
1
answer
357
views
SVG Shape Lighting
Summary: I'm trying to create a canvas of randomized rock climbing holds using vector graphics generated with properties such as color, rotation, size and path values.
To add depth to these I'm trying ...
1
vote
1
answer
832
views
How to Make Moving Sprite Point Toward Mouse in P5?
I was trying to make a program that pointed a sprite toward my mouse despite its displacement from the origin.
It rotates fine when it is at the origin, but obviously, when I start to move the sprite ...
1
vote
1
answer
197
views
Compile SVG to embed glyphs
I have an SVG in a webpage that includes text rendered with a custom font. Something like:
<style>
@font-face {
font-family: MyFont;
src: url(font-files/MyFont.woff2);
}
</style&...
2
votes
1
answer
3k
views
Splitting any SVG path into pieces without changing the shape
I am new to SVG manipulation using javacript. I would like to split any type of SVG path into N number of segments, so that the original shape stays same but with additional points added to the path. ...
0
votes
1
answer
689
views
Highcharts exporting SVG with data pre-selected
I’m trying to export a Highcharts sankey diagram to SVG, and I would like to have several different vector files with different parts of the diagram highlighted selected (clicked on), so I can fade ...
1
vote
2
answers
1k
views
How can you dynamically import, modify, and export vector files?
I want to be able to import SVG files from the file system, layer them, change their fill colors, and then export them as a single vector file.
2
votes
0
answers
89
views
How do I cause objects in my canvas to be attracted to other objects
I have plotted some words on a canvas. They have random positions. I want them to slowly gravitate towards one another according to a set of rules.
The rules are that some words have to be above, to ...
1
vote
2
answers
1k
views
How to shrink polygon by a defined amount in centimetres using co-ordinates
I am trying to shrink a polygon by a specific amount where all edges in the new polygon are of equal distance to the old one. To explain better I have a picture here.
If the picture doesnt work I ...
2
votes
1
answer
884
views
Tracking pixel clicks on a SVG image element with any browser
I'm writing a photo editing server in Node.js. The problem I'm having is when attempting to track the pixel that the user clicks on the image. My implementation was working perfectly on Firefox but ...
-1
votes
2
answers
242
views
Draw vector graphic
I created a simple graphic with LibreOffice:
The lines are not symmetric.
I am very lazy and a bit autistic. Moving the lines with the mouse does not feel correct for me. I is very unlikely that I ...
0
votes
0
answers
284
views
Dynamically Update Position of an array of features is not working after reading data from server
I have the following piece of code below, where the positions are not shown on the map and after 4 days of searching I still don't know why. Can someone help me please? I really don't know why it ...
2
votes
1
answer
648
views
Basic Javascript Drawing with User Editable Lines and Nodes
My research has found me powerful libraries like paper.js which are quick to show all the next-level awesome stuff they can do, but I'm not sure how (or if) I can accomplish a basic task:
I want to ...