Search the Community

Showing results for tags 'npm'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Coding and Game Design
  • Frameworks
    • Phaser
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Found 16 results

  1. Hello, I did a small contribution to BJS which has been merged recently, and I saw that my code is now integrated in the preview release to download here : http://www.babylonjs.com/versionbuilder/ and also in the preview CDN . It would have been awesome to have it updated in my project through NPM ! When do you update alpha releases on NPM to match the current state of the preview release ? Thank you
  2. Hello there! I did install Phaser 3 Beta over npm as described with npm install phaser@beta. This worked fine but when I try to run npm run build in the phaser folder after executing npm update I get the following error: module.js:487 throw err; ^ Error: Cannot find module 'webpack-shell-plugin' at Function.Module._resolveFilename (module.js:485:15) at Function.Module._load (module.js:437:25) at Module.require (module.js:513:17) at require (internal/module.js:11:18) at Object.<anonymous> (/XXX/XXX/XXX/XXX/XXX/node_modules/phaser/webpack.config.js:4:28) at Module._compile (module.js:569:30) at Object.Module._extensions..js (module.js:580:10) at Module.load (module.js:503:32) at tryModuleLoad (module.js:466:12) at Function.Module._load (module.js:458:3) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! phaser@3.0.0-beta.7 build: `webpack` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the phaser@3.0.0-beta.7 build script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm WARN Local package.json exists, but node_modules missing, did you mean to install? npm ERR! A complete log of this run can be found in: npm ERR! /XXX/XXX/.npm/_logs/2017-10-20T14_47_59_128Z-debug.log Is somebody else having the same error? Thank you in advance! Eric
  3. Hello dear people, As already hinted in some other topics, I have finished the implementation of NPM packages for BabylonJS and its submodules. Starting babylonjs 3.1.0-alpha3.4 you can use NPM to include BabylonJS and its modules in both JavaScript and TypeScript projects. The available npm packages can be found here - https://www.npmjs.com/~babylonjs . Full usage is currently being documented, but here is a simple way to get started: First install the latest babylonjs npm install --save babylonjs babylonjs-gui babylonjs-materials then, use those modules in your JS/TS file: import * as BABYLON from 'babylonjs'; import 'babylonjs-materials'; import * as GUI from 'babylonjs-gui'; let engine = new BABYLON.Engine(.........) I will update here when the documentation will be ready.
  4. Hello, How can I use Babylon's extensions with NPM imports (es6 style)? To resume my problem: 1. I use NPM and Webpack for my project. To use Babylon I've install the node module babylonjs and I import the lib with the line: import BABYLON from 'babylonjs' 2. I would like use too the Sky extension https://doc.babylonjs.com/extensions/sky To do that I try to import it with the line: import {skyMaterial} from 'babylonjs/dist/preview release/materialsLibrary/babylon.skyMaterial.min.js' 3. The compilation is done but in my Browser I've an error : Uncaught ReferenceError: __extends is not defined at eval (webpack-internal:///36:1) at BABYLON (webpack-internal:///36:1) at eval (webpack-internal:///36:1) at Object.<anonymous> (app.js:951) at __webpack_require__ (app.js:660) at fn (app.js:86) at eval (webpack-internal:///29:7) at Object.<anonymous> (app.js:904) at __webpack_require__ (app.js:660) at fn (app.js:86) I've forgot something or it's the wrong way?
  5. Hi, I'm using BabylonJS in an Angular project. I used NPM and I have installed 3.0.7: "babylonjs": "^3.0.7", I think the definition file is uncompleted, because a lot of properties are not available, like: camera.alpha But it happens in others properties, in materials, ..... Inside my node_module folder: What do you think can be the problem? Thanks!
  6. Hi all, We with my colegue decided to share texture generator node-js tool that we created. Its port of compresed texture generator script to node, so it can be used cross platform not just on win machines, also included in build scripts. NPM: https://www.npmjs.com/package/babylonjs-texture-generator GIT: https://github.com/evolution-gaming/babylonjs-texture-generator Feel free to post issues and suggestions on github. More information is located inside README.md file.
  7. Good evening all, My name is Christopher, and I have decided to use the Babylonjs npm repo. Question Once you include the babylonjs npm library through npm install how do you activate the extensions which are included? the attached file-structure.png shows the file-tree which is created in node_modules after using npm install. I am trying to use the included gui extension specifically. Environment Angular, Node, and Express, compiled using webpack Library npm babylon js To install the npm library into my project's node_modules: npm install --save babylonjs then my component has the import statement below: import * as BABYLON from 'babylonjs'; The above statement will utilize the babylon.module.d.ts file in the attached image and babylon.max.js This lets me use the BABYLON class with types perfectly as expected. However, none of the files in the gui folder in the attached image are hooked up. How would I go about activating this extension?? Solutions I've attempted thus far 0) just a normal import of the main babylonjs module: import * as BABYLON from 'babylonjs'; All core BABYLON methods and properties are accessible. However, BABYLON.GUI gives the following typescript error: "Property 'GUI' does not exist on 'typeof BABYLON'." Which is to be expected, since none of the gui files are hooked up. 1) using CDN for everything in index.html. <head> <!-- base href="/" is used for angular2 routing --> <base href="/"> <title>some website</title> <link id="favicon" rel="icon" href="public/assets/favicon.png"> <script src="https://www.babylonjs.com/hand.minified-1.2.js"></script> <script src="https://preview.babylonjs.com/cannon.js"></script> <script src="https://preview.babylonjs.com/oimo.js"></script> <script src="https://preview.babylonjs.com/babylon.js"></script> <script src="https://preview.babylonjs.com/gui/babylon.gui.min.js"></script> </head> This works, however, is not ideal, and defeats the purpose of the npm library. Also, the typescript definition files have to be maintained separate, either through the tsconfig.json, or in the component with a ///ref tag, and is very finecky. 2) using npm for babylon, and CDN for gui. Does not work, this method throws errors, because the CDN script tag in the head of index.html is compiled before the npm module, meaning the babylon class this extension extends does not exist at that time. 3) Using a second import to try to include the BABYLON.GUI class extension. import * as BABYLON from 'babylonjs'; import 'babylonjs/preview release/gui'; there is no .module file in the gui filepath so npm doesn't find anything there, so the second import fails. I've looked everywhere, including the docs and haven't found a clear solution. So how do we activate these extensions? They are included in the npm repo so naturally the devs want us to use them, and I'd love to take advantage of them
  8. Do people use it? What do I need to know?
  9. Using Canvas2D with npm

    Hello. I am using babylonjs with npm for build my application. But npm distribution does not contains packages for canvas2d extension. It there some way to use canvas2d extension with npm? Thanks.
  10. Canvas2D npm package missing

    If I look at https://www.npmjs.com/~babylonjs and inside the provided babylonjs-2.5.0 npm package, I observe that I have no way to access the Canvas2D project’s API. I think the babylonjs npm user should publish a Canvas2D package so that we can use it in webpack projects and I think this should be published by the official babylonjs npm user. Thanks!
  11. I just released Phaser NPM Webpack TypeScript Starter Project (catchy name, isn't it?) GitHub link or my github.io link as a base starting point for creating games with Phaser using TypeScript taking advantage of the Phaser npm module and Webpack for building (which I couldn't find a template for, so I made one). It includes the typical 3 states (boot, preloader, title) to show the flow of a Phaser game. It also includes a watch task that watches the project for any changes and recompiles, and another task to run a live server that refreshes automatically after a build. It only takes a few seconds and a couple commands to get going (after having node.js installed)! It's platform agnostic (I've tested on OSX, Ubuntu running on a Chromebook, and Windows 10 in a VM running on OSX and had zero difference in behaviour). Hopefully someone here will find it useful, or at least take a look and let me know how to improve it (I plan on using this template and it's evolutions for all my future Phaser projects)!
  12. I am looking inside of npm and am finding that melon seems to only go up to version .0.3.0 Is melon something that I can manage though NPM is is the project one that I am not going to easily be able to build as a NPM based project. My main project is build using Melon 3.x and I am looking to upgrade it to 4.0.
  13. Hi guys! What do you think to support TypeScript 2 with npm? Check that please https://blogs.msdn.microsoft.com/typescript/2016/06/15/the-future-of-declaration-files/ Regards,
  14. Phaser project generators

    Hi all, I'm starting a new Phaser project and I thought I'd take a look at the options for project generators out there. I'm overwhelmed by the amount of options and while I'm sure most of it is down to personal preference, I'd love to hear some opinions on the best way to go. I've worked on a couple of projects in the past that have used Codevinsky's generator, which was great and got me into using prefabs and the like, but that hasn't been updated in over 2 years. These days everyone's talking about ES6. I ran into some problems in the past with inheritance and thought being able to use 'super' would be a good thing, so I thought I'd give that a try, but there loads of different ES6 generators and they all have different features and methodologies. I was thinking of maintaining a list of all the generators I can find with some information about the technology and features, but I wondered before I put too much time into that, if one already exists somewhere? Does anyone have any opinions as to the best way to go, or is it really just a case of trying them all out and going with whatever feels right?
  15. Hi, just started working on my first Bablyon project. I'm planning a client/server model that will share some code between Node and the browser. I've encountered a couple of pain points, and noticed there is no issues section on GitHub, so I'm guessing this is the proper place to discuss with devs? The first is pretty major, the npm module uses a minified version of the source as its entry point, which is excruciating to debug! It's impossible to set breakpoints or sometimes to even work out which function is failing. Ideally the project would be distributed as unminified JavaScript that includes source maps. There is no reason to minify code for npm since it will ultimately be handled by the user's build tool (in production only!). The other problem is that I'd like to use the `Vector3` class (and perhaps others) in my server code. To do so I must "pretend" that `window` and `navigator` exist in the global scope. global.window = {}; global.navigator = {}; import { Vector3 } from 'babylonjs'; Ideally I'd like to do something like this: import { Vector3 } from 'babylonjs/Math'; That is not possible since the unminified source is not supplied in the package, and if I understand correctly, does not use the node module system anyway. Since the file `babylon/src/Math` actually doesn't require access to `window` etc. this should be fine. It could potentially make sense to split `Vector3` into its own repo and have it as a dependency of babylon? Is there any interest or discussion in this area? How do other people debug the minified code?
  16. Hey Everyone, I created a Phaser starter project template for Visual Studio 2013 that uses JavaScript. You can view more here: https://github.com/funzeye/Phaser-Project-Template-Javascript https://visualstudiogallery.msdn.microsoft.com/e6eeccc4-3963-4e3d-8181-77d94ae67d9a TypeScript Version also Available: https://visualstudiogallery.msdn.microsoft.com/a4f5464e-897a-48c2-85e4-7ac2b1d92d0f