This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Tyson Rosage
Posted Oct 10 - Read on Facebook

I want to be able to set a border radius to a superLayer and have it mask the child layers within but I haven't been able to get this to work. I've tried using overflow and clip but that doesn't seem to work for me. Any help?

5 Comments

Min-Sang Choi

If you use ver 1.8.15, you can make with with these code : childLayer = new Layer width:400,height:400,image:'images/framer-icon.png'
superLayer = new Layer width:300 ,height:300

superLayer.borderRadius = superLayer.width/2
childLayer.force2d = true

superLayer.addSubLayer(childLayer)

Koen Bok

I'll add force2d to the docs.

Tyson Rosage

Is there anyway to accomplish this without having to take the hit on performance?

Koen Bok

I'm afraid not. The tldr reason is that rendering rounded corners requires cpu involvement, and once graphics need to bounce between gpu and cpu, you lose performance.

Read the entire post on Facebook