MCPcopy Create free account
hub / github.com/melonjs/melonJS / setRegion

Method setRegion

packages/melonjs/src/renderable/sprite3d.js:486–489  ·  view source on GitHub ↗

* Apply a texture region directly (see Sprite#setRegion). * @param {object} region - typically from `texture.getRegion(name)` * @returns {Sprite3d} Reference to this object for method chaining

(region)

Source from the content-addressed store, hash-verified

484 * @returns {Sprite3d} Reference to this object for method chaining
485 */
486 setRegion(region) {
487 this._frameAnim.setRegion(region);
488 return this;
489 }
490
491 /**
492 * @param {string} name - animation id

Callers 1

constructorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected