How to change texture uniform in NodeMaterial?

@sunag Sir, help plz~~!

I have a custom node material like:

class CustomMaterial extends MeshStandardNodeMaterial {
    constructor(parameters = {}) {
        const {diffuseMap, params} = parameters;
        this.type = 'CustomMaterial';

        this.diffuseMap = uniform(new TextureLoader().load(’a.jpg'))); 
        this.colorNode = texture(this.diffuseMap.value, vec2(_uvx, _uvy));

when start up with material = new CustomMateril(),it works. However, I want to dynamic modify the texture ( or other uniforms ) like

material.diffuseMap.value = texture;
material.needsUpdate = true;
material.uniformsNeedUpdate = true;

but none of above works.

What should I do, how should I dynamic modify the uniforms correctly? For example, how to add a get texture() {} function or something like that.

texture() is already a uniform, ideally that would be it:

const map = new TextureLoader().load(’a.jpg'); 
this.colorNode = texture(map, vec2(_uvx, _uvy));

and this for update:

material.colorNode.value = newMap;