| 226 | }; |
| 227 | |
| 228 | function createPoints() { |
| 229 | if (this._baseGeometry !== undefined) { |
| 230 | if (this.is_animated === false) { |
| 231 | this.points = new THREE.Mesh(this._baseGeometry, new THREE.MeshBasicMaterial({ |
| 232 | color: 0xffffff, |
| 233 | vertexColors: THREE.FaceColors, |
| 234 | morphTargets: false |
| 235 | })); |
| 236 | } else { |
| 237 | if (this._baseGeometry.morphTargets.length < 8) { |
| 238 | console.log('t l',this._baseGeometry.morphTargets.length); |
| 239 | var padding = 8-this._baseGeometry.morphTargets.length; |
| 240 | console.log('padding', padding); |
| 241 | for(var i=0; i<=padding; i++) { |
| 242 | console.log('padding',i); |
| 243 | this._baseGeometry.morphTargets.push({'name': 'morphPadding'+i, vertices: this._baseGeometry.vertices}); |
| 244 | } |
| 245 | } |
| 246 | this.points = new THREE.Mesh(this._baseGeometry, new THREE.MeshBasicMaterial({ |
| 247 | color: 0xffffff, |
| 248 | vertexColors: THREE.FaceColors, |
| 249 | morphTargets: true |
| 250 | })); |
| 251 | } |
| 252 | scene.add(this.points); |
| 253 | } |
| 254 | } |
| 255 | |
| 256 | function addPoint(lat, lng, size, color, subgeo) { |
| 257 | |