Skip to content

low priority: explain how to send a texture as js variable into a _r.patch #15

Description

@Vinc3r

just use function(){return texture}:

_r.load.texture("lightmap.jpg", {
    coordinatesIndex: 1
}).then(function (texture) {
    _r.patch([{
        "*name*:material": {
            "lightmapTexture": function(){return texture},
            "useLightmapAsShadowmap": true
        }
    }]);
});

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions