This is a summary of new features and breaking changes in recent noa versions.
- 0.33.0
- 0.32.0
- 0.31.0
- 0.30.0
- 0.29.0
- 0.28.0
- 0.27.0
- 0.26.0
- 0.25.0
- 0.24.0
- 0.23.0
- 0.22.0
- 0.21.0
- 0.20.0
- 0.16.0
- Signature of
noa.registry.registerMaterialchanged to take an options object - Terrain now supports texture atlases! Merge your textures into a vertical strip atlas, then call
noa.registry.registerMaterialwith that texture and specify anatlasIndexoptions property. - When passing world data to
setChunkData, client may now pass in afillVoxelIDto signify that entire chunk should be filled with that voxel (e.g.0for air) - Babylon version updated
- Added options/properties to
noa.camerafor temprary changes to camera control sensitivity.sensitivityMult(default1)sensitivityMultOutsidePointerlock(default0)
- Added
noa.camera.inputsDisabledfor temporarily disabling camera controls - Modernization updates to
noa.inputs. Breaking changes:- Key bindings should now use KeyboardEvent.code strings, like
KeyA,Shift, etc. - Mouse button bindings should use
Mouse1,Mouse2.. - Mouse move/scroll values (
dx,dy,scrollx,scrolly) are moved fromnoa.inputs.statetonoa.inputs.pointerState
- Key bindings should now use KeyboardEvent.code strings, like
- Changes default light to Directional, and updates related engine options:
- removes option
groundLightColor, addslightVector, and changesambientColor
- removes option
- Removes
noa.rendering.postMaterialCreationHook- use mesh hooks instead - Adds
rendering.setMeshVisibilityfor toggling the display of meshes that are added to the scene withaddMeshToScene - Engine now emits events when adding/removing terrain meshes that it magnages (static chunk terrain, or custom block meshes). Clients can listen to these to implement shadows.
noa#addingTerrainMeshnoa#removingTerrainMesh
- Adds
playerShadowComponentoption, defaulting totrue - Renames some internals to be public - e.g.
rendering._scenetoscene
- Fixes npm versioning issue - no code changes.
- Change the speed of the world with
noa.timeScale - Now possible to control chunk processing order:
noa.world.chunkSortingDistFn - Chunk processing will happen more reliably, particularly after switching worlds.
- Changed how the docs work, and how code comments are arranged for this purpose. See API docs.
- Moves to Babylonjs version 5 (alpha).
- Adds more exported types and code hints.
- Engine now a named export, use
import {Engine} from 'noa-engine' - many performance and size optimizations
- now generates proper type declarations and API references!
- Adds separate horizontal/vertical add/remove chunk distances in
world - Scene octree now can put multiple chunks in each octree block
- Adds option
noa.rendering.renderOnResize - Changed game-shell dependency, which affects several properties:
- init option
tickRateis now in ticks per second, not ms per tick - init option
maxRenderRateadded (leave at0for no cap) - init option
stickyFullscreenadded - adds
noa.tickRate. Read only; if you really need to change it usenoa.container._shell.tickRate. - adds
noa.maxRenderRate- this is safe to change dynamically. Set to0for no limit.
- init option
- Removed the
idproperty onChunkobjects. Shouldn't realistically affect any game clients, but if you were using it for some reason, usechunk.requestIDinstead. - Made several of the core
babylonimports more specific, which could cause errors if your client code is using Babylon modules without importing them. If you're using any mesh builders (e.g.Mesh.CreateBox()), make sure to import the necessary module (import '@babylonjs/core/Meshes/Builders/boxBuilder').
- Maximum allowed voxel ID is now
65535 - New option
worldGenWhilePausedadded tonoa.world. When true, the engine will keep doing world generation (requesting new chunks, disposing old ones, meshing, etc) even while paused. - New option
manuallyControlChunkLoadingadded tonoa.world. When set, the engine will not automatically add or remove chunks near the player. Instead, callnoa.world.manuallyLoadChunkandmanuallyUnloadChunkon the coordinates you need. - Voxel IDs are now stored internally as plain
Uint16Arrayelements, rather packing IDs and bit flags together. Any clients that were accessing internal data arrays will probably need to be updated. - Fixed the
dtparameter tonoa#render(dt)events. Previously it could occasionally be wrong in such a way as to cause temporal aliasing when used for animations.
- Voxel data is no longer internally duplicated at chunk borders. This means:
- World generation no longer necessarily needs to be deterministic. Previously, voxels on chunk borders would get tracked in several chunks, and if the data didn't match up it would cause rendering artifacts. This is no longer the case, each voxel is stored in only one place.
- When each chunk gets meshed for the first time, it will have have some artifacts at edges where the neighboring chunk doesn't exist yet. Such chunks will later get re-meshed once all their neighbor chunks exist.
- Set
noa.world.minNeighborsToMesh(default6) to control how aggressively chunks first get meshed.
- Can now swap between world data sets
- Set
noa.worldNameto manage - Current worldName is now sent with
worldDataNeededevents, so that game client knows which worldgen data to provide
- Set
- Removed leading
_from several property names, since they're meant to be set by the client:noa.world.maxChunksPendingCreation(max # of chunks to queue)noa.world.maxChunksPendingMeshing(max # of chunks to queue)noa.world.maxProcessingPerTick(time in ms)noa.world.maxProcessingPerRender(time in ms)
- Mostly rewrites
noa.worldinternals (chunk create/update/dispose flow)
- Engine now does world origin rebasing, to avoid precision bugs in large worlds
- Entity positions are now handled internally relative to a local coordinate system, which is periodically rebased around the player entity
- The following systems now internally use local coordinates:
- rendering
- physics
- entity/entity collisions
- raycasting
- Pre-existing position properties and related APIs still work, but may be imprecise. Each such API now has a
_localalternate - Engine option
originRebaseDistancecontrols how often rebasing occurs - See /doc/positions.md for more details
- Engine now imports Babylon as a peer dependency
- Noa games must now declare their own dependency on
@babylon/core - See examples for sample code, weback config, etc.
- Noa games must now declare their own dependency on
- Noa now exports Engine as an ES6 module.
- Clients using
requirewill need to dorequire('noa-engine').default
- Clients using
- Example worlds (
testandhello-world) moved to a separate repo - Internal modules all migrated to es6 import/export syntax
- Moves several camera-related APIs from rendering to
noa.camera - Removes several redundant properties/APIs (they throw depreceation messages when accessed)
- Component systems now fire in a fixed order, see components.md
- Changes order of various render logic - fixes temporal aliasing bugs
noa#renderevents now pass correctdtargument - see issue #53
- Adds
debugoption: populateswindowwith useful references, bindsZto BJS inspector - Now current with Babylon.js 4.0
- Updates many dependencies, many small bug fixes.
- Terrain materials can specify a renderMaterial (see
registry.registerMaterial()) - Targeting and
noa.pickcan take a function for which block IDs to target - #36 everycomponent is removed (client apps using this, please define it separately)
- Now uses octrees for scene selection for all meshes, even moving ones
- Option
useOctreesForDynamicMeshes(defaulttrue) to disable previous noa.rendering.addDynamicMeshchanged toaddMeshToScene(mesh, isStatic)- Entities can now be cylindrical w.r.t.
collideEntitiescomponent - Adds pairwise entity collision handler
noa.entities.onPairwiseEntityCollision
- Large/complicated scenes should mesh and render much faster
- Chunk terrain/object meshing now merges results. Block object meshes must be static!
- Removed redundant
playercomponent - usenoa.playerEntityproperty - Added
showFPSoption - Many internal changes that hopefully don't break compatibility
- Support unloading/reloading new world data.
Sample implementation in thedocs/testapp (hit "O" to swap world data) - changes
noa.world#setChunkDataparams:id, array, userData - changes
noa.world#chunkBeingRemovedevent params:id, array, userData
- Near chunks get loaded and distant ones get unloaded faster and more sensibly
- Greatly speeds up chunk init, meshing, and disposal (and fixes some new Chrome deopts)
- Revise per-block callbacks:
onLoadwhen a block is created as part of a newly-loaded chunkonUnload- when the block goes away because its chunk was unloadedonSet- when a block gets set to that particular idonUnset- when a block that had that id gets set to something elseonCustomMeshCreate- when that block's custom mesh is instantiated (either due to load or set)
- Simplifies block targeting. Instead of several accessor methods, now there's a persistent
noa.targetedBlockwith details on whatever block is currently targeted. noanow emitstargetBlockChanged- Built-in block highlighting can now be overridden or turned off with option
skipDefaultHighlighting
- Adds per-block callbacks:
onCreate,onDestroy,onCustomMeshCreate
- Simplifies block registration - now takes an options argument, and the same API is used for custom mesh blocks
- Removes the idea of registration for meshes