max-mapper / max-mapper/voxel-engine
Game.getBlock: Assignment to parameter in arguments object
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.3k
- Forks
- 217
- PR merge metrics
- No merged PRs in 30d
Description
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"

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the Game.prototype.getBlock entry point shown in the issue and inspect how parseVectorArguments uses the function arguments. Start by reproducing or reviewing the Chrome profiler warning, then verify that the parameter handling no longer triggers that warning while voxelAtPosition behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- game-dev, performance
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100