threejs-worldgen
    Preparing search index...

    Interface MPMMaterialContext

    What a material's GPU hooks see of one particle (TSL nodes). Matrices are mat3 nodes. Note TSL's matrix–scalar operators: M.mul(s) and M.add(N) are fine, but M.sub(s) and M.div(s) are not (write M.mul(s.reciprocal()), build mpmIdentity() for I).

    interface MPMMaterialContext {
        C: any;
        dt: any;
        F: any;
        J: any;
        Jp: any;
        params: Record<string, any>;
        temperature: any;
    }
    Index
    C: any

    APIC affine matrix C ≈ ∇v, the velocity gradient (mat3; for viscosity).

    dt: any

    Substep, seconds (float).

    F: any

    Elastic deformation gradient F (mat3).

    J: any

    det F (float).

    Jp: any

    Plastic volume ratio Jp (float; 1 for materials without plasticity).

    params: Record<string, any>

    The material's parameters as float uniforms, by name (live through MPMSolver.set).

    temperature: any

    Per-particle temperature, kelvin (float; the particle pool's props.x).