I need to display a rectangular user photo inside a circular frame, the outside of the frame is transparent so it won’t work to just put the frame on top of the photo.
I’m wondering if there’s a way to do it using cocos2d-js that would make it cross platfrom.
Try looking at ClippingNode. They use a node - such as an image - to define which part of the children nodes will be rendered.
So if you create the ClippingNode and give it a sprite the same size as your frame that is a filled-in white circle then add your rectangular picture to the clipping node, it should restrict the photo to that circle.