timdream / wordcloud2.js

Tag cloud/Wordle presentation on 2D canvas or HTML

Home Page:https://wordcloud2-js.timdream.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to use image as a mask?

gettonet opened this issue · comments

Hi, I am trying to use the attached image as a mask, so the middle section's not filled. It works in your demo, but I cannot figure out how to implement this on a web page, using only wordcloud2.js. It is a simple rectangle shape, but I obviously cannot use your "shape generator" since the center needs to be excluded from drawing.
Any help is much appreciated.

bzbz

I have the same problem and I don't know what to do
I was hoping to find a solution here

I face the same problem. Has anybody a solution yet?

I also face the problem. So I looked the source code and changed the code like this.
image

The code is no long reports errors. But the canvas is still blank. Please let me know if anyone knows the answer.