TacosLocos Posted March 22, 2016 Share Posted March 22, 2016 Heya guys, I'm comming to Canvas/Js from Flash/Actionscript. One thing I don't understand is where to find the Js language reference, comming from Flash I'm used to having all the Actionscript built-in functions/methods/classes/whatever nicely listed in the Flash IDE. Now when I try and search for something similar, all I get is tutorials and chaos, such as: https://developer.mozilla.org/en/docs/Web/JavaScript https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API What I'm looking for is some documentation that would list and show all the stuff that is built-in to the Canvas/Js tech that I can use, such as: context.drawImage(); context.fillRect(); Any help is much appreciated, Thanks, Tacos Quote Link to comment Share on other sites More sharing options...
P.Uri.Tanner Posted March 22, 2016 Share Posted March 22, 2016 This is very IDE-specific question. Most Editors can read JSDoc-style documentation and provide code completion. The Term "Code Completion" is what you are after: https://www.google.de/search?q=java+script+code+completion Here is the easy solution for Webstorm: http://blog.jetbrains.com/webstorm/2014/07/how-webstorm-works-completion-for-javascript-libraries/http://ternjs.net/ comes with good code completion for several IDE and is available for atom/brackets too. TacosLocos 1 Quote Link to comment Share on other sites More sharing options...
TacosLocos Posted March 22, 2016 Author Share Posted March 22, 2016 Well yea, having code completion in editor is nice and all, but it gets confusing and tedious to work with at times. What I'm looking for is something more like documentation that we had for Actionscript from Adobe. For example, here is documentation of BitmapData class with ALL of its methods and properties explained in nice detail: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/BitmapData.html edit: And in the left column of that page you can see basically every Actionscript class, so you have a nice overview of what you can use. I'm looking for pretty much the same thing but for Javascript Quote Link to comment Share on other sites More sharing options...
mattstyles Posted March 22, 2016 Share Posted March 22, 2016 Yeah, this is a problem with JS. Generally speaking MDN is the source you should look at, W3C site is similar but has more inaccuracies. It gets trickier because JS has a specification, vendors can, if they want, implement things a little differently from the spec. Nowadays things are pretty tight and vendors have good relationships and help push the specification forward and, usually, stick to it. MDN is usually fairly reliable though. The documentation of canvas is worse than JS though, its a separate API that is merely accessed via JS, so its not part of the JS spec. Part of the problem is that JS evolves, and tends to move quickly, so, documentation is harder to write and maintain. Having said that though, MDN is normally right up to date, and is quickly patched if there are any issues. The page on the canvas 2d context seems to match the Flash docs you linked in terms of function. P.Uri.Tanner and TacosLocos 2 Quote Link to comment Share on other sites More sharing options...
TacosLocos Posted March 22, 2016 Author Share Posted March 22, 2016 That is exactly what I was looking for, thank you very much. Much appreciated your help guys, thanks again Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.