Your code looks basically right, assuming you also have a camera and light source. Here is a playground entry.
And, for posterity, here is that code:
var scene = new BABYLON.Scene(engine);
//Create a light
var light = new BABYLON.PointLight("Omni", new BABYLON.Vector3(-60, 60, 80), scene);
//Create an Arc Rotate Camera - aimed negative z this time
var camera = new BABYLON.ArcRotateCamera("Camera", Math.PI / 2, 1.0, 210, BABYLON.Vector3.Zero(), scene);
camera.attachControl(canvas, true);
//Creation of a repeated textured material
var materialPlane = new BABYLON.StandardMaterial("texturePlane", scene);
materialPlane.diffuseTexture = new BABYLON.Texture("textures/grass.jpg", scene);
materialPlane.specularColor = new BABYLON.Color3(0, 0, 0);
materialPlane.backFaceCulling = false;//Allways show the front and the back of an element
//Creation of a plane
var plane = BABYLON.Mesh.CreatePlane("plane", 120, scene);
plane.rotation.x = Math.PI / 2;
plane.material = materialPlane;
I started with one of their demos, then hacked away most of the stuff to get the minimal example. I left in the backFaceCulling = false
(as otherwise the image is only visible from one direction), and added in your specularColor
setting.
An alternative approach is to replace the diffuseTexture
with emissiveTexture
:
materialPlane.emissiveTexture = new BABYLON.Texture("textures/grass.jpg", scene);
Then you can comment out the light, and it will still be visible. (In fact, if you leave the light pointing at it, it will be overexposed.)
(I would recommend starting a new question for your keyboard control and collision detection questions. Or work through the babylon samples and tutorial videos.)