Created
September 20, 2016 22:12
-
-
Save flimshaw/9c0037ce0e8874466c456cf438c5fb38 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
updateGeometry(buf, offset, count) { | |
if(this.offsetsProcessed.indexOf(offset) === -1) { | |
if(buf.length !== count) { | |
console.log("Invalid packet, rejecting"); | |
} | |
this.offsetsProcessed.push(offset); | |
var _buf = buf; | |
var _offset = offset / 4; | |
var _count = count / 4; | |
let ar = new Float32Array(buf.buffer); | |
this.posAttribute.array.set(ar, _offset); | |
this.starCount += count/12; | |
this.bufferOffset += (buf.length); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment