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?
-
Yes, this can be done. But what do you know already of these subjects?Marcel Korpel– Marcel Korpel2010-06-29 01:13:16 +00:00Commented Jun 29, 2010 at 1:13
-
Also, FWIW, if you do redo this, set it to preload all the images, or even a "loading" until they are all loaded. When I first tried it, I was confused because it wasn't all loaded.Ashley Strout– Ashley Strout2012-08-25 22:47:25 +00:00Commented Aug 25, 2012 at 22:47
Add a comment
|
1 Answer
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.
3 Comments
Marcel Korpel
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.raucao
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.
Shog9
@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...