2022-06-25 00:23:03 +08:00
|
|
|
|
2022-06-25 00:44:28 +08:00
|
|
|
let proto = cc.MotionStreak.__assembler__.MotionStreakAssembler.prototype;
|
2022-06-25 00:23:03 +08:00
|
|
|
let _init = proto.init;
|
|
|
|
let _update = proto.update;
|
|
|
|
cc.js.mixin(proto, {
|
|
|
|
init (comp) {
|
|
|
|
_init.call(this, comp);
|
|
|
|
|
|
|
|
this.setUseModel(false);
|
|
|
|
this.ignoreWorldMatrix();
|
|
|
|
this.ignoreOpacityFlag();
|
|
|
|
},
|
|
|
|
update (comp, dt) {
|
|
|
|
comp.node._updateWorldMatrix();
|
|
|
|
|
|
|
|
_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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|