edit
This commit is contained in:
27
src/app/layout/passport/particle.ts
Normal file
27
src/app/layout/passport/particle.ts
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
export default class Particle {
|
||||||
|
ParticleNetworkAnimation: any;
|
||||||
|
PNA: any;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
this.ParticleNetworkAnimation = this.PNA = function () {};
|
||||||
|
}
|
||||||
|
|
||||||
|
init() {
|
||||||
|
this.PNA.prototype.init = function (element: any) {
|
||||||
|
this.$el = document.getElementsByClassName(element);
|
||||||
|
|
||||||
|
this.container = element;
|
||||||
|
this.canvas = document.createElement('canvas');
|
||||||
|
this.sizeCanvas();
|
||||||
|
this.container.appendChild(this.canvas);
|
||||||
|
this.ctx = this.canvas.getContext('2d');
|
||||||
|
// this.particleNetwork = new ParticleNetwork(this);
|
||||||
|
|
||||||
|
this.bindUiActions();
|
||||||
|
|
||||||
|
return this;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -4,7 +4,8 @@
|
|||||||
ParticleNetworkAnimation = PNA = function() {};
|
ParticleNetworkAnimation = PNA = function() {};
|
||||||
|
|
||||||
PNA.prototype.init = function(element) {
|
PNA.prototype.init = function(element) {
|
||||||
this.$el = $(element);
|
console.log(this);
|
||||||
|
this.$el = document.getElementsByClassName(element);
|
||||||
|
|
||||||
this.container = element;
|
this.container = element;
|
||||||
this.canvas = document.createElement('canvas');
|
this.canvas = document.createElement('canvas');
|
||||||
|
|||||||
Reference in New Issue
Block a user