Search the Community

Showing results for tags 'npm'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • 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 20 results

  1. Hi there, I started jesting around a few days ago on babylonJS and was wondering if it was possible to get the GLTF Loader with npm to import it as it is not in the babylonjs npm package. Thanks in advance for your help. Dos.
  2. Modern JavaScript Tools

    Hi all, I'm the main author of the Quick game engine / lib and I have been reading a lot about these tools such as npm and browserify for the client side of web applications. I have been very comfortable with the current structure of the project but I would like to hear your opinions on adopting the new structure that these tool can facilitate, e.g. separate class files, et al. Coming from Java, I can appreciate that, though it's not a real need. Anyway, I already use npm for unit testing so it feels like it would make sense to go further into this trend. Any comments are more than welcome. Thank you.
  3. NPM Install Issues

    I would love to know how come npm install doesn't work on a mac. I have tried numerous times during the last months, when it was still in beta. I am running sudo npm install phaser@3.1.2 and I always get the following issues, also I am using node v8.9.4 I know they are just warnings, but nothing is in my local directory. I have also tried with the --save flag. I checked the global location just in case and there is nothing there either xxx-MacBook-Pro:phaser3 xxx$ sudo npm install phaser@3.1.2 Password: npm WARN saveError ENOENT: no such file or directory, open '/Users/xxx/package.json' npm WARN enoent ENOENT: no such file or directory, open '/Users/xxx/package.json' npm WARN xxx No description npm WARN xxx No repository field. npm WARN xxx No README data npm WARN xxx No license field. + phaser@3.1.2 updated 1 package in 2.42s
  4. Hello dear community, I have just pushed a new version of Babylon to NPM. 3.2.0-alpha2 has a bit of changed package structure, which is, in general, transparent to the regular user. You will still be able to do the following: import * as BABYLON from "babylonjs"; What's new and exciting about this release are the extra modules that were added to this package. Babylon's npm package now contains commonjs and es6-ready modules, including typescript typings (for the commonjs modules). With the updated package you could do the following in TypeScript (and JavaScript): import { AbstractMesh, Scene, Vector3, Engine, Mesh } from "babylonjs/core"; import { ArcRotateCamera } from "babylonjs/arcRotateCamera"; import { HemisphericLight } from "babylonjs/hemisphericLight"; import { MeshBuilder } from "babylonjs/meshBuilder"; var canvas: any = document.getElementById("renderCanvas"); var engine: Engine = new Engine(canvas, true); function createScene(): Scene { var scene: Scene = new Scene(engine); var camera: ArcRotateCamera = new ArcRotateCamera("Camera", Math.PI / 2, Math.PI / 2, 2, Vector3.Zero(), scene); camera.attachControl(canvas, true); var light1: HemisphericLight = new HemisphericLight("light1", new Vector3(1, 1, 0), scene); var sphere: Mesh = MeshBuilder.CreateSphere("sphere", { diameter: 1 }, scene); return scene; } var scene: Scene = createScene(); engine.runRenderLoop(() => { scene.render(); }); window.addEventListener("resize", () => { engine.resize(); }); This will be using the commonjs modules available in the babylonjs package. The file generated (using webpack) will be roughly 2.2 MB unminified (which is an improvement to the 4+MB unminified Babylon file). To use es6, simple add /es6 after the module name. for example: import { AbstractMesh, Scene, Vector3, Engine, Mesh } from "babylonjs/core/es6"; I have worked a lot to make it work correctly. But there are (probably) many things I did catch. Please: Be patient! it was just released, there might be a few bugs. Use it, abuse it, make it fail, and let me know when it did! I want to fix all bugs until 3.2 is officially released I will write a detailed documentation page about how to use it. For a list of modules, you can refer to config.json in our Gulp directory (until I finish the docs) : . Add "core", being the most important package there is. Enjoy!
  5. 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 : 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
  6. phaser@beta: npm run build problem

    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
  7. 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 - . 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.
  8. 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 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?
  9. 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!
  10. 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: GIT: Feel free to post issues and suggestions on github. More information is located inside file.
  11. 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=""></script> <script src=""></script> <script src=""></script> <script src=""></script> <script src=""></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
  12. Do people use it? What do I need to know?
  13. 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.
  14. Canvas2D npm package missing

    If I look at 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!
  15. I just released Phaser NPM Webpack TypeScript Starter Project (catchy name, isn't it?) GitHub link or my 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)!
  16. 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.
  17. Hi guys! What do you think to support TypeScript 2 with npm? Check that please Regards,
  18. 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?
  19. 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?
  20. Hey Everyone, I created a Phaser starter project template for Visual Studio 2013 that uses JavaScript. You can view more here: TypeScript Version also Available: