Code Monkey home page Code Monkey logo

Comments (3)

fenomas avatar fenomas commented on May 17, 2024

Hi, I hate to bring bad news but that demo is reeeally old, I should put a note in the readme. To move to the current engine, you could try just updating the noa dependency and then fixing all the migration issues that occur, but I think it would probably be easier to start with a blank world in the current engine, and then copy over each feature you need.

Generally the best way to make a game on noa is to start by cloning the noa-examples repo, and then hacking on the world inside docs/hello-world. That is pretty much the absolute minimal world, so there's nothing to remove, and a clean slate to build on.

from noa.

levlups avatar levlups commented on May 17, 2024

Andy when I remove the topwater that I added , its a material with a game.on(tick) wich creates a water animation , the speed is good now , I guess no water animation for me wath do you think

from noa.

fenomas avatar fenomas commented on May 17, 2024

I see, were you maybe changing the water's voxel ID (with setBlock) every tick? That would be very slow, as when voxel IDs change the engine has to re-mesh the entire chunk.

I haven't tried doing animated textures, but it should be possible. When you register a block material with noa, you can pass in a Babylon JS material, and then that material will be used for those voxels:

var blockmat = new StandardMaterial('', scene)
noa.registerMaterial(name, color, textureURL, texHasAlpha, blockmat) 

or something like that. Then, later on at runtime if you dynamically change that material's settings it should affect any mesh using the material, including any voxel terrain meshes using that block material.

Hope that makes sense. I'm not sure if there's any Babylon call you have to do when dynamically changing a material's texture, there might be a markDirty or something (as I believe there used to be in three.js).

from noa.

Related Issues (20)

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.