What is the meaning of "weight" with drei sampler?

What is the meaning of “the name of the attribute to be used as sampling weight” which is the description of “weight” for drei sampler ? This lacks of simple example.

Note that drei’s <Sampler/> is a wrapper around THREE.MeshSurfaceSampler, which has documentation here:

Thank you. The code below doesn’t work because of the way nodes are loaded with <primitive…> How I must do that to place the sphere on the fbx object ?


const nodes = useFBX("/example.fbx");

...
return(
<Sampler
      // weight={"position"} // the name of the attribute to be used as sampling weight
      transform={transformInstance} // a function that transforms each instance given a sample. See the examples for more.
      count={16} // Number of samples
    >
<mesh>
<primitive object={nodes} scale={0.1} />
</mesh>
<mesh>
        <sphereGeometry args={[1]} />
        <meshStandardMaterial color="blue" wireframe />
      </mesh>
</Sampler>

For future readers, the discussion continues here: