qc.Node.snapshotAsAtlas

Prototype

  • qc.Atlas snapshotAsAtlas(string key, qc.Rectangle srcBounds, number dstWidth, number dstHeight, number resolution)

Parameters

Parameter Type Description
key string Atlas key.
srcBounds qc.Rectangle Source's bound for snapshot, current node's bound by default.
dstWidth number Target's width, value is srcBounds.width by default.
dstHeight number Target's height, value is srcBounds.height by default.
resolution number World's resolution by default.

Description

Snapshot node, return qc.Atlas object.

Example

    node.snapshotAsAtlas('snapshot001');

    img.texture = this.game.assets.find('snapshot001')