| 315 | }; |
| 316 | |
| 317 | function createPoints() { |
| 318 | if (this._baseGeometry !== undefined) { |
| 319 | if (this.is_animated === false) { |
| 320 | this.points = new THREE.Mesh(this._baseGeometry, new THREE.MeshBasicMaterial({ |
| 321 | color: 0xffffff, |
| 322 | vertexColors: THREE.FaceColors, |
| 323 | morphTargets: false |
| 324 | })); |
| 325 | } else { |
| 326 | if (this._baseGeometry.morphTargets.length < 8) { |
| 327 | console.log('t l',this._baseGeometry.morphTargets.length); |
| 328 | var padding = 8-this._baseGeometry.morphTargets.length; |
| 329 | console.log('padding', padding); |
| 330 | for(var i=0; i<=padding; i++) { |
| 331 | console.log('padding',i); |
| 332 | this._baseGeometry.morphTargets.push({'name': 'morphPadding'+i, vertices: this._baseGeometry.vertices}); |
| 333 | } |
| 334 | } |
| 335 | this.points = new THREE.Mesh(this._baseGeometry, new THREE.MeshBasicMaterial({ |
| 336 | color: 0xffffff, |
| 337 | vertexColors: THREE.FaceColors, |
| 338 | morphTargets: true |
| 339 | })); |
| 340 | } |
| 341 | scene.add(this.points); |
| 342 | } |
| 343 | } |
| 344 | |
| 345 | function addPoint(lat, lng, size, color, subgeo) { |
| 346 | |