To explain exactly how to achieve this would require extensive tutorials, so I'll provide you with some helpful links.
You can start by visiting: ... where you will find instructions on creating a basic page with a canvas for drawing shapes. Drawing these shapes may be challenging as it involves multiple draw calls and precise positioning. It's recommended to create functions for each shape and utilize 2D math in these functions, which may warrant separate questions on platforms like SO.
If you want to create dashed lines like the ones in your example picture, check out . For more complex shapes, you'll need to combine different shapes on the canvas manually.
Remember to use a canvas size with dimensions that are power of two, such as 512x512 or 1024x1024, before using it as a texture.
Once you have your canvas set up as desired, integrating it into a three.js scene is straightforward:
var texture = new THREE.Texture( canvas );
var material = new THREE.MeshBasicMaterial({ map: texture });
var geometry = new THREE.PlaneGeometry( 10, 10 );
var plane = new THREE.Mesh( geometry, material );
scene.add( plane );
If you're not copying the map onto the canvas first, you'll need to use a more advanced material since only limited textures can be applied to a single surface. Focus on mastering 2D drawing first, as it's the most challenging aspect of this process.