diff --git a/cocos/2d/assembler/utils.ts b/cocos/2d/assembler/utils.ts
index 45528d8372..4434a384da 100644
--- a/cocos/2d/assembler/utils.ts
+++ b/cocos/2d/assembler/utils.ts
@@ -79,7 +79,7 @@ export function fillMeshVertices3D (node: Node, renderer: IBatcher, renderData:
}
export function updateOpacity (renderData: RenderData, opacity: number): void {
- if(!renderData.chunk) {
+ if (!renderData.chunk) {
// When the allocation of chunk in StaticVBAccessor fails (when the allocated buffer is too large), chunk will be null.
return;
}
diff --git a/cocos/2d/renderer/mesh-buffer.ts b/cocos/2d/renderer/mesh-buffer.ts
index 6800dcb907..b1735f7549 100644
--- a/cocos/2d/renderer/mesh-buffer.ts
+++ b/cocos/2d/renderer/mesh-buffer.ts
@@ -251,7 +251,7 @@ export class MeshBuffer {
this.floatsPerVertex = getAttributeStride(attrs) >> 2;
- var vDataCountLimit = 65536; // 2^16 - 1
+ let vDataCountLimit = 65536; // 2^16 - 1
const glApi = device.gfxAPI;
if (glApi === API.WEBGPU || glApi === API.WEBGL2 || glApi === API.WEBGL && device.hasFeature(Feature.ELEMENT_INDEX_UINT)) {
vDataCountLimit = 4294967295; // 2^32 - 1
diff --git a/cocos/3d/skeletal-animation/limits.ts b/cocos/3d/skeletal-animation/limits.ts
index 04c066a249..d7aa553bd0 100644
--- a/cocos/3d/skeletal-animation/limits.ts
+++ b/cocos/3d/skeletal-animation/limits.ts
@@ -22,5 +22,4 @@
THE SOFTWARE.
*/
-
export const MAX_ANIMATION_LAYER = 32;
diff --git a/cocos/3d/skeletal-animation/skeletal-animation-blending.ts b/cocos/3d/skeletal-animation/skeletal-animation-blending.ts
index 8915136200..756fc491b0 100644
--- a/cocos/3d/skeletal-animation/skeletal-animation-blending.ts
+++ b/cocos/3d/skeletal-animation/skeletal-animation-blending.ts
@@ -53,8 +53,7 @@ export abstract class BlendStateBuffer<
this.deRef(internal.node, internal.property);
}
- public ref
(node: Node, property: P): PropertyBlendStateTypeMap, PropertyBlendState>[P]
- {
+ public ref (node: Node, property: P): PropertyBlendStateTypeMap, PropertyBlendState>[P] {
let nodeBlendState = this._nodeBlendStates.get(node);
if (!nodeBlendState) {
nodeBlendState = this.createNodeBlendState();
@@ -211,9 +210,7 @@ abstract class NodeBlendState (
- node: Node, property: BlendingPropertyName,
- ): NodeBlendState['_properties'][P] {
+ public refProperty (node: Node, property: BlendingPropertyName): NodeBlendState['_properties'][P] {
const { _properties: properties } = this;
let propertyBlendState: TVec3PropertyBlendState | TQuatPropertyBlendState;
switch (property) {
diff --git a/cocos/animation/animation-curve.ts b/cocos/animation/animation-curve.ts
index b1c4aaa2ed..a4b31fa2b9 100644
--- a/cocos/animation/animation-curve.ts
+++ b/cocos/animation/animation-curve.ts
@@ -246,9 +246,7 @@ export function sampleAnimationCurve (curve: AnimCurve, sampler: RatioSampler, r
index = sampler.ratios.length - 1;
} else {
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
- return curve.valueBetween(
- ratio, index - 1, sampler.ratios[index - 1], index, sampler.ratios[index],
- );
+ return curve.valueBetween(ratio, index - 1, sampler.ratios[index - 1], index, sampler.ratios[index]);
}
}
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
diff --git a/cocos/animation/core/pose.ts b/cocos/animation/core/pose.ts
index 1142005be6..4e5fcd1157 100644
--- a/cocos/animation/core/pose.ts
+++ b/cocos/animation/core/pose.ts
@@ -211,9 +211,7 @@ const applyDeltaTransformArrayAt = ((): ApplyDeltaTransformArrayAtFunc => {
};
})();
-export function applyDeltaTransforms (
- target: TransformArray, delta: TransformArray, alpha: number, transformFilter: TransformFilter | undefined = undefined,
-): void {
+export function applyDeltaTransforms (target: TransformArray, delta: TransformArray, alpha: number, transformFilter: TransformFilter | undefined = undefined): void {
const nTransforms = target.length;
assertIsTrue(nTransforms === delta.length);
if (!transformFilter) {
diff --git a/cocos/animation/core/transform.ts b/cocos/animation/core/transform.ts
index fc05acd385..b3613566e5 100644
--- a/cocos/animation/core/transform.ts
+++ b/cocos/animation/core/transform.ts
@@ -72,7 +72,7 @@ export class Transform {
&& Vec3.equals(a._scale, b._scale, epsilon);
}
- public static strictEquals (a: ReadonlyTransform, b: ReadonlyTransform):boolean {
+ public static strictEquals (a: ReadonlyTransform, b: ReadonlyTransform): boolean {
return Vec3.strictEquals(a._position, b._position)
&& Quat.strictEquals(a._rotation, b._rotation)
&& Vec3.strictEquals(a._scale, b._scale);
diff --git a/cocos/animation/cubic-spline-value.ts b/cocos/animation/cubic-spline-value.ts
index b1f496031e..bd9a564e64 100644
--- a/cocos/animation/cubic-spline-value.ts
+++ b/cocos/animation/cubic-spline-value.ts
@@ -65,7 +65,7 @@ function makeCubicSplineValueConstructor (
this.outTangent = outTangent || new ConstructorX();
}
- public lerp (to: CubicSplineValueClass, t: number, dt: number):T {
+ public lerp (to: CubicSplineValueClass, t: number, dt: number): T {
const p0 = this.dataPoint;
const p1 = to.dataPoint;
// dt => t_k+1 - t_k
@@ -106,9 +106,7 @@ function makeCubicSplineValueConstructor (
/**
* @deprecated since v3.5.0, this is an engine private interface that will be removed in the future.
*/
-export const CubicSplineVec2Value = makeCubicSplineValueConstructor(
- 'cc.CubicSplineVec2Value', Vec2, Vec2.multiplyScalar, Vec2.scaleAndAdd,
-);
+export const CubicSplineVec2Value = makeCubicSplineValueConstructor('cc.CubicSplineVec2Value', Vec2, Vec2.multiplyScalar, Vec2.scaleAndAdd);
/**
* @deprecated since v3.5.0, this is an engine private interface that will be removed in the future.
@@ -118,9 +116,7 @@ export type CubicSplineVec2Value = ICubicSplineValue;
/**
* @deprecated since v3.5.0, this is an engine private interface that will be removed in the future.
*/
-export const CubicSplineVec3Value = makeCubicSplineValueConstructor(
- 'cc.CubicSplineVec3Value', Vec3, Vec3.multiplyScalar, Vec3.scaleAndAdd,
-);
+export const CubicSplineVec3Value = makeCubicSplineValueConstructor('cc.CubicSplineVec3Value', Vec3, Vec3.multiplyScalar, Vec3.scaleAndAdd);
/**
* @deprecated since v3.5.0, this is an engine private interface that will be removed in the future.
@@ -130,9 +126,7 @@ export type CubicSplineVec3Value = ICubicSplineValue;
/**
* @deprecated since v3.5.0, this is an engine private interface that will be removed in the future.
*/
-export const CubicSplineVec4Value = makeCubicSplineValueConstructor(
- 'cc.CubicSplineVec4Value', Vec4, Vec4.multiplyScalar, Vec4.scaleAndAdd,
-);
+export const CubicSplineVec4Value = makeCubicSplineValueConstructor('cc.CubicSplineVec4Value', Vec4, Vec4.multiplyScalar, Vec4.scaleAndAdd);
/**
* @deprecated since v3.5.0, this is an engine private interface that will be removed in the future.
@@ -142,9 +136,7 @@ export type CubicSplineVec4Value = ICubicSplineValue;
/**
* @deprecated since v3.5.0, this is an engine private interface that will be removed in the future.
*/
-export const CubicSplineQuatValue = makeCubicSplineValueConstructor(
- 'cc.CubicSplineQuatValue', Quat, Quat.multiplyScalar, Quat.scaleAndAdd,
-);
+export const CubicSplineQuatValue = makeCubicSplineValueConstructor('cc.CubicSplineQuatValue', Quat, Quat.multiplyScalar, Quat.scaleAndAdd);
/**
* @deprecated since v3.5.0, this is an engine private interface that will be removed in the future.
diff --git a/cocos/animation/exotic-animation/exotic-animation.ts b/cocos/animation/exotic-animation/exotic-animation.ts
index 804844cee3..1cf236c54a 100644
--- a/cocos/animation/exotic-animation/exotic-animation.ts
+++ b/cocos/animation/exotic-animation/exotic-animation.ts
@@ -625,19 +625,13 @@ class ExoticNodeAnimationEvaluator {
binder: Binder,
) {
if (position) {
- this._position = createExoticTrackEvaluationRecord(
- position.times, position.values, Vec3, path, 'position', binder,
- );
+ this._position = createExoticTrackEvaluationRecord(position.times, position.values, Vec3, path, 'position', binder);
}
if (rotation) {
- this._rotation = createExoticTrackEvaluationRecord(
- rotation.times, rotation.values, Quat, path, 'rotation', binder,
- );
+ this._rotation = createExoticTrackEvaluationRecord(rotation.times, rotation.values, Quat, path, 'rotation', binder);
}
if (scale) {
- this._scale = createExoticTrackEvaluationRecord(
- scale.times, scale.values, Vec3, path, 'scale', binder,
- );
+ this._scale = createExoticTrackEvaluationRecord(scale.times, scale.values, Vec3, path, 'scale', binder);
}
}
diff --git a/cocos/animation/marionette/animation-graph.ts b/cocos/animation/marionette/animation-graph.ts
index f217556839..6616a229dc 100644
--- a/cocos/animation/marionette/animation-graph.ts
+++ b/cocos/animation/marionette/animation-graph.ts
@@ -938,9 +938,7 @@ export class AnimationGraph extends AnimationGraphLike implements AnimationGraph
* @param type The variable's type.
* @param initialValue Initial value.
*/
- public addVariable (
- name: string, type: TVariableType, initialValue?: VariableTypeValueTypeMap[TVariableType],
- ): VariableDescription {
+ public addVariable (name: string, type: TVariableType, initialValue?: VariableTypeValueTypeMap[TVariableType]): VariableDescription {
const variable = createVariable(type, initialValue);
this._variables[name] = variable;
return variable;
diff --git a/cocos/animation/marionette/asset-creation.ts b/cocos/animation/marionette/asset-creation.ts
index 89da5dae2b..1b2c681ec9 100644
--- a/cocos/animation/marionette/asset-creation.ts
+++ b/cocos/animation/marionette/asset-creation.ts
@@ -43,6 +43,5 @@ export { AnimationGraphVariant } from './animation-graph-variant';
export type { PoseGraph } from './pose-graph/pose-graph';
-export * from './pose-graph/op/index'
+export * from './pose-graph/op/index';
export type { EnterNodeInfo } from './pose-graph/foundation/authoring/enter-node-info';
-
diff --git a/cocos/animation/marionette/pose-graph/op/internal.ts b/cocos/animation/marionette/pose-graph/op/internal.ts
index 75af4e5a80..bfcece237d 100644
--- a/cocos/animation/marionette/pose-graph/op/internal.ts
+++ b/cocos/animation/marionette/pose-graph/op/internal.ts
@@ -80,7 +80,7 @@ export const getOutputKeys = (() => {
};
})();
-export function getOutputType(node: PoseGraphNode, outputId: OutputKey) {
+export function getOutputType (node: PoseGraphNode, outputId: OutputKey) {
if (node instanceof PoseNode) {
return PoseGraphType.POSE;
} else if (node instanceof PureValueNode) {
@@ -109,7 +109,7 @@ export function connectNode (graph: PoseGraph, node: PoseGraphNode, key: PoseGra
return;
}
- let outputIndex = 0;
+ const outputIndex = 0;
let outputType: PoseGraphType;
if (producer instanceof PureValueNode) {
if (typeof outputKey !== 'number') {
@@ -129,7 +129,7 @@ export function connectNode (graph: PoseGraph, node: PoseGraphNode, key: PoseGra
}
outputType = PoseGraphType.POSE;
}
-
+
const inputType = inputMetadata.type;
if (inputType !== outputType) {
error(`Type mismatch: input has type ${PoseGraphType[inputType]}, output has type ${PoseGraphType[outputType]}.`);
@@ -167,7 +167,7 @@ export function disconnectNode (graph: PoseGraph, node: PoseGraphNode, key: Pose
graph.getShell(node)?.deleteBinding(key);
}
-export function connectOutputNode(graph: PoseGraph, producer: PoseNode) {
+export function connectOutputNode (graph: PoseGraph, producer: PoseNode) {
const { outputNode } = graph;
const outputNodeInputKeys = getInputKeys(outputNode);
assertIsTrue(outputNodeInputKeys.length === 1);
@@ -192,7 +192,7 @@ function getPureValueInputConstantValue (node: PoseGraphNode, inputKey: PoseGrap
const [
propertyKey,
elementIndex = -1,
- ] = inputKey;
+ ] = inputKey;
const property = node[propertyKey];
if (!Array.isArray(property)) {
return property;
@@ -203,7 +203,7 @@ function getPureValueInputConstantValue (node: PoseGraphNode, inputKey: PoseGrap
return property[elementIndex];
}
-export function isWellFormedInputKey(test: unknown): test is PoseGraphInputKey {
+export function isWellFormedInputKey (test: unknown): test is PoseGraphInputKey {
if (!Array.isArray(test)) {
return false;
}
diff --git a/cocos/animation/marionette/pose-graph/pose-node.ts b/cocos/animation/marionette/pose-graph/pose-node.ts
index 4dd82a19c2..f5d73ffcbf 100644
--- a/cocos/animation/marionette/pose-graph/pose-node.ts
+++ b/cocos/animation/marionette/pose-graph/pose-node.ts
@@ -94,12 +94,16 @@ export abstract class PoseNode extends PoseGraphNode {
if (POSE_NODE_EVALUATION_STACK_ORDER_DEBUG_ENABLED) {
// The stack should certainly increase 1.
- assertIsTrue(context._stackSize_debugging === stackSizeBefore + 1,
- `PoseNode.doEvaluate() should certainly push a pose node onto the stack and return it.`);
+ assertIsTrue(
+ context._stackSize_debugging === stackSizeBefore + 1,
+ `PoseNode.doEvaluate() should certainly push a pose node onto the stack and return it.`,
+ );
// The returned pose should be the increased pose, that's,
// can not return a already-popped pose.
- assertIsTrue(context._isStackTopPose_debugging(pose),
- `PoseNode.doEvaluate() should certainly push a pose node onto the stack and return it.`);
+ assertIsTrue(
+ context._isStackTopPose_debugging(pose),
+ `PoseNode.doEvaluate() should certainly push a pose node onto the stack and return it.`,
+ );
}
const currentSpace = pose._poseTransformSpace;
diff --git a/cocos/animation/marionette/pose-graph/pose-nodes/choose-pose/choose-pose-base.ts b/cocos/animation/marionette/pose-graph/pose-nodes/choose-pose/choose-pose-base.ts
index 7308d4f19a..5b4d02a349 100644
--- a/cocos/animation/marionette/pose-graph/pose-nodes/choose-pose/choose-pose-base.ts
+++ b/cocos/animation/marionette/pose-graph/pose-nodes/choose-pose/choose-pose-base.ts
@@ -270,9 +270,7 @@ class EvaluationRecord {
const item = items[iPose];
// Reset starting weight as current weight.
// Don't use `item.weight` since it's absolute weight.
- item.selfSourceWeight = lerp(
- item.selfSourceWeight, item.selfTargetWeight, oldUniformTransitionRatio,
- );
+ item.selfSourceWeight = lerp(item.selfSourceWeight, item.selfTargetWeight, oldUniformTransitionRatio);
if (iPose === newChoseIndex) {
item.selfTargetWeight = 1.0;
} else {
diff --git a/cocos/animation/marionette/pose-graph/pose-nodes/ik/solve-two-bone-ik.ts b/cocos/animation/marionette/pose-graph/pose-nodes/ik/solve-two-bone-ik.ts
index f0d1825b05..9c6b703b26 100644
--- a/cocos/animation/marionette/pose-graph/pose-nodes/ik/solve-two-bone-ik.ts
+++ b/cocos/animation/marionette/pose-graph/pose-nodes/ik/solve-two-bone-ik.ts
@@ -59,8 +59,10 @@ export const solveTwoBoneIK = ((): (root: Transform, middle: Transform, end: Tra
const cacheVec3_2 = new Vec3();
return (
out: Quat,
- sourceOrigin: Readonly, sourceDestination: Readonly,
- targetOrigin: Readonly, targetDestination: Readonly,
+ sourceOrigin: Readonly,
+ sourceDestination: Readonly,
+ targetOrigin: Readonly,
+ targetDestination: Readonly,
// eslint-disable-next-line arrow-body-style
): Quat => {
return Quat.rotationTo(
@@ -106,16 +108,20 @@ export const solveTwoBoneIK = ((): (root: Transform, middle: Transform, end: Tra
const qA = calculateRotationBetweenRays(
cacheQuat,
- pA, pB,
- pA, bSolved,
+ pA,
+ pB,
+ pA,
+ bSolved,
);
Quat.multiply(qA, qA, root.rotation);
root.rotation = qA;
const qB = calculateRotationBetweenRays(
cacheQuat,
- pB, pC,
- bSolved, cSolved,
+ pB,
+ pC,
+ bSolved,
+ cSolved,
);
Quat.multiply(qB, qB, middle.rotation);
middle.rotation = qB;
diff --git a/cocos/animation/marionette/pose-graph/pose-nodes/ik/two-bone-ik-debugger.ts b/cocos/animation/marionette/pose-graph/pose-nodes/ik/two-bone-ik-debugger.ts
index 96c6d07c71..0c02ea5524 100644
--- a/cocos/animation/marionette/pose-graph/pose-nodes/ik/two-bone-ik-debugger.ts
+++ b/cocos/animation/marionette/pose-graph/pose-nodes/ik/two-bone-ik-debugger.ts
@@ -62,7 +62,9 @@ const debuggerMap = new WeakMap