Skip to content

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

@Vinc3r

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
        }
    }]);
});

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions