Nockawa Posted February 11, 2016 Share Posted February 11, 2016 Hello guys, I'm really not a Web/OSS dev, I know 3D and programming, but I have to admit that I struggle to find a "decent" setup to contribute to babylon.js. What I propose is to gather the best practices on this thread and I will make a documentation on the Github project to avoid unnecessary future "me" struggling in the dark. I read other topics, but they focus mainly on setup/building, what I can't get working decently is the editing/dev experience. I think I got the Git/Fork/NPM part ok, I can build Babylon.js using gulp. But, using VSCode or Visual Studio I really can't find a way to contribute to the project. VSCode shoots me some undefined types error, I don't know why. I don't know if I'm supposed to open VSCode on the babylon.js root directory or in the \src one. In any case I just can't have .ts file not complaining each time I open one. Visual Studio, well, from what I can tell the project is not setup to work with Visual Studio, I tried to tweak few things, but again, unsuccessfully. What I would like to achieve is a good dev experience, contributing on the lib and testing my changes right away in a local sandboxed example. A good start would be to write a guide for VSCode I guess but any other suggestions are welcomed. Thanks for your help Wingnut 1 Quote Link to comment Share on other sites More sharing options...
RaananW Posted February 11, 2016 Share Posted February 11, 2016 Hi Nockawa, Thanks a lot for thinking about contributions! They will surely help the entire community. VSCode is a wonderful editor. but it is one of many. We just added a tsconfig file to the src directory, so typescript will work in VScode (and other IDEs natively supporting typescript). But VSCode is just one editor of many. You can use a text editor, and watching your changes using gulp (run the task "watch-typescript"). Using Visual Studio will require to set the project correctly. I think using Visual Studio just for TypeScript is a bit too much, but this is a personal opinion. This is the way I am working - Open the src folder of Babylon in VSCode. This will get your autocomplete working, and will show you errors without compiling. After I made the changes, i run gulp typescript and see that it was compiled correctly. I then use the generated max js file on a different project (also in VSCode, but this is a different story). I personally don't like all of those watchers (with typescript), because I use the auto-save feature. Which will constantly compile the project with every little change I make. But again, this is a personal opinion Main thing - do whatever you feel comfortable with. Webstorm/IntelliJ Idea has a wonderful TypeScript support. Eclipse as well (as far as I know, I never used eclipse for that). Atom has support. Hell, you can even use VI if it makes you happy Looking forward to your PRs! Quote Link to comment Share on other sites More sharing options...
jerome Posted February 11, 2016 Share Posted February 11, 2016 I'm using Atom with the TS support under linux ubuntu 14. Like Raanan, I don't use the auto-saver-compiler, but just the in-line command "gulp typescript" to compile everything (between 12 and 15" on my computer). I directly open the Babylon.js folder and everything works (if not, just type "create tsconfig file" in the Atom command palette and that's it) : autocompletion, errors, etc. I tested several editors for BJS with TS (I avoided quickly all the big IDEs) : Webstorm, Gedit, Scite, SublimeText2, VSCode and Atom. I find the two best for TS and this framework (personal opinion) are VSCode and Atom what are quite similar in term of ergonomy and features (even in term of architecture under the hood). I just kept Atom because it has the Cobalt theme that I like a lot and because it has an integrated package manager and a software auto-updater (couldn't find the auto-updater in the VSCode for Linux) Quote Link to comment Share on other sites More sharing options...
Nockawa Posted February 12, 2016 Author Share Posted February 12, 2016 10 hours ago, RaananW said: Hi Nockawa, Thanks a lot for thinking about contributions! They will surely help the entire community. VSCode is a wonderful editor. but it is one of many. We just added a tsconfig file to the src directory, so typescript will work in VScode (and other IDEs natively supporting typescript). But VSCode is just one editor of many. You can use a text editor, and watching your changes using gulp (run the task "watch-typescript"). Using Visual Studio will require to set the project correctly. I think using Visual Studio just for TypeScript is a bit too much, but this is a personal opinion. This is the way I am working - Open the src folder of Babylon in VSCode. This will get your autocomplete working, and will show you errors without compiling. After I made the changes, i run gulp typescript and see that it was compiled correctly. I then use the generated max js file on a different project (also in VSCode, but this is a different story). I personally don't like all of those watchers (with typescript), because I use the auto-save feature. Which will constantly compile the project with every little change I make. But again, this is a personal opinion Main thing - do whatever you feel comfortable with. Webstorm/IntelliJ Idea has a wonderful TypeScript support. Eclipse as well (as far as I know, I never used eclipse for that). Atom has support. Hell, you can even use VI if it makes you happy Looking forward to your PRs! Thanks for the answer RaananW, well, I could manage to build using VSCode using Gulp manually in a command line, but I would have like to get the TaskRunner running in order to get the error output windows in VSCode working and redirect me to the faulted lines. I wasn't able to setup the TaskRunner correctly, I set a gulp command with the args trying to specify the gulpfiles.js in \Tools\Gulp, but VSCode keeps telling me it doesn't find this config file... I don't want to mess up the file structure of the repo in order to make simple/harmless pull requests. Maybe I have to lower my expectations, but getting and error output working really is something I think is helpful when you make big changes. All in all, I still favor Visual Studio because I'm used to it and the debugger is working with TypeScript, I could not go that far with VSCode but I'm willing to use it if it works for the basics stuffs. It would be nice to gather info and create Guides about how to setup specific IDE to work with the lib, getting the basics (compile, error, intellisense, debug) working. If someone succeed at configuring the Task Runner for VSCode that would be definitely be a good thing! Quote Link to comment Share on other sites More sharing options...
Temechon Posted February 12, 2016 Share Posted February 12, 2016 Some info about it here: http://pixelcodr.com/tutos/contribute/contribute.html Nockawa and jerome 2 Quote Link to comment Share on other sites More sharing options...
Nockawa Posted February 12, 2016 Author Share Posted February 12, 2016 I went to your website yesterday, tell me that you just did this post and I didn't miss it, please, for my own insanity ! Thank you, thank you, I saw you managed to make the Task Runner working! Temechon 1 Quote Link to comment Share on other sites More sharing options...
Temechon Posted February 12, 2016 Share Posted February 12, 2016 I just published it 3 minutes ago xD Quote Link to comment Share on other sites More sharing options...
Nockawa Posted February 12, 2016 Author Share Posted February 12, 2016 The "typescript" Gulp command will only build the .ts to .js + d.ts file, right ? So in your dev workflow you build to check the syntax, then you run the "default" Gulp command to generate a new version of the lib? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted February 12, 2016 Share Posted February 12, 2016 nope gulp typescript do everything including building the new version of the lib Quote Link to comment Share on other sites More sharing options...
Nockawa Posted February 12, 2016 Author Share Posted February 12, 2016 My bad, it's typescript-compile that only compile the ts files... Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted February 12, 2016 Share Posted February 12, 2016 Correct Quote Link to comment Share on other sites More sharing options...
jerome Posted February 12, 2016 Share Posted February 12, 2016 excellent article, Temechon ! so helpful ! Quote Link to comment Share on other sites More sharing options...
Nockawa Posted February 12, 2016 Author Share Posted February 12, 2016 You guys should put a link to this article in the GitHub main page, or create a page in the wiki, it's definitely a must read. Quote Link to comment Share on other sites More sharing options...
Temechon Posted February 12, 2016 Share Posted February 12, 2016 I'll update the documentation this weekend. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted February 12, 2016 Share Posted February 12, 2016 I updated the readme Quote Link to comment Share on other sites More sharing options...
Nockawa Posted February 12, 2016 Author Share Posted February 12, 2016 @Temechon as you appear to be the master of VSCode, could you elaborate the Debugging experience please? I've read many things online and can't figure the best strategy to build a small sandbox HTML Page that triggers my code which I can debug with VSCode. Thanks for your help! Quote Link to comment Share on other sites More sharing options...
Temechon Posted February 12, 2016 Share Posted February 12, 2016 Actually I just started VSCode yesterday, so I'm not the master of anything I didn't have the experience of the debugger yet, as I use Chrome dev tools to do it. Quote Link to comment Share on other sites More sharing options...
Nockawa Posted February 12, 2016 Author Share Posted February 12, 2016 1 minute ago, Temechon said: Actually I just started VSCode yesterday, so I'm not the master of anything I didn't have the experience of the debugger yet, as I use Chrome dev tools to do it. @Deltakosh to the rescue ? (one more time) Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted February 12, 2016 Share Posted February 12, 2016 I debug with Visual Studio OR Edge f12 tools Quote Link to comment Share on other sites More sharing options...
jerome Posted February 13, 2016 Share Posted February 13, 2016 The web debug console is integrated in directly in VSCode ! Quote Link to comment Share on other sites More sharing options...
Nockawa Posted February 13, 2016 Author Share Posted February 13, 2016 7 minutes ago, jerome said: The web debug console is integrated in directly in VSCode ! Well, from what I read you can debug only Node applications, did you managed to debug Babylon.js code from VSCode ? If it's the case, can you elaborate? Quote Link to comment Share on other sites More sharing options...
jerome Posted February 13, 2016 Share Posted February 13, 2016 huuu... actually you know more than me, because I just started to try VSCode back yesterday also and noticed that the debug icon opened the same web console than the one in Chrome Quote Link to comment Share on other sites More sharing options...
Wink Posted December 19, 2016 Share Posted December 19, 2016 In the Babylon js readme.md file there are a couple links to how to setup: "We have a general purpose documentation for you and a Visual Studio specific one" But the "general purpose documentation for you" really assumes you will be using VSCode and compile using "CTRL-SHIFT-B". I'm currently using vi and command line but I'm fuzzy on how to "build" from the command line. After some looking around it looks like I need to go into Tools/Gulp: cd Tools/Gulp Looking at the gulpfile.js file it appears there are 3 parameters I can use, 'default' (or nothing), 'typescript' or 'typescript-all'. So trying default/nothing I get the following: $ gulp [14:30:13] Using gulpfile ~/foss/Babylon/Babylon.js.my-fork/Tools/Gulp/gulpfile.js [14:30:13] Starting 'default'... [14:30:13] Starting 'includeShaders'... [14:30:13] Finished 'includeShaders' after 9.76 ms [14:30:13] Starting 'shaders'... [14:30:13] Finished 'shaders' after 2.42 ms [14:30:13] Starting 'buildNoWorker'... [14:30:13] Tested 38 tests, 38 passes, 0 failures: PASS [14:30:13] Tested 53 tests, 53 passes, 0 failures: PASS [14:30:13] Tested 115 tests, 115 passes, 0 failures: PASS [14:30:13] Tested 70 tests, 70 passes, 0 failures: PASS [14:30:22] Finished 'buildNoWorker' after 9 s [14:30:22] Starting 'workers'... [14:30:22] Finished 'workers' after 1.88 ms [14:30:22] Starting 'includeShaders'... [14:30:22] Finished 'includeShaders' after 428 μs [14:30:22] Starting 'shaders'... [14:30:22] Finished 'shaders' after 367 μs [14:30:22] Starting 'build'... [14:30:22] Tested 5 tests, 5 passes, 0 failures: PASS [14:30:23] Tested 38 tests, 38 passes, 0 failures: PASS [14:30:23] Tested 53 tests, 53 passes, 0 failures: PASS [14:30:23] Tested 115 tests, 115 passes, 0 failures: PASS [14:30:23] Tested 70 tests, 70 passes, 0 failures: PASS [14:30:31] Finished 'build' after 9.39 s [14:30:31] Starting 'includeShaders'... [14:30:31] Finished 'includeShaders' after 554 μs [14:30:31] Starting 'shaders'... [14:30:31] Finished 'shaders' after 321 μs [14:30:31] Starting 'buildCore'... [14:30:31] Tested 38 tests, 38 passes, 0 failures: PASS [14:30:31] Tested 53 tests, 53 passes, 0 failures: PASS [14:30:31] Tested 115 tests, 115 passes, 0 failures: PASS [14:30:37] Finished 'buildCore' after 6.24 s [14:30:37] Finished 'default' after 25 s And then using git status we see default "modifies" 4 .js files: $ git status On branch master Your branch is up-to-date with 'origin/master'. Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) modified: ../../dist/preview release/babylon.core.js modified: ../../dist/preview release/babylon.js modified: ../../dist/preview release/babylon.max.js modified: ../../dist/preview release/babylon.noworker.js The next I try "typescript" and we see it executes 'typescript-compile' and then 'default': $ gulp typescript [14:35:00] Using gulpfile ~/foss/Babylon/Babylon.js.my-fork/Tools/Gulp/gulpfile.js [14:35:00] Starting 'typescript'... [14:35:00] Starting 'typescript-compile'... [14:35:09] Finished 'typescript-compile' after 8.83 s [14:35:09] Starting 'default'... [14:35:09] Starting 'includeShaders'... [14:35:09] Finished 'includeShaders' after 18 ms [14:35:09] Starting 'shaders'... [14:35:09] Finished 'shaders' after 5.7 ms [14:35:09] Starting 'buildNoWorker'... [14:35:09] Tested 38 tests, 38 passes, 0 failures: PASS [14:35:09] Tested 53 tests, 53 passes, 0 failures: PASS [14:35:09] Tested 115 tests, 115 passes, 0 failures: PASS [14:35:09] Tested 70 tests, 70 passes, 0 failures: PASS [14:35:19] Finished 'buildNoWorker' after 10 s [14:35:19] Starting 'workers'... [14:35:19] Finished 'workers' after 1.49 ms [14:35:19] Starting 'includeShaders'... [14:35:19] Finished 'includeShaders' after 429 μs [14:35:19] Starting 'shaders'... [14:35:19] Finished 'shaders' after 389 μs [14:35:19] Starting 'build'... [14:35:20] Tested 5 tests, 5 passes, 0 failures: PASS [14:35:20] Tested 38 tests, 38 passes, 0 failures: PASS [14:35:20] Tested 53 tests, 53 passes, 0 failures: PASS [14:35:20] Tested 115 tests, 115 passes, 0 failures: PASS [14:35:20] Tested 70 tests, 70 passes, 0 failures: PASS [14:35:29] Finished 'build' after 10 s [14:35:29] Starting 'includeShaders'... [14:35:29] Finished 'includeShaders' after 1.97 ms [14:35:29] Starting 'shaders'... [14:35:29] Finished 'shaders' after 954 μs [14:35:29] Starting 'buildCore'... [14:35:29] Tested 38 tests, 38 passes, 0 failures: PASS [14:35:29] Tested 53 tests, 53 passes, 0 failures: PASS [14:35:30] Tested 115 tests, 115 passes, 0 failures: PASS [14:35:35] Finished 'buildCore' after 6.16 s [14:35:35] Finished 'default' after 27 s [14:35:35] Finished 'typescript' after 36 s And that add babylon.d.ts to the other 4 files from default: $ git status On branch master Your branch is up-to-date with 'origin/master'. Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) modified: ../../dist/preview release/babylon.core.js modified: ../../dist/preview release/babylon.d.ts modified: ../../dist/preview release/babylon.js modified: ../../dist/preview release/babylon.max.js modified: ../../dist/preview release/babylon.noworker.js Finally, I tried 'typescript-all' and it adds the typescript-libraries to the list of tasks to run: $ gulp typescript-all [15:03:27] Using gulpfile ~/foss/Babylon/Babylon.js.my-fork/Tools/Gulp/gulpfile.js [15:03:27] Starting 'typescript-all'... [15:03:27] Starting 'typescript'... [15:03:27] Starting 'typescript-compile'... [15:03:36] Finished 'typescript-compile' after 8.87 s [15:03:36] Starting 'default'... [15:03:36] Starting 'includeShaders'... [15:03:36] Finished 'includeShaders' after 18 ms [15:03:36] Starting 'shaders'... [15:03:36] Finished 'shaders' after 7.33 ms [15:03:36] Starting 'buildNoWorker'... [15:03:36] Tested 38 tests, 38 passes, 0 failures: PASS [15:03:36] Tested 53 tests, 53 passes, 0 failures: PASS [15:03:36] Tested 115 tests, 115 passes, 0 failures: PASS [15:03:36] Tested 70 tests, 70 passes, 0 failures: PASS [15:03:46] Finished 'buildNoWorker' after 11 s [15:03:46] Starting 'workers'... [15:03:46] Finished 'workers' after 1.44 ms [15:03:46] Starting 'includeShaders'... [15:03:46] Finished 'includeShaders' after 429 μs [15:03:46] Starting 'shaders'... [15:03:46] Finished 'shaders' after 390 μs [15:03:46] Starting 'build'... [15:03:47] Tested 5 tests, 5 passes, 0 failures: PASS [15:03:47] Tested 38 tests, 38 passes, 0 failures: PASS [15:03:48] Tested 53 tests, 53 passes, 0 failures: PASS [15:03:48] Tested 115 tests, 115 passes, 0 failures: PASS [15:03:48] Tested 70 tests, 70 passes, 0 failures: PASS [15:03:57] Finished 'build' after 10 s [15:03:57] Starting 'includeShaders'... [15:03:57] Finished 'includeShaders' after 1.73 ms [15:03:57] Starting 'shaders'... [15:03:57] Finished 'shaders' after 790 μs [15:03:57] Starting 'buildCore'... [15:03:57] Tested 38 tests, 38 passes, 0 failures: PASS [15:03:57] Tested 53 tests, 53 passes, 0 failures: PASS [15:03:57] Tested 115 tests, 115 passes, 0 failures: PASS [15:04:03] Finished 'buildCore' after 6.42 s [15:04:03] Finished 'default' after 27 s [15:04:03] Finished 'typescript' after 36 s [15:04:03] Starting 'canvas2D'... [15:04:03] Starting 'materialsLibrary'... [15:04:03] Starting 'postProcessesLibrary'... [15:04:03] Starting 'proceduralTexturesLibrary'... [15:04:03] Starting 'loaders'... [15:04:03] Starting 'serializers'... [15:04:03] Starting 'inspector'... [15:04:19] Finished 'serializers' after 16 s [15:04:20] Finished 'postProcessesLibrary' after 17 s [15:04:20] Finished 'proceduralTexturesLibrary' after 17 s ../../loaders/src/glTF/babylon.glTFFileLoader.ts(837,29): error TS2540: Cannot assign to 'useBones' because it is a constant or a read-only property. [15:04:21] TypeScript: 1 semantic error [15:04:21] TypeScript: emit succeeded (with errors) [15:04:22] Finished 'materialsLibrary' after 19 s [15:04:22] Finished 'loaders' after 19 s ../../inspector/src/adapters/Canvas2DAdapter.ts(29,82): error TS2694: Namespace 'BABYLON' has no exported member 'Prim2DPropInfo'. ../../inspector/src/details/PropertyLine.ts(12,25): error TS2339: Property 'PrimitiveAlignment' does not exist on type 'typeof BABYLON'. ../../inspector/src/details/PropertyLine.ts(13,44): error TS2339: Property 'PrimitiveAlignment' does not exist on type 'typeof BABYLON'. ../../inspector/src/details/PropertyLine.ts(16,42): error TS2339: Property 'PrimitiveAlignment' does not exist on type 'typeof BABYLON'. ../../inspector/src/details/PropertyLine.ts(18,42): error TS2339: Property 'PrimitiveAlignment' does not exist on type 'typeof BABYLON'. ../../inspector/src/details/PropertyLine.ts(20,42): error TS2339: Property 'PrimitiveAlignment' does not exist on type 'typeof BABYLON'. ../../inspector/src/details/PropertyLine.ts(22,42): error TS2339: Property 'PrimitiveAlignment' does not exist on type 'typeof BABYLON'. ../../inspector/src/details/PropertyLine.ts(27,42): error TS2339: Property 'PrimitiveAlignment' does not exist on type 'typeof BABYLON'. ../../inspector/src/details/PropertyLine.ts(29,42): error TS2339: Property 'PrimitiveAlignment' does not exist on type 'typeof BABYLON'. ../../inspector/src/details/PropertyLine.ts(31,42): error TS2339: Property 'PrimitiveAlignment' does not exist on type 'typeof BABYLON'. ../../inspector/src/details/PropertyLine.ts(33,42): error TS2339: Property 'PrimitiveAlignment' does not exist on type 'typeof BABYLON'. ../../inspector/src/lib.d.ts(2,1): error TS6053: File '/home/wink/foss/Babylon/Babylon.js.my-fork/dist/preview release/canvas2D/babylon.canvas2D.d.ts' not found. ../../inspector/src/properties.ts(122,27): error TS2339: Property 'PrimitiveAlignment' does not exist on type 'typeof BABYLON'. ../../inspector/src/properties.ts(126,27): error TS2339: Property 'PrimitiveThickness' does not exist on type 'typeof BABYLON'. ../../inspector/src/properties.ts(130,27): error TS2339: Property 'BoundingInfo2D' does not exist on type 'typeof BABYLON'. ../../inspector/src/properties.ts(134,27): error TS2339: Property 'SolidColorBrush2D' does not exist on type 'typeof BABYLON'. ../../inspector/src/properties.ts(138,27): error TS2339: Property 'GradientColorBrush2D' does not exist on type 'typeof BABYLON'. ../../inspector/src/tabs/Canvas2DTab.ts(14,37): error TS2339: Property 'Canvas2D' does not exist on type 'typeof BABYLON'. ../../inspector/src/tabs/Canvas2DTab.ts(17,54): error TS2694: Namespace 'BABYLON' has no exported member 'Prim2DBase'. ../../inspector/src/tabs/Canvas2DTab.ts(22,45): error TS2694: Namespace 'BABYLON' has no exported member 'Prim2DBase'. ../../inspector/src/tabs/Canvas2DTab.ts(39,35): error TS2694: Namespace 'BABYLON' has no exported member 'Canvas2D'. ../../inspector/src/tabs/Canvas2DTab.ts(39,62): error TS2694: Namespace 'BABYLON' has no exported member 'Canvas2D'. ../../inspector/src/tabs/TabBar.ts(34,25): error TS2339: Property 'Canvas2D' does not exist on type 'typeof BABYLON'. [15:04:27] TypeScript: 23 semantic errors [15:04:27] TypeScript: emit succeeded (with errors) [15:04:28] Finished 'canvas2D' after 25 s [15:04:28] Finished 'inspector' after 25 s [15:04:28] Starting 'typescript-libraries'... [15:04:28] Finished 'typescript-libraries' after 27 μs [15:04:28] Finished 'typescript-all' after 1 min [15:04:28] Version: webpack 1.14.0 Asset Size Chunks Chunk Names f530471f1d7628fb8a49.js 116 kB 0 [emitted] main And the output indicates some errors and below we can see many more .js file modified: $ git status On branch master Your branch is up-to-date with 'origin/master'. Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) modified: ../../dist/preview release/babylon.core.js modified: ../../dist/preview release/babylon.d.ts modified: ../../dist/preview release/babylon.js modified: ../../dist/preview release/babylon.max.js modified: ../../dist/preview release/babylon.noworker.js modified: ../../dist/preview release/canvas2D/babylon.canvas2d.d.ts modified: ../../dist/preview release/canvas2D/babylon.canvas2d.js modified: ../../dist/preview release/canvas2D/babylon.canvas2d.min.js modified: ../../dist/preview release/inspector/babylon.inspector.d.ts modified: ../../dist/preview release/loaders/babylon.glTFFileLoader.d.ts modified: ../../dist/preview release/loaders/babylon.glTFFileLoader.js modified: ../../dist/preview release/loaders/babylon.glTFFileLoader.min.js modified: ../../dist/preview release/loaders/babylon.objFileLoader.js modified: ../../dist/preview release/loaders/babylon.objFileLoader.min.js modified: ../../dist/preview release/materialsLibrary/babylon.fireMaterial.js modified: ../../dist/preview release/materialsLibrary/babylon.fireMaterial.min.js modified: ../../dist/preview release/materialsLibrary/babylon.furMaterial.js modified: ../../dist/preview release/materialsLibrary/babylon.furMaterial.min.js modified: ../../dist/preview release/materialsLibrary/babylon.gradientMaterial.js modified: ../../dist/preview release/materialsLibrary/babylon.gradientMaterial.min.js modified: ../../dist/preview release/materialsLibrary/babylon.gridMaterial.js modified: ../../dist/preview release/materialsLibrary/babylon.gridMaterial.min.js modified: ../../dist/preview release/materialsLibrary/babylon.lavaMaterial.js modified: ../../dist/preview release/materialsLibrary/babylon.lavaMaterial.min.js modified: ../../dist/preview release/materialsLibrary/babylon.normalMaterial.js modified: ../../dist/preview release/materialsLibrary/babylon.normalMaterial.min.js modified: ../../dist/preview release/materialsLibrary/babylon.simpleMaterial.js modified: ../../dist/preview release/materialsLibrary/babylon.simpleMaterial.min.js modified: ../../dist/preview release/materialsLibrary/babylon.skyMaterial.js modified: ../../dist/preview release/materialsLibrary/babylon.skyMaterial.min.js modified: ../../dist/preview release/materialsLibrary/babylon.terrainMaterial.js modified: ../../dist/preview release/materialsLibrary/babylon.terrainMaterial.min.js modified: ../../dist/preview release/materialsLibrary/babylon.triPlanarMaterial.js modified: ../../dist/preview release/materialsLibrary/babylon.triPlanarMaterial.min.js modified: ../../dist/preview release/materialsLibrary/babylon.waterMaterial.d.ts modified: ../../dist/preview release/materialsLibrary/babylon.waterMaterial.js modified: ../../dist/preview release/materialsLibrary/babylon.waterMaterial.min.js modified: ../../dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.d.ts modified: ../../dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.js modified: ../../dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.min.js modified: ../../dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.d.ts modified: ../../dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.js modified: ../../dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.min.js modified: ../../dist/preview release/proceduralTexturesLibrary/babylon.brickProceduralTexture.js modified: ../../dist/preview release/proceduralTexturesLibrary/babylon.brickProceduralTexture.min.js modified: ../../dist/preview release/proceduralTexturesLibrary/babylon.cloudProceduralTexture.js modified: ../../dist/preview release/proceduralTexturesLibrary/babylon.cloudProceduralTexture.min.js modified: ../../dist/preview release/proceduralTexturesLibrary/babylon.fireProceduralTexture.d.ts modified: ../../dist/preview release/proceduralTexturesLibrary/babylon.fireProceduralTexture.js modified: ../../dist/preview release/proceduralTexturesLibrary/babylon.fireProceduralTexture.min.js modified: ../../dist/preview release/proceduralTexturesLibrary/babylon.grassProceduralTexture.js modified: ../../dist/preview release/proceduralTexturesLibrary/babylon.grassProceduralTexture.min.js modified: ../../dist/preview release/proceduralTexturesLibrary/babylon.marbleProceduralTexture.js modified: ../../dist/preview release/proceduralTexturesLibrary/babylon.marbleProceduralTexture.min.js modified: ../../dist/preview release/proceduralTexturesLibrary/babylon.roadProceduralTexture.js modified: ../../dist/preview release/proceduralTexturesLibrary/babylon.roadProceduralTexture.min.js modified: ../../dist/preview release/proceduralTexturesLibrary/babylon.starfieldProceduralTexture.js modified: ../../dist/preview release/proceduralTexturesLibrary/babylon.starfieldProceduralTexture.min.js modified: ../../dist/preview release/proceduralTexturesLibrary/babylon.woodProceduralTexture.js modified: ../../dist/preview release/proceduralTexturesLibrary/babylon.woodProceduralTexture.min.js Soooooo, what is the "right" way to use the command line and are the errors a problem? Quote Link to comment Share on other sites More sharing options...
Temechon Posted December 20, 2016 Share Posted December 20, 2016 I use this : > cd Tools/Gulp > gulp typescript No compilation error at all : it compiles the whole bjs source into these files : babylon.core.js, babylon.d.ts, babylon.js, babylon.max.js, babylon.noworker.js There is one compilation error though when using typescript-all : [09:49:53] Finished 'proceduralTexturesLibrary' after 30 s ..\..\loaders\src\glTF\babylon.glTFFileLoader.ts(837,29): error TS2540: Cannot assign to 'useBones' because it is a constant or a read-only property. Quote Link to comment Share on other sites More sharing options...
Wink Posted December 20, 2016 Share Posted December 20, 2016 @Temechon, using gulp typescript seems reasonable, any reason that shouldn't be the default, seems to me we should always generate babylon.d.ts? Regarding the typescript-all, as you can see I'm getting the same error: [15:04:20] Finished 'proceduralTexturesLibrary' after 17 s ../../loaders/src/glTF/babylon.glTFFileLoader.ts(837,29): error TS2540: Cannot assign to 'useBones' because it is a constant or a read-only property. [15:04:21] TypeScript: 1 semantic error [15:04:21] TypeScript: emit succeeded (with errors) [15:04:22] Finished 'materialsLibrary' after 19 s But I'm also getting 23 other errors following that, in Canvas2D, are you getting those?: [15:04:22] Finished 'loaders' after 19 s ../../inspector/src/adapters/Canvas2DAdapter.ts(29,82): error TS2694: Namespace 'BABYLON' has no exported member 'Prim2DPropInfo'. ../../inspector/src/details/PropertyLine.ts(12,25): error TS2339: Property 'PrimitiveAlignment' does not exist on type 'typeof BABYLON'. ../../inspector/src/details/PropertyLine.ts(13,44): error TS2339: Property 'PrimitiveAlignment' does not exist on type 'typeof BABYLON'. ../../inspector/src/details/PropertyLine.ts(16,42): error TS2339: Property 'PrimitiveAlignment' does not exist on type 'typeof BABYLON'. ../../inspector/src/details/PropertyLine.ts(18,42): error TS2339: Property 'PrimitiveAlignment' does not exist on type 'typeof BABYLON'. ../../inspector/src/details/PropertyLine.ts(20,42): error TS2339: Property 'PrimitiveAlignment' does not exist on type 'typeof BABYLON'. ../../inspector/src/details/PropertyLine.ts(22,42): error TS2339: Property 'PrimitiveAlignment' does not exist on type 'typeof BABYLON'. ../../inspector/src/details/PropertyLine.ts(27,42): error TS2339: Property 'PrimitiveAlignment' does not exist on type 'typeof BABYLON'. ../../inspector/src/details/PropertyLine.ts(29,42): error TS2339: Property 'PrimitiveAlignment' does not exist on type 'typeof BABYLON'. ../../inspector/src/details/PropertyLine.ts(31,42): error TS2339: Property 'PrimitiveAlignment' does not exist on type 'typeof BABYLON'. ../../inspector/src/details/PropertyLine.ts(33,42): error TS2339: Property 'PrimitiveAlignment' does not exist on type 'typeof BABYLON'. ../../inspector/src/lib.d.ts(2,1): error TS6053: File '/home/wink/foss/Babylon/Babylon.js.my-fork/dist/preview release/canvas2D/babylon.canvas2D.d.ts' not found. ../../inspector/src/properties.ts(122,27): error TS2339: Property 'PrimitiveAlignment' does not exist on type 'typeof BABYLON'. ../../inspector/src/properties.ts(126,27): error TS2339: Property 'PrimitiveThickness' does not exist on type 'typeof BABYLON'. ../../inspector/src/properties.ts(130,27): error TS2339: Property 'BoundingInfo2D' does not exist on type 'typeof BABYLON'. ../../inspector/src/properties.ts(134,27): error TS2339: Property 'SolidColorBrush2D' does not exist on type 'typeof BABYLON'. ../../inspector/src/properties.ts(138,27): error TS2339: Property 'GradientColorBrush2D' does not exist on type 'typeof BABYLON'. ../../inspector/src/tabs/Canvas2DTab.ts(14,37): error TS2339: Property 'Canvas2D' does not exist on type 'typeof BABYLON'. ../../inspector/src/tabs/Canvas2DTab.ts(17,54): error TS2694: Namespace 'BABYLON' has no exported member 'Prim2DBase'. ../../inspector/src/tabs/Canvas2DTab.ts(22,45): error TS2694: Namespace 'BABYLON' has no exported member 'Prim2DBase'. ../../inspector/src/tabs/Canvas2DTab.ts(39,35): error TS2694: Namespace 'BABYLON' has no exported member 'Canvas2D'. ../../inspector/src/tabs/Canvas2DTab.ts(39,62): error TS2694: Namespace 'BABYLON' has no exported member 'Canvas2D'. ../../inspector/src/tabs/TabBar.ts(34,25): error TS2339: Property 'Canvas2D' does not exist on type 'typeof BABYLON'. [15:04:27] TypeScript: 23 semantic errors [15:04:27] TypeScript: emit succeeded (with errors) [15:04:28] Finished 'canvas2D' after 25 s 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.