Vousk-prod. Posted July 9, 2014 Share Posted July 9, 2014 Hello gods of BJS,You're now using typescript to write the code and then automatically generate the javascript version.If we want to contribute and make some pull request on .js files, is this a problem for you ? Do you then need to rewrite our piece of code in typescript to actually integrate it to BJS ?I'm not opposed to (try to) code directly in typescript but I don't know how to compile to javascript (I don't use Node.js, nor Visual Studio) and I'm not sure that I can compile without setting a proper project with all classes and dependencies... javascript version is really easy to modify, but for the typescript version I'm totally in the fog... Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 9, 2014 Share Posted July 9, 2014 Hello, it depends We will have to rewrite everything that you did in TS *but* if your changes are not too big you can submit a pull for the JS version and I will port them back to TS Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted July 9, 2014 Author Share Posted July 9, 2014 We will have to rewrite everything that you did in TS You probably mean "rewrite everything that [we] did in JS", and not TS, don't you ? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 9, 2014 Share Posted July 9, 2014 We will have to rewrite in TS everything that you did in JS Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted July 10, 2014 Author Share Posted July 10, 2014 :-D ah ah, les feintes du langage hein... GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted July 12, 2014 Author Share Posted July 12, 2014 Hmm, in fact I have a problem with the idea of coding something you'll have to rewrite after, that's pretty inefficient. We, as contributors, are here to help you in the dev, not to give you some extra work.Do you know if the Visual Studio Express version is enough to code for BJS ?Are the .sln files in Tools folder the ones we have to use to open the project and get our hands dirty ? (sorry if these questions look stupid, I don't know Visual Studio at all and I'm trying to guess how it works) Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 13, 2014 Share Posted July 13, 2014 Hey, you can use sublimetext, or even emacs with Typescript. BTW visual studio 2013 Update 2 (Express edition) is enough to do what you want. You just need to open the babylon folder as web site and you're done Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted July 13, 2014 Author Share Posted July 13, 2014 Ok, thanks, I'll have a look at those. Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted July 14, 2014 Author Share Posted July 14, 2014 Sorry to bother, but I've installed Visual Studio Express 2013 and I don't have typescript support, so I tried to install Update 2, but it requires Win8 (I'm under 7)... Any idea or suggestion ?If it's out of the subject of this forum no problem just tell me and I'll search another solution, I wouldn't take you too much time (but maybe this will help also other people to contribute to BJS) Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted July 14, 2014 Author Share Posted July 14, 2014 Well I think I'll remove Visual Studio 2013 and install 2012 and its typescript support add-on.Maybe I should have been choosen Sublimetext + Node.js solution It's not too late in fact... Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted July 14, 2014 Share Posted July 14, 2014 I can say that the Netbeans Typescript editor is easily fooled. I have eclipse on my Mac. Think I might check out what they have there if I start making .ts files. I just view them now in Netbeans, but as an ordinary text files. Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted July 14, 2014 Author Share Posted July 14, 2014 Hey, good idea, I totally forgot to search for Eclipse typescript plug-ins, I used to use Eclipse some years ago (for java programming) and I like it, I'll try this way ! Thanks ! Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted July 17, 2014 Share Posted July 17, 2014 So how is it going with Eclipse & the Planatir Truescript plug-in? I have gotten about 90 % done with shape-keys, with only normals & interaction with self initiated Actions. Looked at Mesh.convertToFlatShadedMesh() for normals, & realized I could use some of that code for normals, if Mesh was modularized better. (Automaton is entirely Typed array based, but it should still work). Have to go to Typescript, so might as well convert what I got now, and modify Mesh too. I like how much better typescript is for classes. Decided to also have Tower of Babel produce a .ts too. Netbeans is pretty bad for Typescript. Is it looking good over there? Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted July 17, 2014 Author Share Posted July 17, 2014 Very easy to install Eclipse + node.js + palantir. I didn't had the time to test with coding, but for the moment when I open the BJS project inside this environnement, I have lots of errors : "Accessors are only available when targeting ECMAScript 5 and higher".That's strange because in the Eclipse Preferences, I set Typescript compiler options to target ECMAScript 5 (instead of 3 by default). Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 17, 2014 Share Posted July 17, 2014 I did that just for you:http://blogs.msdn.com/b/eternalcoding/archive/2014/07/17/web-developers-visual-studio-could-be-a-great-free-tool-to-develop-with.aspx Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted July 17, 2014 Author Share Posted July 17, 2014 Thanks.I've installed Visual Studio Express and it seems great and easy to use. I'll maybe use it for some Web projects, but unfortunatly typescript is only supported with Update 2, which requires Windows 8, and I'm using 7, so this solution is not applicable for me for BJS.That's why I switched to Eclipse + plugs. For the multiple error about accessors not available when targeting prior to ECMAScript 5 I solved it by targeting ES5 in the compiler AND switching to AMD for Module code Generation. Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted July 23, 2014 Share Posted July 23, 2014 A couple of questions about Ubuntu / Eclipse / Node.js / typscript plug-in/ Babylon set up, please. A few days ago I got Eclipse from "Ubuntu software center", but it was old, 3.8. I installed the git plug-in, which did not come automatically for that version, and the GitHub helper plug-in. I installed Node.JS from this pages info https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-an-ubuntu-14-04-server . Question: Do I need the Node.js package manager, npm, too? I also installed the planatir typescript plug-in, but I did not do anything after that.--------------Have decided to started over before I got going by un-installing Eclipse 3.8. I got Eclipse 4.4, Luna, directly from Eclipse, and expanded it into /opt. Ran it once & only chose to carry-over the GitHub helper plug-in. After I know what to do about Node.js package manager, I will install the typescript plug-in, but what next? Get Babylon, obviously, but will the GitHelper plug-in make a project with a bunch of files I do not ever want to send up? I have thrown my local babylon.js git directory into the trash, I kind of made a mess (there is no commit rollback in Git, I think). Would deleting my GitHub fork of Babylon and reforking be a mistake? Once I have a Babylon project, I am presuming that if I add/edit a .ts from eclipse, that it will "compile it" to a .js, right? I also assume that taking all the .js's in the project to build a babylon.js is done as a separate thing with some kind of command line interface. Finally, I may need to go to Florida for a while. Whatever I do to my desktop, I am sure I can to my Macbook Pro. What I have done with large code bases before with Netbeans is create a truecrypt volume, not so much for encryption (it's a nice to have though), but for encapsulation. Every day I:Turn on machineOpen the truecrypt volRun Ide with all projects in volume, & Ide is blissfully unaware.close volume, and copy single file to memory stick (extreme fast as opposed to a 1000 separate files)Now I have an entire volume backup every day. Have had a PC fire once, so yea I am paranoid. If I go on a trip, just plug in the memory stick into the mac, and copy file/volume to hard drive as single file. Question: Can you have multiple Eclipse workspace directories? Thanks, Jeff Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted July 23, 2014 Share Posted July 23, 2014 Well, first question of whether Node.js package manager is needed, is yes. Maybe not for editing / converting files from .ts to .js in Eclipse, but to build Babylon.js, using Gulp. I found the file => switch workspace menu item in Eclipse, so I can have multiple truecrypt volumes & switch development between Linux/Windows/Mac easily. My forked Babylon.JS seems to be caught-up to the main one according to the GitHub webpages, so no need to do anything there. Have no clue how. I guess proceed with the package manager install, the typescript plug-in, & create the project using GitHub. Then make the changes you outline above and see what happens. Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted July 23, 2014 Author Share Posted July 23, 2014 Wow, lots of questions at the same time I cannot answer everything, but I can describe you my config and the exact order I've installed everything (but sorry, I'm under Windows 7, not linux) : Before all, you need to know that I've decided not to use Git via Eclipse because I've already had a good working Git system on my PC.FYI, after many not convincing tries, I've found that Git Extensions is the way to go on Windows (pretty simple to install, no bug - with some other I wasn't even able to fork BJS project, too heavy, timeout problems... - very easy to use, GUI is simple and clear, everything needed concerning Git is implemented, and you can also use git bash for complex cases). Also I noticed that every of the following tools must be installed in the same CPU mode for better interoperability (I choose 32 bits to ensure proper compatiblity of every parts).And always choose an installation path without space and not too far from the root folder (eg. C:/mysoft/, easier to configure and could avoid some stupid issues)So the whole steps would be (way to do each one is not describe in details, you can find specific info for each step on the precious internet, but if you're really stucked just ask and I'll try to remember ) :Install java JDK 1.7 and add your java\jdk1.7.xx\bin folder to Windows environment variable Path (in fact I personnally installed 1.6 for compatibility issue with adb and the Unity3D android exporter, but this is an other story)Create a GitHub account, and fork the BabylonJS/Babylon.js project. You'll have your own BJS version (yourname/Babylon.js)Install Git Extensions (comes with msysgit and PuTTY)Create a SSH Key with PuTTYAdd your marvelous SSH key in your GitHub account and in Git Extensions to bind them (but not in the darkness... Hm...)In Git Extensions, clone to a local repository your own version of BJS project on GitHub Install Eclipse LunaInstall node.js (directly from node.js official website), no need for npm. Add node.js folder to the Windows environment variable Path Restart Eclipse and install palantir typescript plug-in into Eclipse (via Help > Install new software... search for palantir). In my case palantir found node.js installation folder automatically)Create a new general project in Eclipse (File > New > Project / General > Project)Choose Babylon/ folder (inside your local Babylon.js forked repository folder). This will open the whole BJS typescript and javascript project structure.Right-click your BJS project in Eclipse, open Properties, in typescript > compiler, choose ECMAScript target version 5 and AMD for Module Code GenerationAdd a new line containing ".project" (without the ") in the .git/info/exclude file in your local Babylon.js forked folder (to ensure that you won't commit your Eclipse project config file to others on GitHub - better to do that in exclude file instead of .gitignore because the gitignore file is versioned, while the exclude file is not -) Always refresh your Eclipse project (right-click, Refresh) after each fetch/pull of your BJS repository to have the correct file structure (this is required even if you close and restart Eclipse).In Eclipse there's a Build automatically option activated by default. So .ts files are immmediatly compiled on every save. You can also choose to manually "compile all", to do a complete compiling of the whole project. You can define as many Workspaces you need in Eclipse. A Workspace is intended to contain many Projects (related or not, your choice). You can easily switch Workspaces, and move projects from one to another (without moving physically the project files). ---- About backups, my PC does a daily backup of my working directory (locally, on another physical drive) and a weekly complete backup (FTP server). I also do regularly a ghost of my whole system and data on external drives I let to a friend's place when I leave my home for a long period (more paranoid than you ). I'm using Personal Backup 5. Very very good stuff indeed ! Free for personnal use. The best I found after so many attempts with other softwares (almost the only one which could manage utf8, ftp servers, smart comparaison, and without the need of a service running all the time).When away from home, if needed I wake up my PC with a wake on wan system and remotely use it via RDP. I'm using PocketCloud on android, very good but the response time is now very slow since the last update... (so I'm sometimes using Teamviewer for remote control, waiting for this lag problem to be fixed).Hope this helps ! Cheers. Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted July 23, 2014 Author Share Posted July 23, 2014 Umm, you solved some of your pb before I finish my post...For creating babylon.js file from all separate files, I never did it, but the procedure is well explained somewhere else on the forum / wiki / bjs folder Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted July 23, 2014 Share Posted July 23, 2014 Thanks! I forgot about the Java part & just assumed it, but I guess that post could serve as a doc for the future for others not knowing Eclipse is built in Java. Have built my volume & create a workspace in it, making it the default workspace. Will stick to the Egit plug-in for now, since it has extensive documentation, and maybe other useful Eclipse tips. http://wiki.eclipse.org/EGit/User_Guide . Not in a hurry, will read that before I go further. Proceeding without reading carefully built help is for morons. That's sugar coating it, but this is a family website. Thank again, Jeff Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted July 23, 2014 Author Share Posted July 23, 2014 Yes this might be usefull for other. That's why I've just edited the post to add some details and reformat a bit for a better reading (the first version was written with my phone ) Quote Link to comment Share on other sites More sharing options...
Eth-K Posted October 21, 2014 Share Posted October 21, 2014 Both the Eclipse plugins for TypeScript by Palantir and TypEcs (http://typecsdev.com/) are pretty good I should say. Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted October 22, 2014 Share Posted October 22, 2014 Thanks, Eth-K. Options are good. Really wish you were saying it was a Netbeans plug-in though. Eclipse is good, but I miss how well Netbeans handled versioning, with little colored "tags" along the left side of lines / sections that have changed since last commit. Hover over them & a little pop-over shows what it was before. It does the full file diff in a separate tab like Eclipse, but against any previous commit. When editing files, the hover / pop-over of the change that you can click a little revert button, or select text for clipboard is tough to live without. Quote Link to comment Share on other sites More sharing options...
macguyvok Posted October 26, 2014 Share Posted October 26, 2014 Just to throw some $0.02 into the ring (talk about mixed metaphors, eh?) Jetbrains makes a really nice IDE, WebStorm that's free for open source or academic use. It has decent typescript support, intellisense, etc. Also, cross platform. I use it professionally for just about everything from node.js code to personal websites. It's really pretty slick. As for contributions, I've checked out typescript (and even compared the generated code to the ts code) and tbh, I don't really think there's too large of a learning curve, especially if you've been following ES6. (I certainly like it better than coffeescript). IIRC, once of the goals of TypeScript is for it to be pretty easy for JS guys to pick up. 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.