Change in typed array behavior when setting component properties
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 17.6k
- Forks
- 4.4k
- PR merge metrics
- No merged PRs in 30d
Description
A typed array is no longer passed correctly to a component when setting a property in version 0.8.
In version 0.7 for schema: { vert: {type: 'array', default: []} }
console.log(this.data.vert) resulted in:
Float32Array [ 0.058115072548389435, 1.987938124548116e-20, ...
if the incoming array was a typed array. In version 0.8 this same sequence results in :
Object [ 0.058115072548389435, 1.987938124548116e-20, ...
Will this be the default behavior going forward? Passing in typed arrays made the creation of buffer geometry more convenient.
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
Start by reproducing the component property assignment described for A-Frame 0.7 and 0.8, using the schema with vert typed as an array. Compare the resulting Float32Array and Object values, then determine the intended behavior before proposing a change; the issue does not name a source file or test, and no completion criteria are established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100