mirror of
https://github.com/smallmain/cocos-enhance-kit.git
synced 2024-12-26 11:48:29 +00:00
20 lines
624 B
JavaScript
20 lines
624 B
JavaScript
|
|
let proto = cc.MotionStreak.__assembler__.MultiMotionStreakAssembler.prototype;
|
|
let _update = proto.update;
|
|
cc.js.mixin(proto, {
|
|
update (comp, dt) {
|
|
_update.call(this, comp, dt);
|
|
|
|
let { iData, usedVertices } = this._renderData._flexBuffer;
|
|
let indiceOffset = 0;
|
|
for (let i = 0, l = usedVertices; i < l; i += 2) {
|
|
iData[indiceOffset++] = i;
|
|
iData[indiceOffset++] = i + 2;
|
|
iData[indiceOffset++] = i + 1;
|
|
iData[indiceOffset++] = i + 1;
|
|
iData[indiceOffset++] = i + 2;
|
|
iData[indiceOffset++] = i + 3;
|
|
}
|
|
}
|
|
});
|