Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Followed instructions and basic usage, nothing happens. #136

Open
entiendoNull opened this issue Oct 27, 2016 · 1 comment
Open

Followed instructions and basic usage, nothing happens. #136

entiendoNull opened this issue Oct 27, 2016 · 1 comment

Comments

@entiendoNull
Copy link

entiendoNull commented Oct 27, 2016

Hello,

I've followed the instructions and ended up with some code looking like this:

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Test</title>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
    <script type="text/javascript" src="bower_components/pathfinding/pathfinding-browser.min.js"></script>
</head>
<body>

</body>
<script>
//Walkability matrix. Zero is walkable, One is not
var matrix = [
    [0, 0, 0, 1, 0],
    [1, 0, 0, 0, 1],
    [0, 0, 1, 0, 0],
];
var grid = new PF.Grid(matrix);
var finder = new PF.AStarFinder();
var path = finder.findPath(1, 2, 4, 2, grid);
</script>
</html>

Nothing at all is drawn. What am I missing here?

@imor
Copy link
Collaborator

imor commented Oct 28, 2016

This is a pathfinding library, it will not draw anything. You'll have to use some other means to draw whatever you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants