Giter Site home page Giter Site logo

meshwalk's Introduction

MeshWalk.js

MeshWalk.js is a JS library which helps your TPS game development with three.js.

examples

Usage and Learning

See following demos and check the source code with some comments. (You need three.js via peerDependencies or importmap)

  1. get started
  2. keyboard Input
  3. the CameraControl
  4. objects
  5. terrain
  6. AnimationController
  7. all together
  8. remove collider

examples with recast-navigation-js:

  1. with recast nav-mesh: followers
  2. with recast nav-mesh: auto navigation

meshwalk's People

Contributors

yomotsu 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

meshwalk's Issues

Convert to ES5?

Hello, @yomotsu ! I just would like to ask if you could convert this library to ES5 as opposed to ES6 so that I may study the code if possible since it is MIT licensed. I would very much like to use this as part of my demo but at the same time, I only need to utilize the library functions in my demo. There are some defaults in the library that I cannot use such as using my own Keys library for moving the character & such.

Thank you so much for all that you do & please continue doing it!

Have a great day! <3

Thundros

Heightmap as opposed to JSON?

Hi, @yomotsu ! Could you get this to work with loaded heightmaps instead of JSON? I would really appreciate it & would love to use it in my own project! Thank you so very kindly! ^_^

Friends Always,

Thundros

Simple edit example :: "7_allTogether.html" to es5?

Hi,` Yomotsu. This is an EXCELLENT library & AWESOME demos, but can you make a simple edit to 7_allTogether.html that changes the es6 to es5? es6 & promises & I don't mix. :(

like instead of :

Promise.all( [
  loadMesh( 'terrain.json' ),
  loadMesh( 'model/miku.json' )
] ).then( function( result ) {

I want to be able to do :

var mymesh = loadMesh ( 'terrain.json' );
var mymesh2 = loadMesh ( 'miku.json' );
mymesh.position.x = 0.0;
mymesh.position.y = 0.0;
mymesh.position.z = 0.0;
mymesh2.scale.x = 1.0;
mymesh2.scale.y = 1.0;
mymesh2.scale.z = 1.0;

Thank you once again, @yomotsu !

Peace brother

*~ Thundros

Mesh sometimes gets caught on edges

Hello again! I'm having a weird issue where I've imported a model from Blender, a simple set of platforms that have inclines and connect. I'm noticing that the mesh will sometimes get caught on the edge of two platforms. I've tried adjusting the max slope, which does fix the issue but allows the mesh to walk through solid walls. I'm wondering how I can smooth edges to allow the mesh to walk over them, or if I'm missing sometime while importing. I've tried to subdivide the platform meshes to increate detection, this did not work. I also tried to increase the poly count of the player mesh, this also did not work. Thank you for any input on this issue! @yomotsu

Conversion to A-Frame possible?

Hi @yomotsu. Is there any major rework needed to work this code in a-frame? I tried to make it work with a-frame with a sphere and a plane, but the sphere keeps falling down

Adding a new glb end up giving error GLTFLoader.js:134 TypeError: Cannot read properties of undefined (reading 'uuid') at Octree.importThreeMesh (meshwalk.module.js:614:43)

Hi,

I tried adding the following glb file but I get the following error

GLTFLoader.js:134 TypeError: Cannot read properties of undefined (reading 'uuid')
at Octree.importThreeMesh (meshwalk.module.js:614:43)
at (index):144:9
at GLTFLoader.js:161:7
at GLTFLoader.js:1721:4

This is the glb file i tried to add.

https://sketchfab.com/3d-models/art-gallery-3c3248e07296402ead6facab0a09bdcc

Please help!

Thanks.

2 KeyBoard Input

Change file name to 2_keyboard-input.html from 2_keyboard-Input.html

How to update octree?

I can see how to remove an object from the octree, but how would I go about animating a block that moves up and down? I'm able to continuously add / remove the object from the octree, updating its calculated collider position, but this bogs down the render. Is this possible? Thanks!

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.