19 lines
539 B
JavaScript
19 lines
539 B
JavaScript
import { deepExtend } from "../../Utils/Utils";
|
|
export class ManualParticle {
|
|
load(data) {
|
|
var _a, _b;
|
|
if (!data) {
|
|
return;
|
|
}
|
|
if (data.position !== undefined) {
|
|
this.position = {
|
|
x: (_a = data.position.x) !== null && _a !== void 0 ? _a : 50,
|
|
y: (_b = data.position.y) !== null && _b !== void 0 ? _b : 50,
|
|
};
|
|
}
|
|
if (data.options !== undefined) {
|
|
this.options = deepExtend({}, data.options);
|
|
}
|
|
}
|
|
}
|