Skip to content Skip to sidebar Skip to footer

Paper.js: Can't Set Fillcolor Of A Symbol Instance

I'm new to paper.js. For this project, I need a shape that will be used in many instances (with different fill colors), so it's apparently better to use a symbol (instead of using

Solution 1:

Answered by Jonathan Puckey, of the paper.js team:

This is by design. You cannot change the visual properties of an instance of a Symbol. To change the color of the item, you can create multiple copies of the path by using path.clone().

Solution 2:

$("#symbol_id").find("g").attr('fill', "#colorOfChoice");

Alt, set ID of the g:s you want to change and

$("#symbol_id").find("#g_id").attr('fill', "#colorOfChoice");

Post a Comment for "Paper.js: Can't Set Fillcolor Of A Symbol Instance"