public copy()

in packages/sdk/src/animation/animation.ts [336:357]


	public copy(patch: Partial<AnimationLike>): this {
		if (!patch) { return this; }
		this.internal.observing = false;
		if (patch.name !== undefined) { this.name = patch.name; }
		if (patch.wrapMode) { this.wrapMode = patch.wrapMode; }
		if (patch.speed !== undefined) { this.speed = patch.speed; }
		if (patch.isPlaying !== undefined) { this.isPlaying = patch.isPlaying; }
		if (patch.weight !== undefined) { this.weight = patch.weight; }
		if (patch.basisTime !== undefined) { this.basisTime = patch.basisTime; }
		if (patch.time !== undefined) { this.time = patch.time; }

		if (patch.dataId) { this._dataId = patch.dataId as Guid; }
		if (patch.targetIds) { this._targetIds = [...patch.targetIds]; }
		if (patch.duration !== undefined) { this._duration = patch.duration; }
		this.internal.observing = true;

		if (patch.weight === 0 && this._finished) {
			this._finished.resolve();
		}

		return this;
	}