| | |
| | | } |
| | | } |
| | | |
| | | destroy() { |
| | | this.disposeObject(); |
| | | this.removeObject(); |
| | | this.resetObject(); |
| | | } |
| | | |
| | | disposeObject() { |
| | | this.hola1.geometry.dispose(); |
| | | this.hola1.material.dispose(); |
| | | this.hola2.geometry.dispose(); |
| | | this.hola2.material.dispose(); |
| | | this.background.geometry.dispose(); |
| | | this.background.material.dispose(); |
| | | this.circle.geometry.dispose(); |
| | | this.circle.material.dispose(); |
| | | this.directionalLight1.dispose(); |
| | | this.directionalLight2.dispose(); |
| | | this.ambientLight.dispose(); |
| | | } |
| | | |
| | | removeObject() { |
| | | this.scene.remove(this.hola1); |
| | | this.scene.remove(this.hola2); |
| | | this.scene.remove(this.background); |
| | | this.scene.remove(this.circle); |
| | | } |
| | | |
| | | resetObject() { |
| | | this.hola1 = null; |
| | | this.hola2 = null; |
| | | this.background = null; |
| | | this.circle = null; |
| | | this.directionalLight1 = null; |
| | | this.directionalLight2 = null; |
| | | this.ambientLight = null; |
| | | } |
| | | |
| | | debuger() { |
| | | const gui = new GUI(); |
| | | |