It is currently 27 Apr 2024, 17:08
   
Text Size

Javascript card builder

Discuss Card Scans and Other Artwork Here

Moderator: CCGHQ Admins

Javascript card builder

Postby Incantus » 23 Sep 2010, 02:02

I had some free time recently and have been wanting to learn a bit of HTML5. After some playing around with javascript I built an interactive card creator. You can try it out at http://incant.us/creator/. Note: this needs a fairly modern browser (chrome, firefox or safari), and might not work in IE since it uses HTML5.

Thanks go to the MSE project, especially for the new MSE style frames, fonts and symbols.

Card images are of the form:

images/[set code]/[set code]-xxx.jpg where xxx is a number.

Unfortunately the export doesn't work yet. Let me know if you have any suggestions.
Incantus
DEVELOPER
 
Posts: 267
Joined: 29 May 2008, 15:53
Has thanked: 0 time
Been thanked: 3 times

Re: Javascript card builder

Postby Huggybaby » 23 Sep 2010, 02:11

Wow, that's cool. I esp. like the immediate feedback with changes.

The symbols are quite aliased. Have you looked at the assets in the Nate's Deck Builder package?

<edit> Also need formatting for font size and italics, etc.
User avatar
Huggybaby
Administrator
 
Posts: 3207
Joined: 15 Jan 2006, 19:44
Location: Finally out of Atlanta
Has thanked: 701 times
Been thanked: 594 times

Re: Javascript card builder

Postby Incantus » 23 Sep 2010, 02:40

By chance what browser are you using? In Chrome or Safari (any webkit based browser i guess) I get the following image:
Image

What do you mean by options for font sizes? The name, typeline and text box use the same font size as the actual cards (as near as I can tell), although the textbox doesn't automatically shrink the size if there is too much text.

Edit: I tested in Firefox and it seems that Firefox's canvas support isn't quite there yet (for example, with a 2 color card you should see a blended frame).
Incantus
DEVELOPER
 
Posts: 267
Joined: 29 May 2008, 15:53
Has thanked: 0 time
Been thanked: 3 times

Re: Javascript card builder

Postby Huggybaby » 23 Sep 2010, 03:31

I'm using Firefox. I tried IE8 and got an error that Canvas wasn't supported, but I didn't see the aliasing.

I was indeed talking about the ability to make text smaller. Aren't italics necessary too?

It's good that you've got the Chrome and Safari users covered. Now you're 15% of the way to total coverage.
User avatar
Huggybaby
Administrator
 
Posts: 3207
Joined: 15 Jan 2006, 19:44
Location: Finally out of Atlanta
Has thanked: 701 times
Been thanked: 594 times

Re: Javascript card builder

Postby Incantus » 23 Sep 2010, 17:17

Huggybaby wrote:I'm using Firefox. I tried IE8 and got an error that Canvas wasn't supported, but I didn't see the aliasing.

I was indeed talking about the ability to make text smaller. Aren't italics necessary too?
Yeah, italics are needed for the flavor text. Unfortunately I can't seem to find the font used for it.

Huggybaby wrote:It's good that you've got the Chrome and Safari users covered. Now you're 15% of the way to total coverage.
Haha, true. Those 'other' browsers just need to catch up and fully support HTML5. I'm sure Firefox will work soon, but Microsoft seems to have dropped the ball with regards to HTML5.
Incantus
DEVELOPER
 
Posts: 267
Joined: 29 May 2008, 15:53
Has thanked: 0 time
Been thanked: 3 times

Re: Javascript card builder

Postby Snacko » 23 Sep 2010, 17:39

You can emulate canvas in IE7/8 with excanvas, however it isn't 100% the same, ex. you can't copy from such canvas to other canvas.
Snacko
DEVELOPER
 
Posts: 826
Joined: 29 May 2008, 19:35
Has thanked: 4 times
Been thanked: 74 times


Return to Pictures

Who is online

Users browsing this forum: Google [Bot] and 120 guests


Who is online

In total there are 121 users online :: 1 registered, 0 hidden and 120 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: Google [Bot] and 120 guests

Login Form