diff --git a/index.html b/index.html index ea11c07..28a637c 100644 --- a/index.html +++ b/index.html @@ -34,17 +34,18 @@ let surfaceTest = () => let surfaceGeometry = new THREE.BufferGeometry(); surfaceGeometry.setAttribute('position', new THREE.BufferAttribute(surface.vert, 3) ); surfaceGeometry.setIndex(surface.triPointVert); - surfaceGeometry.computeVertexNormals(); + surfaceGeometry.computeVertexNormals(true); let surfaceObject = new THREE.Mesh( surfaceGeometry, - new THREE.MeshBasicMaterial({color:0xaa9900, wireframe:true}) + new THREE.MeshPhongMaterial({color:0xaa9900, side:THREE.DoubleSide, shading:THREE.FlatShading}) ); return { DOM:"canvas", Init(inScene) - { + { + inScene.add(new THREE.PointLight(0xffffff, 1, 100)) inScene.add(surfaceObject); inScene.add(new THREE.GridHelper(10, 10)); }, diff --git a/region.js b/region.js index 3bd8a0c..9a4f739 100644 --- a/region.js +++ b/region.js @@ -1,47 +1,5 @@ -export const Kernel = -{ - Corners: - [ - [ 1, 1, -1], - [ 1, -1, -1], - [-1, 1, -1], - [-1, -1, -1], - [ 1, 1, 1], - [ 1, -1, 1], - [-1, 1, 1], - [-1, -1, 1] - ], - Cardinal: - [ - [ 1, 0, 0], - [ 0, 1, 0], - [-1, 0, 0], - [ 0, -1, 0], - [ 0, 0, 1], - [ 0, 0, -1] - ], - Loop(inList, inVector, inHandler) - { - for(let i=0; i