max-mapper / voxel-engine

3D HTML5 voxel game engine
http://maxogden.github.com/voxel-engine
BSD 3-Clause "New" or "Revised" License
1.29k stars 220 forks source link

setBlock() does not update canvas until mouse click #130

Closed haitaoli closed 7 years ago

haitaoli commented 7 years ago

I see this problem in my app so I tested with the hello-world example, the same happens. If I call setBlock() after game is created, the new blocks do not show until I click on the canvas. Once I click on it, the subsequent calls update the canvas correctly. Tested in Chrome, FF and Edge. Is there a way to force rendering?

haitaoli commented 7 years ago

To answer my own question, set game.paused = false after the game object is configured.