Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V3.8.1 #15862

Closed
wants to merge 51 commits into from
Closed

V3.8.1 #15862

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
c10a724
add back WASM_FALLBACK constant (#15758)
PPpro Jul 18, 2023
ec88dc5
fix invalid punctual lights for custom pipeline (#15759)
troublemaker52025 Jul 18, 2023
81ab041
fix spine opacity failure. (#15765)
Canvasfull Jul 18, 2023
0b910aa
fix setDebugMode on JSB mode. (#15769)
Canvasfull Jul 19, 2023
41304cf
fix setter for node.siblingIndex (#15776)
PatriceJiang Jul 19, 2023
6aba5f8
[fix] physics3d native cct api error (#15779)
lealzhan Jul 19, 2023
9ce02b5
use boost-bcp to reduce external size (#15770)
PatriceJiang Jul 20, 2023
ebbba60
Fix videoplayer status after pause&finish (#15782)
mmyduckx Jul 20, 2023
6d666d2
Fix the problem of incorrect screen resolution after resize. (#15785)
qiuguohua Jul 20, 2023
9cffcaa
add multi-layers lighting model and fix direct specular (#15778)
jk20012001 Jul 20, 2023
d83d2ac
fix reflection probe type for skin and instancing (#15789)
xubing0906 Jul 20, 2023
aacc0d7
add help for reflection probe and rename Fxaa (#15790)
xubing0906 Jul 21, 2023
775b794
Fix clip visiting in animation controller; fix typo (#15791)
shrinktofit Jul 21, 2023
3ca7d08
Animation components localization (#15701)
shrinktofit Jul 21, 2023
72db332
add light probe group help (#15797)
stanleyljl Jul 21, 2023
acab20f
fix multi touch cause crash on Android platform (#15796)
bofeng-song Jul 24, 2023
0695573
sky effect support blend and fog (#15801)
jk20012001 Jul 25, 2023
d97d3c6
add global post settings (#15558)
xubing0906 Jul 25, 2023
32245a2
fix : node._instantiate has different behavior in native scene (#15816)
dogeFu Jul 25, 2023
381505c
Merge remote-tracking branch 'cocos-for-editor/v3.8.0' into v3.8.1
pandamicro Jul 25, 2023
b6bcc12
Solve unchecked websocket link failure issue (#15799)
qiuguohua Jul 26, 2023
31342c4
Update editable.ts (#15820)
shrinktofit Jul 26, 2023
b9c259e
add shader functions (#15814)
jk20012001 Jul 26, 2023
2e2b7ec
fixed fsr input/output size (#15798)
2youyou2 Jul 26, 2023
e8e704c
fixed fsr/fxaa alpha (#15800)
2youyou2 Jul 26, 2023
41a16d7
Fix ci
pandamicro Jul 26, 2023
546b362
Fix circular dependencies
pandamicro Jul 26, 2023
e0bfd7e
Fix DS_Store ignore in tempaltes
pandamicro Jul 26, 2023
6142245
Fix circular dependencies
pandamicro Jul 26, 2023
6661292
Merge pull request #15818 from pandamicro/v3.8.1
pandamicro Jul 26, 2023
0d4e549
[Bug] fix widget undo bug (#15741)
arsen2010 Jul 26, 2023
a9ffcad
[Bug] when editor change language,update fbx editing interface (#15762)
arsen2010 Jul 26, 2023
30061b1
reflectionprobe manager add function for users (#15824)
xubing0906 Jul 26, 2023
cd90419
fix editing fbx animation events interface bug (#15718)
arsen2010 Jul 26, 2023
f20bf8c
init reflection probe id with native engine (#15829)
xubing0906 Jul 28, 2023
44795e4
Workflow: fix interface check workflow comment (#15795)
shrinktofit Jul 31, 2023
75add41
fix: asm.js subpackage without spine module (#15822)
PPpro Jul 31, 2023
da25afc
Modify compileType's default value to minigame (#15815)
bofeng-song Jul 31, 2023
715d5d1
fixed scene._instantiate on native platforms. (#15771)
dumganhar Jul 31, 2023
45926d2
fix shader lighting flow (#15833)
jk20012001 Jul 31, 2023
d73096a
Fix the problem of noise when playing web audio for more than 5 minut…
bofeng-song Jul 31, 2023
7487260
Eslint: fix indent rule for decorators (#15735)
shrinktofit Jul 31, 2023
762fd50
Eslint: off default-case-last (#15733)
shrinktofit Jul 31, 2023
95cd245
ESLint: replace no-empty-function with typescript version (#15732)
shrinktofit Jul 31, 2023
54c8141
refactor : call safeMeasureText when needed (#15754)
dogeFu Jul 31, 2023
4a2f290
Fix audio can not be paused & resume on mini game platform (#15811)
bofeng-song Aug 1, 2023
22388ba
The Taobao platform has improved the implementation of innerAudioCont…
bofeng-song Aug 1, 2023
5eddce9
PoseGraph: support editor decorators on node inputs (#15819)
shrinktofit Aug 1, 2023
06341f3
Uncapture global mouse events. (#15834)
qiuguohua Aug 2, 2023
326ba66
implement some wechat splashScreen features (#15827)
mmyduckx Aug 2, 2023
3c6a849
fix some bugs for cyberpunk demo on OH platform (#15846)
PPpro Aug 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ rules:
quotes: [warn, single, { allowTemplateLiterals: true }] # force single, but allow template literal
no-else-return: off # else-return is a common pattern which clearly expresses the control flow
no-unused-expressions: off # taken over by '@typescript-eslint/no-unused-expressions'
no-empty-function: off # taken over by '@typescript-eslint/no-empty-function'

##### AIRBNB-SPECIFIC RULE OVERRIDES #####

Expand All @@ -70,7 +71,14 @@ rules:
import/extensions: off # typescript doesn't support this
import/no-unresolved: off # TODO: fix internal modules
import/prefer-default-export: off # prefer named exports
indent: off # use @typescript-eslint/indent instead for better compatibility
indent: [error, 4, {
SwitchCase: 0,
ignoredNodes: [ # https://stackoverflow.com/a/72897089
"FunctionExpression > .params[decorators.length > 0]",
"FunctionExpression > .params > :matches(Decorator, :not(:first-child))",
"ClassBody.body > PropertyDefinition[decorators.length > 0] > .key",
]
}]

lines-between-class-members: off # be more lenient on member declarations
max-classes-per-file: off # helper classes are common
Expand All @@ -94,6 +102,7 @@ rules:
prefer-destructuring: off # auto-fix is not smart enough to merge different instances
linebreak-style: off # we don't enforce this on everyone's dev environment for now
spaced-comment: off # for license declarations
default-case-last: off # Place default case clause to first make it more clear that this switch statement has handled all cases

##### TYPESCRIPT-SPECIFIC RULE OVERRIDES #####

Expand All @@ -103,9 +112,6 @@ rules:
'ts-nocheck': true,
'ts-check': false,
}]
'@typescript-eslint/indent': [warn, 4, {
SwitchCase: 0
}]
'@typescript-eslint/no-unused-expressions': warn

# TODO: this is just too much work
Expand All @@ -121,7 +127,16 @@ rules:

'@typescript-eslint/unbound-method': off # we exploit prototype methods sometimes to acheive better performace
'@typescript-eslint/no-explicit-any': off # still relevant for some heavily templated usages
'@typescript-eslint/no-empty-function': off # may become useful in some parent classes

'@typescript-eslint/no-empty-function': [error, {
allow: [
private-constructors,
protected-constructors,
decoratedFunctions,
overrideMethods,
]
}]

'@typescript-eslint/no-unused-vars': off # may become useful in some parent classes
'@typescript-eslint/no-non-null-assertion': off # sometimes we just know better than the compiler
'@typescript-eslint/no-namespace': [warn, { # we need to declare static properties
Expand Down
23 changes: 19 additions & 4 deletions .github/workflows/web-interface-check-pr-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,29 @@ jobs:
if: github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
steps:
- name: Download artifacts
- name: 'Get source run informations'
uses: potiuk/get-workflow-origin@v1_1
id: source_run_info
with:
token: ${{ secrets.GITHUB_TOKEN }}
sourceRunId: ${{ github.event.workflow_run.id }}

- name: 'Debug'
run: |
Write-Host "Source PR Number: ${{ github.event.workflow_run.pull_requests[0].number }}"
shell: pwsh

- name: Download artifacts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RUN_ID: ${{ github.event.workflow_run.id }}
run: |
gh run download -R "${{ github.repository }}" --name "interface-diff.txt" "$RUN_ID"
gh run download -R "${{ github.repository }}" --name "interface-diff.txt" "$RUN_ID"
- name: Post interface-diff.txt as comment
uses: marocchino/sticky-pull-request-comment@v2
with:
path: interface-diff.txt
number: ${{ github.event.workflow_run.pull_requests[0].number }}
path: interface-diff.txt
number: ${{ steps.source_run_info.outputs.pullRequestNumber }}
# The following matters, see: https://github.com/orgs/community/discussions/25220
# number: ${{ github.event.workflow_run.pull_requests[0].number }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ native/external/

scripts/typedoc-plugin/lib/
!templates/**/*
templates/**/.DS_Store

@types/consts.d.ts

Expand Down
6 changes: 6 additions & 0 deletions cc.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,12 @@
"value": false,
"internal": true
},
"WASM_FALLBACK": {
"comment": "An internal constant to indicate whether need a fallback of wasm.\nIf true, we build a wasm fallback module for the compatibility of wasm files compiled by different version of emscripten.\nThis is useful when we use wasm on different version of Safari browsers.",
"type": "boolean",
"value": "$HTML5",
"internal": true
},
"WASM_SUBPACKAGE": {
"comment": "An internal constant to indicate whether we use wasm assets as minigame subpackage.\nThis is useful when we need to reduce code size.",
"type": "boolean",
Expand Down
8 changes: 7 additions & 1 deletion cocos/2d/components/ui-opacity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/

import { ccclass, disallowMultiple, editable, executeInEditMode, executionOrder, help, menu, serializable, tooltip } from 'cc.decorator';
import { JSB } from 'internal:constants';
import { EDITOR_NOT_IN_PREVIEW, JSB } from 'internal:constants';
import { Component } from '../../scene-graph/component';
import { misc } from '../../core';
import { UIRenderer } from '../framework/ui-renderer';
Expand Down Expand Up @@ -67,6 +67,12 @@ export class UIOpacity extends Component {
this.node._uiProps.localOpacity = value / 255;

this.setEntityLocalOpacityDirtyRecursively(true);

if (EDITOR_NOT_IN_PREVIEW) {
setTimeout(() => {
EditorExtends.Node.emit('change', this.node.uuid, this.node);
}, 200);
}
}

private setEntityLocalOpacityDirtyRecursively (dirty: boolean): void {
Expand Down
2 changes: 1 addition & 1 deletion cocos/2d/utils/font-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ export function loadFont (url: string, options: Record<string, any>, onComplete:

// Default width reference to test whether new font is loaded correctly
const fontDesc = `40px ${fontFamilyName}`;
const refWidth = safeMeasureText(_canvasContext!, _testString, fontDesc);

// Setup font face style
const fontStyle = ccdocument.createElement('style');
Expand Down Expand Up @@ -195,6 +194,7 @@ export function loadFont (url: string, options: Record<string, any>, onComplete:
if (useNativeCheck()) {
nativeCheckFontLoaded(Date.now(), fontFamilyName, onComplete);
} else {
const refWidth = safeMeasureText(_canvasContext!, _testString, fontDesc);
// Save loading font
const fontLoadHandle = {
fontFamilyName,
Expand Down
8 changes: 7 additions & 1 deletion cocos/3d/framework/mesh-renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -902,10 +902,11 @@ export class MeshRenderer extends ModelRenderer {
// because the lighting map will influence the model's shader
this._model.initLightingmap(this.bakeSettings.texture, this.bakeSettings.uvParam);
this._updateUseLightProbe();
this._updateUseReflectionProbe();
this._updateUseReflectionProbeType();
this._updateModelParams();
this._onUpdateLightingmap();
this._onUpdateLocalShadowBiasAndProbeId();
this._updateUseReflectionProbe();
this._updateReceiveDirLight();
this._onUpdateReflectionProbeDataMap();
this._onUpdateLocalReflectionProbeData();
Expand Down Expand Up @@ -1186,6 +1187,11 @@ export class MeshRenderer extends ModelRenderer {
this._updateReflectionProbeTexture();
}

protected _updateUseReflectionProbeType (): void {
if (!this._model) return;
this._model.reflectionProbeType = this.bakeSettings.reflectionProbe;
}

protected _updateBakeToReflectionProbe (): void {
if (!this._model) { return; }
this._model.bakeToReflectionProbe = this.bakeSettings.bakeToReflectionProbe;
Expand Down
21 changes: 12 additions & 9 deletions cocos/3d/reflection-probe/reflection-probe-component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
import { ccclass, executeInEditMode, menu, playOnFocus, serializable, tooltip, type, visible } from 'cc.decorator';
import { ccclass, executeInEditMode, help, menu, playOnFocus, serializable, tooltip, type, visible } from 'cc.decorator';
import { EDITOR, EDITOR_NOT_IN_PREVIEW } from 'internal:constants';
import { CCBoolean, CCObject, Color, Enum, Vec3, warn } from '../../core';

Expand Down Expand Up @@ -62,6 +62,7 @@ export enum ProbeResolution {
@menu('Rendering/ReflectionProbe')
@executeInEditMode
@playOnFocus
@help('i18n:cc.ReflectionProbe')
export class ReflectionProbe extends Component {
protected static readonly DEFAULT_CUBE_SIZE: Readonly<Vec3> = new Vec3(1, 1, 1);
protected static readonly DEFAULT_PLANER_SIZE: Readonly<Vec3> = new Vec3(5, 0.5, 5);
Expand Down Expand Up @@ -325,12 +326,14 @@ export class ReflectionProbe extends Component {
ReflectionProbeManager.probeManager.onUpdateProbes(true);
this._probe.enable();
}
this.node.on(Node.EventType.TRANSFORM_CHANGED, this._onProbeTransformChanged, this);
}
onDisable (): void {
if (this._probe) {
ReflectionProbeManager.probeManager.unregister(this._probe);
this._probe.disable();
}
this.node.off(Node.EventType.TRANSFORM_CHANGED, this._onProbeTransformChanged);
}

public start (): void {
Expand Down Expand Up @@ -362,14 +365,6 @@ export class ReflectionProbe extends Component {
}
}
}

if (this.node.hasChangedFlags) {
this.probe.updateBoundingBox();
}
if (this.node.hasChangedFlags & TransformBit.POSITION) {
ReflectionProbeManager.probeManager.onUpdateProbes(true);
ReflectionProbeManager.probeManager.updateProbeData();
}
}
if (this.probeType === ProbeType.PLANAR && this.sourceCamera) {
if ((this.sourceCamera.node.hasChangedFlags & TransformBit.TRS)
Expand All @@ -390,6 +385,14 @@ export class ReflectionProbe extends Component {
ReflectionProbeManager.probeManager.updatePreviewSphere(this.probe);
}

private _onProbeTransformChanged (type: TransformBit): void {
this.probe.updateBoundingBox();
if (type & Node.TransformBit.POSITION) {
ReflectionProbeManager.probeManager.onUpdateProbes(true);
ReflectionProbeManager.probeManager.updateProbeData();
}
}

private _createProbe (): void {
if (this._probeId === -1 || ReflectionProbeManager.probeManager.exists(this._probeId)) {
this._probeId = ReflectionProbeManager.probeManager.getNewReflectionProbeId();
Expand Down
26 changes: 21 additions & 5 deletions cocos/3d/reflection-probe/reflection-probe-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export class ReflectionProbeManager {
if (!scene || !scene.renderScene) {
return;
}
const models = scene.renderScene.models;
const models = scene.renderScene.models as Model[];
for (let i = 0; i < models.length; i++) {
const model = models[i];
if (!model.node) continue;
Expand All @@ -106,7 +106,7 @@ export class ReflectionProbeManager {
if (!scene || !scene.renderScene) {
return;
}
const models = scene.renderScene.models;
const models = scene.renderScene.models as Model[];
for (let i = 0; i < models.length; i++) {
const model = models[i];
if (!model.node) continue;
Expand Down Expand Up @@ -441,6 +441,22 @@ export class ReflectionProbeManager {
return null;
}

/**
* @en Set reflection probe used by the model.
* @zh 手动设置模型使用的反射探针。
* @param model set the probe for this model
* @param probe reflection probe to be set
* @param blendProbe reflection probe for blend
*/
public setReflectionProbe (model: Model, probe: ReflectionProbe, blendProbe: ReflectionProbe | null = null): void {
if (!probe) return;
this._useCubeModels.set(model, probe);
this._updateCubemapOfModel(model, probe);
if (blendProbe) {
this._updateBlendProbeInfo(model, probe, blendProbe);
}
}

/**
* @en
* select the probe with the nearest distance.
Expand Down Expand Up @@ -535,7 +551,8 @@ export class ReflectionProbeManager {
if (probe) {
meshRender.updateReflectionProbeDataMap(this._dataTexture);
if (this._isUsedBlending(model)) {
this._updateBlendProbeInfo(model, probe);
const blendProbe = this._getBlendProbe(model);
this._updateBlendProbeInfo(model, probe, blendProbe);
}
}
}
Expand All @@ -559,7 +576,7 @@ export class ReflectionProbeManager {
return false;
}

private _updateBlendProbeInfo (model: Model, probe: ReflectionProbe): void {
private _updateBlendProbeInfo (model: Model, probe: ReflectionProbe, blendProbe: ReflectionProbe | null): void {
const node = model.node;
if (!node) {
return;
Expand All @@ -568,7 +585,6 @@ export class ReflectionProbeManager {
if (!meshRender) {
return;
}
const blendProbe = this._getBlendProbe(model);
if (blendProbe) {
meshRender.updateReflectionProbeBlendId(blendProbe.getProbeId());
meshRender.updateProbeBlendCubemap(blendProbe.cubemap);
Expand Down
6 changes: 3 additions & 3 deletions cocos/3d/skeletal-animation/skeletal-animation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/

import {
ccclass, executeInEditMode, executionOrder, help, menu, tooltip, type, serializable, editable,
ccclass, executeInEditMode, executionOrder, help, menu, type, serializable, editable,
} from 'cc.decorator';
import { SkinnedMeshRenderer } from '../skinned-mesh-renderer';
import { Mat4, cclegacy, js, assertIsTrue } from '../../core';
Expand Down Expand Up @@ -107,7 +107,7 @@ export class SkeletalAnimation extends Animation {
* 当前动画组件维护的挂点数组。要挂载自定义节点到受动画驱动的骨骼上,必须先在此注册挂点。
*/
@type([Socket])
@tooltip('i18n:animation.sockets')
@editable
get sockets (): Socket[] {
return this._sockets;
}
Expand All @@ -131,7 +131,7 @@ export class SkeletalAnimation extends Animation {
* 是否使用预烘焙动画,默认启用,可以大幅提高运行效时率,但所有动画效果会被彻底固定,不支持任何形式的编辑和混合。<br>
* 运行时动态修改此选项会在播放下一条动画片段时生效。
*/
@tooltip('i18n:animation.use_baked_animation')
@editable
get useBakedAnimation (): boolean {
return this._useBakedAnimation;
}
Expand Down
6 changes: 2 additions & 4 deletions cocos/animation/animation-component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
THE SOFTWARE.
*/

import { ccclass, executeInEditMode, executionOrder, help, menu, tooltip, type, serializable } from 'cc.decorator';
import { ccclass, executeInEditMode, executionOrder, help, menu, type, serializable, editable } from 'cc.decorator';
import { EDITOR_NOT_IN_PREVIEW, TEST } from 'internal:constants';
import { Component } from '../scene-graph/component';
import { Eventify, warnID, js, cclegacy } from '../core';
Expand Down Expand Up @@ -60,7 +60,6 @@ export class Animation extends Eventify(Component) {
* 设置时,已有剪辑关联的动画状态将被停止;若默认剪辑不在新的动画剪辑中,将被重置为空。
*/
@type([AnimationClip])
@tooltip('i18n:animation.clips')
get clips (): (AnimationClip | null)[] {
return this._clips;
}
Expand Down Expand Up @@ -103,7 +102,6 @@ export class Animation extends Eventify(Component) {
* @see [[playOnLoad]]
*/
@type(AnimationClip)
@tooltip('i18n:animation.default_clip')
get defaultClip (): AnimationClip | null {
return this._defaultClip;
}
Expand Down Expand Up @@ -131,7 +129,7 @@ export class Animation extends Eventify(Component) {
* 注意,若在组件开始运行前调用了 `crossFade` 或 `play()`,此字段将不会生效。
*/
@serializable
@tooltip('i18n:animation.play_on_load')
@editable
public playOnLoad = false;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,10 @@ class AnimationClipAGEvaluationRegular implements AnimationClipAGEvaluation {

const {
tracks,
[exoticAnimationTag]: exoticAnimation,
// NOTE: on OH platform, there is a bug on Destructuring Assignment syntax.
// [exoticAnimationTag]: exoticAnimation,
} = clip;
const exoticAnimation = clip[exoticAnimationTag];

for (const track of tracks) {
if (track instanceof UntypedTrack) {
Expand Down
Loading
Loading