iLKke Posted July 20, 2018 Share Posted July 20, 2018 I found this olden Phaser 2 thread on how to enable autocomplete in Brackets using the Ternific extension: http://www.html5gamedevs.com/topic/35475-phaser-auto-completion-with-brackets/ Does anyone have a tern plugin for Phaser 3? I would be very grateful Link to comment Share on other sites More sharing options...
rich Posted July 20, 2018 Share Posted July 20, 2018 I don't know of one - you may be better off using TypeScript to be honest. Link to comment Share on other sites More sharing options...
iLKke Posted July 20, 2018 Author Share Posted July 20, 2018 Ah good call, ta! Link to comment Share on other sites More sharing options...
PhaserEditor2D Posted July 20, 2018 Share Posted July 20, 2018 @iLKke Tern is the best if you want to code with JavaScript 5, but if you are fine to code with JavaScript 6, then VSCode is a great option, just include the Phaser TypeScript definitions into a jsconfig.json file. Read here about how to do auto-completion in VSCode and JS: https://code.visualstudio.com/docs/languages/jsconfig Link to comment Share on other sites More sharing options...
iLKke Posted July 21, 2018 Author Share Posted July 21, 2018 Thanks, will try it out! Link to comment Share on other sites More sharing options...
Voxin Posted September 4, 2018 Share Posted September 4, 2018 For anyone who wants intellisense/ autocomplete in their javascript scripts: 1.Add a "jsconfig.json" to your root folder. paste this code into it: { "exclude": [ "node_modules/**/*" ] } 2. Create in the root folder a folder called "defs". 3. Download a file called "phaser.d.ts" - https://github.com/photonstorm/phaser3-docs/tree/master/typescript 4. Put the phaser.d.ts in the defs folder. 5. Make sure all your javascript scripts are under a folder called js. 6. Drink a margarita. Link to comment Share on other sites More sharing options...
Recommended Posts