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 219 forks source link

Game.getBlock: Assignment to parameter in arguments object #100

Open deathcap opened 10 years ago

deathcap commented 10 years ago

The profiler in Chrome 34.0.1847.131 reports this function:

Game.prototype.getBlock = function(pos) {
  pos = this.parseVectorArguments(arguments)
  return this.voxels.voxelAtPosition(pos)
}

is not optimizable because: "Assignment to parameter in arguments object"

screen shot 2014-05-06 at 9 28 42 pm

fritx commented 10 years ago

bad