Open jorgeAdfi opened 5 years ago
if(_terrainNode != nil){ _terrainNode.scale = terraindNodeScale; _terrainNode.geometry.materials = [self _defaultMaterials]; [self.scene.rootNode addChildNode:_terrainNode]; NSLog(@"Agrega terreno a 4riders");
[_terrainNode fetchTerrainAndTextureWithMinWallHeight:50.0 multiplier:2 enableDynamicShadows:YES textureStyle:@"mapbox/satellite-streets-v9" heightProgress:nil heightCompletion:^(NSError * _Nullable fetchError) { if (fetchError) { NSLog(@"Texture load failed: %@", fetchError.localizedDescription); } else { NSLog(@"Terrain load complete"); } } textureProgress:nil textureCompletion:^(UIImage * _Nullable image, NSError * _Nullable fetchError) { if (fetchError) {
// NSLog(@"Texture load failed: %@", fetchError.localizedDescription); } if (image) { NSLog(@"terrain texture fetch completed"); self->_terrainNode.geometry.materials[4].diffuse.contents = image; } }]; }
if(_terrainNode != nil){ _terrainNode.scale = terraindNodeScale; _terrainNode.geometry.materials = [self _defaultMaterials]; [self.scene.rootNode addChildNode:_terrainNode]; NSLog(@"Agrega terreno a 4riders");
// NSLog(@"Texture load failed: %@", fetchError.localizedDescription); } if (image) { NSLog(@"terrain texture fetch completed"); self->_terrainNode.geometry.materials[4].diffuse.contents = image; } }]; }