Code Monkey home page Code Monkey logo

noa-examples's Introduction

noa-examples

Several small example worlds built on the noa voxel engine. The easiest way to get started with noa is to clone this repo and hack on these demos.

Live demos:

  • hello-world - a bare minimum world, suitable for building on top of
  • testbed - a testbed world that minimally implements most/all engine features
  • stress test - a demo made to test the performance of long view distances and crunchy terrain

Usage

To build and serve the examples locally:

# (clone this repo)
cd noa-examples
npm install
npm test      # serves demos on localhost:8080
npm start     # serves demos in prod mode

Then open localhost:8080 to view the three demos.

There's also a build script to generate all bundles into the docs directories, using vite. If you prefer webpack, the hello-world demo has a sample webpack config.

Those using React may want to check @MCArth/noa-cra-example, which is a ported noa example built with create-react-app.


Dependency / build notes

Babylon dependency:

Noa uses Babylon.js for 3D rendering, but references it as a peer dependency (so that game worlds can specify their Babylon version/modules). This means game worlds should declare a dependency on @babylonjs/core or similar, rather than loading in a prebuilt babylon script.

noa dependency:

This engine is under active development. The current release is available from npm as noa-engine, but if you want the latest changes may want to change your package.json to point to the #develop branch on github:

  "dependencies": {
    "noa-engine": "github:fenomas/noa#develop",
  },

Or, if you want to hack on both the engine and a game world together, it's easiest to clone the noa repo alongside to this one, and then edit package.json to reference your local copy of the engine:

  "dependencies": {
    "noa-engine": "file:../noa",
  },

Note that after changing package.json you'll need to run npm i.


Credits

Made with ๐Ÿบ by @fenomas, license is ISC.

noa-examples's People

Contributors

fenomas avatar mebaddev avatar

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.