Git Product home page Git Product logo

patroljs's People

Contributors

nickjanssen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

patroljs's Issues

using PatrolJS for player control

Hi,

Thanks for this interesting library.

I have a question: Can the PatrolJS API be used (or adapted) for the navigation of the player itself (not just the NPCs)? It seems to me the relevant data is there in some form to do this.

I am trying to learn how to build a very simple FPS game:

http://spirare.js.org/app/examples/first-person-navmesh/index.html
https://github.com/waldenn/spirare/

The issue I am running into is that I would like to add basic collision detection and walking-through-terrain/buildings, but that the existing physics libraries don't perform at all on my older graphics card. I am hoping there is a bit simpler way to get there. Any pointers welcome.

Thanks,

Waldenn

How to add nodes in straight path?

@nickjanssen @ZackMercury , how to add nodes in straight path.

Can you tell me how to increase node in patrol.js. suppose if turning is path it is taking more nodes(green box) but if path is straight its taking only one node, How to increase nodes in straight path.

If I select long path to move player. Its going in only two nodes, its fine but if any speed breaker or small hills are come between this path player going below the road.

There is possibility of up and down path between 2 points of straight road. On that time I thinking If I add more node player will move smoothly. For better understanding Video

Using PatrolJS with multiple navmeshes

Is there any way to use PatrolJS with multiple meshes? For example if current position and destination are on different navmeshes. How to find path between two navmeshes? Thanks.

(FYI) Working on some updates in a fork

Hi @nickjanssen โ€” Wanted to give you a heads up that I'm making some updates to PatrolJS for use with A-Frame and more recent JS tooling.

Planned changes:

  • Remove dependency on Underscore (in favor of ES5)
  • Remove dependency on ProgressBar
  • Support CommonJS in the browser (see #6)
  • Allow logs to be disabled
  • Expose a little more API surface for the nav mesh, e.g. so that users of the library can inspect the current node (and perhaps get the color of the face, to interpret for gameplay?)

It's not clear whether PatrolJS is still maintained (i understand time/energy are limited of course), so I've chosen to begin in a new repository. It's not my intention to create a competing library unnecessarily, so please let me know if these are changes you would welcome as PRs here, instead.

Thanks, and nice work!

Checking 'typeof module' not an ideal way to detect Node.js

Hi! Neat package you've written here. :)

I'd like to use PatrolJS on the browser, without necessarily copy/pasting the script into my build. Using Browserify would normally make this easy, but it appears that PatrolJS is relying on typeof module as an indicator of whether the code is running server-side or not:

  if (typeof module !== 'undefined' && module.exports) {
    _ = require('underscore');
    THREE = require('three');
    ProgressBar = require('progress');
  }
  else {
    _ = window._;
    THREE = window.THREE;

    // stub in the browser
    ProgressBar = function () {
      return {
        tick: function () {}
      };
    };
  }

This isn't really ideal, as the same CommonJS module system can be used for browser-side code. Perhaps detecting process would be better?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.