imomin / CustomTShirt

Fabric.js
366 stars 206 forks source link

How to export front and back of this tshirt #1

Open ducbot opened 11 years ago

ducbot commented 11 years ago

Dear Imomin,

I really interested about your sharing source to build a designing tshirt however i don't know how to export front and back of this tshirt.

Can you show me how to do it ?

Thank you !

imomin commented 9 years ago

Create a function, that would replace the tshirt image with long sleeve or hoodie. Call the function on change of the drop down. It should be that simple....

I currently, do not have time to commit/help with new features. Since this is open source I hope somebody can help you and contribute to the project.

yaslia commented 8 years ago

hi, i really appreciate it if someone can help me on how to export the front back design .. i really need that help..

dearkaran commented 7 years ago

Hello Every One i create Export Function in this script. https://github.com/dearkaran/CustomDesignCreation Please download and test....

Khadreal commented 7 years ago

Thanks @imomin for creating this. Thanks @dearkaran for adding the export function but is it possible to export both the front and back design at a time.

dearkaran commented 7 years ago

yes sir.... currently i create just demo of front side..... but you can try to same thing in Back side........

Best Regards

Khadreal commented 7 years ago

Thanks. But the front and back are inside one ID, I don't know how to export that. Mind you if the back side is in view and you save, you will see the back view save and not the front view.

Thanks

dearkaran commented 7 years ago

please send me Your Source code..... so, I can fix and help you.

Best Regards

On 6 October 2017 at 16:31, Opeyemi Ibrahim notifications@github.com wrote:

Thanks. But the front and back are inside one ID, I don't know how to export that. Mind you if the back side is in view and you save, you will see the back view save and not the front view.

Thanks

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/imomin/CustomTShirt/issues/1#issuecomment-334724508, or mute the thread https://github.com/notifications/unsubscribe-auth/ANkiPYbXylg5PCpWOyH_C-UviC7CK1yyks5spgiTgaJpZM4BBY9n .

Khadreal commented 7 years ago

Below is my code. Thanks

JS canvas = new fabric.Canvas('tcanvas', { hoverCursor: 'pointer', selection: true, selectionBorderColor:'blue' }); canvas.on({ 'object:moving': function(e) {
e.target.opacity = 0.5; }, 'object:modified': function(e) {
e.target.opacity = 1; }, 'object:selected':onObjectSelected, 'selection:cleared':onSelectedCleared });

$('#o_back').click(function(){ $("#text-stringss").attr("id", "text-string2");

        canvas = new fabric.Canvas('tbcanvas', {
          hoverCursor: 'pointer',
          selection: true,
          selectionBorderColor:'#000'
        });
            canvas.on({
             'object:moving': function(e) {         
                e.target.opacity = 0.5;
              },
              'object:modified': function(e) {          
                e.target.opacity = 1;
              },
             'object:selected':onObjectSelected,
             'selection:cleared':onSelectedCleared
         });
         });

What I did is on click of the back button I tried to switch the canvas