I try to add shadow for gltf model but no works

Search out many solutions about adding shadow for gltf model, but none of them works. Even cant see a light camera for debug after setting one.
show code as follow:

//#For light
const ambient = new THREE.HemisphereLight(0xffffff, 0xbbbbff, 2);

    ambient.position.set(0.5, 1, 0.25);

    const light = new THREE.DirectionalLight();

    light.position.set(0.2, 1, 1);

    light.castShadow = true;

    light.shadowDarkness = 0.5;

    light.shadowCameraVisible = true;

//# For 3D object
    object3d.castShadow = true;
    object3d.receiveShadow = true;

You reference is quite outdated. Properties like shadowDarkness or shadowCameraVisible do not exist since years. Try to setup your scene similar to the following official example: