This is a tool which builds a bicycle visually from components the user selects. What do you think, can this be done with HTML5/JavaScript (jQuery)/CSS3? What do I need to know to start? What do you think the trickier parts will be?
+1
A:
Yes, this can definitely be done in HTML/JS. And you don't even need HTML5 or CSS3 for that.
I think the trickiest part will be the positioning of the part images, especially with different frames.
basti
2010-06-29 12:10:02
I don't think it is *that* difficult to position the parts on different places when selecting different frames: just wrap everything in a 'master' div with the frame name and position parts with CSS like `.fastFrame .threePedals`, etc. It only means a lot of CSS rules.
Marcel Korpel
2010-06-29 14:37:39
Yup. But it's not only the frame that changes positions. There are some other parts that you have to factor in as well, e.g. the wheels and the stem.I didn't say it's overly difficult, but I do think it's the trickiest part. Everything else should be rather straight forward and easy.
basti
2010-06-29 16:11:52
@basti, @Marcel: the whole thing is driven by an XML-based parts catalog, which references images for each part and also defines *exactly* how they fit together. All you'd need is some JS to take those pre-defined coordinates and plug them into the styles...
Shog9
2010-06-29 18:26:11