diff --git a/examples/webgl_geometry_terrain.html b/examples/webgl_geometry_terrain.html
index c4fb7abe26b04ea8c1a164b80b916353b681e20d..bce9b08b8f90700bd7b387749c8c90fd577b4c87 100644
--- a/examples/webgl_geometry_terrain.html
+++ b/examples/webgl_geometry_terrain.html
@@ -81,12 +81,14 @@
camera.position.y = data[ worldHalfWidth + worldHalfDepth * worldWidth ] * 10 + 500;
- var geometry = new THREE.PlaneGeometry( 7500, 7500, worldWidth - 1, worldDepth - 1 );
+ var geometry = new THREE.PlaneBufferGeometry( 7500, 7500, worldWidth - 1, worldDepth - 1 );
geometry.applyMatrix( new THREE.Matrix4().makeRotationX( - Math.PI / 2 ) );
- for ( var i = 0, l = geometry.vertices.length; i < l; i ++ ) {
+ var vertices = geometry.attributes.position.array;
- geometry.vertices[ i ].y = data[ i ] * 10;
+ for ( var i = 0, j = 0, l = vertices.length; i < l; i ++, j += 3 ) {
+
+ vertices[ j + 1 ] = data[ i ] * 10;
}
diff --git a/examples/webgl_geometry_terrain_fog.html b/examples/webgl_geometry_terrain_fog.html
index ffaf5d5f64e30636346c908236ccbfc4189538c6..9c0d33b0110b383a4d0ae07484214ca495781e88 100644
--- a/examples/webgl_geometry_terrain_fog.html
+++ b/examples/webgl_geometry_terrain_fog.html
@@ -83,12 +83,14 @@
camera.position.y = data[ worldHalfWidth + worldHalfDepth * worldWidth ] * 10 + 500;
- var geometry = new THREE.PlaneGeometry( 7500, 7500, worldWidth - 1, worldDepth - 1 );
+ var geometry = new THREE.PlaneBufferGeometry( 7500, 7500, worldWidth - 1, worldDepth - 1 );
geometry.applyMatrix( new THREE.Matrix4().makeRotationX( - Math.PI / 2 ) );
- for ( var i = 0, l = geometry.vertices.length; i < l; i ++ ) {
+ var vertices = geometry.attributes.position.array;
- geometry.vertices[ i ].y = data[ i ] * 10;
+ for ( var i = 0, j = 0, l = vertices.length; i < l; i ++, j += 3 ) {
+
+ vertices[ j + 1 ] = data[ i ] * 10;
}
diff --git a/examples/webgl_geometry_terrain_raycast.html b/examples/webgl_geometry_terrain_raycast.html
index 5b7698c729c5bc0f5c7ec0a25fd69752d5d7b19a..5e21c006883573bc9105c17b647b724418289750 100644
--- a/examples/webgl_geometry_terrain_raycast.html
+++ b/examples/webgl_geometry_terrain_raycast.html
@@ -86,12 +86,14 @@
camera.position.y = controls.center.y + 2000;
camera.position.x = 2000;
- var geometry = new THREE.PlaneGeometry( 7500, 7500, worldWidth - 1, worldDepth - 1 );
+ var geometry = new THREE.PlaneBufferGeometry( 7500, 7500, worldWidth - 1, worldDepth - 1 );
geometry.applyMatrix( new THREE.Matrix4().makeRotationX( - Math.PI / 2 ) );
- for ( var i = 0, l = geometry.vertices.length; i < l; i ++ ) {
+ var vertices = geometry.attributes.position.array;
- geometry.vertices[ i ].y = data[ i ] * 10;
+ for ( var i = 0, j = 0, l = vertices.length; i < l; i ++, j += 3 ) {
+
+ vertices[ j + 1 ] = data[ i ] * 10;
}