toJson method
Implementation
Map<String, Object?> toJson({bool includeSource = false}) => {
'backend': backend.name,
'stage': stage.name,
'entrypoint': entrypoint,
'inputs': [for (final input in inputs) input.toJson()],
'uniformBlocks': [for (final block in uniformBlocks) block.toJson()],
'textures': [for (final texture in textures) texture.toJson()],
'sourceBytes': source.bytes.length,
if (includeSource) 'source': source.text ?? base64Encode(source.bytes),
};