diff --git a/src/particles/webgl/ParticleBuffer.js b/src/particles/webgl/ParticleBuffer.js index 98f5edc..c9c7fd5 100644 --- a/src/particles/webgl/ParticleBuffer.js +++ b/src/particles/webgl/ParticleBuffer.js @@ -67,6 +67,16 @@ { var property = properties[i]; + // Make copy of properties object so that when we edit the offset it doesn't + // change all other instances of the object literal + property = + { + attribute:property.attribute, + size:property.size, + uploadFunction:property.uploadFunction, + offset:property.offset + }; + if(dynamicPropertyFlags[i]) { this.dynamicProperties.push(property);