This is a summary of new features and breaking changes in recent noa
versions.
- 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.worldName
to manage - Current worldName is now sent with
worldDataNeeded
events, 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.world
internals (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
_local
alternate - Engine option
originRebaseDistance
controls 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
require
will need to dorequire('noa-engine').default
- Clients using
- Example worlds (
test
andhello-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#render
events now pass correctdt
argument - see issue #53
- Adds
debug
option: populateswindow
with useful references, bindsZ
to 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.pick
can take a function for which block IDs to target - #36 every
component 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.addDynamicMesh
changed toaddMeshToScene(mesh, isStatic)
- Entities can now be cylindrical w.r.t.
collideEntities
component - 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
player
component - usenoa.playerEntity
property - Added
showFPS
option - Many internal changes that hopefully don't break compatibility
- Support unloading/reloading new world data.
Sample implementation in thedocs/test
app (hit "O" to swap world data) - changes
noa.world#setChunkData
params:id, array, userData
- changes
noa.world#chunkBeingRemoved
event 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:
onLoad
when 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.targetedBlock
with details on whatever block is currently targeted. noa
now 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