the code for the plane is in the source code of the example I linked earlier.
Press the <> in the working example to see the un obfuscated inline JavaScript.
or look at lines 40-45 in the TypeScript example.
Nothing is hidden from you.
And also, in the TypeScript version there actually isn’t any TypeScript in there, since all the types are auto inferred by the usage of each variable as they are declared or instantiated.
Also, check this example. Raycaster Measurements - Three.js Tutorials (sbcode.net)
It loads a glTF into the scene with the plane already included in the model.
The model is traversed, and shadows are set to receive and cast appropriately