diff --git a/.github/workflows/run_test_cases.yml b/.github/workflows/run_test_cases.yml index 5c378912b1..d5cf046cfb 100644 --- a/.github/workflows/run_test_cases.yml +++ b/.github/workflows/run_test_cases.yml @@ -72,6 +72,32 @@ jobs: git branch ${{ steps.parse_pr.outputs.pr_base_ref }} git fetch origin pull/${{ steps.get_pr.outputs.pr_number }}/head:pull-${{ steps.get_pr.outputs.pr_number }} git merge --ff -s recursive --no-verify -m "PR Test" origin/${{ steps.parse_pr.outputs.pr_base_ref }} pull-${{ steps.get_pr.outputs.pr_number }} + + - name: Download external libraries + shell: bash + run: | + set -x + EXT_VERSION=`node ./.github/workflows/get-native-external-version.js` + PRECLONE_EXTERNAL="E:/preclone/cocos-engine-external" + if [ ! -d $PRECLONE_EXTERNAL ]; then + mkdir -p $PRECLONE_EXTERNAL + git clone https://github.com/cocos/cocos-engine-external $PRECLONE_EXTERNAL + else + echo "directory $PRECLONE_EXTERNAL is ready" + fi + if [ ! -d native/external ]; then + mkdir native/external + fi + git -C $PRECLONE_EXTERNAL reset --hard + git -C $PRECLONE_EXTERNAL fetch --all --prune + git -C $PRECLONE_EXTERNAL archive --format=tar $EXT_VERSION | tar -C native/external -xf - + - name: Generate bindings + run: | + cd ./native/tools/swig-config + echo "Create auto-generated jsbinding glue codes." + node genbindings.js && + git status + - name: npm install run: | npm -v @@ -159,6 +185,33 @@ jobs: git branch ${{ steps.parse_pr.outputs.pr_base_ref }} git fetch origin pull/${{ steps.get_pr.outputs.pr_number }}/head:pull-${{ steps.get_pr.outputs.pr_number }} git merge --ff -s recursive --no-verify -m "PR Test" origin/${{ steps.parse_pr.outputs.pr_base_ref }} pull-${{ steps.get_pr.outputs.pr_number }} + - name: Download external libraries + shell: bash + run: | + set -x + EXT_VERSION=`node ./.github/workflows/get-native-external-version.js` + PRECLONE_EXTERNAL="/Users/admin/Documents/actions-runner/preclone/cocos-engine-external" + if [ ! -d $PRECLONE_EXTERNAL ]; then + echo "create directory $PRECLONE_EXTERNAL" + # remove all sub-folders + rm -rf /Users/admin/Documents/actions-runner/preclone + mkdir -p $PRECLONE_EXTERNAL + git clone https://github.com/cocos/cocos-engine-external $PRECLONE_EXTERNAL + else + echo "directory $PRECLONE_EXTERNAL is ready" + fi + if [ ! -d native/external ]; then + mkdir native/external + fi + git -C $PRECLONE_EXTERNAL reset --hard + git -C $PRECLONE_EXTERNAL fetch --all --prune + git -C $PRECLONE_EXTERNAL archive --format=tar $EXT_VERSION | tar -C native/external -xf - + - name: Generate bindings + run: | + cd ./native/tools/swig-config + echo "Create auto-generated jsbinding glue codes." + node genbindings.js && + git status - name: npm install run: | npm -v diff --git a/@types/jsb.d.ts b/@types/jsb.d.ts index 1d254d53ab..d758a5d1f2 100644 --- a/@types/jsb.d.ts +++ b/@types/jsb.d.ts @@ -10,6 +10,8 @@ */ declare namespace jsb { + let window: any; + type AccelerationXYZ = number; type AccelerationIncludingGravityXYZ = number; type RotationRateAlpha = number; diff --git a/@types/pal/input.d.ts b/@types/pal/input.d.ts index 6a74c547e3..8b6bfba849 100644 --- a/@types/pal/input.d.ts +++ b/@types/pal/input.d.ts @@ -273,6 +273,17 @@ declare module 'pal/input' { */ public get buttonRightStick (): InputSourceButton; + /** + * @en The button Options + * @zh 选项按键 + */ + public get buttonOptions (): InputSourceButton; + /** + * @en The button Start + * @zh 开始按键 + */ + public get buttonStart (): InputSourceButton; + /** * @en The position Left hand * @zh 左手位置 diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000000..bc24fb9700 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,24 @@ +MIT License + +Copyright (c) 2013-2016 Chukong Technologies Inc. +Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. + +http://www.cocos.com + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 067960213e..54eb325291 100644 --- a/README.md +++ b/README.md @@ -13,9 +13,9 @@ forks - - version + + license { + siblings.sort((a: Node, b: Node) => { const aComp = a._uiProps.uiTransformComp; const bComp = b._uiProps.uiTransformComp; const ca = aComp ? aComp._priority : 0; diff --git a/cocos/2d/index.ts b/cocos/2d/index.ts index 3457507353..f8ab7e74ba 100644 --- a/cocos/2d/index.ts +++ b/cocos/2d/index.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { CanvasPool, diff --git a/cocos/2d/renderer/base.ts b/cocos/2d/renderer/base.ts index b7d6797649..e86f6aed05 100644 --- a/cocos/2d/renderer/base.ts +++ b/cocos/2d/renderer/base.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2019-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/2d/renderer/batcher-2d.ts b/cocos/2d/renderer/batcher-2d.ts index c8bfe1098e..c8face29cc 100644 --- a/cocos/2d/renderer/batcher-2d.ts +++ b/cocos/2d/renderer/batcher-2d.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2019-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/2d/renderer/buffer-accessor.ts b/cocos/2d/renderer/buffer-accessor.ts index a8044d6d54..314acfe4a9 100644 --- a/cocos/2d/renderer/buffer-accessor.ts +++ b/cocos/2d/renderer/buffer-accessor.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/2d/renderer/deprecated.ts b/cocos/2d/renderer/deprecated.ts index b793c64f2b..36ced8f1d7 100644 --- a/cocos/2d/renderer/deprecated.ts +++ b/cocos/2d/renderer/deprecated.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import * as VertexFormat from './vertex-format'; import { Batcher2D } from './batcher-2d'; diff --git a/cocos/2d/renderer/draw-batch.ts b/cocos/2d/renderer/draw-batch.ts index b2af7c42f0..333bcbe654 100644 --- a/cocos/2d/renderer/draw-batch.ts +++ b/cocos/2d/renderer/draw-batch.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Material } from '../../asset/assets/material'; import { Texture, Sampler, InputAssembler, DescriptorSet, Shader } from '../../gfx'; diff --git a/cocos/2d/renderer/i-batcher.ts b/cocos/2d/renderer/i-batcher.ts index 5c5b697b3d..f7b2c24eff 100644 --- a/cocos/2d/renderer/i-batcher.ts +++ b/cocos/2d/renderer/i-batcher.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { CachedArray } from '../../core'; import { TextureBase } from '../../asset/assets/texture-base'; import { Device, Attribute } from '../../gfx'; diff --git a/cocos/2d/renderer/linear-buffer-accessor.ts b/cocos/2d/renderer/linear-buffer-accessor.ts index e58e2e298f..668e1489e4 100644 --- a/cocos/2d/renderer/linear-buffer-accessor.ts +++ b/cocos/2d/renderer/linear-buffer-accessor.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/2d/renderer/mesh-buffer.ts b/cocos/2d/renderer/mesh-buffer.ts index ab050ffdfa..b938988f62 100644 --- a/cocos/2d/renderer/mesh-buffer.ts +++ b/cocos/2d/renderer/mesh-buffer.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2019-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/2d/renderer/native-2d-empty.ts b/cocos/2d/renderer/native-2d-empty.ts index eb4c24f6a7..7a0f0dd81d 100644 --- a/cocos/2d/renderer/native-2d-empty.ts +++ b/cocos/2d/renderer/native-2d-empty.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + export const NativeRenderDrawInfo = undefined; export const NativeBatcher2d = undefined; diff --git a/cocos/2d/renderer/native-2d.jsb.ts b/cocos/2d/renderer/native-2d.jsb.ts index 4e1cf0a516..75fac9c836 100644 --- a/cocos/2d/renderer/native-2d.jsb.ts +++ b/cocos/2d/renderer/native-2d.jsb.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + // 2d declare const n2d: any; diff --git a/cocos/2d/renderer/native-2d.ts b/cocos/2d/renderer/native-2d.ts index abf1e47d1d..c6cabde272 100644 --- a/cocos/2d/renderer/native-2d.ts +++ b/cocos/2d/renderer/native-2d.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { Material } from '../../asset/assets'; import { Attribute, Device, Sampler, Texture } from '../../gfx'; import { Node } from '../../scene-graph'; diff --git a/cocos/2d/renderer/render-data.ts b/cocos/2d/renderer/render-data.ts index a034fb6eba..8944ec30ed 100644 --- a/cocos/2d/renderer/render-data.ts +++ b/cocos/2d/renderer/render-data.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2019-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/2d/renderer/render-draw-info.ts b/cocos/2d/renderer/render-draw-info.ts index 032c78f492..f118dcd6d4 100644 --- a/cocos/2d/renderer/render-draw-info.ts +++ b/cocos/2d/renderer/render-draw-info.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { JSB } from 'internal:constants'; import { IRenderData } from './render-data'; import { NativeRenderDrawInfo } from './native-2d'; diff --git a/cocos/2d/renderer/render-entity.ts b/cocos/2d/renderer/render-entity.ts index 37dfc418d8..d59200c0cc 100644 --- a/cocos/2d/renderer/render-entity.ts +++ b/cocos/2d/renderer/render-entity.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { JSB } from 'internal:constants'; import { NativeRenderEntity } from './native-2d'; import { RenderDrawInfo } from './render-draw-info'; diff --git a/cocos/2d/renderer/static-vb-accessor.ts b/cocos/2d/renderer/static-vb-accessor.ts index b87590869c..9a759f2284 100644 --- a/cocos/2d/renderer/static-vb-accessor.ts +++ b/cocos/2d/renderer/static-vb-accessor.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/2d/renderer/stencil-manager.ts b/cocos/2d/renderer/stencil-manager.ts index 72a7da6e7b..e9e524f02a 100644 --- a/cocos/2d/renderer/stencil-manager.ts +++ b/cocos/2d/renderer/stencil-manager.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2019-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/2d/renderer/vertex-format.ts b/cocos/2d/renderer/vertex-format.ts index a2726c335a..21529c1f89 100644 --- a/cocos/2d/renderer/vertex-format.ts +++ b/cocos/2d/renderer/vertex-format.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2019-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/2d/utils/dynamic-atlas/atlas-manager.ts b/cocos/2d/utils/dynamic-atlas/atlas-manager.ts index 538e29b7f2..3d3a6d2fd3 100644 --- a/cocos/2d/utils/dynamic-atlas/atlas-manager.ts +++ b/cocos/2d/utils/dynamic-atlas/atlas-manager.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { EDITOR } from 'internal:constants'; import { System, macro, js, cclegacy } from '../../../core'; import { Filter } from '../../../asset/assets/asset-enum'; diff --git a/cocos/2d/utils/dynamic-atlas/atlas.ts b/cocos/2d/utils/dynamic-atlas/atlas.ts index aca7860f6c..dd8542545d 100644 --- a/cocos/2d/utils/dynamic-atlas/atlas.ts +++ b/cocos/2d/utils/dynamic-atlas/atlas.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { PixelFormat } from '../../../asset/assets/asset-enum'; import { ImageAsset } from '../../../asset/assets/image-asset'; import { Texture2D } from '../../../asset/assets/texture-2d'; diff --git a/cocos/2d/utils/font-loader.ts b/cocos/2d/utils/font-loader.ts index ec96471bc0..6a1e48f554 100644 --- a/cocos/2d/utils/font-loader.ts +++ b/cocos/2d/utils/font-loader.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { warnID } from '../../core'; import { safeMeasureText } from './text-utils'; @@ -29,6 +28,9 @@ import { CompleteCallback, IDownloadParseOptions } from '../../asset/asset-manag import downloader from '../../asset/asset-manager/downloader'; import factory from '../../asset/asset-manager/factory'; import { TTFFont } from '../assets/ttf-font'; +import { ccwindow } from '../../core/global-exports'; + +const ccdocument = ccwindow.document; interface IFontLoadHandle { fontFamilyName: string; @@ -53,9 +55,9 @@ const useNativeCheck = (() => { let nativeCheck: boolean; return (): boolean => { if (nativeCheck === undefined) { - if ('FontFace' in window) { - const match = /Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent); - const safari10Match = /OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent) && /Apple/.exec(window.navigator.vendor); + if ('FontFace' in ccwindow) { + const match = /Gecko.*Firefox\/(\d+)/.exec(ccwindow.navigator.userAgent); + const safari10Match = /OS X.*Version\/10\..*Safari/.exec(ccwindow.navigator.userAgent) && /Apple/.exec(ccwindow.navigator.vendor); if (match) { nativeCheck = parseInt(match[1], 10) > 42; @@ -116,8 +118,7 @@ function nativeCheckFontLoaded (start: number, font: string, callback: CompleteC if (now - start >= _timeout) { reject(); } else { - // @ts-expect-error see https://developer.mozilla.org/en-US/docs/Web/API/Document/fonts - document.fonts.load(`40px ${font}`).then((fonts) => { + (ccdocument as any).fonts.load(`40px ${font}`).then((fonts) => { if (fonts.length >= 1) { resolve(); } else { @@ -152,7 +153,6 @@ function nativeCheckFontLoaded (start: number, font: string, callback: CompleteC export function loadFont (url: string, options: IDownloadParseOptions, onComplete: CompleteCallback) { const fontFamilyName = getFontFamily(url); - // Already loaded fonts if (_fontFaces[fontFamilyName]) { onComplete(null, fontFamilyName); @@ -160,7 +160,7 @@ export function loadFont (url: string, options: IDownloadParseOptions, onComplet } if (!_canvasContext) { - const labelCanvas = document.createElement('canvas'); + const labelCanvas = ccdocument.createElement('canvas'); labelCanvas.width = 100; labelCanvas.height = 100; _canvasContext = labelCanvas.getContext('2d'); @@ -171,7 +171,7 @@ export function loadFont (url: string, options: IDownloadParseOptions, onComplet const refWidth = safeMeasureText(_canvasContext!, _testString, fontDesc); // Setup font face style - const fontStyle = document.createElement('style'); + const fontStyle = ccdocument.createElement('style'); fontStyle.type = 'text/css'; let fontStr = ''; if (Number.isNaN(fontFamilyName)) { @@ -181,17 +181,17 @@ export function loadFont (url: string, options: IDownloadParseOptions, onComplet } fontStr += `url("${url}");`; fontStyle.textContent = `${fontStr}}`; - document.body.appendChild(fontStyle); + ccdocument.body.appendChild(fontStyle); // Preload font with div - const preloadDiv = document.createElement('div'); + const preloadDiv = ccdocument.createElement('div'); const divStyle = preloadDiv.style; divStyle.fontFamily = fontFamilyName; preloadDiv.innerHTML = '.'; divStyle.position = 'absolute'; divStyle.left = '-100px'; divStyle.top = '-100px'; - document.body.appendChild(preloadDiv); + ccdocument.body.appendChild(preloadDiv); if (useNativeCheck()) { nativeCheckFontLoaded(Date.now(), fontFamilyName, onComplete); diff --git a/cocos/2d/utils/html-text-parser.ts b/cocos/2d/utils/html-text-parser.ts index 96bb0bb808..2ab9b0cdae 100644 --- a/cocos/2d/utils/html-text-parser.ts +++ b/cocos/2d/utils/html-text-parser.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/2d/utils/index.ts b/cocos/2d/utils/index.ts index e5a3541ba1..4f0ef61268 100644 --- a/cocos/2d/utils/index.ts +++ b/cocos/2d/utils/index.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import './font-loader'; diff --git a/cocos/2d/utils/text-utils.ts b/cocos/2d/utils/text-utils.ts index f17325cd38..b3e0eb1517 100644 --- a/cocos/2d/utils/text-utils.ts +++ b/cocos/2d/utils/text-utils.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/3d/assets/deprecated.ts b/cocos/3d/assets/deprecated.ts index a87cbf46d6..e539981fab 100644 --- a/cocos/3d/assets/deprecated.ts +++ b/cocos/3d/assets/deprecated.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { removeProperty, replaceProperty } from '../../core'; import { Mesh } from './mesh'; diff --git a/cocos/3d/assets/index.ts b/cocos/3d/assets/index.ts index 233c1d6ce2..da00b2a5f8 100644 --- a/cocos/3d/assets/index.ts +++ b/cocos/3d/assets/index.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/3d/assets/mesh.jsb.ts b/cocos/3d/assets/mesh.jsb.ts index 5bc516f9a7..7bac5290cb 100644 --- a/cocos/3d/assets/mesh.jsb.ts +++ b/cocos/3d/assets/mesh.jsb.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/3d/assets/mesh.ts b/cocos/3d/assets/mesh.ts index bb8693c888..9341dda232 100644 --- a/cocos/3d/assets/mesh.ts +++ b/cocos/3d/assets/mesh.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/3d/assets/morph-rendering.ts b/cocos/3d/assets/morph-rendering.ts index d9897bcf86..73e1602707 100644 --- a/cocos/3d/assets/morph-rendering.ts +++ b/cocos/3d/assets/morph-rendering.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { AttributeName, Buffer, BufferUsageBit, Device, MemoryUsageBit, DescriptorSet, BufferInfo, FormatFeatureBit, Format, diff --git a/cocos/3d/assets/morph.ts b/cocos/3d/assets/morph.ts index b17197a84a..daa9c39cb0 100644 --- a/cocos/3d/assets/morph.ts +++ b/cocos/3d/assets/morph.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { AttributeName } from '../../gfx'; import { Mesh } from './mesh'; diff --git a/cocos/3d/assets/skeleton.jsb.ts b/cocos/3d/assets/skeleton.jsb.ts index 23e13221f2..139ff9907a 100644 --- a/cocos/3d/assets/skeleton.jsb.ts +++ b/cocos/3d/assets/skeleton.jsb.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/3d/assets/skeleton.ts b/cocos/3d/assets/skeleton.ts index 0cf3992c0f..e301824409 100644 --- a/cocos/3d/assets/skeleton.ts +++ b/cocos/3d/assets/skeleton.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/3d/framework/deprecated.ts b/cocos/3d/framework/deprecated.ts index b4bb3e7d77..aafe27f546 100644 --- a/cocos/3d/framework/deprecated.ts +++ b/cocos/3d/framework/deprecated.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { removeProperty, js, cclegacy } from '../../core'; import { MeshRenderer } from './mesh-renderer'; diff --git a/cocos/3d/framework/index.ts b/cocos/3d/framework/index.ts index b426ef06e2..05b122abc4 100644 --- a/cocos/3d/framework/index.ts +++ b/cocos/3d/framework/index.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/3d/framework/mesh-renderer.ts b/cocos/3d/framework/mesh-renderer.ts index 4b613d499e..b83f95537b 100644 --- a/cocos/3d/framework/mesh-renderer.ts +++ b/cocos/3d/framework/mesh-renderer.ts @@ -1,15 +1,15 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -650,13 +650,17 @@ export class MeshRenderer extends ModelRenderer { this._onUpdateLightingmap(); } - public updateProbeCubemap (cubeMap: TextureCube | null) { - if (this.bakeSettings._probeCubemap === cubeMap) { + public updateProbeCubemap (cubeMap: TextureCube | null, useDefaultTexture?: boolean) { + if (this.bakeSettings._probeCubemap && this.bakeSettings._probeCubemap === cubeMap) { return; } this.bakeSettings._probeCubemap = cubeMap; if (this.model !== null) { - this.model.updateReflctionProbeCubemap(this.bakeSettings._probeCubemap); + let cubeMap = this.bakeSettings._probeCubemap; + if (!cubeMap && this.node.scene && !useDefaultTexture) { + cubeMap = this.node.scene._globals.skybox.envmap; + } + this.model.updateReflectionProbeCubemap(cubeMap); } } public updateProbePlanarMap (planarMap: Texture | null) { @@ -665,21 +669,25 @@ export class MeshRenderer extends ModelRenderer { } this.bakeSettings._probePlanarmap = planarMap; if (this.model !== null) { - this.model.updateReflctionProbePlanarMap(this.bakeSettings._probePlanarmap); + this.model.updateReflectionProbePlanarMap(this.bakeSettings._probePlanarmap); } } protected _updateReflectionProbeTexture () { if (this.model === null) return; if (this.bakeSettings.reflectionProbe === ReflectionProbeType.BAKED_CUBEMAP) { - this.model.updateReflctionProbeCubemap(this.bakeSettings._probeCubemap); - this.model.updateReflctionProbePlanarMap(null); + let cubeMap = this.bakeSettings._probeCubemap; + if (!cubeMap && this.node.scene) { + cubeMap = this.node.scene._globals.skybox.envmap; + } + this.model.updateReflectionProbeCubemap(cubeMap); + this.model.updateReflectionProbePlanarMap(null); } else if (this.bakeSettings.reflectionProbe === ReflectionProbeType.PLANAR_REFLECTION) { - this.model.updateReflctionProbePlanarMap(this.bakeSettings._probePlanarmap); - this.model.updateReflctionProbeCubemap(null); + this.model.updateReflectionProbePlanarMap(this.bakeSettings._probePlanarmap); + this.model.updateReflectionProbeCubemap(null); } else { - this.model.updateReflctionProbeCubemap(null); - this.model.updateReflctionProbePlanarMap(null); + this.model.updateReflectionProbeCubemap(null); + this.model.updateReflectionProbePlanarMap(null); } } @@ -872,12 +880,12 @@ export class MeshRenderer extends ModelRenderer { } protected onReflectionProbeChanged () { + this._updateUseReflectionProbe(); if (this.bakeSettings.reflectionProbe === ReflectionProbeType.BAKED_CUBEMAP) { cclegacy.internal.reflectionProbeManager.updateUseCubeModels(this._model); } else if (this.bakeSettings.reflectionProbe === ReflectionProbeType.PLANAR_REFLECTION) { cclegacy.internal.reflectionProbeManager.updateUsePlanarModels(this._model); } - this._updateUseReflectionProbe(); } protected onBakeToReflectionProbeChanged () { diff --git a/cocos/3d/index.ts b/cocos/3d/index.ts index 4a89bd0d6b..4dc501ba8c 100644 --- a/cocos/3d/index.ts +++ b/cocos/3d/index.ts @@ -1,20 +1,19 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the 'Software'), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. - THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER diff --git a/cocos/3d/lights/deprecated.ts b/cocos/3d/lights/deprecated.ts index 805ad6f3f9..f23d390750 100644 --- a/cocos/3d/lights/deprecated.ts +++ b/cocos/3d/lights/deprecated.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Light } from './light-component'; import { SpotLight } from './spot-light-component'; diff --git a/cocos/3d/lights/directional-light-component.ts b/cocos/3d/lights/directional-light-component.ts index b97f193605..6c7f081187 100644 --- a/cocos/3d/lights/directional-light-component.ts +++ b/cocos/3d/lights/directional-light-component.ts @@ -1,15 +1,15 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. diff --git a/cocos/3d/lights/index.ts b/cocos/3d/lights/index.ts index 67d85771f6..7080a5fd3a 100644 --- a/cocos/3d/lights/index.ts +++ b/cocos/3d/lights/index.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/3d/lights/light-component.ts b/cocos/3d/lights/light-component.ts index f7443403c4..c569dd269c 100644 --- a/cocos/3d/lights/light-component.ts +++ b/cocos/3d/lights/light-component.ts @@ -1,15 +1,15 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. diff --git a/cocos/3d/lights/sphere-light-component.ts b/cocos/3d/lights/sphere-light-component.ts index 81d4132763..504a9cc133 100644 --- a/cocos/3d/lights/sphere-light-component.ts +++ b/cocos/3d/lights/sphere-light-component.ts @@ -1,15 +1,15 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. diff --git a/cocos/3d/lights/spot-light-component.ts b/cocos/3d/lights/spot-light-component.ts index 3efda6111d..8e456151f5 100644 --- a/cocos/3d/lights/spot-light-component.ts +++ b/cocos/3d/lights/spot-light-component.ts @@ -1,15 +1,15 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. diff --git a/cocos/3d/lod/index.ts b/cocos/3d/lod/index.ts index ab46b937b5..3fdc71a298 100644 --- a/cocos/3d/lod/index.ts +++ b/cocos/3d/lod/index.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/3d/lod/lodgroup-component.ts b/cocos/3d/lod/lodgroup-component.ts index 8fae4c9545..7a489042b4 100644 --- a/cocos/3d/lod/lodgroup-component.ts +++ b/cocos/3d/lod/lodgroup-component.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { EDITOR, JSB } from 'internal:constants'; import { ccclass, editable, executeInEditMode, menu, serializable, type } from 'cc.decorator'; import { Vec3, Mat4, geometry, CCInteger, CCFloat } from '../../core'; @@ -33,7 +32,7 @@ import { scene } from '../../render-scene'; import { NodeEventType } from '../../scene-graph/node-event'; // Ratio of objects occupying the screen -const DEFAULT_SCREEN_OCCUPATION: number[] = [0.25, 0.125, 0.0625]; +const DEFAULT_SCREEN_OCCUPATION: number[] = [0.25, 0.125, 0.01]; export type ModelAddedCallback = () => void; @ccclass('cc.LOD') @@ -296,7 +295,11 @@ export class LODGroup extends Component { * @ 重置 LODs 为当前新设置的值。 */ set LODs (valArray: readonly LOD[]) { - if (valArray === this._LODs) return; + if (valArray === this._LODs) { + //_LODs maybe changed, we need to notify the scene to update. + this._updateDataToScene(); + return; + } this._LODs.length = 0; this.lodGroup.clearLODs(); valArray.forEach((lod: LOD, index: number) => { @@ -304,6 +307,8 @@ export class LODGroup extends Component { this._LODs[index] = lod; lod.modelAddedCallback = this.onLodModelAddedCallback.bind(this); }); + //_LODs has been changed, we need to notify the scene to update. + this._updateDataToScene(); } /** @@ -342,6 +347,9 @@ export class LODGroup extends Component { screenUsagePercentage = (preLod.screenUsagePercentage + nextLod.screenUsagePercentage) / 2; } else if (preLod && !nextLod) { // insert at last position screenUsagePercentage = preLod.screenUsagePercentage / 2; + if (screenUsagePercentage > 0.01) { + screenUsagePercentage = 0.01; + } } else if (nextLod && !preLod) { //insert at first position screenUsagePercentage = nextLod.screenUsagePercentage; @@ -600,13 +608,13 @@ export class LODGroup extends Component { } private _attachToScene () { - if (!this.node.scene) { return; } - - const renderScene = this._getRenderScene(); - if (this._lodGroup.scene) { - this._detachFromScene(); + if (this.node && this.node.scene) { + const renderScene = this._getRenderScene(); + if (this._lodGroup.scene) { + this._detachFromScene(); + } + renderScene.addLODGroup(this._lodGroup); } - renderScene.addLODGroup(this._lodGroup); } private _detachFromScene () { @@ -622,4 +630,9 @@ export class LODGroup extends Component { EditorExtends.Node.emit('change', node.uuid, node); } } + + private _updateDataToScene () { + this._detachFromScene(); + this._attachToScene(); + } } diff --git a/cocos/3d/misc/batch-utils.ts b/cocos/3d/misc/batch-utils.ts index 00f2389170..778838be01 100644 --- a/cocos/3d/misc/batch-utils.ts +++ b/cocos/3d/misc/batch-utils.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { MeshRenderer } from '../framework/mesh-renderer'; import { Mesh } from '../assets/mesh'; diff --git a/cocos/3d/misc/buffer-blob.ts b/cocos/3d/misc/buffer-blob.ts index 9de7e3703b..ecc97efe58 100644 --- a/cocos/3d/misc/buffer-blob.ts +++ b/cocos/3d/misc/buffer-blob.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ export class BufferBlob { private _arrayBufferOrPaddings: Array = []; diff --git a/cocos/3d/misc/buffer.ts b/cocos/3d/misc/buffer.ts index db0ee980f7..c1d83bcfd5 100644 --- a/cocos/3d/misc/buffer.ts +++ b/cocos/3d/misc/buffer.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Format, FormatInfos, FormatType, FormatInfo } from '../../gfx'; import { sys } from '../../core'; diff --git a/cocos/3d/misc/create-mesh.jsb.ts b/cocos/3d/misc/create-mesh.jsb.ts index 76bbb1d61c..5befbd4678 100644 --- a/cocos/3d/misc/create-mesh.jsb.ts +++ b/cocos/3d/misc/create-mesh.jsb.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/3d/misc/create-mesh.ts b/cocos/3d/misc/create-mesh.ts index 67d5920539..3e59d58258 100644 --- a/cocos/3d/misc/create-mesh.ts +++ b/cocos/3d/misc/create-mesh.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Mesh } from '../assets/mesh'; import { AttributeName, Format, FormatInfos, PrimitiveMode, Attribute } from '../../gfx'; diff --git a/cocos/3d/misc/index.ts b/cocos/3d/misc/index.ts index 9ef690807b..4e2c4f39d5 100644 --- a/cocos/3d/misc/index.ts +++ b/cocos/3d/misc/index.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ export { find } from '../../scene-graph/find'; export { toPPM } from './ppm'; diff --git a/cocos/3d/misc/joint-texture-sampler-info.ts b/cocos/3d/misc/joint-texture-sampler-info.ts index 7891c3fc39..37566b27ad 100644 --- a/cocos/3d/misc/joint-texture-sampler-info.ts +++ b/cocos/3d/misc/joint-texture-sampler-info.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { Address, Filter, SamplerInfo } from '../../gfx'; export const jointTextureSamplerInfo = new SamplerInfo( diff --git a/cocos/3d/misc/ppm.ts b/cocos/3d/misc/ppm.ts index d87753b1d9..64c19d8490 100644 --- a/cocos/3d/misc/ppm.ts +++ b/cocos/3d/misc/ppm.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ /** * @en diff --git a/cocos/3d/misc/read-mesh.ts b/cocos/3d/misc/read-mesh.ts index 4d5e2eefc2..e6d45c728c 100644 --- a/cocos/3d/misc/read-mesh.ts +++ b/cocos/3d/misc/read-mesh.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Mesh } from '../assets/mesh'; import { AttributeName, Format, FormatInfos } from '../../gfx'; diff --git a/cocos/3d/models/baked-skinning-model.jsb.ts b/cocos/3d/models/baked-skinning-model.jsb.ts index 85d220bce4..3ce1b9be9e 100644 --- a/cocos/3d/models/baked-skinning-model.jsb.ts +++ b/cocos/3d/models/baked-skinning-model.jsb.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { cclegacy, geometry } from '../../core'; import { Skeleton } from '../assets/skeleton'; import { Mesh } from '../assets/mesh'; diff --git a/cocos/3d/models/baked-skinning-model.ts b/cocos/3d/models/baked-skinning-model.ts index a250a61c29..7e82a93929 100644 --- a/cocos/3d/models/baked-skinning-model.ts +++ b/cocos/3d/models/baked-skinning-model.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/3d/models/morph-model.jsb.ts b/cocos/3d/models/morph-model.jsb.ts index c0226fd915..a7a31391ae 100644 --- a/cocos/3d/models/morph-model.jsb.ts +++ b/cocos/3d/models/morph-model.jsb.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { cclegacy } from "../../core"; export const MorphModel = jsb.MorphModel; diff --git a/cocos/3d/models/morph-model.ts b/cocos/3d/models/morph-model.ts index 5f89a741ab..c6bdc8bde4 100644 --- a/cocos/3d/models/morph-model.ts +++ b/cocos/3d/models/morph-model.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Model } from '../../render-scene/scene/model'; import { MorphRenderingInstance } from '../assets/morph-rendering'; diff --git a/cocos/3d/models/skinning-model.jsb.ts b/cocos/3d/models/skinning-model.jsb.ts index 688f12da2b..cda78c947b 100644 --- a/cocos/3d/models/skinning-model.jsb.ts +++ b/cocos/3d/models/skinning-model.jsb.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { cclegacy } from "../../core"; export const SkinningModel = jsb.SkinningModel; diff --git a/cocos/3d/models/skinning-model.ts b/cocos/3d/models/skinning-model.ts index 51389ee722..c0586deb65 100644 --- a/cocos/3d/models/skinning-model.ts +++ b/cocos/3d/models/skinning-model.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/3d/reflection-probe/index.ts b/cocos/3d/reflection-probe/index.ts index ec0ed5f109..14914f0198 100644 --- a/cocos/3d/reflection-probe/index.ts +++ b/cocos/3d/reflection-probe/index.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/3d/reflection-probe/reflection-probe-component.ts b/cocos/3d/reflection-probe/reflection-probe-component.ts index 3345f8597e..76fac718b7 100644 --- a/cocos/3d/reflection-probe/reflection-probe-component.ts +++ b/cocos/3d/reflection-probe/reflection-probe-component.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 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 { EDITOR } from 'internal:constants'; import { CCObject, Color, Enum, size, Vec3 } from '../../core'; @@ -97,13 +96,18 @@ export class ReflectionProbe extends Component { protected _previewSphere: Node | null = null; protected _previewPlane: Node | null = null; + protected _sourceCameraPos = new Vec3(0, 0, 0); + /** * @en * Gets or sets the size of the box * @zh * 获取或设置包围盒的大小。 */ - set size (value) { + set size (value: Vec3) { + if (value.x < 0) value.x = 0; + if (value.y < 0) value.y = 0; + if (value.z < 0) value.z = 0; this._size.set(value); this.probe.size = this._size; if (this.probe) { @@ -273,6 +277,9 @@ export class ReflectionProbe extends Component { this._previewPlane = val; if (this.probe) { this.probe.previewPlane = val; + if (this._previewPlane) { + ReflectionProbeManager.probeManager.updatePreviewPlane(this.probe); + } } } @@ -281,19 +288,19 @@ export class ReflectionProbe extends Component { } public onLoad () { - if (EDITOR || this.probeType === ProbeType.PLANAR) { - this._createProbe(); - } + this._createProbe(); } onEnable () { - if (EDITOR || this.probeType === ProbeType.PLANAR) { - ReflectionProbeManager.probeManager.register(this._probe!); + if (this._probe) { + ReflectionProbeManager.probeManager.register(this._probe); + this._probe.enable(); } } onDisable () { - if (EDITOR || this.probeType === ProbeType.PLANAR) { - ReflectionProbeManager.probeManager.unregister(this._probe!); + if (this._probe) { + ReflectionProbeManager.probeManager.unregister(this._probe); + this._probe.disable(); } } @@ -333,8 +340,12 @@ export class ReflectionProbe extends Component { ReflectionProbeManager.probeManager.onUpdateProbes(true); } } - if (this.probeType === ProbeType.PLANAR && this.sourceCamera && (this.sourceCamera.node.hasChangedFlags & TransformBit.TRS)) { - this.probe.renderPlanarReflection(this.sourceCamera.camera); + if (this.probeType === ProbeType.PLANAR && this.sourceCamera) { + if ((this.sourceCamera.node.hasChangedFlags & TransformBit.TRS) + || !this._sourceCameraPos.equals(this.sourceCamera.node.getWorldPosition())) { + this._sourceCameraPos = this.sourceCamera.node.getWorldPosition(); + this.probe.renderPlanarReflection(this.sourceCamera.camera); + } } } diff --git a/cocos/3d/skeletal-animation/data-pool-manager.ts b/cocos/3d/skeletal-animation/data-pool-manager.ts index c8eeb06ae0..15f8fd616a 100644 --- a/cocos/3d/skeletal-animation/data-pool-manager.ts +++ b/cocos/3d/skeletal-animation/data-pool-manager.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import type { AnimationClip } from '../../animation/animation-clip'; import type { Skeleton } from '../assets'; diff --git a/cocos/3d/skeletal-animation/deprecated.ts b/cocos/3d/skeletal-animation/deprecated.ts index 1971350819..1e394027d1 100644 --- a/cocos/3d/skeletal-animation/deprecated.ts +++ b/cocos/3d/skeletal-animation/deprecated.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { js, cclegacy } from '../../core'; import { SkeletalAnimation } from './skeletal-animation'; diff --git a/cocos/3d/skeletal-animation/index.ts b/cocos/3d/skeletal-animation/index.ts index bb11159cb2..1d643c87af 100644 --- a/cocos/3d/skeletal-animation/index.ts +++ b/cocos/3d/skeletal-animation/index.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import './data-pool-manager'; diff --git a/cocos/3d/skeletal-animation/limits.ts b/cocos/3d/skeletal-animation/limits.ts index 13ef5fed27..04c066a249 100644 --- a/cocos/3d/skeletal-animation/limits.ts +++ b/cocos/3d/skeletal-animation/limits.ts @@ -1,2 +1,26 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + 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 915a95ac56..1a1949be35 100644 --- a/cocos/3d/skeletal-animation/skeletal-animation-blending.ts +++ b/cocos/3d/skeletal-animation/skeletal-animation-blending.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { DEBUG } from 'internal:constants'; import { Vec3, Quat, assertIsTrue } from '../../core'; diff --git a/cocos/3d/skeletal-animation/skeletal-animation-data-hub.ts b/cocos/3d/skeletal-animation/skeletal-animation-data-hub.ts index 6e25b535e3..20d5f119ff 100644 --- a/cocos/3d/skeletal-animation/skeletal-animation-data-hub.ts +++ b/cocos/3d/skeletal-animation/skeletal-animation-data-hub.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/3d/skeletal-animation/skeletal-animation-state.ts b/cocos/3d/skeletal-animation/skeletal-animation-state.ts index d0555abc6a..2492a96d3c 100644 --- a/cocos/3d/skeletal-animation/skeletal-animation-state.ts +++ b/cocos/3d/skeletal-animation/skeletal-animation-state.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/3d/skeletal-animation/skeletal-animation-utils.ts b/cocos/3d/skeletal-animation/skeletal-animation-utils.ts index 4c295d462b..f3600c9ec5 100644 --- a/cocos/3d/skeletal-animation/skeletal-animation-utils.ts +++ b/cocos/3d/skeletal-animation/skeletal-animation-utils.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/3d/skeletal-animation/skeletal-animation.ts b/cocos/3d/skeletal-animation/skeletal-animation.ts index 26cd3627ef..f9a71ec4e6 100644 --- a/cocos/3d/skeletal-animation/skeletal-animation.ts +++ b/cocos/3d/skeletal-animation/skeletal-animation.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/3d/skinned-mesh-renderer/deprecated.ts b/cocos/3d/skinned-mesh-renderer/deprecated.ts index 7db5d063f7..9d703ce26a 100644 --- a/cocos/3d/skinned-mesh-renderer/deprecated.ts +++ b/cocos/3d/skinned-mesh-renderer/deprecated.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { SkinnedMeshRenderer } from './skinned-mesh-renderer'; import { SkinnedMeshBatchRenderer, SkinnedMeshUnit } from './skinned-mesh-batch-renderer'; diff --git a/cocos/3d/skinned-mesh-renderer/index.ts b/cocos/3d/skinned-mesh-renderer/index.ts index 24413a5ef3..8ea33501ab 100644 --- a/cocos/3d/skinned-mesh-renderer/index.ts +++ b/cocos/3d/skinned-mesh-renderer/index.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/3d/skinned-mesh-renderer/skinned-mesh-batch-renderer.ts b/cocos/3d/skinned-mesh-renderer/skinned-mesh-batch-renderer.ts index 2cbd57b2e9..bf8d22f9b5 100644 --- a/cocos/3d/skinned-mesh-renderer/skinned-mesh-batch-renderer.ts +++ b/cocos/3d/skinned-mesh-renderer/skinned-mesh-batch-renderer.ts @@ -1,14 +1,14 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. diff --git a/cocos/3d/skinned-mesh-renderer/skinned-mesh-renderer.ts b/cocos/3d/skinned-mesh-renderer/skinned-mesh-renderer.ts index fee322d281..408dc2ccac 100644 --- a/cocos/3d/skinned-mesh-renderer/skinned-mesh-renderer.ts +++ b/cocos/3d/skinned-mesh-renderer/skinned-mesh-renderer.ts @@ -1,15 +1,15 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. diff --git a/cocos/animation/animation-clip.ts b/cocos/animation/animation-clip.ts index ad3ce4ef89..72e4235c0b 100644 --- a/cocos/animation/animation-clip.ts +++ b/cocos/animation/animation-clip.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, serializable } from 'cc.decorator'; import { DEBUG } from 'internal:constants'; diff --git a/cocos/animation/animation-component.ts b/cocos/animation/animation-component.ts index 51c70016ee..b936502903 100644 --- a/cocos/animation/animation-component.ts +++ b/cocos/animation/animation-component.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/animation/animation-curve.ts b/cocos/animation/animation-curve.ts index 166ab3365f..d8152d0ec9 100644 --- a/cocos/animation/animation-curve.ts +++ b/cocos/animation/animation-curve.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { lerp, Quat, errorID, cclegacy, binarySearchEpsilon, ValueType, bezierByTime, BezierControlPoints, easing } from '../core'; import { ILerpable, isLerpable } from './types'; diff --git a/cocos/animation/animation-manager.ts b/cocos/animation/animation-manager.ts index a5747a574c..3e929dd697 100644 --- a/cocos/animation/animation-manager.ts +++ b/cocos/animation/animation-manager.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass } from 'cc.decorator'; import { System, errorID, cclegacy, js } from '../core'; diff --git a/cocos/animation/animation-state.ts b/cocos/animation/animation-state.ts index c821da26dd..3383aa2623 100644 --- a/cocos/animation/animation-state.ts +++ b/cocos/animation/animation-state.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/animation/animation.ts b/cocos/animation/animation.ts index 53f5f5c109..1547d248b3 100644 --- a/cocos/animation/animation.ts +++ b/cocos/animation/animation.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import './embedded-player/embedded-player'; import './embedded-player/embedded-animation-clip-player'; diff --git a/cocos/animation/compression.ts b/cocos/animation/compression.ts index 2d7192e9f0..1b82a4ac09 100644 --- a/cocos/animation/compression.ts +++ b/cocos/animation/compression.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { approx } from '../core'; /** diff --git a/cocos/animation/compression/compressed-data.ts b/cocos/animation/compression/compressed-data.ts index ac040e9e50..0cd4aa7a66 100644 --- a/cocos/animation/compression/compressed-data.ts +++ b/cocos/animation/compression/compressed-data.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { QuatCurve, RealCurve } from '../../curves'; import { KeySharedQuatCurves, KeySharedRealCurves } from '../../curves/keys-shared-curves'; import { ccclass, serializable } from '../../data/decorators'; diff --git a/cocos/animation/cross-fade.ts b/cocos/animation/cross-fade.ts index f3f33b3b0d..0276134c3e 100644 --- a/cocos/animation/cross-fade.ts +++ b/cocos/animation/cross-fade.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { clamp01, js } from '../core'; import { AnimationState } from './animation-state'; diff --git a/cocos/animation/cubic-spline-value.ts b/cocos/animation/cubic-spline-value.ts index 235082b6fd..e79e61bd83 100644 --- a/cocos/animation/cubic-spline-value.ts +++ b/cocos/animation/cubic-spline-value.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, serializable } from 'cc.decorator'; import { Quat, Vec2, Vec3, Vec4 } from '../core'; diff --git a/cocos/animation/define.ts b/cocos/animation/define.ts index 4d3e9946e3..08fd22069a 100644 --- a/cocos/animation/define.ts +++ b/cocos/animation/define.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + export const CLASS_NAME_PREFIX_ANIM = 'cc.animation.'; export const createEvalSymbol = Symbol('CreateEval'); diff --git a/cocos/animation/embedded-player/embedded-animation-clip-player.ts b/cocos/animation/embedded-player/embedded-animation-clip-player.ts index 517ce83018..8129163ea6 100644 --- a/cocos/animation/embedded-player/embedded-animation-clip-player.ts +++ b/cocos/animation/embedded-player/embedded-animation-clip-player.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { ccclass, serializable } from 'cc.decorator'; import { errorID } from '../../core'; import type { Node } from '../../scene-graph/node'; diff --git a/cocos/animation/embedded-player/embedded-particle-system-player.ts b/cocos/animation/embedded-player/embedded-particle-system-player.ts index 5237770dc6..95c064d3c3 100644 --- a/cocos/animation/embedded-player/embedded-particle-system-player.ts +++ b/cocos/animation/embedded-player/embedded-particle-system-player.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { ccclass, serializable } from 'cc.decorator'; import type { ParticleSystem } from '../../particle'; import { warn, js } from '../../core'; diff --git a/cocos/animation/embedded-player/embedded-player.ts b/cocos/animation/embedded-player/embedded-player.ts index e030f924a0..b82766acd2 100644 --- a/cocos/animation/embedded-player/embedded-player.ts +++ b/cocos/animation/embedded-player/embedded-player.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { ccclass, serializable } from 'cc.decorator'; import { EditorExtendable } from '../../core'; import type { Node } from '../../scene-graph'; diff --git a/cocos/animation/exotic-animation/exotic-animation.ts b/cocos/animation/exotic-animation/exotic-animation.ts index 6bb465e3ad..991feb00ea 100644 --- a/cocos/animation/exotic-animation/exotic-animation.ts +++ b/cocos/animation/exotic-animation/exotic-animation.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { EDITOR, TEST } from 'internal:constants'; import { binarySearchEpsilon, clamp, lerp, Quat, Vec3, assertIsTrue, _decorator } from '../../core'; import { CLASS_NAME_PREFIX_ANIM } from '../define'; diff --git a/cocos/animation/global-animation-manager.ts b/cocos/animation/global-animation-manager.ts index 2daebf943e..839d834bc4 100644 --- a/cocos/animation/global-animation-manager.ts +++ b/cocos/animation/global-animation-manager.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { cclegacy } from '../core'; import type { AnimationManager } from './animation-manager'; diff --git a/cocos/animation/index.ts b/cocos/animation/index.ts index 2d43a25679..3459dba706 100644 --- a/cocos/animation/index.ts +++ b/cocos/animation/index.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import * as animation from './animation'; diff --git a/cocos/animation/internal-symbols.ts b/cocos/animation/internal-symbols.ts index 37aa284775..32122fcacb 100644 --- a/cocos/animation/internal-symbols.ts +++ b/cocos/animation/internal-symbols.ts @@ -1,2 +1,26 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + export const BAKE_SKELETON_CURVE_SYMBOL = Symbol('BakeNodeCurves'); diff --git a/cocos/animation/kinematics/ccd.ts b/cocos/animation/kinematics/ccd.ts index 335ead5177..4bd4b66c24 100644 --- a/cocos/animation/kinematics/ccd.ts +++ b/cocos/animation/kinematics/ccd.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { assertIsTrue } from '../../data/utils/asserts'; import { Quat } from '../../math/quat'; diff --git a/cocos/animation/legacy-clip-data.ts b/cocos/animation/legacy-clip-data.ts index 48f5a21cbb..48d2efd7df 100644 --- a/cocos/animation/legacy-clip-data.ts +++ b/cocos/animation/legacy-clip-data.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { ComponentPath, HierarchyPath, TargetPath } from './target-path'; import { IValueProxyFactory } from './value-proxy'; import { easing, QuatCurve, QuatInterpolationMode, RealCurve, RealInterpolationMode, RealKeyframeValue, TangentWeightMode, diff --git a/cocos/animation/marionette/__tmp__/graph-description.ts b/cocos/animation/marionette/__tmp__/graph-description.ts index 74a4240d0d..e368fc7813 100644 --- a/cocos/animation/marionette/__tmp__/graph-description.ts +++ b/cocos/animation/marionette/__tmp__/graph-description.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + export interface GraphDescription { vars?: Array<{ name: string; diff --git a/cocos/animation/marionette/__tmp__/graph-from-description.ts b/cocos/animation/marionette/__tmp__/graph-from-description.ts index 96b9853017..9c68c8a9cb 100644 --- a/cocos/animation/marionette/__tmp__/graph-from-description.ts +++ b/cocos/animation/marionette/__tmp__/graph-from-description.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { Vec2 } from '../../../core'; import { AnimationGraph, State, StateMachine, AnimationTransition } from '../animation-graph'; import { Condition, BinaryCondition, TriggerCondition, UnaryCondition } from '../condition'; diff --git a/cocos/animation/marionette/animation-blend-1d.ts b/cocos/animation/marionette/animation-blend-1d.ts index fd13ac7e52..9936d791d5 100644 --- a/cocos/animation/marionette/animation-blend-1d.ts +++ b/cocos/animation/marionette/animation-blend-1d.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { _decorator } from '../../core'; import { createEval } from './create-eval'; import { BindableNumber, bindOr, VariableType } from './parametric'; diff --git a/cocos/animation/marionette/animation-blend-2d.ts b/cocos/animation/marionette/animation-blend-2d.ts index d1ca5a516f..3cac99fa5f 100644 --- a/cocos/animation/marionette/animation-blend-2d.ts +++ b/cocos/animation/marionette/animation-blend-2d.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { Vec2, _decorator, ccenum } from '../../core'; import { createEval } from './create-eval'; import { AnimationBlend, AnimationBlendEval, AnimationBlendItem } from './animation-blend'; diff --git a/cocos/animation/marionette/animation-blend-direct.ts b/cocos/animation/marionette/animation-blend-direct.ts index 1a3f9b3e14..1fe5f4f115 100644 --- a/cocos/animation/marionette/animation-blend-direct.ts +++ b/cocos/animation/marionette/animation-blend-direct.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { _decorator } from '../../core'; import { createEval } from './create-eval'; import { MotionEvalContext } from './motion'; diff --git a/cocos/animation/marionette/animation-blend.ts b/cocos/animation/marionette/animation-blend.ts index 505c2b0f7a..cab4aba206 100644 --- a/cocos/animation/marionette/animation-blend.ts +++ b/cocos/animation/marionette/animation-blend.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { _decorator, EditorExtendable, editorExtrasTag } from '../../core'; import { MotionEvalContext, Motion, MotionEval, OverrideClipContext } from './motion'; import { createEval } from './create-eval'; diff --git a/cocos/animation/marionette/animation-controller.ts b/cocos/animation/marionette/animation-controller.ts index 3fb3ab9d2b..ba0c9c0cd8 100644 --- a/cocos/animation/marionette/animation-controller.ts +++ b/cocos/animation/marionette/animation-controller.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { Component } from '../../scene-graph/component'; import { AnimationGraph } from './animation-graph'; import type { AnimationGraphRunTime } from './animation-graph'; diff --git a/cocos/animation/marionette/animation-graph-editor-extras-clone-helper.ts b/cocos/animation/marionette/animation-graph-editor-extras-clone-helper.ts index bbbe4dac4c..c78f30e94d 100644 --- a/cocos/animation/marionette/animation-graph-editor-extras-clone-helper.ts +++ b/cocos/animation/marionette/animation-graph-editor-extras-clone-helper.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { EditorExtendableObject, editorExtrasTag } from '../../core/data/editor-extras-tag'; /** diff --git a/cocos/animation/marionette/animation-graph-like.ts b/cocos/animation/marionette/animation-graph-like.ts index 86059790a5..d6e3b82928 100644 --- a/cocos/animation/marionette/animation-graph-like.ts +++ b/cocos/animation/marionette/animation-graph-like.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { ccclass } from 'cc.decorator'; import { Asset } from '../../asset/assets/asset'; import { CLASS_NAME_PREFIX_ANIM } from '../define'; diff --git a/cocos/animation/marionette/animation-graph-variant.ts b/cocos/animation/marionette/animation-graph-variant.ts index 7e68862508..b57dcd8a25 100644 --- a/cocos/animation/marionette/animation-graph-variant.ts +++ b/cocos/animation/marionette/animation-graph-variant.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { ccclass, editable, serializable, type } from 'cc.decorator'; import { removeIf } from '../../core/utils/array'; import { AnimationClip } from '../animation-clip'; diff --git a/cocos/animation/marionette/animation-graph.ts b/cocos/animation/marionette/animation-graph.ts index ef817d5203..b6f574dd11 100644 --- a/cocos/animation/marionette/animation-graph.ts +++ b/cocos/animation/marionette/animation-graph.ts @@ -1,9 +1,32 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { ccclass, serializable } from 'cc.decorator'; import { DEBUG } from 'internal:constants'; -import { js, clamp, assertIsNonNullable, assertIsTrue, EditorExtendable, move } from '../../core'; +import { js, clamp, assertIsNonNullable, assertIsTrue, EditorExtendable, shift } from '../../core'; import { MotionEval, MotionEvalContext } from './motion'; import type { Condition } from './condition'; -import { Asset } from '../../asset/assets'; import { OwnedBy, assertsOwnedBy, own, markAsDangling, ownerSymbol } from './ownership'; import { TriggerResetMode, Value, VariableType } from './variable'; import { InvalidTransitionError } from './errors'; @@ -578,7 +601,7 @@ export class StateMachine extends EditorExtendable { } // eslint-disable-next-line no-lone-blocks { // 2. Adjust the order in outgoing array. - move(outgoings, iAdjusting, iNew); + shift(outgoings, iAdjusting, iNew); } } @@ -901,7 +924,7 @@ export class AnimationGraph extends AnimationGraphLike implements AnimationGraph * @param newIndex */ public moveLayer (index: number, newIndex: number) { - move(this._layers, index, newIndex); + shift(this._layers, index, newIndex); } /** diff --git a/cocos/animation/marionette/animation-mask.ts b/cocos/animation/marionette/animation-mask.ts index 9127f8e4f2..ab1f0ca4e7 100644 --- a/cocos/animation/marionette/animation-mask.ts +++ b/cocos/animation/marionette/animation-mask.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { ccclass, serializable, editable, type } from 'cc.decorator'; import type { Node } from '../../scene-graph/node'; import { Asset } from '../../asset/assets/asset'; diff --git a/cocos/animation/marionette/asset-creation.ts b/cocos/animation/marionette/asset-creation.ts index 57a8863a88..bbc8d26c55 100644 --- a/cocos/animation/marionette/asset-creation.ts +++ b/cocos/animation/marionette/asset-creation.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + export { InvalidTransitionError, VariableNotDefinedError } from './errors'; export { AnimationGraph, isAnimationTransition, StateMachine, SubStateMachine, EmptyStateTransition, EmptyState } from './animation-graph'; export type { Transition, AnimationTransition, Layer, State, VariableDescription } from './animation-graph'; diff --git a/cocos/animation/marionette/blend-1d.ts b/cocos/animation/marionette/blend-1d.ts index 89f051b867..9a1fca0ffe 100644 --- a/cocos/animation/marionette/blend-1d.ts +++ b/cocos/animation/marionette/blend-1d.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + export function blend1D (weights: number[], thresholds: readonly number[], value: number) { weights.fill(0.0); if (thresholds.length === 0) { diff --git a/cocos/animation/marionette/blend-2d.ts b/cocos/animation/marionette/blend-2d.ts index 96e6b85a33..7b0b634ea9 100644 --- a/cocos/animation/marionette/blend-2d.ts +++ b/cocos/animation/marionette/blend-2d.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { assertIsTrue, Vec2, Vec3 } from '../../core'; /** diff --git a/cocos/animation/marionette/clip-motion.ts b/cocos/animation/marionette/clip-motion.ts index 2a8294fd38..4df0929c43 100644 --- a/cocos/animation/marionette/clip-motion.ts +++ b/cocos/animation/marionette/clip-motion.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { editorExtrasTag, _decorator, EditorExtendable } from '../../core'; import { AnimationClip } from '../animation-clip'; import { AnimationState } from '../animation-state'; diff --git a/cocos/animation/marionette/condition.ts b/cocos/animation/marionette/condition.ts index f5489bce02..9afcf24682 100644 --- a/cocos/animation/marionette/condition.ts +++ b/cocos/animation/marionette/condition.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { VariableType, BindableBoolean, BindableNumber, BindContext, bindOr, validateVariableExistence, diff --git a/cocos/animation/marionette/create-eval.ts b/cocos/animation/marionette/create-eval.ts index e2355aaeaf..e4a29d38e3 100644 --- a/cocos/animation/marionette/create-eval.ts +++ b/cocos/animation/marionette/create-eval.ts @@ -1 +1,25 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + export const createEval = Symbol('[[createEval]]'); diff --git a/cocos/animation/marionette/errors.ts b/cocos/animation/marionette/errors.ts index 3ff36a1605..b05acd090a 100644 --- a/cocos/animation/marionette/errors.ts +++ b/cocos/animation/marionette/errors.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + export class InvalidTransitionError extends Error { constructor (type: 'to-entry' | 'to-any' | 'from-exit') { super(`${type} transition is invalid`); diff --git a/cocos/animation/marionette/graph-debug.ts b/cocos/animation/marionette/graph-debug.ts index 400796acd1..e867439bf8 100644 --- a/cocos/animation/marionette/graph-debug.ts +++ b/cocos/animation/marionette/graph-debug.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { EDITOR } from 'internal:constants'; import { editorExtrasTag } from '../../core'; diff --git a/cocos/animation/marionette/graph-eval.ts b/cocos/animation/marionette/graph-eval.ts index b54d8aa731..44ab2ff804 100644 --- a/cocos/animation/marionette/graph-eval.ts +++ b/cocos/animation/marionette/graph-eval.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { DEBUG } from 'internal:constants'; import { AnimationGraph, Layer, StateMachine, State, isAnimationTransition, diff --git a/cocos/animation/marionette/index-empty.ts b/cocos/animation/marionette/index-empty.ts index 336ce12bb9..4d527fe969 100644 --- a/cocos/animation/marionette/index-empty.ts +++ b/cocos/animation/marionette/index-empty.ts @@ -1 +1,25 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + export {} diff --git a/cocos/animation/marionette/motion-state.ts b/cocos/animation/marionette/motion-state.ts index 445e385c42..35e6b62630 100644 --- a/cocos/animation/marionette/motion-state.ts +++ b/cocos/animation/marionette/motion-state.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { ccclass, serializable } from 'cc.decorator'; import { Motion } from './motion'; import { State, InteractiveState } from './state'; diff --git a/cocos/animation/marionette/motion.ts b/cocos/animation/marionette/motion.ts index 19258c21ce..c1dc77cf6e 100644 --- a/cocos/animation/marionette/motion.ts +++ b/cocos/animation/marionette/motion.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { Node } from '../../scene-graph'; import { AnimationMask } from './animation-mask'; import { createEval } from './create-eval'; diff --git a/cocos/animation/marionette/ownership.ts b/cocos/animation/marionette/ownership.ts index 6a9e3f30b2..390b0a34c3 100644 --- a/cocos/animation/marionette/ownership.ts +++ b/cocos/animation/marionette/ownership.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { DEBUG } from 'internal:constants'; import { assertIsTrue } from '../../core'; diff --git a/cocos/animation/marionette/parametric.ts b/cocos/animation/marionette/parametric.ts index a4adb8df94..f43d31c0ee 100644 --- a/cocos/animation/marionette/parametric.ts +++ b/cocos/animation/marionette/parametric.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { _decorator } from '../../core'; import { CLASS_NAME_PREFIX_ANIM } from '../define'; import { VariableNotDefinedError, VariableTypeMismatchedError } from './errors'; diff --git a/cocos/animation/marionette/runtime-exports.ts b/cocos/animation/marionette/runtime-exports.ts index 4bec8bf929..af1296a12c 100644 --- a/cocos/animation/marionette/runtime-exports.ts +++ b/cocos/animation/marionette/runtime-exports.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import './animation-graph'; import './clip-motion'; import './animation-blend-1d'; diff --git a/cocos/animation/marionette/state-machine-component.ts b/cocos/animation/marionette/state-machine-component.ts index 875fe85120..fad89c5253 100644 --- a/cocos/animation/marionette/state-machine-component.ts +++ b/cocos/animation/marionette/state-machine-component.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { ccclass } from 'cc.decorator'; import { CLASS_NAME_PREFIX_ANIM } from '../define'; import type { AnimationController, MotionStateStatus } from './animation-controller'; diff --git a/cocos/animation/marionette/state.ts b/cocos/animation/marionette/state.ts index 073ac783bb..20732ee303 100644 --- a/cocos/animation/marionette/state.ts +++ b/cocos/animation/marionette/state.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { OwnedBy, ownerSymbol } from './ownership'; import type { Layer, StateMachine, TransitionInternal } from './animation-graph'; import { EditorExtendable, js, editorExtrasTag, _decorator } from '../../core'; diff --git a/cocos/animation/marionette/variable.ts b/cocos/animation/marionette/variable.ts index 3906056fdc..280a92f574 100644 --- a/cocos/animation/marionette/variable.ts +++ b/cocos/animation/marionette/variable.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + /** * @en * Represents variable's value. diff --git a/cocos/animation/playable.ts b/cocos/animation/playable.ts index c0b0d66aa6..635cd30ca6 100644 --- a/cocos/animation/playable.ts +++ b/cocos/animation/playable.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { getError } from '../core'; diff --git a/cocos/animation/pose-output.ts b/cocos/animation/pose-output.ts index d1616d5f8a..ee6bb9a420 100644 --- a/cocos/animation/pose-output.ts +++ b/cocos/animation/pose-output.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { BlendStateBuffer, BlendingPropertyName, BlendStateWriter } from '../3d/skeletal-animation/skeletal-animation-blending'; import type { Node } from '../scene-graph'; diff --git a/cocos/animation/skeletal-animation-utils.ts b/cocos/animation/skeletal-animation-utils.ts index e702d16d2e..3f137e84dd 100644 --- a/cocos/animation/skeletal-animation-utils.ts +++ b/cocos/animation/skeletal-animation-utils.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Mat4 } from '../core'; import { Node } from '../scene-graph/node'; diff --git a/cocos/animation/target-path.ts b/cocos/animation/target-path.ts index d344e608c8..daa64ec762 100644 --- a/cocos/animation/target-path.ts +++ b/cocos/animation/target-path.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, serializable } from 'cc.decorator'; import { Node } from '../scene-graph/node'; diff --git a/cocos/animation/tracks/array-track.ts b/cocos/animation/tracks/array-track.ts index c8915fe219..fb135cb120 100644 --- a/cocos/animation/tracks/array-track.ts +++ b/cocos/animation/tracks/array-track.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { _decorator, RealCurve } from '../../core'; import { CLASS_NAME_PREFIX_ANIM, createEvalSymbol } from '../define'; import { Channel, RealChannel, RuntimeBinding, Track } from './track'; diff --git a/cocos/animation/tracks/color-track.ts b/cocos/animation/tracks/color-track.ts index 0773a8fcba..abfa306368 100644 --- a/cocos/animation/tracks/color-track.ts +++ b/cocos/animation/tracks/color-track.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { ccclass, serializable } from 'cc.decorator'; import { RealCurve, Color } from '../../core'; import { CLASS_NAME_PREFIX_ANIM, createEvalSymbol } from '../define'; diff --git a/cocos/animation/tracks/object-track.ts b/cocos/animation/tracks/object-track.ts index 6239e3a831..5d895d2a23 100644 --- a/cocos/animation/tracks/object-track.ts +++ b/cocos/animation/tracks/object-track.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { ccclass } from 'cc.decorator'; import { ObjectCurve } from '../../core'; import { CLASS_NAME_PREFIX_ANIM } from '../define'; diff --git a/cocos/animation/tracks/quat-track.ts b/cocos/animation/tracks/quat-track.ts index a304cd2618..07d957d0c5 100644 --- a/cocos/animation/tracks/quat-track.ts +++ b/cocos/animation/tracks/quat-track.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { ccclass } from 'cc.decorator'; import { QuatCurve, Quat } from '../../core'; import { CLASS_NAME_PREFIX_ANIM, createEvalSymbol } from '../define'; diff --git a/cocos/animation/tracks/real-track.ts b/cocos/animation/tracks/real-track.ts index d553c3cf0b..82ad7db530 100644 --- a/cocos/animation/tracks/real-track.ts +++ b/cocos/animation/tracks/real-track.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { ccclass } from 'cc.decorator'; import { RealCurve } from '../../core'; import { CLASS_NAME_PREFIX_ANIM } from '../define'; diff --git a/cocos/animation/tracks/size-track.ts b/cocos/animation/tracks/size-track.ts index ea4efcfb00..77aefa52bf 100644 --- a/cocos/animation/tracks/size-track.ts +++ b/cocos/animation/tracks/size-track.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { ccclass, serializable } from 'cc.decorator'; import { RealCurve, Size } from '../../core'; import { CLASS_NAME_PREFIX_ANIM, createEvalSymbol } from '../define'; diff --git a/cocos/animation/tracks/track.ts b/cocos/animation/tracks/track.ts index 5b221771d7..720ea552c8 100644 --- a/cocos/animation/tracks/track.ts +++ b/cocos/animation/tracks/track.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { ccclass, serializable, uniquelyReferenced } from 'cc.decorator'; import { SUPPORT_JIT } from 'internal:constants'; import type { Component } from '../../scene-graph/component'; diff --git a/cocos/animation/tracks/untyped-track.ts b/cocos/animation/tracks/untyped-track.ts index 9c7c825edf..d81433921d 100644 --- a/cocos/animation/tracks/untyped-track.ts +++ b/cocos/animation/tracks/untyped-track.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { ccclass, serializable } from 'cc.decorator'; import { RealCurve, Color, Size, Vec2, Vec3, Vec4, getError } from '../../core'; import { CLASS_NAME_PREFIX_ANIM, createEvalSymbol } from '../define'; diff --git a/cocos/animation/tracks/utils.ts b/cocos/animation/tracks/utils.ts index b2ca4e78b8..7e9a43f064 100644 --- a/cocos/animation/tracks/utils.ts +++ b/cocos/animation/tracks/utils.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import type { Curve } from './track'; export function maskIfEmpty (curve: T) { diff --git a/cocos/animation/tracks/vector-track.ts b/cocos/animation/tracks/vector-track.ts index a51152d3e7..55238c106c 100644 --- a/cocos/animation/tracks/vector-track.ts +++ b/cocos/animation/tracks/vector-track.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { ccclass, serializable } from 'cc.decorator'; import { RealCurve, Vec2, Vec3, Vec4 } from '../../core'; import { CLASS_NAME_PREFIX_ANIM, createEvalSymbol } from '../define'; diff --git a/cocos/animation/transform-utils.ts b/cocos/animation/transform-utils.ts index 528ed16c4f..7b9b7bf065 100644 --- a/cocos/animation/transform-utils.ts +++ b/cocos/animation/transform-utils.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/animation/types.ts b/cocos/animation/types.ts index a7949ed790..2310e76609 100644 --- a/cocos/animation/types.ts +++ b/cocos/animation/types.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccenum, geometry } from '../core'; diff --git a/cocos/animation/value-proxy-factories/index.ts b/cocos/animation/value-proxy-factories/index.ts index f289d423b4..001b4f9817 100644 --- a/cocos/animation/value-proxy-factories/index.ts +++ b/cocos/animation/value-proxy-factories/index.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ export * from './uniform'; diff --git a/cocos/animation/value-proxy-factories/morph-weights.ts b/cocos/animation/value-proxy-factories/morph-weights.ts index c9253c2a75..783b8933e7 100644 --- a/cocos/animation/value-proxy-factories/morph-weights.ts +++ b/cocos/animation/value-proxy-factories/morph-weights.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, serializable } from 'cc.decorator'; import { MeshRenderer } from '../../3d/framework/mesh-renderer'; diff --git a/cocos/animation/value-proxy-factories/uniform.ts b/cocos/animation/value-proxy-factories/uniform.ts index e3df5b0e5f..4a3b8c039f 100644 --- a/cocos/animation/value-proxy-factories/uniform.ts +++ b/cocos/animation/value-proxy-factories/uniform.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, float, serializable } from 'cc.decorator'; import { builtinResMgr } from '../../asset/asset-manager'; diff --git a/cocos/animation/value-proxy.ts b/cocos/animation/value-proxy.ts index cfb6d0dd89..3bab33889a 100644 --- a/cocos/animation/value-proxy.ts +++ b/cocos/animation/value-proxy.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ /** * @en diff --git a/cocos/asset/asset-manager/asset-manager.ts b/cocos/asset/asset-manager/asset-manager.ts index d5ae847181..fbcd0e121b 100644 --- a/cocos/asset/asset-manager/asset-manager.ts +++ b/cocos/asset/asset-manager/asset-manager.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2019-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { BUILD, EDITOR, PREVIEW } from 'internal:constants'; import { Asset } from '../assets/asset'; diff --git a/cocos/asset/asset-manager/builtin-res-mgr.jsb.ts b/cocos/asset/asset-manager/builtin-res-mgr.jsb.ts index b410840547..55680b0294 100644 --- a/cocos/asset/asset-manager/builtin-res-mgr.jsb.ts +++ b/cocos/asset/asset-manager/builtin-res-mgr.jsb.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/asset/asset-manager/builtin-res-mgr.ts b/cocos/asset/asset-manager/builtin-res-mgr.ts index 0273e79ab7..d07222ab14 100644 --- a/cocos/asset/asset-manager/builtin-res-mgr.ts +++ b/cocos/asset/asset-manager/builtin-res-mgr.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { EDITOR, TEST } from 'internal:constants'; import { Asset } from '../assets/asset'; diff --git a/cocos/asset/asset-manager/bundle.ts b/cocos/asset/asset-manager/bundle.ts index 2fd23b143d..457433ead3 100644 --- a/cocos/asset/asset-manager/bundle.ts +++ b/cocos/asset/asset-manager/bundle.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2019-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Asset } from '../assets/asset'; import { SceneAsset } from '../assets/scene-asset'; diff --git a/cocos/asset/asset-manager/cache-manager.ts b/cocos/asset/asset-manager/cache-manager.ts index 446eb42e10..78bcc2836f 100644 --- a/cocos/asset/asset-manager/cache-manager.ts +++ b/cocos/asset/asset-manager/cache-manager.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import Cache from './cache'; diff --git a/cocos/asset/asset-manager/cache.ts b/cocos/asset/asset-manager/cache.ts index f7497a3e95..cd330011bb 100644 --- a/cocos/asset/asset-manager/cache.ts +++ b/cocos/asset/asset-manager/cache.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2019-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { js } from '../../core'; diff --git a/cocos/asset/asset-manager/config.ts b/cocos/asset/asset-manager/config.ts index 8b777e67fe..94244aa993 100644 --- a/cocos/asset/asset-manager/config.ts +++ b/cocos/asset/asset-manager/config.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2019-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { EDITOR, TEST } from 'internal:constants'; import { Asset } from '../assets'; import { js, cclegacy } from '../../core'; diff --git a/cocos/asset/asset-manager/depend-maps.ts b/cocos/asset/asset-manager/depend-maps.ts index 04d981e801..796cee74b7 100644 --- a/cocos/asset/asset-manager/depend-maps.ts +++ b/cocos/asset/asset-manager/depend-maps.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import type { Asset } from '../assets/asset'; import type { IDependProp } from './deserialize'; diff --git a/cocos/asset/asset-manager/depend-util.ts b/cocos/asset/asset-manager/depend-util.ts index 78f44a333a..c1006247ef 100644 --- a/cocos/asset/asset-manager/depend-util.ts +++ b/cocos/asset/asset-manager/depend-util.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2019-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { BUILD, EDITOR } from 'internal:constants'; import { Asset } from '../assets'; diff --git a/cocos/asset/asset-manager/deprecated.ts b/cocos/asset/asset-manager/deprecated.ts index 483ff850f6..d1edb87def 100644 --- a/cocos/asset/asset-manager/deprecated.ts +++ b/cocos/asset/asset-manager/deprecated.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2019-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { BUILD } from 'internal:constants'; import { Asset } from '../assets/asset'; diff --git a/cocos/asset/asset-manager/deserialize.ts b/cocos/asset/asset-manager/deserialize.ts index fa86844be8..f17a748b8d 100644 --- a/cocos/asset/asset-manager/deserialize.ts +++ b/cocos/asset/asset-manager/deserialize.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2019-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { EDITOR } from 'internal:constants'; import { Asset } from '../assets/asset'; diff --git a/cocos/asset/asset-manager/download-dom-image.ts b/cocos/asset/asset-manager/download-dom-image.ts index 7b1210ae5d..cf94dc4507 100644 --- a/cocos/asset/asset-manager/download-dom-image.ts +++ b/cocos/asset/asset-manager/download-dom-image.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -22,9 +21,10 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { getError } from '../../core'; +import { ccwindow } from '../../core/global-exports'; import { CompleteCallback, IDownloadParseOptions } from './shared'; export default function downloadDomImage ( @@ -32,9 +32,9 @@ export default function downloadDomImage ( options: IDownloadParseOptions, onComplete: CompleteCallback, ): HTMLImageElement { - const img = new Image(); + const img = new ccwindow.Image(); - if (window.location.protocol !== 'file:') { + if (ccwindow.location.protocol !== 'file:') { img.crossOrigin = 'anonymous'; } diff --git a/cocos/asset/asset-manager/download-file.ts b/cocos/asset/asset-manager/download-file.ts index 1b3eb54b6c..884999a4f1 100644 --- a/cocos/asset/asset-manager/download-file.ts +++ b/cocos/asset/asset-manager/download-file.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2019-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { CompleteCallback, IXHROptions } from './shared'; diff --git a/cocos/asset/asset-manager/download-script.ts b/cocos/asset/asset-manager/download-script.ts index 920a001bac..ed6a576a54 100644 --- a/cocos/asset/asset-manager/download-script.ts +++ b/cocos/asset/asset-manager/download-script.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2019-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,11 +20,14 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { getError } from '../../core'; +import { ccwindow } from '../../core/global-exports'; import { CompleteCallback, IBundleOptions } from './shared'; +const ccdocument = ccwindow.document; + const downloaded = {}; export default function downloadScript ( @@ -39,9 +41,9 @@ export default function downloadScript ( return null; } - const script = document.createElement('script'); + const script = ccdocument.createElement('script'); - if (window.location.protocol !== 'file:') { + if (ccwindow.location.protocol !== 'file:') { script.crossOrigin = 'anonymous'; } @@ -64,6 +66,6 @@ export default function downloadScript ( script.addEventListener('load', loadHandler, false); script.addEventListener('error', errorHandler, false); - document.body.appendChild(script); + ccdocument.body.appendChild(script); return script; } diff --git a/cocos/asset/asset-manager/downloader.ts b/cocos/asset/asset-manager/downloader.ts index 2a2140343d..b793ccb30e 100644 --- a/cocos/asset/asset-manager/downloader.ts +++ b/cocos/asset/asset-manager/downloader.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2019-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { BUILD, EDITOR } from 'internal:constants'; import { sys, js, misc, path, cclegacy } from '../../core'; diff --git a/cocos/asset/asset-manager/editor-path-replace.ts b/cocos/asset/asset-manager/editor-path-replace.ts index 99e346576a..3d59343bab 100644 --- a/cocos/asset/asset-manager/editor-path-replace.ts +++ b/cocos/asset/asset-manager/editor-path-replace.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { EDITOR, NATIVE, PREVIEW, TEST } from 'internal:constants'; import { assert, Settings, settings } from '../../core'; import { fetchPipeline, pipeline } from './shared'; diff --git a/cocos/asset/asset-manager/factory.ts b/cocos/asset/asset-manager/factory.ts index 767edaca23..8ba6311fac 100644 --- a/cocos/asset/asset-manager/factory.ts +++ b/cocos/asset/asset-manager/factory.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { EDITOR } from 'internal:constants'; import { ImageAsset } from '../assets/image-asset'; diff --git a/cocos/asset/asset-manager/fetch.ts b/cocos/asset/asset-manager/fetch.ts index 433f270516..a6ccddaa69 100644 --- a/cocos/asset/asset-manager/fetch.ts +++ b/cocos/asset/asset-manager/fetch.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2019-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Asset } from '../assets'; import { error, cclegacy } from '../../core'; diff --git a/cocos/asset/asset-manager/helper.ts b/cocos/asset/asset-manager/helper.ts index 1f0f1fabce..a9dd6dca57 100644 --- a/cocos/asset/asset-manager/helper.ts +++ b/cocos/asset/asset-manager/helper.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2019-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { cclegacy, error } from '../../core'; import RequestItem from './request-item'; import { bundles, Request, IOptions, transformPipeline } from './shared'; diff --git a/cocos/asset/asset-manager/index.ts b/cocos/asset/asset-manager/index.ts index c500c464e6..16eea9c92a 100644 --- a/cocos/asset/asset-manager/index.ts +++ b/cocos/asset/asset-manager/index.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/asset/asset-manager/load.ts b/cocos/asset/asset-manager/load.ts index 7f59f6a2e0..e34806028c 100644 --- a/cocos/asset/asset-manager/load.ts +++ b/cocos/asset/asset-manager/load.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2019-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { BUILD, EDITOR, PREVIEW } from 'internal:constants'; import { Asset } from '../assets/asset'; import { error, cclegacy } from '../../core'; diff --git a/cocos/asset/asset-manager/pack-manager.ts b/cocos/asset/asset-manager/pack-manager.ts index 2983cda257..b89dc340bc 100644 --- a/cocos/asset/asset-manager/pack-manager.ts +++ b/cocos/asset/asset-manager/pack-manager.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2019-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ImageAsset } from '../assets/image-asset'; import { Texture2D } from '../assets/texture-2d'; diff --git a/cocos/asset/asset-manager/parser.ts b/cocos/asset/asset-manager/parser.ts index 5db2bb183d..be212f8429 100644 --- a/cocos/asset/asset-manager/parser.ts +++ b/cocos/asset/asset-manager/parser.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2019-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ImageAsset, IMemoryImageSource } from '../assets/image-asset'; import { js } from '../../core'; diff --git a/cocos/asset/asset-manager/pipeline.ts b/cocos/asset/asset-manager/pipeline.ts index 3a6f4746c9..79022ae73a 100644 --- a/cocos/asset/asset-manager/pipeline.ts +++ b/cocos/asset/asset-manager/pipeline.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2019-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { warnID } from '../../core'; import { CompleteCallbackNoData } from './shared'; diff --git a/cocos/asset/asset-manager/plist-parser.ts b/cocos/asset/asset-manager/plist-parser.ts index 872ac35822..5f24099099 100644 --- a/cocos/asset/asset-manager/plist-parser.ts +++ b/cocos/asset/asset-manager/plist-parser.ts @@ -2,16 +2,16 @@ Copyright (c) 2008-2010 Ricardo Quesada Copyright (c) 2011-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +23,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { warnID } from '../../core'; @@ -34,7 +34,7 @@ import { warnID } from '../../core'; export class SAXParser { private _parser: DOMParser | null = null; constructor () { - if (window.DOMParser) { + if (globalThis.DOMParser) { this._parser = new DOMParser(); } } diff --git a/cocos/asset/asset-manager/preprocess.ts b/cocos/asset/asset-manager/preprocess.ts index 00d6434ad5..003cc6f2e7 100644 --- a/cocos/asset/asset-manager/preprocess.ts +++ b/cocos/asset/asset-manager/preprocess.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { CompleteCallbackNoData, RequestType, transformPipeline } from './shared'; import Task from './task'; diff --git a/cocos/asset/asset-manager/release-manager.ts b/cocos/asset/asset-manager/release-manager.ts index 6d987f156b..f703cecfbe 100644 --- a/cocos/asset/asset-manager/release-manager.ts +++ b/cocos/asset/asset-manager/release-manager.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2019-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { EDITOR, TEST } from 'internal:constants'; import { Asset } from '../assets/asset'; diff --git a/cocos/asset/asset-manager/request-item.ts b/cocos/asset/asset-manager/request-item.ts index 51fe901f80..a2dee831f1 100644 --- a/cocos/asset/asset-manager/request-item.ts +++ b/cocos/asset/asset-manager/request-item.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2019-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import Config, { IAssetInfo } from './config'; diff --git a/cocos/asset/asset-manager/shared.ts b/cocos/asset/asset-manager/shared.ts index f3a8cd5682..33bc4a13b2 100644 --- a/cocos/asset/asset-manager/shared.ts +++ b/cocos/asset/asset-manager/shared.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2019-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { EDITOR } from 'internal:constants'; import { Asset } from '../assets/asset'; diff --git a/cocos/asset/asset-manager/task.ts b/cocos/asset/asset-manager/task.ts index 22207ab1a6..2fef31571d 100644 --- a/cocos/asset/asset-manager/task.ts +++ b/cocos/asset/asset-manager/task.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2019-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ export type TaskCompleteCallback = (err: Error | null | undefined, data: any) => void; export type TaskProgressCallback = (...args: any[]) => void; diff --git a/cocos/asset/asset-manager/url-transformer.ts b/cocos/asset/asset-manager/url-transformer.ts index 14df853436..9de1437fc1 100644 --- a/cocos/asset/asset-manager/url-transformer.ts +++ b/cocos/asset/asset-manager/url-transformer.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { EDITOR, PREVIEW } from 'internal:constants'; import { warnID, js, path, cclegacy } from '../../core'; diff --git a/cocos/asset/asset-manager/utilities.ts b/cocos/asset/asset-manager/utilities.ts index 57edc9f496..3e6d4f5caf 100644 --- a/cocos/asset/asset-manager/utilities.ts +++ b/cocos/asset/asset-manager/utilities.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2019-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { EDITOR } from 'internal:constants'; import { Asset } from '../assets/asset'; diff --git a/cocos/asset/asset-manager/weak-cache.ts b/cocos/asset/asset-manager/weak-cache.ts index 24250f4a11..5a6d2a842a 100644 --- a/cocos/asset/asset-manager/weak-cache.ts +++ b/cocos/asset/asset-manager/weak-cache.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { js } from '../../core'; import { ICache } from './cache'; diff --git a/cocos/asset/assets/asset-enum.ts b/cocos/asset/assets/asset-enum.ts index 0fbb8df3fe..45c56e7214 100644 --- a/cocos/asset/assets/asset-enum.ts +++ b/cocos/asset/assets/asset-enum.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Address, Filter as GFXFilter, Format } from '../../gfx'; diff --git a/cocos/asset/assets/asset.jsb.ts b/cocos/asset/assets/asset.jsb.ts index 415fd025f1..55caae9c28 100644 --- a/cocos/asset/assets/asset.jsb.ts +++ b/cocos/asset/assets/asset.jsb.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/asset/assets/asset.ts b/cocos/asset/assets/asset.ts index dad2ce2da6..aedaaa6b93 100644 --- a/cocos/asset/assets/asset.ts +++ b/cocos/asset/assets/asset.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/asset/assets/buffer-asset.jsb.ts b/cocos/asset/assets/buffer-asset.jsb.ts index 3a66036f72..e62c491d05 100644 --- a/cocos/asset/assets/buffer-asset.jsb.ts +++ b/cocos/asset/assets/buffer-asset.jsb.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/asset/assets/buffer-asset.ts b/cocos/asset/assets/buffer-asset.ts index 93c6bbc322..a293e8301a 100644 --- a/cocos/asset/assets/buffer-asset.ts +++ b/cocos/asset/assets/buffer-asset.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/asset/assets/deprecation.ts b/cocos/asset/assets/deprecation.ts index 3853919b3b..658d521382 100644 --- a/cocos/asset/assets/deprecation.ts +++ b/cocos/asset/assets/deprecation.ts @@ -1,27 +1,26 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - */ + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ import { removeProperty, replaceProperty } from '../../core'; import { TextureBase } from './texture-base'; diff --git a/cocos/asset/assets/effect-asset.jsb.ts b/cocos/asset/assets/effect-asset.jsb.ts index ea755afd46..ebe182c4d9 100644 --- a/cocos/asset/assets/effect-asset.jsb.ts +++ b/cocos/asset/assets/effect-asset.jsb.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/asset/assets/effect-asset.ts b/cocos/asset/assets/effect-asset.ts index 4d1106848a..018cc78e79 100644 --- a/cocos/asset/assets/effect-asset.ts +++ b/cocos/asset/assets/effect-asset.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -34,7 +33,7 @@ import { programLib } from '../../render-scene/core/program-lib'; import { Asset } from './asset'; import { cclegacy, warnID } from '../../core'; import { ProgramLibrary } from '../../rendering/custom/private'; -import { getCombinationDefines } from '../../render-scene/core/program-utils'; +import { addEffectDefaultProperties, getCombinationDefines } from '../../render-scene/core/program-utils'; export declare namespace EffectAsset { export interface IPropertyInfo { @@ -302,6 +301,7 @@ export class EffectAsset extends Asset { */ public onLoaded () { if (cclegacy.rendering && cclegacy.rendering.enableEffectImport) { + addEffectDefaultProperties(this); (cclegacy.rendering.programLib as ProgramLibrary).addEffect(this); } else { programLib.register(this); diff --git a/cocos/asset/assets/image-asset.jsb.ts b/cocos/asset/assets/image-asset.jsb.ts index 8955904247..de0cffc104 100644 --- a/cocos/asset/assets/image-asset.jsb.ts +++ b/cocos/asset/assets/image-asset.jsb.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -31,6 +30,7 @@ import './asset'; export type ImageAsset = jsb.ImageAsset; export const ImageAsset = jsb.ImageAsset; +const jsbWindow = jsb.window; export interface IMemoryImageSource { _data: ArrayBufferView | null; @@ -58,7 +58,7 @@ function isNativeImage (imageSource: ImageSource): imageSource is (HTMLImageElem return false; } - return imageSource instanceof HTMLImageElement || imageSource instanceof HTMLCanvasElement || isImageBitmap(imageSource); + return imageSource instanceof jsbWindow.HTMLImageElement || imageSource instanceof jsbWindow.HTMLCanvasElement || isImageBitmap(imageSource); } const imageAssetProto = ImageAsset.prototype; @@ -88,7 +88,7 @@ Object.defineProperty(imageAssetProto, '_nativeAsset', { return this._nativeData; }, set (value: ImageSource) { - if (!(value instanceof HTMLElement) && !isImageBitmap(value)) { + if (!(value instanceof jsbWindow.HTMLElement) && !isImageBitmap(value)) { // @ts-expect-error internal API usage value.format = value.format || this.format; } @@ -116,19 +116,22 @@ imageAssetProto._setRawAsset = function (filename: string, inLibrary = true) { } }; + imageAssetProto.reset = function (data: ImageSource) { this._nativeData = data; - if (!(data instanceof HTMLElement)) { + if (!(data instanceof jsbWindow.HTMLElement)) { // @ts-expect-error internal api usage - this.format = data.format; + if(data.format !== undefined) { + this.format = (data as any).format; + } } this._syncDataToNative(); }; const superDestroy = jsb.Asset.prototype.destroy; imageAssetProto.destroy = function () { - if(this.data && this.data instanceof HTMLImageElement) { + if(this.data && this.data instanceof jsbWindow.HTMLImageElement) { this.data.src = ''; this._setRawAsset(''); this.data.destroy(); @@ -163,16 +166,20 @@ imageAssetProto._syncDataToNative = function () { this.setHeight(this._height); this.url = this.nativeUrl; - if (data instanceof HTMLCanvasElement) { + if (data instanceof jsbWindow.HTMLCanvasElement) { this.setData(data._data.data); } - else if (data instanceof HTMLImageElement) { + else if (data instanceof jsbWindow.HTMLImageElement) { this.setData(data._data); if (data._mipmapLevelDataSize){ this.setMipmapLevelDataSize(data._mipmapLevelDataSize); } } else { + if(!this._nativeData._data){ + console.error(`[ImageAsset] setData bad argument ${this._nativeData}`); + return; + } this.setData(this._nativeData._data); if (this._nativeData.mipmapLevelDataSize) { this.setMipmapLevelDataSize(this._nativeData.mipmapLevelDataSize); diff --git a/cocos/asset/assets/image-asset.ts b/cocos/asset/assets/image-asset.ts index 04e6197778..b1d42e0f1b 100644 --- a/cocos/asset/assets/image-asset.ts +++ b/cocos/asset/assets/image-asset.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -30,6 +29,7 @@ import { Device, Format, FormatFeatureBit, deviceManager } from '../../gfx'; import { Asset } from './asset'; import { PixelFormat } from './asset-enum'; import { warnID, macro, sys, cclegacy } from '../../core'; +import { ccwindow } from '../../core/global-exports'; import { Enum } from '../../core/value-types/enum'; // Compress mipmap constants @@ -522,7 +522,7 @@ export class ImageAsset extends Asset { * @zh 此图像资源是 mipmap 时,获取每层数据大小。 * @engineInternal */ - get mipmapLevelDataSize () : number[] | undefined { + get mipmapLevelDataSize (): number[] | undefined { return (this._nativeData as IMemoryImageSource).mipmapLevelDataSize; } @@ -691,7 +691,7 @@ export class ImageAsset extends Asset { public initDefault (uuid?: string) { super.initDefault(uuid); if (!ImageAsset._sharedPlaceHolderCanvas) { - const canvas = document.createElement('canvas'); + const canvas = ccwindow.document.createElement('canvas'); const context = canvas.getContext('2d')!; const l = canvas.width = canvas.height = 2; context.fillStyle = '#ff00ff'; diff --git a/cocos/asset/assets/index.jsb.ts b/cocos/asset/assets/index.jsb.ts index 597ec3f683..3518a821bc 100644 --- a/cocos/asset/assets/index.jsb.ts +++ b/cocos/asset/assets/index.jsb.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/asset/assets/index.ts b/cocos/asset/assets/index.ts index 2f05f9dc49..5d070e946e 100644 --- a/cocos/asset/assets/index.ts +++ b/cocos/asset/assets/index.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/asset/assets/json-asset.ts b/cocos/asset/assets/json-asset.ts index 2d8ad6757e..f1be660d7b 100644 --- a/cocos/asset/assets/json-asset.ts +++ b/cocos/asset/assets/json-asset.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/asset/assets/material.jsb.ts b/cocos/asset/assets/material.jsb.ts index 3205fa8e5c..52c9fcacde 100644 --- a/cocos/asset/assets/material.jsb.ts +++ b/cocos/asset/assets/material.jsb.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/asset/assets/material.ts b/cocos/asset/assets/material.ts index eff9066baa..cc829215c5 100644 --- a/cocos/asset/assets/material.ts +++ b/cocos/asset/assets/material.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/asset/assets/render-texture.jsb.ts b/cocos/asset/assets/render-texture.jsb.ts index 4155da455a..0b416023b4 100644 --- a/cocos/asset/assets/render-texture.jsb.ts +++ b/cocos/asset/assets/render-texture.jsb.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/asset/assets/render-texture.ts b/cocos/asset/assets/render-texture.ts index 4285ae9104..1761837f37 100644 --- a/cocos/asset/assets/render-texture.ts +++ b/cocos/asset/assets/render-texture.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/asset/assets/rendering-sub-mesh.jsb.ts b/cocos/asset/assets/rendering-sub-mesh.jsb.ts index 5c61c5d2a3..1fbf56f9c2 100644 --- a/cocos/asset/assets/rendering-sub-mesh.jsb.ts +++ b/cocos/asset/assets/rendering-sub-mesh.jsb.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { Vec3 } from "../../core"; import { Attribute, PrimitiveMode, Buffer } from "../../gfx"; diff --git a/cocos/asset/assets/rendering-sub-mesh.ts b/cocos/asset/assets/rendering-sub-mesh.ts index 7619db48b6..494abe068b 100644 --- a/cocos/asset/assets/rendering-sub-mesh.ts +++ b/cocos/asset/assets/rendering-sub-mesh.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/asset/assets/scene-asset.jsb.ts b/cocos/asset/assets/scene-asset.jsb.ts index 20cdb514ad..09b61dfe26 100644 --- a/cocos/asset/assets/scene-asset.jsb.ts +++ b/cocos/asset/assets/scene-asset.jsb.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/asset/assets/scene-asset.ts b/cocos/asset/assets/scene-asset.ts index c1d6e15f4a..967f4a5710 100644 --- a/cocos/asset/assets/scene-asset.ts +++ b/cocos/asset/assets/scene-asset.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/asset/assets/scripts.ts b/cocos/asset/assets/scripts.ts index 6b93d403b6..6c99c16dd0 100644 --- a/cocos/asset/assets/scripts.ts +++ b/cocos/asset/assets/scripts.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/asset/assets/simple-texture.jsb.ts b/cocos/asset/assets/simple-texture.jsb.ts index 58a372c416..687541f105 100644 --- a/cocos/asset/assets/simple-texture.jsb.ts +++ b/cocos/asset/assets/simple-texture.jsb.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -34,6 +33,8 @@ declare const jsb: any; export type SimpleTexture = jsb.SimpleTexture; export const SimpleTexture: any = jsb.SimpleTexture; +const jsbWindow = jsb.window; + SimpleTexture.Filter = Filter; SimpleTexture.PixelFormat = PixelFormat; SimpleTexture.WrapMode = WrapMode; @@ -42,10 +43,10 @@ const simpleTextureProto = jsb.SimpleTexture.prototype; const oldUpdateDataFunc = simpleTextureProto.uploadData; simpleTextureProto.uploadData = function (source, level = 0, arrayIndex = 0) { let data; - if (source instanceof HTMLCanvasElement) { + if (source instanceof jsbWindow.HTMLCanvasElement) { // @ts-ignore data = source.data; - } else if (source instanceof HTMLImageElement) { + } else if (source instanceof jsbWindow.HTMLImageElement) { // @ts-ignore data = source._data; } else if (ArrayBuffer.isView(source)) { diff --git a/cocos/asset/assets/simple-texture.ts b/cocos/asset/assets/simple-texture.ts index 3061a41495..6fc118a9da 100644 --- a/cocos/asset/assets/simple-texture.ts +++ b/cocos/asset/assets/simple-texture.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass } from 'cc.decorator'; import { DEV } from 'internal:constants'; diff --git a/cocos/asset/assets/text-asset.jsb.ts b/cocos/asset/assets/text-asset.jsb.ts index 8eba45ccbb..0385ddc391 100644 --- a/cocos/asset/assets/text-asset.jsb.ts +++ b/cocos/asset/assets/text-asset.jsb.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/asset/assets/text-asset.ts b/cocos/asset/assets/text-asset.ts index 0a0aa5e275..0d702f7f20 100644 --- a/cocos/asset/assets/text-asset.ts +++ b/cocos/asset/assets/text-asset.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/asset/assets/texture-2d.jsb.ts b/cocos/asset/assets/texture-2d.jsb.ts index 20718c5674..b060a3d09e 100644 --- a/cocos/asset/assets/texture-2d.jsb.ts +++ b/cocos/asset/assets/texture-2d.jsb.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/asset/assets/texture-2d.ts b/cocos/asset/assets/texture-2d.ts index 44f454c844..260deef79e 100644 --- a/cocos/asset/assets/texture-2d.ts +++ b/cocos/asset/assets/texture-2d.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/asset/assets/texture-base.jsb.ts b/cocos/asset/assets/texture-base.jsb.ts index fd6a40d300..9f94cfe8f9 100644 --- a/cocos/asset/assets/texture-base.jsb.ts +++ b/cocos/asset/assets/texture-base.jsb.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/asset/assets/texture-base.ts b/cocos/asset/assets/texture-base.ts index 64c41f58ee..28e9aaaf91 100644 --- a/cocos/asset/assets/texture-base.ts +++ b/cocos/asset/assets/texture-base.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/asset/assets/texture-cube.jsb.ts b/cocos/asset/assets/texture-cube.jsb.ts index ccaee669f9..bfc9ba5139 100644 --- a/cocos/asset/assets/texture-cube.jsb.ts +++ b/cocos/asset/assets/texture-cube.jsb.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/asset/assets/texture-cube.ts b/cocos/asset/assets/texture-cube.ts index ccd72899a4..8a8afac52d 100644 --- a/cocos/asset/assets/texture-cube.ts +++ b/cocos/asset/assets/texture-cube.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -29,7 +28,7 @@ import { TextureType, TextureInfo, TextureViewInfo, BufferTextureCopy } from '.. import { ImageAsset } from './image-asset'; import { PresumedGFXTextureInfo, PresumedGFXTextureViewInfo, SimpleTexture } from './simple-texture'; import { ITexture2DCreateInfo, Texture2D } from './texture-2d'; -import { legacyCC } from '../../core/global-exports'; +import { legacyCC, ccwindow } from '../../core/global-exports'; import { js, sys } from '../../core'; import { OS } from '../../../pal/system-info/enum-type'; @@ -198,10 +197,10 @@ export class TextureCube extends SimpleTexture { const layout = this._mipmapAtlas.layout; const mip0Layout = layout[0]; - const ctx = Object.assign(document.createElement('canvas'), { + const ctx = Object.assign(ccwindow.document.createElement('canvas'), { width: imageAtlasAsset.width, height: imageAtlasAsset.height, - }).getContext('2d'); + }).getContext('2d')!; this.reset({ width: mip0Layout.width, @@ -213,10 +212,10 @@ export class TextureCube extends SimpleTexture { for (let j = 0; j < layout.length; j++) { const layoutInfo = layout[j]; _forEachFace(faceAtlas, (face, faceIndex) => { - ctx!.clearRect(0, 0, imageAtlasAsset.width, imageAtlasAsset.height); + ctx.clearRect(0, 0, imageAtlasAsset.width, imageAtlasAsset.height); const drawImg = face.data as HTMLImageElement; - ctx!.drawImage(drawImg, 0, 0); - const rawData = ctx!.getImageData(layoutInfo.left, layoutInfo.top, layoutInfo.width, layoutInfo.height); + ctx.drawImage(drawImg, 0, 0); + const rawData = ctx.getImageData(layoutInfo.left, layoutInfo.top, layoutInfo.width, layoutInfo.height); const bufferAsset = new ImageAsset({ _data: rawData.data, diff --git a/cocos/audio/audio-clip.ts b/cocos/audio/audio-clip.ts index 65514ec11c..83a089072c 100644 --- a/cocos/audio/audio-clip.ts +++ b/cocos/audio/audio-clip.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, serializable, override } from 'cc.decorator'; import { AudioPlayer } from 'pal/audio'; diff --git a/cocos/audio/audio-downloader.ts b/cocos/audio/audio-downloader.ts index 9fa0cb4973..88f1c34ada 100644 --- a/cocos/audio/audio-downloader.ts +++ b/cocos/audio/audio-downloader.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -22,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { AudioPlayer } from 'pal/audio'; import { AudioClip, AudioMeta } from './audio-clip'; diff --git a/cocos/audio/audio-manager.ts b/cocos/audio/audio-manager.ts index 4b9bdfe76f..ae57641770 100644 --- a/cocos/audio/audio-manager.ts +++ b/cocos/audio/audio-manager.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { AudioPlayer, OneShotAudio } from 'pal/audio'; import { js } from '../core'; diff --git a/cocos/audio/audio-source.ts b/cocos/audio/audio-source.ts index f76d304cce..98d1f3271d 100644 --- a/cocos/audio/audio-source.ts +++ b/cocos/audio/audio-source.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { AudioPlayer } from 'pal/audio'; import { ccclass, help, menu, tooltip, type, range, serializable } from 'cc.decorator'; diff --git a/cocos/audio/deprecated.ts b/cocos/audio/deprecated.ts index d27a19d438..b9cb6b8e22 100644 --- a/cocos/audio/deprecated.ts +++ b/cocos/audio/deprecated.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { AudioSource } from './audio-source'; import { replaceProperty, markAsWarning } from '../core'; diff --git a/cocos/audio/index.ts b/cocos/audio/index.ts index 56da6bce31..c73c3c34f7 100644 --- a/cocos/audio/index.ts +++ b/cocos/audio/index.ts @@ -1,26 +1,25 @@ /* -Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. +Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license -to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The software or tools in this License Agreement are licensed, not sold. -Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. */ import './audio-downloader'; diff --git a/cocos/core/algorithm/atob.ts b/cocos/core/algorithm/atob.ts deleted file mode 100644 index dfd0eb04be..0000000000 --- a/cocos/core/algorithm/atob.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - Copyright (c) 2018-2020 Xiamen Yaji Software Co., Ltd. - - https://www.cocos.com/ - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. -*/ - -export function atob (input: string): string { - const keyStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; - let output = ''; - let chr1 = 0; let chr2 = 0; let chr3 = 0; - let enc1 = 0; let enc2 = 0; let enc3 = 0; let enc4 = 0; - let i = 0; - // eslint-disable-next-line no-useless-escape - input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ''); - do { - enc1 = keyStr.indexOf(input.charAt(i++)); - enc2 = keyStr.indexOf(input.charAt(i++)); - enc3 = keyStr.indexOf(input.charAt(i++)); - enc4 = keyStr.indexOf(input.charAt(i++)); - chr1 = enc1 << 2 | enc2 >> 4; - chr2 = (enc2 & 15) << 4 | enc3 >> 2; - chr3 = (enc3 & 3) << 6 | enc4; - output += String.fromCharCode(chr1); - if (enc3 !== 64) { - output += String.fromCharCode(chr2); - } - if (enc4 !== 64) { - output += String.fromCharCode(chr3); - } - } while (i < input.length); - return output; -} diff --git a/cocos/core/algorithm/binary-search.ts b/cocos/core/algorithm/binary-search.ts index a570cd9b0c..bad62deeea 100644 --- a/cocos/core/algorithm/binary-search.ts +++ b/cocos/core/algorithm/binary-search.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -25,12 +24,12 @@ */ /** - * Searches the **sorted** number array for an element and returns the index of that element. + * Searches the **ascending sorted** array for an element and returns the index of that element. * @param array The array to search in. * @param value The value to search. - * @return The index of the searched element in the sorted array, if one is found; - * otherwise, a negative number that is the bitwise complement of the index of the next element that is large than the searched value or, - * if there is no larger element(include the case that the array is empty), the bitwise complement of array's length. + * @returns The index of the searched element in the sorted array, if found; + * otherwise, returns the complement of the index of the next element greater than the element to be searched or, + * returns the complement of array's length if no element is greater than the element to be searched or the array is empty. * @engineInternal */ export function binarySearch (array: number[], value: number) { @@ -38,13 +37,13 @@ export function binarySearch (array: number[], value: number) { } /** - * Searches the **sorted** number array for an element and returns the index of that element. + * Searches the **ascending sorted** number array for an element and returns the index of that element. * @param array The array to search in. * @param value The value to search. * @param EPSILON The epsilon to compare the numbers. Default to `1e-6`. - * @return The index of the searched element in the sorted array, if one is found; - * otherwise, a negative number that is the bitwise complement of the index of the next element that is large than the searched value or, - * if there is no larger element(include the case that the array is empty), the bitwise complement of array's length. + * @returns The index of the searched element in the sorted array, if found; + * otherwise, returns the complement of the index of the next element greater than the element to be searched or, + * returns the complement of array's length if no element is greater than the element to be searched or the array is empty. * @engineInternal */ export function binarySearchEpsilon (array: Readonly>, value: number, EPSILON = 1e-6) { @@ -65,13 +64,13 @@ export function binarySearchEpsilon (array: Readonly>, value: } /** - * Searches the **sorted** array for an element and returns the index of that element. + * Searches the **ascending sorted** array for an element and returns the index of that element. * @param array The array to search in. * @param value The value to search. - * @param lessThan The predicate which implements the less than semantic. - * @return The index of the searched element in the sorted array, if one is found; - * otherwise, a negative number that is the bitwise complement of the index of the next element that is large than the searched value or, - * if there is no larger element(include the case that the array is empty), the bitwise complement of array's length. + * @param lessThan Comparison function object which returns ​true if the first argument is less than the second. + * @returns The index of the searched element in the sorted array, if found; + * otherwise, returns the complement of the index of the next element greater than the searching element or, + * returns the complement of array's length if no element is greater than the searching element or the array is empty. * @engineInternal */ export function binarySearchBy (array: T[], value: U, lessThan: (lhs: T, rhs: U) => number) { diff --git a/cocos/core/algorithm/easing.ts b/cocos/core/algorithm/easing.ts index c4b408f1f4..60ed26f4bf 100644 --- a/cocos/core/algorithm/easing.ts +++ b/cocos/core/algorithm/easing.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,24 +20,50 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ +// Easing functions specify the speed at which an animation progresses at different points within the animation. + +/** + * @en Not any easing effect. + * @zh 没有任何缓动效果。 + */ export function constant () { return 0; } +/** + * @en A linear function, `f(k) = k`. Result correlates to input value one to one. + * Refer to [this doc](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html) for graphic feature. + * @zh 线性函数,`f(k) = k`。返回值和输入值一一对应。具体效果可以参考[该文档](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html)。 + */ export function linear (k: number) { return k; } +/** + * @en A quadratic function, f(k) = k * k. The interpolation starts slowly, then progressively speeds up until the end, + * at which point it stops abruptly. Refer to [this doc](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html) for graphic feature. + * @zh 一个二次方的函数,f(k) = k * k。插值开始时很慢,然后逐渐加快,直到结束,并突然停止。具体效果可以参考[该文档](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html)。 + */ export function quadIn (k: number) { return k * k; } +/** + * @en A quadratic function, f(k) = k * (2-k). The interpolation starts abruptly and then progressively slows down towards the end. Refer to + * [this doc](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html) for graphic feature. + * @zh 一个二次方的函数,f(k) = k * (2-k)。插值开始时很突然,然后在接近尾声时逐渐减慢。具体效果可以参考[该文档](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html)。 + */ export function quadOut (k: number) { return k * (2 - k); } +/** + * @en The interpolation starts slowly, speeds up, and then slows down towards the end. Refer to + * [this doc](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html) graphic feature. + * @zh 插值开始时很慢,接着加快,然后在接近尾声时减慢。具体效果可以参考[该文档](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html)。 + */ export function quadInOut (k: number) { k *= 2; if (k < 1) { @@ -47,14 +72,28 @@ export function quadInOut (k: number) { return -0.5 * (--k * (k - 2) - 1); } +/** + * @en Starts slowly and accelerates. Refer to [this doc](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html) for graphic feature. + * @zh 启动慢,加速快。具体效果可以参考[该文档](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html)。 + */ export function cubicIn (k: number) { return k * k * k; } +/** + * @en Starts quickly and decelerates. + * Refer to [this doc](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html) for graphic feature. + * @zh 起动迅速,减速慢。具体效果可以参考[该文档](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html)。 + */ export function cubicOut (k: number) { return --k * k * k + 1; } +/** + * @en Accelerates the animation at the beginning, and decelerates the animation at the end. + * Refer to [this doc](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html) for graphic feature. + * @zh 在开始时加速动画,在结束时减慢动画的速度。具体效果可以参考[该文档](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html)。 + */ export function cubicInOut (k: number) { k *= 2; if (k < 1) { @@ -63,14 +102,28 @@ export function cubicInOut (k: number) { return 0.5 * ((k -= 2) * k * k + 2); } +/** + * @en Starts slowly and accelerates. Refer to [this doc](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html) for graphic feature. + * @zh 启动慢,加速快。具体效果可以参考[该文档](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html)。 + */ export function quartIn (k: number) { return k * k * k * k; } +/** + * @en Starts quickly and decelerates. + * Refer to [this doc](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html) for graphic feature. + * @zh 起动迅速,减速慢。具体效果可以参考[该文档](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html)。 + */ export function quartOut (k: number) { return 1 - (--k * k * k * k); } +/** + * @en Accelerates the animation at the beginning, and decelerates the animation at the end. + * Refer to [this doc](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html) for graphic feature. + * @zh 在开始时加速动画,在结束时减慢动画的速度。具体效果可以参考[该文档](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html)。 + */ export function quartInOut (k: number) { k *= 2; if (k < 1) { @@ -79,14 +132,28 @@ export function quartInOut (k: number) { return -0.5 * ((k -= 2) * k * k * k - 2); } +/** + * @en Starts slowly and accelerates. Refer to [this doc](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html) for graphic feature. + * @zh 启动慢,加速快。具体效果可以参考[该文档](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html)。 + */ export function quintIn (k: number) { return k * k * k * k * k; } +/** + * @en Starts quickly and decelerates. + * Refer to [this doc](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html) for graphic feature. + * @zh 起动迅速,减速慢。具体效果可以参考[该文档](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html)。 + */ export function quintOut (k: number) { return --k * k * k * k * k + 1; } +/** + * @en Accelerates the animation at the beginning, and decelerates the animation at the end. + * Refer to [this doc](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html) for graphic feature. + * @zh 在开始时加速动画,在结束时减慢动画的速度。具体效果可以参考[该文档](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html)。 + */ export function quintInOut (k: number) { k *= 2; if (k < 1) { @@ -95,6 +162,11 @@ export function quintInOut (k: number) { return 0.5 * ((k -= 2) * k * k * k * k + 2); } +/** + * @en Smoothly accelerates the animation. + * Refer to [this doc](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html) for graphic feature. + * @zh 平滑地加速动画。具体效果可以参考[该文档](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html)。 + */ export function sineIn (k: number) { if (k === 1) { return 1; @@ -102,22 +174,46 @@ export function sineIn (k: number) { return 1 - Math.cos(k * Math.PI / 2); } +/** + * @en Smoothly decelerates the animation. + * Refer to [this doc](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html) for graphic feature. + * @zh 平滑地使动画降速。具体效果可以参考[该文档](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html)。 + */ export function sineOut (k: number) { return Math.sin(k * Math.PI / 2); } +/** + * @en Smoothly accelerates the animation at the beginning, and smoothly decelerates the animation at the end. + * Refer to [this doc](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html) for graphic feature. + * @zh 在开始时平滑地加速动画,在结束时平滑地减速动画。具体效果可以参考[该文档](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html)。 + */ export function sineInOut (k: number) { return 0.5 * (1 - Math.cos(Math.PI * k)); } +/** + * @en Starts slowly and accelerates. Refer to [this doc](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html) for graphic feature. + * @zh 启动慢,加速快。具体效果可以参考[该文档](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html)。 + */ export function expoIn (k: number) { return k === 0 ? 0 : Math.pow(1024, k - 1); } +/** + * @en Starts quickly and decelerates. + * Refer to [this doc](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html) for graphic feature. + * @zh 起动迅速,减速慢。具体效果可以参考[该文档](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html)。 + */ export function expoOut (k: number) { return k === 1 ? 1 : 1 - Math.pow(2, -10 * k); } +/** + * @en Accelerates the animation at the beginning, and decelerates the animation at the end. + * Refer to [this doc](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html) for graphic feature. + * @zh 在开始时加速动画,在结束时减慢动画的速度。具体效果可以参考[该文档](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html)。 + */ export function expoInOut (k: number) { if (k === 0) { return 0; @@ -132,14 +228,28 @@ export function expoInOut (k: number) { return 0.5 * (-Math.pow(2, -10 * (k - 1)) + 2); } +/** + * @en Starts slowly and accelerates. Refer to [this doc](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html) for graphic feature. + * @zh 启动慢,加速快。具体效果可以参考[该文档](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html)。 + */ export function circIn (k: number) { return 1 - Math.sqrt(1 - k * k); } +/** + * @en Starts quickly and decelerates. + * Refer to [this doc](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html) for graphic feature. + * @zh 起动迅速,减速慢。具体效果可以参考[该文档](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html)。 + */ export function circOut (k: number) { return Math.sqrt(1 - (--k * k)); } +/** + * @en Accelerates the animation at the beginning, and decelerates the animation at the end. + * Refer to [this doc](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html) for graphic feature. + * @zh 在开始时加速动画,在结束时减慢动画的速度。具体效果可以参考[该文档](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html)。 + */ export function circInOut (k: number) { k *= 2; if (k < 1) { @@ -148,6 +258,10 @@ export function circInOut (k: number) { return 0.5 * (Math.sqrt(1 - (k -= 2) * k) + 1); } +/** + * @en Refer to [this doc](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html) for graphic feature. + * @zh 具体效果可以参考[该文档](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html)。 + */ export function elasticIn (k: number) { let s; let a = 0.1; @@ -167,6 +281,10 @@ export function elasticIn (k: number) { return -(a * Math.pow(2, 10 * (k -= 1)) * Math.sin((k - s) * (2 * Math.PI) / p)); } +/** + * @en Refer to [this doc](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html) for graphic feature. + * @zh 具体效果可以参考[该文档](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html)。 + */ export function elasticOut (k: number) { let s; let a = 0.1; @@ -186,6 +304,10 @@ export function elasticOut (k: number) { return (a * Math.pow(2, -10 * k) * Math.sin((k - s) * (2 * Math.PI) / p) + 1); } +/** + * @en Refer to [this doc](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html) for graphic feature. + * @zh 具体效果可以参考[该文档](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html)。 + */ export function elasticInOut (k: number) { let s; let a = 0.1; @@ -210,6 +332,10 @@ export function elasticInOut (k: number) { return a * Math.pow(2, -10 * (k -= 1)) * Math.sin((k - s) * (2 * Math.PI) / p) * 0.5 + 1; } +/** + * @en Refer to [this doc](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html) for graphic feature. + * @zh 具体效果可以参考[该文档](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html)。 + */ export function backIn (k: number) { if (k === 1) { return 1; @@ -218,6 +344,10 @@ export function backIn (k: number) { return k * k * ((s + 1) * k - s); } +/** + * @en Refer to [this doc](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html) for graphic feature. + * @zh 具体效果可以参考[该文档](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html)。 + */ export function backOut (k: number) { if (k === 0) { return 0; @@ -226,6 +356,10 @@ export function backOut (k: number) { return --k * k * ((s + 1) * k + s) + 1; } +/** + * @en Refer to [this doc](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html) for graphic feature. + * @zh 具体效果可以参考[该文档](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html)。 + */ export function backInOut (k: number) { const s = 1.70158 * 1.525; k *= 2; @@ -239,6 +373,10 @@ export function bounceIn (k: number) { return 1 - bounceOut(1 - k); } +/** + * @en Refer to [this doc](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html) for graphic feature. + * @zh 具体效果可以参考[该文档](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html)。 + */ export function bounceOut (k: number) { if (k < (1 / 2.75)) { return 7.5625 * k * k; @@ -251,6 +389,10 @@ export function bounceOut (k: number) { } } +/** + * @en Refer to [this doc](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html) for graphic feature. + * @zh 具体效果可以参考[该文档](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html)。 + */ export function bounceInOut (k: number) { if (k < 0.5) { return bounceIn(k * 2) * 0.5; @@ -258,6 +400,10 @@ export function bounceInOut (k: number) { return bounceOut(k * 2 - 1) * 0.5 + 0.5; } +/** + * @en Refer to [this doc](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html) for graphic feature. + * @zh 具体效果可以参考[该文档](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html)。 + */ export function smooth (k: number) { if (k <= 0) { return 0; @@ -268,6 +414,10 @@ export function smooth (k: number) { return k * k * (3 - 2 * k); } +/** + * @en Refer to [this doc](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html) for graphic feature. + * @zh 具体效果可以参考[该文档](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html)。 + */ export function fade (k: number) { if (k <= 0) { return 0; @@ -278,15 +428,64 @@ export function fade (k: number) { return k * k * k * (k * (k * 6 - 15) + 10); } +/** + * @en Refer to [this doc](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html) for graphic feature. + * @zh 具体效果可以参考[该文档](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html)。 + */ export const quadOutIn = _makeOutIn(quadIn, quadOut); + +/** + * @en Refer to [this doc](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html) for graphic feature. + * @zh 具体效果可以参考[该文档](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html)。 + */ export const cubicOutIn = _makeOutIn(cubicIn, cubicOut); + +/** + * @en Refer to [this doc](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html) for graphic feature. + * @zh 具体效果可以参考[该文档](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html)。 + */ export const quartOutIn = _makeOutIn(quartIn, quartOut); + +/** + * @en Refer to [this doc](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html) for graphic feature. + * @zh 具体效果可以参考[该文档](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html)。 + */ export const quintOutIn = _makeOutIn(quintIn, quintOut); + +/** + * @en Refer to [this doc](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html) for graphic feature. + * @zh 具体效果可以参考[该文档](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html)。 + */ export const sineOutIn = _makeOutIn(sineIn, sineOut); + +/** + * @en Refer to [this doc](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html) for graphic feature. + * @zh 具体效果可以参考[该文档](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html)。 + */ export const expoOutIn = _makeOutIn(expoIn, expoOut); + +/** + * @en Refer to [this doc](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html) for graphic feature. + * @zh 具体效果可以参考[该文档](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html)。 + */ export const circOutIn = _makeOutIn(circIn, circOut); + +/** + * @en Refer to [this doc](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html) for graphic feature. + * @zh 具体效果可以参考[该文档](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html)。 + */ export const elasticOutIn = _makeOutIn(elasticIn, elasticOut); + +/** + * @en Refer to [this doc](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html) for graphic feature. + * @zh 具体效果可以参考[该文档](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html)。 + */ export const backOutIn = _makeOutIn(backIn, backOut); + +/** + * @en Refer to [this doc](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html) for graphic feature. + * @zh 具体效果可以参考[该文档](https://docs.cocos.com/creator/manual/zh/tween/tween-function.html)。 + */ export const bounceOutIn = _makeOutIn(bounceIn, bounceOut); function _makeOutIn (fnIn: (k: number) => number, fnOut: (k: number) => number) { diff --git a/cocos/core/algorithm/index.ts b/cocos/core/algorithm/index.ts index 127ebcecbf..59f939e41f 100644 --- a/cocos/core/algorithm/index.ts +++ b/cocos/core/algorithm/index.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/core/algorithm/move.ts b/cocos/core/algorithm/move.ts index b4f8401f11..89267bd2f5 100644 --- a/cocos/core/algorithm/move.ts +++ b/cocos/core/algorithm/move.ts @@ -1,28 +1,56 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { assertsArrayIndex } from '../data/utils/asserts'; /** - * Moves an array element to new location. - * @param array The array. - * @param index Index to the array element to move. - * @param newIndex New array index it should have. + * @en Circle shift an array once in range [first, last]. If `first < last`, then will do left circle shift; + * If `first > last`, then will do right circle shift; If `first == last`, there is not effect. + * @zh 在 [first, last] 范围做一次环形移动。如果 `first < last`,进行左环形移动;如果 `first > last`,进行右环 + * 形移动;如果 `first == last`,将没有效果。 + * @param array @en The array to be rotated. @zh 被修改的数组。 + * @param first @en The beginning of the original range. @zh 移动区间的起始坐标。 + * @param last @en The end of the original range. @zh 移动区间的结束坐标。 + * @returns @en The input array. @zh 输入的数组。 * @engineInternal */ -export function move (array: T[], index: number, newIndex: number) { - assertsArrayIndex(array, index); - assertsArrayIndex(array, newIndex); - if (index === newIndex) { +export function shift (array: T[], first: number, last: number) { + assertsArrayIndex(array, first); + assertsArrayIndex(array, last); + if (first === last) { return array; } - const element = array[index]; - if (index < newIndex) { // Shift right - for (let iElement = index + 1; iElement <= newIndex; ++iElement) { + const element = array[first]; + if (first < last) { // Shift left. + for (let iElement = first + 1; iElement <= last; ++iElement) { array[iElement - 1] = array[iElement]; } - } else { // Shift left - for (let iElement = index; iElement !== newIndex; --iElement) { + } else { // Shift right. + for (let iElement = first; iElement !== last; --iElement) { array[iElement] = array[iElement - 1]; } } - array[newIndex] = element; + array[last] = element; return array; } diff --git a/cocos/core/algorithm/murmurhash2_gc.ts b/cocos/core/algorithm/murmurhash2_gc.ts index 18824abd12..3ac32fc8ad 100644 --- a/cocos/core/algorithm/murmurhash2_gc.ts +++ b/cocos/core/algorithm/murmurhash2_gc.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ /* * JS Implementation of MurmurHash2 @@ -39,6 +38,13 @@ const getUint8ForString = String.prototype.charCodeAt; function getUint8ForArray (this: Uint8Array, idx: number) { return this[idx]; } +/** + * @en JS Implementation of MurmurHash2. Original implementation is http://github.com/garycourt/murmurhash-js. + * @zh MurmurHash2 的 JS 实现。原始实现是 http://github.com/garycourt/murmurhash-js 。 + * @param input @en ASCII string or a Uint8Array to be hashed. @zh 希望被哈希的 ASCII 字符串或者 Uint8Array. + * @param seed @en Hash seed. Should be a positive integer. @zh 哈希种子。必须是个正整数。 + * @returns @en 32-bit positive integer hash. @zh 32位正整数哈希值。 + */ export function murmurhash2_32_gc (input: string | Uint8Array, seed: number) { let l = input.length; let h = seed ^ l; @@ -62,10 +68,18 @@ export function murmurhash2_32_gc (input: string | Uint8Array, seed: number) { } switch (l) { + // Don't break in case 3 and case 2. case 3: h ^= (getUint8.call(input, i + 2) & 0xff) << 16; + // eslint-disable-next-line no-fallthrough case 2: h ^= (getUint8.call(input, i + 1) & 0xff) << 8; - case 1: h ^= (getUint8.call(input, i) & 0xff); + // eslint-disable-next-line no-fallthrough + case 1: + h ^= (getUint8.call(input, i) & 0xff); h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16)); + break; + default: + // do nothing, just make VSCode happy. + break; } h ^= h >>> 13; diff --git a/cocos/core/algorithm/partition.ts b/cocos/core/algorithm/partition.ts index 53a9acb4ea..4f0efe6502 100644 --- a/cocos/core/algorithm/partition.ts +++ b/cocos/core/algorithm/partition.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + /** * @zh * 就地重新排列数组中的元素, diff --git a/cocos/core/curves/bezier.ts b/cocos/core/curves/bezier.ts index d083073272..0e75dda1ea 100644 --- a/cocos/core/curves/bezier.ts +++ b/cocos/core/curves/bezier.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { legacyCC } from '../global-exports'; diff --git a/cocos/core/curves/curve-base.ts b/cocos/core/curves/curve-base.ts index 841b4fefb4..82c6f34a47 100644 --- a/cocos/core/curves/curve-base.ts +++ b/cocos/core/curves/curve-base.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + export interface CurveBase { readonly rangeMin: number; readonly rangeMax: number; diff --git a/cocos/core/curves/curve.ts b/cocos/core/curves/curve.ts index f0f405e76e..fe75283d18 100644 --- a/cocos/core/curves/curve.ts +++ b/cocos/core/curves/curve.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { assertIsTrue } from '../data/utils/asserts'; import { approx, lerp, pingPong, repeat } from '../math'; import { KeyframeCurve } from './keyframe-curve'; diff --git a/cocos/core/curves/easing-method.ts b/cocos/core/curves/easing-method.ts index f9468ada50..d17a1855bb 100644 --- a/cocos/core/curves/easing-method.ts +++ b/cocos/core/curves/easing-method.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import * as easing from '../algorithm/easing'; import { assertIsTrue } from '../data/utils/asserts'; diff --git a/cocos/core/curves/index.ts b/cocos/core/curves/index.ts index 70fdec1946..a4b6f14f07 100644 --- a/cocos/core/curves/index.ts +++ b/cocos/core/curves/index.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + export { RealCurve, RealInterpolationMode, diff --git a/cocos/core/curves/keyframe-curve.ts b/cocos/core/curves/keyframe-curve.ts index c06b467a62..23d1e093ce 100644 --- a/cocos/core/curves/keyframe-curve.ts +++ b/cocos/core/curves/keyframe-curve.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { binarySearchEpsilon } from '../algorithm/binary-search'; import { CCClass } from '../data/class'; import { assertIsTrue } from '../data/utils/asserts'; diff --git a/cocos/core/curves/keys-shared-curves.ts b/cocos/core/curves/keys-shared-curves.ts index c79095c881..f394cdd854 100644 --- a/cocos/core/curves/keys-shared-curves.ts +++ b/cocos/core/curves/keys-shared-curves.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { binarySearchEpsilon } from '../algorithm/binary-search'; import { ccclass, serializable } from '../data/decorators'; import { assertIsTrue } from '../data/utils/asserts'; diff --git a/cocos/core/curves/object-curve.ts b/cocos/core/curves/object-curve.ts index d2126073fc..c501a80518 100644 --- a/cocos/core/curves/object-curve.ts +++ b/cocos/core/curves/object-curve.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { ccclass } from '../data/decorators'; import { clamp } from '../math'; import { KeyframeCurve } from './keyframe-curve'; diff --git a/cocos/core/curves/quat-curve.ts b/cocos/core/curves/quat-curve.ts index 67ffc7fafc..fde7c9cf1a 100644 --- a/cocos/core/curves/quat-curve.ts +++ b/cocos/core/curves/quat-curve.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { assertIsTrue } from '../data/utils/asserts'; import { IQuatLike, pingPong, Quat, repeat } from '../math'; import { KeyframeCurve } from './keyframe-curve'; diff --git a/cocos/core/curves/real-curve-param.ts b/cocos/core/curves/real-curve-param.ts index 04d2dac803..d89cf15dff 100644 --- a/cocos/core/curves/real-curve-param.ts +++ b/cocos/core/curves/real-curve-param.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + /** * @en * The method used for interpolation method between value of a keyframe and its next keyframe. diff --git a/cocos/core/curves/solve-cubic.ts b/cocos/core/curves/solve-cubic.ts index b5bae6adb8..5a4174d738 100644 --- a/cocos/core/curves/solve-cubic.ts +++ b/cocos/core/curves/solve-cubic.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + // cSpell:words Cardano's irreducibilis /** diff --git a/cocos/core/data/class-decorator.ts b/cocos/core/data/class-decorator.ts index b522e928d1..984baf016f 100644 --- a/cocos/core/data/class-decorator.ts +++ b/cocos/core/data/class-decorator.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/core/data/class-stash.ts b/cocos/core/data/class-stash.ts index 05715a3d7a..181254dea2 100644 --- a/cocos/core/data/class-stash.ts +++ b/cocos/core/data/class-stash.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { IExposedAttributes } from './utils/attribute-defines'; /** diff --git a/cocos/core/data/class.ts b/cocos/core/data/class.ts index ee802d246e..91ca1e0b84 100644 --- a/cocos/core/data/class.ts +++ b/cocos/core/data/class.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -515,6 +514,7 @@ function parseAttributes (constructor: Function, attributes: PropertyStash, clas } parseSimpleAttribute('slide', 'boolean'); parseSimpleAttribute('unit', 'string'); + parseSimpleAttribute('userData', 'object'); } const isStandaloneMode = attributes.__internalFlags & PropertyStashInternalFlag.STANDALONE; diff --git a/cocos/core/data/custom-serializable.ts b/cocos/core/data/custom-serializable.ts index 121cd68bd0..1ae7850bac 100644 --- a/cocos/core/data/custom-serializable.ts +++ b/cocos/core/data/custom-serializable.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { assertIsNonNullable, assertIsTrue } from './utils/asserts'; /** diff --git a/cocos/core/data/decorators/ccclass.ts b/cocos/core/data/decorators/ccclass.ts index bd213685a5..f289da59d5 100644 --- a/cocos/core/data/decorators/ccclass.ts +++ b/cocos/core/data/decorators/ccclass.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { DEV } from 'internal:constants'; import { getSuper, mixin, getClassName } from '../../utils/js-typed'; diff --git a/cocos/core/data/decorators/component.ts b/cocos/core/data/decorators/component.ts index 3a07b3b90a..6f5469acad 100644 --- a/cocos/core/data/decorators/component.ts +++ b/cocos/core/data/decorators/component.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { DEV } from 'internal:constants'; import { CCClass } from '../class'; diff --git a/cocos/core/data/decorators/editable.ts b/cocos/core/data/decorators/editable.ts index 0852932154..f22c10cd8a 100644 --- a/cocos/core/data/decorators/editable.ts +++ b/cocos/core/data/decorators/editable.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { DEV } from 'internal:constants'; import { IExposedAttributes } from '../utils/attribute-defines'; diff --git a/cocos/core/data/decorators/index.ts b/cocos/core/data/decorators/index.ts index 0c2f2a065d..290e88ba37 100644 --- a/cocos/core/data/decorators/index.ts +++ b/cocos/core/data/decorators/index.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ export { ccclass } from './ccclass'; export * from './component'; diff --git a/cocos/core/data/decorators/override.ts b/cocos/core/data/decorators/override.ts index 5e1a753f02..642990ce47 100644 --- a/cocos/core/data/decorators/override.ts +++ b/cocos/core/data/decorators/override.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { LegacyPropertyDecorator } from './utils'; import { getOrCreatePropertyStash } from './property'; diff --git a/cocos/core/data/decorators/property.ts b/cocos/core/data/decorators/property.ts index 80727c956d..0f1f472ff3 100644 --- a/cocos/core/data/decorators/property.ts +++ b/cocos/core/data/decorators/property.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { DEV, EDITOR, JSB, TEST } from 'internal:constants'; import { CCString, CCInteger, CCFloat, CCBoolean } from '../utils/attribute'; diff --git a/cocos/core/data/decorators/serializable.ts b/cocos/core/data/decorators/serializable.ts index 0e92586d83..678683c582 100644 --- a/cocos/core/data/decorators/serializable.ts +++ b/cocos/core/data/decorators/serializable.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { EDITOR, TEST } from 'internal:constants'; import { emptyDecorator, LegacyPropertyDecorator } from './utils'; diff --git a/cocos/core/data/decorators/type.ts b/cocos/core/data/decorators/type.ts index 1f94d1d38b..b443de4091 100644 --- a/cocos/core/data/decorators/type.ts +++ b/cocos/core/data/decorators/type.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { LegacyPropertyDecorator } from './utils'; import { property } from './property'; diff --git a/cocos/core/data/decorators/utils.ts b/cocos/core/data/decorators/utils.ts index 3188a34023..1b7cddcb2b 100644 --- a/cocos/core/data/decorators/utils.ts +++ b/cocos/core/data/decorators/utils.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { DEV } from 'internal:constants'; import { CCClass } from '../class'; diff --git a/cocos/core/data/editor-extendable.ts b/cocos/core/data/editor-extendable.ts index eb50d52101..9a2fbb520b 100644 --- a/cocos/core/data/editor-extendable.ts +++ b/cocos/core/data/editor-extendable.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { EDITOR } from 'internal:constants'; import { ccclass, editorOnly } from 'cc.decorator'; import { getClassName } from '../utils/js'; diff --git a/cocos/core/data/editor-extras-tag.ts b/cocos/core/data/editor-extras-tag.ts index 2be03cd6b1..27081d7165 100644 --- a/cocos/core/data/editor-extras-tag.ts +++ b/cocos/core/data/editor-extras-tag.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + /** * Tag to visit editor extras of an object. Never concern about its value please. */ diff --git a/cocos/core/data/garbage-collection.ts b/cocos/core/data/garbage-collection.ts index 2f91688302..be818f15dd 100644 --- a/cocos/core/data/garbage-collection.ts +++ b/cocos/core/data/garbage-collection.ts @@ -1,15 +1,16 @@ /* - Copyright (c) 2019-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -17,7 +18,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { EDITOR } from 'internal:constants'; import { GCObject } from './gc-object'; diff --git a/cocos/core/data/gc-object.ts b/cocos/core/data/gc-object.ts index 2f90700efc..dd73447291 100644 --- a/cocos/core/data/gc-object.ts +++ b/cocos/core/data/gc-object.ts @@ -1,15 +1,16 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE diff --git a/cocos/core/data/index.ts b/cocos/core/data/index.ts index 7ee634ffd9..800783cf82 100644 --- a/cocos/core/data/index.ts +++ b/cocos/core/data/index.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2018-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2018-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/core/data/object.ts b/cocos/core/data/object.ts index 86421960e3..f6b56dada7 100644 --- a/cocos/core/data/object.ts +++ b/cocos/core/data/object.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -384,6 +383,16 @@ class CCObject implements EditorExtendableObject { } if (!EDITOR || legacyCC.GAME_VIEW) { + /*Native properties cannot be reset by _destruct, because the native properties are hung on the prototype and + *hasOwnProperty's detection cannot be passed. + */ + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-expect-error + if (JSB && this.destruct) { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-expect-error + this.destruct(); + } this._destruct(); } diff --git a/cocos/core/data/serialization-metadata.ts b/cocos/core/data/serialization-metadata.ts index 8c4a5106d3..c2b4e910cd 100644 --- a/cocos/core/data/serialization-metadata.ts +++ b/cocos/core/data/serialization-metadata.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + const sMetadataTag = Symbol('cc:SerializationMetadata'); /** diff --git a/cocos/core/data/utils/asserts.ts b/cocos/core/data/utils/asserts.ts index 3f418f2ffc..b85f31229d 100644 --- a/cocos/core/data/utils/asserts.ts +++ b/cocos/core/data/utils/asserts.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/core/data/utils/attribute-defines.ts b/cocos/core/data/utils/attribute-defines.ts index 1efe45de27..00ac68b39d 100644 --- a/cocos/core/data/utils/attribute-defines.ts +++ b/cocos/core/data/utils/attribute-defines.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ type GroupOptions = { name: string; } & Partial<{ id: string; @@ -142,6 +141,12 @@ export interface IExposedAttributes { * 转换为弧度 */ radian?: boolean; + + /** + * @en User custom data, which can be obtained through the `CCClass.attr()` interface. + * @zh 用户自定义数据,可以通过 `CCClass.attr()` 接口获取自定义数据。 + */ + userData?: Record; } export interface IAcceptableAttributes extends IExposedAttributes { diff --git a/cocos/core/data/utils/attribute.ts b/cocos/core/data/utils/attribute.ts index 2ece3db581..e39b2e0f3d 100644 --- a/cocos/core/data/utils/attribute.ts +++ b/cocos/core/data/utils/attribute.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/core/data/utils/compact-value-type-array.ts b/cocos/core/data/utils/compact-value-type-array.ts index 4594ffc456..8f85ee0f32 100644 --- a/cocos/core/data/utils/compact-value-type-array.ts +++ b/cocos/core/data/utils/compact-value-type-array.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, serializable } from 'cc.decorator'; import { Vec3, Quat, Vec4, Vec2, Mat4 } from '../../math'; diff --git a/cocos/core/data/utils/compiler.ts b/cocos/core/data/utils/compiler.ts index a0781472f0..36013d8aa7 100644 --- a/cocos/core/data/utils/compiler.ts +++ b/cocos/core/data/utils/compiler.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/core/data/utils/constget.ts b/cocos/core/data/utils/constget.ts index 73f1277f26..34e59b9b01 100644 --- a/cocos/core/data/utils/constget.ts +++ b/cocos/core/data/utils/constget.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { DEBUG } from 'internal:constants'; diff --git a/cocos/core/data/utils/extends-enum.ts b/cocos/core/data/utils/extends-enum.ts index 4feb509a8b..00cfbca3e9 100644 --- a/cocos/core/data/utils/extends-enum.ts +++ b/cocos/core/data/utils/extends-enum.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { DEV } from 'internal:constants'; import { errorID } from '../../platform/debug'; diff --git a/cocos/core/data/utils/preprocess-class.ts b/cocos/core/data/utils/preprocess-class.ts index 61613a5f90..503188ab8b 100644 --- a/cocos/core/data/utils/preprocess-class.ts +++ b/cocos/core/data/utils/preprocess-class.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/core/data/utils/requiring-frame.ts b/cocos/core/data/utils/requiring-frame.ts index ded6431183..98dff14dbf 100644 --- a/cocos/core/data/utils/requiring-frame.ts +++ b/cocos/core/data/utils/requiring-frame.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/core/deprecated-3.7.0.ts b/cocos/core/deprecated-3.7.0.ts index a7954f7217..a8c5cb7826 100644 --- a/cocos/core/deprecated-3.7.0.ts +++ b/cocos/core/deprecated-3.7.0.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { js, markAsWarning } from './utils'; diff --git a/cocos/core/deprecated.ts b/cocos/core/deprecated.ts index 6d1d77bce7..bf9f6451ed 100644 --- a/cocos/core/deprecated.ts +++ b/cocos/core/deprecated.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { replaceProperty, removeProperty } from './utils/x-deprecated'; import * as math from './math'; diff --git a/cocos/core/effect-settings.ts b/cocos/core/effect-settings.ts index 13fc7caa6f..11843fb0a3 100644 --- a/cocos/core/effect-settings.ts +++ b/cocos/core/effect-settings.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -27,56 +26,11 @@ import { legacyCC } from './global-exports'; declare const fsUtils: any; -/** - * @zh - * Settings 中的默认分组,通常与模块一一对应。 - * - * @en - * The default grouping in Settings, which usually corresponds to the module. - */ -enum Category { - PATH = 'path', - ENGINE = 'engine', - ASSETS = 'assets', - SCRIPTING = 'scripting', - PHYSICS = 'physics', - RENDERING = 'rendering', - LAUNCH = 'launch', - SCREEN = 'screen', - SPLASH_SCREEN = 'splashScreen', - ANIMATION = 'animation', - PROFILING = 'profiling', - PLUGINS = 'plugins', -} - -/** - * @zh - * 配置模块用于获取 settings.json 配置文件中的配置信息,同时你可以覆盖一些配置从而影响引擎的启动和运行,可参考 [game.init] 的参数选项说明。你可以通过 [settings] 访问此模块单例。 - * @en - * The Settings module is used to get the configuration information in the settings.json configuration file, - * and you can override some of the configuration to affect the launch and running of the engine, as described in the [game.init] parameter options. - * You can access this single instance of the module via [settings]. - */ export class EffectSettings { - static Category = Category; - - /** - * Initialization - * @internal - */ - init (path = '', overrides: Record = {}): Promise { - if (!legacyCC.rendering || !legacyCC.rendering.enableEffectImport) { + init (path = ''): Promise { + if (!legacyCC.rendering || !legacyCC.rendering.enableEffectImport || !path) { return Promise.resolve(); } - for (const categoryName in overrides) { - const category = overrides[categoryName]; - if (category) { - for (const name in category) { - this.overrideSettings(categoryName, name, category[name]); - } - } - } - if (!path) return Promise.resolve(); return new Promise((resolve, reject) => { if (!HTML5 && !path.startsWith('http')) { fsUtils.readArrayBuffer(path, (err: Error, arrayBuffer: ArrayBuffer) => { @@ -102,68 +56,11 @@ export class EffectSettings { } }); } - - /** - * @zh - * 覆盖一部分配置数据。 - * - * @en - * Override some configuration info in Settings module. - * - * @param category @en The category you want to override. @zh 想要覆盖的分组。 - * @param name @en The name of the configuration in the category you want to override. @zh 分组中想要覆盖的具体配置名称。 - * @param value @en The value of the configuration you want to override. @zh 想要覆盖的具体值。 - * - * @example - * ```ts - * console.log(settings.querySettings(Settings.Category.ASSETS, 'server')); // print https://www.cocos.com - * settings.overrideSettings(Settings.Category.ASSETS, 'server', 'http://www.test.com'); - * console.log(settings.querySettings(Settings.Category.ASSETS, 'server')); // print http://www.test.com - * ``` - */ - overrideSettings (category: Category | string, name: string, value: T) { - } - - /** - * @zh - * 查询配置模块中具体分组中的具体配置值。 - * - * @en - * Query specific configuration values in specific category in the settings module. - * - * @param category @en The name of category to query. @zh 想要查询的分组名称。 - * @param name @en The name of configuration in category to query. @zh 分组中想要查询的具体的配置名称。 - * @returns @en The value of configuration to query. @zh 想要查询的具体配置值。 - * - * @example - * ```ts - * console.log(settings.querySettings(Settings.Category.ENGINE, 'debug')); // print false - * ``` - */ - querySettings (category: Category | string, name: string): T | null { - return null; - } - - queryBuffer (): ArrayBuffer | null { - return this._data; - } - get data (): ArrayBuffer | null { return this._data; } - private _data: ArrayBuffer | null = null; } -export declare namespace Settings { - export type Category = typeof Category; -} - -/** - * @zh - * Settings 模块单例,你能通过此单例访问 settings.json 中的配置数据。 - * @en - * Settings module singleton, through this you can access the configuration data in settings.json. - */ export const effectSettings = new EffectSettings(); legacyCC.effectSettings = effectSettings; diff --git a/cocos/core/event/async-delegate.ts b/cocos/core/event/async-delegate.ts index 3f17d2e5ef..3bc2e2990a 100644 --- a/cocos/core/event/async-delegate.ts +++ b/cocos/core/event/async-delegate.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/core/event/callbacks-invoker.ts b/cocos/core/event/callbacks-invoker.ts index c0f7573203..dcaec9cd73 100644 --- a/cocos/core/event/callbacks-invoker.ts +++ b/cocos/core/event/callbacks-invoker.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/core/event/defines.ts b/cocos/core/event/defines.ts index c208cc9473..1a8c727a1a 100644 --- a/cocos/core/event/defines.ts +++ b/cocos/core/event/defines.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2019-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/core/event/event-target-factory.ts b/cocos/core/event/event-target-factory.ts index 108247fed7..5f15399ffc 100644 --- a/cocos/core/event/event-target-factory.ts +++ b/cocos/core/event/event-target-factory.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2019-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/core/event/event-target.ts b/cocos/core/event/event-target.ts index 322c4c1d0a..010825940c 100644 --- a/cocos/core/event/event-target.ts +++ b/cocos/core/event/event-target.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/core/event/eventify.ts b/cocos/core/event/eventify.ts index 78b94e445c..4ec8ff82ab 100644 --- a/cocos/core/event/eventify.ts +++ b/cocos/core/event/eventify.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { CallbacksInvoker } from './callbacks-invoker'; import { createMap } from '../utils/js'; diff --git a/cocos/core/event/index.ts b/cocos/core/event/index.ts index c49c848761..e54b8bad8f 100644 --- a/cocos/core/event/index.ts +++ b/cocos/core/event/index.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/core/geometry/aabb.ts b/cocos/core/geometry/aabb.ts index 5516fc30d0..8c05c908ac 100644 --- a/cocos/core/geometry/aabb.ts +++ b/cocos/core/geometry/aabb.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Mat3, Mat4, Quat, Vec3 } from '../math'; import enums from './enums'; @@ -46,22 +45,24 @@ const transform_extent_m4 = (out: Vec3, extent: Vec3, m4: Mat4 | Readonly) /** * @en * Basic Geometry: Axis-aligned bounding box, using center and half extents structure. + * It's a fairly computationally and memory efficient way of checking whether two 3D objects might be touching. * @zh - * 基础几何 轴对齐包围盒,使用中心点和半长宽高的结构。 + * 基础几何:轴对齐包围盒,使用中心点和半长宽高的结构。 + * 这是检查两个 3D 对象是否相交的一种在计算和内存上效率都相当高的方法。 */ export class AABB { /** * @en - * create a new AABB + * Creates a new AABB instance. * @zh * 创建一个新的 AABB 实例。 - * @param px @zh AABB 的原点的 X 坐标。@en The x coordinate of the origin of the AABB. - * @param py @zh AABB 的原点的 Y 坐标。@en The y coordinate of the origin of the AABB. - * @param pz @zh AABB 的原点的 Z 坐标。 @en The z coordinate of the origin of the AABB. + * @param px @zh AABB 原点的 X 坐标。 @en The x coordinate of the origin of the AABB. + * @param py @zh AABB 原点的 Y 坐标。 @en The y coordinate of the origin of the AABB. + * @param pz @zh AABB 原点的 Z 坐标。 @en The z coordinate of the origin of the AABB. * @param hw @zh AABB 宽度的一半。 @en Half the width of the AABB. - * @param hh @zh AABB 高度的一半。@en Half the height of the AABB. - * @param hl @zh AABB 长度的一半。@en Half the length of the AABB. + * @param hh @zh AABB 高度的一半。 @en Half the height of the AABB. + * @param hl @zh AABB 长度的一半。 @en Half the length of the AABB. * @returns @zh 返回新创建的 AABB 实例。 @en A new instance of AABB. */ public static create (px?: number, py?: number, pz?: number, hw?: number, hh?: number, hl?: number) { @@ -70,11 +71,11 @@ export class AABB { /** * @en - * clone a new AABB + * Clones an AABB, which will create a new AABB instance with the same value as the input parameter `a`. Note that each time `clone` is invoked, a new AABB object will be created, so use `copy` method whenever it could to reduce GC pressure. * @zh - * 克隆一个 AABB。 - * @param a @zh 克隆的目标。 @en Target object. - * @returns @zh 克隆出的 AABB。@en The new AABB. + * 克隆一个 AABB,其会创建出一个值跟输入参数`a`一样的 AABB 实例。注意,每次调用 `clone` 都会创建出新实例,尽可能使用 `copy` 方法以减小 GC 压力。 + * @param a @zh 克隆的目标。 @en The target object to be cloned. + * @returns @zh 克隆出的 AABB 实例。@en The cloned AABB instance. */ public static clone (a: AABB | Readonly) { return new AABB(a.center.x, a.center.y, a.center.z, @@ -83,12 +84,12 @@ export class AABB { /** * @en - * copy the values from one AABB to another + * Copies the values from one AABB to another, the process will not generate temporary objects. * @zh - * 将从一个 AABB 的值复制到另一个 AABB。 - * @param out @zh 接受操作的 AABB。 @en The output AABB, copy destination. - * @param a @zh 被复制的 AABB。 @en Source object of copy operation. - * @returns @zh 接受操作的 AABB。 @en The reference of the first parameter `dst`, the new AABB. + * 将一个 AABB 的值复制到另一个 AABB 中,此过程将不会产生临时对象。 + * @param out @zh 接受操作的 AABB。 @en The output AABB which is the copy destination. + * @param a @zh 被复制的 AABB,此为只读参数。 @en The source object of the copy operation, it's readonly. + * @returns @zh 接受操作的 AABB `out` 的引用。 @en The reference to the first parameter `out`. */ public static copy (out: AABB, a: AABB | Readonly): AABB { Vec3.copy(out.center, a.center); @@ -99,13 +100,13 @@ export class AABB { /** * @en - * Construct a new AABB from two corner points + * Constructs a new AABB from two corner points. * @zh * 从两个点创建一个新的 AABB。 - * @param out @zh 接受操作的 AABB。 @en The output AABB - * @param minPos @zh AABB 的最小点。 @en Minimum point of the axis-aligned 3d bounding box. - * @param maxPos @zh AABB 的最大点。 @en Maximum point of the axis-aligned 3d bounding box. - * @returns @zh out 接受操作的 AABB。 @en The new AABB + * @param out @zh 接受操作的 AABB。 @en The output AABB. + * @param minPos @zh AABB 的最小点。 @en Minimum point of the AABB. + * @param maxPos @zh AABB 的最大点。 @en Maximum point of the AABB. + * @returns @zh 接受操作的 AABB `out` 的引用。 @en The reference to the first parameter `out`. */ public static fromPoints (out: AABB, minPos: IVec3, maxPos: IVec3): AABB { Vec3.add(_v3_tmp, maxPos, minPos); @@ -117,17 +118,17 @@ export class AABB { /** * @en - * Set the components of a AABB to the given values + * Sets the components of a AABB to the given values. * @zh * 将 AABB 的属性设置为给定的值。 * @param @zh out 接受操作的 AABB。 @en The output AABB to set. - * @param px @zh - AABB 的原点的 X 坐标。 @en The x coordinate of the origin of the AABB. - * @param py @zh - AABB 的原点的 Y 坐标。 @en The y coordinate of the origin of the AABB. - * @param pz @zh - AABB 的原点的 Z 坐标。 @en The z coordinate of the origin of the AABB. + * @param px @zh - AABB 原点的 X 坐标。 @en The x coordinate of the origin of the AABB. + * @param py @zh - AABB 原点的 Y 坐标。 @en The y coordinate of the origin of the AABB. + * @param pz @zh - AABB 原点的 Z 坐标。 @en The z coordinate of the origin of the AABB. * @param hw @zh - AABB 宽度的一半。 @en Half the width of the AABB. * @param hh @zh - AABB 高度的一半。 @en Half the height of the AABB. - * @param hl @zh - AABB 长度度的一半。 @en Half the length of the AABB. - * @returns @zh out 接受操作的 AABB。 @en The reference fo the first parameter `out`. + * @param hl @zh - AABB 长度的一半。 @en Half the length of the AABB. + * @returns @zh 接受操作的 AABB `out` 的引用。 @en The reference fo the first parameter `out`. */ public static set (out: AABB, px: number, py: number, pz: number, hw: number, hh: number, hl: number): AABB { out.center.set(px, py, pz); @@ -137,13 +138,13 @@ export class AABB { /** * @en - * Merge two AABB into one. + * Merges two AABB instances into one. * @zh - * 合并两个 AABB 到 out。 - * @param out @zh 接受操作的 AABB。 @en The output AABB to storge merge result. - * @param a @zh 输入的 AABB。 @en The first AABB to be merged. - * @param b @zh 输入的 AABB。 @en The second AABB to be merged. - * @returns @zh out 接受操作的 AABB。 @en The reference of the first parameter `out`. + * 合并两个 AABB 到一个目标 AABB 中。 + * @param out @zh 接受操作的目标 AABB。 @en The output AABB to storge the merge result. + * @param a @zh 第一个输入的 AABB,当其与 out 参数不同的时候,此函数内部不会修改其值。 @en The first AABB to be merged, its value will not be modified if `a` is not equal to the `out` paramater. + * @param b @zh 第二个输入的 AABB,当其与 out 参数不同的时候,此函数内部不会修改其值。 @en The second AABB to be merged, its value will not be modified if `b` is not equal to the `out` paramater. + * @returns @zh 接受操作的 AABB `out` 的引用。 @en The reference to the first parameter `out`. */ public static merge (out: AABB, a: AABB | Readonly, b: AABB | Readonly): AABB { Vec3.subtract(_v3_tmp, a.center, a.halfExtents); @@ -157,12 +158,12 @@ export class AABB { /** * @en - * Convert AABB to sphere. + * Converts an AABB to a bounding sphere. * @zh * 包围盒转包围球 - * @param out @zh 接受操作的 sphere。 @en The output sphere. - * @param a @zh 输入的 AABB。 @en The input AABB. - * @returns @zh out 接受的 Sphere @en The reference of the first parameter `out`. + * @param out @zh 接受操作的包围球。 @en The output bounding sphere. + * @param a @zh 输入的 AABB,只读参数。 @en The input AABB,it's readonly. + * @returns @zh 接受操作的包围球 `out` 的引用. @en The reference to the first parameter `out`. */ public static toBoundingSphere (out: Sphere, a: AABB | Readonly) { out.center.set(a.center); @@ -172,13 +173,13 @@ export class AABB { /** * @en - * Transform this AABB. + * Transforms an AABB by a 4x4 matrix and stores the result to the `out` parameter. * @zh - * 变换一个 AABB 到 out 中。 - * @param out @zh 接受操作的 AABB。 @en The output AABB. - * @param a @zh 输入的源 AABB。 @en The input AABB. + * 使用一个 4 乘 4 矩阵变换一个 AABB 并将结果存储于 out 参数中。 + * @param out @zh 接受操作的 AABB。 @en The output AABB to store the result. + * @param a @zh 输入的源 AABB,如果其与 out 参数不是同一个对象,那么 a 将不会被此函数修改。 @en The input AABB, if it's different with the `out` parameter, then `a` will not be changed by this function. * @param matrix @zh 矩阵。 @en The transformation matrix. - * @returns @zh {AABB} out 接受操作的 AABB。 @en The reference of the first parameter `out`. + * @returns @zh 接受操作的 AABB `out` 的引用。 @en The reference of the first parameter `out`. */ public static transform (out: AABB, a: AABB | Readonly, matrix: Mat4 | Readonly): AABB { Vec3.transformMat4(out.center, a.center, matrix); @@ -188,7 +189,7 @@ export class AABB { /** * @en - * The origin point of the AABB + * The center point of this AABB. * @zh * 本地坐标的中心点。 */ @@ -196,7 +197,7 @@ export class AABB { /** * @en - * Half the size of the AABB + * Half the size of this AABB. * @zh * 长宽高的一半。 */ @@ -204,9 +205,9 @@ export class AABB { /** * @en - * Gets the type of the shape. + * Gets the type of this shape. * @zh - * 获取形状的类型。 + * 获取此形状的类型。 */ get type () { return this._type; @@ -222,11 +223,11 @@ export class AABB { /** * @en - * Get the bounding points of this shape + * Gets the bounding points of this AABB. * @zh - * 获取 AABB 的最小点和最大点。 - * @param minPos @zh 最小点。 @en Minimum position of the axis-aligned 3d bounding box. - * @param maxPos @zh 最大点。 @en Maximum position of the axis-aligned 3d bounding box. + * 获取此 AABB 的最小点和最大点。 + * @param minPos @zh 存放此 AABB 最小点的向量。 @en The minimum position of the AABB to be stored to. + * @param maxPos @zh 存放此 AABB 最大点的向量。 @en The maximum position of the AABB to be stored to. */ public getBoundary (minPos: IVec3Like, maxPos: IVec3Like) { Vec3.subtract(minPos, this.center, this.halfExtents); @@ -235,14 +236,14 @@ export class AABB { /** * @en - * Transform this shape + * Transforms this AABB by a 4x4 matrix and stores the result to `out` parameter * @zh - * 将 out 根据这个 AABB 的数据进行变换。 + * 使用 4 乘 4 矩阵变换此 AABB 并将结果存储于 `out` 参数中。 * @param m @zh 变换的矩阵。 @en The transform matrix. * @param pos @zh 变换的位置部分。 @en 3d-vector translation. - * @param rot @zh 变换的旋转部分。 @en Quaternion rotation . + * @param rot @zh 变换的旋转部分。 @en Quaternion rotation. * @param scale @zh 变换的缩放部分。 @en 3d-vector scale. - * @param out @zh 变换的目标。 @en The output AABB. + * @param out @zh 存储结果的 AABB。 @en The output AABB. */ public transform (m: Mat4, pos: Vec3 | null, rot: Quat | null, scale: Vec3 | null, out: AABB) { Vec3.transformMat4(out.center, this.center, m); @@ -251,10 +252,10 @@ export class AABB { /** * @en - * Clones the AABB + * Clones this AABB, which will create a new AABB instance with the same value as this AABB. Note that each time `clone` is invoked, a new AABB object will be created, so use `copy` method whenever it could to reduce GC pressure. * @zh - * 获得克隆。 - * @returns @zh {AABB} @en A copy of the object. + * 克隆一个 AABB,其会创建出一个值跟当前 AABB 一样的实例。注意,每次调用 `clone` 都会创建出新实例,尽可能使用 `copy` 方法以减小 GC 压力。 + * @returns @zh 克隆出的 AABB 实例 @en The cloned AABB instance. */ public clone (): AABB { return AABB.clone(this); @@ -262,20 +263,20 @@ export class AABB { /** * @en - * Copy the input to the receiver object. + * Copies the values from one AABB to this AABB, the process will not generate temporary objects. * @zh - * 拷贝对象。 - * @param a @zh 拷贝的目标。 @en Copy target - * @returns @zh This object @en The reference of this. + * 将一个 AABB 的值复制到当前 AABB 中,此过程将不会产生临时对象。 + * @param a @zh 被复制的 AABB,此为只读参数。 @en The source object of the copy operation, it's readonly. + * @returns @zh 当前 AABB 的引用。 @en The reference of this AABB. */ public copy (a: AABB | Readonly): AABB { return AABB.copy(this, a); } /** - * @en AABB and point merge. - * @zh AABB包围盒合并一个顶点。 - * @param point @zh - 某一个位置的顶点。 @en A point in 3d space. + * @en Merges a point to this AABB. + * @zh 合并一个顶点到当前 AABB 中。 + * @param point @zh 3D 世界中某一个位置的顶点。 @en A point in 3D space. */ public mergePoint (point: IVec3) { // _v3_tmp is min pos @@ -295,9 +296,9 @@ export class AABB { } /** - * @en AABB and points merge. - * @zh AABB包围盒合并一系列顶点。 - * @param points @zh - 某一个位置的顶点。 @en A list of points in 3d space. + * @en Merges some points to this AABB. + * @zh 合并一系列顶点到当前 AABB 中。 + * @param points @zh 3D 世界中的顶点列表。 @en A list of points in 3D space. */ public mergePoints (points: IVec3[]) { if (points.length < 1) { return; } @@ -307,11 +308,11 @@ export class AABB { } /** - * @en AABB and frustum merge. - * @zh Frustum 合并到 AABB。 - * @param frustum @zh 输入的 Frustum。 @en The frustum object. + * @en Merges all points in a frustum to this AABB. + * @zh 合并一个截头锥体的所有顶点到此 AABB 中。 + * @param frustum @zh 输入的截头锥体 @en The frustum object. */ public mergeFrustum (frustum: Frustum | Readonly) { - return this.mergePoints(frustum.vertices); + this.mergePoints(frustum.vertices); } } diff --git a/cocos/core/geometry/capsule.ts b/cocos/core/geometry/capsule.ts index bc8bdd8b67..0e3b4f2cf6 100644 --- a/cocos/core/geometry/capsule.ts +++ b/cocos/core/geometry/capsule.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Vec3, Quat, Mat4, absMaxComponent } from '../math'; import enums from './enums'; @@ -36,9 +35,9 @@ import { IVec3Like, IQuatLike } from '../math/type-define'; export class Capsule { /** * @en - * Gets the type of the shape. + * Gets the type of this Capsule, always returns `enums.SHAPE_CAPSULE`. * @zh - * 获取形状的类型。 + * 获取此形状的类型,值固定为 `enums.SHAPE_CAPSULE`。 */ get type () { return this._type; @@ -48,9 +47,9 @@ export class Capsule { /** * @en - * Capsule sphere radius. + * The radius of the sphere in this capsule. * @zh - * 胶囊体球部半径。 + * 胶囊体球部的半径。 */ radius: number; @@ -64,7 +63,7 @@ export class Capsule { /** * @en - * Local orientation of capsule [0,1,2] => [x,y,z]. + * The local orientation of this capsule [0,1,2] => [x,y,z]. * @zh * 胶囊体的本地朝向,映射关系 [0,1,2] => [x,y,z]。 */ @@ -96,6 +95,15 @@ export class Capsule { */ readonly ellipseCenter1: Vec3; + /** + * @en + * Constructs a Capsule instance. + * @zh + * 构造一个胶囊体实例。 + * @param radius @en The radius of the sphere in this capsule. @zh 胶囊体球部的半径。 + * @param halfHeight @en The distance between the center point of the capsule and the center of the sphere. @zh 胶囊体中心点和球部圆心的距离。 + * @param axis @en The local orientation of this capsule [0,1,2] => [x,y,z]. @zh 胶囊体的本地朝向,映射关系 [0,1,2] => [x,y,z]。 + */ constructor (radius = 0.5, halfHeight = 0.5, axis = 1) { this._type = enums.SHAPE_CAPSULE; this.radius = radius; @@ -112,9 +120,9 @@ export class Capsule { /** * @en - * Transform this capsule. + * Transforms this capsule by a 4x4 matrix and RTS. * @zh - * 变换此胶囊体。 + * 使用 4x4 矩阵和 RTS 变换此胶囊体。 */ transform (m: Mat4, pos: IVec3Like, rot: IQuatLike, scale: IVec3Like, out: Capsule) { const ws = scale; @@ -131,6 +139,12 @@ export class Capsule { out.updateCache(); } + /** + * @en + * Updates the cache. + * @zh + * 更新缓存。 + */ updateCache () { this.updateLocalCenter(); Vec3.transformQuat(this.ellipseCenter0, this.ellipseCenter0, this.rotation); @@ -139,6 +153,12 @@ export class Capsule { this.ellipseCenter1.add(this.center); } + /** + * @en + * Updates the center points. + * @zh + * 更新中心点信息。 + */ updateLocalCenter () { const halfHeight = this.halfHeight; const axis = this.axis; diff --git a/cocos/core/geometry/curve.ts b/cocos/core/geometry/curve.ts index 78b4bf50c9..85df56ac5d 100644 --- a/cocos/core/geometry/curve.ts +++ b/cocos/core/geometry/curve.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { CCClass } from '../data/class'; import { clamp, pingPong, repeat } from '../math/utils'; diff --git a/cocos/core/geometry/deprecated-3.0.0.ts b/cocos/core/geometry/deprecated-3.0.0.ts index 55432581fb..759153c4e0 100644 --- a/cocos/core/geometry/deprecated-3.0.0.ts +++ b/cocos/core/geometry/deprecated-3.0.0.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { replaceProperty } from '../utils/x-deprecated'; import intersect from './intersect'; diff --git a/cocos/core/geometry/deprecated.ts b/cocos/core/geometry/deprecated.ts index 4d993a79d4..d52504af5c 100644 --- a/cocos/core/geometry/deprecated.ts +++ b/cocos/core/geometry/deprecated.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { replaceProperty, removeProperty } from '../utils/x-deprecated'; import { Line } from './line'; diff --git a/cocos/core/geometry/distance.ts b/cocos/core/geometry/distance.ts index 468b847c20..22a2764557 100644 --- a/cocos/core/geometry/distance.ts +++ b/cocos/core/geometry/distance.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Vec3 } from '../math'; import { AABB } from './aabb'; @@ -39,12 +38,12 @@ const e = new Array(3); /** * @en - * the distance between a point and a plane + * Calculates the distance between a point and a plane. * @zh * 计算点和平面之间的距离。 - * @param {Vec3} point @en Target point @zh 目标点。 - * @param {Plane} plane @en Target plane @zh 目标平面。 - * @return @en The distance in between @zh 距离。 + * @param point @en The target point. @zh 目标点。 + * @param plane @en The target plane. @zh 目标平面。 + * @returns @en The distance between the point and the plane. @zh 点和平面之间的距离。 */ export function point_plane (point: Vec3, plane_: Plane) { return Vec3.dot(plane_.n, point) - plane_.d; @@ -52,13 +51,13 @@ export function point_plane (point: Vec3, plane_: Plane) { /** * @en - * the closest point on plane to a given point + * Calculates the closest point on a plane to a given point. * @zh * 计算平面上最接近给定点的点。 - * @param out @en The closest point, as a result @zh 最近点。 - * @param point @en The given point @zh 给定点。 - * @param plane @en Target plane @zh 平面。 - * @return @en The closest point, same as out @zh 最近点。 + * @param out @en The closest point. @zh 最近点。 + * @param point @en The given point. @zh 给定点。 + * @param plane @en The target plane. @zh 平面。 + * @returns @en The result of the closest point, same as the `out` parameter. @zh 存储最近点的向量,与 `out` 参数为同一个对象。 */ export function pt_point_plane (out: Vec3, point: Vec3, plane_: Plane) { const t = point_plane(point, plane_); @@ -67,13 +66,13 @@ export function pt_point_plane (out: Vec3, point: Vec3, plane_: Plane) { /** * @en - * the closest point on aabb to a given point + * Calculates the closest point on an AABB to a given point. * @zh - * 计算 aabb 上最接近给定点的点。 - * @param {Vec3} out @en The closest point, as a result @zh 最近点。 - * @param {Vec3} point @en The given point @zh 给定点。 - * @param {AABB} aabb @en Target aabb to calculate @zh 轴对齐包围盒。 - * @return {Vec3} @en The closest point, same as out @zh 最近点。 + * 计算 AABB 上最接近给定点的点。 + * @param out @en The closest point. @zh 最近点。 + * @param point @en The given point @zh 给定点。 + * @param aabb @en The target AABB to calculate. @zh 参与计算的 AABB 实例。 + * @returns @en The result of the closest point, same as the `out` parameter. @zh 存储最近点的向量,与 `out` 参数为同一个对象。 */ export function pt_point_aabb (out: Vec3, point: Vec3, aabb_: AABB): Vec3 { Vec3.copy(out, point); @@ -92,13 +91,13 @@ export function pt_point_aabb (out: Vec3, point: Vec3, aabb_: AABB): Vec3 { /** * @en - * the closest point on obb to a given point + * Calculates the closest point on an OBB to a given point. * @zh - * 计算 obb 上最接近给定点的点。 - * @param {Vec3} out @en The closest point, as a result @zh 最近点。 - * @param {Vec3} point @en The given point @zh 给定点。 - * @param {OBB} obb @en Target obb to calculate @zh 方向包围盒。 - * @return {Vec3} @en The closest point, same as out @zh 最近点。 + * 计算 OBB 上最接近给定点的点。 + * @param out @en The closest point. @zh 最近点。 + * @param point @en The given point. @zh 给定点。 + * @param obb @en The target OBB to calculate. @zh 参与计算的 OBB 实例。 + * @returns @en The result of the closest point, same as the `out` parameter. @zh 存储最近点的向量,与 `out` 参数为同一个对象。 */ export function pt_point_obb (out: Vec3, point: Vec3, obb_: OBB): Vec3 { Vec3.set(X, obb_.orientation.m00, obb_.orientation.m01, obb_.orientation.m02); @@ -141,20 +140,20 @@ export function pt_point_obb (out: Vec3, point: Vec3, obb_: OBB): Vec3 { /** * @en - * Calculate the nearest point on the line, which is from A to B, to the given point + * Calculates the closest point on the line, which is from A to B, to the given point. * @zh - * 计算给定点距离线段上最近的一点。线段从A到B。 - * @param out @en The closest point, as a result @zh 最近点 - * @param point @en The given point @zh 给定点 - * @param linePointA @en Point A on the line @zh 线上的某点 A - * @param linePointB @en Point B on the line @zh 线上的某点 B + * 计算给定点距离线段 AB 上最近的一点。 + * @param out @en The closest point. @zh 最近点。 + * @param point @en The given point. @zh 给定点 + * @param linePointA @en Point A on the line. @zh 线上的某点 A。 + * @param linePointB @en Point B on the line. @zh 线上的某点 B。 */ export function pt_point_line (out: Vec3, point: Vec3, linePointA: Vec3, linePointB: Vec3) { Vec3.subtract(X, linePointA, linePointB); const dir = X; const dirSquaredLength = Vec3.lengthSqr(dir); - if (dirSquaredLength == 0) { + if (dirSquaredLength === 0) { // The point is at the segment start. Vec3.copy(out, linePointA); } else { diff --git a/cocos/core/geometry/enums.ts b/cocos/core/geometry/enums.ts index de211f3cc8..2bf8a7fd92 100644 --- a/cocos/core/geometry/enums.ts +++ b/cocos/core/geometry/enums.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ /** * 几何工具模块 diff --git a/cocos/core/geometry/frustum.ts b/cocos/core/geometry/frustum.ts index d1bf76bf0c..3df74efe26 100644 --- a/cocos/core/geometry/frustum.ts +++ b/cocos/core/geometry/frustum.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Mat4, Vec3 } from '../math'; import enums from './enums'; @@ -46,13 +45,12 @@ const _temp_v3 = new Vec3(); * @en * Basic Geometry: frustum. * @zh - * 基础几何 截头锥体。 + * 基础几何:视锥体。 */ - export class Frustum { /** * @en - * Create an orthogonal frustum. + * Creates an orthogonal frustum. * @zh * 创建一个正交视锥体。 * @param out @en The result orthogonal frustum. @zh 输出的正交视锥体。 @@ -61,9 +59,9 @@ export class Frustum { * @param near @en The near plane of the frustum. @zh 正交视锥体的近平面值。 * @param far @en The far plane of the frustum. @zh 正交视锥体的远平面值。 * @param transform @en The transform matrix of the frustum. @zh 正交视锥体的变换矩阵。 - * @return @en The out object @zh 返回正交视锥体. + * @returns @en The result frustum, same as the `out` parameter. @zh 存储结果的视锥体,与 `out` 参数为同一个对象。 */ - public static createOrtho = (() => (out: Frustum, width: number, height: number, near: number, far: number, transform: Mat4) => { + public static createOrtho (out: Frustum, width: number, height: number, near: number, far: number, transform: Mat4) { const halfWidth = width / 2; const halfHeight = height / 2; Vec3.set(_temp_v3, halfWidth, halfHeight, -near); @@ -89,16 +87,16 @@ export class Frustum { Plane.fromPoints(out.planes[3], out.vertices[0], out.vertices[5], out.vertices[4]); Plane.fromPoints(out.planes[4], out.vertices[2], out.vertices[0], out.vertices[3]); Plane.fromPoints(out.planes[5], out.vertices[7], out.vertices[5], out.vertices[6]); - })(); + } /** - * @en Create a frustum from an AABB box. - * @zh 从 AABB 包围盒中创建一个视锥体。 - * @param out @en The result frustum @zh 输出的视锥体对象。 - * @param aabb @en The AABB bounding box of the frustum @zh AABB 包围盒。 - * @return @en The out object @zh 返回视锥体. + * @en Creates a frustum from an AABB instance. + * @zh 根据一个 AABB 实例创建一个视锥体。 + * @param out @en The result frustum. @zh 输出的视锥体对象。 + * @param aabb @en The AABB to create the result frustum. @zh 用于创建视锥体 AABB。 + * @returns @en The result frustum, same as the `out` parameter. @zh 存储结果的视锥体,与 `out` 参数为同一个对象。 */ - public static createFromAABB (out: Frustum, aabb: AABB | Readonly) : Frustum { + public static createFromAABB (out: Frustum, aabb: AABB | Readonly): Frustum { const vec3_min = new Vec3(); const vec3_max = new Vec3(); Vec3.subtract(vec3_min, aabb.center, aabb.halfExtents); Vec3.add(vec3_max, aabb.center, aabb.halfExtents); @@ -122,13 +120,13 @@ export class Frustum { } /** - * @en Calculate a split frustum. + * @en Calculates a split frustum. * @zh 计算出一个分割的视锥体。 - * @param start @en The split start position @zh 分割开始位置 - * @param end @en The split end position @zh 分割末尾位置 - * @param aspect @en The aspect ratio of the camera @zh 相机视图的长宽比 - * @param fov @en Field of view of the camera @zh 相机的视角大小 - * @param m @en The transform matrix @zh 变换矩阵 + * @param start @en The split start position. @zh 分割开始位置。 + * @param end @en The split end position. @zh 分割末尾位置。 + * @param aspect @en The aspect ratio of the camera. @zh 相机视图的长宽比。 + * @param fov @en The field of view of the camera. @zh 相机的视角大小。 + * @param m @en The transform matrix. @zh 变换矩阵。 */ public split (start: number, end: number, aspect: number, fov: number, m: Mat4) { // 0: cameraNear 1:cameraFar @@ -163,10 +161,10 @@ export class Frustum { /** * @en - * Create a new frustum. + * Creates a new frustum. * @zh - * 创建一个新的截锥体。 - * @return @en An empty frustum. @zh 一个空截椎体 + * 创建一个新的视椎体。 + * @returns @en An empty frustum. @zh 一个空视椎体。 */ public static create (): Frustum { return new Frustum(); @@ -174,11 +172,11 @@ export class Frustum { /** * @en - * Clone a frustum. + * Clones a frustum. * @zh - * 克隆一个截锥体。 - * @param f @en The frustum to clone from @zh 用于克隆的截锥体 - * @return @en The cloned frustum @zh 克隆出的新截锥体 + * 克隆一个视椎体。 + * @param f @en The frustum to clone from. @zh 用于克隆的视椎体。 + * @return @en The cloned frustum. @zh 克隆出的新视椎体。 */ public static clone (f: Frustum): Frustum { return Frustum.copy(new Frustum(), f); @@ -186,12 +184,12 @@ export class Frustum { /** * @en - * Copy the values from one frustum to another. + * Copies the values from one frustum to another. * @zh * 从一个视锥体拷贝到另一个视锥体。 * @param out @en The result frustum @zh 用于存储拷贝数据的截锥体 * @param f @en The frustum to copy from @zh 用于克隆的截锥体 - * @return @en The out object @zh 传入的 out 对象 + * @returns @en The result frustum, same as the `out` parameter. @zh 存储结果的视锥体,与 `out` 参数为同一个对象。 */ public static copy (out: Frustum, f: Readonly): Frustum { out._type = f.type; @@ -206,7 +204,7 @@ export class Frustum { /** * @en - * Set whether to use accurate intersection testing function on this frustum. + * Sets whether to use accurate intersection testing function on this frustum. * @zh * 设置是否在此截锥体上使用精确的相交测试函数。 */ @@ -216,16 +214,29 @@ export class Frustum { /** * @en - * Gets the type of the shape. + * Gets the type of the shape. The value may be `enums.SHAPE_FRUSTUM_ACCURATE` or `enums.SHAPE_FRUSTUM`. * @zh - * 获取形状的类型。 + * 获取形状的类型。值可能为 `enums.SHAPE_FRUSTUM_ACCURATE` 或 `enums.SHAPE_FRUSTUM`。 * @readonly */ get type () { return this._type; } + /** + * @en + * The 6 planes of the frustum. + * @zh + * 视椎体的 6 个面。 + */ public planes: Plane[]; + + /** + * @en + * The 8 vertices of the frustum. + * @zh + * 视椎体的 8 个顶点。 + */ public vertices: Vec3[]; protected _type: number; @@ -244,12 +255,12 @@ export class Frustum { /** * @en - * Update the frustum information according to the given transform matrix. + * Updates the frustum information according to the given transform matrix. * Note that the resulting planes are not normalized under normal mode. * @zh * 根据给定的变换矩阵更新截锥体信息,注意得到的平面不是在标准模式下归一化的。 - * @param m @en The view-projection matrix @zh 视图投影矩阵 - * @param inv @en The inverse view-projection matrix @zh 视图投影逆矩阵 + * @param m @en The view-projection matrix. @zh 视图投影矩阵。 + * @param inv @en The inverse view-projection matrix. @zh 视图投影逆矩阵。 */ public update (m: Mat4, inv: Mat4) { // RTR4, ch. 22.14.1, p. 983 @@ -292,10 +303,10 @@ export class Frustum { /** * @en - * Transform this frustum. + * Transforms this frustum. * @zh * 变换此视锥体。 - * @param mat @en The transform matrix @zh 变换矩阵 + * @param mat @en The transform matrix. @zh 变换矩阵。 */ public transform (mat: Mat4) { if (this._type !== enums.SHAPE_FRUSTUM_ACCURATE) { @@ -308,8 +319,8 @@ export class Frustum { } /** - * @en Initialize the frustum - * @zh 初始化视锥体 + * @en Makes the frustum empty, all vertices will be zero values. + * @zh 置空此视锥体,所有顶点将被赋值为 0。 */ public zero () { for (let i = 0; i < 8; i++) { @@ -319,8 +330,8 @@ export class Frustum { } /** - * @en Update all six planes of the frustum - * @zh 更新视锥体的所有面数据 + * @en Updates all six planes of the frustum. + * @zh 更新视锥体的所有面数据。 */ public updatePlanes () { // left plane diff --git a/cocos/core/geometry/geometry-native-ext.ts b/cocos/core/geometry/geometry-native-ext.ts index 68fba88988..7fe2dcd038 100644 --- a/cocos/core/geometry/geometry-native-ext.ts +++ b/cocos/core/geometry/geometry-native-ext.ts @@ -1,15 +1,16 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE diff --git a/cocos/core/geometry/index.ts b/cocos/core/geometry/index.ts index 523c13e644..e0846a5209 100644 --- a/cocos/core/geometry/index.ts +++ b/cocos/core/geometry/index.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import * as distance from './distance'; diff --git a/cocos/core/geometry/intersect.ts b/cocos/core/geometry/intersect.ts index 2c245fe99f..cd98d58131 100644 --- a/cocos/core/geometry/intersect.ts +++ b/cocos/core/geometry/intersect.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { EPSILON, Mat3, Vec3 } from '../math'; import { AABB } from './aabb'; @@ -46,9 +45,9 @@ import type { Mesh } from '../../3d'; * ray-plane intersect detect. * @zh * 射线与平面的相交性检测。 - * @param ray @zh 射线 @en The ray to test - * @param plane @zh 平面 @en The plane to test - * @return @zh 0 或 非0 @en 0 or not 0, 0 indicates there is no intersection + * @param ray @zh 要测试的射线。 @en The ray to test. + * @param plane @zh 要测试的平面。 @en The plane to test. + * @returns @zh 如果没有相交,返回 0 ,否则返回非 0。 @en zero if no intersection, otherwise returns a non-zero value. */ const rayPlane = (function () { const pt = new Vec3(0, 0, 0); @@ -69,10 +68,10 @@ const rayPlane = (function () { * ray-triangle intersect detect. * @zh * 射线与三角形的相交性检测。 - * @param ray @zh 射线 @en The ray to test - * @param triangle @zh 三角形 @en The triangle to test - * @param doubleSided @zh 三角形是否为双面 @en Indicates whether it is double sided - * @return @zh 0 或 非0 @en 0 or not 0, 0 indicates there is no intersection + * @param ray @zh 要测试的射线。 @en The ray to test. + * @param triangle @zh 用来测试三角形。 @en The triangle to test. + * @param doubleSided @zh 要测试的三角形是否为双面。 @en Indicates whether the triangle to test is double sided. + * @returns @zh 0 或 非 0,0 表示没有相交。@en 0 or not 0, 0 indicates there is no intersection. */ const rayTriangle = (function () { const ab = new Vec3(0, 0, 0); @@ -109,9 +108,9 @@ const rayTriangle = (function () { * ray-sphere intersect detect. * @zh * 射线和球的相交性检测。 - * @param ray @zh 射线 @en The ray to test - * @param sphere @zh 球 @en The sphere to test - * @return @zh 0 或 非0 @en 0 or not 0, 0 indicates there is no intersection + * @param ray @zh 要测试的射线。 @en The ray to test. + * @param sphere @zh 要测试的球。 @en The sphere to test. + * @returns @zh 如果没有相交,返回 0 ,否则返回非 0。 @en zero if no intersection, otherwise returns a non-zero value. */ const raySphere = (function () { const e = new Vec3(0, 0, 0); @@ -140,9 +139,9 @@ const raySphere = (function () { * ray-aabb intersect detect. * @zh * 射线和轴对齐包围盒的相交性检测。 - * @param ray @zh 射线 @en The ray to test - * @param aabb @zh 轴对齐包围盒 @en The aabb to test - * @return @zh 0 或 非0 @en 0 or not 0, 0 indicates there is no intersection + * @param ray @zh 要测试的射线。 @en The ray to test. + * @param aabb @zh 要测试的 AABB。 @en The aabb to test. + * @returns @zh 如果没有相交,返回 0 ,否则返回非 0。 @en zero if no intersection, otherwise returns a non-zero value. */ const rayAABB = (function () { const min = new Vec3(); @@ -173,10 +172,10 @@ function rayAABB2 (ray: Ray, min: IVec3Like, max: IVec3Like) { * @en * ray-obb intersect detect. * @zh - * 射线和方向包围盒的相交性检测。 - * @param ray @zh 射线 @en The ray - * @param obb @zh 方向包围盒 @en The obb to test - * @return @zh 0 或非 0 @en 0 or not 0, 0 indicates there is no intersection + * 射线和 OBB 的相交性检测。 + * @param ray @zh 要测试的射线。 @en The ray to test. + * @param obb @zh 要测试的 OBB。 @en The OBB to test. + * @returns @zh 如果没有相交,返回 0 ,否则返回非 0。 @en zero if no intersection, otherwise returns a non-zero value. */ const rayOBB = (function () { let center = new Vec3(); @@ -254,9 +253,9 @@ const rayOBB = (function () { * ray-capsule intersect detect. * @zh * 射线和胶囊体的相交性检测。 - * @param ray @zh 射线 @en The ray to test - * @param capsule @zh 胶囊体 @en The capsule to test - * @return @zh 0 或非 0 @en 0 or not 0, 0 indicates there is no intersection + * @param ray @zh 要测试的射线。 @en The ray to test. + * @param capsule @zh 要测试的胶囊体。 @en The capsule to test. + * @returns @zh 如果没有相交,返回 0 ,否则返回非 0。 @en zero if no intersection, otherwise returns a non-zero value. */ const rayCapsule = (function () { const v3_0 = new Vec3(); @@ -340,9 +339,9 @@ const rayCapsule = (function () { * line-plane intersect detect. * @zh * 线段与平面的相交性检测。 - * @param line @zh 线段 @en The line to test - * @param plane @zh 平面 @en The plane to test - * @return @zh 0 或非 0 @en 0 or not 0, 0 indicates there is no intersection + * @param line @zh 要测试的线段。 @en The line to test. + * @param plane @zh 要测试的平面。 @en The plane to test. + * @returns @zh 如果没有相交,返回 0 ,否则返回非 0。 @en zero if no intersection, otherwise returns a non-zero value. */ const linePlane = (function () { const ab = new Vec3(0, 0, 0); @@ -360,10 +359,10 @@ const linePlane = (function () { * line-triangle intersect detect. * @zh * 线段与三角形的相交性检测。 - * @param line @zh 线段 @en The line to test - * @param triangle @zh 三角形 @en The triangle to test - * @param outPt @zh 可选,相交点 @en Optional out param, indicates the intersection point - * @return @zh 0 或非 0 @en 0 or not 0, 0 indicates there is no intersection + * @param line @zh 线段 @en The line to test. + * @param triangle @zh 三角形 @en The triangle to test. + * @param outPt @zh 可选,相交点 @en Optional out param, indicates the intersection point. + * @returns @zh 如果没有相交,返回 0 ,否则返回非 0。 @en zero if no intersection, otherwise returns a non-zero value. */ const lineTriangle = (function () { const ab = new Vec3(0, 0, 0); @@ -427,7 +426,7 @@ const r_t = new Ray(); * 线段与轴对齐包围盒的相交性检测 * @param line @zh 线段 @en The line to test * @param aabb @zh 轴对齐包围盒 @en The aabb to test - * @return @zh 0 或非 0 @en 0 or not 0, 0 indicates there is no intersection + * @returns @zh 如果没有相交,返回 0 ,否则返回非 0。 @en zero if no intersection, otherwise returns a non-zero value.no intersection */ function lineAABB (line: Line, aabb: AABB): number { r_t.o.set(line.s); @@ -446,10 +445,10 @@ function lineAABB (line: Line, aabb: AABB): number { * @en * line-obb intersect detect. * @zh - * 线段与方向包围盒的相交性检测 - * @param line @zh 线段 @en The line to test - * @param obb @zh 方向包围盒 @en The obb - * @return @zh 0 或非 0 @en 0 or not 0, 0 indicates there is no intersection + * 线段与OBB的相交性检测。 + * @param line @zh 线段 @en The line to test. + * @param obb @zh OBB @en The OBB to test. + * @returns @zh 如果没有相交,返回 0 ,否则返回非 0。 @en zero if no intersection, otherwise returns a non-zero value.no intersection */ function lineOBB (line: Line, obb: OBB): number { r_t.o.set(line.s); @@ -471,7 +470,7 @@ function lineOBB (line: Line, obb: OBB): number { * 线段与球的相交性检测 * @param line @zh 线段 @en The line to test * @param sphere @zh 球 @en The sphere to test - * @return @zh 0 或非 0 @en 0 or not 0, 0 indicates there is no intersection + * @returns @zh 如果没有相交,返回 0 ,否则返回非 0。 @en zero if no intersection, otherwise returns a non-zero value.no intersection */ function lineSphere (line: Line, sphere: Sphere): number { r_t.o.set(line.s); @@ -493,7 +492,7 @@ function lineSphere (line: Line, sphere: Sphere): number { * 轴对齐包围盒和轴对齐包围盒的相交性检测。 * @param aabb1 @zh 轴对齐包围盒1 @en aabb 1 to test * @param aabb2 @zh 轴对齐包围盒2 @en aabb 2 to test - * @return @zh 0 或非 0 @en 0 or not 0, 0 indicates there is no intersection + * @returns @zh 如果没有相交,返回 0 ,否则返回非 0。 @en zero if no intersection, otherwise returns a non-zero value.no intersection */ const aabbWithAABB = (function () { const aMin = new Vec3(); @@ -571,10 +570,10 @@ function getInterval (vertices: any[] | Vec3[], axis: Vec3) { * @en * aabb-obb intersect detect. * @zh - * 轴对齐包围盒和方向包围盒的相交性检测。 + * 轴对齐包围盒和OBB的相交性检测。 * @param aabb @zh 轴对齐包围盒 @en The aabb to test - * @param obb @zh 方向包围盒 @en The obb to test - * @return @zh 0 或非 0 @en 0 or not 0, 0 indicates there is no intersection + * @param obb @zh OBB @en The OBB to test + * @returns @zh 如果没有相交,返回 0 ,否则返回非 0。 @en zero if no intersection, otherwise returns a non-zero value.no intersection */ const aabbWithOBB = (function () { const test = new Array(15); @@ -627,7 +626,7 @@ const aabbWithOBB = (function () { * 轴对齐包围盒和平面的相交性检测。 * @param aabb @zh 轴对齐包围盒 @en The aabb to test * @param plane @zh 平面 @en The plane to test - * @return @zh 检测结果, 包含为 -1, 不包含为 0, 相交为 1 @en Test result, inside(back) = -1, outside(front) = 0, intersect = 1 + * @returns @zh 检测结果, 包含为 -1, 不包含为 0, 相交为 1 @en Test result, inside(back) = -1, outside(front) = 0, intersect = 1 */ const aabbPlane = function (aabb: AABB, plane: Plane): number { const r = aabb.halfExtents.x * Math.abs(plane.n.x) @@ -645,7 +644,7 @@ const aabbPlane = function (aabb: AABB, plane: Plane): number { * 轴对齐包围盒和锥台相交性检测,速度快,但有错误情况。 * @param aabb @zh 轴对齐包围盒 @en The aabb to test * @param frustum @zh 锥台 @en The frustum to test - * @return @zh 0 或非 0 @en 0 or not 0, 0 indicates there is no intersection + * @returns @zh 如果没有相交,返回 0 ,否则返回非 0。 @en zero if no intersection, otherwise returns a non-zero value.no intersection */ const aabbFrustum = function (aabb: AABB, frustum: Readonly): number { for (let i = 0; i < frustum.planes.length; i++) { @@ -664,7 +663,7 @@ const aabbFrustum = function (aabb: AABB, frustum: Readonly): number { * 轴对齐包围盒和锥台的相交性检测。速度快,但是当锥台完全在aabb中时就会判断出错。 * @param {AABB} aabb 轴对齐包围盒 * @param {Frustum} frustum 锥台 - * @return {number} aabb completely inside the frustum = 1, otherwise = 0 + * @returns {number} aabb completely inside the frustum = 1, otherwise = 0 */ const aabbFrustumCompletelyInside = function (aabb: AABB, frustum: Readonly): number { for (let i = 0; i < frustum.planes.length; i++) { @@ -684,7 +683,7 @@ const aabbFrustumCompletelyInside = function (aabb: AABB, frustum: Readonly { /** * @en - * Basic Geometry: directional bounding box. + * Basic Geometry: Oriented bounding box. * @zh - * 基础几何 方向包围盒。 + * 基础几何:方向包围盒。 */ export class OBB { /** * @en - * create a new obb + * Creates a new OBB instance * @zh - * 创建一个新的 obb 实例。 + * 创建一个新的 OBB 实例。 * @param cx @zh 形状的相对于原点的 X 坐标。 @en The x coordinate of origin. * @param cy @zh 形状的相对于原点的 Y 坐标。 @en The y coordinate of origin. * @param cz @zh 形状的相对于原点的 Z 坐标。 @en The z coordinate of origin. - * @param hw @zh - obb 宽度的一半。 @en Half the width of the OBB. - * @param hh @zh - obb 高度的一半。 @en Half the height of the OBB. - * @param hl @zh - obb 长度的一半。 @en Half the length of the OBB. - * @param ox_1 @zh 方向矩阵参数。 @en The x component of the one axis of the OBB. - * @param ox_2 @zh 方向矩阵参数。 @en The x component of the second axis of the OBB. - * @param ox_3 @zh 方向矩阵参数。 @en The x component of the third axis of the OBB. - * @param oy_1 @zh 方向矩阵参数。 @en The y component of the one axis of the OBB. - * @param oy_2 @zh 方向矩阵参数。 @en The y component of the second axis of the OBB. - * @param oy_3 @zh 方向矩阵参数。 @en The y component of the third axis of the OBB. - * @param oz_1 @zh 方向矩阵参数。 @en The z component of the one axis of the OBB. - * @param oz_2 @zh 方向矩阵参数。 @en The z component of the second axis of the OBB. - * @param oz_3 @zh 方向矩阵参数。 @en The z component of the third axis of the OBB. - * @return @zh 返回一个 obb。 @en A new OBB. + * @param hw @zh - OBB 宽度的一半。 @en Half the width of the OBB. + * @param hh @zh - OBB 高度的一半。 @en Half the height of the OBB. + * @param hl @zh - OBB 长度的一半。 @en Half the length of the OBB. + * @param ox_1 @zh 方向矩阵参数,第 1 条轴的 x 分量。 @en The x component of the first axis of the OBB. + * @param ox_2 @zh 方向矩阵参数,第 2 条轴的 x 分量。 @en The x component of the second axis of the OBB. + * @param ox_3 @zh 方向矩阵参数,第 3 条轴的 x 分量。 @en The x component of the third axis of the OBB. + * @param oy_1 @zh 方向矩阵参数,第 1 条轴的 y 分量。 @en The y component of the first axis of the OBB. + * @param oy_2 @zh 方向矩阵参数,第 2 条轴的 y 分量。 @en The y component of the second axis of the OBB. + * @param oy_3 @zh 方向矩阵参数,第 3 条轴的 y 分量。 @en The y component of the third axis of the OBB. + * @param oz_1 @zh 方向矩阵参数,第 1 条轴的 z 分量。 @en The z component of the first axis of the OBB. + * @param oz_2 @zh 方向矩阵参数,第 2 条轴的 z 分量。 @en The z component of the second axis of the OBB. + * @param oz_3 @zh 方向矩阵参数,第 3 条轴的 z 分量。 @en The z component of the third axis of the OBB. + * @returns @zh 返回新创建的 OBB 实例。 @en A new OBB instance. */ public static create ( cx: number, cy: number, cz: number, @@ -80,11 +79,11 @@ export class OBB { /** * @en - * clone a new obb + * Clones a new OBB instance. * @zh - * 克隆一个 obb。 + * 克隆一个 OBB 实例。 * @param a @zh 克隆的目标。 @en The input OBB. - * @returns @zh The new OBB. @en 克隆出的新对象。 + * @returns @zh The cloned OBB instance. @en 克隆出的新对象。 */ public static clone (a: OBB) { return new OBB(a.center.x, a.center.y, a.center.z, @@ -96,12 +95,12 @@ export class OBB { /** * @en - * copy the values from one obb to another + * Copies the values from one OBB to another. * @zh - * 将从一个 obb 的值复制到另一个 obb。 - * @param out @zh 接受操作的 obb。 @en The output OBB. - * @param a @zh 被复制的 obb。 @en The input OBB. - * @returns @zh out 接受操作的 obb。 @en The reference of the first parameter `out`. + * 复制一个 OBB 的值到另一个 OBB 中。 + * @param out @zh 接受操作的 OBB。 @en The output OBB. + * @param a @zh 被复制的 OBB。 @en The input OBB. + * @returns @zh 接受操作的 OBB,与 `out` 参数相同。 @en The output OBB, same as the `out` parameter. */ public static copy (out: OBB, a: OBB): OBB { Vec3.copy(out.center, a.center); @@ -113,13 +112,13 @@ export class OBB { /** * @en - * create a new obb from two corner points + * Creates a new OBB from two corner points. * @zh - * 用两个点创建一个新的 obb。 - * @param out @zh - 接受操作的 obb。 @en The output OBB. - * @param minPos @zh - obb 的最小点。 @en The minimum position of the AABB. - * @param maxPos @zh - obb 的最大点。 @en The maximum position of the AABB. - * @returns @zh {OBB} out 接受操作的 obb。 @en The reference of the first parameter `out`. + * 用两个点创建一个新的 OBB。 + * @param out @zh - 接受操作的 OBB。 @en The output OBB. + * @param minPos @zh - OBB 的最小点。 @en The minimum position of the AABB. + * @param maxPos @zh - OBB 的最大点。 @en The maximum position of the AABB. + * @returns @zh 接受操作的 OBB,与 `out` 参数相同。 @en The output OBB, same as the `out` parameter. */ public static fromPoints (out: OBB, minPos: Vec3, maxPos: Vec3): OBB { Vec3.multiplyScalar(out.center, Vec3.add(_v3_tmp, minPos, maxPos), 0.5); @@ -130,26 +129,26 @@ export class OBB { /** * @en - * Set the components of a obb to the given values + * Sets the components of an OBB to the given values. * @zh - * 将给定 obb 的属性设置为给定的值。 - * @param out @zh 目标 OBB @en The output OBB. + * 将给定 OBB 的属性设置为给定的值。 + * @param out @zh 目标 OBB @en The output OBB instance. * @param cx @zh 形状的相对于原点的 X 坐标。 @en The x coordinate of origin. * @param cy @zh 形状的相对于原点的 Y 坐标。 @en The y coordinate of origin. * @param cz @zh 形状的相对于原点的 Z 坐标。 @en The z coordinate of origin. * @param hw @zh - obb 宽度的一半。 @en Half the width of the OBB. * @param hh @zh - obb 高度的一半。 @en Half the height of the OBB. * @param hl @zh - obb 长度的一半。 @en Half the length of the OBB. - * @param ox_1 @zh 方向矩阵参数。 @en The x component of the one axis of the OBB. - * @param ox_2 @zh 方向矩阵参数。 @en The x component of the second axis of the OBB. - * @param ox_3 @zh 方向矩阵参数。 @en The x component of the third axis of the OBB. - * @param oy_1 @zh 方向矩阵参数。 @en The y component of the one axis of the OBB. - * @param oy_2 @zh 方向矩阵参数。 @en The y component of the second axis of the OBB. - * @param oy_3 @zh 方向矩阵参数。 @en The y component of the third axis of the OBB. - * @param oz_1 @zh 方向矩阵参数。 @en The z component of the one axis of the OBB. - * @param oz_2 @zh 方向矩阵参数。 @en The z component of the second axis of the OBB. - * @param oz_3 @zh 方向矩阵参数。 @en The z component of the third axis of the OBB. - * @returns @zh out 接受操作的 OBB @en The reference of the first parameter `out`. + * @param ox_1 @zh 方向矩阵参数,第 1 条轴的 x 分量。 @en The x component of the first axis of the OBB. + * @param ox_2 @zh 方向矩阵参数,第 2 条轴的 x 分量。 @en The x component of the second axis of the OBB. + * @param ox_3 @zh 方向矩阵参数,第 3 条轴的 x 分量。 @en The x component of the third axis of the OBB. + * @param oy_1 @zh 方向矩阵参数,第 1 条轴的 y 分量。 @en The y component of the first axis of the OBB. + * @param oy_2 @zh 方向矩阵参数,第 2 条轴的 y 分量。 @en The y component of the second axis of the OBB. + * @param oy_3 @zh 方向矩阵参数,第 3 条轴的 y 分量。 @en The y component of the third axis of the OBB. + * @param oz_1 @zh 方向矩阵参数,第 1 条轴的 z 分量。 @en The z component of the first axis of the OBB. + * @param oz_2 @zh 方向矩阵参数,第 2 条轴的 z 分量。 @en The z component of the second axis of the OBB. + * @param oz_3 @zh 方向矩阵参数,第 3 条轴的 z 分量。 @en The z component of the third axis of the OBB. + * @returns @zh 接受操作的 OBB,与 `out` 参数相同。 @en The output OBB, same as the `out` parameter. */ public static set ( out: OBB, @@ -167,7 +166,7 @@ export class OBB { /** * @en - * Center point of the OBB. + * The center point of an OBB in local coordinate. * @zh * 本地坐标的中心点。 */ @@ -191,9 +190,9 @@ export class OBB { /** * @en - * Gets the type of the shape. + * Gets the type of the OBB. Always returns `enums.SHAPE_OBB`. * @zh - * 获取形状的类型。 + * 获取形状的类型,固定返回 `enums.SHAPE_OBB`。 */ get type () { return this._type; @@ -201,6 +200,23 @@ export class OBB { protected readonly _type: number; + /** + * @param cx @zh 形状的相对于原点的 X 坐标。 @en The x coordinate of origin. + * @param cy @zh 形状的相对于原点的 Y 坐标。 @en The y coordinate of origin. + * @param cz @zh 形状的相对于原点的 Z 坐标。 @en The z coordinate of origin. + * @param hw @zh - OBB 宽度的一半。 @en Half the width of the OBB. + * @param hh @zh - OBB 高度的一半。 @en Half the height of the OBB. + * @param hl @zh - OBB 长度的一半。 @en Half the length of the OBB. + * @param ox_1 @zh 方向矩阵参数,第 1 条轴的 x 分量。 @en The x component of the first axis of the OBB. + * @param ox_2 @zh 方向矩阵参数,第 2 条轴的 x 分量。 @en The x component of the second axis of the OBB. + * @param ox_3 @zh 方向矩阵参数,第 3 条轴的 x 分量。 @en The x component of the third axis of the OBB. + * @param oy_1 @zh 方向矩阵参数,第 1 条轴的 y 分量。 @en The y component of the first axis of the OBB. + * @param oy_2 @zh 方向矩阵参数,第 2 条轴的 y 分量。 @en The y component of the second axis of the OBB. + * @param oy_3 @zh 方向矩阵参数,第 3 条轴的 y 分量。 @en The y component of the third axis of the OBB. + * @param oz_1 @zh 方向矩阵参数,第 1 条轴的 z 分量。 @en The z component of the first axis of the OBB. + * @param oz_2 @zh 方向矩阵参数,第 2 条轴的 z 分量。 @en The z component of the second axis of the OBB. + * @param oz_3 @zh 方向矩阵参数,第 3 条轴的 z 分量。 @en The z component of the third axis of the OBB. + */ constructor (cx = 0, cy = 0, cz = 0, hw = 1, hh = 1, hl = 1, ox_1 = 1, ox_2 = 0, ox_3 = 0, @@ -214,11 +230,11 @@ export class OBB { /** * @en - * Get the bounding points of this shape + * Gets the bounding points of this OBB instance. * @zh - * 获取 obb 的最小点和最大点。 - * @param minPos @zh 最小点。 @en The out minimum position of the OBB. - * @param maxPos @zh 最大点。 @en The out maximum position of the OBB. + * 获取此 OBB 的最小点和最大点。 + * @param minPos @zh 此 OBB 的最小点。 @en The out minimum position of the OBB. + * @param maxPos @zh 此 OBB 的最大点。 @en The out maximum position of the OBB. */ public getBoundary (minPos: Vec3, maxPos: Vec3) { transform_extent_m3(_v3_tmp, this.halfExtents, this.orientation); @@ -228,14 +244,15 @@ export class OBB { /** * @en - * Transform this shape + * Transforms this OBB and store the result to the `out` parameter. * @zh - * 将 out 根据这个 obb 的数据进行变换。 + * 对当前 OBB 的数据进行变换,并存储结果到 `out` 参数中。 * @param m @zh 变换的矩阵。 @en The transform matrix * @param pos @zh 变换的位置部分。 @en 3d-vector translation. * @param rot @zh 变换的旋转部分。 @en Quaternion rotation. * @param scale @zh 变换的缩放部分。 @en 3d-vector scale. - * @param out @zh 变换的目标。 @en The output OBB. + * @param out @zh 变换结果的目标 OBB。 @en The output OBB. + * @note @zh 此方法不会修改当前 OBB 的数据。 @en This method will not modify the data of current OBB. */ public transform (m: Mat4, pos: Vec3, rot: Quat, scale: Vec3, out: OBB) { Vec3.transformMat4(out.center, this.center, m); @@ -246,12 +263,13 @@ export class OBB { /** * @en - * Transform by matrix and rotation. + * Transforms this OBB by a 4x4 matrix and a quaternion. * @zh - * 将 out 根据这个 obb 的数据进行变换。 + * 根据一个 4x4 矩阵和一个四元数变换此 OBB。 * @param m @zh 变换的矩阵。 @en The transform matrix. - * @param rot @zh 变换的旋转部分。 @en Quaternion rotation. + * @param rot @zh 变换的旋转部分。 @en The quaternion for rotation. * @param out @zh 变换的目标。 @en The output OBB. + * @note @zh 此方法不会修改当前 OBB 的数据。 @en This method will not modify the data of current OBB. */ public translateAndRotate (m: Mat4, rot: Quat, out: OBB) { Vec3.transformMat4(out.center, this.center, m); @@ -261,11 +279,12 @@ export class OBB { /** * @en - * Scale OBB by a 3d-vector. + * Scales this OBB by a 3d-vector and store the result to the `out` parameter. * @zh - * 将 out 根据这个 obb 的数据进行缩放。 + * 根据 3D 向量对此 OBB 的数据进行缩放并将结果存储在 out 参数中。 * @param scale @zh 缩放值。 @en 3d-vector scale. * @param out @zh 缩放的目标。 @en The output OBB. + * @note @zh 此方法不会修改当前 OBB 的数据。 @en This method will not modify the data of current OBB. */ public setScale (scale: Vec3, out: OBB) { Vec3.multiply(out.halfExtents, this.halfExtents, scale); diff --git a/cocos/core/geometry/plane.ts b/cocos/core/geometry/plane.ts index 8a95f4927a..3f2324542d 100644 --- a/cocos/core/geometry/plane.ts +++ b/cocos/core/geometry/plane.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Mat4, Vec3, Vec4 } from '../math'; import enums from './enums'; @@ -36,20 +35,20 @@ const temp_vec4 = legacyCC.v4(); * @en * Basic Geometry: Plane. * @zh - * 基础几何 Plane。 + * 基础几何:平面。 */ export class Plane { /** * @en - * create a new plane + * Creates a new plane. * @zh - * 创建一个新的 plane。 - * @param nx @en The x component of normal vector. @zh 法向分量的 x 部分。 - * @param ny @en The y component of normal vector. @zh 法向分量的 y 部分。 - * @param nz @en The z component of normal vector. @zh 法向分量的 z 部分。 + * 创建一个新的平面。 + * @param nx @en The x component of normal vector. @zh 法向量的 x 部分。 + * @param ny @en The y component of normal vector. @zh 法向量的 y 部分。 + * @param nz @en The z component of normal vector. @zh 法向量的 z 部分。 * @param d @en The distance between normal vector and the origin. @zh 与原点的距离。 - * @return + * @returns @en The created plane object. @zh 新创建的平面。 */ public static create (nx: number, ny: number, nz: number, d: number) { return new Plane(nx, ny, nz, d); @@ -57,11 +56,11 @@ export class Plane { /** * @en - * clone a new plane + * Clones a new plane. * @zh - * 克隆一个新的 plane。 - * @param p @en The Plane object to be cloned from. @zh 克隆的来源。 - * @return @en Cloned objects @zh 克隆出的对象。 + * 克隆一个新的平面。 + * @param p @en The Plane object to be cloned from. @zh 克隆的来源平面对象。 + * @returns @en The cloned Plane object @zh 克隆出的平面对象。 */ public static clone (p: Plane) { return new Plane(p.n.x, p.n.y, p.n.z, p.d); @@ -69,12 +68,12 @@ export class Plane { /** * @en - * copy the values from one plane to another + * Copies the values from one plane to another. * @zh * 复制一个平面的值到另一个。 * @param out @en The object to be operated on. @zh 接受操作的对象。 * @param p @en The source of replication. @zh 复制的来源。 - * @return @en The object to be operated on. @zh 接受操作的对象。 + * @returns @en The object to be operated on. @zh 接受操作的对象。 */ public static copy (out: Plane, p: Plane) { Vec3.copy(out.n, p.n); @@ -85,14 +84,14 @@ export class Plane { /** * @en - * create a plane from three points + * Creates a plane from three points * @zh * 用三个点创建一个平面。 - * @param out @en The object to be operated on. @zh 接受操作的对象。 - * @param a @en Point a. @zh 点 a。 - * @param b @en Point b. @zh 点 b。 - * @param c @en Point c. @zh 点 c。 - * @return out @en The object to be operated on. @zh 接受操作的对象。 + * @param out @en The Plane object to be operated on. @zh 接受操作的对象。 + * @param a @en The point a. @zh 点 a。 + * @param b @en The point b. @zh 点 b。 + * @param c @en The point c. @zh 点 c。 + * @returns @en The Plane object to be operated on, same as `out` parameter. @zh 接受操作的对象,与 `out` 相同。 */ public static fromPoints (out: Plane, a: Vec3, b: Vec3, c: Vec3) { Vec3.subtract(v1, b, a); @@ -106,15 +105,15 @@ export class Plane { /** * @en - * Set the components of a plane to the given values + * Sets the components of a plane to the given values. * @zh * 将给定平面的属性设置为给定值。 - * @param out @en The object to be operated on. @zh 接受操作的对象。 - * @param nx @en The x component of normal vector. @zh 法向分量的 x 部分。 - * @param ny @en The y component of normal vector. @zh 法向分量的 y 部分。 - * @param nz @en The z component of normal vector. @zh 法向分量的 z 部分。 + * @param out @en The Plane object to be operated on. @zh 接受操作的对象。 + * @param nx @en The x component of normal vector. @zh 法向量量的 x 部分。 + * @param ny @en The y component of normal vector. @zh 法向量的 y 部分。 + * @param nz @en The z component of normal vector. @zh 法向量的 z 部分。 * @param d @en The distance between normal vector and the origin. @zh 与原点的距离。 - * @return out @en The object to be operated on. @zh 接受操作的对象。 + * @returns @en The object to be operated on, same as the `out` parameter. @zh 接受操作的对象,与 `out` 参数相同。 */ public static set (out: Plane, nx: number, ny: number, nz: number, d: number) { out.n.x = nx; @@ -127,13 +126,13 @@ export class Plane { /** * @en - * create plane from normal and point + * Creates plane from normal and point. * @zh * 用一条法线和一个点创建平面。 * @param out @en The object to be operated on. @zh 接受操作的对象。 - * @param normal @en Normal of the plane. @zh 平面的法线。 + * @param normal @en The normal of the plane. @zh 平面的法线。 * @param point @en A point in the plane. @zh 平面上的一点。 - * @return out @en The object to be operated on. @zh 接受操作的对象。 + * @returns @en The object to be operated on, same as the `out` parameter. @zh 接受操作的对象,与 `out` 参数相同。 */ public static fromNormalAndPoint (out: Plane, normal: Vec3, point: Vec3) { Vec3.copy(out.n, normal); @@ -144,12 +143,12 @@ export class Plane { /** * @en - * normalize a plane + * Normalizes a plane. * @zh * 归一化一个平面。 * @param out @en The object to be operated on. @zh 接受操作的对象。 * @param a @en Source data for the operation. @zh 操作的源数据。 - * @return out @en The object to be operated on. @zh 接受操作的对象。 + * @returns @en The object to be operated on, sames as the `out` parameter. @zh 接受操作的对象,与 `out` 相同。 */ public static normalize (out: Plane, a: Plane) { const len = a.n.length(); @@ -178,9 +177,9 @@ export class Plane { /** * @en - * Gets the type of the shape. + * Gets the type of the Plane, its value is `enums.SHAPE_PLANE`. * @zh - * 获取形状的类型。 + * 获取形状的类型,值为 `enums.SHAPE_PLANE`。 */ get type () { return this._type; @@ -200,12 +199,12 @@ export class Plane { /** * @en - * Construct a plane. + * Constructs a plane. * @zh * 构造一个平面。 - * @param nx @en The x component of normal vector. @zh 法向分量的 x 部分。 - * @param ny @en The y component of normal vector. @zh 法向分量的 y 部分。 - * @param nz @en The z component of normal vector. @zh 法向分量的 z 部分。 + * @param nx @en The x component of normal vector. @zh 法向量的 x 部分。 + * @param ny @en The y component of normal vector. @zh 法向量的 y 部分。 + * @param nz @en The z component of normal vector. @zh 法向量的 z 部分。 * @param d @en The distance between normal vector and the origin. @zh 与原点的距离。 */ constructor (nx = 0, ny = 1, nz = 0, d = 0) { @@ -216,10 +215,10 @@ export class Plane { /** * @en - * transform this plane. + * Transforms this plane by a 4x4 matrix. * @zh - * 变换一个平面。 - * @param mat + * 使用一个 4x4 矩阵变换此平面。 + * @param mat @en The 4x4 matrix for transformation @zh 用于变换的 4x4 矩阵。 */ public transform (mat: Mat4): void { Mat4.invert(temp_mat, mat); diff --git a/cocos/core/geometry/ray.ts b/cocos/core/geometry/ray.ts index 65de5c49be..d22c31957f 100644 --- a/cocos/core/geometry/ray.ts +++ b/cocos/core/geometry/ray.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Vec3 } from '../math'; import enums from './enums'; @@ -29,24 +28,24 @@ import { IVec3Like } from '../math/type-define'; /** * @en - * Basic Geometry: ray. + * Basic Geometry: Ray. * @zh - * 基础几何 射线。 + * 基础几何:射线。 */ export class Ray { /** * @en - * create a new ray + * Creates a new ray. * @zh * 创建一条射线。 - * @param {number} ox @en x component of start point @zh 起点的 x 部分。 - * @param {number} oy @en y component of start point @zh 起点的 y 部分。 - * @param {number} oz @en z component of start point @zh 起点的 z 部分。 - * @param {number} dx @en Point in the x direction @zh 方向的 x 部分。 - * @param {number} dy @en Point in the y direction @zh 方向的 y 部分。 - * @param {number} dz @en Point in the z direction @zh 方向的 z 部分。 - * @return {Ray} @en Ray object @zh 射线。 + * @param {number} ox @en The x component of start point. @zh 起点的 x 部分。 + * @param {number} oy @en The y component of start point. @zh 起点的 y 部分。 + * @param {number} oz @en The z component of start point. @zh 起点的 z 部分。 + * @param {number} dx @en The x component of direction point. @zh 方向的 x 部分。 + * @param {number} dy @en The y component of direction point. @zh 方向的 y 部分。 + * @param {number} dz @en The z component of direction point. @zh 方向的 z 部分。 + * @returns {Ray} @en The created ray object. @zh 新创建的射线。 */ public static create (ox = 0, oy = 0, oz = 0, dx = 0, dy = 0, dz = 1): Ray { return new Ray(ox, oy, oz, dx, dy, dz); @@ -54,11 +53,11 @@ export class Ray { /** * @en - * Creates a new ray initialized with values from an existing ray + * Creates a new ray initialized with the values from an existing ray. * @zh * 从一条射线克隆出一条新的射线。 - * @param {Ray} a @en The Ray object to be cloned from @zh 克隆的目标。 - * @return {Ray} @en Clone new ray object @zh 克隆出的新对象。 + * @param a @en The Ray object to be cloned from. @zh 克隆的目标。 + * @returns @en The cloned Ray object. @zh 克隆出的新对象。 */ public static clone (a: Ray): Ray { return new Ray( @@ -69,12 +68,12 @@ export class Ray { /** * @en - * Copy the values from one ray to another + * Copies the values from one ray to another. * @zh - * 将从一个 ray 的值复制到另一个 ray。 - * @param {Ray} out @en The ray object to be modified @zh 接受操作的 ray。 - * @param {Ray} a @en The copied ray object @zh 被复制的 ray。 - * @return {Ray} @en Ray object @zh out 接受操作的 ray。 + * 复制一个 Ray 的值到另一个 Ray 中。 + * @param out @en The Ray object to copy to. @zh 接受操作的射线。 + * @param a @en The Ray object to copy from. @zh 被复制的射线。 + * @returns @en The Ray object to copy to, same as the `out` parameter. @zh 接受操作的射线,与 `out` 参数相同。 */ public static copy (out: Ray, a: Ray): Ray { Vec3.copy(out.o, a.o); @@ -85,13 +84,13 @@ export class Ray { /** * @en - * create a ray from two points + * Creates a ray from two points. * @zh * 用两个点创建一条射线。 - * @param {Ray} out @en The ray object to be modified @zh 接受操作的射线。 - * @param {Vec3} origin @en Starting point of the ray @zh 射线的起点。 - * @param {Vec3} target @en point on the ray @zh 射线上的一点。 - * @return {Ray} @en Ray object @zh out 接受操作的射线。 + * @param out @en The Ray object. @zh 接受操作的射线。 + * @param origin @en The start point of the ray. @zh 射线的起点。 + * @param target @en The target point on the ray. @zh 射线上的一点。 + * @returns @en The Ray object, same as the `out` parameter. @zh 接受操作的射线,与 `out` 参数相同。 */ public static fromPoints (out: Ray, origin: Vec3, target: Vec3): Ray { Vec3.copy(out.o, origin); @@ -101,17 +100,17 @@ export class Ray { /** * @en - * Set the components of a ray to the given values + * Sets the components of a ray to the given values. * @zh * 将给定射线的属性设置为给定的值。 - * @param {Ray} out @en The ray object to be modified @zh 接受操作的射线。 - * @param {number} ox @en x component of start point @zh 起点的 x 部分。 - * @param {number} oy @en y component of start point @zh 起点的 y 部分。 - * @param {number} oz @en z component of start point @zh 起点的 z 部分。 - * @param {number} dx @en Point in the x direction @zh 方向的 x 部分。 - * @param {number} dy @en Point in the y direction @zh 方向的 y 部分。 - * @param {number} dz @en Point in the z direction @zh 方向的 z 部分。 - * @return {Ray} @en Ray object @zh out 接受操作的射线。 + * @param out @en The Ray object to be modified @zh 接受操作的射线。 + * @param ox @en The x component of start point. @zh 起点的 x 部分。 + * @param oy @en The y component of start point. @zh 起点的 y 部分。 + * @param oz @en The z component of start point. @zh 起点的 z 部分。 + * @param dx @en The x component of direction point. @zh 方向的 x 部分。 + * @param dy @en The y component of direction point. @zh 方向的 y 部分。 + * @param dz @en The z component of direction point. @zh 方向的 z 部分。 + * @returns @en The Ray object, same as the `out` parameter. @zh 接受操作的射线,与 `out` 相同。 */ public static set (out: Ray, ox: number, oy: number, oz: number, dx: number, dy: number, dz: number): Ray { out.o.x = ox; @@ -142,9 +141,9 @@ export class Ray { /** * @en - * Gets the type of the shape. + * Gets the type of the ray, its value is `enums.SHAPE_RAY`. * @zh - * 获取形状的类型。 + * 获取形状的类型,其值为`enums.SHAPE_RAY`。 */ get type () { return this._type; @@ -154,15 +153,15 @@ export class Ray { /** * @en - * Construct a ray; + * Constructs a ray. * @zh * 构造一条射线。 - * @param {number} ox @en x component of start point @zh 起点的 x 部分。 - * @param {number} oy @en y component of start point @zh 起点的 y 部分。 - * @param {number} oz @en z component of start point @zh 起点的 z 部分。 - * @param {number} dx @en Point in the x direction @zh 方向的 x 部分。 - * @param {number} dy @en Point in the y direction @zh 方向的 y 部分。 - * @param {number} dz @en Point in the z direction @zh 方向的 z 部分。 + * @param ox @en The x component of start point. @zh 起点的 x 部分。 + * @param oy @en The y component of start point. @zh 起点的 y 部分。 + * @param oz @en The z component of start point. @zh 起点的 z 部分。 + * @param dx @en The x component of direction point. @zh 方向的 x 部分。 + * @param dy @en The y component of direction point. @zh 方向的 y 部分。 + * @param dz @en The z component of direction point. @zh 方向的 z 部分。 */ constructor (ox = 0, oy = 0, oz = 0, dx = 0, dy = 0, dz = -1) { @@ -173,11 +172,11 @@ export class Ray { /** * @en - * Compute a point with the distance between the origin. + * Calculates a point on the ray with the specific distance from the origin point. * @zh - * 根据给定距离计算出射线上的一点。 - * @param out @en Another point on the ray @zh 射线上的另一点。 - * @param distance @en Given distance @zh 给定距离。 + * 根据给定的距离计算出射线上的一点。 + * @param out @en Another point on the ray. @zh 射线上的另一点。 + * @param distance @en The given distance. @zh 给定的距离。 */ public computeHit (out: IVec3Like, distance: number) { Vec3.normalize(out, this.d); diff --git a/cocos/core/geometry/spec.ts b/cocos/core/geometry/spec.ts index 4d8e526d3c..71cf7f02f4 100644 --- a/cocos/core/geometry/spec.ts +++ b/cocos/core/geometry/spec.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ /** * @en @@ -33,7 +32,7 @@ export enum ERaycastMode { /** * @en - * Detect and record all data. + * Detects and records all data. * @zh * 检测并记录所有的数据。 */ @@ -41,7 +40,7 @@ export enum ERaycastMode { /** * @en - * Detect all, but record only the most recent data. + * Detects all data, but records only the most recent data. * @zh * 检测所有,但只记录最近的数据。 */ @@ -157,7 +156,7 @@ export interface IRayMeshOptions extends IRaySubMeshOptions { /** * @en - * The optional param structure of the `rayModel`. + * The optional parameter structure of the `rayModel`. * @zh * `rayModel`的可选参数结构。 */ diff --git a/cocos/core/geometry/sphere.ts b/cocos/core/geometry/sphere.ts index 923ef493a4..6cc8d861fd 100644 --- a/cocos/core/geometry/sphere.ts +++ b/cocos/core/geometry/sphere.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Mat4, Quat, Vec3 } from '../math'; import enums from './enums'; @@ -37,20 +36,20 @@ function maxComponent (v: Vec3) { return Math.max(Math.max(v.x, v.y), v.z); } * @en * Basic Geometry: Sphere. * @zh - * 基础几何 轴对齐球。 + * 基础几何:球。 */ export class Sphere { /** * @en - * create a new sphere + * Creates a new sphere instance. * @zh - * 创建一个新的 sphere 实例。 - * @param cx @en X-Coordinate of center point relative to the origin. @zh 中心点的相对于原点的 X 坐标。 - * @param cy @en Y-Coordinate of center point relative to the origin. @zh 中心点的相对于原点的 Y 坐标。 - * @param cz @en Z-Coordinate of center point relative to the origin. @zh 中心点的相对于原点的 Z 坐标。 - * @param r @en Radius of the sphere. @zh 球体的半径 - * @return @en return a new sphere. @zh 返回一个 sphere。 + * 创建一个新的球实例。 + * @param cx @en The X-Coordinate of the center point relative to the origin. @zh 相对于原点的中心点的 X 坐标。 + * @param cy @en The Y-Coordinate of the center point relative to the origin. @zh 相对于原点的中心点的 Y 坐标。 + * @param cz @en The Z-Coordinate of the center point relative to the origin. @zh 相对于原点的中心点的 Z 坐标。 + * @param r @en The radius of the sphere. @zh 球体的半径 + * @returns @en A new sphere instance. @zh 一个新的球实例。 */ public static create (cx: number, cy: number, cz: number, r: number): Sphere { return new Sphere(cx, cy, cz, r); @@ -58,11 +57,11 @@ export class Sphere { /** * @en - * clone a new sphere + * Clones a sphere instance. * @zh - * 克隆一个新的 sphere 实例。 + * 克隆一个新的球实例。 * @param p @en The sphere object to clone from. @zh 克隆的目标。 - * @return @en The sphere object to clone to. @zh 克隆出的示例。 + * @returns @en The sphere object to clone to. @zh 克隆出的实例。 */ public static clone (p: Sphere): Sphere { return new Sphere(p.center.x, p.center.y, p.center.z, p.radius); @@ -70,12 +69,12 @@ export class Sphere { /** * @en - * copy the values from one sphere to another + * Copies the values from one sphere to another. * @zh - * 将从一个 sphere 的值复制到另一个 sphere。 - * @param out @en The sphere object to copy to. @zh 接受操作的 sphere。 - * @param a @en The sphere object to copy from. @zh 被复制的 sphere。 - * @return @en The sphere object to copy to. @zh 接受操作的 sphere。 + * 复制一个球的值到另一个球中。 + * @param out @en The sphere object to copy to. @zh 接受操作的球实例。 + * @param a @en The sphere object to copy from. @zh 被复制的球实例。 + * @returns @en The sphere object to copy to. @zh 接受操作的球实例。 */ public static copy (out: Sphere, p: Sphere): Sphere { Vec3.copy(out.center, p.center); @@ -86,13 +85,13 @@ export class Sphere { /** * @en - * create a new bounding sphere from two corner points + * Creates a new sphere instance from two points. * @zh - * 从两个点创建一个新的 sphere。 - * @param out - @en Sphere created from points. @zh 接受操作的 sphere。 - * @param minPos - @en Lower point of the sphere. @zh sphere 的较小点。 - * @param maxPos - @en Upper point of the sphere. @zh sphere 的较大点。 - * @returns @en The output sphere object to save the created sphere data. @zh 接受操作的 sphere。 + * 从两个点创建一个新的球实例。 + * @param out - @en The sphere created from the two points. @zh 接受操作的球实例。 + * @param minPos - @en The lower point of the sphere. @zh 球的较小点。 + * @param maxPos - @en The upper point of the sphere. @zh 球的较大点。 + * @returns @en The created sphere, same as the `out` parameter. @zh 接受操作的球实例,与 `out` 参数相同。 */ public static fromPoints (out: Sphere, minPos: Vec3, maxPos: Vec3): Sphere { Vec3.multiplyScalar(out.center, Vec3.add(_v3_tmp, minPos, maxPos), 0.5); @@ -102,15 +101,15 @@ export class Sphere { /** * @en - * Set the components of a sphere to the given values + * Sets the components of a sphere to the given values * @zh * 将球体的属性设置为给定的值。 - * @param out @en The sphere to set properties to. @zh 接受操作的 sphere。 - * @param cx @en X-Coordinate of center point relative to the origin. @zh 中心点的相对于原点的 X 坐标。 - * @param cy @en Y-Coordinate of center point relative to the origin. @zh 中心点的相对于原点的 Y 坐标。 - * @param cz @en Z-Coordinate of center point relative to the origin. @zh 中心点的相对于原点的 Z 坐标。 - * @param r @en Radius of the sphere. @zh 半径。 - * @return @en Sphere which the properties will be set to. @zh 接受操作的 sphere。 + * @param out @en The sphere to set values to. @zh 接受操作的球实例。 + * @param cx @en The X-Coordinate of the center point which relative to the origin. @zh 相对于原点的中心点的 X 坐标。 + * @param cy @en The Y-Coordinate of the center point which relative to the origin. @zh 相对于原点的中心点的 Y 坐标。 + * @param cz @en The Z-Coordinate of the center point which relative to the origin. @zh 相对于原点的中心点的 Z 坐标。 + * @param r @en The radius of the sphere. @zh 要设置的球的半径。 + * @returns @en The sphere to set values to, same as the `out` parameter. @zh 接受操作的实例,与 `out` 相同。 * @function */ public static set (out: Sphere, cx: number, cy: number, cz: number, r: number): Sphere { @@ -126,7 +125,7 @@ export class Sphere { * @en * The center of this sphere. * @zh - * 本地坐标的中心点。 + * 当前球在本地坐标中的中心点。 */ protected _center: Vec3 = new Vec3(0, 0, 0); get center (): Vec3 { @@ -143,7 +142,7 @@ export class Sphere { * @en * The radius of this sphere. * @zh - * 半径。 + * 当前球的半径。 */ get radius (): number { return this._radius; @@ -155,9 +154,9 @@ export class Sphere { /** * @en - * Gets the type of the shape. + * Gets the type of the shape, always returns `enums.SHAPE_SPHERE`. * @zh - * 获取形状的类型。 + * 获取球的类型,固定返回 `enums.SHAPE_SPHERE`。 */ get type () { return this._type; @@ -167,13 +166,13 @@ export class Sphere { /** * @en - * Construct a sphere. + * Constructs a sphere instance. * @zh * 构造一个球。 * @param cx @en The X-Coordinate of the sphere. @zh 该球的世界坐标的 X 坐标。 * @param cy @en The Y-Coordinate of the sphere. @zh 该球的世界坐标的 Y 坐标。 * @param cz @en The Z-Coordinate of the sphere. @zh 该球的世界坐标的 Z 坐标。 - * @param r @en The radius. @zh 半径。 + * @param r @en The radius of the sphere. @zh 球的半径。 */ constructor (cx = 0, cy = 0, cz = 0, r = 1) { this._type = enums.SHAPE_SPHERE; @@ -186,9 +185,10 @@ export class Sphere { /** * @en - * Get a clone. + * Clones a sphere instance. * @zh - * 获得克隆。 + * 克隆一个球实例。 + * @returns @en The cloned sphere instance. @zh 克隆的球实例。 */ public clone () { return Sphere.clone(this); @@ -196,9 +196,9 @@ export class Sphere { /** * @en - * Copy a sphere. + * Copies the values from a sphere to the current sphere. * @zh - * 拷贝对象。 + * 复制一个球的值到当前球实例中。 * @param a @en The sphere to copy from. @zh 拷贝的目标。 */ public copy (a: Sphere) { @@ -207,11 +207,11 @@ export class Sphere { /** * @en - * Get the bounding points of this shape + * Gets the bounding points of this sphere. * @zh - * 获取此形状的边界点。 - * @param minPos @en The point with maximum coordinates of the sphere. @zh 最小点。 - * @param maxPos @en The point with minimum coordinates of the sphere. @zh 最大点。 + * 获取此球体的边界点。 + * @param minPos @en The point with maximum coordinates of the sphere. @zh 当前球实例的最小点。 + * @param maxPos @en The point with minimum coordinates of the sphere. @zh 当前球实例的最大点。 */ public getBoundary (minPos: Vec3, maxPos: Vec3) { Vec3.set(minPos, this.center.x - this.radius, this.center.y - this.radius, this.center.z - this.radius); @@ -220,13 +220,13 @@ export class Sphere { /** * @en - * Transform this shape + * Transforms this sphere by a 4x4 matrix and RTS and stores to the `out` parameter. * @zh - * 将 out 根据这个 sphere 的数据进行变换。 - * @param m @en The transform matrix. @zh 变换的矩阵。 - * @param pos @en The position. @zh 变换的位置部分。 - * @param rot @en The rotation. @zh 变换的旋转部分。 - * @param scale @en The scale. @zh 变换的缩放部分。 + * 用一个 4x4 矩阵和一组 RTS 变换此球体,并将结果存储在 `out` 参数中。 + * @param m @en The 4x4 transform matrix. @zh 4x4 变换矩阵。 + * @param pos @en The position part of the transform. @zh 变换的位置部分。 + * @param rot @en The rotation part of the transform. @zh 变换的旋转部分。 + * @param scale @en The scale part of the transform. @zh 变换的缩放部分。 * @param out @en The sphere which the transform will be applied to. @zh 变换的目标。 */ public transform (m: Mat4, pos: Vec3, rot: Quat, scale: Vec3, out: Sphere) { @@ -236,11 +236,11 @@ export class Sphere { /** * @en - * Translate and rotate this sphere. + * Transforms this sphere by a 4x4 matrix and a quternion, stores the result to the `out` parameter. * @zh - * 将 out 根据这个 sphere 的数据进行变换。 - * @param m @en The transform matrix. @zh 变换的矩阵。 - * @param rot @en The rotation. @zh 变换的旋转部分。 + * 使用一个 4x4 矩阵和一个四元数变换此球体,并将结果存储在 `out` 参数中。 + * @param m @en The 4x4 transform matrix. @zh 4x4 变换矩阵。 + * @param rot @en The rotation part of the transform. @zh 变换的旋转部分。 * @param out @en The sphere which the transform will be applied to. @zh 变换的目标。 */ public translateAndRotate (m: Mat4, rot: Quat, out: Sphere) { @@ -249,10 +249,10 @@ export class Sphere { /** * @en - * Scaling this sphere. + * Scales this sphere and stores the result to the `out` parameter. * @zh - * 将 out 根据这个 sphere 的数据进行缩放。 - * @param scale @en The scale. @zh 缩放值。 + * 对当前球实例进行缩放处理,并将结果存储在 `out` 参数中。 + * @param scale @en The scale value. @zh 缩放值。 * @param out @en The sphere which the scale will be applied to. @zh 缩放的目标。 */ public setScale (scale: Vec3, out: Sphere) { @@ -260,9 +260,9 @@ export class Sphere { } /** - * @en The point to be merged. - * @zh 球跟点合并 - * @param point @en The point to be merged. @zh 点 + * @en Merges a point to this sphere. + * @zh 合并一个点到当前球实例中。 + * @param point @en The point to be merged to this sphere. @zh 要合并到当前球实例的点。 */ public mergePoint (point: Vec3) { // if sphere.radius Less than 0, @@ -285,9 +285,9 @@ export class Sphere { } /** - * @en The sphere and points to be merged. - * @zh 球跟一系列点合并 - * @param points @en The point to be merged. @zh 一系列点 + * @en Merges some points to this sphere. + * @zh 合并一些点到当前球实例中。 + * @param points @en The points to be merged to this sphere. @zh 要合并到当前球实例的点列表。 */ public mergePoints (points: Vec3[]) { const length = points.length; @@ -302,9 +302,9 @@ export class Sphere { } /** - * @en The axis-aligned bounding box to be merged. - * @zh 球跟立方体合并 - * @param a @en Cube. @zh 立方体 + * @en Merges a AABB to this sphere. + * @zh 合并一个 AABB 到当前球实例中。 + * @param a @en The AABB instance to be merged to this sphere. @zh 要合并到当前球实例的 AABB 实例。 */ public mergeAABB (a: AABB) { a.getBoundary(_min, _max); diff --git a/cocos/core/geometry/spline.ts b/cocos/core/geometry/spline.ts index 0802426541..5ac549e486 100644 --- a/cocos/core/geometry/spline.ts +++ b/cocos/core/geometry/spline.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { assertIsTrue } from '../data/utils/asserts'; import { clamp, Vec3 } from '../math'; @@ -30,12 +29,16 @@ import enums from './enums'; export enum SplineMode { /** + * @en * Broken line: * Each knot is connected with a straight line from the beginning to the end to form a curve. At least two knots. + * @zh + * 每个结从头到尾用一条直线相连,形成一条曲线。 至少存在两个结点。 */ LINEAR = 0, /** + * @en * Piecewise Bezier curve: * Every four knots form a curve. Total knots number must be a multiple of 4. * Each curve passes only the first and fourth knots, and does not pass through the middle two control knots. @@ -44,13 +47,29 @@ export enum SplineMode { * (1) Suppose the four knots of the previous curve are A, B, C, D * (2) The four knots of the next curve must be D, E, F, G * (3) C and E need to be symmetrical about D + * + * @zh + * 分段贝塞尔曲线: + * 每四个结形成一条曲线。 总节数必须是 4 的倍数。 + * 每条曲线只通过第一个和第四个结点,不通过中间两个控制结点。 + * + * 如果你需要一条完整的连续曲线: + * (1) 假设前面曲线的四个结点分别是 A, B, C, D + * (2) 下一条曲线的四个结点必须是 D, E, F, G + * (3) C 和 E 需要关于 D 对称 */ BEZIER = 1, /** + * @en * Catmull Rom curve: * All knots(including start & end knots) form a whole continuous curve. At least two knots. * The whole curve passes through all knots. + * + * @zh + * Catmull Rom 曲线: + * 所有结点(包括起始结点和结束结点)形成一条完整的连续曲线。 至少存在两个结点。 + * 整条曲线穿过所有结点。 */ CATMULL_ROM = 2 } @@ -66,7 +85,7 @@ const _v3 = new Vec3(); * @en * Basic Geometry: Spline. * @zh - * 基础几何 Spline + * 基础几何:Spline。 */ export class Spline { @@ -83,14 +102,40 @@ export class Spline { } } + /** + * @en + * Creates a spline instance. + * @zh + * 创建一个 Spline 实例。 + * @param mode @en The mode to create the Spline instance. @zh 用于创建 Spline 实例的模式。 + * @param knots @en The knots to create the Spline instance. @zh 用于创建 Spline 实例的结点列表。 + * @returns @en The created Spline instance. @zh 创建出的 Spline 实例。 + */ public static create (mode: SplineMode, knots: Vec3[] = []) { return new Spline(mode, knots); } + /** + * @en + * Clones a Spline instance. + * @zh + * 克隆一个 Spline 实例。 + * @param s @en The Spline instance to be cloned. @zh 用于克隆的 Spline 实例。 + * @returns @en The cloned Spline instance. @zh 克隆出的 Spline 实例。 + */ public static clone (s: Spline) { return new Spline(s.mode, s.knots); } + /** + * @en + * Copies the values of a Spline instance to another. + * @zh + * 拷贝一个 Spline 实例的值到另一个中。 + * @param out @en The target Spline instance to copy to. @zh 拷贝目标 Spline 实例。 + * @param s @en The source Spline instance to copy from. @zh 拷贝源 Spline 实例。 + * @returns @en The target Spline instance to copy to, same as the `out` parameter. @zh 拷贝目标 Spline 实例,值与 `out` 参数相同。 + */ public static copy (out: Spline, s: Spline) { out._mode = s.mode; out._knots.length = 0; @@ -104,18 +149,44 @@ export class Spline { return out; } + /** + * @en + * Gets the type of this Spline instance, always returns `enums.SHAPE_SPLINE`. + * @zh + * 获取此 Spline 的类型,固定返回 `enums.SHAPE_SPLINE` + */ get type () { return this._type; } + /** + * @en + * Gets the mode of this Spline instance. + * @zh + * 获取当前 Spline 实例的模式。 + */ get mode () { return this._mode; } + /** + * @en + * Gets all knots of this Spline instance. + * @zh + * 获取当前 Spline 实例的所有结点。 + */ get knots (): Readonly { return this._knots; } + /** + * @en + * Sets the mode and knots to this Spline instance. + * @zh + * 给当前 Spline 实例设置模式和结点。 + * @param mode @en The mode to be set to this Spline instance. @zh 要设置到当前 Spline 实例的模式。 + * @param knots @en The knots to be set to this spline instance. @zh 要设置到当前 Spline 实例的结点列表。 + */ public setModeAndKnots (mode: SplineMode, knots: Vec3[]) { this._mode = mode; this._knots.length = 0; @@ -125,18 +196,46 @@ export class Spline { } } + /** + * @en + * Clears all knots of this Spline instance. + * @zh + * 清空当前 Spline 实例的所有结点。 + */ public clearKnots () { this._knots.length = 0; } + /** + * @en + * Gets the knot count of this Spline instance. + * @zh + * 获取当前 Spline 实例的结点数量。 + * @returns @en The knot count of this Spline instance. @zh 当前 Spline 实例的结点数量。 + */ public getKnotCount () { return this._knots.length; } + /** + * @en + * Adds a knot to this Spline instance. + * @zh + * 给当前 Spline 实例添加一个结点。 + * @param knot @en The knot to add to this Spline instance. @zh 要添加到当前 Spline 实例的结点。 + */ public addKnot (knot: Vec3) { this._knots.push(new Vec3(knot)); } + /** + * @en + * Inserts a knot to the specified position of this Spline instance. + * @zh + * 插入一个结点到当前 Spline 实例的指定位置。 + * @param index @en The position of this Spline instance to be inserted. @zh 要插入到此 Spline 实例的位置。 + * @param knot @en The knot to be inserted. @zh 要插入的结点。 + */ public insertKnot (index: number, knot: Vec3) { const item = new Vec3(knot); if (index >= this._knots.length) { @@ -147,34 +246,65 @@ export class Spline { this._knots.splice(index, 0, item); } + /** + * @en + * Removes a knot at the specified position of this Spline instance. + * @zh + * 移除当前 Spline 实例的指定位置的一个结点。 + * @param index + */ public removeKnot (index: number) { assertIsTrue(index >= 0 && index < this._knots.length, 'Spline: invalid index'); this._knots.splice(index, 1); } + /** + * @en + * Sets a knot to the specified position of this Spline instance. + * @zh + * 为当前 Spline 实例的指定位置设置结点信息。 + * @param index @en The specified position of this Spline instance. @zh 要设置结点的指定位置。 + * @param knot @en The knot to be set to the specified position. @zh 要设置的结点。 + */ public setKnot (index: number, knot: Vec3) { assertIsTrue(index >= 0 && index < this._knots.length, 'Spline: invalid index'); this._knots[index].set(knot); } + /** + * @en + * Gets the knot of the specified position of this Spline instance. + * @zh + * 获取当前 Spline 实例指定位置的结点。 + * @param index @en The specified position of this Spline instance. @zh 要设置结点的指定位置。 + * @returns @en The knot of the specified position of this Spline instance. @zh 当前 Spline 实例指定位置的结点。 + */ public getKnot (index: number): Readonly { assertIsTrue(index >= 0 && index < this._knots.length, 'Spline: invalid index'); return this._knots[index]; } - // get a point at t with repect to the `index` segment of curve or the whole curve. + /** + * @en + * Gets a point at t with repect to the `index` segment of curve or the whole curve. + * @zh + * 获取 t 处相对于某段或整条曲线的点。 + * @param t @en The factor with a range of [0.0, 1.0]. @zh 0.0 到 1.0 的因子。 + * @param index @en The knot index of this Spline instance, default value is the whole curve. @zh 当前 Spline 实例的某个结点索引,默认值为整条曲线。 + * @returns @en The point matches the input `t` factor and `index`. @zh 满足输入 `t` 参数和 `index` 参数的点。 + */ public getPoint (t: number, index: number = SPLINE_WHOLE_INDEX) { t = clamp(t, 0.0, 1.0); const segments = this.getSegments(); - if (segments == 0) { + if (segments === 0) { return new Vec3(0.0, 0.0, 0.0); } - if (index == SPLINE_WHOLE_INDEX) { + if (index === SPLINE_WHOLE_INDEX) { const deltaT = 1.0 / segments; index = Math.floor(t / deltaT); @@ -200,13 +330,21 @@ export class Spline { } } - // get num points from 0 to 1 uniformly with repect to the `index` segment of curve or the whole curve + /** + * @en + * Gets points from 0 to 1 uniformly with repect to the `index` segment of curve or the whole curve. + * @zh + * 获取相对与某段或整条曲线上的 n 个数量的点信息。 + * @param num @en The count of points needed. @zh 需要的点的数量。 + * @param index @en The knot index of this Spline instance, default value is the whole curve. @zh 当前 Spline 实例的某个结点索引,默认值为整条曲线。 + * @returns @en The points with `num` size at the `index` segment or the whole curve. @zh 曲线某段或者整条曲线上的 `num` 个点。 + */ public getPoints (num: number, index: number = SPLINE_WHOLE_INDEX): Vec3[] { - if (num == 0) { + if (num === 0) { return []; } - if (num == 1) { + if (num === 1) { const point = this.getPoint(0.0, index); return [point]; } diff --git a/cocos/core/geometry/triangle.ts b/cocos/core/geometry/triangle.ts index 1bd73c1620..e04d56b85a 100644 --- a/cocos/core/geometry/triangle.ts +++ b/cocos/core/geometry/triangle.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Vec3 } from '../math'; import enums from './enums'; @@ -30,25 +29,25 @@ import enums from './enums'; * @en * Basic Geometry: Triangle. * @zh - * 基础几何 三角形。 + * 基础几何:三角形。 */ export class Triangle { /** * @en - * create a new triangle + * Creates a new triangle instance. * @zh - * 创建一个新的 triangle。 - * @param {number} ax @en x component of point a @zh a 点的 x 部分。 - * @param {number} ay @en y component of point a @zh a 点的 y 部分。 - * @param {number} az @en z component of point a @zh a 点的 z 部分。 - * @param {number} bx @en x component of point b @zh b 点的 x 部分。 - * @param {number} by @en y component of point b @zh b 点的 y 部分。 - * @param {number} bz @en z component of point b @zh b 点的 z 部分。 - * @param {number} cx @en x component of point c @zh c 点的 x 部分。 - * @param {number} cy @en y component of point c @zh c 点的 y 部分。 - * @param {number} cz @en z component of point c @zh c 点的 z 部分。 - * @return {Triangle} @en A new triangle. @zh 一个新的 triangle。 + * 创建一个新的三角形。 + * @param {number} ax @en The x component of point a @zh a 点的 x 部分。 + * @param {number} ay @en The y component of point a @zh a 点的 y 部分。 + * @param {number} az @en The z component of point a @zh a 点的 z 部分。 + * @param {number} bx @en The x component of point b @zh b 点的 x 部分。 + * @param {number} by @en The y component of point b @zh b 点的 y 部分。 + * @param {number} bz @en The z component of point b @zh b 点的 z 部分。 + * @param {number} cx @en The x component of point c @zh c 点的 x 部分。 + * @param {number} cy @en The y component of point c @zh c 点的 y 部分。 + * @param {number} cz @en The z component of point c @zh c 点的 z 部分。 + * @returns {Triangle} @en The created Triangle instance. @zh 创建出的三角形实例。 */ public static create (ax = 1, ay = 0, az = 0, bx = 0, by = 0, bz = 0, @@ -58,11 +57,11 @@ export class Triangle { /** * @en - * clone a new triangle + * Clones a triangle instance. * @zh - * 克隆一个新的 triangle。 - * @param {Triangle} @en Triangle object to be cloned from. @zh t 克隆的目标。 - * @return {Triangle} @en A new cloned Triangle object. @zh 克隆出的新对象。 + * 克隆一个新的三角形。 + * @param t @en The Triangle object to be cloned from. @zh 克隆的目标。 + * @returns @en The cloned triangle instance. @zh 克隆出的新对象。 */ public static clone (t: Triangle): Triangle { return new Triangle( @@ -74,12 +73,12 @@ export class Triangle { /** * @en - * copy the values from one triangle to another + * Copies the values from one triangle to another. * @zh - * 将一个 triangle 的值复制到另一个 triangle。 - * @param {Triangle} out @en Target Triangle object to be copied to. @zh 接受操作的 triangle。 - * @param {Triangle} t @en A Triangle object to be copied from. @zh 被复制的 triangle。 - * @return {Triangle} @en The same as out. @zh out 接受操作的 triangle。 + * 复制一个三角形的值到另一个三角形中。 + * @param out @en The target Triangle object to be copied to. @zh 接受操作的三角形。 + * @param t @en A Triangle object to be copied from. @zh 被复制的三角形。 + * @returns @en The target Triangle object to be copied to, same as the `out` parameter. @zh 接受操作的三角形,与 `out` 参数相同。 */ public static copy (out: Triangle, t: Triangle): Triangle { Vec3.copy(out.a, t.a); @@ -91,14 +90,14 @@ export class Triangle { /** * @en - * Create a triangle from three points + * Creates a triangle instance from three points. * @zh - * 用三个点创建一个 triangle。 - * @param {Triangle} out @en The Triangle object to be modified. @zh 接受操作的 triangle。 - * @param {Vec3} a @en The point value to set out.a. @zh a 点。 - * @param {Vec3} b @en The point value to set out.b. @zh b 点。 - * @param {Vec3} c @en The point value to set out.c. @zh c 点。 - * @return {Triangle} @en The same as out. @zh 接受操作的 triangle。 + * 用三个点创建一个三角形。 + * @param out @en The Triangle object to be modified. @zh 接受操作的三角形。 + * @param a @en The point value to set out.a. @zh a 点。 + * @param b @en The point value to set out.b. @zh b 点。 + * @param c @en The point value to set out.c. @zh c 点。 + * @returns @en The Triangle object to be modified, same as the `out` parameter. @zh 接受操作的三角形,与 `out` 参数相同。 */ public static fromPoints (out: Triangle, a: Vec3, b: Vec3, c: Vec3): Triangle { Vec3.copy(out.a, a); @@ -109,21 +108,20 @@ export class Triangle { /** * @en - * Set the components of a triangle to the given values + * Sets the components of a triangle to the given values. * @zh * 将给定三角形的属性设置为给定值。 - * @param {Triangle} out @en The Triangle object to be set. @zh 被修改的三角形。 - * @param {number} ax @en The value to set out.a.x. @zh a 点的 x 部分。 - * @param {number} ay @en The value to set out.a.y. @zh a 点的 y 部分。 - * @param {number} az @en The value to set out.a.z. @zh a 点的 z 部分。 - * @param {number} bx @en The value to set out.b.x. @zh b 点的 x 部分。 - * @param {number} by @en The value to set out.b.y. @zh b 点的 y 部分。 - * @param {number} bz @en The value to set out.b.z. @zh b 点的 z 部分。 - * @param {number} cx @en The value to set out.c.x. @zh c 点的 x 部分。 - * @param {number} cy @en The value to set out.c.y. @zh c 点的 y 部分。 - * @param {number} cz @en The value to set out.c.z. @zh c 点的 z 部分。 - * @return {Triangle} @en The same as out. @zh 传入的 out 对象。 - * @function + * @param out @en The Triangle object to be set. @zh 接受操作的三角形。 + * @param ax @en The value to set out.a.x. @zh a 点的 x 部分。 + * @param ay @en The value to set out.a.y. @zh a 点的 y 部分。 + * @param az @en The value to set out.a.z. @zh a 点的 z 部分。 + * @param bx @en The value to set out.b.x. @zh b 点的 x 部分。 + * @param by @en The value to set out.b.y. @zh b 点的 y 部分。 + * @param bz @en The value to set out.b.z. @zh b 点的 z 部分。 + * @param cx @en The value to set out.c.x. @zh c 点的 x 部分。 + * @param cy @en The value to set out.c.y. @zh c 点的 y 部分。 + * @param cz @en The value to set out.c.z. @zh c 点的 z 部分。 + * @returns @en The Triangle object to be set, same as the `out` parameter. @zh 接受操作的三角形,与 `out` 参数相同。 */ public static set (out: Triangle, ax: number, ay: number, az: number, @@ -170,9 +168,9 @@ export class Triangle { /** * @en - * Gets the type of the shape. + * Gets the type of the triangle, always returns `enums.SHAPE_TRIANGLE`. * @zh - * 获取形状的类型。 + * 获取此三角形的类型,固定返回 `enums.SHAPE_TRIANGLE`。 */ get type () { return this._type; @@ -182,7 +180,7 @@ export class Triangle { /** * @en - * Construct a triangle. + * Constructs a triangle. * @zh * 构造一个三角形。 * @param {number} ax @en x component of point a. @zh a 点的 x 部分。 diff --git a/cocos/core/global-exports.ts b/cocos/core/global-exports.ts index 9d93491764..9a2433e575 100644 --- a/cocos/core/global-exports.ts +++ b/cocos/core/global-exports.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,17 +20,17 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ -import { DEV } from 'internal:constants'; +import { DEV, EDITOR } from 'internal:constants'; const _global = typeof window === 'undefined' ? global : window; /** * @en - * The main namespace of Cocos2d-JS, all engine core classes, functions, properties and constants are defined in this namespace. + * The main namespace of Cocos engine, all engine core classes, functions, properties and constants are defined in this namespace. * @zh - * Cocos 引擎的主要命名空间,引擎代码中所有的类,函数,属性和常量都在这个命名空间中定义。 + * Cocos引擎的主要命名空间,引擎代码中所有的类,函数,属性和常量都在这个命名空间中定义。 * @deprecated */ export const legacyCC: Record & { @@ -50,12 +49,34 @@ if (DEV) { const engineVersion = '3.7.0'; /** - * The current version of Cocos2d being used.
- * Please DO NOT remove this String, it is an important flag for bug tracking.
+ * @en + * The current version of Cocos engine. + * Please DO NOT remove this String, it is an important flag for bug tracking. * If you post a bug to forum, please attach this flag. + * @zh + * 当前使用的 Cocos 引擎版本。 + * 请不要删除此字符串,它是错误跟踪的重要标志。 + * 如果您将错误发布到论坛,请附上此标志。 */ _global.CocosEngine = legacyCC.ENGINE_VERSION = engineVersion; _global.cc = legacyCC; export { engineVersion as VERSION }; + +if (EDITOR && legacyCC.GAME_VIEW === undefined) { + // Used to indicate whether it is currently in preview mode. + // 'isPreviewProcess' is defined only in the editor's process. + legacyCC.GAME_VIEW = typeof globalThis.isPreviewProcess !== 'undefined' ? globalThis.isPreviewProcess : false; +} + +const ccwindow: typeof window = typeof globalThis.jsb !== 'undefined' ? (typeof jsb.window !== 'undefined' ? jsb.window : globalThis) : globalThis; +_global.ccwindow = ccwindow; + +/** + * @en + * It is jsb.window in native mode, otherwise it is the window object in the web context. + * @zh + * 原生环境下为 jsb.window, 引擎为模拟部分 web 环境所提供. Web 环境这个变量是 window 对象。 + */ +export { ccwindow }; diff --git a/cocos/core/index.ts b/cocos/core/index.ts index 8d6801f46d..941056a483 100644 --- a/cocos/core/index.ts +++ b/cocos/core/index.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/core/internal-index.ts b/cocos/core/internal-index.ts index 6d9b4e448f..48ab60cf19 100644 --- a/cocos/core/internal-index.ts +++ b/cocos/core/internal-index.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ // This file only exports functions/classes that are only visible to engine internal. @@ -32,7 +31,7 @@ export { override } from './data/decorators/override'; export { formerlySerializedAs, serializable } from './data/decorators/serializable'; export * from './algorithm/binary-search'; -export { move } from './algorithm/move'; +export { shift } from './algorithm/move'; export { garbageCollectionManager } from './data/garbage-collection'; export { GCObject } from './data/gc-object'; diff --git a/cocos/core/legacy.ts b/cocos/core/legacy.ts index 756b1aab93..107482b482 100644 --- a/cocos/core/legacy.ts +++ b/cocos/core/legacy.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import * as debug from './platform/debug'; import { _normalize, basename, changeBasename, changeExtname, dirname, extname, getSeperator, join, mainFileName, stripSep } from './utils/path'; diff --git a/cocos/core/math/affine-transform.ts b/cocos/core/math/affine-transform.ts index e810dc1cc0..a8bb43b801 100644 --- a/cocos/core/math/affine-transform.ts +++ b/cocos/core/math/affine-transform.ts @@ -2,16 +2,16 @@ Copyright (c) 2008-2010 Ricardo Quesada Copyright (c) 2011-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -33,7 +33,7 @@ import { legacyCC } from '../global-exports'; /** * @en `AffineTransform` class represent an affine transform matrix. It's composed basically by translation, rotation, scale transformations. - * @zh 二维仿射变换矩阵,描述了平移、缩放和缩放。 + * @zh 二维仿射变换矩阵,描述了平移、旋转和缩放。 */ export class AffineTransform { /** @@ -59,7 +59,7 @@ export class AffineTransform { /** * @en Concatenate a transform matrix to another. The results are reflected in the out `AffineTransform`. - * @zh 将两个矩阵相乘的结果赋值给出口矩阵。 + * @zh 将两个矩阵相乘的结果赋值给输出矩阵。 * @param out Out object to store the concat result * @param t1 The first transform object. * @param t2 The transform object to concatenate. @@ -81,7 +81,7 @@ export class AffineTransform { /** * @en Get the invert transform of an `AffineTransform` object. - * @zh 将矩阵求逆的结果赋值给出口矩阵。 + * @zh 将矩阵求逆的结果赋值给输出矩阵。 * @param out Out object to store the invert result * @param t the input `AffineTransform` object */ @@ -97,7 +97,7 @@ export class AffineTransform { /** * @en Get an `AffineTransform` object from a given matrix 4x4. - * @zh 将四维矩阵转换为二维仿射变换矩阵并赋值给出口矩阵。 + * @zh 将四维矩阵转换为二维仿射变换矩阵并赋值给输出矩阵。 * @param out The output matrix to store the result * @param mat transform matrix. */ @@ -112,7 +112,7 @@ export class AffineTransform { /** * @en Apply the `AffineTransform` on a 2D vector. - * @zh 应用二维仿射变换矩阵到二维向量上,并将结果赋值给出口向量。 + * @zh 应用二维仿射变换矩阵到二维向量上,并将结果赋值给输出向量。 * @param out The output vector to store the result * @param point Vector to apply transform. * @param t transform matrix. @@ -121,7 +121,7 @@ export class AffineTransform { /** * @en Apply the `AffineTransform` on a 2D vector. - * @zh 应用二维仿射变换矩阵到二维向量上,并将结果赋值给出口向量。 + * @zh 应用二维仿射变换矩阵到二维向量上,并将结果赋值给输出向量。 * @param out The output vector to store the result * @param x x to apply transform. * @param y y to apply transform. @@ -146,7 +146,7 @@ export class AffineTransform { /** * @en Apply the `AffineTransform` on a size. - * @zh 应用二维仿射变换矩阵到二维尺寸上,并将结果赋值给出口尺寸。 + * @zh 应用二维仿射变换矩阵到二维尺寸上,并将结果赋值给输出尺寸。 * @param out The output size to store the result * @param size The size to apply transform. * @param t transform matrix. @@ -158,7 +158,7 @@ export class AffineTransform { /** * @en Apply the `AffineTransform` on a rect. - * @zh 应用二维仿射变换矩阵到矩形上,并将结果赋值给出口矩形。 + * @zh 应用二维仿射变换矩阵到矩形上,并将结果赋值给输出矩形。 * @param out The output rect object to store the result * @param rect The rect object to apply transform. * @param t transform matrix. diff --git a/cocos/core/math/bits.ts b/cocos/core/math/bits.ts index 4ab94bba59..ecdc24c3f6 100644 --- a/cocos/core/math/bits.ts +++ b/cocos/core/math/bits.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ /** * Bit twiddling hacks for JavaScript. diff --git a/cocos/core/math/color.ts b/cocos/core/math/color.ts index 4866cab06f..4cb5ad99a9 100644 --- a/cocos/core/math/color.ts +++ b/cocos/core/math/color.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/core/math/deprecated.ts b/cocos/core/math/deprecated.ts index 55b3bf8a4e..e0a52482f0 100644 --- a/cocos/core/math/deprecated.ts +++ b/cocos/core/math/deprecated.ts @@ -1,27 +1,26 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - */ + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ import { removeProperty, replaceProperty } from '../utils/x-deprecated'; import { Color } from './color'; diff --git a/cocos/core/math/index.ts b/cocos/core/math/index.ts index d7c00f7bfe..8b09ae2438 100644 --- a/cocos/core/math/index.ts +++ b/cocos/core/math/index.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/core/math/mat3.ts b/cocos/core/math/mat3.ts index 4120097593..df313dd4f6 100644 --- a/cocos/core/math/mat3.ts +++ b/cocos/core/math/mat3.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2018-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2018-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/core/math/mat4.ts b/cocos/core/math/mat4.ts index f2d5a764e7..c6ce34c867 100644 --- a/cocos/core/math/mat4.ts +++ b/cocos/core/math/mat4.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2018-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2018-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -1996,7 +1995,7 @@ export class Mat4 extends ValueType { /** * @en Returns the translation vector component of a transformation matrix. - * @zh 从当前矩阵中计算出位移变换的部分,并以各个轴上位移的形式赋值给出口向量。 + * @zh 从当前矩阵中计算出位移变换的部分,并以各个轴上位移的形式赋值给输出向量。 * @param out Vector to receive translation component. */ public getTranslation (out: Vec3) { @@ -2009,7 +2008,7 @@ export class Mat4 extends ValueType { /** * @en Returns the scale factor component of a transformation matrix - * @zh 从当前矩阵中计算出缩放变换的部分,并以各个轴上缩放的形式赋值给出口向量。 + * @zh 从当前矩阵中计算出缩放变换的部分,并以各个轴上缩放的形式赋值给输出向量。 * @param out Vector to receive scale component */ public getScale (out: Vec3) { @@ -2032,7 +2031,7 @@ export class Mat4 extends ValueType { /** * @en Returns the rotation factor component of a transformation matrix - * @zh 从当前矩阵中计算出旋转变换的部分,并以四元数的形式赋值给出口四元数。 + * @zh 从当前矩阵中计算出旋转变换的部分,并以四元数的形式赋值给输出四元数。 * @param out Vector to receive rotation component */ public getRotation (out: Quat) { diff --git a/cocos/core/math/math-base.ts b/cocos/core/math/math-base.ts index 8c1134192c..5e9afc2eb7 100644 --- a/cocos/core/math/math-base.ts +++ b/cocos/core/math/math-base.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { JSB } from 'internal:constants'; import { ValueType } from '../value-types/value-type'; import { FloatArray } from './type-define'; diff --git a/cocos/core/math/math-native-ext.ts b/cocos/core/math/math-native-ext.ts index afcadc5418..d9494c8baf 100644 --- a/cocos/core/math/math-native-ext.ts +++ b/cocos/core/math/math-native-ext.ts @@ -1,15 +1,16 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE diff --git a/cocos/core/math/quat.ts b/cocos/core/math/quat.ts index caba40cd2e..3332737bdc 100644 --- a/cocos/core/math/quat.ts +++ b/cocos/core/math/quat.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2018-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2018-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -766,7 +765,7 @@ export class Quat extends ValueType { /** * @en Convert quaternion to Euler angles - * @zh 将当前四元数转化为欧拉角(x-y-z)并赋值给出口向量。 + * @zh 将当前四元数转化为欧拉角(x-y-z)并赋值给输出向量。 * @param out the output vector */ public getEulerAngles (out: Vec3) { diff --git a/cocos/core/math/rect.ts b/cocos/core/math/rect.ts index 25f20c306a..be91f9431e 100644 --- a/cocos/core/math/rect.ts +++ b/cocos/core/math/rect.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -84,7 +83,7 @@ export class Rect extends ValueType { /** * @en Returns the overlapping portion of 2 rectangles. - * @zh 计算当前矩形与指定矩形重叠部分的矩形,将其赋值给出口矩形。 + * @zh 计算当前矩形与指定矩形重叠部分的矩形,将其赋值给输出矩形。 * @param out Output Rect. * @param one One of the specify Rect. * @param other Another of the specify Rect. @@ -108,7 +107,7 @@ export class Rect extends ValueType { /** * @en Returns the smallest rectangle that contains the current rect and the given rect. - * @zh 创建同时包含当前矩形和指定矩形的最小矩形,将其赋值给出口矩形。 + * @zh 创建同时包含当前矩形和指定矩形的最小矩形,将其赋值给输出矩形。 * @param out Output Rect. * @param one One of the specify Rect. * @param other Another of the specify Rect. diff --git a/cocos/core/math/size.ts b/cocos/core/math/size.ts index 9e8a88587b..0b75e35b3d 100644 --- a/cocos/core/math/size.ts +++ b/cocos/core/math/size.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/core/math/type-define.ts b/cocos/core/math/type-define.ts index 430fcea15a..e83e48775a 100644 --- a/cocos/core/math/type-define.ts +++ b/cocos/core/math/type-define.ts @@ -1,27 +1,26 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - */ + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ export interface IColorLike { r: number; diff --git a/cocos/core/math/utils.ts b/cocos/core/math/utils.ts index d4289502fa..bab7e54a67 100644 --- a/cocos/core/math/utils.ts +++ b/cocos/core/math/utils.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ // Fix Circular dependency import * as bits from './bits'; diff --git a/cocos/core/math/vec2.ts b/cocos/core/math/vec2.ts index daff1dcde5..0dbbf6df6c 100644 --- a/cocos/core/math/vec2.ts +++ b/cocos/core/math/vec2.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/core/math/vec3.ts b/cocos/core/math/vec3.ts index 00b65556df..f7d264f7e4 100644 --- a/cocos/core/math/vec3.ts +++ b/cocos/core/math/vec3.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -359,7 +358,7 @@ export class Vec3 extends ValueType { /** * @zh 球面线性插值。多用于插值两个方向向量。 * @en Spherical linear interpolation. Commonly used in interpolation between directional vectors. - * @param out @zh 出口向量。 @en Output vector. + * @param out @zh 输出向量。 @en Output vector. * @param from @zh 起点向量。 @en Start vector. * @param to @zh 终点向量。 @en Destination vector. * @param t @zh 插值参数。@en Interpolation parameter. diff --git a/cocos/core/math/vec4.ts b/cocos/core/math/vec4.ts index 5023669a68..1613801978 100644 --- a/cocos/core/math/vec4.ts +++ b/cocos/core/math/vec4.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/core/memop/cached-array.ts b/cocos/core/memop/cached-array.ts index 1bfda8ce54..83f7a815d3 100644 --- a/cocos/core/memop/cached-array.ts +++ b/cocos/core/memop/cached-array.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ScalableContainer } from './scalable-container'; @@ -36,17 +35,17 @@ import { ScalableContainer } from './scalable-container'; export class CachedArray extends ScalableContainer { /** * @en - * The array which stores actual content + * The array which stores actual content. * @zh - * 实际存储数据内容的数组 + * 实际存储数据内容的数组。 */ public array: T[]; /** * @en - * The actual count of data object + * The actual count of data object. * @zh - * 实际数据内容数量 + * 实际存储的元素数量。 */ public length = 0; @@ -54,8 +53,13 @@ export class CachedArray extends ScalableContainer { private _initSize = 0; /** - * @param length Initial length - * @param compareFn Comparison function for sorting + * @en Constructor. @zh 构造函数。 + * @param length @en Initial length of the CachedArray. @zh CachedArray 的初始长度。 + * @param compareFn @en Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * @zh 用来确定元素顺序的函数。如果第一个参数小于第二个参数,它应该返回一个负值,如果它们相等,则返回0,否则返回一个正值。 + * 如果省略,元素将按 ASCII 字符升序排序。 */ constructor (length: number, compareFn?: (a: T, b: T) => number) { super(); @@ -67,10 +71,10 @@ export class CachedArray extends ScalableContainer { /** * @en - * Push an element to the end of the array + * Push an element to the end of the array. * @zh - * 向数组末尾添加一个元素 - * @param item The item to be added + * 向数组末尾添加一个元素。 + * @param item @en The item to be added. @zh 被添加到数组的元素。 */ public push (item: T) { this.array[this.length++] = item; @@ -80,8 +84,9 @@ export class CachedArray extends ScalableContainer { * @en * Pop the last element in the array. The [[length]] will reduce, but the internal array will keep its size. * @zh - * 弹出数组最后一个元素,CachedArray 的 [[length]] 会减少,但是内部数组的实际长度不变 - * @return The last element. + * 弹出数组最后一个元素,CachedArray 的 [[length]] 会减少,但是内部数组的实际长度不变。 + * @returns @en The last element of this CachedArray. If CachedArray is empty, will return undefined. + * @zh 数组的最后一个元素。如果数组为空,将返回 undefined。 */ public pop (): T | undefined { return this.array[--this.length]; @@ -89,11 +94,12 @@ export class CachedArray extends ScalableContainer { /** * @en - * Get the element at the specified index of the array + * Get the element at the specified index of the array. * @zh - * 得到数组中指定位置的元素 - * @param idx The index of the requested element - * @return The element at given index + * 获取数组中指定位置的元素。 + * @param idx @en The index of the requested element. @zh 用于获取数组元素的索引。 + * @returns @en The element at given index. If idx not in [0, [[length]]) or array is empty, will return undefined. + * @zh 数组下标对应的元素。如果 idx 超出 [0, [[length]]),或者数组是空的,将返回 undefined。 */ public get (idx: number): T | undefined { return this.array[idx]; @@ -111,9 +117,9 @@ export class CachedArray extends ScalableContainer { /** * @en - * Clear the cache. The [[length]] will be set to 0, and clear the internal array. + * Destroy the array. The [[length]] will be set to 0, and clear the internal array. * @zh - * 清空数组所有元素。[[length]] 会被设为 0,并且清空内部数组 + * 销毁数组。[[length]] 会被设为 0,并且清空内部数组。 */ public destroy () { this.length = 0; @@ -121,6 +127,10 @@ export class CachedArray extends ScalableContainer { super.destroy(); } + /** + * @en Requests the removal of unused capacity. + * @zh 尝试释放多余的内存。 + */ public tryShrink () { if (this.array.length >> 2 > this.length) { this.array.length = Math.max(this._initSize, this.array.length >> 1); @@ -129,9 +139,10 @@ export class CachedArray extends ScalableContainer { /** * @en - * Sort the existing elements in cache + * Sort the existing elements in cache by [[compareFn]] passed in constructor. + * If [[compareFn]] is not passed in, the elements are sorted in ascending, ASCII character order. * @zh - * 排序所有现有元素 + * 使用构造函数传入的 [[compareFn]] 排序所有现有元素。如果没有传入比较函数,将按照 ASCII 升序排序。 */ public sort () { this.array.length = this.length; @@ -140,10 +151,10 @@ export class CachedArray extends ScalableContainer { /** * @en - * Add all elements of a given array to the end of the current array + * Add all elements of a given array to the end of the current array. * @zh - * 添加一个指定数组中的所有元素到当前数组末尾 - * @param array The given array to be appended + * 添加一个指定数组中的所有元素到当前数组末尾。 + * @param array @en The given array to be appended. @zh 被添加的数组。 */ public concat (array: T[]) { for (let i = 0; i < array.length; ++i) { @@ -154,7 +165,9 @@ export class CachedArray extends ScalableContainer { /** * @en Delete the element at the specified location and move the last element to that location. * @zh 删除指定位置的元素并将最后一个元素移动至该位置。 - * @param idx The index of the element to be deleted + * @param idx @en The index of the element to be deleted. If idx out of range [0, length), there is + * not effect. + * @zh 希望被删除的索引。如果索引超出 [0, length),将没有效果。 */ public fastRemove (idx: number) { if (idx >= this.length || idx < 0) { @@ -165,9 +178,11 @@ export class CachedArray extends ScalableContainer { } /** - * @en Returns the first index at which a given element can be found in the array. - * @zh 返回在数组中可以找到一个给定元素的第一个索引。 - * @param val The element + * @en Returns the first index that compares equal to val. + * @zh 返回在数组中找到的第一个和 val 相等的元素的索引。 + * @param val @en Value to search for. @zh 搜索的值。 + * @returns The index to the first element that compares equal to val. If no elements match, returns -1. + * @zh 第一个和 val 相等的元素的索引。如果没找到,将返回 -1。 */ public indexOf (val: T) { for (let i = 0, len = this.length; i < len; ++i) { diff --git a/cocos/core/memop/container-manager.ts b/cocos/core/memop/container-manager.ts index a7957042c5..da4787152b 100644 --- a/cocos/core/memop/container-manager.ts +++ b/cocos/core/memop/container-manager.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,21 +20,36 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { fastRemoveAt } from '../utils/array'; import { ScalableContainer } from './scalable-container'; +/** + * @en ContainerManager is a sequence container that stores ScalableContainers. + * It will shrink all managed ScalableContainer in a fixed interval. + */ class ContainerManager { private _pools: ScalableContainer[] = []; private _lastShrinkPassed = 0; + /** + * @en Shrink interval in seconds. + */ public shrinkTimeSpan = 5; + /** + * @en Add a ScalableContainer. Will add the same ScalableContainer instance once. + * @param pool @en The ScalableContainer to add. + */ addContainer (pool: ScalableContainer) { if (pool._poolHandle !== -1) return; pool._poolHandle = this._pools.length; this._pools.push(pool); } + /** + * @en Remove a ScalableContainer. + * @param pool @en The ScalableContainer to remove. + */ removeContainer (pool: ScalableContainer) { if (pool._poolHandle === -1) return; this._pools[this._pools.length - 1]._poolHandle = pool._poolHandle; @@ -43,12 +57,19 @@ class ContainerManager { pool._poolHandle = -1; } + /** + * @en Try to shrink all managed ScalableContainers. + */ tryShrink () { for (let i = 0; i < this._pools.length; i++) { this._pools[i].tryShrink(); } } + /** + * @en An update function invoked every frame. + * @param dt @en Delta time of frame interval in secondes. + */ update (dt: number) { this._lastShrinkPassed += dt; if (this._lastShrinkPassed > this.shrinkTimeSpan) { @@ -58,4 +79,7 @@ class ContainerManager { } } +/** + * @en A global ContainerManager instance. + */ export const containerManager = new ContainerManager(); diff --git a/cocos/core/memop/index.ts b/cocos/core/memop/index.ts index 95c67962de..4bb19425bb 100644 --- a/cocos/core/memop/index.ts +++ b/cocos/core/memop/index.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ export * from './pool'; export * from './recycle-pool'; diff --git a/cocos/core/memop/pool.ts b/cocos/core/memop/pool.ts index 3aac1723b5..991becb542 100644 --- a/cocos/core/memop/pool.ts +++ b/cocos/core/memop/pool.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { warnID } from '../platform/debug'; import { ScalableContainer } from './scalable-container'; @@ -36,15 +35,20 @@ export class Pool extends ScalableContainer { private _ctor: () => T; private _elementsPerBatch: number; private _nextAvail: number; - private _freepool: T[] = []; + private _freePool: T[] = []; private _dtor: ((obj: T) => void) | null; /** - * @en Constructor with the allocator of elements and initial pool size - * @zh 使用元素的构造器和初始大小的构造函数 - * @param ctor The allocator of elements in pool, it's invoked directly without `new` - * @param elementsPerBatch Initial pool size, this size will also be the incremental size when the pool is overloaded - * @param dtor The finalizer of element, it's invoked when this container is destroyed or shrunk + * @en Constructor with the allocator of elements and initial pool size. + * @zh 使用元素的构造器和初始大小的构造函数。 + * @param ctor @en The allocator of elements in pool, it's invoked directly without `new` in Pool. + * @zh 元素的构造器,Pool 内部使用该构造器直接创建实例。 + * @param elementsPerBatch @en Initial pool size, this size will also be the incremental size when + * the pool is overloaded. + * @zh 对象池的初始大小。当对象池扩容时,也会使用该值。 + * @param dtor @en The finalizer of element, it's invoked when this Pool is destroyed or shrunk if + * it is valid. + * @zh 元素的析构器。如果存在的话,当对象池销毁或者缩容时,会使用该析构器。 */ constructor (ctor: () => T, elementsPerBatch: number, dtor?: (obj: T) => void) { super(); @@ -54,56 +58,63 @@ export class Pool extends ScalableContainer { this._nextAvail = this._elementsPerBatch - 1; for (let i = 0; i < this._elementsPerBatch; ++i) { - this._freepool.push(ctor()); + this._freePool.push(ctor()); } } /** * @en Take an object out of the object pool. * @zh 从对象池中取出一个对象。 - * @return An object ready for use. This function always return an object. + * @returns @en An object ready for use. This function always returns an object. + * @zh 该函数总是返回一个可用的对象。 */ public alloc (): T { if (this._nextAvail < 0) { - this._freepool.length = this._elementsPerBatch; + this._freePool.length = this._elementsPerBatch; for (let i = 0; i < this._elementsPerBatch; i++) { - this._freepool[i] = this._ctor(); + this._freePool[i] = this._ctor(); } this._nextAvail = this._elementsPerBatch - 1; } - return this._freepool[this._nextAvail--]; + return this._freePool[this._nextAvail--]; } /** * @en Put an object back into the object pool. * @zh 将一个对象放回对象池中。 - * @param obj The object to be put back into the pool + * @param obj @en The object to be put back into the pool. + * @zh 放回对象池中的对象。 */ public free (obj: T) { - this._freepool[++this._nextAvail] = obj; + this._freePool[++this._nextAvail] = obj; } /** * @en Put multiple objects back into the object pool. * @zh 将一组对象放回对象池中。 - * @param objs An array of objects to be put back into the pool + * @param objs @en An array of objects to be put back into the pool. + * @zh 放回对象池中的一组对象。 */ public freeArray (objs: T[]) { - this._freepool.length = this._nextAvail + 1; - Array.prototype.push.apply(this._freepool, objs); + this._freePool.length = this._nextAvail + 1; + Array.prototype.push.apply(this._freePool, objs); this._nextAvail += objs.length; } + /** + * @en Try to shrink the object pool to reduce memory usage. + * @zh 尝试缩容对象池,以释放内存。 + */ public tryShrink () { if (this._nextAvail >> 1 > this._elementsPerBatch) { if (this._dtor) { for (let i = this._nextAvail >> 1; i <= this._nextAvail; i++) { - this._dtor(this._freepool[i]); + this._dtor(this._freePool[i]); } } - this._freepool.length = this._nextAvail >> 1; - this._nextAvail = this._freepool.length - 1; + this._freePool.length = this._nextAvail >> 1; + this._nextAvail = this._freePool.length - 1; } } @@ -117,10 +128,10 @@ export class Pool extends ScalableContainer { const readDtor = dtor || this._dtor; if (readDtor) { for (let i = 0; i <= this._nextAvail; i++) { - readDtor(this._freepool[i]); + readDtor(this._freePool[i]); } } - this._freepool.length = 0; + this._freePool.length = 0; this._nextAvail = -1; super.destroy(); } diff --git a/cocos/core/memop/recycle-pool.ts b/cocos/core/memop/recycle-pool.ts index 7ba42726e5..da32ea8b98 100644 --- a/cocos/core/memop/recycle-pool.ts +++ b/cocos/core/memop/recycle-pool.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ScalableContainer } from './scalable-container'; @@ -79,8 +78,8 @@ export class RecyclePool extends ScalableContainer { } /** - * @en Resets the object pool. Only changes the length to 0 - * @zh 清空对象池。目前仅仅会设置尺寸为 0 + * @en Resets the object pool. Only changes the length to 0. + * @zh 清空对象池。目前仅仅会设置尺寸为 0。 */ public reset () { this._count = 0; @@ -89,7 +88,7 @@ export class RecyclePool extends ScalableContainer { /** * @en Resize the object poo, and fills with new created elements. * @zh 设置对象池大小,并填充新的元素。 - * @param size The new size of the pool + * @param size @en The new size of the pool. @zh 新的对象池大小。 */ public resize (size: number) { if (size > this._data.length) { @@ -100,9 +99,8 @@ export class RecyclePool extends ScalableContainer { } /** - * @en Expand the object pool, the size will be increment to current size times two, and fills with new created elements. - * @zh 扩充对象池容量,会自动扩充尺寸到两倍,并填充新的元素。 - * @param idx + * @en Expand the array size to 2 times the original size, and fills with new created elements. + * @zh 扩充对象池容量,会自动扩充尺寸到原来的 2 倍,并填充新的元素。 */ public add () { if (this._count >= this._data.length) { @@ -112,6 +110,10 @@ export class RecyclePool extends ScalableContainer { return this._data[this._count++]; } + /** + * @en Destroy the object pool. Please don't use it any more after it is destroyed. + * @zh 销毁对象池。销毁后不能继续使用。 + */ public destroy () { if (this._dtor) { for (let i = 0; i < this._data.length; i++) { @@ -123,6 +125,10 @@ export class RecyclePool extends ScalableContainer { super.destroy(); } + /** + * @en Try to shrink the object pool to free memory. + * @zh 尝试回收没用的对象,释放内存。 + */ public tryShrink () { if (this._data.length >> 2 > this._count) { const length = Math.max(this._initSize, this._data.length >> 1); @@ -136,9 +142,9 @@ export class RecyclePool extends ScalableContainer { } /** - * @en Remove an element of the object pool. This will also decrease size of the pool - * @zh 移除对象池中的一个元素,同时会减小池子尺寸。 - * @param idx The index of the element to be removed + * @en Remove the element with the specified index from the object pool. This will decrease pool size. + * @zh 移除对象池中指定索引的元素,会减小池子尺寸。 + * @param idx @en The index of the element to remove. @zh 被移除的元素的索引。 */ public removeAt (idx: number) { if (idx >= this._count) { diff --git a/cocos/core/memop/scalable-container.ts b/cocos/core/memop/scalable-container.ts index 1ddf85db25..913f708de0 100644 --- a/cocos/core/memop/scalable-container.ts +++ b/cocos/core/memop/scalable-container.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { containerManager } from './container-manager'; diff --git a/cocos/core/platform/debug.ts b/cocos/core/platform/debug.ts index 7564606ea4..dfc52af619 100644 --- a/cocos/core/platform/debug.ts +++ b/cocos/core/platform/debug.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2018-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2018-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -26,7 +25,9 @@ /* eslint-disable no-console */ import { EDITOR, JSB, DEV, DEBUG } from 'internal:constants'; import debugInfos from '../../../DebugInfos'; -import { legacyCC } from '../global-exports'; +import { legacyCC, ccwindow } from '../global-exports'; + +const ccdocument = ccwindow.document; const ERROR_MAP_URL = 'https://github.com/cocos-creator/engine/blob/develop/EngineErrorMap.md'; @@ -47,17 +48,22 @@ let ccAssert = (condition: any, message?: any, ...optionalParams: any[]) => { let ccDebug = ccLog; +/** + * @en Format a string. + * @zh 格式化字符串。 + * @param message @zh 包含零个或多个需要替换的JavaScript字符串。@en JavaScript objects to replace substitution strings in msg. + * @param optionalParams @zh 用来替换在message中需要替换的JavaScript对象。@en JavaScript objects with which to replace substitution strings within msg. + */ function formatString (message?: any, ...optionalParams: any[]) { // eslint-disable-next-line @typescript-eslint/no-unsafe-return return legacyCC.js.formatStr.apply(null, [message].concat(optionalParams)); } /** - * @en Outputs a message to the Cocos Creator Console (editor) or Web Console (runtime). - * @zh 输出一条消息到 Cocos Creator 编辑器的 Console 或运行时 Web 端的 Console 中。 - * @param message - A JavaScript string containing zero or more substitution strings. - * @param optionalParams - JavaScript objects with which to replace substitution strings within msg. - * This gives you additional control over the format of the output. + * @en Outputs a message to the Cocos Creator Console (editor) or Web Console (runtime). This gives you additional control over the format of the output. + * @zh 输出一条消息到 Cocos Creator 编辑器的 Console 或运行时 Web 端的 Console 中。这为你提供了对输出格式的额外控制。 + * @param message @zh 包含零个或多个需要替换的JavaScript字符串。@en JavaScript objects to replace substitution strings in msg. + * @param optionalParams @zh 用来替换在message中需要替换的JavaScript对象。@en JavaScript objects with which to replace substitution strings within msg. */ export function log (message?: any, ...optionalParams: any[]) { return ccLog(message, ...optionalParams); @@ -72,8 +78,8 @@ export function log (message?: any, ...optionalParams: any[]) { * 输出警告消息到 Cocos Creator 编辑器的 Console 或运行时 Web 端的 Console 中。
* - 在 Cocos Creator 中,警告信息显示是黄色的。
* - 在 Chrome 中,警告信息有着黄色的图标以及黄色的消息文本。
- * @param message - A JavaScript string containing zero or more substitution strings. - * @param optionalParams - JavaScript objects with which to replace substitution strings within msg. + * @param message @zh 包含零个或多个需要替换的JavaScript字符串。@en JavaScript objects to replace substitution strings in msg. + * @param optionalParams @zh 用来替换在message中需要替换的JavaScript对象。@en JavaScript objects with which to replace substitution strings within msg. * This gives you additional control over the format of the output. */ export function warn (message?: any, ...optionalParams: any[]) { @@ -89,8 +95,8 @@ export function warn (message?: any, ...optionalParams: any[]) { * 输出错误消息到 Cocos Creator 编辑器的 Console 或运行时页面端的 Console 中。
* - 在 Cocos Creator 中,错误信息显示是红色的。
* - 在 Chrome 中,错误信息有红色的图标以及红色的消息文本。
- * @param message - A JavaScript string containing zero or more substitution strings. - * @param optionalParams - JavaScript objects with which to replace substitution strings within msg. + * @param message @zh 包含零个或多个需要替换的JavaScript字符串。@en JavaScript objects to replace substitution strings in msg. + * @param optionalParams @zh 用来替换在message中需要替换的JavaScript对象。@en JavaScript objects with which to replace substitution strings within msg. * This gives you additional control over the format of the output. */ export function error (message?: any, ...optionalParams: any[]) { @@ -102,9 +108,9 @@ export function error (message?: any, ...optionalParams: any[]) { * Assert the condition and output error messages if the condition is not true. * @zh * 对检查测试条件进行检查,如果条件不为 true 则输出错误消息 - * @param value - The condition to check on - * @param message - A JavaScript string containing zero or more substitution strings. - * @param optionalParams - JavaScript objects with which to replace substitution strings within msg. + * @param value @zh 需要检查的条件。 @en The condition to check on. + * @param message @zh 包含零个或多个需要替换的JavaScript字符串。@en JavaScript objects to replace substitution strings in msg. + * @param optionalParams @zh 用来替换在message中需要替换的JavaScript对象。@en JavaScript objects with which to replace substitution strings within msg. * This gives you additional control over the format of the output. */ export function assert (value: any, message?: string, ...optionalParams: any[]): asserts value { @@ -114,6 +120,7 @@ export function assert (value: any, message?: string, ...optionalParams: any[]): /** * @en Outputs a message at the "debug" log level. * @zh 输出一条“调试”日志等级的消息。 + * @param data @zh 输出的消息对象。 @en The output message object. */ export function debug (...data: any[]) { return ccDebug(...data); @@ -139,7 +146,7 @@ export function _resetDebugSetting (mode: DebugMode) { } if (!logList) { - const logDiv = document.createElement('Div'); + const logDiv = ccdocument.createElement('Div'); logDiv.setAttribute('id', 'logInfoDiv'); logDiv.setAttribute('width', '200'); logDiv.setAttribute('height', legacyCC.game.canvas.height); @@ -148,7 +155,7 @@ export function _resetDebugSetting (mode: DebugMode) { logDivStyle.position = 'absolute'; logDivStyle.top = logDivStyle.left = '0'; - logList = document.createElement('textarea'); + logList = ccdocument.createElement('textarea'); logList.setAttribute('rows', '20'); logList.setAttribute('cols', '30'); logList.setAttribute('disabled', 'true'); @@ -359,6 +366,8 @@ export enum DebugMode { /** * @en Gets error message with the error id and possible parameters. * @zh 通过 error id 和必要的参数来获取错误信息。 + * @param errorId @zh 错误的ID。@en Error id. + * @param param @zh 输出日志。@en Output log. */ export function getError (errorId: number, ...param: any[]): string { // eslint-disable-next-line @typescript-eslint/no-unsafe-return @@ -368,7 +377,7 @@ export function getError (errorId: number, ...param: any[]): string { /** * @en Returns whether or not to display the FPS and debug information. * @zh 是否显示 FPS 信息和部分调试信息。 - * @deprecated Since v3.6, Please use profiler.isShowingStates instead + * @deprecated @zh 从v3.6开始不再支持,请使用 profiler.isShowingStates。@en Since v3.6, Please use profiler.isShowingStates instead. */ export function isDisplayStats (): boolean { // eslint-disable-next-line @typescript-eslint/no-unsafe-return @@ -378,7 +387,7 @@ export function isDisplayStats (): boolean { /** * @en Sets whether display the FPS and debug informations on the bottom-left corner. * @zh 设置是否在左下角显示 FPS 和部分调试。 - * @deprecated Since v3.6, Please use profiler.showStats instead + * @deprecated @zh 从v3.6开始不再支持,请使用 profiler.showStats。@en Since v3.6, Please use profiler.showStats instead. */ export function setDisplayStats (displayStats: boolean) { if (legacyCC.profiler) { diff --git a/cocos/core/platform/deprecated.ts b/cocos/core/platform/deprecated.ts index aeaec72a54..5b1fdc9b2e 100644 --- a/cocos/core/platform/deprecated.ts +++ b/cocos/core/platform/deprecated.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { markAsWarning, removeProperty, replaceProperty } from '../utils'; import { sys } from './sys'; diff --git a/cocos/core/platform/index.ts b/cocos/core/platform/index.ts index 5bad1995f6..9109c0d9f0 100644 --- a/cocos/core/platform/index.ts +++ b/cocos/core/platform/index.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/core/platform/macro.ts b/cocos/core/platform/macro.ts index c67cb306b1..7d1007aa48 100644 --- a/cocos/core/platform/macro.ts +++ b/cocos/core/platform/macro.ts @@ -2,16 +2,16 @@ Copyright (c) 2008-2010 Ricardo Quesada Copyright (c) 2011-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. diff --git a/cocos/core/platform/screen.ts b/cocos/core/platform/screen.ts index c853ec93fb..dd1fb699ef 100644 --- a/cocos/core/platform/screen.ts +++ b/cocos/core/platform/screen.ts @@ -2,16 +2,16 @@ Copyright (c) 2008-2010 Ricardo Quesada Copyright (c) 2011-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -57,7 +57,7 @@ class Screen { * @en the ratio of the resolution in physical pixels to the resolution in CSS pixels for the current display device * NOTE: For performance reasons, the engine will limit the maximum value of DPR on some platforms. * This property returns the DPR after the engine limit. - * @zh 当前显示设备的物理像素分辨率与 CSS 像素分辨率之比 + * @zh 当前显示设备的物理像素分辨率与 CSS 像素分辨率之比。 * 注意:出于性能考虑,引擎在一些平台会限制 DPR 的最高值,这个属性返回的是引擎限制后的 DPR。 */ public get devicePixelRatio () { @@ -108,8 +108,8 @@ class Screen { // } /** - * @en Whether it supports full screen? - * @zh 是否支持全屏? + * @en Whether it supports full screen. + * @zh 是否支持全屏。 * @returns {Boolean} */ public get supportsFullScreen (): boolean { @@ -118,7 +118,7 @@ class Screen { /** * @en Return true if it's in full screen state now. - * @zh 当前是否处在全屏状态下 + * @zh 当前是否处在全屏状态下。 * @returns {boolean} */ public fullScreen (): boolean { @@ -131,9 +131,9 @@ class Screen { * If failed to request fullscreen, another attempt will be made to request fullscreen the next time a user interaction occurs. * @zh 尝试使当前节点进入全屏模式,很多浏览器不允许程序触发这样的行为,必须在一个用户交互回调中才会生效。 * 如果进入全屏失败,会在下一次用户发生交互时,再次尝试进入全屏。 - * @param element The element to request full screen state - * @param onFullScreenChange callback function when full screen state changed - * @param onFullScreenError callback function when full screen error + * @param element @zh 请求全屏状态的html元素。 @en The element to request full screen state. + * @param onFullScreenChange @zh 全屏状态改变的回调函数。 @en callback function when full screen state changed. + * @param onFullScreenError @zh 全屏错误的回调函数。 @en callback function when full screen error. * @return {Promise|undefined} * @deprecated since v3.3, please use `screen.requestFullScreen(): Promise` instead. */ @@ -144,6 +144,9 @@ class Screen { * If failed to request fullscreen, another attempt will be made to request fullscreen the next time a user interaction occurs. * @zh 尝试使当前屏幕进入全屏模式,很多浏览器不允许程序触发这样的行为,必须在一个用户交互回调中才会生效。 * 如果进入全屏失败,会在下一次用户发生交互时,再次尝试进入全屏。 + * @param element @zh 请求全屏状态的html元素。 @en The element to request full screen state. + * @param onFullScreenChange @zh 全屏状态改变的回调函数。 @en callback function when full screen state changed. + * @param onFullScreenError @zh 全屏错误的回调函数。 @en callback function when full screen error. * @return {Promise} */ public requestFullScreen (): Promise; @@ -163,7 +166,7 @@ class Screen { /** * @en Exit the full mode. - * @zh 退出全屏模式 + * @zh 退出全屏模式。 * @return {Promise} */ public exitFullScreen (): Promise { @@ -171,10 +174,10 @@ class Screen { } /** - * @en Automatically request full screen during the next touch/click event - * @zh 自动监听触摸、鼠标事件并在下一次事件触发时尝试进入全屏模式 - * @param element The element to request full screen state - * @param onFullScreenChange callback function when full screen state changed + * @en Automatically request full screen during the next touch/click event. + * @zh 自动监听触摸、鼠标事件并在下一次事件触发时尝试进入全屏模式。 + * @param element @zh 请求全屏状态的html元素。 @en The element to request full screen state. + * @param onFullScreenChange @zh 全屏状态改变的回调函数。 @en callback function when full screen state changed. * * @deprecated since v3.3, please use screen.requestFullScreen() instead. */ diff --git a/cocos/core/platform/sys.ts b/cocos/core/platform/sys.ts index cef014fc9e..b0e39455de 100644 --- a/cocos/core/platform/sys.ts +++ b/cocos/core/platform/sys.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -45,8 +44,8 @@ export declare namespace sys { } /** - * @en A set of system related variables - * @zh 一系列系统相关环境变量 + * @en A set of system related variables. + * @zh 一系列系统相关环境变量。 */ export const sys = { Feature, @@ -56,6 +55,7 @@ export const sys = { * Returns if the specified platform related feature is supported. * @zh * 返回指定的平台相关的特性是否支持。 + * @param feature @zh 系统的特性。 @en Feature of the system. */ hasFeature (feature: sys.Feature): boolean { return systemInfo.hasFeature(feature); @@ -63,77 +63,77 @@ export const sys = { /** * @en - * Network type enumeration + * Network type enumeration. * @zh - * 网络类型枚举 + * 网络类型枚举。 */ NetworkType, /** * @en - * LanguageCode type enumeration + * LanguageCode type enumeration. * @zh - * 语言码类型枚举 + * 语言码类型枚举。 */ Language, /** * @en - * OS type enumeration + * OS type enumeration. * @zh - * 操作系统类型枚举 + * 操作系统类型枚举。 */ OS, /** * @en - * Platform type enumeration + * Platform type enumeration. * @zh - * 平台类型枚举 + * 平台类型枚举。 */ Platform, /** * @en - * Browser type enumeration + * Browser type enumeration. * @zh - * 浏览器类型枚举 + * 浏览器类型枚举。 */ BrowserType, /** - * @en Whether the running platform is native app - * @zh 指示运行平台是否是原生平台 + * @en Whether the running platform is native app. + * @zh 指示运行平台是否是原生平台。 */ isNative: systemInfo.isNative, /** - * @en Whether the running platform is browser - * @zh 指示运行平台是否是浏览器 + * @en Whether the running platform is browser. + * @zh 指示运行平台是否是浏览器。 */ isBrowser: systemInfo.isBrowser, /** - * @en Indicate whether the current running context is a mobile system - * @zh 指示当前运行平台是否是移动端平台 + * @en Indicate whether the current running context is a mobile system. + * @zh 指示当前运行平台是否是移动端平台。 */ isMobile: systemInfo.isMobile, /** - * @en Whether the endianness of current platform is little endian - * @zh 当前平台字节顺序是否是小端序 + * @en Whether the endianness of current platform is little endian. + * @zh 当前平台字节顺序是否是小端序。 */ isLittleEndian: systemInfo.isLittleEndian, /** - * @en The running platform - * @zh 当前运行平台或环境 + * @en The running platform. + * @zh 当前运行平台或环境。 */ platform: systemInfo.platform, /** - * @en Indicate the current language of the running system - * @zh 指示当前运行环境的语言 + * @en Indicate the current language of the running system. + * @zh 指示当前运行环境的语言。 */ language: systemInfo.language, @@ -151,52 +151,52 @@ export const sys = { languageCode: systemInfo.nativeLanguage, /** - * @en Indicate the running os name - * @zh 指示当前运行系统 + * @en Indicate the running os name. + * @zh 指示当前运行系统。 */ os: systemInfo.os, /** - * @en Indicate the running os version string - * @zh 指示当前运行系统版本字符串 + * @en Indicate the running os version string. + * @zh 指示当前运行系统版本字符串。 */ osVersion: systemInfo.osVersion, /** - * @en Indicate the running os main version - * @zh 指示当前系统主版本 + * @en Indicate the running os main version. + * @zh 指示当前系统主版本。 */ osMainVersion: systemInfo.osMainVersion, /** - * @en Indicate the running browser type - * @zh 指示当前运行的浏览器类型 + * @en Indicate the running browser type. + * @zh 指示当前运行的浏览器类型。 */ browserType: systemInfo.browserType, /** - * @en Indicate the running browser version - * @zh 指示当前运行的浏览器版本 + * @en Indicate the running browser version. + * @zh 指示当前运行的浏览器版本。 */ browserVersion: systemInfo.browserVersion, /** - * @en Whether the running platform is xr app - * @zh 指示运行平台是否是XR平台 + * @en Whether the running platform is xr app. + * @zh 指示运行平台是否是XR平台。 */ isXR: systemInfo.isXR, /** - * @en Indicate the real pixel resolution of the whole game window - * @zh 指示游戏窗口的像素分辨率 + * @en Indicate the real pixel resolution of the whole game window. + * @zh 指示游戏窗口的像素分辨率。 * * @deprecated since v3.4.0, please use screen.windowSize instead. */ windowPixelResolution: screen.windowSize, /** - * @en The capabilities of the current platform - * @zh 当前平台的功能可用性 + * @en The capabilities of the current platform. + * @zh 当前平台的功能可用性。 * * @deprecated since v3.4.0, please use sys.hasFeature() instead. */ @@ -212,14 +212,15 @@ export const sys = { }, /** - * @en It is a local storage component based on HTML5 localStorage API, on web platform, it's equal to window.localStorage - * @zh HTML5 标准中的 localStorage 的本地存储功能,在 Web 端等价于 window.localStorage + * @en It is a local storage component based on HTML5 localStorage API, on web platform, it's equal to window.localStorage. + * @zh HTML5 标准中的 localStorage 的本地存储功能,在 Web 端等价于 window.localStorage。 */ localStorage: {} as Storage, /** * @en Get the network type of current device, return `sys.NetworkType.LAN` if failure. - * @zh 获取当前设备的网络类型, 如果网络类型无法获取,默认将返回 `sys.NetworkType.LAN` + * @zh 获取当前设备的网络类型, 如果网络类型无法获取,默认将返回 `sys.NetworkType.LAN`。 + * @return @zh 返回 LAN 或 WWAN。 @en LAN or WWAN. */ getNetworkType (): NetworkType { return systemInfo.networkType; @@ -227,7 +228,7 @@ export const sys = { /** * @en Get the battery level of current device, return 1.0 if failure. - * @zh 获取当前设备的电池电量,如果电量无法获取,默认将返回 1 + * @zh 获取当前设备的电池电量,如果电量无法获取,默认将返回 1。 * @return - 0.0 ~ 1.0 */ getBatteryLevel (): number { @@ -235,8 +236,8 @@ export const sys = { }, /** - * @en Forces the garbage collection, only available in native platforms - * @zh 强制进行 JS 内存垃圾回收,尽在原生平台有效 + * @en Forces the garbage collection, only available in native platforms. + * @zh 强制进行 JS 内存垃圾回收,尽在原生平台有效。 */ garbageCollect () { systemInfo.triggerGC(); @@ -247,8 +248,8 @@ export const sys = { * In web engine, it will return true if the object exist * In native engine, it will return true if the JS object and the correspond native object are both valid * @zh 检查一个对象是否非空或在原生平台有效, - * 在 Web 平台,只要对象非空或非 Undefined 就会返回 true,在原生平台,我们会检查当前 JS 对象和其绑定的原生对象是否都有效 - * @param obj The object to be checked + * 在 Web 平台,只要对象非空或非 Undefined 就会返回 true,在原生平台,我们会检查当前 JS 对象和其绑定的原生对象是否都有效。 + * @param obj @zh 校验的对象。@en The object to be checked. */ isObjectValid (obj: any): boolean { if (obj === null || obj === undefined) { @@ -259,8 +260,8 @@ export const sys = { }, /** - * @en Dump systemInfo informations - * @zh 在控制台打印当前的主要系统信息 + * @en Dump systemInfo informations. + * @zh 在控制台打印当前的主要系统信息。 */ dump () { let str = ''; @@ -282,8 +283,9 @@ export const sys = { }, /** - * @en Try to open a url in browser, may not work in some platforms - * @zh 尝试打开一个 web 页面,并非在所有平台都有效 + * @en Try to open a url in browser, may not work in some platforms. + * @zh 尝试打开一个 web 页面,并非在所有平台都有效。 + * @param url @zh 访问的链接。 @en Visited links. */ openURL (url) { systemInfo.openURL(url); @@ -327,15 +329,16 @@ export const sys = { }, /** - * @en Get the current time in milliseconds - * @zh 获取当前时间(毫秒为单位) + * @en Get the current time in milliseconds. + * @zh 获取当前时间(毫秒为单位)。 */ now () { return systemInfo.now(); }, /** - * Restart the JS VM, only available in native platforms + * @en Restart the JS VM, only available in native platforms. + * @zh 重启JS虚拟机,仅仅在原生平台有效。 * @private */ restartVM () { @@ -348,7 +351,8 @@ export const sys = { * If the screen is not notched, this method returns a Rect of the same size as visibleSize by default. * Currently supports Android, iOS and WeChat, ByteDance Mini Game platform. * @zh - * 返回基于游戏视图坐标系的手机屏幕安全区域(设计分辨率为单位),如果不是异形屏将默认返回一个和 visibleSize 一样大的 Rect。目前支持安卓、iOS 原生平台和微信、字节小游戏平台。 + * 返回基于游戏视图坐标系的手机屏幕安全区域(设计分辨率为单位),如果不是异形屏将默认返回一个和 visibleSize 一样大的 Rect。 + * 目前支持安卓、iOS 原生平台和微信、字节小游戏平台。 * @method getSafeAreaRect * @return {Rect} */ diff --git a/cocos/core/platform/visible-rect.ts b/cocos/core/platform/visible-rect.ts index 5bde6a915c..dc56a446db 100644 --- a/cocos/core/platform/visible-rect.ts +++ b/cocos/core/platform/visible-rect.ts @@ -1,16 +1,16 @@ /* Copyright (c) 2011-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -28,67 +28,82 @@ import { Rect } from '../math'; import { legacyCC } from '../global-exports'; /** - * `visibleRect` is a singleton object which defines the actual visible rect of the current view + * @zh `visibleRect` is a singleton object which defines the actual visible rect of the current view. + * @en `visibleRect` 是一个定义当前视图的实际可见矩形的单例对象。 * @engineInternal */ export const visibleRect = { /** - * Top left coordinate of the screen related to the game scene. + * @zh 与游戏场景有关的屏幕左上方坐标。 + * @en Top left coordinate of the screen related to the game scene. */ topLeft: legacyCC.v2(0, 0), /** - * Top right coordinate of the screen related to the game scene. + * @zh 与游戏场景有关的屏幕右上方坐标。 + * @en Top right coordinate of the screen related to the game scene. */ topRight: legacyCC.v2(0, 0), /** - * Top center coordinate of the screen related to the game scene. + * @zh 与游戏场景有关的屏幕上方中心坐标。 + * @en Top center coordinate of the screen related to the game scene. */ top: legacyCC.v2(0, 0), /** - * Bottom left coordinate of the screen related to the game scene. + * @zh 与游戏场景有关的屏幕左下坐标。 + * @en Bottom left coordinate of the screen related to the game scene. */ bottomLeft: legacyCC.v2(0, 0), /** - * Bottom right coordinate of the screen related to the game scene. + * @zh 与游戏场景有关的屏幕右下坐标。 + * @en Bottom right coordinate of the screen related to the game scene. */ bottomRight: legacyCC.v2(0, 0), /** - * Bottom center coordinate of the screen related to the game scene. + * @zh 与游戏场景有关的屏幕下方中心坐标。 + * @en Bottom center coordinate of the screen related to the game scene. */ bottom: legacyCC.v2(0, 0), /** - * Center coordinate of the screen related to the game scene. + * @zh 与游戏场景有关的屏幕中心坐标。 + * @en Center coordinate of the screen related to the game scene. */ center: legacyCC.v2(0, 0), /** - * Left center coordinate of the screen related to the game scene. + * @zh 与游戏场景有关的屏幕左边中心坐标。 + * @en Left center coordinate of the screen related to the game scene. */ left: legacyCC.v2(0, 0), /** - * Right center coordinate of the screen related to the game scene. + * @zh 与游戏场景有关的屏幕右边中心坐标。 + * @en Right center coordinate of the screen related to the game scene. */ right: legacyCC.v2(0, 0), /** - * Width of the screen. + * @zh 屏幕宽度。 + * @en Width of the screen. */ width: 0, /** - * Height of the screen. + * @zh 屏幕高度。 + * @en Height of the screen. */ height: 0, /** - * initialize + * @zh 初始化函数。 + * @en Initialization function. + * @param visibleRect_ @zh 当前视图的实际可见区域。@en The actual visible area of the current view. + * @NOTE: @zh 必须是有效的区域。例如区域大小不能为负数。@en It must be a valid region. For example, the region size cannot be negative. */ init (visibleRect_: Rect) { const w = this.width = visibleRect_.width; diff --git a/cocos/core/scheduler.ts b/cocos/core/scheduler.ts index 3a45cb1d4a..e9f851963d 100644 --- a/cocos/core/scheduler.ts +++ b/cocos/core/scheduler.ts @@ -1,27 +1,26 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. */ import { IDGenerator } from './utils/id-generator'; @@ -35,19 +34,15 @@ const MAX_POOL_SIZE = 20; const idGenerator = new IDGenerator('Scheduler'); export interface ISchedulable { - id?:string; - uuid?:string; + id?: string; + uuid?: string; } // data structures /** - * @en A list double-linked list used for "updates with priority" - * @zh 用于“优先更新”的列表 + * @en A list double-linked list used for "updates with priority". + * @zh 用于“优先更新”的列表。 * @class ListEntry - * @param target not retained (retained by hashUpdateEntry) - * @param priority - * @param paused - * @param markedForDeletion selector will no longer be called and entry will be removed at end of the next tick */ class ListEntry { public static get = (target: ISchedulable, priority: number, paused: boolean, markedForDeletion: boolean) => { @@ -77,6 +72,22 @@ class ListEntry { public paused: boolean; public markedForDeletion: boolean; + /** + * @en The constructor of ListEntry. + * @zh ListEntry 的构造函数。 + * @param target + * @en Target object, which is ISchedulable type, retained by hashUpdateEntry. + * @zh 目标对象, 为ISchedulable类型. 被hashUpdateEntry持有。 + * @param priority + * @en The priority. + * @zh 优先级。 + * @param paused + * @en Whether is paused. + * @zh 是否被暂停。 + * @param markedForDeletion + * @en Mark for deletion. if true, selector will no longer be called and entry will be removed at end of the next tick. + * @zh 删除标记, 当为true时, selector 将不再被调用,并且entry将在下一个tick结束时被删除。 + */ constructor (target: ISchedulable, priority: number, paused: boolean, markedForDeletion: boolean) { this.target = target; this.priority = priority; @@ -86,13 +97,13 @@ class ListEntry { } /** - * @en A update entry list - * @zh 更新条目列表 + * @en The update entry list. + * @zh 更新条目列表。 * @class HashUpdateEntry - * @param list Which list does it belong to ? - * @param entry entry in the list - * @param target hash key (retained) - * @param callback + * @param list @en Which list does it belong to. @zh 所属的列表。 + * @param entry @en Entry in the list. @zh 所述的条目。 + * @param target @en Hash key (retained). @zh 哈希键所对应的目标(被持有的)。 + * @param callback @en The callback function. @zh 所回调的函数。 */ class HashUpdateEntry { public static get = (list: any, entry: ListEntry, target: ISchedulable, callback: any) => { @@ -131,8 +142,8 @@ class HashUpdateEntry { } /** - * @en Hash Element used for "selectors with interval" - * @zh “用于间隔选择”的哈希元素 + * @en Hash Element used for "selectors with interval". + * @zh “用于间隔选择”的哈希元素。 * @param timers * @param target hash key (retained) * @param timerIndex @@ -237,23 +248,29 @@ class CallbackTimer { return true; } /** - * @return returns interval of timer + * @en get interval for timer in seconds. + * @zh 获取计时器的时间间隔, 以秒为单位。 + * @returns + * @en returns interval of timer in seconds. + * @zh 返回计时器的时间间隔, 以秒为单位。 */ public getInterval () { return this._interval; } /** - * @en Set interval in seconds - * @zh 以秒为单位设置时间间隔 + * @en Set interval in seconds. + * @zh 以秒为单位设置时间间隔。 */ public setInterval (interval) { this._interval = interval; } /** - * @en Update function which triggers the timer - * @zh 计时更新函数,用来触发计时器 - * @param dt delta time + * @en Update function which triggers the timer. + * @zh 计时更新函数,用来触发计时器。 + * @param dt + * @en delta time. The unit is seconds. + * @zh 更新间隔时间, 单位是秒。 */ public update (dt: number) { if (this._elapsed === -1) { @@ -315,7 +332,7 @@ class CallbackTimer { *
* There are 2 different types of callbacks (selectors):
* - update callback: the 'update' callback will be called every frame. You can customize the priority.
- * - custom callback: A custom callback will be called every frame, or with a custom interval of time
+ * - custom callback: A custom callback will be called every frame, or with a custom interval of time.
*
* The 'custom selectors' should be avoided when possible. It is faster,
* and consumes less memory to use the 'update callback'. * @@ -347,6 +364,8 @@ export class Scheduler extends System { * @zh 任何需要用 Scheduler 管理任务的对象主体都应该调用这个方法,并且应该在调用任何 Scheduler API 之前调用这个方法。 * 这个方法会给对象添加一个 `id` 属性,如果这个属性不存在的话。 * @param target + * @en The target to enable, which type is ISchedulable. + * @zh 所作用的对象。类型为ISchedulable。 */ public static enableForTarget (target: ISchedulable) { let found = false; @@ -413,7 +432,9 @@ export class Scheduler extends System { /** * @en 'update' the scheduler. (You should NEVER call this method, unless you know what you are doing.) * @zh update 调度函数。(不应该直接调用这个方法,除非完全了解这么做的结果) - * @param dt delta time + * @param dt + * @en delta time. The unit is seconds. + * @zh 更新间隔时间, 单位是秒。 */ public update (dt) { this._updateHashLocked = true; @@ -507,31 +528,30 @@ export class Scheduler extends System { } /** - * @en - *

- * The scheduled method will be called every 'interval' seconds.
- * If paused is YES, then it won't be called until it is resumed.
- * If 'interval' is 0, it will be called every frame, but if so, it recommended to use 'scheduleUpdateForTarget:' instead.
- * If the callback function is already scheduled, then only the interval parameter will be updated without re-scheduling it again.
- * repeat let the action be repeated repeat + 1 times, use `macro.REPEAT_FOREVER` to let the action run continuously
- * delay is the amount of time the action will wait before it'll start. Unit: s
- *

- * @zh - * 指定回调函数,调用对象等信息来添加一个新的定时器。
- * 如果 paused 值为 true,那么直到 resume 被调用才开始计时。
- * 当时间间隔达到指定值时,设置的回调函数将会被调用。
- * 如果 interval 值为 0,那么回调函数每一帧都会被调用,但如果是这样, - * 建议使用 scheduleUpdateForTarget 代替。
- * 如果回调函数已经被定时器使用,那么只会更新之前定时器的时间间隔参数,不会设置新的定时器。
- * repeat 值可以让定时器触发 repeat + 1 次,使用 `macro.REPEAT_FOREVER` - * 可以让定时器一直循环触发。
- * delay 值指定延迟时间,定时器会在延迟指定的时间之后开始计时,单位: 秒。 + * @en Specify the callback, target and other information to schedule a new timer. + * @zh 指定回调函数,调用对象等信息来规划一个新的定时器。 * @param callback + * @en The specified callback function. + * If the callback function is already scheduled, then only the interval parameter will be updated without re-scheduling it again. + * @zh 所指定的回调函数。 + * 如果回调函数已经被定时器使用,那么只会更新之前定时器的时间间隔参数,不会设置新的定时器。 * @param target + * @en The specified target. + * @zh 所指定的调用对象。 * @param interval + * @en The scheduled method will be called every 'interval' seconds. + * If 'interval' is 0, it will be called every frame, but if so, it recommended to use 'scheduleUpdateForTarget:' instead. + * @zh 当时间间隔达到指定值时,设置的回调函数将会被调用。 + * 如果 interval 值为 0,那么回调函数每一帧都会被调用,但如果是这样,建议使用 scheduleUpdateForTarget 代替。 * @param [repeat] + * @en repeat let the action be repeated repeat + 1 times, use `macro.REPEAT_FOREVER` to let the action run continuously. + * @zh repeat 值可以让定时器触发 repeat + 1 次,使用 `macro.REPEAT_FOREVER` 可以让定时器一直循环触发。 * @param [delay=0] - * @param [paused=fasle] + * @en delay is the amount of time the action will wait before it'll start. Unit: s. + * @zh delay 值指定延迟时间,定时器会在延迟指定的时间之后开始计时,单位: 秒。 + * @param [paused=false] + * @en If paused is YES, then it won't be called until it is resumed. + * @zh 如果 paused 值为 true,那么直到 resume 被调用才开始计时。 */ public schedule (callback: (dt?: number) => void, target: ISchedulable, interval: number, repeat?: number, delay?: number, paused?: boolean) { if (typeof callback !== 'function') { @@ -598,8 +618,11 @@ export class Scheduler extends System { * update 定时器每一帧都会被触发,触发时自动调用指定对象的 "update" 函数。
* 优先级的值越低,定时器被触发的越早。 * @param target + * @en The target bound to the callback. @zh 回调所绑定的目标对象。 * @param priority + * @en The priority. @zh 优先级。 * @param paused + * @en Whether is paused. @zh 是否被暂停。 */ public scheduleUpdate (target: ISchedulable, priority: number, paused: boolean) { const targetId = target.uuid || target.id; @@ -646,15 +669,15 @@ export class Scheduler extends System { /** * @en - * Unschedules a callback for a callback and a given target. + * Unschedule a callback for a callback and a given target. * If you want to unschedule the "update", use `unscheduleUpdate()` * @zh * 取消指定对象定时器。 * 如果需要取消 update 定时器,请使用 unscheduleUpdate()。 - * @param callback The callback to be unscheduled - * @param target The target bound to the callback. + * @param callback @en The callback to be unscheduled @zh 被取消调度的回调。 + * @param target @en The target bound to the callback. @zh 回调所绑定的目标对象。 */ - public unschedule (callback, target:ISchedulable) { + public unschedule (callback, target: ISchedulable) { // callback, target // explicity handle nil arguments when removing an object @@ -697,11 +720,11 @@ export class Scheduler extends System { } /** - * @en Unschedules the update callback for a given target. + * @en Unschedule the update callback for a given target. * @zh 取消指定对象的 update 定时器。 * @param target The target to be unscheduled. */ - public unscheduleUpdate (target:ISchedulable) { + public unscheduleUpdate (target: ISchedulable) { if (!target) { return; } @@ -723,7 +746,7 @@ export class Scheduler extends System { /** * @en - * Unschedules all scheduled callbacks for a given target. + * Unschedule all scheduled callbacks for a given target. * This also includes the "update" callback. * @zh 取消指定对象的所有定时器,包括 update 定时器。 * @param target The target to be unscheduled. @@ -765,10 +788,10 @@ export class Scheduler extends System { /** * @en - * Unschedules all scheduled callbacks from all targets including the system callbacks.
+ * Unschedule all scheduled callbacks from all targets including the system callbacks. * You should NEVER call this method, unless you know what you are doing. * @zh - * 取消所有对象的所有定时器,包括系统定时器。
+ * 取消所有对象的所有定时器,包括系统定时器。 * 不要调用此函数,除非你确定你在做什么。 */ public unscheduleAll () { @@ -777,13 +800,16 @@ export class Scheduler extends System { /** * @en - * Unschedules all callbacks from all targets with a minimum priority.
+ * Unschedule all callbacks from all targets with a minimum priority. * You should only call this with `PRIORITY_NON_SYSTEM_MIN` or higher. * @zh - * 取消所有优先级的值大于指定优先级的定时器。
+ * 取消所有优先级的值大于指定优先级的定时器。 * 你应该只取消优先级的值大于 PRIORITY_NON_SYSTEM_MIN 的定时器。 - * @param minPriority The minimum priority of selector to be unscheduled. Which means, all selectors which - * priority is higher than minPriority will be unscheduled. + * @param minPriority + * @en The minimum priority of selector to be unscheduled. + * Which means, all selectors which priority is higher than minPriority will be unscheduled. + * @zh 要取消调度的选择器的最低优先级。 + * 这意味着,所有优先级高于 minPriority 的选择器将被取消调度。 */ public unscheduleAllWithMinPriority (minPriority: number) { // Custom Selectors @@ -839,11 +865,11 @@ export class Scheduler extends System { /** * @en Checks whether a callback for a given target is scheduled. * @zh 检查指定的回调函数和回调对象组合是否存在定时器。 - * @param callback The callback to check. - * @param target The target of the callback. - * @return True if the specified callback is invoked, false if not. + * @param callback @en The callback to check. @zh 指定检测的回调。 + * @param target @en The target of the callback. @zh 回调的目标对象。 + * @returns @en True if the specified callback is invoked, false if not. @zh 返回true如果指定回调被调用, 否则返回false。 */ - public isScheduled (callback, target:ISchedulable) : boolean { + public isScheduled (callback, target: ISchedulable): boolean { // key, target // selector, target assertID(callback, 1508); @@ -877,10 +903,10 @@ export class Scheduler extends System { /** * @en - * Pause all selectors from all targets.
+ * Pause all selectors from all targets. * You should NEVER call this method, unless you know what you are doing. * @zh - * 暂停所有对象的所有定时器。
+ * 暂停所有对象的所有定时器。 * 不要调用这个方法,除非你知道你正在做什么。 */ public pauseAllTargets () { @@ -889,12 +915,12 @@ export class Scheduler extends System { /** * @en - * Pause all selectors from all targets with a minimum priority.
+ * Pause all selectors from all targets with a minimum priority. * You should only call this with kCCPriorityNonSystemMin or higher. * @zh - * 暂停所有优先级的值大于指定优先级的定时器。
+ * 暂停所有优先级的值大于指定优先级的定时器。 * 你应该只暂停优先级的值大于 PRIORITY_NON_SYSTEM_MIN 的定时器。 - * @param minPriority + * @param minPriority @en the minimum priority. @zn 最小优先级。 */ public pauseAllTargetsWithMinPriority (minPriority: number) { const idsWithSelectors: ISchedulable[] = []; @@ -978,7 +1004,7 @@ export class Scheduler extends System { * 如果指定的对象没有定时器,什么也不会发生。 * @param target */ - public pauseTarget (target:ISchedulable) { + public pauseTarget (target: ISchedulable) { assertID(target, 1503); const targetId = target.uuid || target.id; if (!targetId) { @@ -1010,7 +1036,7 @@ export class Scheduler extends System { * 如果指定的对象没有定时器,什么也不会发生。 * @param target */ - public resumeTarget (target:ISchedulable) { + public resumeTarget (target: ISchedulable) { assertID(target, 1504); const targetId = target.uuid || target.id; if (!targetId) { @@ -1036,7 +1062,7 @@ export class Scheduler extends System { * @zh 返回指定对象的定时器是否处于暂停状态。 * @param target */ - public isTargetPaused (target:ISchedulable) { + public isTargetPaused (target: ISchedulable) { assertID(target, 1505); const targetId = target.uuid || target.id; if (!targetId) { diff --git a/cocos/core/settings.ts b/cocos/core/settings.ts index 06de876061..3d06ea6294 100644 --- a/cocos/core/settings.ts +++ b/cocos/core/settings.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/core/system.ts b/cocos/core/system.ts index ae601a72c9..741ed750a9 100644 --- a/cocos/core/system.ts +++ b/cocos/core/system.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2019-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/core/utils/array.ts b/cocos/core/utils/array.ts index 38c38b82f8..01d7c75cbf 100644 --- a/cocos/core/utils/array.ts +++ b/cocos/core/utils/array.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2018-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2018-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/core/utils/coordinates-converts-utils.ts b/cocos/core/utils/coordinates-converts-utils.ts index 42a9413e93..0ccd3fce0c 100644 --- a/cocos/core/utils/coordinates-converts-utils.ts +++ b/cocos/core/utils/coordinates-converts-utils.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Camera } from '../../misc/camera-component'; import { Vec3 } from '../math'; diff --git a/cocos/core/utils/decode-uuid.ts b/cocos/core/utils/decode-uuid.ts index fcda52ba07..0b270679e6 100644 --- a/cocos/core/utils/decode-uuid.ts +++ b/cocos/core/utils/decode-uuid.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -28,23 +27,23 @@ import { TEST } from 'internal:constants'; import { BASE64_VALUES } from './misc'; import { legacyCC } from '../global-exports'; -const seperator = '@'; +const separator = '@'; const HexChars = '0123456789abcdef'.split(''); const _t = ['', '', '', '']; const UuidTemplate = _t.concat(_t, '-', _t, '-', _t, '-', _t, '-', _t, _t, _t); -const Indices = UuidTemplate.map((x, i) => (x === '-' ? NaN : i)).filter(isFinite); +const Indices = UuidTemplate.map((x, i) => (x === '-' ? NaN : i)).filter(Number.isFinite); /** * @en - * Decode uuid, returns the original uuid + * Decode base64-compressed uuid. * * @zh - * 解码 uuid,返回原始 uuid + * 解码用 base64 压缩过的 uuid。 * - * @param base64 - the encoded uuid - * @returns the original uuid + * @param base64 @en Base-64 compressed uuid. @zh 用 base-64 压缩过的 uuid。 + * @returns @en Original uuid. @zh 未压缩过的 uuid。 * * @example * ```ts @@ -53,7 +52,7 @@ const Indices = UuidTemplate.map((x, i) => (x === '-' ? NaN : i)).filter(isFinit * ``` */ export default function decodeUuid (base64: string) { - const strs = base64.split(seperator); + const strs = base64.split(separator); const uuid = strs[0]; if (uuid.length !== 22) { return base64; diff --git a/cocos/core/utils/deprecated-3.6.0.ts b/cocos/core/utils/deprecated-3.6.0.ts index 34da21b757..40096f8c8c 100644 --- a/cocos/core/utils/deprecated-3.6.0.ts +++ b/cocos/core/utils/deprecated-3.6.0.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { deprecateModuleExportedName } from './x-deprecated'; diff --git a/cocos/core/utils/id-generator.ts b/cocos/core/utils/id-generator.ts index 2940723a0b..07761d7e6a 100644 --- a/cocos/core/utils/id-generator.ts +++ b/cocos/core/utils/id-generator.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -32,7 +31,7 @@ const NonUuidMark = '.'; * ID generator for runtime. * * @zh - * 运行时 ID 生成器 + * 运行时 ID 生成器。 */ export class IDGenerator { /** @@ -45,26 +44,42 @@ export class IDGenerator { */ public static global = new IDGenerator('global'); + /** + * @en A number to record current id. It may increase when invoke `getNewId()`. Should use + * `getNewId()` to get a unique id. + * @zh 记录当前 id 值。调用 `getNewId()` 时,它可能被加1。应该使用 `getNewId()` 获取唯一的 id。 + */ public id: number; + /** + * @en A string value indicates the category this IDGenerator belongs to. It will be an empty + * string if not be assigned by passed parameter in constructor. + * @zh 用于标识该 IDGenerator 所属的类别。如果构造函数没有传参数对它赋值的话,它将是一个空字符串。 + */ public prefix: string; /** - * @en Construct a new id generator - * @zh 构造一个新的 id 生成器 + * @en Construct a new id generator. + * @zh 构造一个新的 id 生成器。 * - * @param [category] @en You can specify a unique category to avoid id collision with other instance of IdGenerator. @zh 你能指定一个唯一的标识用于避免与其他 id 生成器冲突 + * @param category @en You can specify a unique category to avoid id collision with other instance of IdGenerator. + * @zh 你能指定一个唯一的标识用于避免与其他 id 生成器冲突。 */ constructor (category?: string) { - // Tnit with a random id to emphasize that the returns id should not be stored in persistence data. + // Initialize with a random id to emphasize that the returns id should not be stored in persistence data. this.id = 0 | (Math.random() * 998); this.prefix = category ? (category + NonUuidMark) : ''; } + /** + * @en Gets a unique id. @zh 获取唯一的 id。 + * @returns @en The unique id. It has the form `prefix+id`, for example `scene55`, `scene` is `prefix`, `55` is `id`. + * @zh 唯一的 id。它的形式是 `prefix+id`,比如 `scene55`,`scene` 是 prefix,`55` 是 `id`。 + */ public getNewId () { if (EDITOR && (this.prefix === 'Node.' || this.prefix === 'Comp.')) { return EditorExtends.UuidUtils.uuid(); } - return this.prefix + (++this.id); + return this.prefix + (++this.id).toString(); } } diff --git a/cocos/core/utils/index.ts b/cocos/core/utils/index.ts index 0c3672e636..9167f05d6c 100644 --- a/cocos/core/utils/index.ts +++ b/cocos/core/utils/index.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/core/utils/js-typed.ts b/cocos/core/utils/js-typed.ts index 0a74b0a5f1..0cb880e42c 100644 --- a/cocos/core/utils/js-typed.ts +++ b/cocos/core/utils/js-typed.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { EDITOR, DEV, TEST } from 'internal:constants'; import { warnID, error, errorID } from '../platform/debug'; @@ -35,13 +34,20 @@ const classIdTag = '__cid__'; /** * @en - * Check the object whether is number or not - * If a number is created by using 'new Number(10086)', the typeof it will be "object"... - * Then you can use this function if you care about this case. + * Checks if an object is `number`. * @zh - * 检查对象是否是 number 类型,如果通过 'new Number(10086)' 创建了一个数字,则使用 typeof 判断此数字时,将返回 'object' 类型,此时你可以通过此方法来进行判断 - * @param object object to be checked - * @return whether this object is number or not + * 检查对象是否是 number 类型。 + * @param object @en The object to check. @zh 要检查的对象。 + * @returns @en True if it is a number primitive or a `Number` instance, false else. + * @zh 如果该对象是基础数字类型或者是 `Number` 实例,返回 `true`;否则返回 `false`。 + * @example + * ```ts + * var obj = 10; + * isNumber(obj); // returns true + * + * obj = new Number(10); + * isNumber(obj); // returns true + * ``` */ export function isNumber (object: any) { return typeof object === 'number' || object instanceof Number; @@ -49,13 +55,20 @@ export function isNumber (object: any) { /** * @en - * Check the object whether is string or not. - * If a string is created by using 'new String("blabla")', the typeof it will be "object"... - * Then you can use this function if you care about this case. + * Checks if an object is `string`. * @zh - * 检查对象是否是 string 类型,如果通过 'new String("blabla")' 创建了一个字符串,则使用 typeof 判断此字符串时,将返回 'object' 类型,此时你可以通过此方法来进行判断 - * @param object object to be checked - * @return whether this object is string or not + * 检查对象是否是 string 类型。 + * @param object @en The object to check. @zh 要检查的对象。 + * @returns @en True if it is a string primitive or a `String` instance, false else. + * @zh 如果该对象是基础字符串类型或者是 `String` 实例,返回 `true`;否则返回 `false`。 + * @example + * ```ts + * var obj = "it is a string"; + * isString(obj); // returns true + * + * obj = new String("it is a string"); + * isString(obj); // returns true + * ``` */ export function isString (object: any) { return typeof object === 'string' || object instanceof String; @@ -63,11 +76,13 @@ export function isString (object: any) { /** * @en - * Checks if the object `obj` does not have one or more enumerable properties (including properties from proto chain). + * Checks if an object is empty object. If an object does not have any enumerable property + * (including properties inherits from prototype chains), then it is an empty object. * @zh - * 检查此对象是否为空对象 - * @param obj The object. - * @returns The result. Note that if the `obj` is not of type `'object'`, `true` is returned. + * 检查对象是否为空对象。空对象的定义是:没有任何可被枚举的属性(包括从原型链继承的属性)的对象。 + * @param obj @en The object to check. @zh 要检查的对象。 + * @returns @en True if it is not an empty object or not an object, false else. + * @zh 如果不是空对象或者不是一个对象,返回 `true`;否则返回 `false`。 */ export function isEmptyObject (obj: any) { for (const key in obj) { @@ -77,14 +92,15 @@ export function isEmptyObject (obj: any) { } /** - * @en - * Define value, just help to call Object.defineProperty.
- * The configurable will be true. - * @zh - * 定义值,帮助调用 Object.defineProperty. - * 该属性默认可读写 - * @param [writable=false] - * @param [enumerable=false] + * @en A helper function to add a property to an object, or modifies attributes + * of an existing property. The property is configurable. + * @zh 为对象添加属性或者修改已有属性的辅助函数。该属性是可配置的。 + * @param object @en The object to add or modify attributes. @zh 要添加或者修改属性的对象。 + * @param propertyName @en The property name to add or modify. @zh 要添加或修改的属性名。 + * @param value_ @en The property value to add or new value to replace a existing attribute. + * @zh 要添加的属性值,或者取代现有属性的新值。 + * @param writable @en If the property is writable. @zh 属性是否可写。 + * @param enumerable @en If the property is enumerable. @zh 属性是否可枚举。 */ export const value = (() => { const descriptor: PropertyDescriptor = { @@ -103,13 +119,14 @@ export const value = (() => { })(); /** - * @en - * Define get set accessor, just help to call Object.defineProperty(...). - * @zh - * 定义 get set 访问器,帮助调用 Object.defineProperty() - * @param [setter=null] - * @param [enumerable=false] - * @param [configurable=false] + * @en A helper function to add or modify `get`, `set`, `enumerable` or `configurable` of a property. + * @zh 添加或修改属性的 `get`, `set`, `enumerable` 或者 `configurable`。 + * @param object @en The object to add or modify attributes. @zh 要添加或者修改属性的对象。 + * @param propertyName @en The property name to add or modify. @zh 要添加或修改的属性名。 + * @param getter @en The getter of a property. @zh 属性的获取函数。 + * @param setter @en The setter of a property. @zh 属性的设置函数。 + * @param enumerable @en If the property is enumerable. @zh 属性是否可列举。 + * @param configurable @en If the property is configurable. @zh 属性是否可配置。 */ export const getset = (() => { const descriptor: PropertyDescriptor = { @@ -119,6 +136,7 @@ export const getset = (() => { }; return (object: Record, propertyName: string, getter: Getter, setter?: Setter | boolean, enumerable = false, configurable = false) => { if (typeof setter === 'boolean') { + console.log('Set `setter` to boolean is deprecated. Please don not use like this again.'); enumerable = setter; setter = undefined; } @@ -133,12 +151,13 @@ export const getset = (() => { })(); /** - * @en - * Define get accessor, just help to call Object.defineProperty(...). - * @zh - * 定义 get 访问器,帮助调用 Object.defineProperty() - * @param [enumerable=false] - * @param [configurable=false] + * @en A helper function to add or modify `get`, `enumerable` or `configurable` of a property. + * @zh 添加或修改属性的 `get`, `enumerable` 或者 `configurable`。 + * @param object @en The object to add or modify attributes. @zh 要添加或者修改属性的对象。 + * @param propertyName @en The property name to add or modify. @zh 要添加或修改的属性名。 + * @param getter @en The getter of a property. @zh 属性的获取函数。 + * @param enumerable @en If the property is enumerable. @zh 属性是否可列举。 + * @param configurable @en If the property is configurable. @zh 属性是否可配置。 */ export const get = (() => { const descriptor: PropertyDescriptor = { @@ -156,12 +175,13 @@ export const get = (() => { })(); /** - * @en - * Define set accessor, just help to call Object.defineProperty(...) - * @zh - * 定义 set 访问器,帮助调用 Object.defineProperty - * @param [enumerable=false] - * @param [configurable=false] + * @en A helper function to add or modify `get`, `enumerable` or `configurable` of a property. + * @zh 添加或修改属性的 `get`, `enumerable` 或者 `configurable`。 + * @param object @en The object to add or modify attributes. @zh 要添加或者修改属性的对象。 + * @param propertyName @en The property name to add or modify. @zh 要添加或修改的属性名。 + * @param setter @en The setter of a property. @zh 属性的设置函数。 + * @param enumerable @en If the property is enumerable. @zh 属性是否可列举。 + * @param configurable @en If the property is configurable. @zh 属性是否可配置。 */ export const set = (() => { const descriptor: PropertyDescriptor = { @@ -188,9 +208,11 @@ export const set = (() => { * `Object.create(null)` 用于创建无 prototype (也就无继承)的空对象。 * 这样我们在该对象上查找属性时,就不用进行 `hasOwnProperty` 判断,此时对性能提升有帮助。 * - * @param [forceDictMode=false] Apply the delete operator to newly created map object. - * This causes V8 to put the object in "dictionary mode" and disables creation of hidden classes - * which are very expensive for objects that are constantly changing shape. + * @param forceDictMode @en Apply the delete operator to newly created map object. This will let V8 put the object in + * "dictionary mode" and disables creation of hidden classes. This will improve the performance of objects that are + * constantly changing shape. + * @zh 对新创建的地图对象应用删除操作。这将让V8将对象置于 "字典模式",并禁止创建隐藏类。这将提高那些不断变化形状对象的性能。 + * @returns @en A newly map object. @zh 一个新的 map 对象。 */ export function createMap (forceDictMode?: boolean): any { const map = Object.create(null); @@ -208,11 +230,13 @@ export function createMap (forceDictMode?: boolean): any { /** * @en - * Get class name of the object, if object is just a {} (and which class named 'Object'), it will return "". - * (modified from
the code from this stackoverflow post) + * Gets class name of the object, if object is just a {} (and which class named 'Object'), it will return "". + * (modified from the code of stackoverflow post) * @zh - * 获取对象的类型名称,如果对象是 {} 字面量,将会返回 "" - * @param objOrCtor instance or constructor + * 获取对象的类型名称,如果对象是 {} 字面量,将会返回 ""。参考了 stackoverflow 的代码实现: + * stackoverflow 的实现 + * @param objOrCtor @en An object instance or constructor. @zh 类实例或者构造函数。 + * @returns @en The class name. @zh 类名。 */ export function getClassName (objOrCtor: any): string { if (typeof objOrCtor === 'function') { @@ -221,10 +245,10 @@ export function getClassName (objOrCtor: any): string { if (prototype && prototype.hasOwnProperty(classNameTag) && prototype[classNameTag]) { return prototype[classNameTag] as string; } - let retval = ''; + let ret = ''; // for browsers which have name property in the constructor of the object, such as chrome if (objOrCtor.name) { - retval = objOrCtor.name; + ret = objOrCtor.name; } if (objOrCtor.toString) { let arr; @@ -239,10 +263,10 @@ export function getClassName (objOrCtor: any): string { arr = /function\s*(\w+)/.exec(str); } if (arr && arr.length === 2) { - retval = arr[1]; + ret = arr[1]; } } - return retval !== 'Object' ? retval : ''; + return ret !== 'Object' ? ret : ''; } else if (objOrCtor && objOrCtor.constructor) { return getClassName(objOrCtor.constructor); } @@ -250,14 +274,16 @@ export function getClassName (objOrCtor: any): string { } /** - * @en - * Defines a polyfill field for obsoleted codes. - * @zh - * 为废弃代码定义一个填充字段 - * @param object - YourObject or YourClass.prototype - * @param obsoleted - "OldParam" or "YourClass.OldParam" - * @param newExpr - "NewParam" or "YourClass.NewParam" - * @param [writable=false] + * @en Deprecates a property. It will print waring message if the deprecated property is accessed. + * The warning message includes new property name to use. + * @zh 废弃一个属性。如果被废弃属性还在使用的话,会打印警告消息。警告消息包含新的属性名。 + * @param object @en The object or class of the property to deprecate. + * @zh 被废弃属性的对象或者类。 + * @param obsoleted @en The property name to deprecate. It could be a property name or `className.propertyName`. + * @zh 要废弃的属性名。可以直接传属性名或者是 `类名.属性名` 的形式。 + * @param newExpr @en New property name to use. It could be a property name or `className.propertyName`. + * @zh 新的属性名。可以直接传属性名或者是 `类名.属性名` 的形式。 + * @param writable @en Whether the property is writable. Default is false. @zh 该属性是否可写。默认不可写。 */ export function obsolete (object: any, obsoleted: string, newExpr: string, writable?: boolean) { const extractPropName = /([^.]+)$/; @@ -284,14 +310,15 @@ export function obsolete (object: any, obsoleted: string, newExpr: string, writa } /** - * @en - * Defines all polyfill fields for obsoleted codes corresponding to the enumerable properties of props. - * @zh - * 为所有可废弃属性定义填充字段 - * @param obj - YourObject or YourClass.prototype - * @param objName - "YourObject" or "YourClass" - * @param props - * @param [writable=false] + * @en Deprecates some properties. It will print waring message if any deprecated property is accessed. + * The warning message includes new property name to use. + * @zh 废弃一组属性。如果被废弃属性还在使用的话,会打印警告消息。警告消息包含新的属性名。 + * @param obj @en The object or class of these properties to deprecate. + * @zh 被废弃属性的对象或者类。 + * @param objName @en The object name or class name of these properties to deprecate. + * @zh 被废弃属性的对象名或者类名。 + * @param props @en The property names to deprecate. @zh 被废弃的一组属性名。 + * @param writable @en Whether these properties are writable. @zh 被废弃的属性是否可写。 */ export function obsoletes (obj, objName, props, writable) { for (const obsoleted in props) { @@ -307,10 +334,12 @@ const REGEXP_STR = /%s/; * @en * A string tool to construct a string with format string. * @zh - * 通过格式字符串构造一个字符串 - * @param msg - A JavaScript string containing zero or more substitution strings (%s). - * @param subst - JavaScript objects with which to replace substitution strings within msg. - * This gives you additional control over the format of the output. + * 根据格式字符串构造一个字符串。 + * @param msg @en A JavaScript string containing zero or more substitution strings (%s). + * @zh 包含有 0 个或者多个格式符的字符串。 + * @param subst @en JavaScript objects with which to replace substitution strings within msg. + * @zh 替换 `msg` 里格式符的表达式。 + * @returns @en A new formatted string. @zh 格式化后的新字符串。 * @example * ``` * import { js } from 'cc'; @@ -318,7 +347,7 @@ const REGEXP_STR = /%s/; * js.formatStr(a, b, c); * ``` */ -export function formatStr (msg: string, ...subst: any[]) { +export function formatStr (msg: string, ...subst: any[]): string { if (arguments.length === 0) { return ''; } @@ -346,6 +375,11 @@ export function formatStr (msg: string, ...subst: any[]) { } // see https://github.com/petkaantonov/bluebird/issues/1389 +/** + * @en Removes the first argument. @zh 移除第一个参数。 + * @returns @en An Array that contains all arguments except the first one. + * @zh 新的参数数组,该数组不包含第一个参数。 + */ export function shiftArguments () { const len = arguments.length - 1; const args = new Array(len); @@ -357,9 +391,15 @@ export function shiftArguments () { } /** - * Get property descriptor in object and all its ancestors. + * @en Gets a property descriptor by property name of an object or its prototypes. + * @zh 根据属性名从一个对象或者它的原型链中获取属性描述符。 + * @param object @en The object to get property descriptor. @zh 获取描述符的对象。 + * @param propertyName @en The property name to get property descriptor. + * @zh 获取属性描述符的属性名。 + * @returns @en A `PropertyDescriptor` instance or null if not found. + * @zh 属性描述符对象。如果没找到的话,返回 null。 */ -export function getPropertyDescriptor (object: any, propertyName: string) { +export function getPropertyDescriptor (object: any, propertyName: string): PropertyDescriptor | null { while (object) { const pd = Object.getOwnPropertyDescriptor(object, propertyName); if (pd) { @@ -370,13 +410,20 @@ export function getPropertyDescriptor (object: any, propertyName: string) { return null; } -function _copyprop (name: string, source: any, target: any) { +function _copyProp (name: string, source: any, target: any) { const pd = getPropertyDescriptor(source, name); if (pd) { Object.defineProperty(target, name, pd); } } +/** + * @en Copies all properties except those in `excepts` from `source` to `target`. + * @zh 把 `source` 的所有属性,除了那些定义在 `excepts`的属性,拷贝到 `target`。 + * @param source @en Source object to copy from. @zh 拷贝的源对象。 + * @param target @en Target object to copy to. @zh 拷贝到目标对象。 + * @param excepts @en Properties are not copied. @zh 不拷贝到属性。 + */ export function copyAllProperties (source: any, target: any, excepts: Array) { const propertyNames: Array = Object.getOwnPropertyNames(source); for (let i = 0, len = propertyNames.length; i < len; ++i) { @@ -385,18 +432,17 @@ export function copyAllProperties (source: any, target: any, excepts: Array, ...sources: any[]) { object = object || {}; @@ -408,7 +454,7 @@ export function addon (object?: Record, ...sources: any[]) } for (const name in source) { if (!(name in object)) { - _copyprop(name, source, object); + _copyProp(name, source, object); } } } @@ -417,11 +463,12 @@ export function addon (object?: Record, ...sources: any[]) } /** - * @en - * Copy all properties from arguments[1...n] to object. - * @zh - * 拷贝源对象所有属性到目标对象上,如果有属性冲突,则以源对象为准 - * @return The result object. + * @en Copies all the properties in "sources" from "sources" to "object". + * @zh 将 "sources" 中的所有属性从 "sources" 复制到 "object"。 + * @param object @en Object to copy properties to. @zh 拷贝的目标对象。 + * @param sources @en Source objects to copy properties from. @zh 拷贝到源对象数组。 + * @return @en The passing `object` or a new object if passing object is not valid. + * @zh 传入的对象。如果传入的对象无效或者没传入,将返回一个新对象。 */ export function mixin (object?: Record, ...sources: any[]) { object = object || {}; @@ -432,7 +479,7 @@ export function mixin (object?: Record, ...sources: any[]) continue; } for (const name in source) { - _copyprop(name, source, object); + _copyProp(name, source, object); } } } @@ -441,14 +488,12 @@ export function mixin (object?: Record, ...sources: any[]) /** * @en - * Derive the class from the supplied base class. - * Both classes are just native javascript constructors, not created by `Class`, so - * usually you will want to inherit using [[CCClass]] instead. + * Makes a class inherit from the supplied base class. * @zh - * 将一个类型继承另一个类型 - * 两个类型都需要是 javascript 的构建函数,而不是 `Class`, 所以你通常可以用 [[CCClass]] 来代替 - * @param base The baseclass to inherit. - * @return The result class. + * 将一个类型继承另一个类型。 + * @param cls @en The class to inherit. @zh 要继承的类。 + * @param base @en The class to inherit from. @zh 被继承的类。 + * @returns @en Passed in `cls`. @zh 传入的 `cls`。 */ // eslint-disable-next-line @typescript-eslint/ban-types export function extend (cls: Function, base: Function) { @@ -479,15 +524,15 @@ export function extend (cls: Function, base: Function) { } /** - * @en - * Get super class. - * @zh - * 获取父类 - * @param constructor The constructor of subclass. + * @en Get super class. + * @zh 获取父类。 + * @param constructor @en The constructor to get super class. + * @zh 要获取父类的构造函数。 + * @returns @en Super class. @zh 父类。 */ // eslint-disable-next-line @typescript-eslint/ban-types export function getSuper (constructor: Function) { - const proto = constructor.prototype; // binded function do not have prototype + const proto = constructor.prototype; // bound function do not have prototype const dunderProto = proto && Object.getPrototypeOf(proto); // eslint-disable-next-line @typescript-eslint/no-unsafe-return return dunderProto && dunderProto.constructor; @@ -495,12 +540,12 @@ export function getSuper (constructor: Function) { /** * @en - * Checks whether subclass is child of superclass or equals to superclass. - * @zh - * 判断一类型是否是另一类型的子类或本身 - * @param subclass sub class to be checked - * @param superclass super class to be checked - * @return whether subclass is child of superclass + * Checks whether a class is child of another class, or is the same type as another class. + * @zh 判断一类型是否是另一类型的子类或本身。 + * @param subclass @en Sub class to check. @zh 子类类型。 + * @param superclass @en Super class to check. @zh 父类类型。 + * @return @en True if sub class is child of super class, or they are the same type. False else. + * @zh 如果子类类型是父类类型的子类,或者二者是相同类型,那么返回 true,否则返回 false。 */ export function isChildClassOf(subclass: unknown, superclass: T): subclass is T; export function isChildClassOf(subclass: unknown, superclass: unknown): boolean; @@ -533,10 +578,10 @@ export function isChildClassOf (subclass: unknown, superclass: unknown) { } /** - * @en - * Removes all enumerable properties from object. - * @zh - * 移除对象中所有可枚举属性 + * @en Removes all enumerable properties from a object. + * @zh 移除对象中所有可枚举属性. + * @param object @en The object to remove enumerable properties from. + * @zh 要删除可枚举属性的对象。 */ export function clear (object: Record) { for (const key of Object.keys(object)) { @@ -603,13 +648,10 @@ export const _setClassId = setup('__cid__', _idToClass, false); const doSetClassName = setup('__classname__', _nameToClass, true); /** - * @en - * Register the class by specified name manually - * @zh - * 通过指定的名称手动注册类型 - * @method setClassName - * @param className - * @param constructor + * @en Registers a class by specified name manually. + * @zh 通过指定的名称手动注册类型 + * @param className @en Class name to register. @zh 注册的类名。 + * @param constructor @en Constructor to register. @zh 注册的构造函数。 */ export function setClassName (className: string, constructor: Constructor) { doSetClassName(className, constructor); @@ -624,17 +666,16 @@ export function setClassName (className: string, constructor: Constructor) { } /** - * @en Set an alias name for class. - * If `setClassAlias(target, alias)`, `alias` will be a single way short cut for class `target`. - * If you try `js.getClassByName(alias)`, you will get target. - * But `js.getClassName(target)` will return the original name of `target`, not the alias. - * @zh 为类设置别名。 - * 当 `setClassAlias(target, alias)` 后, - * `alias` 将作为类 `target`的“单向 ID” 和“单向名称”。 - * 因此,`getClassById(alias)` 和 `getClassByName(alias)` 都会得到 `target`。 - * 这种映射是单向的,意味着 `getClassName(target)` 和 `getClassId(target)` 将不会是 `alias`。 - * @param target Constructor of target class. - * @param alias Alias to set. The name shall not have been set as class name or alias of another class. + * @en Sets an alias for a class. + * After executing `setClassAlias(target, alias)`, `alias` will be a single way short cut for class `target`. + * `js.getClassByName(alias)` and `getClassById(alias)` will return `target`. But `js.getClassName(target)` + * will return the original class name of `target`, not the alias. + * @zh 为类设置别名。执行 `setClassAlias(target, alias)` 后,`alias` 将作为类 `target` 的 “单向 ID” 和 “单向名称”。 + * 因此,`getClassById(alias)` 和 `getClassByName(alias)` 都会得到 `target`。这种映射是单向的,这意味着 `getClassName(target)` + * 和 `getClassId(target)` 将不会返回 `alias`。 + * @param target @en Constructor of a class to set an alias. @zh 设置别名的类的构造函数。 + * @param alias @en Alias to set. The name shall not have been set as class name or alias of another class. + * @zh 类的别名。别名不能重复,也不能是已有类的名字。 */ export function setClassAlias (target: Constructor, alias: string) { const nameRegistry = _nameToClass[alias]; @@ -662,15 +703,14 @@ export function setClassAlias (target: Constructor, alias: string) { /** * @en - * Unregister a class from cocos. - * - * If you dont need a registered class anymore, you should unregister the class so that cocos will not keep its reference anymore. - * Please note that its still your responsibility to free other references to the class. + * Unregister some classes from engine. + * If you don't need a registered class anymore, you should unregister the class or engine will keep its reference. + * Please note that it‘s your responsibility to remove other references to the class. * @zh - * 取消注册类型,如果你不再需要一个注册的类,你应该取消注册这个类,这样 cocos 就不会再保留它的引用。 - * 请注意,你仍然有责任释放对该类的其他引用。 + * 取消注册类型。如果你不再需要一个注册的类,你应该取消注册这个类,否则引擎会还有对它的引用。 + * 请注意,你仍然有责任释放其他地方对该类的引用。 * - * @param ...constructor - the class you will want to unregister, any number of classes can be added + * @param ...constructor @en The classes to unregister. @zh 取消注册的类型列表。 */ // eslint-disable-next-line @typescript-eslint/ban-types export function unregisterClass (...constructors: Function[]) { @@ -696,25 +736,22 @@ export function unregisterClass (...constructors: Function[]) { } /** - * @en - * Get the registered class by id - * @zh - * 通过 id 获取已注册的类型 - * @param classId + * @en Gets a registered class by id. + * @zh 通过 id 获取已注册的类型。 + * @param classId @en An id to get class. * @return constructor * @deprecated since v3.5.0, this is an engine private interface that will be removed in the future. + * Please use `getClassById()` instead. */ export function _getClassById (classId) { return getClassById(classId); } /** - * @en - * Get the registered class by id - * @zh - * 通过 id 获取已注册的类型 - * @param classId - * @return constructor + * @en Gets the registered class by id. + * @zh 通过 id 获取已注册的类型。 + * @param classId @en The class id used to get class. @zh 获取类的 id。 + * @returns @en The constructor of the registered class. @zh 注册的类构造函数。 */ export function getClassById (classId) { return _idToClass[classId]; @@ -722,11 +759,11 @@ export function getClassById (classId) { /** * @en - * Get the registered class by name + * Gets the registered class by class name. * @zh - * 通过名字获取已注册的类型 - * @param classname - * @return constructor of the class + * 通过类名获取已注册的类型。 + * @param classname @en The class name used to get class. @zh 获取类的类名。 + * @returns @en The constructor of the registered class. @zh 注册的类构造函数。 */ export function getClassByName (classname) { return _nameToClass[classname]; @@ -740,7 +777,8 @@ export function getClassByName (classname) { * @param obj - instance or constructor * @param [allowTempId = true] - can return temp id in editor * @return - * @deprecated since v3.5.0, this is an engine private interface that will be removed in the future. + * @deprecated since v3.5.0. this is an engine private interface that will be removed in the future. + * Please use `getClassId()` instead. */ export function _getClassId (obj, allowTempId?: boolean) { return getClassId(obj, allowTempId); @@ -748,12 +786,14 @@ export function _getClassId (obj, allowTempId?: boolean) { /** * @en - * Get class id of the object + * Gets class id of an object * @zh - * 获取对象的 class id - * @param obj - instance or constructor - * @param [allowTempId = true] - can return temp id in editor - * @return + * 获取对象的 class id。 + * @param obj @en An object instance to get class id. @zh 获取类标识的对象。 + * @param allowTempId @en Whether allow to return a temple class id in editor. + * @zh 在编辑器时,是否允许返回一个临时的类标识。 + * @returns @en Class id if found, empty string else. + * @zh 找到的类标识。如果没找到的话,返回空字符串。 */ export function getClassId (obj, allowTempId?: boolean) { allowTempId = (typeof allowTempId !== 'undefined' ? allowTempId : true); diff --git a/cocos/core/utils/js.ts b/cocos/core/utils/js.ts index 7a7894afd4..54bb8b977f 100644 --- a/cocos/core/utils/js.ts +++ b/cocos/core/utils/js.ts @@ -2,16 +2,16 @@ Copyright (c) 2008-2010 Ricardo Quesada Copyright (c) 2011-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. diff --git a/cocos/core/utils/jsb-utils.ts b/cocos/core/utils/jsb-utils.ts index 1c13624be0..29724ea0fc 100644 --- a/cocos/core/utils/jsb-utils.ts +++ b/cocos/core/utils/jsb-utils.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import type { Node } from '../../scene-graph'; // export interface IArrayProxy { diff --git a/cocos/core/utils/misc.ts b/cocos/core/utils/misc.ts index 31bdf6d601..7648639fdd 100644 --- a/cocos/core/utils/misc.ts +++ b/cocos/core/utils/misc.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -26,7 +25,7 @@ /* eslint-disable no-new-func */ -import { EDITOR, DEV } from 'internal:constants'; +import { DEV } from 'internal:constants'; import { getClassName, getset, isEmptyObject } from './js'; import { legacyCC } from '../global-exports'; import { warnID } from '../platform/debug'; @@ -35,7 +34,7 @@ import { macro } from '../platform/macro'; export const BUILTIN_CLASSID_RE = /^(?:cc|dragonBones|sp|ccsg)\..+/; const BASE64_KEYS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; -const values:number[] = new Array(123); // max char code in base64Keys +const values: number[] = new Array(123); // max char code in base64Keys for (let i = 0; i < 123; ++i) { values[i] = 64; } // fill with placeholder('=') index for (let i = 0; i < 64; ++i) { values[BASE64_KEYS.charCodeAt(i)] = i; } @@ -43,10 +42,13 @@ for (let i = 0; i < 64; ++i) { values[BASE64_KEYS.charCodeAt(i)] = i; } export const BASE64_VALUES = values; /** + * @en Defines properties for a class, or replaces getter, setter of existing properties. + * @param ctor @en Class to modify. + * @param sameNameGetSets @en Getters and setters of properties. The getter and setter + * have the same name. So a property getter and setter occupy one position in `sameNameGetSets`. + * @param diffNameGetSets @en Getters and setters of properties. The getter and setter + * have different names. So a property getter and setter occupy two positions in `diffNameGetSets`. * @engineInternal - * @param ctor - * @param sameNameGetSets - * @param diffNameGetSets */ export function propertyDefine (ctor, sameNameGetSets, diffNameGetSets) { function define (np, propName, getter, setter) { @@ -78,7 +80,15 @@ export function propertyDefine (ctor, sameNameGetSets, diffNameGetSets) { } } -// set value to map, if key exists, push to array +/** + * @en Inserts a new element into a map. All values corresponding to the same key are stored in an array. + * @zh 往 map 插入一个元素。同一个关键字对应的所有值存储在一个数组里。 + * @param map @en The map to insert element. @zh 插入元素的 map。 + * @param key @en The key of new element. @zh 新插入元素的关键字。 + * @param value @en The value of new element. @zh 新插入元素的值。 + * @param pushFront @en Whether to put new value in front of the vector if key exists. + * @zh 如果关键字已经存在,是否把新插入的值放到数组第一个位置。 + */ export function pushToMap (map, key, value, pushFront) { const exists = map[key]; if (exists) { @@ -97,6 +107,15 @@ export function pushToMap (map, key, value, pushFront) { } } +/** + * @en Checks whether a node is a descendant of a given node, that is the node itself, one of its direct + * children (childNodes), one of the children's direct children, and so on. + * @zh 检查节点是否是一个给定的节点的后代,即节点本身、它的一个直接子节点(childNodes)、该子节点的一个直接子节点,依此类推。 + * @param refNode @en The node to check. @zh 检查的节点。 + * @param otherNode @en The node to test with. @zh 用来测试的节点。 + * @returns @en True if otherNode is contained in refNode, false if not. + * @zh 如果 refNode 包含 otherNode,返回 true;否则返回 false。 + */ export function contains (refNode, otherNode) { if (typeof refNode.contains === 'function') { return refNode.contains(otherNode) as boolean; @@ -117,19 +136,31 @@ export function contains (refNode, otherNode) { } } -export function isDomNode (obj) { +/** + * @en Checks whether a node is a DOM node. @zh 检查一个节点是否是一个 DOM 节点。 + * @param node @en The node the check. @zh 被检查节点。 + * @returns @en True if node is a DOM node, false else. + * @zh 如果 DOM 节点,返回 true;否则返回 false。 + */ +export function isDomNode (node) { if (typeof window === 'object' && typeof Node === 'function') { // If "TypeError: Right-hand side of 'instanceof' is not callback" is thrown, // it should because window.Node was overwritten. - return obj instanceof Node; + return node instanceof Node; } else { - return !!obj - && typeof obj === 'object' - && typeof obj.nodeType === 'number' - && typeof obj.nodeName === 'string'; + return !!node + && typeof node === 'object' + && typeof node.nodeType === 'number' + && typeof node.nodeName === 'string'; } } +/** + * @en Invoke a function in next frame. @zh 在下一帧执行传入的函数。 + * @param callback @en The function to be invoked next frame. @zh 下一帧要执行的函数。 + * @param p1 @en The first parameter passed to `callback`. @zh 传给回调函数的第一个参数。 + * @param p2 @en The seconde parameter passed to `callback`. @zh 传给回调函数的第二个参数。 + */ export function callInNextTick (callback, p1?: any, p2?: any) { if (callback) { setTimeout(() => { @@ -139,6 +170,14 @@ export function callInNextTick (callback, p1?: any, p2?: any) { } // use anonymous function here to ensure it will not being hoisted without EDITOR +/** + * @en Create a new function that will invoke `functionName` with try catch. + * @zh 创建一个新函数,该函数会使用 try catch 机制调用 `functionName`. + * @param funcName @en The function name to be invoked with try catch. + * @zh 被 try catch 包裹的函数名。 + * @returns @en A new function that will invoke `functionName` with try catch. + * @zh 使用 try catch 机制调用 `functionName` 的新函数. + */ export function tryCatchFunctor_EDITOR (funcName) { // eslint-disable-next-line @typescript-eslint/no-implied-eval return Function('target', @@ -150,6 +189,13 @@ export function tryCatchFunctor_EDITOR (funcName) { + `}`); } +/** + * @en Checks whether an object is an empty object. + * @zh 检查一个对象是否为空对象。 + * @param obj @en The object to check. @zh 要检查的对象。 + * @returns @en True if it is an empty object. False if it is not an empty object, not Object type, null or undefined. + * @ 如果是空对象,返回 true。如果不是空对象,不是Object类型,空或未定义,则为假。 + */ export function isPlainEmptyObj_DEV (obj) { if (!obj || obj.constructor !== Object) { return false; @@ -158,18 +204,18 @@ export function isPlainEmptyObj_DEV (obj) { } /** - * @en Clamp a value between from and to.
- * if the original value is larger than max_inclusive, return max_inclusive.
- * if the original value is smaller than min_inclusive, return min_inclusive.
- * else return the original value. + * @en Clamps a value between a min and a max value.
+ * If the original value is greater than max_inclusive, returns max_inclusive.
+ * If the original value is less than min_inclusive, returns min_inclusive.
+ * Else returns the original value. * @zh 限定浮点数的最大最小值。
- * 数值大于 max_inclusive 则返回 max_inclusive。
- * 数值小于 min_inclusive 则返回 min_inclusive。
+ * 如果数值大于 max_inclusive 则返回 max_inclusive。
+ * 如果数值小于 min_inclusive 则返回 min_inclusive。
* 否则返回自身。 - * @param value @en Original value @zh 初始值 - * @param min_inclusive @en Minimum value in between @zh 最小值 - * @param max_inclusive @en Maximum value in between @zh 最大值 - * @return {Number} @en The value clamped @zh 目标值 + * @param value @en Original value. @zh 初始值。 + * @param min_inclusive @en Minimum value in range. @zh 最小值。 + * @param max_inclusive @en Maximum value in range. @zh 最大值。 + * @returns @en The clamped value. @zh 目标值。 * @example * var v1 = clampf(20, 0, 20); // 20; * var v2 = clampf(-1, 0, 20); // 0; @@ -185,20 +231,20 @@ export function clampf (value: number, min_inclusive: number, max_inclusive: num } /** - * @en converts degrees to radians - * @zh 角度转弧度 - * @param angle @en The degree to convert @zh 角度 - * @return {Number} The radian. @zh 弧度 + * @en Converts degree to radian. + * @zh 将度数转换为弧度。 + * @param angle @en The degree to convert. @zh 角度。 + * @returns @en The radian. @zh 弧度。 */ export function degreesToRadians (angle: number) { return angle * macro.RAD; } /** - * @en converts radians to degrees - * @zh 弧度转角度 - * @param angle @en The radian to convert @zh 弧度 - * @return {Number} @en The degree @zh 角度 + * @en Converts radian to degree. + * @zh 将弧度转换为角度。 + * @param angle @en The radian to convert. @zh 弧度。 + * @returns @en The degree. @zh 角度。 */ export function radiansToDegrees (angle) { return angle * macro.DEG; diff --git a/cocos/core/utils/mutable-forward-iterator.ts b/cocos/core/utils/mutable-forward-iterator.ts index c47c189855..0201f8e7f0 100644 --- a/cocos/core/utils/mutable-forward-iterator.ts +++ b/cocos/core/utils/mutable-forward-iterator.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/core/utils/path.ts b/cocos/core/utils/path.ts index cdc452d327..964a33d021 100644 --- a/cocos/core/utils/path.ts +++ b/cocos/core/utils/path.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -32,11 +31,13 @@ const DIRNAME_RE = /((.*)(\/|\\|\\\\))?(.*?\..*$)?/; const NORMALIZE_RE = /[^\.\/]+\/\.\.\//; /** - * @en Join strings to be a path. + * @en Joins strings to be a path. * @zh 拼接字符串为路径。 + * @param segments @en Strings to be joined. @zh 被拼接的字符串数组。 + * @returns @en The final path. @zh 拼接后的路径。 * @example {@link cocos/core/utils/CCPath/join.js} */ -export function join (...segments: string[]) { +export function join (...segments: string[]): string { let result = ''; for (const segment of segments) { result = (result + (result === '' ? '' : '/') + segment).replace(/(\/|\\\\)$/, ''); @@ -45,21 +46,23 @@ export function join (...segments: string[]) { } /** - * @en Get the ext name of a path including '.', like '.png'. + * @en Gets the extension name of a path including '.', like '.png'. * @zh 返回 Path 的扩展名,包括 '.',例如 '.png'。 + * @param path @en A file path. @zh 文件路径。 + * @returns @en The extension name. @zh 扩展名。 * @example {@link cocos/core/utils/CCPath/extname.js} */ -export function extname (path: string) { +export function extname (path: string): string { const temp = EXTNAME_RE.exec(path); return temp ? temp[1] : ''; } /** - * @en Get the main name of a file name. + * @en Gets the main name of a file name, exclude extension name. * @zh 获取文件名的主名称。 * @deprecated */ -export function mainFileName (fileName: string) { +export function mainFileName (fileName: string): string { if (fileName) { const idx = fileName.lastIndexOf('.'); if (idx !== -1) { @@ -70,8 +73,11 @@ export function mainFileName (fileName: string) { } /** - * @en Get the file name of a file path. - * @zh 获取文件路径的文件名。 + * @en Gets the file name of a file path, exclude extension name and directory name. + * @zh 获取文件路径的文件名,不包含扩展名和目录名。 + * @param path @en A file path. @zh 文件路径。 + * @param extName @en File extension name. @zh 文件扩展名。 + * @returns @en The file name. @zh 文件名。 * @example {@link cocos/core/utils/CCPath/basename.js} */ export function basename (path: string, extName?: string) { @@ -92,21 +98,26 @@ export function basename (path: string, extName?: string) { } /** - * @en Get dirname of a file path. + * @en Gets directory name of a file path. * @zh 获取文件路径的目录名。 + * @param path @en A file path. @zh 文件路径。 + * @returns @en Directory name. @zh 文件目录名。 * @example {@link cocos/core/utils/CCPath/dirname.js} */ -export function dirname (path: string) { +export function dirname (path: string): string { const temp = DIRNAME_RE.exec(path); return temp ? temp[2] : ''; } /** - * @en Change extname of a file path. - * @zh 更改文件路径的扩展名。 + * @en Changes file extension name. + * @zh 更改文件的扩展名。 + * @param path @en A file path. @zh 文件路径。 + * @param extName @en New file extension name. @zh 新文件扩展名。 + * @returns @en New file path. @zh 新的文件路径。 * @example {@link cocos/core/utils/CCPath/changeExtname.js} */ -export function changeExtname (path: string, extName?: string) { +export function changeExtname (path: string, extName?: string): string { extName = extName || ''; let index = path.indexOf('?'); let tempStr = ''; @@ -122,24 +133,28 @@ export function changeExtname (path: string, extName?: string) { } /** - * @en Change file name of a file path. + * @en Changes file name of a file path. * @zh 更改文件路径的文件名。 + * @param path @en A file path. @zh 文件路径。 + * @param newBaseName @en New file name. @zh 新文件名。 + * @param keepExt @en Whether to keep extension name. @zh 是否保留扩展名。 + * @returns @en New file path. @zh 新文件路径。 * @example {@link cocos/core/utils/CCPath/changeBasename.js} */ -export function changeBasename (path: string, baseName: string, isSameExt?: boolean) { - if (baseName.indexOf('.') === 0) { - return changeExtname(path, baseName); +export function changeBasename (path: string, newBaseName: string, keepExt?: boolean): string { + if (newBaseName.indexOf('.') === 0) { + return changeExtname(path, newBaseName); } let index = path.indexOf('?'); let tempStr = ''; - const ext = isSameExt ? extname(path) : ''; + const ext = keepExt ? extname(path) : ''; if (index > 0) { tempStr = path.substring(index); path = path.substring(0, index); } index = path.lastIndexOf('/'); index = index <= 0 ? 0 : index + 1; - return path.substring(0, index) + baseName + ext + tempStr; + return path.substring(0, index) + newBaseName + ext + tempStr; } // todo make public after verification @@ -154,10 +169,23 @@ export function _normalize (url) { return url; } +/** + * @en Removes the last path separator('/' or '\') of a path if exist. + * @zh 如果存在的话,删除文件路径的最后一个分隔符('/' 或者 '\')。 + * @param path @en A file path to modify. @zh 要修改的文件路径。 + * @returns @en A new file path without last file separator. + * @zh 路径最后分隔符的新路径。 + */ export function stripSep (path: string) { return path.replace(/[\/\\]$/, ''); } +/** + * @en Gets file separator for different platforms. It is `/` on unix like platforms, + * and `\` on windows. + * @zh 获取不同平台的文件分割符。类 unix 系统是 `/`,windows 系统是 `\`。 + * @returns @en File separator. @zh 文件分割符。 + */ export function getSeperator () { return systemInfo.os === OS.WINDOWS ? '\\' : '/'; } diff --git a/cocos/core/utils/pool.ts b/cocos/core/utils/pool.ts index ad5446bdc7..a0c8d71df4 100644 --- a/cocos/core/utils/pool.ts +++ b/cocos/core/utils/pool.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2018-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2018-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -28,8 +27,8 @@ type CleanUpFunction = (value: T) => boolean | void; /** * @en * A fixed-length object pool designed for general type.
- * The implementation of this object pool is very simple, - * it can helps you to improve your game performance for objects which need frequent release and recreate operations
+ * The implementation of this object pool is very simple. + * It can help you to improve your game performance for objects which need frequent release and recreate operations.
* @zh * 长度固定的对象缓存池,可以用来缓存各种对象类型。
* 这个对象池的实现非常精简,它可以帮助您提高游戏性能,适用于优化对象的反复创建和销毁。 @@ -80,7 +79,7 @@ type CleanUpFunction = (value: T) => boolean | void; export class Pool { /** * @en - * The current number of available objects, the default is 0, it will gradually increase with the recycle of the object, + * The current number of available objects, the default is 0. It will gradually increase with the recycle of the object, * the maximum will not exceed the size specified when the constructor is called. * @zh * 当前可用对象数量,一开始默认是 0,随着对象的回收会逐渐增大,最大不会超过调用构造函数时指定的 size。 @@ -90,12 +89,12 @@ export class Pool { /** * @en - * Get and initialize an object from pool. This method defaults to null and requires the user to implement it. - * @zh - * 获取并初始化对象池中的对象。这个方法默认为空,需要用户自己实现。 - * @param args - parameters to used to initialize the object + * Gets an object from pool. + * @zh 从对象池中获取一个对象。 + * @returns @en An object or null if this pool doesn't contain any object. + * @zh 获取的对象。如果对象池中没有对象,返回 null。 */ - public get () { + public get (): T | null { return this._get(); } @@ -103,23 +102,26 @@ export class Pool { private _cleanup: CleanUpFunction | null; /** - * 使用构造函数来创建一个指定对象类型的对象池,您可以传递一个回调函数,用于处理对象回收时的清理逻辑。 - * @method constructor - * @param {Function} [cleanupFunc] - the callback method used to process the cleanup logic when the object is recycled. - * @param {Object} cleanupFunc.obj - * @param {Number} size - initializes the length of the array + * @en Constructor. @zh 构造函数。 + * @param cleanupFunc @en Callback method used to process the cleanup logic when the object is recycled. + * @zh 当对象放入对象池时,用来执行清理逻辑的回调函数。 + * @param size @en Pool size. @zh 对象池大小。 */ constructor (cleanup: CleanUpFunction, size: number); /** - * 使用构造函数来创建一个指定对象类型的对象池,您可以传递一个回调函数,用于处理对象回收时的清理逻辑。 - * @method constructor - * @param {Function} [cleanupFunc] - the callback method used to process the cleanup logic when the object is recycled. - * @param {Object} cleanupFunc.obj - * @param {Number} size - initializes the length of the array + * @en Constructor. @zh 构造函数。 + * @param size @en Pool size. @zh 对象池大小。 */ constructor (size: number); + /** + * @en Constructor. @zh 构造函数。 + * @param _0 @en If it is a number, it is the array size. Or it is a callback function used to process + * the cleanup logic when the object is recycled. + * @zh 如果是 number,那么它是对象池大小。否则是当对象放入对象池时,用来执行清理逻辑的回调函数。 + * @param _1 @en Array size if it is a valid number. @zh 如果是个有效的 number 类型,那么是对象池大小。 + */ constructor (_0: CleanUpFunction | number, _1?: number) { const size = (_1 === undefined) ? (_0 as number) : _1; const cleanupFunc = (_1 === undefined) ? null : (_0 as CleanUpFunction); @@ -130,10 +132,10 @@ export class Pool { /** * @en - * Get an object from pool, if no available object in the pool, null will be returned. - * @zh - * 获取对象池中的对象,如果对象池没有可用对象,则返回空。 - * + * Gets an object from pool. + * @zh 从对象池中获取一个对象。 + * @returns @en An object or null if this pool doesn't contain any object. + * @zh 获取的对象。如果对象池中没有对象,返回 null。 * @deprecated since v3.5.0, this is an engine private interface that will be removed in the future. */ public _get () { @@ -164,6 +166,8 @@ export class Pool { /** * @en Resize the pool. * @zh 设置对象池容量。 + * @param length @en New pool size. + * @zh 新对象池大小。 */ public resize (length: number) { if (length >= 0) { diff --git a/cocos/core/utils/x-deprecated.ts b/cocos/core/utils/x-deprecated.ts index 1f06c27e87..91f37e3452 100644 --- a/cocos/core/utils/x-deprecated.ts +++ b/cocos/core/utils/x-deprecated.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ /* eslint-disable @typescript-eslint/ban-types */ /* eslint-disable import/no-mutable-exports */ @@ -43,41 +42,41 @@ export function setDefaultLogTimes (times: number): void { } interface IReplacement { - /** 废弃属性的名称 */ + /** Deprecated property name. */ name: string; - /** 警告的次数 */ + /** Times to print log when accessing deprecated property. */ logTimes?: number; - /** 替换属性的名称 */ + /** New property name. */ newName?: string; - /** 废弃属性的所属对象 */ + /** The object to deprecate this property. */ target?: object; - /** 废弃属性的所属对象的名称 */ + /** The name of the object to deprecate this property. */ targetName?: string; - /** 自定义替换属性(函数) */ + /** New function to access the property. If it is valid, `customSetter` and `customGetter` will be ignored. */ customFunction?: Function; - /** 自定义替换属性的 setter */ + /** New setter. */ customSetter?: (v: any) => void; - /** 自定义替换属性的 getter */ + /** New getter. */ customGetter?: () => any; - /** 额外建议 */ + /** Property description used in warning log. */ suggest?: string; } interface IRemoveItem { - /** 废弃属性的名称 */ + /** Removed property name. */ name: string; - /** 警告的次数 */ + /** Times to print log when accessing removed property. */ logTimes?: number; - /** 额外建议 */ + /** Property description used in warning log. */ suggest?: string; } interface IMarkItem { - /** 废弃属性的名称 */ + /** Deprecated property name. */ name: string; - /** 警告的次数 */ + /** Times to print log when accessing deprecated property. */ logTimes?: number; - /** 额外建议 */ + /** Property description used in warning log. */ suggest?: string; } diff --git a/cocos/core/value-types/bitmask.ts b/cocos/core/value-types/bitmask.ts index acacd57a41..0aacda28e9 100644 --- a/cocos/core/value-types/bitmask.ts +++ b/cocos/core/value-types/bitmask.ts @@ -1,26 +1,25 @@ /* - Copyright (c) 2019-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. */ import { EDITOR, TEST } from 'internal:constants'; diff --git a/cocos/core/value-types/enum.ts b/cocos/core/value-types/enum.ts index 56c898ffb6..bc5740f474 100644 --- a/cocos/core/value-types/enum.ts +++ b/cocos/core/value-types/enum.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/core/value-types/index.ts b/cocos/core/value-types/index.ts index 364cfe807f..da711f4d2c 100644 --- a/cocos/core/value-types/index.ts +++ b/cocos/core/value-types/index.ts @@ -1,27 +1,26 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. */ export { BitMask } from './bitmask'; diff --git a/cocos/core/value-types/value-type.ts b/cocos/core/value-types/value-type.ts index 530002a576..93b023626f 100644 --- a/cocos/core/value-types/value-type.ts +++ b/cocos/core/value-types/value-type.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/deprecated.ts b/cocos/deprecated.ts index 969a35e44c..6305541615 100644 --- a/cocos/deprecated.ts +++ b/cocos/deprecated.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/dragon-bones/ArmatureCache.ts b/cocos/dragon-bones/ArmatureCache.ts index d2ebd5147a..f01780663f 100644 --- a/cocos/dragon-bones/ArmatureCache.ts +++ b/cocos/dragon-bones/ArmatureCache.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Armature, BlendMode, Matrix } from '@cocos/dragonbones-js'; import { Texture2D } from '../asset/assets'; diff --git a/cocos/dragon-bones/ArmatureDisplay.ts b/cocos/dragon-bones/ArmatureDisplay.ts index f8158b4764..e4430c016f 100644 --- a/cocos/dragon-bones/ArmatureDisplay.ts +++ b/cocos/dragon-bones/ArmatureDisplay.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { EDITOR } from 'internal:constants'; import { Armature, Bone, EventObject } from '@cocos/dragonbones-js'; diff --git a/cocos/dragon-bones/ArmatureSystem.ts b/cocos/dragon-bones/ArmatureSystem.ts index 884f69478e..5d1c85b815 100644 --- a/cocos/dragon-bones/ArmatureSystem.ts +++ b/cocos/dragon-bones/ArmatureSystem.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { director } from '../game/director'; import { System, cclegacy } from '../core'; diff --git a/cocos/dragon-bones/AttachUtil.ts b/cocos/dragon-bones/AttachUtil.ts index 718fac45d4..f442c533f1 100644 --- a/cocos/dragon-bones/AttachUtil.ts +++ b/cocos/dragon-bones/AttachUtil.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Armature, Matrix } from '@cocos/dragonbones-js'; import { Mat4, Vec3, _decorator } from '../core'; diff --git a/cocos/dragon-bones/CCArmatureDisplay.ts b/cocos/dragon-bones/CCArmatureDisplay.ts index a5f86a9a74..58e05a409a 100644 --- a/cocos/dragon-bones/CCArmatureDisplay.ts +++ b/cocos/dragon-bones/CCArmatureDisplay.ts @@ -1,19 +1,18 @@ /* eslint-disable @typescript-eslint/no-unsafe-return */ /* - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -22,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Armature, DisplayData, IEventDispatcher, Slot } from '@cocos/dragonbones-js'; import { Vec3, EventTarget, _decorator } from '../core'; diff --git a/cocos/dragon-bones/CCFactory.ts b/cocos/dragon-bones/CCFactory.ts index b1a837370b..8dd3e0ed99 100644 --- a/cocos/dragon-bones/CCFactory.ts +++ b/cocos/dragon-bones/CCFactory.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { EDITOR } from 'internal:constants'; import { Armature, BaseObject, Animation, BaseFactory, DragonBones } from '@cocos/dragonbones-js'; diff --git a/cocos/dragon-bones/CCSlot.ts b/cocos/dragon-bones/CCSlot.ts index 15f90108c3..1451ed8ad7 100644 --- a/cocos/dragon-bones/CCSlot.ts +++ b/cocos/dragon-bones/CCSlot.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { BoneType, BinaryOffset, Slot } from '@cocos/dragonbones-js'; import { Texture2D } from '../asset/assets'; diff --git a/cocos/dragon-bones/CCTextureData.ts b/cocos/dragon-bones/CCTextureData.ts index 36160a51f6..a0656ff938 100644 --- a/cocos/dragon-bones/CCTextureData.ts +++ b/cocos/dragon-bones/CCTextureData.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { BaseObject, TextureAtlasData, TextureData } from '@cocos/dragonbones-js'; import { SpriteFrame } from '../2d'; diff --git a/cocos/dragon-bones/DragonBonesAsset.ts b/cocos/dragon-bones/DragonBonesAsset.ts index 78bd2c6ece..d322fd1e6a 100644 --- a/cocos/dragon-bones/DragonBonesAsset.ts +++ b/cocos/dragon-bones/DragonBonesAsset.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { EDITOR } from 'internal:constants'; import { Asset } from '../asset/assets'; diff --git a/cocos/dragon-bones/DragonBonesAtlasAsset.ts b/cocos/dragon-bones/DragonBonesAtlasAsset.ts index 3bfa770cee..317963abfd 100644 --- a/cocos/dragon-bones/DragonBonesAtlasAsset.ts +++ b/cocos/dragon-bones/DragonBonesAtlasAsset.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { JSB } from 'internal:constants'; import { TextureAtlasData } from '@cocos/dragonbones-js'; diff --git a/cocos/dragon-bones/assembler/index.ts b/cocos/dragon-bones/assembler/index.ts index 63e7c389e6..e95cf8f67e 100644 --- a/cocos/dragon-bones/assembler/index.ts +++ b/cocos/dragon-bones/assembler/index.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { IAssemblerManager } from '../../2d/renderer/base'; diff --git a/cocos/dragon-bones/assembler/simple.ts b/cocos/dragon-bones/assembler/simple.ts index 56d016a3a3..f18e141cf5 100644 --- a/cocos/dragon-bones/assembler/simple.ts +++ b/cocos/dragon-bones/assembler/simple.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Armature, BlendMode } from '@cocos/dragonbones-js'; import { Color, Mat4, Vec3, cclegacy } from '../../core'; diff --git a/cocos/dragon-bones/index.jsb.ts b/cocos/dragon-bones/index.jsb.ts index 193e2a6dfc..688db1b528 100644 --- a/cocos/dragon-bones/index.jsb.ts +++ b/cocos/dragon-bones/index.jsb.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ export enum ExtensionType { FFD = 0, @@ -53,8 +52,7 @@ export * from './ArmatureDisplay'; export * from './AttachUtil'; export * from './assembler'; -declare const window: any; -const dragonBones = window.dragonBones; +const dragonBones = globalThis.dragonBones; export const Slot = dragonBones.Slot; export const Matrix = dragonBones.Matrix; diff --git a/cocos/dragon-bones/index.ts b/cocos/dragon-bones/index.ts index ebc7f7751d..e2ac430f9a 100644 --- a/cocos/dragon-bones/index.ts +++ b/cocos/dragon-bones/index.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ export enum ExtensionType { FFD = 0, diff --git a/cocos/game/deprecated.ts b/cocos/game/deprecated.ts index 24ad1fb566..be18b48f9b 100644 --- a/cocos/game/deprecated.ts +++ b/cocos/game/deprecated.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { removeProperty, markAsWarning, replaceProperty } from '../core/utils/x-deprecated'; import { Director, director } from './director'; diff --git a/cocos/game/director.ts b/cocos/game/director.ts index 74977a2dea..58db1a5051 100644 --- a/cocos/game/director.ts +++ b/cocos/game/director.ts @@ -2,16 +2,16 @@ Copyright (c) 2008-2010 Ricardo Quesada Copyright (c) 2011-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. diff --git a/cocos/game/game.ts b/cocos/game/game.ts index 7b07a502cd..3a69606cdd 100644 --- a/cocos/game/game.ts +++ b/cocos/game/game.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -43,8 +42,6 @@ import { IBundleOptions } from '../asset/asset-manager/shared'; import { ICustomJointTextureLayout } from '../3d/skeletal-animation/skeletal-animation-utils'; import { IPhysicsConfig } from '../physics/framework/physics-config'; import { effectSettings } from '../core/effect-settings'; -import { audioManager } from '../audio/audio-manager'; - /** * @zh * 游戏配置。 @@ -194,10 +191,9 @@ export class Game extends EventTarget { * 在原生平台,它对应的是应用被切换到后台事件,下拉菜单和上拉状态栏等不一定会触发这个事件,这取决于系统行为。 * @example * ```ts - * import { game, audioEngine } from 'cc'; + * import { game } from 'cc'; * game.on(Game.EVENT_HIDE, function () { - * audioEngine.pauseMusic(); - * audioEngine.pauseAllEffects(); + * * }); * ``` */ @@ -292,6 +288,25 @@ export class Game extends EventTarget { */ public static readonly EVENT_RESTART = 'game_on_restart'; + /** + * @en Triggered when the game is paused.
+ * @zh 游戏暂停时触发该事件。
+ * @example + * ```ts + * import { game } from 'cc'; + * game.on(Game.EVENT_PAUSE, function () { + * //pause audio or video + * }); + * ``` + */ + public static readonly EVENT_PAUSE = 'game_on_pause'; + + /** + * @en Triggered when the game is resumed.
+ * @zh 游戏恢复时触发该事件。
+ */ + public static readonly EVENT_RESUME = 'game_on_resume'; + /** * @en Web Canvas 2d API as renderer backend. * @zh 使用 Web Canvas 2d API 作为渲染器后端。 @@ -560,7 +575,7 @@ export class Game extends EventTarget { if (this._paused) { return; } this._paused = true; this._pacer?.stop(); - audioManager.pause(); + this.emit(Game.EVENT_PAUSE); } /** @@ -574,7 +589,7 @@ export class Game extends EventTarget { input._clearEvents(); this._paused = false; this._pacer?.start(); - audioManager.resume(); + this.emit(Game.EVENT_RESUME); } /** diff --git a/cocos/game/index.ts b/cocos/game/index.ts index af2dcd186c..900b133793 100644 --- a/cocos/game/index.ts +++ b/cocos/game/index.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/game/splash-screen.ts b/cocos/game/splash-screen.ts index 1f62a361cf..fd4adb4242 100644 --- a/cocos/game/splash-screen.ts +++ b/cocos/game/splash-screen.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { EDITOR, TAOBAO } from 'internal:constants'; import { Material } from '../asset/assets/material'; @@ -33,6 +32,7 @@ import { } from '../gfx'; import { PipelineStateManager } from '../rendering'; import { SetIndex } from '../rendering/define'; +import { ccwindow } from '../core/global-exports'; const v2_0 = new Vec2(); type SplashEffectType = 'default' | 'custom' | 'off'; @@ -98,19 +98,19 @@ export class SplashScreen { private scaleSize = 1; - public get isFinished () { + public get isFinished() { return this._curTime >= this.settings.totalTime; } - set curTime (val) { + set curTime(val) { this._curTime = val; } - get curTime () { + get curTime() { return this._curTime; } - public init (): Promise | undefined { + public init(): Promise | undefined { this.settings = { displayRatio: settings.querySettings(Settings.Category.SPLASH_SCREEN, 'displayRatio') ?? 0.4, totalTime: settings.querySettings(Settings.Category.SPLASH_SCREEN, 'totalTime') ?? 3000, @@ -135,7 +135,7 @@ export class SplashScreen { this.initWaterMark(); const bgPromise = new Promise((resolve, reject) => { - this.bgImage = new Image(); + this.bgImage = new ccwindow.Image(); this.bgImage.onload = () => { this.initBG(); resolve(); @@ -145,8 +145,8 @@ export class SplashScreen { }; this.bgImage.src = this.settings.bgBase64; }); - const logoPromise = new Promise((resolve, reject) => { - this.logoImage = new Image(); + const logoPromise = new Promise((resolve, reject) => { + this.logoImage = new ccwindow.Image(); this.logoImage.onload = () => { this.initLogo(); resolve(); @@ -161,7 +161,7 @@ export class SplashScreen { return Promise.resolve([]); } - private preInit () { + private preInit() { this.clearColors = [new Color(0, 0, 0, 255)]; // clean to black const { device, swapchain } = this; this.renderArea = new Rect(0, 0, swapchain.width, swapchain.height); @@ -202,7 +202,7 @@ export class SplashScreen { this.isMobile = sys.isMobile; } - private initLayout () { + private initLayout() { if (this.isMobile) { this.bgWidth = 812; this.bgHeight = 375; @@ -233,7 +233,7 @@ export class SplashScreen { this.initScale(); } - private initScale () { + private initScale() { const dw = this.swapchain.width; const dh = this.swapchain.height; let desiredWidth = this.isMobile ? 375 : 1080; let desiredHeight = this.isMobile ? 812 : 1920; @@ -249,7 +249,7 @@ export class SplashScreen { } } - public update (deltaTime: number) { + public update(deltaTime: number) { const settings = this.settings; const { device, swapchain } = this; Mat4.ortho(this.projection, -1, 1, -1, 1, -1, 1, device.capabilities.clipSpaceMinZ, @@ -299,7 +299,7 @@ export class SplashScreen { scaleX = watermarkTW; scaleY = watermarkTH; const textYTrans = logoYTrans - (this.logoHeight * 0.5 * settings.displayRatio + this.textYExtraTrans) - * this.scaleSize - watermarkTH * 0.5; + * this.scaleSize - watermarkTH * 0.5; this.watermarkMat.setProperty('resolution', v2_0.set(dw, dh), 0); this.watermarkMat.setProperty('scale', v2_0.set(scaleX, scaleY), 0); this.watermarkMat.setProperty('translate', v2_0.set(dw * this.textXTrans, textYTrans), 0); @@ -310,7 +310,7 @@ export class SplashScreen { this.frame(); } - private initBG () { + private initBG() { const device = this.device; this.bgMat = new Material(); @@ -345,7 +345,7 @@ export class SplashScreen { device.copyTexImagesToTexture([this.bgImage], this.bgTexture, [region]); } - private initLogo () { + private initLogo() { const device = this.device; this.logoMat = new Material(); @@ -389,9 +389,9 @@ export class SplashScreen { } } - private initWaterMark () { + private initWaterMark() { // create texture from image - const watermarkImg = document.createElement('canvas'); + const watermarkImg = ccwindow.document.createElement('canvas'); watermarkImg.height = this.textHeight * this.scaleSize; watermarkImg.style.width = `${watermarkImg.width}`; watermarkImg.style.height = `${watermarkImg.height}`; @@ -421,7 +421,7 @@ export class SplashScreen { pass.descriptorSet.update(); } - private frame () { + private frame() { const { device, swapchain } = this; if (!sys.isXR || xr.entry.isRenderAllowable()) { @@ -429,20 +429,24 @@ export class SplashScreen { for (let xrEye = 0; xrEye < renderSize; xrEye++) { if (sys.isXR) { xr.entry.renderLoopStart(xrEye); - const xrFov = xr.entry.getEyeFov(xrEye); - const left = Math.tan(xrFov[0]); - const right = Math.tan(xrFov[1]); - const bottom = Math.tan(xrFov[2]); - const top = Math.tan(xrFov[3]); - Mat4.ortho(this.projection, left, right, bottom, top, -1, 1, device.capabilities.clipSpaceMinZ, - device.capabilities.clipSpaceSignY, swapchain.surfaceTransform); - this.bgMat.setProperty('u_projection', this.projection); - this.bgMat.passes[0].update(); - this.logoMat.setProperty('u_projection', this.projection); - this.logoMat.passes[0].update(); - if (this.watermarkMat) { - this.watermarkMat.setProperty('u_projection', this.projection); - this.watermarkMat.passes[0].update(); + const xrConfigDeviceVendor = 13; + const compatibleDevice = 4; + if (xr.entry.getXRIntConfig(xrConfigDeviceVendor) !== compatibleDevice) { + const xrFov = xr.entry.getEyeFov(xrEye); + const left = Math.tan(xrFov[0]); + const right = Math.tan(xrFov[1]); + const bottom = Math.tan(xrFov[2]); + const top = Math.tan(xrFov[3]); + Mat4.ortho(this.projection, left, right, bottom, top, -1, 1, device.capabilities.clipSpaceMinZ, + device.capabilities.clipSpaceSignY, swapchain.surfaceTransform); + this.bgMat.setProperty('u_projection', this.projection); + this.bgMat.passes[0].update(); + this.logoMat.setProperty('u_projection', this.projection); + this.logoMat.passes[0].update(); + if (this.watermarkMat) { + this.watermarkMat.setProperty('u_projection', this.projection); + this.watermarkMat.passes[0].update(); + } } } @@ -499,7 +503,7 @@ export class SplashScreen { } } - private destroy () { + private destroy() { this.device = null!; this.swapchain = null!; this.clearColors = null!; @@ -539,14 +543,14 @@ export class SplashScreen { private static _ins?: SplashScreen; - public static get instance () { + public static get instance() { if (!SplashScreen._ins) { SplashScreen._ins = new SplashScreen(); } return SplashScreen._ins; } - private constructor () { } + private constructor() { } } cclegacy.internal.SplashScreen = SplashScreen; diff --git a/cocos/gfx/base/buffer.ts b/cocos/gfx/base/buffer.ts index 683f2cc0dc..88e8a435a1 100644 --- a/cocos/gfx/base/buffer.ts +++ b/cocos/gfx/base/buffer.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { BufferFlagBit, diff --git a/cocos/gfx/base/command-buffer.ts b/cocos/gfx/base/command-buffer.ts index 176b64d102..332e0da1e8 100644 --- a/cocos/gfx/base/command-buffer.ts +++ b/cocos/gfx/base/command-buffer.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Buffer } from './buffer'; import { DescriptorSet } from './descriptor-set'; @@ -37,7 +36,7 @@ import { StencilFace, CommandBufferType, CommandBufferInfo, - BufferTextureCopy, Color, Rect, Viewport, DrawInfo, + BufferTextureCopy, Color, Rect, Viewport, DrawInfo, Filter, TextureBlit, } from './define'; import { GeneralBarrier } from './states/general-barrier'; import { TextureBarrier } from './states/texture-barrier'; @@ -268,4 +267,15 @@ export abstract class CommandBuffer extends GFXObject { buffers?: Readonly, textureBarriers?: Readonly, textures?: Readonly): void; + + /** + * @en blit data from regions of source texture to regions of destination texture. + * @zh 将数据从源纹理的区域拷贝到目标纹理的区域。 + * + * @param srcTexture The source texture. + * @param dstTexture The destination texture. + * @param regions The region descriptions. + * @param filter The filter to use. + */ + public abstract blitTexture(srcTexture: Readonly, dstTexture: Texture, regions: Readonly, filter: Filter): void; } diff --git a/cocos/gfx/base/define.ts b/cocos/gfx/base/define.ts index 1b758c3244..2f99290d7c 100644 --- a/cocos/gfx/base/define.ts +++ b/cocos/gfx/base/define.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Queue } from './queue'; import { Buffer } from './buffer'; @@ -1258,6 +1257,7 @@ export class UniformBlock { public name: string = '', public members: Uniform[] = [], public count: number = 0, + public flattened: number = 0, ) {} public copy (info: Readonly) { @@ -1266,6 +1266,7 @@ export class UniformBlock { this.name = info.name; deepCopy(this.members, info.members, Uniform); this.count = info.count; + this.flattened = info.flattened; return this; } } @@ -1279,6 +1280,7 @@ export class UniformSamplerTexture { public name: string = '', public type: Type = Type.UNKNOWN, public count: number = 0, + public flattened: number = 0, ) {} public copy (info: Readonly) { @@ -1287,6 +1289,7 @@ export class UniformSamplerTexture { this.name = info.name; this.type = info.type; this.count = info.count; + this.flattened = info.flattened; return this; } } @@ -1299,6 +1302,7 @@ export class UniformSampler { public binding: number = 0, public name: string = '', public count: number = 0, + public flattened: number = 0, ) {} public copy (info: Readonly) { @@ -1306,6 +1310,7 @@ export class UniformSampler { this.binding = info.binding; this.name = info.name; this.count = info.count; + this.flattened = info.flattened; return this; } } @@ -1319,6 +1324,7 @@ export class UniformTexture { public name: string = '', public type: Type = Type.UNKNOWN, public count: number = 0, + public flattened: number = 0, ) {} public copy (info: Readonly) { @@ -1327,6 +1333,7 @@ export class UniformTexture { this.name = info.name; this.type = info.type; this.count = info.count; + this.flattened = info.flattened; return this; } } @@ -1341,6 +1348,7 @@ export class UniformStorageImage { public type: Type = Type.UNKNOWN, public count: number = 0, public memoryAccess: MemoryAccess = MemoryAccessBit.READ_WRITE, + public flattened: number = 0, ) {} public copy (info: Readonly) { @@ -1350,6 +1358,7 @@ export class UniformStorageImage { this.type = info.type; this.count = info.count; this.memoryAccess = info.memoryAccess; + this.flattened = info.flattened; return this; } } @@ -1363,6 +1372,7 @@ export class UniformStorageBuffer { public name: string = '', public count: number = 0, public memoryAccess: MemoryAccess = MemoryAccessBit.READ_WRITE, + public flattened: number = 0, ) {} public copy (info: Readonly) { @@ -1371,6 +1381,7 @@ export class UniformStorageBuffer { this.name = info.name; this.count = info.count; this.memoryAccess = info.memoryAccess; + this.flattened = info.flattened; return this; } } @@ -1383,6 +1394,7 @@ export class UniformInputAttachment { public binding: number = 0, public name: string = '', public count: number = 0, + public flattened: number = 0, ) {} public copy (info: Readonly) { @@ -1390,6 +1402,7 @@ export class UniformInputAttachment { this.binding = info.binding; this.name = info.name; this.count = info.count; + this.flattened = info.flattened; return this; } } diff --git a/cocos/gfx/base/descriptor-set-layout.ts b/cocos/gfx/base/descriptor-set-layout.ts index afd53e3b17..0258a7b54d 100644 --- a/cocos/gfx/base/descriptor-set-layout.ts +++ b/cocos/gfx/base/descriptor-set-layout.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { GFXObject, ObjectType, DescriptorSetLayoutBinding, DescriptorSetLayoutInfo } from './define'; diff --git a/cocos/gfx/base/descriptor-set.ts b/cocos/gfx/base/descriptor-set.ts index 2fc14bbd38..23796d21a9 100644 --- a/cocos/gfx/base/descriptor-set.ts +++ b/cocos/gfx/base/descriptor-set.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Buffer } from './buffer'; import { DescriptorSetLayout } from './descriptor-set-layout'; diff --git a/cocos/gfx/base/device.ts b/cocos/gfx/base/device.ts index 7ef76d0e45..7291fe2120 100644 --- a/cocos/gfx/base/device.ts +++ b/cocos/gfx/base/device.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { API, Feature, MemoryStatus, diff --git a/cocos/gfx/base/framebuffer.ts b/cocos/gfx/base/framebuffer.ts index b5e89ac207..71c04e1f54 100644 --- a/cocos/gfx/base/framebuffer.ts +++ b/cocos/gfx/base/framebuffer.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { RenderPass } from './render-pass'; import { Texture } from './texture'; diff --git a/cocos/gfx/base/input-assembler.ts b/cocos/gfx/base/input-assembler.ts index 259ca416f5..66ca33015c 100644 --- a/cocos/gfx/base/input-assembler.ts +++ b/cocos/gfx/base/input-assembler.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { murmurhash2_32_gc } from '../../core'; import { Buffer } from './buffer'; diff --git a/cocos/gfx/base/pipeline-layout.ts b/cocos/gfx/base/pipeline-layout.ts index 413ef52ae3..4e29fc9bc4 100644 --- a/cocos/gfx/base/pipeline-layout.ts +++ b/cocos/gfx/base/pipeline-layout.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { DescriptorSetLayout } from './descriptor-set-layout'; import { GFXObject, ObjectType, PipelineLayoutInfo } from './define'; diff --git a/cocos/gfx/base/pipeline-state.jsb.ts b/cocos/gfx/base/pipeline-state.jsb.ts index 30adc71ece..f404c7cfee 100644 --- a/cocos/gfx/base/pipeline-state.jsb.ts +++ b/cocos/gfx/base/pipeline-state.jsb.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ declare const gfx: any; @@ -586,14 +585,14 @@ export class BlendState { this._nativeObj = new gfx.BlendState(); this._setTargets(targets); this.blendColor = blendColor; - this.isA2c = isA2C; + this.isA2C = isA2C; this.isIndepend = isIndepend; } - get isA2c (): boolean { + get isA2C (): boolean { return this._isA2C; } - set isA2c (val: boolean) { + set isA2C (val: boolean) { this._isA2C = val; this._nativeObj.isA2C = val; } @@ -629,7 +628,7 @@ export class BlendState { } public reset () { - this.isA2c = false; + this.isA2C = false; this.isIndepend = false; this.blendColor = new Color(0, 0, 0, 0); diff --git a/cocos/gfx/base/pipeline-state.ts b/cocos/gfx/base/pipeline-state.ts index 983d0a0e90..5943d8c57d 100644 --- a/cocos/gfx/base/pipeline-state.ts +++ b/cocos/gfx/base/pipeline-state.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { PipelineLayout } from './pipeline-layout'; import { RenderPass } from './render-pass'; diff --git a/cocos/gfx/base/queue.ts b/cocos/gfx/base/queue.ts index c1e1256d8b..d80c02ed35 100644 --- a/cocos/gfx/base/queue.ts +++ b/cocos/gfx/base/queue.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { CommandBuffer } from './command-buffer'; import { GFXObject, ObjectType, QueueType, QueueInfo } from './define'; diff --git a/cocos/gfx/base/render-pass.ts b/cocos/gfx/base/render-pass.ts index 6683f65e0e..c40f303d70 100644 --- a/cocos/gfx/base/render-pass.ts +++ b/cocos/gfx/base/render-pass.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { murmurhash2_32_gc } from '../../core'; import { diff --git a/cocos/gfx/base/shader.ts b/cocos/gfx/base/shader.ts index 0367cf74a1..e66622196a 100644 --- a/cocos/gfx/base/shader.ts +++ b/cocos/gfx/base/shader.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { GFXObject, ObjectType, ShaderInfo, ShaderStage, UniformBlock, UniformSampler, Attribute } from './define'; diff --git a/cocos/gfx/base/states/buffer-barrier.ts b/cocos/gfx/base/states/buffer-barrier.ts index f371bd8a45..c3fd997c6f 100644 --- a/cocos/gfx/base/states/buffer-barrier.ts +++ b/cocos/gfx/base/states/buffer-barrier.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { murmurhash2_32_gc } from '../../../core'; import { GFXObject, ObjectType, BufferBarrierInfo } from '../define'; diff --git a/cocos/gfx/base/states/general-barrier.ts b/cocos/gfx/base/states/general-barrier.ts index 7ed29cefca..78e7786033 100644 --- a/cocos/gfx/base/states/general-barrier.ts +++ b/cocos/gfx/base/states/general-barrier.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { murmurhash2_32_gc } from '../../../core'; import { GFXObject, ObjectType, GeneralBarrierInfo } from '../define'; diff --git a/cocos/gfx/base/states/sampler.ts b/cocos/gfx/base/states/sampler.ts index c161170409..3ac8865af9 100644 --- a/cocos/gfx/base/states/sampler.ts +++ b/cocos/gfx/base/states/sampler.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { GFXObject, ObjectType, SamplerInfo } from '../define'; diff --git a/cocos/gfx/base/states/texture-barrier.ts b/cocos/gfx/base/states/texture-barrier.ts index a3fbc82ae1..a00765d174 100644 --- a/cocos/gfx/base/states/texture-barrier.ts +++ b/cocos/gfx/base/states/texture-barrier.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { murmurhash2_32_gc } from '../../../core'; import { GFXObject, ObjectType, TextureBarrierInfo } from '../define'; diff --git a/cocos/gfx/base/swapchain.ts b/cocos/gfx/base/swapchain.ts index f44f4f46d6..829c800904 100644 --- a/cocos/gfx/base/swapchain.ts +++ b/cocos/gfx/base/swapchain.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { GFXObject, ObjectType, SurfaceTransform, SwapchainInfo } from './define'; import { Texture } from './texture'; diff --git a/cocos/gfx/base/texture.ts b/cocos/gfx/base/texture.ts index 25e4c31f3e..de1fec1e48 100644 --- a/cocos/gfx/base/texture.ts +++ b/cocos/gfx/base/texture.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Format, diff --git a/cocos/gfx/deprecated-3.0.0.ts b/cocos/gfx/deprecated-3.0.0.ts index b52a9b2831..c617631fb4 100644 --- a/cocos/gfx/deprecated-3.0.0.ts +++ b/cocos/gfx/deprecated-3.0.0.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { replaceProperty, removeProperty, cclegacy } from '../core'; diff --git a/cocos/gfx/deprecated-3.5.0.ts b/cocos/gfx/deprecated-3.5.0.ts index ba16708a9b..8ad0214e4e 100644 --- a/cocos/gfx/deprecated-3.5.0.ts +++ b/cocos/gfx/deprecated-3.5.0.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { removeProperty, replaceProperty } from '../core'; import { Device } from './base/device'; diff --git a/cocos/gfx/device-manager.ts b/cocos/gfx/device-manager.ts index b3d00ee016..c9a0a45150 100644 --- a/cocos/gfx/device-manager.ts +++ b/cocos/gfx/device-manager.ts @@ -1,19 +1,18 @@ /* eslint-disable max-len */ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -22,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { JSB, WEBGPU } from 'internal:constants'; import { cclegacy, error, getError, sys, screen, Settings, settings } from '../core'; @@ -113,11 +112,11 @@ export class DeviceManager { if (this._renderType === RenderType.WEBGL) { const deviceInfo = new DeviceInfo(bindingMappingInfo); - if (JSB && window.gfx) { + if (JSB && (globalThis as any).gfx) { this._gfxDevice = gfx.DeviceManager.create(deviceInfo); } else { - let useWebGL2 = (!!window.WebGL2RenderingContext); - const userAgent = window.navigator.userAgent.toLowerCase(); + let useWebGL2 = (!!globalThis.WebGL2RenderingContext); + const userAgent = globalThis.navigator.userAgent.toLowerCase(); if (userAgent.indexOf('safari') !== -1 && userAgent.indexOf('chrome') === -1 || sys.browserType === BrowserType.UC // UC browser implementation doesn't conform to WebGL2 standard ) { diff --git a/cocos/gfx/empty/empty-buffer.ts b/cocos/gfx/empty/empty-buffer.ts index 93ec343e55..009c3c0d08 100644 --- a/cocos/gfx/empty/empty-buffer.ts +++ b/cocos/gfx/empty/empty-buffer.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { BufferSource, BufferInfo, BufferViewInfo } from '../base/define'; import { Buffer } from '../base/buffer'; diff --git a/cocos/gfx/empty/empty-command-buffer.ts b/cocos/gfx/empty/empty-command-buffer.ts index 32397ccf22..770544f594 100644 --- a/cocos/gfx/empty/empty-command-buffer.ts +++ b/cocos/gfx/empty/empty-command-buffer.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { DescriptorSet } from '../base/descriptor-set'; import { Buffer } from '../base/buffer'; @@ -34,7 +33,9 @@ import { RenderPass } from '../base/render-pass'; import { GeneralBarrier } from '../base/states/general-barrier'; import { TextureBarrier } from '../base/states/texture-barrier'; import { BufferBarrier } from '../base/states/buffer-barrier'; -import { StencilFace, BufferSource, CommandBufferInfo, BufferTextureCopy, Color, Rect, Viewport, DrawInfo } from '../base/define'; +import { StencilFace, BufferSource, CommandBufferInfo, BufferTextureCopy, Color, + Rect, Viewport, DrawInfo, TextureBlit, Filter, +} from '../base/define'; export class EmptyCommandBuffer extends CommandBuffer { public initialize (info: Readonly) { @@ -66,4 +67,5 @@ export class EmptyCommandBuffer extends CommandBuffer { buffers?: Readonly, textureBarriers?: Readonly, textures?: Readonly) {} + public blitTexture (srcTexture: Readonly, dstTexture: Texture, regions: Readonly, filter: Filter): void {} } diff --git a/cocos/gfx/empty/empty-descriptor-set-layout.ts b/cocos/gfx/empty/empty-descriptor-set-layout.ts index 842280664a..7e59e095c9 100644 --- a/cocos/gfx/empty/empty-descriptor-set-layout.ts +++ b/cocos/gfx/empty/empty-descriptor-set-layout.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { DescriptorSetLayoutInfo } from '../base/define'; import { DescriptorSetLayout } from '../base/descriptor-set-layout'; diff --git a/cocos/gfx/empty/empty-descriptor-set.ts b/cocos/gfx/empty/empty-descriptor-set.ts index 2e543a74f4..b75a15f31c 100644 --- a/cocos/gfx/empty/empty-descriptor-set.ts +++ b/cocos/gfx/empty/empty-descriptor-set.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { DescriptorSet } from '../base/descriptor-set'; import { DescriptorSetInfo } from '../base/define'; diff --git a/cocos/gfx/empty/empty-device.ts b/cocos/gfx/empty/empty-device.ts index 3dc6b84a32..8958073ebd 100644 --- a/cocos/gfx/empty/empty-device.ts +++ b/cocos/gfx/empty/empty-device.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { DescriptorSet } from '../base/descriptor-set'; import { DescriptorSetLayout } from '../base/descriptor-set-layout'; diff --git a/cocos/gfx/empty/empty-framebuffer.ts b/cocos/gfx/empty/empty-framebuffer.ts index 1ab75b59f7..bc9d01ec87 100644 --- a/cocos/gfx/empty/empty-framebuffer.ts +++ b/cocos/gfx/empty/empty-framebuffer.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { FramebufferInfo } from '../base/define'; import { Framebuffer } from '../base/framebuffer'; diff --git a/cocos/gfx/empty/empty-input-assembler.ts b/cocos/gfx/empty/empty-input-assembler.ts index e09f364692..b266c176ff 100644 --- a/cocos/gfx/empty/empty-input-assembler.ts +++ b/cocos/gfx/empty/empty-input-assembler.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { InputAssemblerInfo } from '../base/define'; import { InputAssembler } from '../base/input-assembler'; diff --git a/cocos/gfx/empty/empty-pipeline-layout.ts b/cocos/gfx/empty/empty-pipeline-layout.ts index daa885df50..709d509a72 100644 --- a/cocos/gfx/empty/empty-pipeline-layout.ts +++ b/cocos/gfx/empty/empty-pipeline-layout.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { PipelineLayout } from '../base/pipeline-layout'; import { PipelineLayoutInfo } from '../base/define'; diff --git a/cocos/gfx/empty/empty-pipeline-state.ts b/cocos/gfx/empty/empty-pipeline-state.ts index 3354bb3c8e..4332930402 100644 --- a/cocos/gfx/empty/empty-pipeline-state.ts +++ b/cocos/gfx/empty/empty-pipeline-state.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { PipelineState, PipelineStateInfo } from '../base/pipeline-state'; diff --git a/cocos/gfx/empty/empty-queue.ts b/cocos/gfx/empty/empty-queue.ts index 35b7320650..bcf8fee8c3 100644 --- a/cocos/gfx/empty/empty-queue.ts +++ b/cocos/gfx/empty/empty-queue.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { QueueInfo } from '../base/define'; import { CommandBuffer } from '../base/command-buffer'; diff --git a/cocos/gfx/empty/empty-render-pass.ts b/cocos/gfx/empty/empty-render-pass.ts index 4a564ebb26..fb0bfd341f 100644 --- a/cocos/gfx/empty/empty-render-pass.ts +++ b/cocos/gfx/empty/empty-render-pass.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { RenderPassInfo } from '../base/define'; import { RenderPass } from '../base/render-pass'; diff --git a/cocos/gfx/empty/empty-shader.ts b/cocos/gfx/empty/empty-shader.ts index c90955115f..4c626f9608 100644 --- a/cocos/gfx/empty/empty-shader.ts +++ b/cocos/gfx/empty/empty-shader.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { debug } from '../../core'; import { ShaderInfo } from '../base/define'; diff --git a/cocos/gfx/empty/empty-swapchain.ts b/cocos/gfx/empty/empty-swapchain.ts index af1271fb7b..651fed9edb 100644 --- a/cocos/gfx/empty/empty-swapchain.ts +++ b/cocos/gfx/empty/empty-swapchain.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Format, SwapchainInfo, SurfaceTransform } from '../base/define'; import { Swapchain } from '../base/swapchain'; diff --git a/cocos/gfx/empty/empty-texture.ts b/cocos/gfx/empty/empty-texture.ts index aa584f51e0..3256020e53 100644 --- a/cocos/gfx/empty/empty-texture.ts +++ b/cocos/gfx/empty/empty-texture.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { TextureInfo, TextureViewInfo, ISwapchainTextureInfo, FormatSurfaceSize, IsPowerOf2 } from '../base/define'; import { Texture } from '../base/texture'; diff --git a/cocos/gfx/index.ems.ts b/cocos/gfx/index.ems.ts index ac1cb06908..4ef3ed9d73 100644 --- a/cocos/gfx/index.ems.ts +++ b/cocos/gfx/index.ems.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ /** * @packageDocumentation diff --git a/cocos/gfx/index.jsb.ts b/cocos/gfx/index.jsb.ts index 317bd230b7..ecff904f0d 100644 --- a/cocos/gfx/index.jsb.ts +++ b/cocos/gfx/index.jsb.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ declare const gfx: any; diff --git a/cocos/gfx/index.ts b/cocos/gfx/index.ts index c84acd727d..fbe590e88b 100644 --- a/cocos/gfx/index.ts +++ b/cocos/gfx/index.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import './polyfill-legacy-cc'; import './deprecated-3.0.0'; diff --git a/cocos/gfx/polyfill-legacy-cc.ts b/cocos/gfx/polyfill-legacy-cc.ts index be6e2c9000..3bcfa4c326 100644 --- a/cocos/gfx/polyfill-legacy-cc.ts +++ b/cocos/gfx/polyfill-legacy-cc.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Buffer } from './base/buffer'; import { CommandBuffer } from './base/command-buffer'; diff --git a/cocos/gfx/webgl/states/webgl-sampler.ts b/cocos/gfx/webgl/states/webgl-sampler.ts index 2e6324f5c1..1ffb6ef140 100644 --- a/cocos/gfx/webgl/states/webgl-sampler.ts +++ b/cocos/gfx/webgl/states/webgl-sampler.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Filter, SamplerInfo } from '../../base/define'; import { Sampler } from '../../base/states/sampler'; diff --git a/cocos/gfx/webgl/webgl-buffer.ts b/cocos/gfx/webgl/webgl-buffer.ts index 086f89b39c..8a9f598b5a 100644 --- a/cocos/gfx/webgl/webgl-buffer.ts +++ b/cocos/gfx/webgl/webgl-buffer.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { BufferSource, BufferInfo, BufferViewInfo, BufferUsageBit } from '../base/define'; import { Buffer } from '../base/buffer'; diff --git a/cocos/gfx/webgl/webgl-command-allocator.ts b/cocos/gfx/webgl/webgl-command-allocator.ts index c12d5abadf..97ad1bf0ba 100644 --- a/cocos/gfx/webgl/webgl-command-allocator.ts +++ b/cocos/gfx/webgl/webgl-command-allocator.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,12 +20,13 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { CachedArray } from '../../core'; import { WebGLCmdBeginRenderPass, WebGLCmdBindStates, + WebGLCmdBlitTexture, WebGLCmdCopyBufferToTexture, WebGLCmdDraw, WebGLCmdObject, @@ -109,6 +109,7 @@ export class WebGLCommandAllocator { public drawCmdPool: WebGLCommandPool; public updateBufferCmdPool: WebGLCommandPool; public copyBufferToTextureCmdPool: WebGLCommandPool; + public blitTextureCmdPool: WebGLCommandPool; constructor () { this.beginRenderPassCmdPool = new WebGLCommandPool(WebGLCmdBeginRenderPass, 1); @@ -116,6 +117,7 @@ export class WebGLCommandAllocator { this.drawCmdPool = new WebGLCommandPool(WebGLCmdDraw, 1); this.updateBufferCmdPool = new WebGLCommandPool(WebGLCmdUpdateBuffer, 1); this.copyBufferToTextureCmdPool = new WebGLCommandPool(WebGLCmdCopyBufferToTexture, 1); + this.blitTextureCmdPool = new WebGLCommandPool(WebGLCmdBlitTexture, 1); } public clearCmds (cmdPackage: WebGLCmdPackage) { @@ -144,6 +146,11 @@ export class WebGLCommandAllocator { cmdPackage.copyBufferToTextureCmds.clear(); } + if (cmdPackage.blitTextureCmds.length) { + this.blitTextureCmdPool.freeCmds(cmdPackage.blitTextureCmds); + cmdPackage.blitTextureCmds.clear(); + } + cmdPackage.cmds.clear(); } @@ -153,5 +160,6 @@ export class WebGLCommandAllocator { this.drawCmdPool.release(); this.updateBufferCmdPool.release(); this.copyBufferToTextureCmdPool.release(); + this.blitTextureCmdPool.release(); } } diff --git a/cocos/gfx/webgl/webgl-command-buffer.ts b/cocos/gfx/webgl/webgl-command-buffer.ts index a8b87f6fa6..7cb4a1d838 100644 --- a/cocos/gfx/webgl/webgl-command-buffer.ts +++ b/cocos/gfx/webgl/webgl-command-buffer.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { DescriptorSet } from '../base/descriptor-set'; import { Buffer } from '../base/buffer'; @@ -41,8 +40,8 @@ import { WebGLTexture } from './webgl-texture'; import { RenderPass } from '../base/render-pass'; import { WebGLRenderPass } from './webgl-render-pass'; import { BufferUsageBit, CommandBufferType, StencilFace, BufferSource, - CommandBufferInfo, BufferTextureCopy, Color, Rect, Viewport, DrawInfo, DynamicStates } from '../base/define'; -import { WebGLCmd, WebGLCmdBeginRenderPass, WebGLCmdBindStates, WebGLCmdCopyBufferToTexture, + CommandBufferInfo, BufferTextureCopy, Color, Rect, Viewport, DrawInfo, DynamicStates, TextureBlit, Filter } from '../base/define'; +import { WebGLCmd, WebGLCmdBeginRenderPass, WebGLCmdBindStates, WebGLCmdBlitTexture, WebGLCmdCopyBufferToTexture, WebGLCmdDraw, WebGLCmdPackage, WebGLCmdUpdateBuffer } from './webgl-commands'; import { GeneralBarrier } from '../base/states/general-barrier'; import { TextureBarrier } from '../base/states/texture-barrier'; @@ -392,6 +391,12 @@ export class WebGLCommandBuffer extends CommandBuffer { this.cmdPackage.copyBufferToTextureCmds.push(cmd); } + for (let c = 0; c < webGLCmdBuff.cmdPackage.blitTextureCmds.length; ++c) { + const cmd = webGLCmdBuff.cmdPackage.blitTextureCmds.array[c]; + ++cmd.refCount; + this.cmdPackage.blitTextureCmds.push(cmd); + } + this.cmdPackage.cmds.concat(webGLCmdBuff.cmdPackage.cmds.array); this._numDrawCalls += webGLCmdBuff._numDrawCalls; @@ -421,4 +426,17 @@ export class WebGLCommandBuffer extends CommandBuffer { this._isStateInvalied = false; } } + + public blitTexture (srcTexture: Readonly, dstTexture: Texture, regions: Readonly, filter: Filter): void { + const blitTextureCmd = this._cmdAllocator.blitTextureCmdPool.alloc(WebGLCmdBlitTexture); + blitTextureCmd.srcTexture = (srcTexture as WebGLTexture).gpuTexture; + blitTextureCmd.dstTexture = (dstTexture as WebGLTexture).gpuTexture; + blitTextureCmd.regions = regions as TextureBlit[]; + blitTextureCmd.filter = filter; + + ++this._numDrawCalls; // blit is also seen as draw call in webgl1 + + this.cmdPackage.blitTextureCmds.push(blitTextureCmd); + this.cmdPackage.cmds.push(WebGLCmd.BLIT_TEXTURE); + } } diff --git a/cocos/gfx/webgl/webgl-commands.ts b/cocos/gfx/webgl/webgl-commands.ts index 1a12b88af4..54fbe5943e 100644 --- a/cocos/gfx/webgl/webgl-commands.ts +++ b/cocos/gfx/webgl/webgl-commands.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,9 +20,9 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ -import { debug, error, errorID, CachedArray } from '../../core'; +import { debug, error, errorID, CachedArray, cclegacy } from '../../core'; import { WebGLCommandAllocator } from './webgl-command-allocator'; import { WebGLEXT } from './webgl-define'; import { WebGLDevice } from './webgl-device'; @@ -34,8 +33,11 @@ import { import { BufferUsageBit, ClearFlagBit, ClearFlags, ColorMask, CullMode, Format, BufferTextureCopy, Color, Rect, FormatInfos, FormatSize, LoadOp, MemoryUsageBit, ShaderStageFlagBit, UniformSamplerTexture, - TextureFlagBit, TextureType, Type, FormatInfo, DynamicStateFlagBit, BufferSource, DrawInfo, IndirectBuffer, DynamicStates, Extent, getTypedArrayConstructor, formatAlignment, Offset, alignTo, + TextureFlagBit, TextureType, Type, FormatInfo, DynamicStateFlagBit, BufferSource, DrawInfo, + IndirectBuffer, DynamicStates, Extent, getTypedArrayConstructor, formatAlignment, Offset, alignTo, + TextureBlit, Filter, } from '../base/define'; +import { WebGLStateCache } from './webgl-state-cache'; export function GFXFormatToWebGLType (format: Format, gl: WebGLRenderingContext): GLenum { switch (format) { @@ -439,6 +441,7 @@ export enum WebGLCmd { DRAW, UPDATE_BUFFER, COPY_BUFFER_TO_TEXTURE, + BLIT_TEXTURE, COUNT, } @@ -534,6 +537,23 @@ export class WebGLCmdCopyBufferToTexture extends WebGLCmdObject { } } +export class WebGLCmdBlitTexture extends WebGLCmdObject { + public srcTexture: IWebGLGPUTexture | null = null; + public dstTexture: IWebGLGPUTexture | null = null; + public regions: TextureBlit[] = []; + public filter: Filter = Filter.LINEAR; + + constructor () { + super(WebGLCmd.BLIT_TEXTURE); + } + + public clear () { + this.srcTexture = null; + this.dstTexture = null; + this.regions.length = 0; + } +} + export class WebGLCmdPackage { public cmds: CachedArray = new CachedArray(1); public beginRenderPassCmds: CachedArray = new CachedArray(1); @@ -541,6 +561,7 @@ export class WebGLCmdPackage { public drawCmds: CachedArray = new CachedArray(1); public updateBufferCmds: CachedArray = new CachedArray(1); public copyBufferToTextureCmds: CachedArray = new CachedArray(1); + public blitTextureCmds: CachedArray = new CachedArray(1); public clearCmds (allocator: WebGLCommandAllocator) { if (this.beginRenderPassCmds.length) { @@ -568,6 +589,11 @@ export class WebGLCmdPackage { this.copyBufferToTextureCmds.clear(); } + if (this.blitTextureCmds.length) { + allocator.blitTextureCmdPool.freeCmds(this.blitTextureCmds); + this.blitTextureCmds.clear(); + } + this.cmds.clear(); } } @@ -1434,26 +1460,40 @@ export function WebGLCmdFuncCreateShader (device: WebGLDevice, gpuShader: IWebGL const { bindingMappings } = device; const { texUnitCacheMap } = device.stateCache; - let flexibleSetBaseOffset = 0; - for (let i = 0; i < gpuShader.blocks.length; ++i) { - if (gpuShader.blocks[i].set === bindingMappings.flexibleSet) { - flexibleSetBaseOffset++; + if (!(cclegacy.rendering && cclegacy.rendering.enableEffectImport)) { + let flexibleSetBaseOffset = 0; + for (let i = 0; i < gpuShader.blocks.length; ++i) { + if (gpuShader.blocks[i].set === bindingMappings.flexibleSet) { + flexibleSetBaseOffset++; + } } - } - let arrayOffset = 0; - for (let i = 0; i < gpuShader.samplerTextures.length; ++i) { - const sampler = gpuShader.samplerTextures[i]; - const glLoc = gl.getUniformLocation(gpuShader.glProgram, sampler.name); - if (device.extensions.isLocationActive(glLoc)) { - glActiveSamplers.push(gpuShader.glSamplerTextures[i]); - glActiveSamplerLocations.push(glLoc); + let arrayOffset = 0; + for (let i = 0; i < gpuShader.samplerTextures.length; ++i) { + const sampler = gpuShader.samplerTextures[i]; + const glLoc = gl.getUniformLocation(gpuShader.glProgram, sampler.name); + if (device.extensions.isLocationActive(glLoc)) { + glActiveSamplers.push(gpuShader.glSamplerTextures[i]); + glActiveSamplerLocations.push(glLoc); + } + if (texUnitCacheMap[sampler.name] === undefined) { + let binding = sampler.binding + bindingMappings.samplerTextureOffsets[sampler.set] + arrayOffset; + if (sampler.set === bindingMappings.flexibleSet) { binding -= flexibleSetBaseOffset; } + texUnitCacheMap[sampler.name] = binding % device.capabilities.maxTextureUnits; + arrayOffset += sampler.count - 1; + } } - if (texUnitCacheMap[sampler.name] === undefined) { - let binding = sampler.binding + bindingMappings.samplerTextureOffsets[sampler.set] + arrayOffset; - if (sampler.set === bindingMappings.flexibleSet) { binding -= flexibleSetBaseOffset; } - texUnitCacheMap[sampler.name] = binding % device.capabilities.maxTextureUnits; - arrayOffset += sampler.count - 1; + } else { + for (let i = 0; i < gpuShader.samplerTextures.length; ++i) { + const sampler = gpuShader.samplerTextures[i]; + const glLoc = gl.getUniformLocation(gpuShader.glProgram, sampler.name); + if (device.extensions.isLocationActive(glLoc)) { + glActiveSamplers.push(gpuShader.glSamplerTextures[i]); + glActiveSamplerLocations.push(glLoc); + } + if (texUnitCacheMap[sampler.name] === undefined) { + texUnitCacheMap[sampler.name] = sampler.flattened; + } } } @@ -2644,6 +2684,11 @@ export function WebGLCmdFuncExecuteCmds (device: WebGLDevice, cmdPackage: WebGLC WebGLCmdFuncCopyBuffersToTexture(device, cmd5.buffers, cmd5.gpuTexture as IWebGLGPUTexture, cmd5.regions); break; } + case WebGLCmd.BLIT_TEXTURE: { + const cmd6 = cmdPackage.blitTextureCmds.array[cmdId]; + WebGLCmdFuncBlitTexture(device, cmd6.srcTexture as IWebGLGPUTexture, cmd6.dstTexture as IWebGLGPUTexture, cmd6.regions, cmd6.filter); + break; + } default: } // switch } // for @@ -2751,7 +2796,7 @@ export function WebGLCmdFuncCopyBuffersToTexture ( let n = 0; let f = 0; const fmtInfo: FormatInfo = FormatInfos[gpuTexture.format]; - const ArrayBufferCtor : TypedArrayConstructor = getTypedArrayConstructor(fmtInfo); + const ArrayBufferCtor: TypedArrayConstructor = getTypedArrayConstructor(fmtInfo); const { isCompressed } = fmtInfo; const blockSize = formatAlignment(gpuTexture.format); @@ -2777,7 +2822,7 @@ export function WebGLCmdFuncCopyBuffersToTexture ( const destWidth = (region.texExtent.width + offset.x === (gpuTexture.width >> mipLevel)) ? region.texExtent.width : extent.width; const destHeight = (region.texExtent.height + offset.y === (gpuTexture.height >> mipLevel)) ? region.texExtent.height : extent.height; - let pixels : ArrayBufferView; + let pixels: ArrayBufferView; const buffer = buffers[n++]; if (stride.width === extent.width && stride.height === extent.height) { pixels = new ArrayBufferCtor(buffer.buffer, buffer.byteOffset + region.buffOffset); @@ -2901,3 +2946,9 @@ export function WebGLCmdFuncCopyTextureToBuffers ( cache.glFramebuffer = null; gl.deleteFramebuffer(framebuffer); } + +export function WebGLCmdFuncBlitTexture (device: WebGLDevice, + srcTexture: Readonly, dstTexture: IWebGLGPUTexture, regions: Readonly, filter: Filter) { + // logic different from native, because framebuffer map is not implemented in webgl + device.blitManager.draw(srcTexture, dstTexture, regions as TextureBlit[], filter); +} diff --git a/cocos/gfx/webgl/webgl-define.ts b/cocos/gfx/webgl/webgl-define.ts index 35dd732690..1e7caf0f12 100644 --- a/cocos/gfx/webgl/webgl-define.ts +++ b/cocos/gfx/webgl/webgl-define.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { WebGLDevice } from './webgl-device'; diff --git a/cocos/gfx/webgl/webgl-descriptor-set-layout.ts b/cocos/gfx/webgl/webgl-descriptor-set-layout.ts index be86f25ca5..8ec72b9118 100644 --- a/cocos/gfx/webgl/webgl-descriptor-set-layout.ts +++ b/cocos/gfx/webgl/webgl-descriptor-set-layout.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { DescriptorSetLayoutInfo, DESCRIPTOR_DYNAMIC_TYPE } from '../base/define'; import { DescriptorSetLayout } from '../base/descriptor-set-layout'; diff --git a/cocos/gfx/webgl/webgl-descriptor-set.ts b/cocos/gfx/webgl/webgl-descriptor-set.ts index 7d30d4d5e1..38d6679a3c 100644 --- a/cocos/gfx/webgl/webgl-descriptor-set.ts +++ b/cocos/gfx/webgl/webgl-descriptor-set.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { DescriptorSet } from '../base/descriptor-set'; import { WebGLBuffer } from './webgl-buffer'; diff --git a/cocos/gfx/webgl/webgl-device.ts b/cocos/gfx/webgl/webgl-device.ts index 96026b88b2..440d08a16b 100644 --- a/cocos/gfx/webgl/webgl-device.ts +++ b/cocos/gfx/webgl/webgl-device.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { DescriptorSet } from '../base/descriptor-set'; import { DescriptorSetLayout } from '../base/descriptor-set-layout'; @@ -96,6 +95,10 @@ export class WebGLDevice extends Device { return this._bindingMappings!; } + get blitManager () { + return this._swapchain!.blitManager; + } + private _swapchain: WebGLSwapchain | null = null; private _context: WebGLRenderingContext | null = null; private _bindingMappings: IWebGLBindingMapping | null = null; diff --git a/cocos/gfx/webgl/webgl-framebuffer.ts b/cocos/gfx/webgl/webgl-framebuffer.ts index 073a5ebd32..287fd3ca0d 100644 --- a/cocos/gfx/webgl/webgl-framebuffer.ts +++ b/cocos/gfx/webgl/webgl-framebuffer.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { FramebufferInfo } from '../base/define'; import { Framebuffer } from '../base/framebuffer'; diff --git a/cocos/gfx/webgl/webgl-gpu-objects.ts b/cocos/gfx/webgl/webgl-gpu-objects.ts index 85a981f20c..e8d6e563b1 100644 --- a/cocos/gfx/webgl/webgl-gpu-objects.ts +++ b/cocos/gfx/webgl/webgl-gpu-objects.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,16 +20,23 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { nextPow2 } from '../../core'; import { DescriptorType, BufferUsage, Format, MemoryUsage, SampleCount, DynamicStateFlagBit, ShaderStageFlagBit, TextureFlags, TextureType, TextureUsage, Type, Attribute, ColorAttachment, DepthStencilAttachment, - UniformBlock, UniformSamplerTexture, DescriptorSetLayoutBinding, DrawInfo, UniformInputAttachment, + UniformBlock, UniformSamplerTexture, DescriptorSetLayoutBinding, + DrawInfo, UniformInputAttachment, Uniform, BufferUsageBit, MemoryUsageBit, + TextureBlit, Filter, FormatInfos, } from '../base/define'; import { BlendState, DepthStencilState, RasterizerState } from '../base/pipeline-state'; +import { WebGLCmdFuncBindStates, WebGLCmdFuncCreateBuffer, WebGLCmdFuncCreateInputAssember, + WebGLCmdFuncCreateShader, WebGLCmdFuncDestroyBuffer, WebGLCmdFuncDestroyInputAssembler, + WebGLCmdFuncDestroyShader, WebGLCmdFuncDraw, WebGLCmdFuncUpdateBuffer, +} from './webgl-commands'; +import { WebGLDeviceManager } from './webgl-define'; export class WebGLIndirectDrawInfos { public counts: Int32Array; @@ -309,3 +315,289 @@ export interface IWebGLGPUInputAssembler { glIndexType: GLenum; glVAOs: Map; } + +export class IWebGLBlitManager { + private _gpuShader: IWebGLGPUShader | null = null; + private _gpuDescriptorSetLayout: IWebGLGPUDescriptorSetLayout | null = null; + private _gpuPipelineLayout: IWebGLGPUPipelineLayout | null = null; + private _gpuPipelineState: IWebGLGPUPipelineState | null = null; + + private _gpuVertexBuffer: IWebGLGPUBuffer | null = null; + private _gpuInputAssembler: IWebGLGPUInputAssembler | null = null; + private _gpuPointSampler: IWebGLGPUSampler | null = null; + private _gpuLinearSampler: IWebGLGPUSampler | null = null; + private _gpuDescriptorSet: IWebGLGPUDescriptorSet | null = null; + private _gpuUniformBuffer: IWebGLGPUBuffer | null = null; + private _drawInfo: DrawInfo | null = null; + private _glFramebuffer: WebGLFramebuffer | null = null; + + private _uniformBuffer: Float32Array | null = null; + + constructor () { + const { gl } = WebGLDeviceManager.instance; + const device = WebGLDeviceManager.instance; + const samplerOffset = device.bindingMappingInfo.maxBlockCounts[0]; + + this._gpuShader = { + name: 'Blit Pass', + blocks: [ + new UniformBlock(0, 0, `BlitParams`, + [ + new Uniform(`tilingOffsetSrc`, Type.FLOAT4, 1), + new Uniform(`tilingOffsetDst`, Type.FLOAT4, 1), + ], + 1), + ], + samplerTextures: [new UniformSamplerTexture(0, samplerOffset, 'textureSrc', Type.SAMPLER2D, 1)], + subpassInputs: [], + gpuStages: [ + { + type: ShaderStageFlagBit.VERTEX, + source: ` + precision mediump float; + + attribute vec2 a_position; + attribute vec2 a_texCoord; + + uniform vec4 tilingOffsetSrc; + uniform vec4 tilingOffsetDst; + + varying vec2 v_texCoord; + + void main() { + v_texCoord = a_texCoord * tilingOffsetSrc.xy + tilingOffsetSrc.zw; + gl_Position = vec4((a_position + 1.0) * tilingOffsetDst.xy - 1.0 + tilingOffsetDst.zw * 2.0, 0, 1); + }`, + glShader: null }, + { + type: ShaderStageFlagBit.FRAGMENT, + source: ` + precision mediump float; + uniform sampler2D textureSrc; + + varying vec2 v_texCoord; + + void main() { + gl_FragColor = texture2D(textureSrc, v_texCoord); + }`, + glShader: null }, + + ], + glProgram: null, + glInputs: [], + glUniforms: [], + glBlocks: [], + glSamplerTextures: [], + }; + WebGLCmdFuncCreateShader(WebGLDeviceManager.instance, this._gpuShader); + + this._gpuDescriptorSetLayout = { + bindings: [ + new DescriptorSetLayoutBinding(0, DescriptorType.UNIFORM_BUFFER, 1, ShaderStageFlagBit.VERTEX), + new DescriptorSetLayoutBinding(samplerOffset, DescriptorType.SAMPLER_TEXTURE, 1, ShaderStageFlagBit.FRAGMENT), + ], + dynamicBindings: [], + descriptorIndices: [], + descriptorCount: samplerOffset + 1, + }; + for (let i = 0; i < samplerOffset; i++) { + this._gpuDescriptorSetLayout.descriptorIndices[i] = 0; + } + this._gpuDescriptorSetLayout.descriptorIndices.push(1); + + this._gpuPipelineLayout = { + gpuSetLayouts: [this._gpuDescriptorSetLayout], + dynamicOffsetCount: 0, + dynamicOffsetOffsets: [0], + dynamicOffsetIndices: [[]], + }; + + this._gpuPipelineState = { + glPrimitive: gl.TRIANGLE_STRIP, + gpuShader: this._gpuShader, + gpuPipelineLayout: this._gpuPipelineLayout, + rs: null!, + dss: new DepthStencilState(false, false), + bs: null!, + dynamicStates: [], + gpuRenderPass: null, + }; + + this._gpuVertexBuffer = { + usage: BufferUsageBit.VERTEX, + memUsage: MemoryUsageBit.DEVICE, + size: 16 * Float32Array.BYTES_PER_ELEMENT, + stride: 4 * Float32Array.BYTES_PER_ELEMENT, + buffer: null, + vf32: null, + indirects: new WebGLIndirectDrawInfos(), + glTarget: 0, + glBuffer: null, + }; + WebGLCmdFuncCreateBuffer(WebGLDeviceManager.instance, this._gpuVertexBuffer); + WebGLDeviceManager.instance.memoryStatus.bufferSize += this._gpuVertexBuffer.size; + const data = new Float32Array( + [-1.0, -1.0, 0.0, 0.0, + 1.0, -1.0, 1.0, 0.0, + -1.0, 1.0, 0.0, 1.0, + 1.0, 1.0, 1.0, 1.0], + ); + WebGLCmdFuncUpdateBuffer(WebGLDeviceManager.instance, this._gpuVertexBuffer, data, 0, data.length); + + this._gpuInputAssembler = { + attributes: [new Attribute(`a_position`, Format.RG32F), new Attribute(`a_texCoord`, Format.RG32F)], + gpuVertexBuffers: [this._gpuVertexBuffer], + gpuIndexBuffer: null, + gpuIndirectBuffer: null, + + glAttribs: [], + glIndexType: 0, + glVAOs: new Map(), + }; + WebGLCmdFuncCreateInputAssember(WebGLDeviceManager.instance, this._gpuInputAssembler); + + this._gpuPointSampler = { + glMinFilter: 0x2600, // WebGLRenderingContext.NEAREST + glMagFilter: 0x2600, // WebGLRenderingContext.NEAREST + glWrapS: 0x2901, // WebGLRenderingContext.REPEAT, + glWrapT: 0x2901, // WebGLRenderingContext.REPEAT, + glWrapR: 0x2901, // WebGLRenderingContext.REPEAT, + }; + + this._gpuLinearSampler = { + glMinFilter: 0x2601, // WebGLRenderingContext.LINEAR; + glMagFilter: 0x2601, // WebGLRenderingContext.LINEAR; + glWrapS: 0x2901, // WebGLRenderingContext.REPEAT, + glWrapT: 0x2901, // WebGLRenderingContext.REPEAT, + glWrapR: 0x2901, // WebGLRenderingContext.REPEAT, + }; + + this._uniformBuffer = new Float32Array(8); + this._gpuUniformBuffer = { + usage: BufferUsageBit.UNIFORM, + memUsage: MemoryUsageBit.DEVICE, + size: 8 * Float32Array.BYTES_PER_ELEMENT, + stride: 8 * Float32Array.BYTES_PER_ELEMENT, + buffer: this._uniformBuffer, + vf32: null, + indirects: new WebGLIndirectDrawInfos(), + glTarget: 0, + glBuffer: null, + }; + WebGLCmdFuncCreateBuffer(WebGLDeviceManager.instance, this._gpuUniformBuffer); + WebGLDeviceManager.instance.memoryStatus.bufferSize += this._gpuUniformBuffer.size; + + this._gpuDescriptorSet = { + gpuDescriptors: [ + { type: DescriptorType.UNIFORM_BUFFER, gpuBuffer: this._gpuUniformBuffer, gpuTexture: null, gpuSampler: null }, + { type: DescriptorType.SAMPLER_TEXTURE, gpuBuffer: null, gpuTexture: null, gpuSampler: null }], + descriptorIndices: this._gpuDescriptorSetLayout.descriptorIndices, + }; + + this._drawInfo = new DrawInfo(4, 0, 0, 0, 0, 0, 0); + this._glFramebuffer = WebGLDeviceManager.instance.gl.createFramebuffer(); + } + + public destroy () { + if (this._glFramebuffer) { + WebGLDeviceManager.instance.gl.deleteFramebuffer(this._glFramebuffer); + this._glFramebuffer = null; + } + if (this._gpuVertexBuffer) { + WebGLDeviceManager.instance.memoryStatus.bufferSize -= this._gpuVertexBuffer.size; + WebGLCmdFuncDestroyBuffer(WebGLDeviceManager.instance, this._gpuVertexBuffer); + } + if (this._gpuUniformBuffer) { + WebGLDeviceManager.instance.memoryStatus.bufferSize -= this._gpuUniformBuffer.size; + WebGLCmdFuncDestroyBuffer(WebGLDeviceManager.instance, this._gpuUniformBuffer); + } + if (this._gpuShader) { + WebGLCmdFuncDestroyShader(WebGLDeviceManager.instance, this._gpuShader); + } + if (this._gpuInputAssembler) { + WebGLCmdFuncDestroyInputAssembler(WebGLDeviceManager.instance, this._gpuInputAssembler); + } + } + + public draw (gpuTextureSrc: IWebGLGPUTexture, gpuTextureDst: IWebGLGPUTexture, regions: TextureBlit[], filter: Filter) { + const device = WebGLDeviceManager.instance; + const { gl } = device; + const stateCache = device.stateCache; + const origFramebuffer = stateCache.glFramebuffer; + + gl.viewport(0, 0, gpuTextureDst.width, gpuTextureDst.height); + gl.scissor(0, 0, gpuTextureDst.width, gpuTextureDst.height); + + if (!this._uniformBuffer || !this._gpuUniformBuffer || !this._gpuPipelineState + || !this._gpuInputAssembler || !this._gpuDescriptorSet || !this._drawInfo) { + return; + } + + const descriptor = this._gpuDescriptorSet.gpuDescriptors[1]; + descriptor.gpuTexture = gpuTextureSrc; + descriptor.gpuSampler = filter === Filter.POINT ? this._gpuPointSampler : this._gpuLinearSampler; + + const formatInfo = FormatInfos[gpuTextureDst.format]; + let attachment = gl.COLOR_ATTACHMENT0; + if (formatInfo.hasStencil) { + attachment = gl.DEPTH_STENCIL_ATTACHMENT; + } else if (formatInfo.hasDepth) { + attachment = gl.DEPTH_ATTACHMENT; + } + + const regionIndices = regions.map((_, i) => i); + regionIndices.sort((a, b) => regions[a].srcSubres.mipLevel - regions[b].srcSubres.mipLevel); + + if (stateCache.glFramebuffer !== this._glFramebuffer) { + device.gl.bindFramebuffer(device.gl.FRAMEBUFFER, this._glFramebuffer); + stateCache.glFramebuffer = this._glFramebuffer; + } + + let mipLevel = regions[0].dstSubres.mipLevel; + if (gpuTextureDst.glTexture) { + gl.framebufferTexture2D(gl.FRAMEBUFFER, attachment, gpuTextureDst.glTarget, gpuTextureDst.glTexture, mipLevel); + } else { + gl.framebufferRenderbuffer(gl.FRAMEBUFFER, attachment, gl.RENDERBUFFER, gpuTextureDst.glRenderbuffer); + } + + for (let i = 0; i < regionIndices.length; ++i) { + const region = regions[regionIndices[i]]; + + if (gpuTextureSrc.glTexture && mipLevel !== region.srcSubres.mipLevel) { + mipLevel = region.srcSubres.mipLevel; + gl.framebufferTexture2D(gl.FRAMEBUFFER, attachment, gpuTextureDst.glTarget, gpuTextureDst.glTexture, mipLevel); + } + + const srcWidth = gpuTextureSrc.width; + const srcHeight = gpuTextureSrc.height; + const dstWidth = gpuTextureDst.width; + const dstHeight = gpuTextureDst.height; + + this._uniformBuffer[0] = region.srcExtent.width / srcWidth; + this._uniformBuffer[1] = region.srcExtent.height / srcHeight; + this._uniformBuffer[2] = region.srcOffset.x / srcWidth; + this._uniformBuffer[3] = region.srcOffset.y / srcHeight; + this._uniformBuffer[4] = region.dstExtent.width / dstWidth; + this._uniformBuffer[5] = region.dstExtent.height / dstHeight; + this._uniformBuffer[6] = region.dstOffset.x / dstWidth; + this._uniformBuffer[7] = region.dstOffset.y / dstHeight; + + WebGLCmdFuncUpdateBuffer(device, this._gpuUniformBuffer, this._uniformBuffer, 0, + this._uniformBuffer.length * Float32Array.BYTES_PER_ELEMENT); + WebGLCmdFuncBindStates(device, this._gpuPipelineState, this._gpuInputAssembler, [this._gpuDescriptorSet], [], null!); + WebGLCmdFuncDraw(device, this._drawInfo); + } + + // restore fbo + if (stateCache.glFramebuffer !== origFramebuffer) { + device.gl.bindFramebuffer(device.gl.FRAMEBUFFER, origFramebuffer); + stateCache.glFramebuffer = origFramebuffer; + } + // restore viewport + const origViewport = stateCache.viewport; + gl.viewport(origViewport.left, origViewport.top, origViewport.width, origViewport.height); + // restore scissor + const origScissor = stateCache.scissorRect; + gl.scissor(origScissor.x, origScissor.y, origScissor.width, origScissor.height); + } +} diff --git a/cocos/gfx/webgl/webgl-input-assembler.ts b/cocos/gfx/webgl/webgl-input-assembler.ts index cde9930071..61f41e570f 100644 --- a/cocos/gfx/webgl/webgl-input-assembler.ts +++ b/cocos/gfx/webgl/webgl-input-assembler.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { InputAssemblerInfo } from '../base/define'; import { InputAssembler } from '../base/input-assembler'; diff --git a/cocos/gfx/webgl/webgl-pipeline-layout.ts b/cocos/gfx/webgl/webgl-pipeline-layout.ts index ae2082e3f7..56f904a9fd 100644 --- a/cocos/gfx/webgl/webgl-pipeline-layout.ts +++ b/cocos/gfx/webgl/webgl-pipeline-layout.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { PipelineLayout } from '../base/pipeline-layout'; import { IWebGLGPUPipelineLayout, IWebGLGPUDescriptorSetLayout } from './webgl-gpu-objects'; diff --git a/cocos/gfx/webgl/webgl-pipeline-state.ts b/cocos/gfx/webgl/webgl-pipeline-state.ts index 7768c27632..63701a9b10 100644 --- a/cocos/gfx/webgl/webgl-pipeline-state.ts +++ b/cocos/gfx/webgl/webgl-pipeline-state.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { PipelineState, PipelineStateInfo } from '../base/pipeline-state'; import { IWebGLGPUPipelineState } from './webgl-gpu-objects'; diff --git a/cocos/gfx/webgl/webgl-primary-command-buffer.ts b/cocos/gfx/webgl/webgl-primary-command-buffer.ts index 79d13a6808..e6f34ad3c9 100644 --- a/cocos/gfx/webgl/webgl-primary-command-buffer.ts +++ b/cocos/gfx/webgl/webgl-primary-command-buffer.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,18 +20,18 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Buffer } from '../base/buffer'; import { CommandBuffer } from '../base/command-buffer'; -import { BufferSource, DrawInfo, BufferTextureCopy, Color, Rect, BufferUsageBit, Viewport } from '../base/define'; +import { BufferSource, DrawInfo, BufferTextureCopy, Color, Rect, BufferUsageBit, Viewport, TextureBlit, Filter } from '../base/define'; import { Framebuffer } from '../base/framebuffer'; import { InputAssembler } from '../base/input-assembler'; import { Texture } from '../base/texture'; import { WebGLBuffer } from './webgl-buffer'; import { WebGLCommandBuffer } from './webgl-command-buffer'; import { - WebGLCmdFuncBeginRenderPass, WebGLCmdFuncBindStates, WebGLCmdFuncCopyBuffersToTexture, + WebGLCmdFuncBeginRenderPass, WebGLCmdFuncBindStates, WebGLCmdFuncBlitTexture, WebGLCmdFuncCopyBuffersToTexture, WebGLCmdFuncDraw, WebGLCmdFuncExecuteCmds, WebGLCmdFuncUpdateBuffer } from './webgl-commands'; import { WebGLFramebuffer } from './webgl-framebuffer'; import { WebGLTexture } from './webgl-texture'; @@ -66,7 +65,7 @@ export class WebGLPrimaryCommandBuffer extends WebGLCommandBuffer { const info = 'drawInfo' in infoOrAssembler ? infoOrAssembler.drawInfo : infoOrAssembler; - WebGLCmdFuncDraw(WebGLDeviceManager.instance, info as DrawInfo); + WebGLCmdFuncDraw(WebGLDeviceManager.instance, info); ++this._numDrawCalls; this._numInstances += info.instanceCount; @@ -170,4 +169,10 @@ export class WebGLPrimaryCommandBuffer extends WebGLCommandBuffer { this._curGPUDescriptorSets, this._curDynamicOffsets, this._curDynamicStates); this._isStateInvalied = false; } + + public blitTexture (srcTexture: Readonly, dstTexture: Texture, regions: Readonly, filter: Filter): void { + const gpuTextureSrc = (srcTexture as WebGLTexture).gpuTexture; + const gpuTextureDst = (dstTexture as WebGLTexture).gpuTexture; + WebGLCmdFuncBlitTexture(WebGLDeviceManager.instance, gpuTextureSrc, gpuTextureDst, regions, filter); + } } diff --git a/cocos/gfx/webgl/webgl-queue.ts b/cocos/gfx/webgl/webgl-queue.ts index 23214ec7d6..1cbccb4aa4 100644 --- a/cocos/gfx/webgl/webgl-queue.ts +++ b/cocos/gfx/webgl/webgl-queue.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { QueueInfo } from '../base/define'; import { CommandBuffer } from '../base/command-buffer'; diff --git a/cocos/gfx/webgl/webgl-render-pass.ts b/cocos/gfx/webgl/webgl-render-pass.ts index c8fffd9fdb..328d5cf97c 100644 --- a/cocos/gfx/webgl/webgl-render-pass.ts +++ b/cocos/gfx/webgl/webgl-render-pass.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { RenderPassInfo } from '../base/define'; import { RenderPass } from '../base/render-pass'; diff --git a/cocos/gfx/webgl/webgl-shader.ts b/cocos/gfx/webgl/webgl-shader.ts index 4c965514d2..e7d5ed0779 100644 --- a/cocos/gfx/webgl/webgl-shader.ts +++ b/cocos/gfx/webgl/webgl-shader.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ShaderInfo } from '../base/define'; import { Shader } from '../base/shader'; diff --git a/cocos/gfx/webgl/webgl-state-cache.ts b/cocos/gfx/webgl/webgl-state-cache.ts index 7b0f228f17..c5a52cd647 100644 --- a/cocos/gfx/webgl/webgl-state-cache.ts +++ b/cocos/gfx/webgl/webgl-state-cache.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Rect, Viewport } from '../base/define'; import { BlendState, DepthStencilState, RasterizerState } from '../base/pipeline-state'; diff --git a/cocos/gfx/webgl/webgl-swapchain.ts b/cocos/gfx/webgl/webgl-swapchain.ts index d737d0552d..408d3e7dc5 100644 --- a/cocos/gfx/webgl/webgl-swapchain.ts +++ b/cocos/gfx/webgl/webgl-swapchain.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ALIPAY, RUNTIME_BASED, BYTEDANCE, WECHAT, LINKSURE, QTT, COCOSPLAY, HUAWEI, EDITOR, VIVO, TAOBAO } from 'internal:constants'; import { systemInfo } from 'pal/system-info'; @@ -34,6 +33,7 @@ import { Swapchain } from '../base/swapchain'; import { IWebGLExtensions, WebGLDeviceManager } from './webgl-define'; import { macro, warnID, warn, debug } from '../../core'; import { BrowserType, OS } from '../../../pal/system-info/enum-type'; +import { IWebGLBlitManager } from './webgl-gpu-objects'; const eventWebGLContextLost = 'webglcontextlost'; @@ -219,6 +219,10 @@ export class WebGLSwapchain extends Swapchain { return this._extensions as IWebGLExtensions; } + get blitManager () { + return this._blitManager!; + } + public stateCache: WebGLStateCache = new WebGLStateCache(); public cmdAllocator: WebGLCommandAllocator = new WebGLCommandAllocator(); public nullTex2D: WebGLTexture = null!; @@ -227,6 +231,7 @@ export class WebGLSwapchain extends Swapchain { private _canvas: HTMLCanvasElement | null = null; private _webGLContextLostHandler: ((event: Event) => void) | null = null; private _extensions: IWebGLExtensions | null = null; + private _blitManager: IWebGLBlitManager | null = null; public initialize (info: Readonly) { this._canvas = info.windowHandle; @@ -310,6 +315,7 @@ export class WebGLSwapchain extends Swapchain { [nullTexBuff, nullTexBuff, nullTexBuff, nullTexBuff, nullTexBuff, nullTexBuff], this.nullTexCube, [nullTexRegion], ); + this._blitManager = new IWebGLBlitManager(); } public destroy (): void { @@ -328,6 +334,11 @@ export class WebGLSwapchain extends Swapchain { this.nullTexCube = null!; } + if (this._blitManager) { + this._blitManager.destroy(); + this._blitManager = null!; + } + this._extensions = null; this._canvas = null; } diff --git a/cocos/gfx/webgl/webgl-texture.ts b/cocos/gfx/webgl/webgl-texture.ts index 9bf47430e5..bcb7370953 100644 --- a/cocos/gfx/webgl/webgl-texture.ts +++ b/cocos/gfx/webgl/webgl-texture.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { FormatSurfaceSize, TextureInfo, TextureViewInfo, IsPowerOf2, ISwapchainTextureInfo, TextureUsageBit, FormatInfos } from '../base/define'; import { Texture } from '../base/texture'; diff --git a/cocos/gfx/webgl2/states/webgl2-sampler.ts b/cocos/gfx/webgl2/states/webgl2-sampler.ts index 6aa359d81f..4c75f7960a 100644 --- a/cocos/gfx/webgl2/states/webgl2-sampler.ts +++ b/cocos/gfx/webgl2/states/webgl2-sampler.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { SamplerInfo } from '../../base/define'; import { Sampler } from '../../base/states/sampler'; diff --git a/cocos/gfx/webgl2/webgl2-buffer.ts b/cocos/gfx/webgl2/webgl2-buffer.ts index b9e533947d..6353ed5d42 100644 --- a/cocos/gfx/webgl2/webgl2-buffer.ts +++ b/cocos/gfx/webgl2/webgl2-buffer.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Buffer } from '../base/buffer'; import { BufferUsageBit, BufferSource, BufferInfo, BufferViewInfo } from '../base/define'; diff --git a/cocos/gfx/webgl2/webgl2-command-allocator.ts b/cocos/gfx/webgl2/webgl2-command-allocator.ts index c88569bce8..2a977eefd4 100644 --- a/cocos/gfx/webgl2/webgl2-command-allocator.ts +++ b/cocos/gfx/webgl2/webgl2-command-allocator.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,12 +20,13 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { CachedArray } from '../../core'; import { WebGL2CmdBeginRenderPass, WebGL2CmdBindStates, + WebGL2CmdBlitTexture, WebGL2CmdCopyBufferToTexture, WebGL2CmdDraw, WebGL2CmdObject, @@ -109,6 +109,7 @@ export class WebGL2CommandAllocator { public drawCmdPool: WebGL2CommandPool; public updateBufferCmdPool: WebGL2CommandPool; public copyBufferToTextureCmdPool: WebGL2CommandPool; + public blitTextureCmdPool: WebGL2CommandPool; constructor () { this.beginRenderPassCmdPool = new WebGL2CommandPool(WebGL2CmdBeginRenderPass, 1); @@ -116,6 +117,7 @@ export class WebGL2CommandAllocator { this.drawCmdPool = new WebGL2CommandPool(WebGL2CmdDraw, 1); this.updateBufferCmdPool = new WebGL2CommandPool(WebGL2CmdUpdateBuffer, 1); this.copyBufferToTextureCmdPool = new WebGL2CommandPool(WebGL2CmdCopyBufferToTexture, 1); + this.blitTextureCmdPool = new WebGL2CommandPool(WebGL2CmdBlitTexture, 1); } public clearCmds (cmdPackage: WebGL2CmdPackage) { @@ -144,6 +146,11 @@ export class WebGL2CommandAllocator { cmdPackage.copyBufferToTextureCmds.clear(); } + if (cmdPackage.blitTextureCmds.length) { + this.blitTextureCmdPool.freeCmds(cmdPackage.blitTextureCmds); + cmdPackage.blitTextureCmds.clear(); + } + cmdPackage.cmds.clear(); } @@ -153,5 +160,6 @@ export class WebGL2CommandAllocator { this.drawCmdPool.release(); this.updateBufferCmdPool.release(); this.copyBufferToTextureCmdPool.release(); + this.blitTextureCmdPool.release(); } } diff --git a/cocos/gfx/webgl2/webgl2-command-buffer.ts b/cocos/gfx/webgl2/webgl2-command-buffer.ts index 33656f5182..39698b185f 100644 --- a/cocos/gfx/webgl2/webgl2-command-buffer.ts +++ b/cocos/gfx/webgl2/webgl2-command-buffer.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { DescriptorSet } from '../base/descriptor-set'; import { Buffer } from '../base/buffer'; @@ -31,7 +30,7 @@ import { CommandBufferType, StencilFace, BufferSource, CommandBufferInfo, - BufferTextureCopy, Color, Rect, Viewport, DrawInfo, DynamicStates, + BufferTextureCopy, Color, Rect, Viewport, DrawInfo, DynamicStates, TextureBlit, Filter, } from '../base/define'; import { Framebuffer } from '../base/framebuffer'; import { InputAssembler } from '../base/input-assembler'; @@ -44,6 +43,7 @@ import { WebGL2Cmd, WebGL2CmdBeginRenderPass, WebGL2CmdBindStates, + WebGL2CmdBlitTexture, WebGL2CmdCopyBufferToTexture, WebGL2CmdDraw, WebGL2CmdPackage, @@ -400,6 +400,12 @@ export class WebGL2CommandBuffer extends CommandBuffer { this.cmdPackage.copyBufferToTextureCmds.push(cmd); } + for (let c = 0; c < webGL2CmdBuff.cmdPackage.blitTextureCmds.length; ++c) { + const cmd = webGL2CmdBuff.cmdPackage.blitTextureCmds.array[c]; + ++cmd.refCount; + this.cmdPackage.blitTextureCmds.push(cmd); + } + this.cmdPackage.cmds.concat(webGL2CmdBuff.cmdPackage.cmds.array); this._numDrawCalls += webGL2CmdBuff._numDrawCalls; @@ -426,4 +432,17 @@ export class WebGL2CommandBuffer extends CommandBuffer { this._isStateInvalied = false; } + + public blitTexture (srcTexture: Readonly, dstTexture: Texture, regions: Readonly, filter: Filter): void { + const blitTextureCmd = this._cmdAllocator.blitTextureCmdPool.alloc(WebGL2CmdBlitTexture); + blitTextureCmd.srcTexture = (srcTexture as WebGL2Texture).gpuTexture; + blitTextureCmd.dstTexture = (dstTexture as WebGL2Texture).gpuTexture; + blitTextureCmd.regions = regions as TextureBlit[]; + blitTextureCmd.filter = filter; + + ++this._numDrawCalls; + + this.cmdPackage.blitTextureCmds.push(blitTextureCmd); + this.cmdPackage.cmds.push(WebGL2Cmd.BLIT_TEXTURE); + } } diff --git a/cocos/gfx/webgl2/webgl2-commands.ts b/cocos/gfx/webgl2/webgl2-commands.ts index 7c4e99313b..c2a1dab489 100644 --- a/cocos/gfx/webgl2/webgl2-commands.ts +++ b/cocos/gfx/webgl2/webgl2-commands.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,18 +20,13 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { BufferUsageBit, ColorMask, CullMode, DynamicStateFlagBit, Filter, Format, TextureType, Type, FormatInfo, FormatInfos, FormatSize, LoadOp, MemoryUsageBit, SampleCount, ShaderStageFlagBit, TextureFlagBit, Color, Rect, BufferTextureCopy, BufferSource, DrawInfo, IndirectBuffer, UniformBlock, DynamicStates, - UniformSamplerTexture, - alignTo, - Extent, - formatAlignment, - getTypedArrayConstructor, - Offset, + UniformSamplerTexture, alignTo, Extent, formatAlignment, getTypedArrayConstructor, Offset, TextureBlit, } from '../base/define'; import { WebGL2EXT } from './webgl2-define'; import { WebGL2CommandAllocator } from './webgl2-command-allocator'; @@ -52,7 +46,7 @@ import { IWebGL2GPUUniformSamplerTexture, IWebGL2GPURenderPass, } from './webgl2-gpu-objects'; -import { CachedArray, error, errorID, debug } from '../../core'; +import { CachedArray, error, errorID, debug, cclegacy } from '../../core'; const WebGLWraps: GLenum[] = [ 0x2901, // WebGLRenderingContext.REPEAT @@ -627,6 +621,7 @@ export enum WebGL2Cmd { DRAW, UPDATE_BUFFER, COPY_BUFFER_TO_TEXTURE, + BLIT_TEXTURE, COUNT, } @@ -721,6 +716,23 @@ export class WebGL2CmdCopyBufferToTexture extends WebGL2CmdObject { } } +export class WebGL2CmdBlitTexture extends WebGL2CmdObject { + public srcTexture: IWebGL2GPUTexture | null = null; + public dstTexture: IWebGL2GPUTexture | null = null; + public regions: TextureBlit[] = []; + public filter: Filter = Filter.LINEAR; + + constructor () { + super(WebGL2Cmd.BLIT_TEXTURE); + } + + public clear () { + this.srcTexture = null; + this.dstTexture = null; + this.regions.length = 0; + } +} + export class WebGL2CmdPackage { public cmds: CachedArray = new CachedArray(1); public beginRenderPassCmds: CachedArray = new CachedArray(1); @@ -728,6 +740,7 @@ export class WebGL2CmdPackage { public drawCmds: CachedArray = new CachedArray(1); public updateBufferCmds: CachedArray = new CachedArray(1); public copyBufferToTextureCmds: CachedArray = new CachedArray(1); + public blitTextureCmds: CachedArray = new CachedArray(1); public clearCmds (allocator: WebGL2CommandAllocator) { if (this.beginRenderPassCmds.length) { @@ -755,6 +768,11 @@ export class WebGL2CmdPackage { this.copyBufferToTextureCmds.clear(); } + if (this.blitTextureCmds.length) { + allocator.blitTextureCmdPool.freeCmds(this.blitTextureCmds); + this.blitTextureCmds.clear(); + } + this.cmds.clear(); } } @@ -1596,6 +1614,8 @@ export function WebGL2CmdFuncCreateShader (device: WebGL2Device, gpuShader: IWeb gpuShader.glProgram = glProgram; + const enableEffectImport = !!(cclegacy.rendering && cclegacy.rendering.enableEffectImport); + // link program for (let k = 0; k < gpuShader.gpuStages.length; k++) { const gpuStage = gpuShader.gpuStages[k]; @@ -1686,7 +1706,10 @@ export function WebGL2CmdFuncCreateShader (device: WebGL2Device, gpuShader: IWeb // blockIdx = gl.getUniformBlockIndex(gpuShader.glProgram, blockName); blockIdx = b; blockSize = gl.getActiveUniformBlockParameter(gpuShader.glProgram, blockIdx, gl.UNIFORM_BLOCK_DATA_SIZE); - const glBinding = block.binding + (device.bindingMappings.blockOffsets[block.set] || 0); + + const glBinding = enableEffectImport + ? block.flattened + : block.binding + (device.bindingMappings.blockOffsets[block.set] || 0); gl.uniformBlockBinding(gpuShader.glProgram, blockIdx, glBinding); @@ -1735,27 +1758,42 @@ export function WebGL2CmdFuncCreateShader (device: WebGL2Device, gpuShader: IWeb const glActiveSamplerLocations: WebGLUniformLocation[] = []; const texUnitCacheMap = device.stateCache.texUnitCacheMap; - let flexibleSetBaseOffset = 0; - for (let i = 0; i < gpuShader.blocks.length; ++i) { - if (gpuShader.blocks[i].set === device.bindingMappings.flexibleSet) { - flexibleSetBaseOffset++; + if (!enableEffectImport) { + let flexibleSetBaseOffset = 0; + for (let i = 0; i < gpuShader.blocks.length; ++i) { + if (gpuShader.blocks[i].set === device.bindingMappings.flexibleSet) { + flexibleSetBaseOffset++; + } } - } - let arrayOffset = 0; - for (let i = 0; i < gpuShader.samplerTextures.length; ++i) { - const sampler = gpuShader.samplerTextures[i]; - const glLoc = gl.getUniformLocation(gpuShader.glProgram, sampler.name); - // wEcHAT just returns { id: -1 } for non-existing names /eyerolling - if (glLoc && (glLoc as any).id !== -1) { - glActiveSamplers.push(gpuShader.glSamplerTextures[i]); - glActiveSamplerLocations.push(glLoc); + let arrayOffset = 0; + for (let i = 0; i < gpuShader.samplerTextures.length; ++i) { + const sampler = gpuShader.samplerTextures[i]; + const glLoc = gl.getUniformLocation(gpuShader.glProgram, sampler.name); + // wEcHAT just returns { id: -1 } for non-existing names /eyerolling + if (glLoc && (glLoc as any).id !== -1) { + glActiveSamplers.push(gpuShader.glSamplerTextures[i]); + glActiveSamplerLocations.push(glLoc); + } + if (texUnitCacheMap[sampler.name] === undefined) { + let binding = sampler.binding + device.bindingMappings.samplerTextureOffsets[sampler.set] + arrayOffset; + if (sampler.set === device.bindingMappings.flexibleSet) { binding -= flexibleSetBaseOffset; } + texUnitCacheMap[sampler.name] = binding % device.capabilities.maxTextureUnits; + arrayOffset += sampler.count - 1; + } } - if (texUnitCacheMap[sampler.name] === undefined) { - let binding = sampler.binding + device.bindingMappings.samplerTextureOffsets[sampler.set] + arrayOffset; - if (sampler.set === device.bindingMappings.flexibleSet) { binding -= flexibleSetBaseOffset; } - texUnitCacheMap[sampler.name] = binding % device.capabilities.maxTextureUnits; - arrayOffset += sampler.count - 1; + } else { + for (let i = 0; i < gpuShader.samplerTextures.length; ++i) { + const sampler = gpuShader.samplerTextures[i]; + const glLoc = gl.getUniformLocation(gpuShader.glProgram, sampler.name); + // wEcHAT just returns { id: -1 } for non-existing names /eyerolling + if (glLoc && (glLoc as any).id !== -1) { + glActiveSamplers.push(gpuShader.glSamplerTextures[i]); + glActiveSamplerLocations.push(glLoc); + } + if (texUnitCacheMap[sampler.name] === undefined) { + texUnitCacheMap[sampler.name] = sampler.flattened % device.capabilities.maxTextureUnits; + } } } @@ -2707,6 +2745,11 @@ export function WebGL2CmdFuncExecuteCmds (device: WebGL2Device, cmdPackage: WebG WebGL2CmdFuncCopyBuffersToTexture(device, cmd5.buffers, cmd5.gpuTexture as IWebGL2GPUTexture, cmd5.regions); break; } + case WebGL2Cmd.BLIT_TEXTURE: { + const cmd6 = cmdPackage.blitTextureCmds.array[cmdId]; + WebGL2CmdFuncBlitTexture(device, cmd6.srcTexture as IWebGL2GPUTexture, cmd6.dstTexture as IWebGL2GPUTexture, cmd6.regions, cmd6.filter); + break; + } default: } // switch } // for @@ -3104,3 +3147,111 @@ export function WebGL2CmdFuncBlitFramebuffer ( gl.bindFramebuffer(gl.FRAMEBUFFER, device.stateCache.glFramebuffer); } } + +export function WebGL2CmdFuncBlitTexture ( + device: WebGL2Device, + src: Readonly, + dst: IWebGL2GPUTexture, + regions: Readonly, + filter: Filter, +) { + const { gl } = device; + const cache = device.stateCache; + const blitManager = device.blitManager; + if (!blitManager) { + return; + } + + // logic different from native, because framebuffer-map is not implemented in webgl2 + const glFilter = (filter === Filter.LINEAR || filter === Filter.ANISOTROPIC) ? gl.LINEAR : gl.NEAREST; + + const srcFramebuffer = blitManager.srcFramebuffer; + const dstFramebuffer = blitManager.dstFramebuffer; + const origReadFBO = cache.glReadFramebuffer; + const origDrawFBO = cache.glFramebuffer; + + let srcMip = regions[0].srcSubres.mipLevel; + let dstMip = regions[0].dstSubres.mipLevel; + + const blitInfo = (formatInfo: FormatInfo) => { + let mask = 0; + let attachment = gl.COLOR_ATTACHMENT0; + + if (formatInfo.hasStencil) { + attachment = gl.DEPTH_STENCIL_ATTACHMENT; + } else if (formatInfo.hasDepth) { + attachment = gl.DEPTH_ATTACHMENT; + } + + if (formatInfo.hasDepth || formatInfo.hasStencil) { + if (formatInfo.hasDepth) { + mask |= gl.DEPTH_BUFFER_BIT; + } + if (formatInfo.hasStencil) { + mask |= gl.STENCIL_BUFFER_BIT; + } + } else { + mask |= gl.COLOR_BUFFER_BIT; + } + + return { mask, attachment }; + }; + + const regionIndices = regions.map((_, i) => i); + regionIndices.sort((a, b) => regions[a].srcSubres.mipLevel - regions[b].srcSubres.mipLevel); + + const { mask: srcMask, attachment: srcAttachment } = blitInfo(FormatInfos[src.format]); + const { mask: dstMask, attachment: dstAttachment } = blitInfo(FormatInfos[dst.format]); + + if (cache.glReadFramebuffer !== srcFramebuffer) { + gl.bindFramebuffer(gl.READ_FRAMEBUFFER, srcFramebuffer); + cache.glReadFramebuffer = srcFramebuffer; + } + + if (cache.glFramebuffer !== dstFramebuffer) { + gl.bindFramebuffer(gl.DRAW_FRAMEBUFFER, dstFramebuffer); + cache.glFramebuffer = dstFramebuffer; + } + + if (src.glTexture) { + gl.framebufferTexture2D(gl.READ_FRAMEBUFFER, srcAttachment, src.glTarget, src.glTexture, srcMip); + } else { + gl.framebufferRenderbuffer(gl.READ_FRAMEBUFFER, srcAttachment, gl.RENDERBUFFER, src.glRenderbuffer); + } + + if (dst.glTexture) { + gl.framebufferTexture2D(gl.DRAW_FRAMEBUFFER, dstAttachment, dst.glTarget, dst.glTexture, dstMip); + } else { + gl.framebufferRenderbuffer(gl.DRAW_FRAMEBUFFER, dstAttachment, gl.RENDERBUFFER, dst.glRenderbuffer); + } + + for (let i = 0; i < regionIndices.length; i++) { + const region = regions[regionIndices[i]]; + + if (src.glTexture && srcMip !== region.srcSubres.mipLevel) { + srcMip = region.srcSubres.mipLevel; + gl.framebufferTexture2D(gl.READ_FRAMEBUFFER, srcAttachment, src.glTarget, src.glTexture, srcMip); + } + + if (dst.glTexture && dstMip !== region.dstSubres.mipLevel) { + dstMip = region.dstSubres.mipLevel; + gl.framebufferTexture2D(gl.DRAW_FRAMEBUFFER, dstAttachment, dst.glTarget, dst.glTexture, dstMip); + } + + gl.blitFramebuffer( + region.srcOffset.x, region.srcOffset.y, region.srcOffset.x + region.srcExtent.width, region.srcOffset.y + region.srcExtent.height, + region.dstOffset.x, region.dstOffset.y, region.dstOffset.x + region.dstExtent.width, region.dstOffset.y + region.dstExtent.height, + srcMask, glFilter, + ); + } + + // restore fbo state + if (cache.glReadFramebuffer !== origReadFBO) { + gl.bindFramebuffer(gl.READ_FRAMEBUFFER, origReadFBO); + cache.glReadFramebuffer = origReadFBO; + } + if (cache.glFramebuffer !== origDrawFBO) { + gl.bindFramebuffer(gl.DRAW_FRAMEBUFFER, origDrawFBO); + cache.glFramebuffer = origDrawFBO; + } +} diff --git a/cocos/gfx/webgl2/webgl2-define.ts b/cocos/gfx/webgl2/webgl2-define.ts index 92553146d5..6bfe159345 100644 --- a/cocos/gfx/webgl2/webgl2-define.ts +++ b/cocos/gfx/webgl2/webgl2-define.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { WebGL2Device } from './webgl2-device'; diff --git a/cocos/gfx/webgl2/webgl2-descriptor-set-layout.ts b/cocos/gfx/webgl2/webgl2-descriptor-set-layout.ts index 2899f18376..66af8f6050 100644 --- a/cocos/gfx/webgl2/webgl2-descriptor-set-layout.ts +++ b/cocos/gfx/webgl2/webgl2-descriptor-set-layout.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { DescriptorSetLayoutInfo, DESCRIPTOR_DYNAMIC_TYPE } from '../base/define'; import { DescriptorSetLayout } from '../base/descriptor-set-layout'; diff --git a/cocos/gfx/webgl2/webgl2-descriptor-set.ts b/cocos/gfx/webgl2/webgl2-descriptor-set.ts index fc3cedff48..65cd99a234 100644 --- a/cocos/gfx/webgl2/webgl2-descriptor-set.ts +++ b/cocos/gfx/webgl2/webgl2-descriptor-set.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { DescriptorSet } from '../base/descriptor-set'; import { WebGL2Buffer } from './webgl2-buffer'; diff --git a/cocos/gfx/webgl2/webgl2-device.ts b/cocos/gfx/webgl2/webgl2-device.ts index a9d20b4bcd..cb2e5ee814 100644 --- a/cocos/gfx/webgl2/webgl2-device.ts +++ b/cocos/gfx/webgl2/webgl2-device.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,8 +20,9 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ +import { systemInfo } from 'pal/system-info'; import { DescriptorSet } from '../base/descriptor-set'; import { DescriptorSetLayout } from '../base/descriptor-set-layout'; import { PipelineLayout } from '../base/pipeline-layout'; @@ -62,10 +62,11 @@ import { WebGL2CmdFuncCopyTextureToBuffers, WebGL2CmdFuncCopyBuffersToTexture, W import { GeneralBarrier } from '../base/states/general-barrier'; import { TextureBarrier } from '../base/states/texture-barrier'; import { BufferBarrier } from '../base/states/buffer-barrier'; -import { debug } from '../../core'; +import { debug, sys } from '../../core'; import { Swapchain } from '../base/swapchain'; import { IWebGL2Extensions, WebGL2DeviceManager } from './webgl2-define'; import { IWebGL2BindingMapping } from './webgl2-gpu-objects'; +import { BrowserType, OS } from '../../../pal/system-info/enum-type'; export class WebGL2Device extends Device { get gl () { @@ -96,6 +97,10 @@ export class WebGL2Device extends Device { return this._bindingMappings!; } + get blitManager () { + return this._swapchain!.blitManager; + } + private _swapchain: WebGL2Swapchain | null = null; private _context: WebGL2RenderingContext | null = null; private _bindingMappings: IWebGL2BindingMapping | null = null; @@ -143,6 +148,13 @@ export class WebGL2Device extends Device { this._caps.maxVertexAttributes = gl.getParameter(gl.MAX_VERTEX_ATTRIBS); this._caps.maxVertexUniformVectors = gl.getParameter(gl.MAX_VERTEX_UNIFORM_VECTORS); + // WECHAT browser in IOS implementation of WebGL2 exist bugs. + // iOS15.5 or higher 15.x version the max valid vertex uniform vectors is 256. + // iOS16.0 or higher 16.x version the max valid vertex uniform vectors is 520? + // So limit wechat browser in IOS using vertex uniform vectors no more than 256. + if (systemInfo.os === OS.IOS && sys.browserType === BrowserType.WECHAT) { + this._caps.maxVertexUniformVectors = 256; + } this._caps.maxFragmentUniformVectors = gl.getParameter(gl.MAX_FRAGMENT_UNIFORM_VECTORS); this._caps.maxTextureUnits = gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS); this._caps.maxVertexTextureUnits = gl.getParameter(gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS); diff --git a/cocos/gfx/webgl2/webgl2-framebuffer.ts b/cocos/gfx/webgl2/webgl2-framebuffer.ts index 1b7694bf15..596a3295bb 100644 --- a/cocos/gfx/webgl2/webgl2-framebuffer.ts +++ b/cocos/gfx/webgl2/webgl2-framebuffer.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { FramebufferInfo } from '../base/define'; import { Framebuffer } from '../base/framebuffer'; diff --git a/cocos/gfx/webgl2/webgl2-gpu-objects.ts b/cocos/gfx/webgl2/webgl2-gpu-objects.ts index 9b1f2b380e..2bd6428242 100644 --- a/cocos/gfx/webgl2/webgl2-gpu-objects.ts +++ b/cocos/gfx/webgl2/webgl2-gpu-objects.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { nextPow2 } from '../../core'; import { @@ -30,6 +29,7 @@ import { ColorAttachment, DepthStencilAttachment, UniformBlock, UniformSamplerTexture, DescriptorSetLayoutBinding, } from '../base/define'; import { BlendState, DepthStencilState, RasterizerState } from '../base/pipeline-state'; +import { WebGL2DeviceManager } from './webgl2-define'; import { WebGL2Device } from './webgl2-device'; export class WebGL2IndirectDrawInfos { @@ -190,7 +190,7 @@ export interface IWebGL2GPUSampler { glWrapT: GLenum; glWrapR: GLenum; - getGLSampler (device: WebGL2Device, minLod: number, maxLod: number) : WebGLSampler; + getGLSampler (device: WebGL2Device, minLod: number, maxLod: number): WebGLSampler; } export interface IWebGL2GPUInput { @@ -321,3 +321,28 @@ export interface IWebGL2GPUInputAssembler { glIndexType: GLenum; glVAOs: Map; } + +export class IWebGL2BlitManager { + private _srcFramebuffer: WebGLFramebuffer | null; + private _dstFramebuffer: WebGLFramebuffer | null; + + get srcFramebuffer () { + return this._srcFramebuffer; + } + + get dstFramebuffer () { + return this._dstFramebuffer; + } + + constructor () { + const { gl } = WebGL2DeviceManager.instance; + this._srcFramebuffer = gl.createFramebuffer(); + this._dstFramebuffer = gl.createFramebuffer(); + } + + destroy () { + const { gl } = WebGL2DeviceManager.instance; + gl.deleteFramebuffer(this._srcFramebuffer); + gl.deleteFramebuffer(this._dstFramebuffer); + } +} diff --git a/cocos/gfx/webgl2/webgl2-input-assembler.ts b/cocos/gfx/webgl2/webgl2-input-assembler.ts index 9e7584b7ec..bb066d3936 100644 --- a/cocos/gfx/webgl2/webgl2-input-assembler.ts +++ b/cocos/gfx/webgl2/webgl2-input-assembler.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { InputAssemblerInfo } from '../base/define'; import { InputAssembler } from '../base/input-assembler'; diff --git a/cocos/gfx/webgl2/webgl2-pipeline-layout.ts b/cocos/gfx/webgl2/webgl2-pipeline-layout.ts index ca87272824..4e21412ba0 100644 --- a/cocos/gfx/webgl2/webgl2-pipeline-layout.ts +++ b/cocos/gfx/webgl2/webgl2-pipeline-layout.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { PipelineLayout } from '../base/pipeline-layout'; import { IWebGL2GPUPipelineLayout, IWebGL2GPUDescriptorSetLayout } from './webgl2-gpu-objects'; diff --git a/cocos/gfx/webgl2/webgl2-pipeline-state.ts b/cocos/gfx/webgl2/webgl2-pipeline-state.ts index 4286cf2ac0..d4175e8113 100644 --- a/cocos/gfx/webgl2/webgl2-pipeline-state.ts +++ b/cocos/gfx/webgl2/webgl2-pipeline-state.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { PipelineState, PipelineStateInfo } from '../base/pipeline-state'; import { IWebGL2GPUPipelineState } from './webgl2-gpu-objects'; diff --git a/cocos/gfx/webgl2/webgl2-primary-command-buffer.ts b/cocos/gfx/webgl2/webgl2-primary-command-buffer.ts index 12ce356652..d6b5db5e44 100644 --- a/cocos/gfx/webgl2/webgl2-primary-command-buffer.ts +++ b/cocos/gfx/webgl2/webgl2-primary-command-buffer.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,18 +20,18 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Buffer } from '../base/buffer'; import { CommandBuffer } from '../base/command-buffer'; -import { BufferUsageBit, BufferTextureCopy, Color, Rect, BufferSource, DrawInfo, Viewport } from '../base/define'; +import { BufferUsageBit, BufferTextureCopy, Color, Rect, BufferSource, DrawInfo, Viewport, TextureBlit, Filter } from '../base/define'; import { Framebuffer } from '../base/framebuffer'; import { InputAssembler } from '../base/input-assembler'; import { Texture } from '../base/texture'; import { WebGL2Buffer } from './webgl2-buffer'; import { WebGL2CommandBuffer } from './webgl2-command-buffer'; import { - WebGL2CmdFuncBeginRenderPass, WebGL2CmdFuncBindStates, WebGL2CmdFuncCopyBuffersToTexture, + WebGL2CmdFuncBeginRenderPass, WebGL2CmdFuncBindStates, WebGL2CmdFuncBlitTexture, WebGL2CmdFuncCopyBuffersToTexture, WebGL2CmdFuncDraw, WebGL2CmdFuncExecuteCmds, WebGL2CmdFuncUpdateBuffer } from './webgl2-commands'; import { WebGL2Framebuffer } from './webgl2-framebuffer'; import { WebGL2Texture } from './webgl2-texture'; @@ -170,4 +169,10 @@ export class WebGL2PrimaryCommandBuffer extends WebGL2CommandBuffer { this._curGPUDescriptorSets, this._curDynamicOffsets, this._curDynamicStates); this._isStateInvalied = false; } + + public blitTexture (srcTexture: Readonly, dstTexture: Texture, regions: Readonly, filter: Filter): void { + const gpuTextureSrc = (srcTexture as WebGL2Texture).gpuTexture; + const gpuTextureDst = (dstTexture as WebGL2Texture).gpuTexture; + WebGL2CmdFuncBlitTexture(WebGL2DeviceManager.instance, gpuTextureSrc, gpuTextureDst, regions, filter); + } } diff --git a/cocos/gfx/webgl2/webgl2-queue.ts b/cocos/gfx/webgl2/webgl2-queue.ts index 700ec83b5a..117d8cc8af 100644 --- a/cocos/gfx/webgl2/webgl2-queue.ts +++ b/cocos/gfx/webgl2/webgl2-queue.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { QueueInfo } from '../base/define'; import { CommandBuffer } from '../base/command-buffer'; diff --git a/cocos/gfx/webgl2/webgl2-render-pass.ts b/cocos/gfx/webgl2/webgl2-render-pass.ts index 7f91011c45..c307a5fab1 100644 --- a/cocos/gfx/webgl2/webgl2-render-pass.ts +++ b/cocos/gfx/webgl2/webgl2-render-pass.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { RenderPassInfo } from '../base/define'; import { RenderPass } from '../base/render-pass'; diff --git a/cocos/gfx/webgl2/webgl2-shader.ts b/cocos/gfx/webgl2/webgl2-shader.ts index 767261b055..94f92ccb1a 100644 --- a/cocos/gfx/webgl2/webgl2-shader.ts +++ b/cocos/gfx/webgl2/webgl2-shader.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ShaderInfo } from '../base/define'; import { Shader } from '../base/shader'; diff --git a/cocos/gfx/webgl2/webgl2-state-cache.ts b/cocos/gfx/webgl2/webgl2-state-cache.ts index ac1fa5af42..37ee443dcc 100644 --- a/cocos/gfx/webgl2/webgl2-state-cache.ts +++ b/cocos/gfx/webgl2/webgl2-state-cache.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Rect, Viewport } from '../base/define'; import { BlendState, DepthStencilState, RasterizerState } from '../base/pipeline-state'; diff --git a/cocos/gfx/webgl2/webgl2-swapchain.ts b/cocos/gfx/webgl2/webgl2-swapchain.ts index 7bd03b12ea..8165f847e5 100644 --- a/cocos/gfx/webgl2/webgl2-swapchain.ts +++ b/cocos/gfx/webgl2/webgl2-swapchain.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { EDITOR } from 'internal:constants'; import { systemInfo } from 'pal/system-info'; @@ -33,6 +32,7 @@ import { Format, TextureInfo, TextureFlagBit, TextureType, import { Swapchain } from '../base/swapchain'; import { IWebGL2Extensions, WebGL2DeviceManager } from './webgl2-define'; import { OS } from '../../../pal/system-info/enum-type'; +import { IWebGL2BlitManager } from './webgl2-gpu-objects'; const eventWebGLContextLost = 'webglcontextlost'; @@ -160,6 +160,10 @@ export class WebGL2Swapchain extends Swapchain { return this._extensions as IWebGL2Extensions; } + get blitManager () { + return this._blitManager; + } + public stateCache: WebGL2StateCache = new WebGL2StateCache(); public nullTex2D: WebGL2Texture = null!; public nullTexCube: WebGL2Texture = null!; @@ -167,6 +171,7 @@ export class WebGL2Swapchain extends Swapchain { private _canvas: HTMLCanvasElement | null = null; private _webGL2ContextLostHandler: ((event: Event) => void) | null = null; private _extensions: IWebGL2Extensions | null = null; + private _blitManager: IWebGL2BlitManager | null = null; public initialize (info: Readonly) { this._canvas = info.windowHandle; @@ -247,6 +252,8 @@ export class WebGL2Swapchain extends Swapchain { [nullTexBuff, nullTexBuff, nullTexBuff, nullTexBuff, nullTexBuff, nullTexBuff], this.nullTexCube, [nullTexRegion], ); + + this._blitManager = new IWebGL2BlitManager(); } public destroy (): void { @@ -265,6 +272,11 @@ export class WebGL2Swapchain extends Swapchain { this.nullTexCube = null!; } + if (this._blitManager) { + this._blitManager.destroy(); + this._blitManager = null; + } + this._extensions = null; this._canvas = null; } diff --git a/cocos/gfx/webgl2/webgl2-texture.ts b/cocos/gfx/webgl2/webgl2-texture.ts index 2d8f30b4cc..eef170be1d 100644 --- a/cocos/gfx/webgl2/webgl2-texture.ts +++ b/cocos/gfx/webgl2/webgl2-texture.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { FormatSurfaceSize, TextureInfo, IsPowerOf2, TextureViewInfo, ISwapchainTextureInfo, diff --git a/cocos/gfx/webgpu/override.ts b/cocos/gfx/webgpu/override.ts index 62d5d0dde2..f0190ac39d 100644 --- a/cocos/gfx/webgpu/override.ts +++ b/cocos/gfx/webgpu/override.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + /* eslint-disable @typescript-eslint/no-unused-expressions */ /* eslint-disable import/no-mutable-exports */ import { WEBGPU } from 'internal:constants'; diff --git a/cocos/gfx/webgpu/webgpu-define.ts b/cocos/gfx/webgpu/webgpu-define.ts index df9874d047..73283fd086 100644 --- a/cocos/gfx/webgpu/webgpu-define.ts +++ b/cocos/gfx/webgpu/webgpu-define.ts @@ -3,20 +3,19 @@ /* eslint-disable @typescript-eslint/no-unsafe-return */ /* eslint-disable func-names */ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -25,7 +24,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { WEBGPU } from 'internal:constants'; import { gfx, webgpuAdapter, glslalgWasmModule, promiseForWebGPUInstantiation } from '../../webgpu/instantiated'; @@ -36,6 +35,9 @@ import { DeviceInfo, BufferTextureCopy, ShaderInfo, ShaderStageFlagBit, TextureViewInfo, TextureInfo, DrawInfo, BufferViewInfo, BufferInfo, BufferUsageBit, IndirectBuffer, } from '../base/define'; +import { ccwindow } from '../../core/global-exports'; + + WEBGPU && promiseForWebGPUInstantiation.then(() => { const originDeviceInitializeFunc = Device.prototype.initialize; Device.prototype.initialize = function (info: DeviceInfo) { @@ -170,7 +172,7 @@ WEBGPU && promiseForWebGPUInstantiation.then(() => { buffers[i] = data; } else if (texImages[i] instanceof HTMLImageElement || texImages[i] instanceof ImageBitmap) { const img = texImages[i]; - const canvas = document.createElement('canvas'); + const canvas = ccwindow.document.createElement('canvas'); canvas.width = img.width; canvas.height = img.height; const ctx = canvas.getContext('2d'); diff --git a/cocos/gi/light-probe/auto-placement.ts b/cocos/gi/light-probe/auto-placement.ts index edb0d0df2e..c728c0d39e 100644 --- a/cocos/gi/light-probe/auto-placement.ts +++ b/cocos/gi/light-probe/auto-placement.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Vec3, Enum } from '../../core'; diff --git a/cocos/gi/light-probe/delaunay.jsb.ts b/cocos/gi/light-probe/delaunay.jsb.ts index ddb218e756..6dab49911c 100644 --- a/cocos/gi/light-probe/delaunay.jsb.ts +++ b/cocos/gi/light-probe/delaunay.jsb.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/gi/light-probe/delaunay.ts b/cocos/gi/light-probe/delaunay.ts index 4f48fea0bd..e82235e195 100644 --- a/cocos/gi/light-probe/delaunay.ts +++ b/cocos/gi/light-probe/delaunay.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Mat3, EPSILON, Vec3, _decorator } from '../../core'; const { ccclass, serializable } = _decorator; diff --git a/cocos/gi/light-probe/index.ts b/cocos/gi/light-probe/index.ts index 465a7c3932..ba9de19d79 100644 --- a/cocos/gi/light-probe/index.ts +++ b/cocos/gi/light-probe/index.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ export * from './auto-placement'; export * from './delaunay'; diff --git a/cocos/gi/light-probe/light-probe-group.ts b/cocos/gi/light-probe/light-probe-group.ts index bfe8ab9356..adc5adfd6f 100644 --- a/cocos/gi/light-probe/light-probe-group.ts +++ b/cocos/gi/light-probe/light-probe-group.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, @@ -182,7 +181,6 @@ export class LightProbeGroup extends Component { return; } - this.node.on(NodeEventType.ANCESTOR_TRANSFORM_CHANGED, this.onAncestorTransformChanged, this); const changed = this.node.scene.globals.lightProbeInfo.addNode(this.node); if (changed) { this.onProbeChanged(); @@ -202,7 +200,6 @@ export class LightProbeGroup extends Component { if (changed) { this.onProbeChanged(); } - this.node.off(NodeEventType.ANCESTOR_TRANSFORM_CHANGED, this.onAncestorTransformChanged, this); } public generateLightProbes () { @@ -230,13 +227,4 @@ export class LightProbeGroup extends Component { this.node.emit(NodeEventType.LIGHT_PROBE_CHANGED); } } - - private onAncestorTransformChanged () { - if (!this.node) { - return; - } - - this.node.updateWorldTransform(); - this.onProbeChanged(false); - } } diff --git a/cocos/gi/light-probe/light-probe.jsb.ts b/cocos/gi/light-probe/light-probe.jsb.ts index 6ebc57543a..7f78479545 100644 --- a/cocos/gi/light-probe/light-probe.jsb.ts +++ b/cocos/gi/light-probe/light-probe.jsb.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/gi/light-probe/light-probe.ts b/cocos/gi/light-probe/light-probe.ts index 211544f044..650f5a824a 100644 --- a/cocos/gi/light-probe/light-probe.ts +++ b/cocos/gi/light-probe/light-probe.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, serializable, type } from 'cc.decorator'; import { Vertex, Tetrahedron, Delaunay } from './delaunay'; diff --git a/cocos/gi/light-probe/polynomial-solver.ts b/cocos/gi/light-probe/polynomial-solver.ts index a1e25db6ab..0882de614c 100644 --- a/cocos/gi/light-probe/polynomial-solver.ts +++ b/cocos/gi/light-probe/polynomial-solver.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ export class PolynomialSolver { /** diff --git a/cocos/gi/light-probe/sh.ts b/cocos/gi/light-probe/sh.ts index 719e8865fe..28e90d9d1a 100644 --- a/cocos/gi/light-probe/sh.ts +++ b/cocos/gi/light-probe/sh.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Vec4, Vec3, cclegacy, assertIsTrue } from '../../core'; diff --git a/cocos/input/deprecated-3.3.0.ts b/cocos/input/deprecated-3.3.0.ts index 9c76e8dfaa..f7f128c450 100644 --- a/cocos/input/deprecated-3.3.0.ts +++ b/cocos/input/deprecated-3.3.0.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { deprecateModuleExportedName } from '../core'; diff --git a/cocos/input/deprecated-3.4.0.ts b/cocos/input/deprecated-3.4.0.ts index 5d71191f58..d0d325a542 100644 --- a/cocos/input/deprecated-3.4.0.ts +++ b/cocos/input/deprecated-3.4.0.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { deprecateModuleExportedName } from '../core'; diff --git a/cocos/input/deprecated.ts b/cocos/input/deprecated.ts index c8b577bdaf..a3e0dc8b75 100644 --- a/cocos/input/deprecated.ts +++ b/cocos/input/deprecated.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import './deprecated-3.3.0'; import './deprecated-3.4.0'; diff --git a/cocos/input/index.ts b/cocos/input/index.ts index 2e15540123..c361ae957e 100644 --- a/cocos/input/index.ts +++ b/cocos/input/index.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import './deprecated'; export { input, Input } from './input'; diff --git a/cocos/input/input.ts b/cocos/input/input.ts index 4c74a2315a..151d4070c5 100644 --- a/cocos/input/input.ts +++ b/cocos/input/input.ts @@ -1,16 +1,16 @@ /* Copyright (c) 2011-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. diff --git a/cocos/input/system-event.ts b/cocos/input/system-event.ts index a7d1f14d94..bab303b25c 100644 --- a/cocos/input/system-event.ts +++ b/cocos/input/system-event.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/input/types/acceleration.ts b/cocos/input/types/acceleration.ts index 073b825566..0dead54501 100644 --- a/cocos/input/types/acceleration.ts +++ b/cocos/input/types/acceleration.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + /** * @en the device accelerometer reports values for each axis in units of g-force. * @zh 设备重力传感器传递的各个轴的数据。 diff --git a/cocos/input/types/event-enum.ts b/cocos/input/types/event-enum.ts index b2c9eed4ee..c8c2a8d4e8 100644 --- a/cocos/input/types/event-enum.ts +++ b/cocos/input/types/event-enum.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { cclegacy } from '../../core'; import { NodeEventType } from '../../scene-graph/node-event'; diff --git a/cocos/input/types/event/event-acceleration.ts b/cocos/input/types/event/event-acceleration.ts index 60e4bd7d46..f91c716d65 100644 --- a/cocos/input/types/event/event-acceleration.ts +++ b/cocos/input/types/event/event-acceleration.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/input/types/event/event-gamepad.ts b/cocos/input/types/event/event-gamepad.ts index fb87002d77..b0c03b71a9 100644 --- a/cocos/input/types/event/event-gamepad.ts +++ b/cocos/input/types/event/event-gamepad.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2022 Chukong Technologies Inc. - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/input/types/event/event-handheld.ts b/cocos/input/types/event/event-handheld.ts index 7415d3829f..131b3cbde3 100644 --- a/cocos/input/types/event/event-handheld.ts +++ b/cocos/input/types/event/event-handheld.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/input/types/event/event-handle.ts b/cocos/input/types/event/event-handle.ts index 689a6122b1..5074ac9045 100644 --- a/cocos/input/types/event/event-handle.ts +++ b/cocos/input/types/event/event-handle.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/input/types/event/event-hmd.ts b/cocos/input/types/event/event-hmd.ts index b31852e342..9806dee9a7 100644 --- a/cocos/input/types/event/event-hmd.ts +++ b/cocos/input/types/event/event-hmd.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/input/types/event/event-keyboard.ts b/cocos/input/types/event/event-keyboard.ts index 8f38f056b0..2cfab5486e 100644 --- a/cocos/input/types/event/event-keyboard.ts +++ b/cocos/input/types/event/event-keyboard.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/input/types/event/event-mouse.ts b/cocos/input/types/event/event-mouse.ts index d2a1aaefef..34d4de39bd 100644 --- a/cocos/input/types/event/event-mouse.ts +++ b/cocos/input/types/event/event-mouse.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/input/types/event/event-touch.ts b/cocos/input/types/event/event-touch.ts index 6e90d6a38f..9a27ee688f 100644 --- a/cocos/input/types/event/event-touch.ts +++ b/cocos/input/types/event/event-touch.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/input/types/event/event.ts b/cocos/input/types/event/event.ts index f712bcb091..6fc215ebda 100644 --- a/cocos/input/types/event/event.ts +++ b/cocos/input/types/event/event.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/input/types/event/index.ts b/cocos/input/types/event/index.ts index b7f9248693..cfd5cc0aa2 100644 --- a/cocos/input/types/event/index.ts +++ b/cocos/input/types/event/index.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + export * from './event'; export * from './event-acceleration'; export * from './event-keyboard'; diff --git a/cocos/input/types/index.ts b/cocos/input/types/index.ts index dba72c1a0b..87a171aea3 100644 --- a/cocos/input/types/index.ts +++ b/cocos/input/types/index.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + export * from './event/index'; export * from './acceleration'; export { SystemEventType } from './event-enum'; diff --git a/cocos/input/types/key-code.ts b/cocos/input/types/key-code.ts index e7edf595ae..a68557cf02 100644 --- a/cocos/input/types/key-code.ts +++ b/cocos/input/types/key-code.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + /** * @en Enum type of keyCode for key event * @zh 按键事件的按键码 diff --git a/cocos/input/types/touch.ts b/cocos/input/types/touch.ts index 0da6e7da74..e79daaaf35 100644 --- a/cocos/input/types/touch.ts +++ b/cocos/input/types/touch.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/misc/camera-component.ts b/cocos/misc/camera-component.ts index 8fdf776ca5..c69a319ad8 100644 --- a/cocos/misc/camera-component.ts +++ b/cocos/misc/camera-component.ts @@ -1,15 +1,15 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. diff --git a/cocos/misc/deprecated.ts b/cocos/misc/deprecated.ts index 17b56cb1b0..9d7f7c3b5c 100644 --- a/cocos/misc/deprecated.ts +++ b/cocos/misc/deprecated.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/misc/index.ts b/cocos/misc/index.ts index de07f74a90..566c0cffcb 100644 --- a/cocos/misc/index.ts +++ b/cocos/misc/index.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2018-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2018-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/misc/intersect.ts b/cocos/misc/intersect.ts index 8b3fb88a53..c5c72da77c 100644 --- a/cocos/misc/intersect.ts +++ b/cocos/misc/intersect.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Vec3, Mat4, IVec3Like, geometry } from '../core'; import { PrimitiveMode } from '../gfx'; diff --git a/cocos/misc/missing-script.ts b/cocos/misc/missing-script.ts index a5fbed73a5..7f83263f20 100644 --- a/cocos/misc/missing-script.ts +++ b/cocos/misc/missing-script.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/misc/model-renderer.ts b/cocos/misc/model-renderer.ts index b543b4e558..4aa82d2c4c 100644 --- a/cocos/misc/model-renderer.ts +++ b/cocos/misc/model-renderer.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, serializable, diff --git a/cocos/misc/prefab-link.ts b/cocos/misc/prefab-link.ts index fba6bc7720..98e2b99f48 100644 --- a/cocos/misc/prefab-link.ts +++ b/cocos/misc/prefab-link.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { _decorator } from '../core'; import { Component } from '../scene-graph/component'; import { Prefab } from '../scene-graph/prefab'; diff --git a/cocos/misc/renderer.ts b/cocos/misc/renderer.ts index 1357f47b36..f613532463 100644 --- a/cocos/misc/renderer.ts +++ b/cocos/misc/renderer.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { EDITOR } from 'internal:constants'; import { Material } from '../asset/assets/material'; diff --git a/cocos/native-binding/impl.ts b/cocos/native-binding/impl.ts index 644f4344bc..bab25b5f37 100644 --- a/cocos/native-binding/impl.ts +++ b/cocos/native-binding/impl.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,33 +20,33 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { sys } from "../core"; import { NATIVE } from 'internal:constants'; const globalJsb = globalThis.jsb ?? {}; -if( NATIVE ){ +if (NATIVE) { Object.defineProperty(globalJsb, 'reflection', { - get () { + get() { if (globalJsb.__bridge !== undefined) return globalJsb.__bridge; if (globalThis.JavascriptJavaBridge && (sys.os === sys.OS.ANDROID || sys.os === sys.OS.OHOS)) { globalJsb.__bridge = new globalThis.JavascriptJavaBridge(); } else if (globalThis.JavaScriptObjCBridge && (sys.os === sys.OS.IOS || sys.os === sys.OS.OSX)) { globalJsb.__bridge = new globalThis.JavaScriptObjCBridge(); - } else { + } else { globalJsb.__bridge = null; } return globalJsb.__bridge; }, enumerable: true, configurable: true, - set (value) { + set(value) { globalJsb.__bridge = value; }, }); Object.defineProperty(globalJsb, 'bridge', { - get () { + get() { if (globalJsb.__ccbridge !== undefined) return globalJsb.__ccbridge; - if (window.ScriptNativeBridge && sys.os === sys.OS.ANDROID || sys.os === sys.OS.IOS || sys.os === sys.OS.OSX || sys.os === sys.OS.OHOS) { + if (globalThis.ScriptNativeBridge && sys.os === sys.OS.ANDROID || sys.os === sys.OS.IOS || sys.os === sys.OS.OSX || sys.os === sys.OS.OHOS) { globalJsb.__ccbridge = new ScriptNativeBridge(); } else { globalJsb.__ccbridge = null; @@ -56,13 +55,13 @@ if( NATIVE ){ }, enumerable: true, configurable: true, - set (value) { + set(value) { globalJsb.__ccbridge = value; }, }); const JsbBridgeWrapper = { eventMap: new Map(), - addNativeEventListener (eventName, listener) { + addNativeEventListener(eventName, listener) { if (!this.eventMap.get(eventName)) { this.eventMap.set(eventName, []); } @@ -71,13 +70,13 @@ if( NATIVE ){ arr.push(listener); } }, - dispatchEventToNative (eventName, arg) { + dispatchEventToNative(eventName, arg) { globalJsb.bridge.sendToNative(eventName, arg); }, - removeAllListenersForEvent (eventName) { + removeAllListenersForEvent(eventName) { return this.eventMap.delete(eventName); }, - removeNativeEventListener (eventName, listener) { + removeNativeEventListener(eventName, listener) { const arr = this.eventMap.get(eventName); if (!arr) { return false; @@ -90,10 +89,10 @@ if( NATIVE ){ } return true; }, - removeAllListeners () { + removeAllListeners() { this.eventMap.clear(); }, - triggerEvent (eventName, arg) { + triggerEvent(eventName, arg) { const arr = this.eventMap.get(eventName); if (!arr) { console.error(`${eventName} does not exist`); @@ -102,12 +101,12 @@ if( NATIVE ){ arr.map((listener) => listener.call(null, arg)); }, }; - + Object.defineProperty(globalJsb, 'jsbBridgeWrapper', { - get () { + get() { if (globalJsb.__JsbBridgeWrapper !== undefined) return globalJsb.__JsbBridgeWrapper; - - if (window.ScriptNativeBridge && sys.os === sys.OS.ANDROID || sys.os === sys.OS.IOS || sys.os === sys.OS.OSX || sys.os === sys.OS.OHOS) { + + if (globalThis.ScriptNativeBridge && sys.os === sys.OS.ANDROID || sys.os === sys.OS.IOS || sys.os === sys.OS.OSX || sys.os === sys.OS.OHOS) { globalJsb.__JsbBridgeWrapper = JsbBridgeWrapper; globalJsb.bridge.onNative = (methodName, arg1) => { console.log(`Trigger event: ${methodName} with argeter: ${arg1}`); @@ -120,21 +119,21 @@ if( NATIVE ){ }, enumerable: true, configurable: true, - set (value) { + set(value) { globalJsb.__JsbBridgeWrapper = value; }, }); const originSaveImageData = globalJsb.saveImageData; globalJsb.saveImageData = (data: Uint8Array, width: number, height: number, filePath: string) => { - return new Promise((resolve, reject) => { - originSaveImageData(data, width, height, filePath, (isSuccess) => { - if (isSuccess) { - resolve(); - } else { - reject(); - } - }) - }); + return new Promise((resolve, reject) => { + originSaveImageData(data, width, height, filePath, (isSuccess) => { + if (isSuccess) { + resolve(); + } else { + reject(); + } + }) + }); } } diff --git a/cocos/native-binding/index.ts b/cocos/native-binding/index.ts index dd14463b7c..b790a34370 100644 --- a/cocos/native-binding/index.ts +++ b/cocos/native-binding/index.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + /* eslint-disable @typescript-eslint/no-namespace */ import type { Color, Vec2 } from '../core'; diff --git a/cocos/particle-2d/define.ts b/cocos/particle-2d/define.ts index dbe0a8cba3..a57244e52e 100644 --- a/cocos/particle-2d/define.ts +++ b/cocos/particle-2d/define.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Enum } from '../core'; diff --git a/cocos/particle-2d/index.ts b/cocos/particle-2d/index.ts index 609a833f94..8237c15d0d 100644 --- a/cocos/particle-2d/index.ts +++ b/cocos/particle-2d/index.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ParticleSystem2D } from './particle-system-2d'; import { MotionStreak } from './motion-streak-2d'; diff --git a/cocos/particle-2d/motion-streak-2d-assembler.ts b/cocos/particle-2d/motion-streak-2d-assembler.ts index aa66a767a1..1b6593ed71 100644 --- a/cocos/particle-2d/motion-streak-2d-assembler.ts +++ b/cocos/particle-2d/motion-streak-2d-assembler.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2017-2018 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Chukong Aipu reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -22,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { JSB } from 'internal:constants'; import { IAssembler, IAssemblerManager } from '../2d/renderer/base'; diff --git a/cocos/particle-2d/motion-streak-2d.ts b/cocos/particle-2d/motion-streak-2d.ts index f91e88d7a1..c983004979 100644 --- a/cocos/particle-2d/motion-streak-2d.ts +++ b/cocos/particle-2d/motion-streak-2d.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -22,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, executeInEditMode, serializable, playOnFocus, menu, help, editable, type } from 'cc.decorator'; import { EDITOR } from 'internal:constants'; diff --git a/cocos/particle-2d/particle-asset.ts b/cocos/particle-2d/particle-asset.ts index 4901f02e48..9b75d43b85 100644 --- a/cocos/particle-2d/particle-asset.ts +++ b/cocos/particle-2d/particle-asset.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/particle-2d/particle-simulator-2d.ts b/cocos/particle-2d/particle-simulator-2d.ts index 3086fbf268..73d92f70f0 100644 --- a/cocos/particle-2d/particle-simulator-2d.ts +++ b/cocos/particle-2d/particle-simulator-2d.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2018-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2018-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Vec2, Color, js, misc } from '../core'; import { vfmtPosUvColor, getComponentPerVertex } from '../2d/renderer/vertex-format'; diff --git a/cocos/particle-2d/particle-system-2d-assembler.ts b/cocos/particle-2d/particle-system-2d-assembler.ts index 8c9243cc7c..bb8032428d 100644 --- a/cocos/particle-2d/particle-system-2d-assembler.ts +++ b/cocos/particle-2d/particle-system-2d-assembler.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2017-2018 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Chukong Aipu reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -22,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { IAssembler, IAssemblerManager } from '../2d/renderer/base'; import { ParticleSystem2D } from './particle-system-2d'; diff --git a/cocos/particle-2d/particle-system-2d.ts b/cocos/particle-2d/particle-system-2d.ts index 0d7842ff21..87837d4d4f 100644 --- a/cocos/particle-2d/particle-system-2d.ts +++ b/cocos/particle-2d/particle-system-2d.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -22,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, editable, type, displayOrder, menu, @@ -42,6 +41,7 @@ import codec from '../../external/compression/ZipUtils'; import { IBatcher } from '../2d/renderer/i-batcher'; import { assetManager, builtinResMgr } from '../asset/asset-manager'; import { PositionType, EmitterMode, DURATION_INFINITY, START_RADIUS_EQUAL_TO_END_RADIUS, START_SIZE_EQUAL_TO_END_SIZE } from './define'; +import { ccwindow } from '../core/global-exports'; /** * Image formats @@ -982,7 +982,7 @@ export class ParticleSystem2D extends UIRenderer { return false; } - const canvasObj = document.createElement('canvas'); + const canvasObj = ccwindow.document.createElement('canvas'); if (imageFormat === ImageFormat.PNG) { const myPngObj = new PNGReader(buffer); myPngObj.render(canvasObj); diff --git a/cocos/particle-2d/png-reader.ts b/cocos/particle-2d/png-reader.ts index 49270dba34..6276ef4229 100644 --- a/cocos/particle-2d/png-reader.ts +++ b/cocos/particle-2d/png-reader.ts @@ -3,16 +3,16 @@ Copyright (c) 2008-2010 Ricardo Quesada Copyright (c) 2011-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -24,7 +24,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { getError } from '../core'; import zlib from '../../external/compression/zlib.min'; diff --git a/cocos/particle-2d/tiff-reader.ts b/cocos/particle-2d/tiff-reader.ts index 1a362c9b41..bf4eec4127 100644 --- a/cocos/particle-2d/tiff-reader.ts +++ b/cocos/particle-2d/tiff-reader.ts @@ -5,20 +5,19 @@ Copyright (c) 2008-2010 Ricardo Quesada Copyright (c) 2011-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -27,9 +26,10 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { getError, logID } from '../core'; +import { ccwindow } from '../core/global-exports'; interface IFile { type: string, @@ -252,7 +252,7 @@ export class TiffReader { * @returns {*} */ parseTIFF (tiffData, canvas) { - canvas = canvas || document.createElement('canvas'); + canvas = canvas || ccwindow.document.createElement('canvas'); this._tiffData = tiffData; this._canvas = canvas; diff --git a/cocos/particle/animator/color-overtime.ts b/cocos/particle/animator/color-overtime.ts index c361ad1941..53d63832fb 100644 --- a/cocos/particle/animator/color-overtime.ts +++ b/cocos/particle/animator/color-overtime.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, displayOrder, type, serializable } from 'cc.decorator'; import { pseudoRandom } from '../../core'; diff --git a/cocos/particle/animator/curve-range.ts b/cocos/particle/animator/curve-range.ts index 677f588841..b18ea5d007 100644 --- a/cocos/particle/animator/curve-range.ts +++ b/cocos/particle/animator/curve-range.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass } from 'cc.decorator'; import { EDITOR } from 'internal:constants'; diff --git a/cocos/particle/animator/force-overtime.ts b/cocos/particle/animator/force-overtime.ts index 6d57384d61..ee94021b48 100644 --- a/cocos/particle/animator/force-overtime.ts +++ b/cocos/particle/animator/force-overtime.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, tooltip, displayOrder, range, type, serializable } from 'cc.decorator'; import { pseudoRandom, Quat, Vec3 } from '../../core'; diff --git a/cocos/particle/animator/gradient-range.ts b/cocos/particle/animator/gradient-range.ts index 60eab4d274..89eed4b1ce 100644 --- a/cocos/particle/animator/gradient-range.ts +++ b/cocos/particle/animator/gradient-range.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, type, serializable, editable } from 'cc.decorator'; import { EDITOR } from 'internal:constants'; diff --git a/cocos/particle/animator/gradient.ts b/cocos/particle/animator/gradient.ts index 3470458a65..d50482b6f1 100644 --- a/cocos/particle/animator/gradient.ts +++ b/cocos/particle/animator/gradient.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { CCClass, Color, lerp, repeat, Enum } from '../../core'; diff --git a/cocos/particle/animator/limit-velocity-overtime.ts b/cocos/particle/animator/limit-velocity-overtime.ts index f46788d885..4991785d2f 100644 --- a/cocos/particle/animator/limit-velocity-overtime.ts +++ b/cocos/particle/animator/limit-velocity-overtime.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, tooltip, displayOrder, range, type, serializable, visible } from 'cc.decorator'; import { lerp, pseudoRandom, Vec3, Mat4, Quat } from '../../core'; diff --git a/cocos/particle/animator/noise-module.ts b/cocos/particle/animator/noise-module.ts index 30bafb6eee..5b3e60d23b 100644 --- a/cocos/particle/animator/noise-module.ts +++ b/cocos/particle/animator/noise-module.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { CCFloat, CCInteger, _decorator, Vec3 } from '../../core'; import { ParticleNoise } from '../noise'; diff --git a/cocos/particle/animator/optimized-curve.ts b/cocos/particle/animator/optimized-curve.ts index 3f7562dc04..19aa08a696 100644 --- a/cocos/particle/animator/optimized-curve.ts +++ b/cocos/particle/animator/optimized-curve.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { repeat, geometry } from '../../core'; diff --git a/cocos/particle/animator/rotation-overtime.ts b/cocos/particle/animator/rotation-overtime.ts index c2529f4837..0d2e87bb61 100644 --- a/cocos/particle/animator/rotation-overtime.ts +++ b/cocos/particle/animator/rotation-overtime.ts @@ -1,19 +1,18 @@ /* eslint-disable max-len */ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -22,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, tooltip, displayOrder, range, type, radian, serializable, visible } from 'cc.decorator'; import { Mat4, pseudoRandom, Quat, Vec3 } from '../../core'; diff --git a/cocos/particle/animator/size-overtime.ts b/cocos/particle/animator/size-overtime.ts index 6738a391ca..d499a9e235 100644 --- a/cocos/particle/animator/size-overtime.ts +++ b/cocos/particle/animator/size-overtime.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, tooltip, displayOrder, type, serializable, range, visible } from 'cc.decorator'; import { pseudoRandom, Vec3 } from '../../core'; diff --git a/cocos/particle/animator/texture-animation.ts b/cocos/particle/animator/texture-animation.ts index b4c9329f0f..b3efbff3f7 100644 --- a/cocos/particle/animator/texture-animation.ts +++ b/cocos/particle/animator/texture-animation.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, tooltip, displayOrder, type, formerlySerializedAs, serializable, range } from 'cc.decorator'; import { lerp, pseudoRandom, repeat, Enum } from '../../core'; diff --git a/cocos/particle/animator/velocity-overtime.ts b/cocos/particle/animator/velocity-overtime.ts index 0adfaf422b..d08d6f9a1b 100644 --- a/cocos/particle/animator/velocity-overtime.ts +++ b/cocos/particle/animator/velocity-overtime.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, tooltip, displayOrder, range, type, serializable } from 'cc.decorator'; import { Mat4, pseudoRandom, Quat, Vec3 } from '../../core'; diff --git a/cocos/particle/billboard.ts b/cocos/particle/billboard.ts index cb2fe94194..46384bc78e 100644 --- a/cocos/particle/billboard.ts +++ b/cocos/particle/billboard.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, help, executeInEditMode, menu, tooltip, type, serializable } from 'cc.decorator'; import { builtinResMgr } from '../asset/asset-manager'; diff --git a/cocos/particle/burst.ts b/cocos/particle/burst.ts index 071f29836b..42f078422e 100644 --- a/cocos/particle/burst.ts +++ b/cocos/particle/burst.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, type, serializable, editable, range } from 'cc.decorator'; import { repeat } from '../core/math'; diff --git a/cocos/particle/deprecated.ts b/cocos/particle/deprecated.ts index ba627946d5..7acc7cacb9 100644 --- a/cocos/particle/deprecated.ts +++ b/cocos/particle/deprecated.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { removeProperty, replaceProperty, js, cclegacy } from '../core'; import Burst from './burst'; diff --git a/cocos/particle/emitter/shape-module.ts b/cocos/particle/emitter/shape-module.ts index 920639d443..be5e08bc18 100644 --- a/cocos/particle/emitter/shape-module.ts +++ b/cocos/particle/emitter/shape-module.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, tooltip, displayOrder, type, formerlySerializedAs, serializable, visible, range } from 'cc.decorator'; import { Mat4, Quat, Vec2, Vec3, clamp, pingPong, random, randomRange, repeat, toDegree, toRadian } from '../../core'; diff --git a/cocos/particle/enum.ts b/cocos/particle/enum.ts index 5f59fec19e..d81dbc7116 100644 --- a/cocos/particle/enum.ts +++ b/cocos/particle/enum.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Enum } from '../core'; diff --git a/cocos/particle/index.ts b/cocos/particle/index.ts index bc6b2891ba..0f7c56cb29 100644 --- a/cocos/particle/index.ts +++ b/cocos/particle/index.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Billboard } from './billboard'; import { Line } from './line'; diff --git a/cocos/particle/line.ts b/cocos/particle/line.ts index 55e306ab89..23724398cb 100644 --- a/cocos/particle/line.ts +++ b/cocos/particle/line.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, help, executeInEditMode, menu, tooltip, displayOrder, type, serializable, range } from 'cc.decorator'; import { Material, Texture2D } from '../asset/assets'; diff --git a/cocos/particle/models/line-model.ts b/cocos/particle/models/line-model.ts index ef82da13cc..0102e0b6b7 100644 --- a/cocos/particle/models/line-model.ts +++ b/cocos/particle/models/line-model.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { JSB } from 'internal:constants'; import { RenderingSubMesh } from '../../asset/assets/rendering-sub-mesh'; diff --git a/cocos/particle/models/particle-batch-model.ts b/cocos/particle/models/particle-batch-model.ts index f9fe4603c8..8a7d5fae87 100644 --- a/cocos/particle/models/particle-batch-model.ts +++ b/cocos/particle/models/particle-batch-model.ts @@ -1,19 +1,18 @@ /* eslint-disable max-len */ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/particle/noise.ts b/cocos/particle/noise.ts index 905d1d5c69..0e78272567 100644 --- a/cocos/particle/noise.ts +++ b/cocos/particle/noise.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Vec2, Vec3 } from '../core/math'; diff --git a/cocos/particle/particle-culler.ts b/cocos/particle/particle-culler.ts index 6b1d04ab2d..f3ce82d43f 100644 --- a/cocos/particle/particle-culler.ts +++ b/cocos/particle/particle-culler.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { IParticleModule, Particle, PARTICLE_MODULE_ORDER } from './particle'; import { Node } from '../scene-graph/node'; diff --git a/cocos/particle/particle-general-function.ts b/cocos/particle/particle-general-function.ts index 0b0b382109..d7c8004b5d 100644 --- a/cocos/particle/particle-general-function.ts +++ b/cocos/particle/particle-general-function.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Mat4, Quat, random, randomRange, randomRangeInt, Vec2, Vec3, bits } from '../core/math'; import CurveRange from './animator/curve-range'; diff --git a/cocos/particle/particle-system.ts b/cocos/particle/particle-system.ts index 96868470dd..b6e55255aa 100644 --- a/cocos/particle/particle-system.ts +++ b/cocos/particle/particle-system.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ // eslint-disable-next-line max-len import { ccclass, help, executeInEditMode, executionOrder, menu, tooltip, displayOrder, type, range, displayName, formerlySerializedAs, override, radian, serializable, visible } from 'cc.decorator'; diff --git a/cocos/particle/particle-utils.ts b/cocos/particle/particle-utils.ts index 195a851329..da90cc9b06 100644 --- a/cocos/particle/particle-utils.ts +++ b/cocos/particle/particle-utils.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { instantiate } from '../serialization'; import { CCObject, Pool } from '../core'; diff --git a/cocos/particle/particle.ts b/cocos/particle/particle.ts index 7f51eb699e..cd72c2131a 100644 --- a/cocos/particle/particle.ts +++ b/cocos/particle/particle.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Color, Vec3, Mat4, Quat } from '../core'; import { ParticleSystem } from './particle-system'; diff --git a/cocos/particle/renderer/particle-system-renderer-base.ts b/cocos/particle/renderer/particle-system-renderer-base.ts index cb66c43c0f..5afa9a1124 100644 --- a/cocos/particle/renderer/particle-system-renderer-base.ts +++ b/cocos/particle/renderer/particle-system-renderer-base.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Component } from '../../scene-graph'; import { Attribute, deviceManager, Feature } from '../../gfx'; diff --git a/cocos/particle/renderer/particle-system-renderer-cpu.ts b/cocos/particle/renderer/particle-system-renderer-cpu.ts index 490509810f..3e128edb23 100644 --- a/cocos/particle/renderer/particle-system-renderer-cpu.ts +++ b/cocos/particle/renderer/particle-system-renderer-cpu.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { EDITOR } from 'internal:constants'; import { builtinResMgr } from '../../asset/asset-manager'; diff --git a/cocos/particle/renderer/particle-system-renderer-data.ts b/cocos/particle/renderer/particle-system-renderer-data.ts index 3ecea8b044..dc038c5fe4 100644 --- a/cocos/particle/renderer/particle-system-renderer-data.ts +++ b/cocos/particle/renderer/particle-system-renderer-data.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, tooltip, displayOrder, type, serializable, disallowAnimation, visible } from 'cc.decorator'; import { Mesh } from '../../3d'; diff --git a/cocos/particle/renderer/particle-system-renderer-gpu.ts b/cocos/particle/renderer/particle-system-renderer-gpu.ts index cac34d0c13..9333d82902 100644 --- a/cocos/particle/renderer/particle-system-renderer-gpu.ts +++ b/cocos/particle/renderer/particle-system-renderer-gpu.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { EDITOR } from 'internal:constants'; import { builtinResMgr } from '../../asset/asset-manager'; diff --git a/cocos/particle/renderer/trail.ts b/cocos/particle/renderer/trail.ts index 646177c492..e02c073045 100644 --- a/cocos/particle/renderer/trail.ts +++ b/cocos/particle/renderer/trail.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, tooltip, displayOrder, type, serializable, range } from 'cc.decorator'; import { Material } from '../../asset/assets/material'; diff --git a/cocos/physics-2d/box2d/instantiate.ts b/cocos/physics-2d/box2d/instantiate.ts index 2917d12e06..7dba695a25 100644 --- a/cocos/physics-2d/box2d/instantiate.ts +++ b/cocos/physics-2d/box2d/instantiate.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { selector } from '../framework/physics-selector'; import { b2PhysicsWorld } from './physics-world'; import { b2RigidBody2D } from './rigid-body'; diff --git a/cocos/physics-2d/box2d/joints/distance-joint.ts b/cocos/physics-2d/box2d/joints/distance-joint.ts index 3b86cfb123..92d4e36b91 100644 --- a/cocos/physics-2d/box2d/joints/distance-joint.ts +++ b/cocos/physics-2d/box2d/joints/distance-joint.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import b2 from '@cocos/box2d'; import { IDistanceJoint } from '../../spec/i-physics-joint'; import { b2Joint } from './joint-2d'; diff --git a/cocos/physics-2d/box2d/joints/fixed-joint.ts b/cocos/physics-2d/box2d/joints/fixed-joint.ts index ffbed905ff..155da9db81 100644 --- a/cocos/physics-2d/box2d/joints/fixed-joint.ts +++ b/cocos/physics-2d/box2d/joints/fixed-joint.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import b2 from '@cocos/box2d'; import { IFixedJoint } from '../../spec/i-physics-joint'; import { b2Joint } from './joint-2d'; diff --git a/cocos/physics-2d/box2d/joints/hinge-joint.ts b/cocos/physics-2d/box2d/joints/hinge-joint.ts index 226e93bb46..6b0f0a70ff 100644 --- a/cocos/physics-2d/box2d/joints/hinge-joint.ts +++ b/cocos/physics-2d/box2d/joints/hinge-joint.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import b2 from '@cocos/box2d'; import { IHingeJoint } from '../../spec/i-physics-joint'; import { HingeJoint2D } from '../../framework'; diff --git a/cocos/physics-2d/box2d/joints/joint-2d.ts b/cocos/physics-2d/box2d/joints/joint-2d.ts index 397be6087e..f222947671 100644 --- a/cocos/physics-2d/box2d/joints/joint-2d.ts +++ b/cocos/physics-2d/box2d/joints/joint-2d.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import b2 from '@cocos/box2d'; import { IJoint2D } from '../../spec/i-physics-joint'; import { Joint2D, PhysicsSystem2D, RigidBody2D } from '../../framework'; diff --git a/cocos/physics-2d/box2d/joints/mouse-joint.ts b/cocos/physics-2d/box2d/joints/mouse-joint.ts index d2a4881f5a..2811aab97e 100644 --- a/cocos/physics-2d/box2d/joints/mouse-joint.ts +++ b/cocos/physics-2d/box2d/joints/mouse-joint.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import b2 from '@cocos/box2d'; import { IMouseJoint } from '../../spec/i-physics-joint'; import { b2Joint } from './joint-2d'; diff --git a/cocos/physics-2d/box2d/joints/relative-joint.ts b/cocos/physics-2d/box2d/joints/relative-joint.ts index 50c050b901..4817e0f249 100644 --- a/cocos/physics-2d/box2d/joints/relative-joint.ts +++ b/cocos/physics-2d/box2d/joints/relative-joint.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import b2, { MotorJointDef, Vec2 } from '@cocos/box2d'; import { IRelativeJoint } from '../../spec/i-physics-joint'; import { b2Joint } from './joint-2d'; diff --git a/cocos/physics-2d/box2d/joints/slider-joint.ts b/cocos/physics-2d/box2d/joints/slider-joint.ts index 91a5c0b2f6..5b713e4282 100644 --- a/cocos/physics-2d/box2d/joints/slider-joint.ts +++ b/cocos/physics-2d/box2d/joints/slider-joint.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import b2 from '@cocos/box2d'; import { ISliderJoint } from '../../spec/i-physics-joint'; import { b2Joint } from './joint-2d'; diff --git a/cocos/physics-2d/box2d/joints/spring-joint.ts b/cocos/physics-2d/box2d/joints/spring-joint.ts index 764bbf40bb..61ee071e8f 100644 --- a/cocos/physics-2d/box2d/joints/spring-joint.ts +++ b/cocos/physics-2d/box2d/joints/spring-joint.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import b2 from '@cocos/box2d'; import { ISpringJoint } from '../../spec/i-physics-joint'; import { b2Joint } from './joint-2d'; diff --git a/cocos/physics-2d/box2d/joints/wheel-joint.ts b/cocos/physics-2d/box2d/joints/wheel-joint.ts index a7d1ab414c..ea33ea5067 100644 --- a/cocos/physics-2d/box2d/joints/wheel-joint.ts +++ b/cocos/physics-2d/box2d/joints/wheel-joint.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import b2 from '@cocos/box2d'; import { IWheelJoint } from '../../spec/i-physics-joint'; import { WheelJoint2D } from '../../framework'; diff --git a/cocos/physics-2d/box2d/physics-contact.ts b/cocos/physics-2d/box2d/physics-contact.ts index 04c75c391c..a9c0f554d0 100644 --- a/cocos/physics-2d/box2d/physics-contact.ts +++ b/cocos/physics-2d/box2d/physics-contact.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import b2 from '@cocos/box2d'; import { Vec2 } from '../../core'; diff --git a/cocos/physics-2d/box2d/physics-world.ts b/cocos/physics-2d/box2d/physics-world.ts index d1ee39f356..73c4551517 100644 --- a/cocos/physics-2d/box2d/physics-world.ts +++ b/cocos/physics-2d/box2d/physics-world.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import b2 from '@cocos/box2d'; import { EDITOR } from 'internal:constants'; diff --git a/cocos/physics-2d/box2d/platform/physics-aabb-query-callback.ts b/cocos/physics-2d/box2d/platform/physics-aabb-query-callback.ts index 7663647d03..f06bd06ddc 100644 --- a/cocos/physics-2d/box2d/platform/physics-aabb-query-callback.ts +++ b/cocos/physics-2d/box2d/platform/physics-aabb-query-callback.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import b2 from '@cocos/box2d'; import { Vec2 } from '../../../core'; diff --git a/cocos/physics-2d/box2d/platform/physics-contact-listener.ts b/cocos/physics-2d/box2d/platform/physics-contact-listener.ts index e4bbbbbf5b..4e5279f60b 100644 --- a/cocos/physics-2d/box2d/platform/physics-contact-listener.ts +++ b/cocos/physics-2d/box2d/platform/physics-contact-listener.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import b2 from '@cocos/box2d'; import { js } from '../../../core'; diff --git a/cocos/physics-2d/box2d/platform/physics-debug-draw.ts b/cocos/physics-2d/box2d/platform/physics-debug-draw.ts index f488c66c02..b9ed99e180 100644 --- a/cocos/physics-2d/box2d/platform/physics-debug-draw.ts +++ b/cocos/physics-2d/box2d/platform/physics-debug-draw.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import b2 from '@cocos/box2d'; import { Color } from '../../../core'; diff --git a/cocos/physics-2d/box2d/platform/physics-ray-cast-callback.ts b/cocos/physics-2d/box2d/platform/physics-ray-cast-callback.ts index 714ea8f42e..7d6b2c9d34 100644 --- a/cocos/physics-2d/box2d/platform/physics-ray-cast-callback.ts +++ b/cocos/physics-2d/box2d/platform/physics-ray-cast-callback.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import b2 from '@cocos/box2d'; import { Vec2 } from '../../../core'; diff --git a/cocos/physics-2d/box2d/rigid-body.ts b/cocos/physics-2d/box2d/rigid-body.ts index 37ad290ff2..99ab775597 100644 --- a/cocos/physics-2d/box2d/rigid-body.ts +++ b/cocos/physics-2d/box2d/rigid-body.ts @@ -1,9 +1,33 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import b2 from '@cocos/box2d'; import { IRigidBody2D } from '../spec/i-rigid-body'; import { RigidBody2D } from '../framework/components/rigid-body-2d'; import { PhysicsSystem2D } from '../framework/physics-system'; import { b2PhysicsWorld } from './physics-world'; -import { Vec2, toRadian, Vec3, IVec2Like, toDegree } from '../../core'; +import { Vec2, toRadian, Vec3, Quat, IVec2Like, toDegree } from '../../core'; import { PHYSICS_2D_PTM_RATIO, ERigidBody2DType } from '../framework/physics-types'; import { Node } from '../../scene-graph/node'; @@ -83,6 +107,7 @@ export class b2RigidBody2D implements IRigidBody2D { } (PhysicsSystem2D.instance.physicsWorld as b2PhysicsWorld).addBody(this); + this.setActive(false); this._inited = true; } @@ -144,7 +169,11 @@ export class b2RigidBody2D implements IRigidBody2D { const b2body = this._body; if (!b2body) return; - const rotation = toRadian(this._rigidBody.node.eulerAngles.z); + const rot = this._rigidBody.node.worldRotation; + const euler = tempVec3; + Quat.toEuler(euler, rot); + const rotation = toRadian(euler.z); + const bodyType = this._rigidBody.type; if (bodyType === ERigidBody2DType.Animated && enableAnimated) { this._animatedAngle = rotation; diff --git a/cocos/physics-2d/box2d/shapes/box-shape-2d.ts b/cocos/physics-2d/box2d/shapes/box-shape-2d.ts index e01aabbfda..4c3b539559 100644 --- a/cocos/physics-2d/box2d/shapes/box-shape-2d.ts +++ b/cocos/physics-2d/box2d/shapes/box-shape-2d.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import b2 from '@cocos/box2d'; import { b2Shape2D } from './shape-2d'; import { BoxCollider2D } from '../../framework'; diff --git a/cocos/physics-2d/box2d/shapes/circle-shape-2d.ts b/cocos/physics-2d/box2d/shapes/circle-shape-2d.ts index 3825e3443b..6ac3a84a17 100644 --- a/cocos/physics-2d/box2d/shapes/circle-shape-2d.ts +++ b/cocos/physics-2d/box2d/shapes/circle-shape-2d.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import b2 from '@cocos/box2d'; import { b2Shape2D } from './shape-2d'; import { CircleCollider2D } from '../../framework'; diff --git a/cocos/physics-2d/box2d/shapes/polygon-shape-2d.ts b/cocos/physics-2d/box2d/shapes/polygon-shape-2d.ts index 740e56f401..47c3cbbc3f 100644 --- a/cocos/physics-2d/box2d/shapes/polygon-shape-2d.ts +++ b/cocos/physics-2d/box2d/shapes/polygon-shape-2d.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import b2 from '@cocos/box2d'; import { b2Shape2D } from './shape-2d'; import * as PolygonSeparator from '../../framework/utils/polygon-separator'; diff --git a/cocos/physics-2d/box2d/shapes/shape-2d.ts b/cocos/physics-2d/box2d/shapes/shape-2d.ts index 13d2d72ff2..a0e804bc44 100644 --- a/cocos/physics-2d/box2d/shapes/shape-2d.ts +++ b/cocos/physics-2d/box2d/shapes/shape-2d.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import b2 from '@cocos/box2d'; import { IBaseShape } from '../../spec/i-physics-shape'; @@ -62,7 +86,9 @@ export class b2Shape2D implements IBaseShape { apply () { this._destroy(); - this._init(); + if (this.collider.enabledInHierarchy) { + this._init(); + } } get worldAABB (): Readonly { @@ -78,6 +104,10 @@ export class b2Shape2D implements IBaseShape { const count = fixture.GetShape().GetChildCount(); for (let j = 0; j < count; j++) { const aabb = fixture.GetAABB(j); + if (fixture.GetShape().m_type === 2) { //b2ShapeType.e_polygonShape + aabb.lowerBound.SelfAddXY(fixture.GetShape().m_radius, fixture.GetShape().m_radius); + aabb.upperBound.SelfSubXY(fixture.GetShape().m_radius, fixture.GetShape().m_radius); + } if (aabb.lowerBound.x < minX) minX = aabb.lowerBound.x; if (aabb.lowerBound.y < minY) minY = aabb.lowerBound.y; if (aabb.upperBound.x > maxX) maxX = aabb.upperBound.x; diff --git a/cocos/physics-2d/builtin/builtin-contact.ts b/cocos/physics-2d/builtin/builtin-contact.ts index a415f3daae..ef245830db 100644 --- a/cocos/physics-2d/builtin/builtin-contact.ts +++ b/cocos/physics-2d/builtin/builtin-contact.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { BuiltinShape2D } from './shapes/shape-2d'; import Intersection2D from './intersection-2d'; diff --git a/cocos/physics-2d/builtin/builtin-world.ts b/cocos/physics-2d/builtin/builtin-world.ts index 3768f9e96d..f09c266b1e 100644 --- a/cocos/physics-2d/builtin/builtin-world.ts +++ b/cocos/physics-2d/builtin/builtin-world.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { EDITOR } from 'internal:constants'; import { IPhysicsWorld } from '../spec/i-physics-world'; import { Graphics } from '../../2d'; diff --git a/cocos/physics-2d/builtin/instantiate.ts b/cocos/physics-2d/builtin/instantiate.ts index 095704acbe..6d79741b8a 100644 --- a/cocos/physics-2d/builtin/instantiate.ts +++ b/cocos/physics-2d/builtin/instantiate.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { selector } from '../framework/physics-selector'; import { BuiltinPhysicsWorld } from './builtin-world'; import { BuiltinBoxShape } from './shapes/box-shape-2d'; diff --git a/cocos/physics-2d/builtin/intersection-2d.ts b/cocos/physics-2d/builtin/intersection-2d.ts index 1f660bd23e..4bdbfc0e68 100644 --- a/cocos/physics-2d/builtin/intersection-2d.ts +++ b/cocos/physics-2d/builtin/intersection-2d.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Vec2, Rect } from '../../core'; diff --git a/cocos/physics-2d/builtin/shapes/box-shape-2d.ts b/cocos/physics-2d/builtin/shapes/box-shape-2d.ts index 3c33d96548..715cf87f5d 100644 --- a/cocos/physics-2d/builtin/shapes/box-shape-2d.ts +++ b/cocos/physics-2d/builtin/shapes/box-shape-2d.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { BuiltinShape2D } from './shape-2d'; import { Vec2, Rect } from '../../../core'; import { BoxCollider2D } from '../../framework'; diff --git a/cocos/physics-2d/builtin/shapes/circle-shape-2d.ts b/cocos/physics-2d/builtin/shapes/circle-shape-2d.ts index 1091f770aa..0de30a2ded 100644 --- a/cocos/physics-2d/builtin/shapes/circle-shape-2d.ts +++ b/cocos/physics-2d/builtin/shapes/circle-shape-2d.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { BuiltinShape2D } from './shape-2d'; import { Vec2, Mat4, Rect } from '../../../core'; import { CircleCollider2D } from '../../framework'; diff --git a/cocos/physics-2d/builtin/shapes/polygon-shape-2d.ts b/cocos/physics-2d/builtin/shapes/polygon-shape-2d.ts index cd1d707949..888ca092c0 100644 --- a/cocos/physics-2d/builtin/shapes/polygon-shape-2d.ts +++ b/cocos/physics-2d/builtin/shapes/polygon-shape-2d.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { BuiltinShape2D } from './shape-2d'; import { Vec2, Rect } from '../../../core'; import { PolygonCollider2D } from '../../framework'; diff --git a/cocos/physics-2d/builtin/shapes/shape-2d.ts b/cocos/physics-2d/builtin/shapes/shape-2d.ts index 6684e1b777..29360faced 100644 --- a/cocos/physics-2d/builtin/shapes/shape-2d.ts +++ b/cocos/physics-2d/builtin/shapes/shape-2d.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { IBaseShape } from '../../spec/i-physics-shape'; import { Collider2D, PhysicsSystem2D } from '../../../../exports/physics-2d-framework'; import { Rect, Vec2 } from '../../../core'; diff --git a/cocos/physics-2d/framework/components/colliders/box-collider-2d.ts b/cocos/physics-2d/framework/components/colliders/box-collider-2d.ts index 37b1d42f5d..54ebcdb3a4 100644 --- a/cocos/physics-2d/framework/components/colliders/box-collider-2d.ts +++ b/cocos/physics-2d/framework/components/colliders/box-collider-2d.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { Vec2, Size, _decorator } from '../../../../core'; import { Collider2D } from './collider-2d'; import { ECollider2DType } from '../../physics-types'; @@ -12,8 +36,8 @@ export class BoxCollider2D extends Collider2D { private _size = new Size(1, 1); /** - * @en Box size - * @zh 包围盒大小 + * @en Box size. + * @zh 包围盒大小。 */ @property get size () { @@ -24,8 +48,8 @@ export class BoxCollider2D extends Collider2D { } /** - * @en Get world points - * @zh 世界坐标下 BoX 的四个点 + * @en Get world points. + * @zh 世界坐标下 BoX 的四个点。 */ get worldPoints (): readonly Readonly[] { if (this._shape) { diff --git a/cocos/physics-2d/framework/components/colliders/circle-collider-2d.ts b/cocos/physics-2d/framework/components/colliders/circle-collider-2d.ts index 0554ded6d2..001a6cd434 100644 --- a/cocos/physics-2d/framework/components/colliders/circle-collider-2d.ts +++ b/cocos/physics-2d/framework/components/colliders/circle-collider-2d.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { Vec2, _decorator } from '../../../../core'; import { Collider2D } from './collider-2d'; import { ECollider2DType } from '../../physics-types'; @@ -12,8 +36,8 @@ export class CircleCollider2D extends Collider2D { private _radius = 1; /** - * @en Circle radius - * @zh 圆形半径 + * @en Circle radius. + * @zh 圆形半径。 */ @property get radius () { diff --git a/cocos/physics-2d/framework/components/colliders/collider-2d.ts b/cocos/physics-2d/framework/components/colliders/collider-2d.ts index 18b40bb499..4fd1401a3c 100644 --- a/cocos/physics-2d/framework/components/colliders/collider-2d.ts +++ b/cocos/physics-2d/framework/components/colliders/collider-2d.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { EDITOR } from 'internal:constants'; import { Vec2, Rect, _decorator, Eventify, cclegacy } from '../../../../core'; @@ -41,7 +65,7 @@ export class Collider2D extends Eventify(Component) { /** * @en The density. - * @zh 密度 + * @zh 密度。 */ @property get density () { @@ -69,7 +93,7 @@ export class Collider2D extends Eventify(Component) { * @en * The friction coefficient, usually in the range [0,1]. * @zh - * 摩擦系数,取值一般在 [0, 1] 之间 + * 摩擦系数,取值一般在 [0, 1] 之间。 */ @property get friction () { @@ -83,7 +107,7 @@ export class Collider2D extends Eventify(Component) { * @en * The restitution (elasticity) usually in the range [0,1]. * @zh - * 弹性系数,取值一般在 [0, 1]之间 + * 弹性系数,取值一般在 [0, 1]之间。 */ @property get restitution () { @@ -167,9 +191,9 @@ export class Collider2D extends Eventify(Component) { /** * @en - * Get the world aabb of the collider + * Get the world aabb of the collider. * @zh - * 获取碰撞体的世界坐标系下的包围盒 + * 获取碰撞体的世界坐标系下的包围盒。 */ get worldAABB (): Readonly { if (this._shape) { diff --git a/cocos/physics-2d/framework/components/colliders/polygon-collider-2d.ts b/cocos/physics-2d/framework/components/colliders/polygon-collider-2d.ts index c4700b0ac8..0e870af309 100644 --- a/cocos/physics-2d/framework/components/colliders/polygon-collider-2d.ts +++ b/cocos/physics-2d/framework/components/colliders/polygon-collider-2d.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { Vec2, _decorator } from '../../../../core'; import { Collider2D } from './collider-2d'; import { ECollider2DType } from '../../physics-types'; @@ -15,8 +39,8 @@ export class PolygonCollider2D extends Collider2D { private _points = [new Vec2(-1, -1), new Vec2(1, -1), new Vec2(1, 1), new Vec2(-1, 1)]; /** - * @en Polygon points - * @zh 多边形顶点数组 + * @en Polygon points. + * @zh 多边形顶点数组。 */ @property({ type: Vec2 }) get points () { @@ -27,8 +51,8 @@ export class PolygonCollider2D extends Collider2D { } /** - * @en Get world points - * @zh 世界坐标下多边形碰撞体的点 + * @en Get world points. + * @zh 世界坐标下多边形碰撞体的点。 */ get worldPoints (): readonly Readonly[] { if (this._shape) { diff --git a/cocos/physics-2d/framework/components/joints/distance-joint-2d.ts b/cocos/physics-2d/framework/components/joints/distance-joint-2d.ts index 951617777c..c01d29a100 100644 --- a/cocos/physics-2d/framework/components/joints/distance-joint-2d.ts +++ b/cocos/physics-2d/framework/components/joints/distance-joint-2d.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { Joint2D } from './joint-2d'; import { IDistanceJoint } from '../../../spec/i-physics-joint'; import { EJoint2DType } from '../../physics-types'; @@ -38,7 +62,7 @@ export class DistanceJoint2D extends Joint2D { * @en * Auto calculate the distance between the connected two rigid bodies. * @zh - * 自动计算关节连接的两个刚体间的距离 + * 自动计算关节连接的两个刚体间的距离。 */ @property get autoCalcDistance () { diff --git a/cocos/physics-2d/framework/components/joints/fixed-joint-2d.ts b/cocos/physics-2d/framework/components/joints/fixed-joint-2d.ts index b2a7a52d87..c6ea0edb97 100644 --- a/cocos/physics-2d/framework/components/joints/fixed-joint-2d.ts +++ b/cocos/physics-2d/framework/components/joints/fixed-joint-2d.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { Joint2D } from './joint-2d'; import { _decorator } from '../../../../core'; import { IFixedJoint } from '../../../spec/i-physics-joint'; diff --git a/cocos/physics-2d/framework/components/joints/hinge-joint-2d.ts b/cocos/physics-2d/framework/components/joints/hinge-joint-2d.ts index c3a2d6d169..a6a488c125 100644 --- a/cocos/physics-2d/framework/components/joints/hinge-joint-2d.ts +++ b/cocos/physics-2d/framework/components/joints/hinge-joint-2d.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { Joint2D } from './joint-2d'; import { _decorator } from '../../../../core'; import { IHingeJoint } from '../../../spec/i-physics-joint'; diff --git a/cocos/physics-2d/framework/components/joints/joint-2d.ts b/cocos/physics-2d/framework/components/joints/joint-2d.ts index 1d7ae8aafd..d55997020a 100644 --- a/cocos/physics-2d/framework/components/joints/joint-2d.ts +++ b/cocos/physics-2d/framework/components/joints/joint-2d.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { EDITOR } from 'internal:constants'; import { Vec2, _decorator, cclegacy } from '../../../../core'; import { RigidBody2D } from '../rigid-body-2d'; @@ -10,18 +34,48 @@ const { ccclass, type, property } = _decorator; @ccclass('cc.Joint2D') export class Joint2D extends Component { + /** + * @en + * The position of Joint2D in the attached rigid body's local space. + * @zh + * 在自身刚体的本地空间中,Joint2D的位置。 + */ @property anchor = new Vec2(); + /** + * @en + * The position of Joint2D in the connected rigid body's local space. + * @zh + * 在连接刚体的本地空间中,Joint2D的位置。 + */ @property connectedAnchor = new Vec2(); + /** + * @en + * whether collision is turned on between two rigid bodies connected by a joint. + * @zh + * 关节连接的两刚体之间是否开启碰撞。 + */ @property collideConnected = false; + /** + * @en + * The jointed rigid body, null means link to a static rigid body at the world origin. + * @zh + * 关节连接的刚体,为空时表示连接到位于世界原点的静态刚体。 + */ @type(RigidBody2D) connectedBody: RigidBody2D | null = null; + /** + * @en + * the Joint2D attached rigid-body. + * @zh + * 关节所绑定的刚体组件。 + */ _body: RigidBody2D | null = null get body () { return this._body; @@ -33,6 +87,12 @@ export class Joint2D extends Component { protected _joint: IJoint2D | null = null; + /** + * @en + * the type of this joint. + * @zh + * 此关节的类型。 + */ TYPE = EJoint2DType.None; protected onLoad () { diff --git a/cocos/physics-2d/framework/components/joints/mouse-joint-2d.ts b/cocos/physics-2d/framework/components/joints/mouse-joint-2d.ts index 94ccd7e984..3636e5b064 100644 --- a/cocos/physics-2d/framework/components/joints/mouse-joint-2d.ts +++ b/cocos/physics-2d/framework/components/joints/mouse-joint-2d.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { Joint2D } from './joint-2d'; import { IMouseJoint } from '../../../spec/i-physics-joint'; import { EJoint2DType } from '../../physics-types'; @@ -56,9 +80,9 @@ export class MouseJoint2D extends Joint2D { /** * @en - * The maximum force + * The maximum force. * @zh - * 最大阻力值 + * 最大阻力值。 */ @property get maxForce (): number { diff --git a/cocos/physics-2d/framework/components/joints/relative-joint-2d.ts b/cocos/physics-2d/framework/components/joints/relative-joint-2d.ts index a5d3995a5d..7096b45208 100644 --- a/cocos/physics-2d/framework/components/joints/relative-joint-2d.ts +++ b/cocos/physics-2d/framework/components/joints/relative-joint-2d.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { Joint2D } from './joint-2d'; import { IRelativeJoint } from '../../../spec/i-physics-joint'; import { EJoint2DType } from '../../physics-types'; @@ -17,7 +41,7 @@ export class RelativeJoint2D extends Joint2D { * @en * The maximum force can be applied to rigidbody. * @zh - * 可以应用于刚体的最大的力值 + * 可以应用于刚体的最大的力值。 */ @property get maxForce (): number { @@ -34,7 +58,7 @@ export class RelativeJoint2D extends Joint2D { * @en * The maximum torque can be applied to rigidbody. * @zh - * 可以应用于刚体的最大扭矩值 + * 可以应用于刚体的最大扭矩值。 */ @property get maxTorque (): number { @@ -51,7 +75,7 @@ export class RelativeJoint2D extends Joint2D { * @en * The position correction factor in the range [0,1]. * @zh - * 位置矫正系数,范围为 [0, 1] + * 位置矫正系数,范围为 [0, 1]。 */ @property get correctionFactor (): number { @@ -68,7 +92,7 @@ export class RelativeJoint2D extends Joint2D { * @en * The linear offset from connected rigidbody to rigidbody. * @zh - * 关节另一端的刚体相对于起始端刚体的位置偏移量 + * 关节另一端的刚体相对于起始端刚体的位置偏移量。 */ @property get linearOffset (): Vec2 { @@ -94,7 +118,7 @@ export class RelativeJoint2D extends Joint2D { * @en * The angular offset from connected rigidbody to rigidbody. * @zh - * 关节另一端的刚体相对于起始端刚体的角度偏移量 + * 关节另一端的刚体相对于起始端刚体的角度偏移量。 */ @property get angularOffset (): number { @@ -120,7 +144,7 @@ export class RelativeJoint2D extends Joint2D { * @en * Auto calculate the angularOffset and linearOffset between the connected two rigid bodies. * @zh - * 自动计算关节连接的两个刚体间的 angularOffset 和 linearOffset + * 自动计算关节连接的两个刚体间的 angularOffset 和 linearOffset。 */ @property get autoCalcOffset (): boolean { diff --git a/cocos/physics-2d/framework/components/joints/slider-joint-2d.ts b/cocos/physics-2d/framework/components/joints/slider-joint-2d.ts index 4ded66d6ad..3e304cd2c5 100644 --- a/cocos/physics-2d/framework/components/joints/slider-joint-2d.ts +++ b/cocos/physics-2d/framework/components/joints/slider-joint-2d.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { Joint2D } from './joint-2d'; import { ISliderJoint } from '../../../spec/i-physics-joint'; import { EJoint2DType } from '../../physics-types'; @@ -12,8 +36,8 @@ export class SliderJoint2D extends Joint2D { TYPE = EJoint2DType.SLIDER; /** - * @en Slide direction - * @zh 滑动的方向 + * @en Slide direction. + * @zh 滑动的方向。 */ @property get angle (): number { @@ -32,8 +56,8 @@ export class SliderJoint2D extends Joint2D { } /** - * @en Auto calculate slide direction according to the slide direction - * @zh 根据连接的两个刚体自动计算滑动方向 + * @en Auto calculate slide direction according to the slide direction. + * @zh 根据连接的两个刚体自动计算滑动方向。 */ @property get autoCalcAngle (): boolean { @@ -109,7 +133,7 @@ export class SliderJoint2D extends Joint2D { * @en * The lower joint limit. * @zh - * 刚体能够移动的最小值 + * 刚体能够移动的最小值。 */ @property get lowerLimit (): number { @@ -126,7 +150,7 @@ export class SliderJoint2D extends Joint2D { * @en * The lower joint limit. * @zh - * 刚体能够移动的最大值 + * 刚体能够移动的最大值。 */ @property get upperLimit (): number { diff --git a/cocos/physics-2d/framework/components/joints/spring-joint-2d.ts b/cocos/physics-2d/framework/components/joints/spring-joint-2d.ts index 80f3007d3d..0bc326e6b7 100644 --- a/cocos/physics-2d/framework/components/joints/spring-joint-2d.ts +++ b/cocos/physics-2d/framework/components/joints/spring-joint-2d.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { Joint2D } from './joint-2d'; import { ISpringJoint } from '../../../spec/i-physics-joint'; import { EJoint2DType } from '../../physics-types'; @@ -48,7 +72,7 @@ export class SpringJoint2D extends Joint2D { * @en * The distance separating the two ends of the joint. * @zh - * 关节两端的距离 + * 关节两端的距离。 */ @property get distance () { @@ -72,7 +96,7 @@ export class SpringJoint2D extends Joint2D { * @en * Auto calculate the distance between the connected two rigid bodies. * @zh - * 自动计算关节连接的两个刚体间的距离 + * 自动计算关节连接的两个刚体间的距离。 */ @property get autoCalcDistance () { diff --git a/cocos/physics-2d/framework/components/joints/wheel-joint-2d.ts b/cocos/physics-2d/framework/components/joints/wheel-joint-2d.ts index 906f59ef8c..8f5b5abbbf 100644 --- a/cocos/physics-2d/framework/components/joints/wheel-joint-2d.ts +++ b/cocos/physics-2d/framework/components/joints/wheel-joint-2d.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { Joint2D } from './joint-2d'; import { _decorator } from '../../../../core'; import { IWheelJoint } from '../../../spec/i-physics-joint'; @@ -11,8 +35,8 @@ export class WheelJoint2D extends Joint2D { TYPE = EJoint2DType.WHEEL; /** - * @en Wheel susspension direction - * @zh 轮子震动方向 + * @en Wheel susspension direction. + * @zh 轮子震动方向。 */ @property get angle (): number { diff --git a/cocos/physics-2d/framework/components/rigid-body-2d.ts b/cocos/physics-2d/framework/components/rigid-body-2d.ts index ddb4597ecb..670d9c16a0 100644 --- a/cocos/physics-2d/framework/components/rigid-body-2d.ts +++ b/cocos/physics-2d/framework/components/rigid-body-2d.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { EDITOR } from 'internal:constants'; import { IRigidBody2D } from '../../spec/i-rigid-body'; import { _decorator, Vec2, IVec2Like, cclegacy } from '../../../core'; @@ -88,7 +112,7 @@ export class RigidBody2D extends Component { * @en * Scale the gravity applied to this body. * @zh - * 缩放应用在此刚体上的重力值 + * 缩放应用在此刚体上的重力值。 */ @property get gravityScale (): number { @@ -143,7 +167,7 @@ export class RigidBody2D extends Component { * @en * The linear velocity of the body's origin in world co-ordinates. * @zh - * 刚体在世界坐标下的线性速度 + * 刚体在世界坐标下的线性速度。 */ @property get linearVelocity (): Vec2 { @@ -163,7 +187,7 @@ export class RigidBody2D extends Component { * @en * The angular velocity of the body. * @zh - * 刚体的角速度 + * 刚体的角速度。 */ @property get angularVelocity (): number { @@ -183,7 +207,7 @@ export class RigidBody2D extends Component { * @en * Should this body be prevented from rotating? * @zh - * 是否禁止此刚体进行旋转 + * 是否禁止此刚体进行旋转。 */ @property get fixedRotation (): boolean { @@ -198,9 +222,9 @@ export class RigidBody2D extends Component { /** * @en - * Whether to wake up this rigid body during initialization + * Whether to wake up this rigid body during initialization. * @zh - * 是否在初始化时唤醒此刚体 + * 是否在初始化时唤醒此刚体。 */ @property awakeOnLoad = true; @@ -243,7 +267,7 @@ export class RigidBody2D extends Component { * @en * Whether the rigid body is awake. * @zh - * 获取刚体是否正在休眠 + * 获取刚体是否正在休眠。 */ isAwake () { if (this._body) { @@ -297,9 +321,9 @@ export class RigidBody2D extends Component { * affect the angular velocity. * @zh * 施加一个力到刚体上的一个点。如果力没有施加到刚体的质心上,还会产生一个扭矩并且影响到角速度。 - * @param force - the world force vector. - * @param point - the world position. - * @param wake - also wake up the body. + * @param force @en the world force vector. @zh 世界坐标系下的力。 + * @param point @en the world position. @zh 世界坐标系下的力的作用点。 + * @param wake @en also wake up the body. @zh 唤醒刚体。 */ applyForce (force: Vec2, point: Vec2, wake: boolean) { if (this._body) { @@ -312,8 +336,8 @@ export class RigidBody2D extends Component { * Apply a force to the center of mass. * @zh * 施加一个力到刚体上的质心上。 - * @param force - the world force vector. - * @param wake - also wake up the body. + * @param force @en the world force vector. @zh 世界坐标系下的力。 + * @param wake @en also wake up the body. @zh 唤醒刚体。 */ applyForceToCenter (force: Vec2, wake: boolean) { if (this._body) { @@ -325,9 +349,9 @@ export class RigidBody2D extends Component { * @en * Apply a torque. This affects the angular velocity. * @zh - * 施加一个扭矩力,将影响刚体的角速度 - * @param torque - about the z-axis (out of the screen), usually in N-m. - * @param wake - also wake up the body + * 施加一个扭矩力,将影响刚体的角速度。 + * @param torque @en about the z-axis (out of the screen), usually in N-m. @zh 扭矩 N-m。 + * @param wake @en also wake up the body @zh 唤醒刚体。 */ applyTorque (torque: number, wake: boolean) { if (this._body) { @@ -343,9 +367,9 @@ export class RigidBody2D extends Component { * @zh * 施加冲量到刚体上的一个点,将立即改变刚体的线性速度。 * 如果冲量施加到的点不是刚体的质心,那么将产生一个扭矩并影响刚体的角速度。 - * @param impulse - the world impulse vector, usually in N-seconds or kg-m/s. - * @param point - the world position - * @param wake - alse wake up the body + * @param impulse @en the world impulse vector, usually in N-seconds or kg-m/s. @zh 冲量 N-seconds 或者 kg-m/s。 + * @param point @en the world position. @zh 世界坐标系下的作用点。 + * @param wake @en also wake up the body. @zh 唤醒刚体。 */ applyLinearImpulse (impulse: Vec2, point: Vec2, wake: boolean) { if (this._body) { @@ -358,9 +382,8 @@ export class RigidBody2D extends Component { * Apply a impulse at the center of mass, this immediately modifies the velocity. * @zh * 施加冲量到刚体上的质心点,将立即改变刚体的线性速度。 - * @param impulse - the world impulse vector, usually in N-seconds or kg-m/s. - * @param point - the world position - * @param wake - alse wake up the body + * @param impulse @en the world impulse vector, usually in N-seconds or kg-m/s. @zh 冲量 N-seconds 或者 kg-m/s。 + * @param wake @en also wake up the body @zh 唤醒刚体。 */ applyLinearImpulseToCenter (impulse: Vec2, wake: boolean) { if (this._body) { @@ -372,9 +395,9 @@ export class RigidBody2D extends Component { * @en * Apply an angular impulse. * @zh - * 施加一个角速度冲量。 - * @param impulse - the angular impulse in units of kg*m*m/s - * @param wake - also wake up the body + * 施加一个角冲量。 + * @param impulse @en the angular impulse in units of kg*m*m/s. @zh 角冲量 kg*m*m/s。 + * @param wake @en also wake up the body. @zh 唤醒刚体。 */ applyAngularImpulse (impulse: number, wake: boolean) { if (this._body) { @@ -386,9 +409,10 @@ export class RigidBody2D extends Component { * @en * Get the world linear velocity of a world point attached to this body. * @zh - * 获取刚体上指定点的线性速度 - * @param worldPoint - a point in world coordinates. - * @param out - optional, the receiving point + * 获取刚体上指定点的线性速度。 + * @param worldPoint @en a point in world coordinates. @zh 世界坐标系下的点。 + * @param out @en optional, the returned world velocity. @zh 可选,返回的世界坐标系下的速度。 + * @return @en the world linear velocity. @zh 指定点的世界坐标系下的速度。 */ getLinearVelocityFromWorldPoint (worldPoint: IVec2Like, out: Out): Out { if (this._body) { @@ -396,13 +420,15 @@ export class RigidBody2D extends Component { } return out; } + /** * @en * Converts a world coordinate point to the given rigid body coordinate. * @zh - * 将一个给定的世界坐标系下的向量转换为刚体本地坐标系下的向量 - * @param worldVector - a vector in world coordinates. - * @param out - optional, the receiving vector + * 将一个给定的世界坐标系下的向量转换为刚体本地坐标系下的向量。 + * @param worldVector @en a vector in world coordinates. @zh 世界坐标系下的向量。 + * @param out @en optional, the returned vector in local coordinate. @zh 可选,返回的本地坐标系下的向量。 + * @return @en a vector in local coordinate. @zh 本地坐标系下的向量。 */ getLocalVector (worldVector: IVec2Like, out: Out): Out { if (this._body) { @@ -410,13 +436,15 @@ export class RigidBody2D extends Component { } return out; } + /** * @en * Converts a given vector in this rigid body's local coordinate system to the world coordinate system * @zh - * 将一个给定的刚体本地坐标系下的向量转换为世界坐标系下的向量 - * @param localVector - a vector in world coordinates. - * @param out - optional, the receiving vector + * 将一个给定的刚体本地坐标系下的向量转换为世界坐标系下的向量。 + * @param localVector @en a vector in local coordinates. @zh 本地坐标系下的向量。 + * @param out @en optional, the returned vector in world coordinate. @zh 可选,返回的世界坐标系下的向量。 + * @return @en a vector in world coordinate. @zh 世界坐标系下的向量。 */ getWorldVector (localVector: IVec2Like, out: Out): Out { if (this._body) { @@ -427,11 +455,12 @@ export class RigidBody2D extends Component { /** * @en - * Converts a given point in the world coordinate system to this rigid body's local coordinate system + * Converts a given point in the world coordinate system to this rigid body's local coordinate system. * @zh - * 将一个给定的世界坐标系下的点转换为刚体本地坐标系下的点 - * @param worldPoint - a point in world coordinates. - * @param out - optional, the receiving point + * 将一个给定的世界坐标系下的点转换为刚体本地坐标系下的点。 + * @param worldPoint @en a point in world coordinates. @zh 世界坐标系下的点。 + * @param out @en optional, the returned point in local coordinate. @zh 可选,返回的本地坐标系下的点。 + * @return @en a point in local coordinate. @zh 本地坐标系下的点。 */ getLocalPoint (worldPoint: IVec2Like, out: Out): Out { if (this._body) { @@ -439,13 +468,15 @@ export class RigidBody2D extends Component { } return out; } + /** * @en - * Converts a given point in this rigid body's local coordinate system to the world coordinate system + * Converts a given point in this rigid body's local coordinate system to the world coordinate system. * @zh - * 将一个给定的刚体本地坐标系下的点转换为世界坐标系下的点 - * @param localPoint - a point in local coordinates. - * @param out - optional, the receiving point + * 将一个给定的刚体本地坐标系下的点转换为世界坐标系下的点。 + * @param localPoint @en a point in local coordinate. @zh 本地坐标系下的点。 + * @param out @en optional, the returned point in world coordinate. @zh 可选,返回的世界坐标系下的点。 + * @return @en a point in world coordinate. @zh 世界坐标系下的点。 */ getWorldPoint (localPoint: IVec2Like, out: Out): Out { if (this._body) { @@ -453,11 +484,12 @@ export class RigidBody2D extends Component { } return out; } + /** * @en * Get the local position of the center of mass. * @zh - * 获取刚体本地坐标系下的质心 + * 获取刚体本地坐标系下的质心。 */ getLocalCenter (out: Out): Out { if (this._body) { @@ -465,11 +497,12 @@ export class RigidBody2D extends Component { } return out; } + /** * @en * Get the world position of the center of mass. * @zh - * 获取刚体世界坐标系下的质心 + * 获取刚体世界坐标系下的质心。 */ getWorldCenter (out: Out): Out { if (this._body) { @@ -482,7 +515,7 @@ export class RigidBody2D extends Component { * @en * Get the rotational inertia of the body about the local origin. * @zh - * 获取刚体本地坐标系下原点的旋转惯性 + * 获取刚体本地坐标系下原点的旋转惯性。 */ getInertia () { if (this._body) { diff --git a/cocos/physics-2d/framework/index.ts b/cocos/physics-2d/framework/index.ts index dade1611a8..df5b2ecce2 100644 --- a/cocos/physics-2d/framework/index.ts +++ b/cocos/physics-2d/framework/index.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { cclegacy } from '../../core'; import * as PolygonSeparator from './utils/polygon-separator'; diff --git a/cocos/physics-2d/framework/physics-internal-types.ts b/cocos/physics-2d/framework/physics-internal-types.ts index 234bf27c32..adf9917527 100644 --- a/cocos/physics-2d/framework/physics-internal-types.ts +++ b/cocos/physics-2d/framework/physics-internal-types.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + export declare class DelayEvent { target: Object; func: Function; diff --git a/cocos/physics-2d/framework/physics-selector.ts b/cocos/physics-2d/framework/physics-selector.ts index 4fb151603d..50954568f3 100644 --- a/cocos/physics-2d/framework/physics-selector.ts +++ b/cocos/physics-2d/framework/physics-selector.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + /* eslint-disable @typescript-eslint/no-unsafe-return */ import { EDITOR, DEBUG, TEST } from 'internal:constants'; import { IRigidBody2D } from '../spec/i-rigid-body'; diff --git a/cocos/physics-2d/framework/physics-system.ts b/cocos/physics-2d/framework/physics-system.ts index 4370e2f916..2d8d8a6b06 100644 --- a/cocos/physics-2d/framework/physics-system.ts +++ b/cocos/physics-2d/framework/physics-system.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { EDITOR } from 'internal:constants'; import { System, Vec2, IVec2Like, Rect, Eventify, Enum, Settings, settings, cclegacy } from '../../core'; import { createPhysicsWorld, selector, IPhysicsSelector } from './physics-selector'; @@ -111,14 +135,14 @@ export class PhysicsSystem2D extends Eventify(System) { * @en * The velocity iterations for the velocity constraint solver. * @zh - * 速度更新迭代数 + * 速度更新迭代数。 */ public velocityIterations = 10; /** * @en * The position Iterations for the position constraint solver. * @zh - * 位置迭代更新数 + * 位置迭代更新数。 */ public positionIterations = 10; @@ -240,7 +264,7 @@ export class PhysicsSystem2D extends Eventify(System) { * Perform a simulation of the physics system, which will now be performed automatically on each frame. * @zh * 执行一次物理系统的模拟,目前将在每帧自动执行一次。 - * @param deltaTime 与上一次执行相差的时间,目前为每帧消耗时间 + * @param deltaTime @en time step. @zh 与上一次执行相差的时间,目前为每帧消耗时间。 */ postUpdate (deltaTime: number) { if (!this._enable) { @@ -324,10 +348,10 @@ export class PhysicsSystem2D extends Eventify(System) { * @zh * 检测哪些碰撞体在给定射线的路径上,射线检测将忽略包含起始点的碰撞体。 * @method rayCast - * @param {Vec2} p1 - start point of the raycast - * @param {Vec2} p2 - end point of the raycast - * @param {RayCastType} type - optional, default is RayCastType.Closest - * @param {number} mask - optional, default is 0xffffffff + * @param {Vec2} p1 @en start point of the raycast. @zh 射线起点。 + * @param {Vec2} p2 @en end point of the raycast. @zh 射线终点。 + * @param {RayCastType} type - @en optional, default is RayCastType.Closest. @zh 可选,默认是RayCastType.Closest。 + * @param {number} mask - @en optional, default is 0xffffffff. @zh 可选,默认是0xffffffff。 * @return {[PhysicsRayCastResult]} */ raycast (p1: IVec2Like, p2: IVec2Like, type: ERaycast2DType = ERaycast2DType.Closest, mask = 0xffffffff): readonly Readonly[] { diff --git a/cocos/physics-2d/framework/physics-types.ts b/cocos/physics-2d/framework/physics-types.ts index 9a2a1718fd..f8b2dccdf2 100644 --- a/cocos/physics-2d/framework/physics-types.ts +++ b/cocos/physics-2d/framework/physics-types.ts @@ -1,4 +1,26 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ import { Enum, Vec2 } from '../../core'; import { Collider2D } from './components/colliders/collider-2d'; @@ -63,15 +85,15 @@ Enum(PhysicsGroup); /** * @en Enum for ERaycast2DType. - * @zh 射线检测类型 - * @enum ERaycast2DType + * @zh 射线检测类型。 + * @enum ERaycast2DType. */ export enum ERaycast2DType { /** * @en * Detects closest collider on the raycast path. * @zh - * 检测射线路径上最近的碰撞体 + * 检测射线路径上最近的碰撞体。 */ Closest, /** diff --git a/cocos/physics-2d/framework/utils/polygon-partition.ts b/cocos/physics-2d/framework/utils/polygon-partition.ts index 5c13cd5d5e..0017946be7 100644 --- a/cocos/physics-2d/framework/utils/polygon-partition.ts +++ b/cocos/physics-2d/framework/utils/polygon-partition.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,18 +20,21 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { IVec2Like } from '../../../core'; //https://github.com/x6ud/poly-partition-js -/// -/// Decompose the polygon into several convex polygon using Hertel-Mehlhorn algorithm. -/// If the polygon is already convex, it will return the original polygon. -/// -/// -/// +/** +* @en +* Decompose the polygon into several convex polygon using Hertel-Mehlhorn algorithm. +* If the polygon is already convex, it will return the original polygon. +* @zh +* 使用Hertel-Mehlhorn算法将输入多边形拆分成多个凸多边形。如果输入多边形是凸多边形,将返回原多边形。 +* @param polygon @en one polygon. @zh 一个多边形。 +* @return @en polygon array. @zh 多边形数组。 +*/ export function ConvexPartition (polygon: IVec2Like[]) { // We force it to CCW as it is a precondition in this algorithm. ForceCounterClockWise(polygon); @@ -49,7 +51,7 @@ export function ConvexPartition (polygon: IVec2Like[]) { return [polygon]; } - const ret : IVec2Like[][] = []; + const ret: IVec2Like[][] = []; const triangles = Triangulate(polygon); if (!triangles) return null; for (; triangles.length;) { @@ -84,7 +86,7 @@ export function ConvexPartition (polygon: IVec2Like[]) { continue; } // merge triangle - const newPoly : IVec2Like[] = []; + const newPoly: IVec2Like[] = []; for (let i = (iPoly + 1) % polyLen; i !== iPoly; i = (i + 1) % polyLen) { newPoly.push(poly[i]); } @@ -142,7 +144,7 @@ function ForceCounterClockWise (vertices: IVec2Like[]) { } } -function updateVertex (vertex : Vertex, vertices : Vertex[]) { +function updateVertex (vertex: Vertex, vertices: Vertex[]) { if (!vertex.shouldUpdate) { return; } @@ -204,7 +206,7 @@ function updateVertex (vertex : Vertex, vertices : Vertex[]) { } } -function removeCollinearOrDuplicate (start : Vertex) { +function removeCollinearOrDuplicate (start: Vertex) { for (let curr = start, end = start; ;) { if (equals(curr.point!, curr.next!.point!) || area(curr.prev!.point!, curr.point!, curr.next!.point!) === 0) { diff --git a/cocos/physics-2d/framework/utils/polygon-separator.ts b/cocos/physics-2d/framework/utils/polygon-separator.ts index 715c196c22..2522dbd698 100644 --- a/cocos/physics-2d/framework/utils/polygon-separator.ts +++ b/cocos/physics-2d/framework/utils/polygon-separator.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { IVec2Like, Vec2 } from '../../../core'; @@ -55,13 +54,16 @@ function Copy (i: number, j: number, vertices: IVec2Like[]) { return p; } -/// -/// Decompose the polygon into several smaller non-concave polygon. -/// If the polygon is already convex, it will return the original polygon, unless it is over Settings.MaxPolygonVertices. -/// Precondition: Counter Clockwise polygon -/// -/// -/// +/** +* @en +* Decompose the polygon into several smaller non-concave polygon. +* If the polygon is already convex, it will return the original polygon, unless it is over Settings.MaxPolygonVertices. +* Precondition: Counter Clockwise polygon +* @zh +* 使用Mark Bayazit算法将输入多边形拆分成多个凸多边形。如果输入多边形是凸多边形,将返回原多边形。要求输入多边形是逆时针的。 +* @param polygon @en one polygon. @zh 一个多边形。 +* @return @en polygon array. @zh 多边形数组。 +*/ export function ConvexPartition (vertices: IVec2Like[]) { // We force it to CCW as it is a precondition in this algorithm. ForceCounterClockWise(vertices); diff --git a/cocos/physics-2d/spec/i-physics-contact.ts b/cocos/physics-2d/spec/i-physics-contact.ts index dd22d36b2f..e661ff180f 100644 --- a/cocos/physics-2d/spec/i-physics-contact.ts +++ b/cocos/physics-2d/spec/i-physics-contact.ts @@ -1,4 +1,26 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ import { Vec2 } from '../../core'; import { Collider2D } from '../framework/components/colliders/collider-2d'; @@ -14,15 +36,15 @@ export interface IPhysics2DImpulse { * @en * Normal impulses. * @zh - * 法线方向的冲量 + * 法线方向的冲量。 * @property normalImpulses */ normalImpulses: number[], /** * @en - * Tangent impulses + * Tangent impulses. * @zh - * 切线方向的冲量 + * 切线方向的冲量。 * @property tangentImpulses */ tangentImpulses: number[], @@ -45,24 +67,24 @@ export interface IPhysics2DWorldManifold { /** * @en - * a negative value indicates overlap + * a negative value indicates overlap. * @zh - * 一个负数,用于指明重叠的部分 + * 一个负数,用于指明重叠的部分。 */ separations: number[], /** * @en - * world vector pointing from A to B + * world vector pointing from A to B. * @zh - * 世界坐标系下由 A 指向 B 的向量 + * 世界坐标系下由 A 指向 B 的向量。 */ normal: Vec2, } /** - * @en Manifold Type - * @zh 流形类型 + * @en Manifold Type. + * @zh 流形类型。 */ export enum Physics2DManifoldType { Circles, @@ -84,14 +106,14 @@ export interface IPhysics2DManifoldPoint { /** * @en * The local point usage depends on the manifold type: - * - Physics2DManifoldType.Circles: the local center of circleB - * - Physics2DManifoldType.FaceA: the local center of circleB or the clip point of polygonB - * - Physics2DManifoldType.FaceB: the clip point of polygonA + * - Physics2DManifoldType.Circles: the local center of circleB. + * - Physics2DManifoldType.FaceA: the local center of circleB or the clip point of polygonB. + * - Physics2DManifoldType.FaceB: the clip point of polygonA. * @zh - * 本地坐标点的用途取决于 manifold 的类型 - * - Physics2DManifoldType.Circles: circleB 的本地中心点 - * - Physics2DManifoldType.FaceA: circleB 的本地中心点 或者是 polygonB 的截取点 - * - Physics2DManifoldType.FaceB: polygonB 的截取点 + * 本地坐标点的用途取决于 manifold 的类型。 + * - Physics2DManifoldType.Circles: circleB 的本地中心点。 + * - Physics2DManifoldType.FaceA: circleB 的本地中心点 或者是 polygonB 的截取点。 + * - Physics2DManifoldType.FaceB: polygonB 的截取点。 */ localPoint: Vec2; /** @@ -111,39 +133,39 @@ export interface IPhysics2DManifoldPoint { } /** - * @en Manifold - * @zh 流形 + * @en Manifold. + * @zh 流形。 */ export interface IPhysics2DManifold { /** * @en - * Manifold type + * Manifold type. * @zh - * Manifold 类型 + * Manifold 类型。 */ type: Physics2DManifoldType, /** * @en * The local point usage depends on the manifold type: - * -Physics2DManifoldType.Circles: the local center of circleA - * -Physics2DManifoldType.FaceA: the center of faceA - * -Physics2DManifoldType.FaceB: the center of faceB + * -Physics2DManifoldType.Circles: the local center of circleA. + * -Physics2DManifoldType.FaceA: the center of faceA. + * -Physics2DManifoldType.FaceB: the center of faceB. * @zh * 用途取决于 manifold 类型 - * -Physics2DManifoldType.Circles: circleA 的本地中心点 - * -Physics2DManifoldType.FaceA: faceA 的本地中心点 - * -Physics2DManifoldType.FaceB: faceB 的本地中心点 + * -Physics2DManifoldType.Circles: circleA 的本地中心点。 + * -Physics2DManifoldType.FaceA: faceA 的本地中心点。 + * -Physics2DManifoldType.FaceB: faceB 的本地中心点。 */ localPoint: Vec2, /** * @en - * -Physics2DManifoldType.Circles: not used - * -Physics2DManifoldType.FaceA: the normal on polygonA - * -Physics2DManifoldType.FaceB: the normal on polygonB + * -Physics2DManifoldType.Circles: not used. + * -Physics2DManifoldType.FaceA: the normal on polygonA. + * -Physics2DManifoldType.FaceB: the normal on polygonB. * @zh - * -Physics2DManifoldType.Circles: 没被使用到 - * -Physics2DManifoldType.FaceA: polygonA 的法向量 - * -Physics2DManifoldType.FaceB: polygonB 的法向量 + * -Physics2DManifoldType.Circles: 没被使用到。 + * -Physics2DManifoldType.FaceA: polygonA 的法向量。 + * -Physics2DManifoldType.FaceB: polygonB 的法向量。 */ localNormal: Vec2, @@ -167,16 +189,16 @@ export interface IPhysics2DManifold { export interface IPhysics2DContact { /** * @en - * One of the collider that collided + * One of the collider that collided. * @zh - * 发生碰撞的碰撞体之一 + * 发生碰撞的碰撞体之一。 */ colliderA: Collider2D | null; /** * @en - * One of the collider that collided + * One of the collider that collided. * @zh - * 发生碰撞的碰撞体之一 + * 发生碰撞的碰撞体之一。 */ colliderB: Collider2D | null; /** @@ -217,8 +239,8 @@ export interface IPhysics2DContact { * Get the impulses. * Note: PhysicsImpulse can only used in onPostSolve callback. * @zh - * 获取冲量信息 - * 注意:这个信息只有在 onPostSolve 回调中才能获取到 + * 获取冲量信息。 + * 注意:这个信息只有在 onPostSolve 回调中才能获取到。 */ getImpulse (): IPhysics2DImpulse | null; @@ -233,14 +255,14 @@ export interface IPhysics2DContact { * @en * Set the desired tangent speed for a conveyor belt behavior. * @zh - * 为传送带设置期望的切线速度 + * 为传送带设置期望的切线速度。 */ setTangentSpeed (value: number); /** * @en * Get the desired tangent speed. * @zh - * 获取切线速度 + * 获取切线速度。 */ getTangentSpeed (): number; @@ -255,7 +277,7 @@ export interface IPhysics2DContact { * @en * Get the friction. * @zh - * 获取当前摩擦力系数 + * 获取当前摩擦力系数。 */ getFriction (): number; /** @@ -269,7 +291,7 @@ export interface IPhysics2DContact { * @en * Get the restitution. * @zh - * 获取当前恢复系数 + * 获取当前恢复系数。 */ getRestitution (): number; } diff --git a/cocos/physics-2d/spec/i-physics-joint.ts b/cocos/physics-2d/spec/i-physics-joint.ts index d01d507047..67b5d7cd99 100644 --- a/cocos/physics-2d/spec/i-physics-joint.ts +++ b/cocos/physics-2d/spec/i-physics-joint.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { IVec2Like } from '../../core'; diff --git a/cocos/physics-2d/spec/i-physics-shape.ts b/cocos/physics-2d/spec/i-physics-shape.ts index 3d281f2b98..8c1fc22564 100644 --- a/cocos/physics-2d/spec/i-physics-shape.ts +++ b/cocos/physics-2d/spec/i-physics-shape.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { Rect, Vec2 } from '../../core'; import { ILifecycle } from '../../physics/spec/i-lifecycle'; import { Collider2D, RigidBody2D } from '../../../exports/physics-2d-framework'; diff --git a/cocos/physics-2d/spec/i-physics-world.ts b/cocos/physics-2d/spec/i-physics-world.ts index 549c877b44..1d5c9753f3 100644 --- a/cocos/physics-2d/spec/i-physics-world.ts +++ b/cocos/physics-2d/spec/i-physics-world.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { IVec2Like, Rect, Vec2 } from '../../core'; import { ERaycast2DType, RaycastResult2D, Collider2D } from '../framework'; diff --git a/cocos/physics-2d/spec/i-rigid-body.ts b/cocos/physics-2d/spec/i-rigid-body.ts index 11045928a9..7257937705 100644 --- a/cocos/physics-2d/spec/i-rigid-body.ts +++ b/cocos/physics-2d/spec/i-rigid-body.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { ILifecycle } from '../../physics/spec/i-lifecycle'; import { IVec2Like, Vec2 } from '../../core'; import { RigidBody2D } from '../framework/components/rigid-body-2d'; diff --git a/cocos/physics/bullet/bullet-bvh-triangle-mesh-shape.ts b/cocos/physics/bullet/bullet-bvh-triangle-mesh-shape.ts new file mode 100644 index 0000000000..bb2805268d --- /dev/null +++ b/cocos/physics/bullet/bullet-bvh-triangle-mesh-shape.ts @@ -0,0 +1,72 @@ +/* + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + +import { bt, EBulletType } from './instantiated'; +import { Mesh } from '../../3d/assets'; +import { cocos2BulletTriMesh } from './bullet-utils'; + +export class BulletBvhTriangleMeshShape { + private static readonly BulletBvhTriangleMeshShapeMap = new Map(); + + public static getBulletBvhTriangleMeshShape (key: number, mesh: Mesh) { + let newBulletBvhTriangleMeshShape!: BulletBvhTriangleMeshShape; + if (BulletBvhTriangleMeshShape.BulletBvhTriangleMeshShapeMap.has(key)) { //can be improved + newBulletBvhTriangleMeshShape = BulletBvhTriangleMeshShape.BulletBvhTriangleMeshShapeMap.get(key)!; + newBulletBvhTriangleMeshShape.reference = true; + } else { + newBulletBvhTriangleMeshShape = new BulletBvhTriangleMeshShape(key, mesh); + BulletBvhTriangleMeshShape.BulletBvhTriangleMeshShapeMap.set(key, newBulletBvhTriangleMeshShape); + } + return newBulletBvhTriangleMeshShape; + } + + private readonly key: number; + private ref = 0; + public bulletBvhTriangleMeshShapePtr: Bullet.ptr; + private btTriangleMeshPtr: Bullet.ptr = 0; + + public set reference (v: boolean) { + // eslint-disable-next-line @typescript-eslint/no-unused-expressions + v ? this.ref++ : this.ref--; + if (this.ref === 0) { this.destroy(); } + } + + private constructor (key: number, mesh: Mesh) { + this.reference = true; + this.key = key; + this.btTriangleMeshPtr = bt.TriangleMesh_new(); + cocos2BulletTriMesh(this.btTriangleMeshPtr, mesh); + this.bulletBvhTriangleMeshShapePtr = bt.BvhTriangleMeshShape_new(this.btTriangleMeshPtr, true, true); + } + + private destroy () { + if (this.bulletBvhTriangleMeshShapePtr) { + bt._safe_delete(EBulletType.EBulletTypeCollisionShape, this.bulletBvhTriangleMeshShapePtr); + } + if (this.btTriangleMeshPtr) { + bt._safe_delete(EBulletType.EBulletTypeTriangleMesh, this.btTriangleMeshPtr); + } + BulletBvhTriangleMeshShape.BulletBvhTriangleMeshShapeMap.delete(this.key); + } +} diff --git a/cocos/physics/bullet/bullet-cache.ts b/cocos/physics/bullet/bullet-cache.ts index 1f2d3e2af6..7f1e2a7f44 100644 --- a/cocos/physics/bullet/bullet-cache.ts +++ b/cocos/physics/bullet/bullet-cache.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Collider, TriggerEventType, CollisionEventType, IContactEquation } from '../../../exports/physics-framework'; import { Vec3, Quat, Mat4 } from '../../core'; diff --git a/cocos/physics/bullet/bullet-contact-data.ts b/cocos/physics/bullet/bullet-contact-data.ts index 8e4602e117..8023e26431 100644 --- a/cocos/physics/bullet/bullet-contact-data.ts +++ b/cocos/physics/bullet/bullet-contact-data.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { IContactEquation, ICollisionEvent } from '../framework'; import { IVec3Like, Vec3, Quat } from '../../core'; diff --git a/cocos/physics/bullet/bullet-enum.ts b/cocos/physics/bullet/bullet-enum.ts index 83eaa26b57..935a943cba 100644 --- a/cocos/physics/bullet/bullet-enum.ts +++ b/cocos/physics/bullet/bullet-enum.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ export enum EBtSharedBodyDirty { BODY_RE_ADD = 1, diff --git a/cocos/physics/bullet/bullet-env.ts b/cocos/physics/bullet/bullet-env.ts index 0d6c22b729..07f4a9503d 100644 --- a/cocos/physics/bullet/bullet-env.ts +++ b/cocos/physics/bullet/bullet-env.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ // Wasm Memory Page Size is 65536 export const pageSize = 65536; // 64KiB diff --git a/cocos/physics/bullet/bullet-interface.ts b/cocos/physics/bullet/bullet-interface.ts index d17692ab6a..85097118cc 100644 --- a/cocos/physics/bullet/bullet-interface.ts +++ b/cocos/physics/bullet/bullet-interface.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { BulletShape } from './shapes/bullet-shape'; diff --git a/cocos/physics/bullet/bullet-rigid-body.ts b/cocos/physics/bullet/bullet-rigid-body.ts index 9a9420c75f..aaa6f04c41 100644 --- a/cocos/physics/bullet/bullet-rigid-body.ts +++ b/cocos/physics/bullet/bullet-rigid-body.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Vec3, IVec3Like } from '../../core'; import { BulletWorld } from './bullet-world'; @@ -184,8 +183,11 @@ export class BulletRigidBody implements IRigidBody { bt.CollisionObject_activate(this.impl, force); } - sleep (): any { - return bt.RigidBody_wantsSleeping(this.impl); + sleep (): void { + const state = bt.CollisionObject_getActivationState(this.impl); + if (state !== btCollisionObjectStates.DISABLE_DEACTIVATION && state !== btCollisionObjectStates.DISABLE_SIMULATION) { + bt.CollisionObject_forceActivationState(this.impl, btCollisionObjectStates.ISLAND_SLEEPING); + } } setSleepThreshold (v: number): void { diff --git a/cocos/physics/bullet/bullet-shared-body.ts b/cocos/physics/bullet/bullet-shared-body.ts index e752d7fdb8..3bddc758a6 100644 --- a/cocos/physics/bullet/bullet-shared-body.ts +++ b/cocos/physics/bullet/bullet-shared-body.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { TransformBit } from '../../scene-graph/node-enum'; import { Node } from '../../scene-graph'; diff --git a/cocos/physics/bullet/bullet-triangle-mesh.ts b/cocos/physics/bullet/bullet-triangle-mesh.ts deleted file mode 100644 index bcbc0b56f9..0000000000 --- a/cocos/physics/bullet/bullet-triangle-mesh.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. - - https://www.cocos.com/ - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - */ - -import { bt, EBulletType } from './instantiated'; -import { Mesh } from '../../3d/assets'; -import { cocos2BulletTriMesh } from './bullet-utils'; - -export class BulletTriangleMesh { - private static readonly BulletTriangleMeshMap = new Map(); - - static getBulletTriangleMesh (key: number, mesh: Mesh) { - let newTriangleMesh!: BulletTriangleMesh;//Bullet.ptr; - if (BulletTriangleMesh.BulletTriangleMeshMap.has(key)) { //can be improved - newTriangleMesh = BulletTriangleMesh.BulletTriangleMeshMap.get(key)!; - } else { - newTriangleMesh = new BulletTriangleMesh(key); - cocos2BulletTriMesh(newTriangleMesh.bulletTriangleMeshInternal, mesh); - BulletTriangleMesh.BulletTriangleMeshMap.set(key, newTriangleMesh); - } - return newTriangleMesh; - } - - private readonly key: number; - private ref = 0; - bulletTriangleMeshInternal : Bullet.ptr; - - set reference (v: boolean) { - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - v ? this.ref++ : this.ref--; - if (this.ref === 0) { this.destroy(); } - } - - private constructor (key: number) { - this.key = key; - this.bulletTriangleMeshInternal = bt.TriangleMesh_new(); - } - - private destroy () { - if (this.bulletTriangleMeshInternal) { - bt._safe_delete(EBulletType.EBulletTypeTriangleMesh, this.bulletTriangleMeshInternal); - } - BulletTriangleMesh.BulletTriangleMeshMap.delete(this.key); - } -} diff --git a/cocos/physics/bullet/bullet-utils.ts b/cocos/physics/bullet/bullet-utils.ts index 6dd4ee9647..59200863c0 100644 --- a/cocos/physics/bullet/bullet-utils.ts +++ b/cocos/physics/bullet/bullet-utils.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { IVec3Like, IQuatLike } from '../../core'; import { Mesh } from '../../3d'; diff --git a/cocos/physics/bullet/bullet-world.ts b/cocos/physics/bullet/bullet-world.ts index b9520c7278..ae2130901e 100644 --- a/cocos/physics/bullet/bullet-world.ts +++ b/cocos/physics/bullet/bullet-world.ts @@ -1,19 +1,18 @@ /* eslint-disable new-cap */ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -22,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { BulletSharedBody } from './bullet-shared-body'; import { BulletRigidBody } from './bullet-rigid-body'; diff --git a/cocos/physics/bullet/constraints/bullet-constraint.ts b/cocos/physics/bullet/constraints/bullet-constraint.ts index bb69e90cad..93a59e6d98 100644 --- a/cocos/physics/bullet/constraints/bullet-constraint.ts +++ b/cocos/physics/bullet/constraints/bullet-constraint.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ /* eslint-disable new-cap */ import { IBaseConstraint } from '../../spec/i-physics-constraint'; diff --git a/cocos/physics/bullet/constraints/bullet-fixed-constraint.ts b/cocos/physics/bullet/constraints/bullet-fixed-constraint.ts index a2d2638a08..334c4ac192 100644 --- a/cocos/physics/bullet/constraints/bullet-fixed-constraint.ts +++ b/cocos/physics/bullet/constraints/bullet-fixed-constraint.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ /* eslint-disable new-cap */ import { BulletConstraint } from './bullet-constraint'; diff --git a/cocos/physics/bullet/constraints/bullet-hinge-constraint.ts b/cocos/physics/bullet/constraints/bullet-hinge-constraint.ts index 130ed292c4..aab0cbc767 100644 --- a/cocos/physics/bullet/constraints/bullet-hinge-constraint.ts +++ b/cocos/physics/bullet/constraints/bullet-hinge-constraint.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ /* eslint-disable new-cap */ import { BulletConstraint } from './bullet-constraint'; diff --git a/cocos/physics/bullet/constraints/bullet-p2p-constraint.ts b/cocos/physics/bullet/constraints/bullet-p2p-constraint.ts index 0c6b9e5a57..5b1fa1a7cd 100644 --- a/cocos/physics/bullet/constraints/bullet-p2p-constraint.ts +++ b/cocos/physics/bullet/constraints/bullet-p2p-constraint.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ /* eslint-disable new-cap */ import { BulletConstraint } from './bullet-constraint'; diff --git a/cocos/physics/bullet/instantiate.ts b/cocos/physics/bullet/instantiate.ts index ddad0e9455..c41cd35ecc 100644 --- a/cocos/physics/bullet/instantiate.ts +++ b/cocos/physics/bullet/instantiate.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Game, game } from '../../game'; import { selector } from '../framework/physics-selector'; diff --git a/cocos/physics/bullet/instantiated.ts b/cocos/physics/bullet/instantiated.ts index 12c32a0666..d64533d435 100644 --- a/cocos/physics/bullet/instantiated.ts +++ b/cocos/physics/bullet/instantiated.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ // eslint-disable-next-line import/no-extraneous-dependencies import bulletModule, { bulletType } from '@cocos/bullet'; diff --git a/cocos/physics/bullet/shapes/bullet-box-shape.ts b/cocos/physics/bullet/shapes/bullet-box-shape.ts index 66f2af7174..7b9e4f462e 100644 --- a/cocos/physics/bullet/shapes/bullet-box-shape.ts +++ b/cocos/physics/bullet/shapes/bullet-box-shape.ts @@ -1,19 +1,18 @@ /* eslint-disable new-cap */ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -22,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { BulletShape } from './bullet-shape'; import { Vec3 } from '../../../core'; diff --git a/cocos/physics/bullet/shapes/bullet-capsule-shape.ts b/cocos/physics/bullet/shapes/bullet-capsule-shape.ts index b44d8bdc25..b2fe17e891 100644 --- a/cocos/physics/bullet/shapes/bullet-capsule-shape.ts +++ b/cocos/physics/bullet/shapes/bullet-capsule-shape.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { absMax, IVec3Like } from '../../../core'; import { BulletShape } from './bullet-shape'; diff --git a/cocos/physics/bullet/shapes/bullet-cone-shape.ts b/cocos/physics/bullet/shapes/bullet-cone-shape.ts index daf5395645..73de1a3cc5 100644 --- a/cocos/physics/bullet/shapes/bullet-cone-shape.ts +++ b/cocos/physics/bullet/shapes/bullet-cone-shape.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { BulletShape } from './bullet-shape'; import { ConeCollider } from '../../../../exports/physics-framework'; diff --git a/cocos/physics/bullet/shapes/bullet-cylinder-shape.ts b/cocos/physics/bullet/shapes/bullet-cylinder-shape.ts index 441d562f7e..2a03fbef3f 100644 --- a/cocos/physics/bullet/shapes/bullet-cylinder-shape.ts +++ b/cocos/physics/bullet/shapes/bullet-cylinder-shape.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { BulletShape } from './bullet-shape'; import { CylinderCollider } from '../../../../exports/physics-framework'; diff --git a/cocos/physics/bullet/shapes/bullet-plane-shape.ts b/cocos/physics/bullet/shapes/bullet-plane-shape.ts index 05038bccd6..f16739ed99 100644 --- a/cocos/physics/bullet/shapes/bullet-plane-shape.ts +++ b/cocos/physics/bullet/shapes/bullet-plane-shape.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { BulletShape } from './bullet-shape'; import { PlaneCollider } from '../../../../exports/physics-framework'; diff --git a/cocos/physics/bullet/shapes/bullet-shape.ts b/cocos/physics/bullet/shapes/bullet-shape.ts index ca11a6e74f..fc81046fb7 100644 --- a/cocos/physics/bullet/shapes/bullet-shape.ts +++ b/cocos/physics/bullet/shapes/bullet-shape.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Vec3, IVec3Like, geometry } from '../../../core'; import { Collider, PhysicsMaterial, PhysicsSystem } from '../../../../exports/physics-framework'; @@ -42,14 +41,15 @@ export abstract class BulletShape implements IBaseShape { } setMaterial (v: PhysicsMaterial | null) { - if (!this._isTrigger && this._isEnabled && v) { + const v1 = (v == null) ? PhysicsSystem.instance.defaultMaterial : v; + if (!this._isTrigger && this._isEnabled) { if (this._compound) { - if (!ccMaterialBooks[v._uuid]) ccMaterialBooks[v._uuid] = bt.ccMaterial_new(); - const mat = ccMaterialBooks[v._uuid]; - bt.ccMaterial_set(mat, v.restitution, v.friction, v.rollingFriction, v.spinningFriction); + if (!ccMaterialBooks[v1._uuid]) ccMaterialBooks[v1._uuid] = bt.ccMaterial_new(); + const mat = ccMaterialBooks[v1._uuid]; + bt.ccMaterial_set(mat, v1.restitution, v1.friction, v1.rollingFriction, v1.spinningFriction); bt.CollisionShape_setMaterial(this._impl, mat); } else { - bt.CollisionObject_setMaterial(this._sharedBody.body, v.restitution, v.friction, v.rollingFriction, v.spinningFriction); + bt.CollisionObject_setMaterial(this._sharedBody.body, v1.restitution, v1.friction, v1.rollingFriction, v1.spinningFriction); } } } diff --git a/cocos/physics/bullet/shapes/bullet-simplex-shape.ts b/cocos/physics/bullet/shapes/bullet-simplex-shape.ts index c7c22621e3..877f7c0e61 100644 --- a/cocos/physics/bullet/shapes/bullet-simplex-shape.ts +++ b/cocos/physics/bullet/shapes/bullet-simplex-shape.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { BulletShape } from './bullet-shape'; import { SimplexCollider } from '../../../../exports/physics-framework'; diff --git a/cocos/physics/bullet/shapes/bullet-sphere-shape.ts b/cocos/physics/bullet/shapes/bullet-sphere-shape.ts index 28d423cad8..f1d5c0c73c 100644 --- a/cocos/physics/bullet/shapes/bullet-sphere-shape.ts +++ b/cocos/physics/bullet/shapes/bullet-sphere-shape.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { BulletShape } from './bullet-shape'; import { PhysicsSystem, SphereCollider } from '../../../../exports/physics-framework'; diff --git a/cocos/physics/bullet/shapes/bullet-terrain-shape.ts b/cocos/physics/bullet/shapes/bullet-terrain-shape.ts index dd3e3f00b5..8d7b600260 100644 --- a/cocos/physics/bullet/shapes/bullet-terrain-shape.ts +++ b/cocos/physics/bullet/shapes/bullet-terrain-shape.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { BulletShape } from './bullet-shape'; import { Vec3, warn, IVec3Like } from '../../../core'; diff --git a/cocos/physics/bullet/shapes/bullet-trimesh-shape.ts b/cocos/physics/bullet/shapes/bullet-trimesh-shape.ts index 9a8269eeb2..0fe6f75f4b 100644 --- a/cocos/physics/bullet/shapes/bullet-trimesh-shape.ts +++ b/cocos/physics/bullet/shapes/bullet-trimesh-shape.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { BulletShape } from './bullet-shape'; import { warnID } from '../../../core'; @@ -31,10 +30,10 @@ import { cocos2BulletVec3, cocos2BulletTriMesh } from '../bullet-utils'; import { ITrimeshShape } from '../../spec/i-physics-shape'; import { BulletCache } from '../bullet-cache'; import { bt, EBulletType } from '../instantiated'; +import { BulletBvhTriangleMeshShape } from '../bullet-bvh-triangle-mesh-shape'; export class BulletTrimeshShape extends BulletShape implements ITrimeshShape { - private static _mapTrimesh2btBVHMeshShape = {}; - + private btBVHMeshShape; public get collider () { return this._collider as MeshCollider; } @@ -48,16 +47,12 @@ export class BulletTrimeshShape extends BulletShape implements ITrimeshShape { } else { const mesh = v; if (mesh && mesh.renderingSubMeshes.length > 0) { - const btTriangleMesh = this._getBtTriangleMesh(mesh); if (this.collider.convex) { + const btTriangleMesh = this._getBtTriangleMesh(mesh); this._impl = bt.ConvexTriangleMeshShape_new(btTriangleMesh); - } else if (BulletTrimeshShape._mapTrimesh2btBVHMeshShape[mesh.hash] == null) { // triangle mesh and bvh is not built - const bvhTrimesh = bt.BvhTriangleMeshShape_new(btTriangleMesh, true, true); - BulletTrimeshShape._mapTrimesh2btBVHMeshShape[mesh.hash] = bvhTrimesh; - this._impl = bt.ScaledBvhTriangleMeshShape_new(bvhTrimesh, 1, 1, 1); - } else if (BulletTrimeshShape._mapTrimesh2btBVHMeshShape[mesh.hash]) { // triangle mesh and bvh is already built - const bvhMeshShapePtr = BulletTrimeshShape._mapTrimesh2btBVHMeshShape[mesh.hash]; - this._impl = bt.ScaledBvhTriangleMeshShape_new(bvhMeshShapePtr, 1, 1, 1); + } else { + this.btBVHMeshShape = BulletBvhTriangleMeshShape.getBulletBvhTriangleMeshShape(mesh.hash, mesh); + this._impl = bt.ScaledBvhTriangleMeshShape_new(this.btBVHMeshShape.bulletBvhTriangleMeshShapePtr, 1, 1, 1); } const bt_v3 = BulletCache.instance.BT_V3_0; cocos2BulletVec3(bt_v3, this._collider.node.worldScale); @@ -79,7 +74,13 @@ export class BulletTrimeshShape extends BulletShape implements ITrimeshShape { } onDestroy () { - if (this.refBtTriangleMesh) { bt._safe_delete(this.refBtTriangleMesh, EBulletType.EBulletTypeTriangleMesh); } + if (this.collider.convex) { + if (this.refBtTriangleMesh) { + bt._safe_delete(this.refBtTriangleMesh, EBulletType.EBulletTypeTriangleMesh); + } + } else if (this.btBVHMeshShape) { + this.btBVHMeshShape.reference = false; + } super.onDestroy(); } diff --git a/cocos/physics/cannon/cannon-contact-equation.ts b/cocos/physics/cannon/cannon-contact-equation.ts index da77ad78fd..c4e418bfa8 100644 --- a/cocos/physics/cannon/cannon-contact-equation.ts +++ b/cocos/physics/cannon/cannon-contact-equation.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { IContactEquation, ICollisionEvent } from '../framework'; import { IVec3Like, Quat, Vec3 } from '../../core'; diff --git a/cocos/physics/cannon/cannon-rigid-body.ts b/cocos/physics/cannon/cannon-rigid-body.ts index c8678e37fc..4f04ec8fdd 100644 --- a/cocos/physics/cannon/cannon-rigid-body.ts +++ b/cocos/physics/cannon/cannon-rigid-body.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import CANNON from '@cocos/cannon'; import { Vec3, IVec3Like } from '../../core'; diff --git a/cocos/physics/cannon/cannon-shared-body.ts b/cocos/physics/cannon/cannon-shared-body.ts index 44e2c756b6..40aa339013 100644 --- a/cocos/physics/cannon/cannon-shared-body.ts +++ b/cocos/physics/cannon/cannon-shared-body.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import CANNON from '@cocos/cannon'; import { Quat, Vec3, js } from '../../core'; diff --git a/cocos/physics/cannon/cannon-util.ts b/cocos/physics/cannon/cannon-util.ts index 1f80015edc..29d8f42d10 100644 --- a/cocos/physics/cannon/cannon-util.ts +++ b/cocos/physics/cannon/cannon-util.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import CANNON from '@cocos/cannon'; import { getWrap } from '../utils/util'; diff --git a/cocos/physics/cannon/cannon-world.ts b/cocos/physics/cannon/cannon-world.ts index 4ebf440234..e701baf097 100644 --- a/cocos/physics/cannon/cannon-world.ts +++ b/cocos/physics/cannon/cannon-world.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import CANNON from '@cocos/cannon'; import { Vec3, RecyclePool, error, js, geometry, IVec3Like } from '../../core'; diff --git a/cocos/physics/cannon/constraints/cannon-constraint.ts b/cocos/physics/cannon/constraints/cannon-constraint.ts index 7983727c39..4ae5d9cfa1 100644 --- a/cocos/physics/cannon/constraints/cannon-constraint.ts +++ b/cocos/physics/cannon/constraints/cannon-constraint.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import CANNON from '@cocos/cannon'; import { IBaseConstraint } from '../../spec/i-physics-constraint'; diff --git a/cocos/physics/cannon/constraints/cannon-distance-constraint.ts b/cocos/physics/cannon/constraints/cannon-distance-constraint.ts index 22db41ce25..7bbf7adfea 100644 --- a/cocos/physics/cannon/constraints/cannon-distance-constraint.ts +++ b/cocos/physics/cannon/constraints/cannon-distance-constraint.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ // import CANNON from '@cocos/cannon'; // import { CannonConstraint } from './cannon-constraint'; diff --git a/cocos/physics/cannon/constraints/cannon-hinge-constraint.ts b/cocos/physics/cannon/constraints/cannon-hinge-constraint.ts index ca8e8ff102..8c5b5d08b1 100644 --- a/cocos/physics/cannon/constraints/cannon-hinge-constraint.ts +++ b/cocos/physics/cannon/constraints/cannon-hinge-constraint.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import CANNON from '@cocos/cannon'; import { CannonConstraint } from './cannon-constraint'; diff --git a/cocos/physics/cannon/constraints/cannon-lock-constraint.ts b/cocos/physics/cannon/constraints/cannon-lock-constraint.ts index 26de1e7434..ac827839cc 100644 --- a/cocos/physics/cannon/constraints/cannon-lock-constraint.ts +++ b/cocos/physics/cannon/constraints/cannon-lock-constraint.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import CANNON from '@cocos/cannon'; import { IVec3Like, Vec3 } from '../../../core'; diff --git a/cocos/physics/cannon/constraints/cannon-point-to-point-constraint.ts b/cocos/physics/cannon/constraints/cannon-point-to-point-constraint.ts index 8d3f1911f5..55d3499449 100644 --- a/cocos/physics/cannon/constraints/cannon-point-to-point-constraint.ts +++ b/cocos/physics/cannon/constraints/cannon-point-to-point-constraint.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import CANNON from '@cocos/cannon'; import { CannonConstraint } from './cannon-constraint'; diff --git a/cocos/physics/cannon/instantiate.ts b/cocos/physics/cannon/instantiate.ts index 4eaa32946f..2feb807588 100644 --- a/cocos/physics/cannon/instantiate.ts +++ b/cocos/physics/cannon/instantiate.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { selector } from '../framework/physics-selector'; diff --git a/cocos/physics/cannon/shapes/cannon-box-shape.ts b/cocos/physics/cannon/shapes/cannon-box-shape.ts index 42d46e8b26..461d131ea8 100644 --- a/cocos/physics/cannon/shapes/cannon-box-shape.ts +++ b/cocos/physics/cannon/shapes/cannon-box-shape.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import CANNON from '@cocos/cannon'; import { clamp, Vec3 } from '../../../core'; diff --git a/cocos/physics/cannon/shapes/cannon-cone-shape.ts b/cocos/physics/cannon/shapes/cannon-cone-shape.ts index c32ec2b101..9c6a078829 100644 --- a/cocos/physics/cannon/shapes/cannon-cone-shape.ts +++ b/cocos/physics/cannon/shapes/cannon-cone-shape.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import CANNON from '@cocos/cannon'; import { Vec3, IVec3Like } from '../../../core'; diff --git a/cocos/physics/cannon/shapes/cannon-cylinder-shape.ts b/cocos/physics/cannon/shapes/cannon-cylinder-shape.ts index f0e01201ce..22f27b2eb5 100644 --- a/cocos/physics/cannon/shapes/cannon-cylinder-shape.ts +++ b/cocos/physics/cannon/shapes/cannon-cylinder-shape.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import CANNON from '@cocos/cannon'; import { Vec3, IVec3Like } from '../../../core'; diff --git a/cocos/physics/cannon/shapes/cannon-plane-shape.ts b/cocos/physics/cannon/shapes/cannon-plane-shape.ts index 4a3aeca2b9..66c94a8bad 100644 --- a/cocos/physics/cannon/shapes/cannon-plane-shape.ts +++ b/cocos/physics/cannon/shapes/cannon-plane-shape.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import CANNON from '@cocos/cannon'; import { Vec3, Quat, IVec3Like } from '../../../core'; diff --git a/cocos/physics/cannon/shapes/cannon-shape.ts b/cocos/physics/cannon/shapes/cannon-shape.ts index 12321769c0..5bcf26b355 100644 --- a/cocos/physics/cannon/shapes/cannon-shape.ts +++ b/cocos/physics/cannon/shapes/cannon-shape.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import CANNON from '@cocos/cannon'; import { Vec3, Quat, IVec3Like, geometry } from '../../../core'; @@ -61,20 +60,18 @@ export class CannonShape implements IBaseShape { get sharedBody (): CannonSharedBody { return this._sharedBody; } setMaterial (mat: PhysicsMaterial | null) { - if (mat == null) { - (this._shape.material as unknown) = null; - } else { - if (CannonShape.idToMaterial[mat.id] == null) { - CannonShape.idToMaterial[mat.id] = new CANNON.Material(mat.id as any); - } + const mat1 = (mat == null) ? PhysicsSystem.instance.defaultMaterial : mat; - this._shape.material = CannonShape.idToMaterial[mat.id]; - const smat = this._shape.material; - smat.friction = mat.friction; - smat.restitution = mat.restitution; - const coef = (CANNON as any).CC_CONFIG.correctInelastic; - (smat as any).correctInelastic = smat.restitution === 0 ? coef : 0; + if (CannonShape.idToMaterial[mat1.id] == null) { + CannonShape.idToMaterial[mat1.id] = new CANNON.Material(mat1.id as any); } + + this._shape.material = CannonShape.idToMaterial[mat1.id]; + const smat = this._shape.material; + smat.friction = mat1.friction; + smat.restitution = mat1.restitution; + const coef = (CANNON as any).CC_CONFIG.correctInelastic; + (smat as any).correctInelastic = smat.restitution === 0 ? coef : 0; } setAsTrigger (v: boolean) { diff --git a/cocos/physics/cannon/shapes/cannon-simplex-shape.ts b/cocos/physics/cannon/shapes/cannon-simplex-shape.ts index deb9da381d..f4b2d43b3e 100644 --- a/cocos/physics/cannon/shapes/cannon-simplex-shape.ts +++ b/cocos/physics/cannon/shapes/cannon-simplex-shape.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ /* eslint-disable func-names */ import CANNON from '@cocos/cannon'; diff --git a/cocos/physics/cannon/shapes/cannon-sphere-shape.ts b/cocos/physics/cannon/shapes/cannon-sphere-shape.ts index ebf04dcc72..f482e160ef 100644 --- a/cocos/physics/cannon/shapes/cannon-sphere-shape.ts +++ b/cocos/physics/cannon/shapes/cannon-sphere-shape.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import CANNON from '@cocos/cannon'; import { absMaxComponent, clamp, Vec3 } from '../../../core'; diff --git a/cocos/physics/cannon/shapes/cannon-terrain-shape.ts b/cocos/physics/cannon/shapes/cannon-terrain-shape.ts index d94a7f8852..98b4be7136 100644 --- a/cocos/physics/cannon/shapes/cannon-terrain-shape.ts +++ b/cocos/physics/cannon/shapes/cannon-terrain-shape.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import CANNON from '@cocos/cannon'; import { CannonShape } from './cannon-shape'; diff --git a/cocos/physics/cannon/shapes/cannon-trimesh-shape.ts b/cocos/physics/cannon/shapes/cannon-trimesh-shape.ts index 2d0c8eafc2..d425c66aa7 100644 --- a/cocos/physics/cannon/shapes/cannon-trimesh-shape.ts +++ b/cocos/physics/cannon/shapes/cannon-trimesh-shape.ts @@ -1,27 +1,26 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - */ + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ import CANNON from '@cocos/cannon'; import { CannonShape } from './cannon-shape'; diff --git a/cocos/physics/cocos/builtin-interface.ts b/cocos/physics/cocos/builtin-interface.ts index d9dcd7b5e5..ac6d5337b9 100644 --- a/cocos/physics/cocos/builtin-interface.ts +++ b/cocos/physics/cocos/builtin-interface.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Mat4, Vec3, IVec3Like, IQuatLike } from '../../core'; diff --git a/cocos/physics/cocos/builtin-rigid-body.ts b/cocos/physics/cocos/builtin-rigid-body.ts index e9e3383e19..5ac14431fc 100644 --- a/cocos/physics/cocos/builtin-rigid-body.ts +++ b/cocos/physics/cocos/builtin-rigid-body.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { IRigidBody } from '../spec/i-rigid-body'; import { IVec3Like } from '../../core'; diff --git a/cocos/physics/cocos/builtin-shared-body.ts b/cocos/physics/cocos/builtin-shared-body.ts index 8fe3b730ce..8a192bc1c0 100644 --- a/cocos/physics/cocos/builtin-shared-body.ts +++ b/cocos/physics/cocos/builtin-shared-body.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Mat4, Quat, Vec3, js, geometry } from '../../core'; import { BuiltInWorld } from './builtin-world'; diff --git a/cocos/physics/cocos/builtin-world.ts b/cocos/physics/cocos/builtin-world.ts index e19949e560..bf9b1a119b 100644 --- a/cocos/physics/cocos/builtin-world.ts +++ b/cocos/physics/cocos/builtin-world.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Vec3, RecyclePool, error, js, IVec3Like, geometry } from '../../core'; import { PhysicsRayResult } from '../framework/physics-ray-result'; diff --git a/cocos/physics/cocos/instantiate.ts b/cocos/physics/cocos/instantiate.ts index 22366ecbe5..a4b9e3cf82 100644 --- a/cocos/physics/cocos/instantiate.ts +++ b/cocos/physics/cocos/instantiate.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { selector } from '../framework/physics-selector'; import { BuiltInWorld } from './builtin-world'; diff --git a/cocos/physics/cocos/object/builtin-object.ts b/cocos/physics/cocos/object/builtin-object.ts index 1f08600bd5..2ae35688a6 100644 --- a/cocos/physics/cocos/object/builtin-object.ts +++ b/cocos/physics/cocos/object/builtin-object.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { PhysicsSystem } from '../../framework'; diff --git a/cocos/physics/cocos/shapes/builtin-box-shape.ts b/cocos/physics/cocos/shapes/builtin-box-shape.ts index 202ac9dcaf..41ae4830c3 100644 --- a/cocos/physics/cocos/shapes/builtin-box-shape.ts +++ b/cocos/physics/cocos/shapes/builtin-box-shape.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Vec3, geometry } from '../../../core'; import { BuiltinShape } from './builtin-shape'; diff --git a/cocos/physics/cocos/shapes/builtin-capsule-shape.ts b/cocos/physics/cocos/shapes/builtin-capsule-shape.ts index ba6b1b751c..36e5dce08e 100644 --- a/cocos/physics/cocos/shapes/builtin-capsule-shape.ts +++ b/cocos/physics/cocos/shapes/builtin-capsule-shape.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { BuiltinShape } from './builtin-shape'; import { ICapsuleShape } from '../../spec/i-physics-shape'; diff --git a/cocos/physics/cocos/shapes/builtin-shape.ts b/cocos/physics/cocos/shapes/builtin-shape.ts index eb371540fb..e4b672535e 100644 --- a/cocos/physics/cocos/shapes/builtin-shape.ts +++ b/cocos/physics/cocos/shapes/builtin-shape.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Mat4, Quat, Vec3, IVec3Like, geometry } from '../../../core'; import { BuiltinSharedBody } from '../builtin-shared-body'; diff --git a/cocos/physics/cocos/shapes/builtin-sphere-shape.ts b/cocos/physics/cocos/shapes/builtin-sphere-shape.ts index a478a226d1..0be5941017 100644 --- a/cocos/physics/cocos/shapes/builtin-sphere-shape.ts +++ b/cocos/physics/cocos/shapes/builtin-sphere-shape.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { geometry } from '../../../core'; import { BuiltinShape } from './builtin-shape'; diff --git a/cocos/physics/framework/assets/physics-material.ts b/cocos/physics/framework/assets/physics-material.ts index d6f95bb8ad..cbe97b669a 100644 --- a/cocos/physics/framework/assets/physics-material.ts +++ b/cocos/physics/framework/assets/physics-material.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ // @ts-check diff --git a/cocos/physics/framework/collision-matrix.ts b/cocos/physics/framework/collision-matrix.ts index 642aef313f..575440de1a 100644 --- a/cocos/physics/framework/collision-matrix.ts +++ b/cocos/physics/framework/collision-matrix.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { PhysicsGroup } from './physics-enum'; diff --git a/cocos/physics/framework/components/colliders/box-collider.ts b/cocos/physics/framework/components/colliders/box-collider.ts index ce36a7fd54..ec2ed63f2e 100644 --- a/cocos/physics/framework/components/colliders/box-collider.ts +++ b/cocos/physics/framework/components/colliders/box-collider.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, diff --git a/cocos/physics/framework/components/colliders/capsule-collider.ts b/cocos/physics/framework/components/colliders/capsule-collider.ts index 2bacea503d..8b1d82585d 100644 --- a/cocos/physics/framework/components/colliders/capsule-collider.ts +++ b/cocos/physics/framework/components/colliders/capsule-collider.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, diff --git a/cocos/physics/framework/components/colliders/collider.ts b/cocos/physics/framework/components/colliders/collider.ts index 16a08942f6..9638881fa5 100644 --- a/cocos/physics/framework/components/colliders/collider.ts +++ b/cocos/physics/framework/components/colliders/collider.ts @@ -1,19 +1,18 @@ /* eslint-disable @typescript-eslint/no-namespace */ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -22,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, tooltip, displayOrder, displayName, readOnly, type, serializable } from 'cc.decorator'; import { EDITOR } from 'internal:constants'; @@ -410,7 +409,8 @@ export class Collider extends Eventify(Component) { protected onLoad () { if (!selector.runInEditor) return; - this.sharedMaterial = this._material == null ? PhysicsSystem.instance.defaultMaterial : this._material; + + this.sharedMaterial = this._material; this._shape = createShape(this.type); this._shape.initialize(this); this._shape.onLoad!(); diff --git a/cocos/physics/framework/components/colliders/cone-collider.ts b/cocos/physics/framework/components/colliders/cone-collider.ts index c4a1157a76..9489b3e91f 100644 --- a/cocos/physics/framework/components/colliders/cone-collider.ts +++ b/cocos/physics/framework/components/colliders/cone-collider.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, diff --git a/cocos/physics/framework/components/colliders/cylinder-collider.ts b/cocos/physics/framework/components/colliders/cylinder-collider.ts index 83a917f0b2..072b60fc2a 100644 --- a/cocos/physics/framework/components/colliders/cylinder-collider.ts +++ b/cocos/physics/framework/components/colliders/cylinder-collider.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, diff --git a/cocos/physics/framework/components/colliders/mesh-collider.ts b/cocos/physics/framework/components/colliders/mesh-collider.ts index d4cf71906c..705f6eee9b 100644 --- a/cocos/physics/framework/components/colliders/mesh-collider.ts +++ b/cocos/physics/framework/components/colliders/mesh-collider.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, diff --git a/cocos/physics/framework/components/colliders/plane-collider.ts b/cocos/physics/framework/components/colliders/plane-collider.ts index 6991fb8cbb..93d5a685f4 100644 --- a/cocos/physics/framework/components/colliders/plane-collider.ts +++ b/cocos/physics/framework/components/colliders/plane-collider.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, diff --git a/cocos/physics/framework/components/colliders/simplex-collider.ts b/cocos/physics/framework/components/colliders/simplex-collider.ts index 1d1dfbada8..66b5e6b5e6 100644 --- a/cocos/physics/framework/components/colliders/simplex-collider.ts +++ b/cocos/physics/framework/components/colliders/simplex-collider.ts @@ -1,20 +1,19 @@ /* eslint-disable @typescript-eslint/no-namespace */ /* eslint-disable func-names */ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -23,7 +22,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, diff --git a/cocos/physics/framework/components/colliders/sphere-collider.ts b/cocos/physics/framework/components/colliders/sphere-collider.ts index c938d8b0ce..e4895bc94b 100644 --- a/cocos/physics/framework/components/colliders/sphere-collider.ts +++ b/cocos/physics/framework/components/colliders/sphere-collider.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, diff --git a/cocos/physics/framework/components/colliders/terrain-collider.ts b/cocos/physics/framework/components/colliders/terrain-collider.ts index 5dcc6f9440..d6f7ecefac 100644 --- a/cocos/physics/framework/components/colliders/terrain-collider.ts +++ b/cocos/physics/framework/components/colliders/terrain-collider.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, diff --git a/cocos/physics/framework/components/constant-force.ts b/cocos/physics/framework/components/constant-force.ts index f446d07086..9e1f127b86 100644 --- a/cocos/physics/framework/components/constant-force.ts +++ b/cocos/physics/framework/components/constant-force.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, diff --git a/cocos/physics/framework/components/constraints/constraint.ts b/cocos/physics/framework/components/constraints/constraint.ts index 73f563dc65..beb31e4b42 100644 --- a/cocos/physics/framework/components/constraints/constraint.ts +++ b/cocos/physics/framework/components/constraints/constraint.ts @@ -1,19 +1,18 @@ /* eslint-disable @typescript-eslint/no-namespace */ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -22,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, requireComponent, displayOrder, type, readOnly, serializable } from 'cc.decorator'; import { EDITOR } from 'internal:constants'; diff --git a/cocos/physics/framework/components/constraints/fixed-constraint.ts b/cocos/physics/framework/components/constraints/fixed-constraint.ts index 1e6d7e4651..ec5973961a 100644 --- a/cocos/physics/framework/components/constraints/fixed-constraint.ts +++ b/cocos/physics/framework/components/constraints/fixed-constraint.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, diff --git a/cocos/physics/framework/components/constraints/hinge-constraint.ts b/cocos/physics/framework/components/constraints/hinge-constraint.ts index b5df04188d..1e153f91b5 100644 --- a/cocos/physics/framework/components/constraints/hinge-constraint.ts +++ b/cocos/physics/framework/components/constraints/hinge-constraint.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, diff --git a/cocos/physics/framework/components/constraints/point-to-point-constraint.ts b/cocos/physics/framework/components/constraints/point-to-point-constraint.ts index f585d6c254..3e16fbe295 100644 --- a/cocos/physics/framework/components/constraints/point-to-point-constraint.ts +++ b/cocos/physics/framework/components/constraints/point-to-point-constraint.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, diff --git a/cocos/physics/framework/components/rigid-body.ts b/cocos/physics/framework/components/rigid-body.ts index 699677ca75..4125815e40 100644 --- a/cocos/physics/framework/components/rigid-body.ts +++ b/cocos/physics/framework/components/rigid-body.ts @@ -1,20 +1,19 @@ /* eslint-disable @typescript-eslint/no-namespace */ /* eslint-disable func-names */ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -23,7 +22,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, diff --git a/cocos/physics/framework/deprecated.ts b/cocos/physics/framework/deprecated.ts index 520d12e11b..9473bf7a3d 100644 --- a/cocos/physics/framework/deprecated.ts +++ b/cocos/physics/framework/deprecated.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { PhysicsSystem } from './physics-system'; import { replaceProperty, removeProperty, js, cclegacy } from '../../core'; diff --git a/cocos/physics/framework/index.ts b/cocos/physics/framework/index.ts index 98bd2f62e4..54a0bd6074 100644 --- a/cocos/physics/framework/index.ts +++ b/cocos/physics/framework/index.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { PhysicsSystem } from './physics-system'; import { PhysicsMaterial } from './assets/physics-material'; diff --git a/cocos/physics/framework/physics-config.ts b/cocos/physics/framework/physics-config.ts index 8bd3f0f340..c570ac0fd1 100644 --- a/cocos/physics/framework/physics-config.ts +++ b/cocos/physics/framework/physics-config.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { IVec3Like } from '../../core'; diff --git a/cocos/physics/framework/physics-enum.ts b/cocos/physics/framework/physics-enum.ts index 8b188ba414..f5bf0fc2dc 100644 --- a/cocos/physics/framework/physics-enum.ts +++ b/cocos/physics/framework/physics-enum.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Enum } from '../../core'; diff --git a/cocos/physics/framework/physics-interface.ts b/cocos/physics/framework/physics-interface.ts index a1a252d227..0c3179ed35 100644 --- a/cocos/physics/framework/physics-interface.ts +++ b/cocos/physics/framework/physics-interface.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { IVec3Like } from '../../core'; import { Collider } from './components/colliders/collider'; diff --git a/cocos/physics/framework/physics-ray-result.ts b/cocos/physics/framework/physics-ray-result.ts index 07fd93f00a..374055979f 100644 --- a/cocos/physics/framework/physics-ray-result.ts +++ b/cocos/physics/framework/physics-ray-result.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Vec3, IVec3Like } from '../../core'; import { Collider } from '../../../exports/physics-framework'; diff --git a/cocos/physics/framework/physics-selector.ts b/cocos/physics/framework/physics-selector.ts index 625b922156..8bd60eb3b7 100644 --- a/cocos/physics/framework/physics-selector.ts +++ b/cocos/physics/framework/physics-selector.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ /* eslint-disable import/no-mutable-exports */ /* eslint-disable @typescript-eslint/restrict-template-expressions */ diff --git a/cocos/physics/framework/physics-system.ts b/cocos/physics/framework/physics-system.ts index 980ecf484f..f75cb425a8 100644 --- a/cocos/physics/framework/physics-system.ts +++ b/cocos/physics/framework/physics-system.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { EDITOR } from 'internal:constants'; import { Vec3, RecyclePool, Enum, System, cclegacy, Settings, settings, geometry, warn } from '../../core'; diff --git a/cocos/physics/physx/instantiate.jsb.ts b/cocos/physics/physx/instantiate.jsb.ts index f5325cc416..972a27ee0a 100644 --- a/cocos/physics/physx/instantiate.jsb.ts +++ b/cocos/physics/physx/instantiate.jsb.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ /** * hack for jsb, shoule be refactor in futrue diff --git a/cocos/physics/physx/instantiate.ts b/cocos/physics/physx/instantiate.ts index 7c9c41b07d..f2d27ef2a0 100644 --- a/cocos/physics/physx/instantiate.ts +++ b/cocos/physics/physx/instantiate.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { selector } from '../framework/physics-selector'; diff --git a/cocos/physics/physx/joints/physx-fixed-joint.ts b/cocos/physics/physx/joints/physx-fixed-joint.ts index 424a2d7a52..543c2f12e0 100644 --- a/cocos/physics/physx/joints/physx-fixed-joint.ts +++ b/cocos/physics/physx/joints/physx-fixed-joint.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { IVec3Like, Vec3, Quat, Mat4 } from '../../../core'; import { FixedConstraint, PhysicsSystem } from '../../framework'; diff --git a/cocos/physics/physx/joints/physx-joint.ts b/cocos/physics/physx/joints/physx-joint.ts index 53eddb1b8d..dedff979d8 100644 --- a/cocos/physics/physx/joints/physx-joint.ts +++ b/cocos/physics/physx/joints/physx-joint.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ /* eslint-disable @typescript-eslint/no-unsafe-return */ import { Constraint, RigidBody } from '../../framework'; diff --git a/cocos/physics/physx/joints/physx-revolute-joint.ts b/cocos/physics/physx/joints/physx-revolute-joint.ts index 8110e588f2..52694c1273 100644 --- a/cocos/physics/physx/joints/physx-revolute-joint.ts +++ b/cocos/physics/physx/joints/physx-revolute-joint.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { IVec3Like, Quat, Vec3 } from '../../../core'; import { HingeConstraint } from '../../framework'; diff --git a/cocos/physics/physx/joints/physx-spherical-joint.ts b/cocos/physics/physx/joints/physx-spherical-joint.ts index dbaf1f1758..d85af26c14 100644 --- a/cocos/physics/physx/joints/physx-spherical-joint.ts +++ b/cocos/physics/physx/joints/physx-spherical-joint.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { IVec3Like, Quat, Vec3 } from '../../../core'; import { PointToPointConstraint } from '../../framework'; diff --git a/cocos/physics/physx/physx-adapter.ts b/cocos/physics/physx/physx-adapter.ts index 1f95e2d403..6451ec1a12 100644 --- a/cocos/physics/physx/physx-adapter.ts +++ b/cocos/physics/physx/physx-adapter.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ /* eslint-disable import/no-mutable-exports */ /* eslint-disable no-console */ diff --git a/cocos/physics/physx/physx-contact-equation.ts b/cocos/physics/physx/physx-contact-equation.ts index 33016b59f7..d7df69ac6b 100644 --- a/cocos/physics/physx/physx-contact-equation.ts +++ b/cocos/physics/physx/physx-contact-equation.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { IVec3Like, Vec3, Quat } from '../../core'; import { IContactEquation, ICollisionEvent, Collider } from '../framework'; diff --git a/cocos/physics/physx/physx-enum.ts b/cocos/physics/physx/physx-enum.ts index 4b1cb94037..8a2fee5dc5 100644 --- a/cocos/physics/physx/physx-enum.ts +++ b/cocos/physics/physx/physx-enum.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ /* eslint-disable max-len */ /* eslint-disable no-tabs */ diff --git a/cocos/physics/physx/physx-instance.ts b/cocos/physics/physx/physx-instance.ts index 1aed805737..889e89b801 100644 --- a/cocos/physics/physx/physx-instance.ts +++ b/cocos/physics/physx/physx-instance.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import './physx.null'; /** diff --git a/cocos/physics/physx/physx-rigid-body.ts b/cocos/physics/physx/physx-rigid-body.ts index 3420a5f7ed..8e78a30fd8 100644 --- a/cocos/physics/physx/physx-rigid-body.ts +++ b/cocos/physics/physx/physx-rigid-body.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ /* eslint-disable @typescript-eslint/no-unsafe-return */ import { IVec3Like, Vec3 } from '../../core'; diff --git a/cocos/physics/physx/physx-shared-body.ts b/cocos/physics/physx/physx-shared-body.ts index e76849fe6f..52c1fbec19 100644 --- a/cocos/physics/physx/physx-shared-body.ts +++ b/cocos/physics/physx/physx-shared-body.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ /* eslint-disable @typescript-eslint/no-unsafe-return */ import { Quat, Vec3, js } from '../../core'; diff --git a/cocos/physics/physx/physx-world.ts b/cocos/physics/physx/physx-world.ts index d210eb36ce..20de83abbb 100644 --- a/cocos/physics/physx/physx-world.ts +++ b/cocos/physics/physx/physx-world.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ /* eslint-disable @typescript-eslint/no-unsafe-return */ import { IPhysicsWorld, IRaycastOptions } from '../spec/i-physics-world'; diff --git a/cocos/physics/physx/physx.asmjs.ts b/cocos/physics/physx/physx.asmjs.ts index d01c92ab25..42c0a7a9b0 100644 --- a/cocos/physics/physx/physx.asmjs.ts +++ b/cocos/physics/physx/physx.asmjs.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ /** * export PhysX from internal module diff --git a/cocos/physics/physx/physx.null.ts b/cocos/physics/physx/physx.null.ts index adb72452f7..23af4b8b64 100644 --- a/cocos/physics/physx/physx.null.ts +++ b/cocos/physics/physx/physx.null.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ /** * export null for module elimination diff --git a/cocos/physics/physx/shapes/physx-box-shape.ts b/cocos/physics/physx/shapes/physx-box-shape.ts index 2f7413224e..ddbbd684cf 100644 --- a/cocos/physics/physx/shapes/physx-box-shape.ts +++ b/cocos/physics/physx/shapes/physx-box-shape.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { BoxCollider } from '../../framework'; import { absolute, VEC3_0 } from '../../utils/util'; diff --git a/cocos/physics/physx/shapes/physx-capsule-shape.ts b/cocos/physics/physx/shapes/physx-capsule-shape.ts index 81ae841e76..a56b6972ae 100644 --- a/cocos/physics/physx/shapes/physx-capsule-shape.ts +++ b/cocos/physics/physx/shapes/physx-capsule-shape.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { absMax, Quat } from '../../../core'; import { CapsuleCollider, EAxisDirection } from '../../framework'; diff --git a/cocos/physics/physx/shapes/physx-cone-shape.ts b/cocos/physics/physx/shapes/physx-cone-shape.ts index ca32aad38e..4925ef17e1 100644 --- a/cocos/physics/physx/shapes/physx-cone-shape.ts +++ b/cocos/physics/physx/shapes/physx-cone-shape.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Quat, Vec3 } from '../../../core'; import cylinder from '../../../primitive/cylinder'; diff --git a/cocos/physics/physx/shapes/physx-cylinder-shape.ts b/cocos/physics/physx/shapes/physx-cylinder-shape.ts index d1aeef5ec0..f0f5fcf22c 100644 --- a/cocos/physics/physx/shapes/physx-cylinder-shape.ts +++ b/cocos/physics/physx/shapes/physx-cylinder-shape.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Quat, Vec3 } from '../../../core'; import cylinder from '../../../primitive/cylinder'; @@ -67,7 +66,7 @@ export class PhysXCylinderShape extends PhysXShape implements ICylinderShape { meshScale.setScale(Vec3.ONE); meshScale.setRotation(Quat.IDENTITY); const convexMesh = PhysXCylinderShape.CONVEX_MESH; - const pxmat = this.getSharedMaterial(collider.sharedMaterial!); + const pxmat = this.getSharedMaterial(collider.sharedMaterial); this.geometry = new PX.ConvexMeshGeometry(convexMesh, meshScale, createMeshGeometryFlags(0, true)); this.updateGeometry(); this._impl = physics.createShape(this.geometry, pxmat, true, this._flags); diff --git a/cocos/physics/physx/shapes/physx-plane-shape.ts b/cocos/physics/physx/shapes/physx-plane-shape.ts index 28ea3e2f6f..569424ad85 100644 --- a/cocos/physics/physx/shapes/physx-plane-shape.ts +++ b/cocos/physics/physx/shapes/physx-plane-shape.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { IVec3Like, Quat, Vec3 } from '../../../core'; import { PlaneCollider } from '../../framework'; @@ -64,7 +63,7 @@ export class PhysXPlaneShape extends PhysXShape implements IPlaneShape { onComponentSet (): void { const co = this.collider; - const pxmat = this.getSharedMaterial(co.sharedMaterial!); + const pxmat = this.getSharedMaterial(co.sharedMaterial); this._impl = PhysXInstance.physics.createShape(PhysXPlaneShape.PLANE_GEOMETRY, pxmat, true, this._flags); this.setCenter(); } diff --git a/cocos/physics/physx/shapes/physx-shape.ts b/cocos/physics/physx/shapes/physx-shape.ts index 20a2e5d05c..9f90e57702 100644 --- a/cocos/physics/physx/shapes/physx-shape.ts +++ b/cocos/physics/physx/shapes/physx-shape.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ /* eslint-disable @typescript-eslint/no-unsafe-return */ import { IVec3Like, Quat, Vec3, geometry } from '../../../core'; @@ -125,24 +124,24 @@ export class PhysXShape implements IBaseShape { } setMaterial (v: PhysicsMaterial | null): void { - if (v == null) v = PhysicsSystem.instance.defaultMaterial; const mat = this.getSharedMaterial(v); this._impl.setMaterials(getShapeMaterials(mat)); } - protected getSharedMaterial (v: PhysicsMaterial): any { - if (!PX.CACHE_MAT[v.id]) { + protected getSharedMaterial (v: PhysicsMaterial | null): any { + const v1 = (v == null) ? PhysicsSystem.instance.defaultMaterial : v; + if (!PX.CACHE_MAT[v1.id]) { const physics = PhysXInstance.physics; - const mat = physics.createMaterial(v.friction, v.friction, v.restitution); + const mat = physics.createMaterial(v1.friction, v1.friction, v1.restitution); mat.setFrictionCombineMode(PX.CombineMode.eMULTIPLY); mat.setRestitutionCombineMode(PX.CombineMode.eMULTIPLY); - PX.CACHE_MAT[v.id] = mat; + PX.CACHE_MAT[v1.id] = mat; return mat; } - const mat = PX.CACHE_MAT[v.id]; - mat.setStaticFriction(v.friction); - mat.setDynamicFriction(v.friction); - mat.setRestitution(v.restitution); + const mat = PX.CACHE_MAT[v1.id]; + mat.setStaticFriction(v1.friction); + mat.setDynamicFriction(v1.friction); + mat.setRestitution(v1.restitution); return mat; } diff --git a/cocos/physics/physx/shapes/physx-sphere-shape.ts b/cocos/physics/physx/shapes/physx-sphere-shape.ts index 2799023623..d7e99de116 100644 --- a/cocos/physics/physx/shapes/physx-sphere-shape.ts +++ b/cocos/physics/physx/shapes/physx-sphere-shape.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { absMaxComponent } from '../../../core'; import { SphereCollider } from '../../framework'; @@ -50,7 +49,7 @@ export class PhysXSphereShape extends PhysXShape implements ISphereShape { onComponentSet () { this.updateGeometry(); - const pxmat = this.getSharedMaterial(this.collider.sharedMaterial!); + const pxmat = this.getSharedMaterial(this.collider.sharedMaterial); this._impl = PhysXInstance.physics.createShape(PhysXSphereShape.SPHERE_GEOMETRY, pxmat, true, this._flags); } diff --git a/cocos/physics/physx/shapes/physx-terrain-shape.ts b/cocos/physics/physx/shapes/physx-terrain-shape.ts index aac0767c6a..f25ee0a81d 100644 --- a/cocos/physics/physx/shapes/physx-terrain-shape.ts +++ b/cocos/physics/physx/shapes/physx-terrain-shape.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { IVec3Like } from '../../../core'; import { PhysicsMaterial, TerrainCollider } from '../../framework'; diff --git a/cocos/physics/physx/shapes/physx-trimesh-shape.ts b/cocos/physics/physx/shapes/physx-trimesh-shape.ts index f6cecc396d..d4437a9060 100644 --- a/cocos/physics/physx/shapes/physx-trimesh-shape.ts +++ b/cocos/physics/physx/shapes/physx-trimesh-shape.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { IVec3Like, Quat, Vec3 } from '../../../core'; diff --git a/cocos/physics/spec/i-external.ts b/cocos/physics/spec/i-external.ts index 7ce0bb3c8d..49e1f5fe3f 100644 --- a/cocos/physics/spec/i-external.ts +++ b/cocos/physics/spec/i-external.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ export interface ITerrainAsset { _uuid: string; diff --git a/cocos/physics/spec/i-group-mask.ts b/cocos/physics/spec/i-group-mask.ts index 439698f353..2fd4bcb2e7 100644 --- a/cocos/physics/spec/i-group-mask.ts +++ b/cocos/physics/spec/i-group-mask.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ export interface IGroupMask { setGroup (v: number): void; diff --git a/cocos/physics/spec/i-lifecycle.ts b/cocos/physics/spec/i-lifecycle.ts index 6b9c740925..5b010e012b 100644 --- a/cocos/physics/spec/i-lifecycle.ts +++ b/cocos/physics/spec/i-lifecycle.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ export interface ILifecycle { /** diff --git a/cocos/physics/spec/i-physics-constraint.ts b/cocos/physics/spec/i-physics-constraint.ts index ad3c0bf4f7..c117d7a8e5 100644 --- a/cocos/physics/spec/i-physics-constraint.ts +++ b/cocos/physics/spec/i-physics-constraint.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ILifecycle } from './i-lifecycle'; import { Constraint, RigidBody } from '../framework'; diff --git a/cocos/physics/spec/i-physics-shape.ts b/cocos/physics/spec/i-physics-shape.ts index 03b9783e7c..0199d84a6d 100644 --- a/cocos/physics/spec/i-physics-shape.ts +++ b/cocos/physics/spec/i-physics-shape.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ILifecycle } from './i-lifecycle'; import { IGroupMask } from './i-group-mask'; diff --git a/cocos/physics/spec/i-physics-world.ts b/cocos/physics/spec/i-physics-world.ts index 36f6bbb3ff..5733679a7d 100644 --- a/cocos/physics/spec/i-physics-world.ts +++ b/cocos/physics/spec/i-physics-world.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { IVec3Like, RecyclePool, geometry } from '../../core'; import { PhysicsRayResult } from '../framework/physics-ray-result'; diff --git a/cocos/physics/spec/i-rigid-body.ts b/cocos/physics/spec/i-rigid-body.ts index 7004fb677c..d7287a3ef0 100644 --- a/cocos/physics/spec/i-rigid-body.ts +++ b/cocos/physics/spec/i-rigid-body.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ILifecycle } from './i-lifecycle'; import { IGroupMask } from './i-group-mask'; diff --git a/cocos/physics/utils/array-collision-matrix.ts b/cocos/physics/utils/array-collision-matrix.ts index 11e06373a1..9123f67aae 100644 --- a/cocos/physics/utils/array-collision-matrix.ts +++ b/cocos/physics/utils/array-collision-matrix.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ /** * Collision "matrix". It's actually a triangular-shaped array of whether two bodies are touching this step, for reference next step diff --git a/cocos/physics/utils/object-collision-matrix.ts b/cocos/physics/utils/object-collision-matrix.ts index 3272e226f4..94c4ccdfdb 100644 --- a/cocos/physics/utils/object-collision-matrix.ts +++ b/cocos/physics/utils/object-collision-matrix.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ /** * Records what objects are colliding with each other diff --git a/cocos/physics/utils/tuple-dictionary.ts b/cocos/physics/utils/tuple-dictionary.ts index f89ff816b4..d308a8fb7b 100644 --- a/cocos/physics/utils/tuple-dictionary.ts +++ b/cocos/physics/utils/tuple-dictionary.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ /** * @class TupleDictionary diff --git a/cocos/physics/utils/util.ts b/cocos/physics/utils/util.ts index 7e968fb015..bda38e8436 100644 --- a/cocos/physics/utils/util.ts +++ b/cocos/physics/utils/util.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { equals, Vec3, IVec3Like } from '../../core'; import { Collider, CollisionEventType, IContactEquation, TriggerEventType } from '../framework'; diff --git a/cocos/primitive/box.ts b/cocos/primitive/box.ts index bcad5c4279..4cdf7668e0 100644 --- a/cocos/primitive/box.ts +++ b/cocos/primitive/box.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Vec3 } from '../core'; import { IGeometry, IGeometryOptions } from './define'; diff --git a/cocos/primitive/capsule.ts b/cocos/primitive/capsule.ts index b863260973..0f04ab78be 100644 --- a/cocos/primitive/capsule.ts +++ b/cocos/primitive/capsule.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Vec3 } from '../core'; diff --git a/cocos/primitive/circle.ts b/cocos/primitive/circle.ts index 6c32c28b99..a2d0604f96 100644 --- a/cocos/primitive/circle.ts +++ b/cocos/primitive/circle.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { PrimitiveMode } from '../gfx'; import { applyDefaultGeometryOptions, IGeometry, IGeometryOptions } from './define'; diff --git a/cocos/primitive/cone.ts b/cocos/primitive/cone.ts index 433ef823e1..61cbc7a0ff 100644 --- a/cocos/primitive/cone.ts +++ b/cocos/primitive/cone.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import cylinder, { ICylinderOptions } from './cylinder'; import { IGeometry } from './define'; diff --git a/cocos/primitive/cylinder.ts b/cocos/primitive/cylinder.ts index 466551c8b0..ae9a6fffe7 100644 --- a/cocos/primitive/cylinder.ts +++ b/cocos/primitive/cylinder.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Vec3 } from '../core'; import { IGeometry, IGeometryOptions } from './define'; diff --git a/cocos/primitive/define.ts b/cocos/primitive/define.ts index 8193bfaa03..5c2e11ffe1 100644 --- a/cocos/primitive/define.ts +++ b/cocos/primitive/define.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { PrimitiveMode, Attribute } from '../gfx'; diff --git a/cocos/primitive/index.ts b/cocos/primitive/index.ts index 77608aad3a..0ca9d1a9ea 100644 --- a/cocos/primitive/index.ts +++ b/cocos/primitive/index.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ export * from './utils'; export * from './define'; diff --git a/cocos/primitive/plane.ts b/cocos/primitive/plane.ts index 74e68d12cf..7ad00b708e 100644 --- a/cocos/primitive/plane.ts +++ b/cocos/primitive/plane.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Vec3 } from '../core'; import { applyDefaultGeometryOptions, IGeometry, IGeometryOptions } from './define'; diff --git a/cocos/primitive/primitive.ts b/cocos/primitive/primitive.ts index 6de055a7c6..0fd0ac9f49 100644 --- a/cocos/primitive/primitive.ts +++ b/cocos/primitive/primitive.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, type, serializable, editable } from 'cc.decorator'; import { createMesh } from '../3d/misc'; diff --git a/cocos/primitive/quad.ts b/cocos/primitive/quad.ts index 94337a53bb..66dab1d94d 100644 --- a/cocos/primitive/quad.ts +++ b/cocos/primitive/quad.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { applyDefaultGeometryOptions, IGeometry, IGeometryOptions } from './define'; diff --git a/cocos/primitive/sphere.ts b/cocos/primitive/sphere.ts index 9cc9cd0486..87f9008baf 100644 --- a/cocos/primitive/sphere.ts +++ b/cocos/primitive/sphere.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Vec3 } from '../core'; import { IGeometry, IGeometryOptions } from './define'; diff --git a/cocos/primitive/torus.ts b/cocos/primitive/torus.ts index d67cc3772c..b3628fe80a 100644 --- a/cocos/primitive/torus.ts +++ b/cocos/primitive/torus.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Vec3 } from '../core'; import { IGeometryOptions } from './define'; diff --git a/cocos/primitive/transform.ts b/cocos/primitive/transform.ts index 754e2db4c6..17ff15e8fa 100644 --- a/cocos/primitive/transform.ts +++ b/cocos/primitive/transform.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { PrimitiveMode } from '../gfx'; import { IGeometry } from './define'; diff --git a/cocos/primitive/utils.ts b/cocos/primitive/utils.ts index fa823a6a48..181e6e069f 100644 --- a/cocos/primitive/utils.ts +++ b/cocos/primitive/utils.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { PrimitiveMode } from '../gfx'; import { IGeometry } from './define'; diff --git a/cocos/profiler/counter.ts b/cocos/profiler/counter.ts index 5683c36c13..461f44992d 100644 --- a/cocos/profiler/counter.ts +++ b/cocos/profiler/counter.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ export interface ICounterOption { desc: string; diff --git a/cocos/profiler/perf-counter.ts b/cocos/profiler/perf-counter.ts index 72b4fa332c..d6597d2140 100644 --- a/cocos/profiler/perf-counter.ts +++ b/cocos/profiler/perf-counter.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass } from 'cc.decorator'; import { Counter, ICounterOption } from './counter'; diff --git a/cocos/profiler/profiler.ts b/cocos/profiler/profiler.ts index 116acc9491..49ce9e2d92 100644 --- a/cocos/profiler/profiler.ts +++ b/cocos/profiler/profiler.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -38,6 +37,7 @@ import { preTransforms, System, sys, cclegacy, Settings, settings } from '../cor import { Root } from '../root'; import { PipelineRuntime } from '../rendering/custom/pipeline'; import { director } from '../game'; +import { ccwindow } from '../core/global-exports'; const _characters = '0123456789. '; @@ -129,7 +129,7 @@ export class Profiler extends System { constructor () { super(); if (!TEST) { - this._canvas = document.createElement('canvas'); + this._canvas = ccwindow.document.createElement('canvas'); this._ctx = this._canvas.getContext('2d')!; this._canvasArr.push(this._canvas); } diff --git a/cocos/render-scene/config.ts b/cocos/render-scene/config.ts index 4b1a9bba57..0ea358ca99 100644 --- a/cocos/render-scene/config.ts +++ b/cocos/render-scene/config.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ let _stageOffset = 0; const _name2stageID = {}; diff --git a/cocos/render-scene/core/constants.ts b/cocos/render-scene/core/constants.ts index c3bdb5ac45..4c8b03cc08 100644 --- a/cocos/render-scene/core/constants.ts +++ b/cocos/render-scene/core/constants.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ export enum RenderQueue { OPAQUE = 0, diff --git a/cocos/render-scene/core/material-instance.jsb.ts b/cocos/render-scene/core/material-instance.jsb.ts index a6597c9f1b..5d7c4ae394 100644 --- a/cocos/render-scene/core/material-instance.jsb.ts +++ b/cocos/render-scene/core/material-instance.jsb.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Material } from '../../asset/assets/material'; import { Renderer } from '../../core/components/renderer'; diff --git a/cocos/render-scene/core/material-instance.ts b/cocos/render-scene/core/material-instance.ts index d5b26b0468..835db5e06f 100644 --- a/cocos/render-scene/core/material-instance.ts +++ b/cocos/render-scene/core/material-instance.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/render-scene/core/memory-pools.ts b/cocos/render-scene/core/memory-pools.ts index 6f0459ee9a..74f15db6cb 100644 --- a/cocos/render-scene/core/memory-pools.ts +++ b/cocos/render-scene/core/memory-pools.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/render-scene/core/native-pools.jsb.ts b/cocos/render-scene/core/native-pools.jsb.ts index 82cacca2a8..bc22e53097 100644 --- a/cocos/render-scene/core/native-pools.jsb.ts +++ b/cocos/render-scene/core/native-pools.jsb.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ declare const jsb: any; diff --git a/cocos/render-scene/core/native-pools.ts b/cocos/render-scene/core/native-pools.ts index b846ae14fc..3d3b9de1b7 100644 --- a/cocos/render-scene/core/native-pools.ts +++ b/cocos/render-scene/core/native-pools.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/render-scene/core/pass-instance.ts b/cocos/render-scene/core/pass-instance.ts index 81df1f10cd..85932419a9 100644 --- a/cocos/render-scene/core/pass-instance.ts +++ b/cocos/render-scene/core/pass-instance.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/render-scene/core/pass-utils.ts b/cocos/render-scene/core/pass-utils.ts index 8202b1246d..64fa3825fb 100644 --- a/cocos/render-scene/core/pass-utils.ts +++ b/cocos/render-scene/core/pass-utils.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/render-scene/core/pass.jsb.ts b/cocos/render-scene/core/pass.jsb.ts index 3465649225..d5aba28ba2 100644 --- a/cocos/render-scene/core/pass.jsb.ts +++ b/cocos/render-scene/core/pass.jsb.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { MacroRecord } from "./pass-utils"; import { EffectAsset } from '../../asset/assets/effect-asset'; diff --git a/cocos/render-scene/core/pass.ts b/cocos/render-scene/core/pass.ts index 37d24b0043..8128db8df4 100644 --- a/cocos/render-scene/core/pass.ts +++ b/cocos/render-scene/core/pass.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -124,11 +123,7 @@ export class Pass { if (info.stage !== undefined) { pass._stage = info.stage; } if (info.dynamicStates !== undefined) { pass._dynamicStates = info.dynamicStates; } if (info.phase !== undefined) { - if (cclegacy.rendering && cclegacy.rendering.enableEffectImport) { - pass._phase = cclegacy.rendering.completePhaseName(info.phase); - } else { - pass._phase = getPhaseID(info.phase); - } + pass._phase = getPhaseID(info.phase); } const bs = pass._bs; @@ -595,20 +590,25 @@ export class Pass { this._stage = RenderPassStage.DEFAULT; if (cclegacy.rendering && cclegacy.rendering.enableEffectImport) { const r = cclegacy.rendering; - this._phase = r.completePhaseName(info.phase); - this._passID = r.getPassID(info.pass); + if (typeof info.phase === 'number') { + this._passID = (info as Pass)._passID; + this._phaseID = (info as Pass)._phaseID; + } else { + this._passID = r.getPassID(info.pass); + if (this._passID !== r.INVALID_ID) { + this._phaseID = r.getPhaseID(this._passID, info.phase); + } + } if (this._passID === r.INVALID_ID) { console.error(`Invalid render pass, program: ${info.program}`); return; } - this._phaseID = r.getPhaseID(this._passID, info.phase); if (this._phaseID === r.INVALID_ID) { console.error(`Invalid render phase, program: ${info.program}`); return; } - } else { - this._phase = getPhaseID('default'); } + this._phase = getPhaseID('default'); this._primitive = PrimitiveMode.TRIANGLE_LIST; this._passIndex = info.passIndex; @@ -838,6 +838,8 @@ export class Pass { get primitive (): PrimitiveMode { return this._primitive; } get stage (): RenderPassStage { return this._stage; } get phase (): number { return this._phase; } + get passID (): number { return this._passID; } + get phaseID (): number { return this._phaseID; } get rasterizerState (): RasterizerState { return this._rs; } get depthStencilState (): DepthStencilState { return this._dss; } get blendState (): BlendState { return this._bs; } diff --git a/cocos/render-scene/core/program-lib.jsb.ts b/cocos/render-scene/core/program-lib.jsb.ts index df0c66f68b..80170504e8 100644 --- a/cocos/render-scene/core/program-lib.jsb.ts +++ b/cocos/render-scene/core/program-lib.jsb.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { API, } from '../../gfx'; import { cclegacy } from '../../core'; diff --git a/cocos/render-scene/core/program-lib.ts b/cocos/render-scene/core/program-lib.ts index d396b21fac..ed1e581cbd 100644 --- a/cocos/render-scene/core/program-lib.ts +++ b/cocos/render-scene/core/program-lib.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/render-scene/core/program-utils.ts b/cocos/render-scene/core/program-utils.ts index f840e7e2c9..00c16bdc7a 100644 --- a/cocos/render-scene/core/program-utils.ts +++ b/cocos/render-scene/core/program-utils.ts @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -25,6 +24,7 @@ import { EffectAsset } from '../../asset/assets/effect-asset'; import { Attribute, GetTypeSize, ShaderInfo, Uniform } from '../../gfx/base/define'; +import { UBOForwardLight, UBOSkinning } from '../../rendering/define'; import { genHandle, MacroRecord } from './pass-utils'; import { IProgramInfo } from './program-lib'; @@ -114,8 +114,28 @@ export function getVariantKey (programInfo: IProgramInfo, defines: MacroRecord) return `${key.toString(16)}|${programInfo.hash}`; } +const defaultUniformCounts = new Map(); +defaultUniformCounts.set('cc_joints', UBOSkinning.LAYOUT.members[0].count); +defaultUniformCounts.set('cc_lightPos', UBOForwardLight.LIGHTS_PER_PASS); +defaultUniformCounts.set('cc_lightColor', UBOForwardLight.LIGHTS_PER_PASS); +defaultUniformCounts.set('cc_lightSizeRangeAngle', UBOForwardLight.LIGHTS_PER_PASS); +defaultUniformCounts.set('cc_lightDir', UBOForwardLight.LIGHTS_PER_PASS); + +function getUniformSize (prevSize: number, m: Uniform) { + if (m.count) { + return prevSize + GetTypeSize(m.type) * m.count; + } else { + const count = defaultUniformCounts.get(m.name); + if (count !== undefined) { + return prevSize + GetTypeSize(m.type) * count; + } + console.error(`uniform '${m.name}' must have a count`); + } + return prevSize; +} + export function getSize (blockMembers: Uniform[]) { - return blockMembers.reduce((s, m) => s + GetTypeSize(m.type) * m.count, 0); + return blockMembers.reduce(getUniformSize, 0); } export function genHandles (tmpl: EffectAsset.IShaderInfo | ShaderInfo) { @@ -182,3 +202,16 @@ export function getCombinationDefines (combination: EffectAsset.IPreCompileInfo) }, [] as MacroRecord[]), [{}] as MacroRecord[]); return defines; } + +export function addEffectDefaultProperties (effect: EffectAsset) { + for (let i = 0; i < effect.techniques.length; i++) { + const tech = effect.techniques[i]; + for (let j = 0; j < tech.passes.length; j++) { + const pass = tech.passes[j]; + // grab default property declaration if there is none + if (pass.propertyIndex !== undefined && pass.properties === undefined) { + pass.properties = tech.passes[pass.propertyIndex].properties; + } + } + } +} diff --git a/cocos/render-scene/core/render-scene.jsb.ts b/cocos/render-scene/core/render-scene.jsb.ts index ac8677d460..78d99ea2b7 100644 --- a/cocos/render-scene/core/render-scene.jsb.ts +++ b/cocos/render-scene/core/render-scene.jsb.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Node } from '../../scene-graph'; diff --git a/cocos/render-scene/core/render-scene.ts b/cocos/render-scene/core/render-scene.ts index 1f9b5969fb..d3e129e144 100644 --- a/cocos/render-scene/core/render-scene.ts +++ b/cocos/render-scene/core/render-scene.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Root } from '../../root'; import { Node } from '../../scene-graph'; import { Camera } from '../scene/camera'; @@ -133,7 +132,7 @@ export class RenderScene { * @en All LOD groups of the render scene * @zh 渲染场景管理的所有 LOD 组 */ - get lodGroups () : readonly LODGroup[] { return this._lodGroups; } + get lodGroups (): readonly LODGroup[] { return this._lodGroups; } private _root: Root; private _name = ''; @@ -146,6 +145,7 @@ export class RenderScene { private _spotLights: SpotLight[] = []; private _mainLight: DirectionalLight | null = null; private _modelId = 0; + private _lodStateCache: LodStateCache = null!; /** * Register the creation function of the render scene to root. @@ -166,6 +166,7 @@ export class RenderScene { */ public initialize (info: IRenderSceneInfo): boolean { this._name = info.name; + this._lodStateCache = new LodStateCache(this); return true; } @@ -202,6 +203,7 @@ export class RenderScene { model.updateUBOs(stamp); } } + this._lodStateCache.updateLodState(); } /** @@ -214,6 +216,11 @@ export class RenderScene { this.removeSpotLights(); this.removeModels(); this.removeLODGroups(); + this._lodStateCache.clearCache(); + } + + public isCulledByLod (camera: Camera, model: Model) { + return this._lodStateCache.isLodModelCulled(camera, model); } /** @@ -223,6 +230,7 @@ export class RenderScene { public addCamera (cam: Camera) { cam.attachToScene(this); this._cameras.push(cam); + this._lodStateCache.addCamera(cam); } /** @@ -234,6 +242,7 @@ export class RenderScene { if (this._cameras[i] === camera) { this._cameras.splice(i, 1); camera.detachFromScene(); + this._lodStateCache.removeCamera(camera); return; } } @@ -246,6 +255,7 @@ export class RenderScene { public removeCameras () { for (const camera of this._cameras) { camera.detachFromScene(); + this._lodStateCache.removeCamera(camera); } this._cameras.splice(0); } @@ -395,6 +405,7 @@ export class RenderScene { public removeModel (model: Model) { for (let i = 0; i < this._models.length; ++i) { if (this._models[i] === model) { + this._lodStateCache.removeModel(model); model.detachFromScene(); this._models.splice(i, 1); @@ -409,6 +420,7 @@ export class RenderScene { */ public removeModels () { for (const m of this._models) { + this._lodStateCache.removeModel(m); m.detachFromScene(); m.destroy(); } @@ -461,6 +473,7 @@ export class RenderScene { addLODGroup (lodGroup: LODGroup) { this._lodGroups.push(lodGroup); lodGroup.attachToScene(this); + this._lodStateCache.addLodGroup(lodGroup); } /** @@ -474,6 +487,7 @@ export class RenderScene { if (index >= 0) { this._lodGroups.splice(index, 1); lodGroup.detachFromScene(); + this._lodStateCache.removeLodGroup(lodGroup); } } @@ -483,6 +497,9 @@ export class RenderScene { * @zh 删除所有LOD 组。 */ removeLODGroups () { + for (const group of this._lodGroups) { + this._lodStateCache.removeLodGroup(group); + } this._lodGroups.length = 0; } @@ -505,3 +522,249 @@ export class RenderScene { return this._modelId++; } } + +class ModelInfo { + /** + * @zh model 所属的 LOD 层级 + * @en LOD level of the model。 + */ + ownerLodLevel = -1; + lodGroup: LODGroup = null!; + /** + * @zh model 能被看到的相机列表 + * @en List of cameras that model can be seen. + */ + visibleCameras: Map = new Map(); +} + +class LODInfo { + /** + * @zh 当前使用哪一级的 LOD, -1 表示没有层级被使用 + * @en Which level of LOD is currently in use, -1 means no levels are used + */ + usedLevel = -1; + transformDirty = true; +} + +/** + * @zh 管理LODGroup的使用状态,包含使用层级及其上的model可见相机列表;便于判断当前model是否被LODGroup裁剪 + * @en Manage the usage status of LODGroup, including the usage level and the list of visible cameras on its models; + * easy to determine whether the current mod is cropped by LODGroup。 + */ +class LodStateCache { + constructor (scene: RenderScene) { + this._renderScene = scene; + } + + addCamera (camera: Camera) { + const needRegisterChanged = false; + for (const lodGroup of this._renderScene.lodGroups) { + const layer = lodGroup.node.layer; + if ((camera.visibility & layer) === layer) { + if (!this._lodStateInCamera.has(camera)) { + this._lodStateInCamera.set(camera, new Map()); + } + break; + } + } + } + + removeCamera (camera: Camera) { + if (this._lodStateInCamera.has(camera)) { + this._lodStateInCamera.delete(camera); + } + } + + addLodGroup (lodGroup: LODGroup) { + this._newAddedLodGroupVec.push(lodGroup); + + for (const camera of this._renderScene.cameras) { + if (this._lodStateInCamera.has(camera)) { + continue; + } + const layer = lodGroup.node.layer; + if ((camera.visibility & layer) === layer) { + this._lodStateInCamera.set(camera, new Map()); + } + } + } + + removeLodGroup (lodGroup: LODGroup) { + for (let index = 0; index < lodGroup.lodCount; index++) { + const lod = lodGroup.lodDataArray[index]; + for (const model of lod.models) { + this._modelsInLODGroup.delete(model); + } + } + for (const visibleCamera of this._lodStateInCamera) { + visibleCamera[1].delete(lodGroup); + } + } + + removeModel (model: Model) { + if (this._modelsInLODGroup.has(model)) { + this._modelsInLODGroup.delete(model); + } + } + + // Update list of visible cameras on _modelsInLODGroup and update lod usage level under specified camera. + updateLodState () { + //insert vecAddedLodGroup's model into modelsByAnyLODGroup + for (const addedLodGroup of this._newAddedLodGroupVec) { + for (let index = 0; index < addedLodGroup.lodCount; index++) { + const lod = addedLodGroup.lodDataArray[index]; + for (const model of lod.models) { + let modelInfo = this._modelsInLODGroup.get(model); + if (!modelInfo) { + modelInfo = new ModelInfo(); + } + modelInfo.ownerLodLevel = index; + modelInfo.lodGroup = addedLodGroup; + this._modelsInLODGroup.set(model, modelInfo); + } + } + } + this._newAddedLodGroupVec.length = 0; + + //update current visible lod index & model's visible cameras list + for (const lodGroup of this._renderScene.lodGroups) { + if (lodGroup.enabled) { + const lodLevels = lodGroup.getLockedLODLevels(); + const count = lodLevels.length; + // count > 0, indicating that the user force to use certain layers of lod + if (count > 0) { + //Update the dirty flag to make it easier to update the visible index of lod after lifting the forced use of lod. + if (lodGroup.node.hasChangedFlags > 0) { + for (const visibleCamera of this._lodStateInCamera) { + let lodInfo = visibleCamera[1].get(lodGroup); + if (!lodInfo) { + lodInfo = new LODInfo(); + visibleCamera[1].set(lodGroup, lodInfo); + } + lodInfo.transformDirty = true; + } + } + //Update the visible camera list of all models on lodGroup when the visible level changes. + if (lodGroup.isLockLevelChanged()) { + lodGroup.resetLockChangeFlag(); + for (let index = 0; index < lodGroup.lodCount; index++) { + const lod = lodGroup.lodDataArray[index]; + for (const model of lod.models) { + const modelInfo = this._modelsInLODGroup.get(model); + if (!modelInfo) { + continue; + } + modelInfo.visibleCameras.clear(); + if (model.node && model.node.active) { + for (const visibleIndex of lodLevels) { + if (modelInfo.ownerLodLevel === visibleIndex) { + for (const visibleCamera of this._lodStateInCamera) { + modelInfo.visibleCameras.set(visibleCamera[0], true); + } + break; + } + } + } + } + } + } + continue; + } + + //Normal Process, no LOD is forced. + let hasUpdated = false; + for (const visibleCamera of this._lodStateInCamera) { + let lodInfo = visibleCamera[1].get(lodGroup); + if (!lodInfo) { + lodInfo = new LODInfo(); + visibleCamera[1].set(lodGroup, lodInfo); + } + const cameraChangeFlags = visibleCamera[0].node.hasChangedFlags; + const lodChangeFlags = lodGroup.node.hasChangedFlags; + // Changes in the camera matrix or changes in the matrix of the node where lodGroup is located or + // the transformDirty marker is true, etc. All need to recalculate the visible level of LOD. + if (cameraChangeFlags > 0 || lodChangeFlags > 0 || lodInfo.transformDirty) { + if (lodInfo.transformDirty) { + lodInfo.transformDirty = false; + } + const index = lodGroup.getVisibleLODLevel(visibleCamera[0]); + if (index !== lodInfo.usedLevel) { + lodInfo.usedLevel = index; + hasUpdated = true; + } + } + } + + //The LOD of the last frame is forced to be used, the list of visible cameras of modelInfo needs to be updated. + if (lodGroup.isLockLevelChanged()) { + lodGroup.resetLockChangeFlag(); + hasUpdated = true; + } + //Update the visible camera list of all models on lodGroup. + if (hasUpdated) { + for (let index = 0; index < lodGroup.lodCount; index++) { + const lod = lodGroup.lodDataArray[index]; + for (const model of lod.models) { + const modelInfo = this._modelsInLODGroup.get(model); + if (modelInfo) { + modelInfo.visibleCameras.clear(); + if (model.node && model.node.active) { + this._lodStateInCamera.forEach((lodMap, camera) => { + let visibleLevel = -1; + const lodInfo = lodMap.get(lodGroup); + if (lodInfo) { + visibleLevel = lodInfo.usedLevel; + } + if (modelInfo.ownerLodLevel === visibleLevel) { + modelInfo.visibleCameras.set(camera, true); + } + }); + } + } + } + } + } + } + } + } + + isLodModelCulled (camera: Camera, model: Model) { + const modelInfo = this._modelsInLODGroup.get(model); + if (!modelInfo) { + return false; + } + + return !modelInfo.visibleCameras.has(camera); + } + + clearCache () { + this._modelsInLODGroup.clear(); + this._lodStateInCamera.clear(); + this._newAddedLodGroupVec.length = 0; + } + + private isLodGroupVisibleByCamera (lodGroup: LODGroup, camera: Camera): boolean { + const layer = lodGroup.node.layer; + return (camera.visibility & layer) === layer; + } + + private _renderScene: RenderScene = null!; + + /** + * @zh LOD使用的model集合;包含每个LODGroup的每一级LOD + * @en The collection of models used by LOD; Each LOD of each LODGroup. + */ + private _modelsInLODGroup: Map = new Map(); + + /** + * @zh 指定相机下,LODGroup使用哪一级的LOD + * @en Specify which level of LOD is used by the LODGroup under the camera. + */ + private _lodStateInCamera: Map> = new Map>(); + + /** + * @zh 上一帧添加的lodgroup + * @en The lodgroup added in the previous frame. + */ + private _newAddedLodGroupVec: Array = new Array(); +} diff --git a/cocos/render-scene/core/render-window.jsb.ts b/cocos/render-scene/core/render-window.jsb.ts index d1944dbbb7..7280835d5d 100644 --- a/cocos/render-scene/core/render-window.jsb.ts +++ b/cocos/render-scene/core/render-window.jsb.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ export interface IRenderWindowInfo { title?: string; width: number; diff --git a/cocos/render-scene/core/render-window.ts b/cocos/render-scene/core/render-window.ts index 39f991f63c..970b56f156 100644 --- a/cocos/render-scene/core/render-window.ts +++ b/cocos/render-scene/core/render-window.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { screenAdapter } from 'pal/screen-adapter'; import { Orientation } from '../../../pal/screen-adapter/enum-type'; import { diff --git a/cocos/render-scene/core/sampler-lib.jsb.ts b/cocos/render-scene/core/sampler-lib.jsb.ts index d8aa0dbce1..1962e86e03 100644 --- a/cocos/render-scene/core/sampler-lib.jsb.ts +++ b/cocos/render-scene/core/sampler-lib.jsb.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { cclegacy } from "../../core"; const SamplerLib = nr.SamplerLib; diff --git a/cocos/render-scene/core/texture-buffer-pool.ts b/cocos/render-scene/core/texture-buffer-pool.ts index 7d50ee73d6..ceb7639940 100644 --- a/cocos/render-scene/core/texture-buffer-pool.ts +++ b/cocos/render-scene/core/texture-buffer-pool.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { getTypedArrayConstructor, Format, FormatInfos, TextureType, TextureUsageBit, Texture, TextureInfo, Device, BufferTextureCopy } from '../../gfx'; diff --git a/cocos/render-scene/deprecated.ts b/cocos/render-scene/deprecated.ts index 3299dcc654..6e40912ffd 100644 --- a/cocos/render-scene/deprecated.ts +++ b/cocos/render-scene/deprecated.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { replaceProperty, removeProperty } from '../core'; import { RenderScene } from './core/render-scene'; diff --git a/cocos/render-scene/index.ts b/cocos/render-scene/index.ts index 90494f7070..a290c4c846 100644 --- a/cocos/render-scene/index.ts +++ b/cocos/render-scene/index.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import config from './config'; diff --git a/cocos/render-scene/scene/ambient.ts b/cocos/render-scene/scene/ambient.ts index 4ff8839bf1..389c056218 100644 --- a/cocos/render-scene/scene/ambient.ts +++ b/cocos/render-scene/scene/ambient.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Vec4, cclegacy } from '../../core'; import { AmbientInfo } from '../../scene-graph/scene-globals'; diff --git a/cocos/render-scene/scene/camera.jsb.ts b/cocos/render-scene/scene/camera.jsb.ts index 004880c5a1..1b20aec76b 100644 --- a/cocos/render-scene/scene/camera.jsb.ts +++ b/cocos/render-scene/scene/camera.jsb.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { geometry } from '../../core'; import { RenderWindow } from '../core/render-window'; import { ClearFlagBit } from '../../gfx'; diff --git a/cocos/render-scene/scene/camera.ts b/cocos/render-scene/scene/camera.ts index 7e6fcb3430..4f6b5fd71c 100644 --- a/cocos/render-scene/scene/camera.ts +++ b/cocos/render-scene/scene/camera.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { EDITOR } from 'internal:constants'; import { SurfaceTransform, ClearFlagBit, Device, Color, ClearFlags } from '../../gfx'; import { lerp, Mat4, Rect, toRadian, Vec3, IVec4Like, preTransforms, warnID, geometry, cclegacy, Vec4 } from '../../core'; diff --git a/cocos/render-scene/scene/directional-light.ts b/cocos/render-scene/scene/directional-light.ts index 24b38b657f..87667942b0 100644 --- a/cocos/render-scene/scene/directional-light.ts +++ b/cocos/render-scene/scene/directional-light.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Vec3, cclegacy } from '../../core'; import { Ambient } from './ambient'; diff --git a/cocos/render-scene/scene/fog.ts b/cocos/render-scene/scene/fog.ts index ed8345a57d..be04c19d2d 100644 --- a/cocos/render-scene/scene/fog.ts +++ b/cocos/render-scene/scene/fog.ts @@ -1,27 +1,26 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - */ + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ import { Enum, Color, Vec4, cclegacy } from '../../core'; import { FogInfo } from '../../scene-graph/scene-globals'; diff --git a/cocos/render-scene/scene/index.jsb.ts b/cocos/render-scene/scene/index.jsb.ts index 16f48768d1..2a9d6ff46f 100644 --- a/cocos/render-scene/scene/index.jsb.ts +++ b/cocos/render-scene/scene/index.jsb.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Vec3, Enum, cclegacy } from '../../core'; export type Ambient = jsb.Ambient; @@ -286,8 +285,8 @@ export const EnvironmentLightingType = Enum({ }); export const ShadowsInfo = jsb.ShadowsInfo; export type ShadowsInfo = jsb.ShadowsInfo; -export const Shadows = jsb.Shadow; -export type Shadows = jsb.Shadow; +export const Shadows = jsb.Shadows; +export type Shadows = jsb.Shadows; cclegacy.Shadows = Shadows; export const Skybox = jsb.Skybox; diff --git a/cocos/render-scene/scene/index.ts b/cocos/render-scene/scene/index.ts index 9448301c51..6724ace2f9 100644 --- a/cocos/render-scene/scene/index.ts +++ b/cocos/render-scene/scene/index.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ export * from './camera'; export * from './model'; diff --git a/cocos/render-scene/scene/light.ts b/cocos/render-scene/scene/light.ts index ac45505590..94c5193f77 100644 --- a/cocos/render-scene/scene/light.ts +++ b/cocos/render-scene/scene/light.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Vec3 } from '../../core'; import { TransformBit } from '../../scene-graph/node-enum'; diff --git a/cocos/render-scene/scene/lod-group.ts b/cocos/render-scene/scene/lod-group.ts index 04db079ffd..70f346ef8a 100644 --- a/cocos/render-scene/scene/lod-group.ts +++ b/cocos/render-scene/scene/lod-group.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Model } from './model'; import { Vec3, assertIsTrue } from '../../core'; import { RenderScene } from '..'; @@ -38,7 +37,7 @@ export class LODData { private _models: Model[] = []; - get models () : readonly Model[] { + get models (): readonly Model[] { return this._models; } @@ -85,7 +84,9 @@ export class LODGroup { /** * For editor only, users maybe operate several LOD's object */ - protected _lockedLODLevelVec : number[] = []; + protected _lockedLODLevelVec: number[] = []; + + private _isLockLevelChanged = false; constructor () { this._device = deviceManager.gfxDevice; @@ -93,7 +94,7 @@ export class LODGroup { set localBoundaryCenter (val: Vec3) { this._localBoundaryCenter.set(val); } - get localBoundaryCenter () : Readonly { return this._localBoundaryCenter.clone(); } + get localBoundaryCenter (): Readonly { return this._localBoundaryCenter.clone(); } get lodCount () { return this._lodDataArray.length; } @@ -103,7 +104,7 @@ export class LODGroup { get objectSize () { return this._objectSize; } - get lodDataArray () : readonly LODData[] { return this._lodDataArray; } + get lodDataArray (): readonly LODData[] { return this._lodDataArray; } attachToScene (scene: RenderScene) { this.scene = scene; } @@ -116,6 +117,14 @@ export class LODGroup { this._lockedLODLevelVec = lockLev; } + isLockLevelChanged (): boolean { + return this._isLockLevelChanged; + } + + resetLockChangeFlag () { + this._isLockLevelChanged = false; + } + getLockedLODLevels (): readonly number[] { return this._lockedLODLevelVec; } diff --git a/cocos/render-scene/scene/model.jsb.ts b/cocos/render-scene/scene/model.jsb.ts index 8692ac81c6..301e36e510 100644 --- a/cocos/render-scene/scene/model.jsb.ts +++ b/cocos/render-scene/scene/model.jsb.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Attribute, deviceManager } from '../../gfx'; import { Vec3 } from '../../core'; diff --git a/cocos/render-scene/scene/model.ts b/cocos/render-scene/scene/model.ts index 361a3d8559..b0728b747c 100644 --- a/cocos/render-scene/scene/model.ts +++ b/cocos/render-scene/scene/model.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ // Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. import { EDITOR } from 'internal:constants'; @@ -892,7 +891,7 @@ export class Model { * @zh 更新反射探针的立方体贴图 * @param texture probe cubemap */ - public updateReflctionProbeCubemap (texture: TextureCube | null) { + public updateReflectionProbeCubemap (texture: TextureCube | null) { this._localDataUpdated = true; this.onMacroPatchesStateChanged(); @@ -918,7 +917,7 @@ export class Model { * @zh 更新反射探针的平面反射贴图 * @param texture planar relflection map */ - public updateReflctionProbePlanarMap (texture: Texture | null) { + public updateReflectionProbePlanarMap (texture: Texture | null) { this._localDataUpdated = true; this.onMacroPatchesStateChanged(); diff --git a/cocos/render-scene/scene/octree.ts b/cocos/render-scene/scene/octree.ts index 6bac5ccaec..8515e905b4 100644 --- a/cocos/render-scene/scene/octree.ts +++ b/cocos/render-scene/scene/octree.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Vec3 } from '../../core'; import { OctreeInfo } from '../../scene-graph/scene-globals'; diff --git a/cocos/render-scene/scene/reflection-probe.jsb.ts b/cocos/render-scene/scene/reflection-probe.jsb.ts index 8f764bdd2a..8dde3c081d 100644 --- a/cocos/render-scene/scene/reflection-probe.jsb.ts +++ b/cocos/render-scene/scene/reflection-probe.jsb.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ClearFlagBit } from '../../gfx'; import { SKYBOX_FLAG } from './camera'; declare const jsb: any; diff --git a/cocos/render-scene/scene/reflection-probe.ts b/cocos/render-scene/scene/reflection-probe.ts index b3fd35bd29..c0f00e9ef9 100644 --- a/cocos/render-scene/scene/reflection-probe.ts +++ b/cocos/render-scene/scene/reflection-probe.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { EDITOR } from 'internal:constants'; import { Camera, CameraAperture, CameraFOVAxis, CameraISO, CameraProjection, CameraShutter, CameraType, SKYBOX_FLAG, TrackingType } from './camera'; import { Node } from '../../scene-graph/node'; @@ -361,6 +360,10 @@ export class ReflectionProbe { this.realtimePlanarTexture = null; } } + public enable () { + } + public disable () { + } public updateCameraDir (faceIdx: number) { this.cameraNode.setRotationFromEuler(cameraDir[faceIdx]); diff --git a/cocos/render-scene/scene/shadows.ts b/cocos/render-scene/scene/shadows.ts index 0363acad33..a172103cd3 100644 --- a/cocos/render-scene/scene/shadows.ts +++ b/cocos/render-scene/scene/shadows.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { DEBUG } from 'internal:constants'; import { Material } from '../../asset/assets/material'; diff --git a/cocos/render-scene/scene/skybox.ts b/cocos/render-scene/scene/skybox.ts index 19014ffa5c..0133bd008f 100644 --- a/cocos/render-scene/scene/skybox.ts +++ b/cocos/render-scene/scene/skybox.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { builtinResMgr } from '../../asset/asset-manager/builtin-res-mgr'; import { Material } from '../../asset/assets/material'; diff --git a/cocos/render-scene/scene/sphere-light.ts b/cocos/render-scene/scene/sphere-light.ts index 2627c192be..41c95e3791 100644 --- a/cocos/render-scene/scene/sphere-light.ts +++ b/cocos/render-scene/scene/sphere-light.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Vec3, cclegacy, geometry } from '../../core'; import { Light, LightType, nt2lm } from './light'; diff --git a/cocos/render-scene/scene/spot-light.ts b/cocos/render-scene/scene/spot-light.ts index e3b0f91300..1c6b9498dc 100644 --- a/cocos/render-scene/scene/spot-light.ts +++ b/cocos/render-scene/scene/spot-light.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Mat4, Quat, Vec3, geometry, cclegacy } from '../../core'; import { Light, LightType, nt2lm } from './light'; diff --git a/cocos/render-scene/scene/submodel.jsb.ts b/cocos/render-scene/scene/submodel.jsb.ts index a6a0c8ca51..dc230d2e92 100644 --- a/cocos/render-scene/scene/submodel.jsb.ts +++ b/cocos/render-scene/scene/submodel.jsb.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,6 +20,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ export const SubModel = jsb.SubModel; diff --git a/cocos/render-scene/scene/submodel.ts b/cocos/render-scene/scene/submodel.ts index 30a12e526b..2df562def3 100644 --- a/cocos/render-scene/scene/submodel.ts +++ b/cocos/render-scene/scene/submodel.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,13 +20,15 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { RenderingSubMesh } from '../../asset/assets/rendering-sub-mesh'; -import { RenderPriority, UNIFORM_REFLECTION_TEXTURE_BINDING, UNIFORM_REFLECTION_STORAGE_BINDING, INST_MAT_WORLD, INST_SH, UBOSH } from '../../rendering/define'; +import { RenderPriority, UNIFORM_REFLECTION_TEXTURE_BINDING, UNIFORM_REFLECTION_STORAGE_BINDING, + INST_MAT_WORLD, INST_SH, UBOSH, isEnableEffect } from '../../rendering/define'; import { BatchingSchemes, IMacroPatch, Pass } from '../core/pass'; import { DescriptorSet, DescriptorSetInfo, Device, InputAssembler, Texture, TextureType, TextureUsageBit, TextureInfo, - Format, Sampler, Filter, Address, Shader, SamplerInfo, deviceManager, Attribute, Feature, FormatInfos, getTypedArrayConstructor } from '../../gfx'; + Format, Sampler, Filter, Address, Shader, SamplerInfo, deviceManager, + Attribute, Feature, FormatInfos, getTypedArrayConstructor } from '../../gfx'; import { errorID, Mat4, cclegacy } from '../../core'; import { getPhaseID } from '../../rendering/pass-phase'; import { Root } from '../../root'; @@ -196,7 +197,7 @@ export class SubModel { * @en Get or set instance matrix id, access by sub model * @zh 获取或者设置硬件实例化中的矩阵索引,通过子模型访问 */ - set instancedWorldMatrixIndex (val : number) { + set instancedWorldMatrixIndex (val: number) { this._instancedWorldMatrixIndex = val; } get instancedWorldMatrixIndex () { @@ -207,7 +208,7 @@ export class SubModel { * @en Get or set instance SH id, access by sub model * @zh 获取或者设置硬件实例化中的球谐索引,通过子模型访问 */ - set instancedSHIndex (val : number) { + set instancedSHIndex (val: number) { this._instancedSHIndex = val; } get instancedSHIndex () { @@ -260,9 +261,10 @@ export class SubModel { } this.priority = RenderPriority.DEFAULT; - + const r = cclegacy.rendering; // initialize resources for reflection material - if (passes[0].phase === getPhaseID('reflection')) { + if (((!r || !r.enableEffectImport) && passes[0].phase === getPhaseID('reflection')) + || (isEnableEffect() && passes[0].phaseID === r.getPhaseID(r.getPassID('default'), 'reflection'))) { let texWidth = root.mainWindow!.width; let texHeight = root.mainWindow!.height; const minSize = 512; diff --git a/cocos/render-scene/utils.ts b/cocos/render-scene/utils.ts index fc8b8de4d0..8c9b9fd62e 100644 --- a/cocos/render-scene/utils.ts +++ b/cocos/render-scene/utils.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Attribute, Buffer, BufferInfo, Device, InputAssemblerInfo, AttributeName, BufferUsageBit, Format, MemoryUsageBit } from '../gfx'; import { IGeometry } from '../primitive/define'; diff --git a/cocos/rendering/batched-buffer.ts b/cocos/rendering/batched-buffer.ts index 7ab7ee44f0..99188d6cb4 100644 --- a/cocos/rendering/batched-buffer.ts +++ b/cocos/rendering/batched-buffer.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { BufferUsageBit, Format, MemoryUsageBit, Device, DescriptorSet, InputAssembler, InputAssemblerInfo, Attribute, Buffer, BufferInfo, Shader } from '../gfx'; diff --git a/cocos/rendering/custom/archive.ts b/cocos/rendering/custom/archive.ts index a5c0eb2837..9b513ffc2b 100644 --- a/cocos/rendering/custom/archive.ts +++ b/cocos/rendering/custom/archive.ts @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/rendering/custom/binary-archive.ts b/cocos/rendering/custom/binary-archive.ts index 07a4e7fe3a..c0d3f328f8 100644 --- a/cocos/rendering/custom/binary-archive.ts +++ b/cocos/rendering/custom/binary-archive.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { OutputArchive, InputArchive } from './archive'; export class BinaryOutputArchive implements OutputArchive { diff --git a/cocos/rendering/custom/builtin-pipelines.ts b/cocos/rendering/custom/builtin-pipelines.ts index ccb2b75a5d..54a71b9eed 100644 --- a/cocos/rendering/custom/builtin-pipelines.ts +++ b/cocos/rendering/custom/builtin-pipelines.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { EDITOR } from 'internal:constants'; import { Camera } from '../../render-scene/scene'; import { Pipeline, PipelineBuilder } from './pipeline'; diff --git a/cocos/rendering/custom/compiler.ts b/cocos/rendering/custom/compiler.ts index 94afd6807e..87554f5d3d 100644 --- a/cocos/rendering/custom/compiler.ts +++ b/cocos/rendering/custom/compiler.ts @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/rendering/custom/custom-pipeline.ts b/cocos/rendering/custom/custom-pipeline.ts index 63094e69a1..3563449efc 100644 --- a/cocos/rendering/custom/custom-pipeline.ts +++ b/cocos/rendering/custom/custom-pipeline.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { Camera, CameraUsage } from '../../render-scene/scene'; import { buildFxaaPass, buildBloomPass as buildBloomPasses, buildForwardPass, buildNativeDeferredPipeline, buildNativeForwardPass, buildPostprocessPass, AntiAliasing } from './define'; diff --git a/cocos/rendering/custom/debug.ts b/cocos/rendering/custom/debug.ts index fe3ff9d86d..db25637153 100644 --- a/cocos/rendering/custom/debug.ts +++ b/cocos/rendering/custom/debug.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + /* eslint-disable max-len */ import { Viewport } from '../../gfx'; import { assert } from '../../core'; diff --git a/cocos/rendering/custom/define.ts b/cocos/rendering/custom/define.ts index f05d0c5f46..f1975e9179 100644 --- a/cocos/rendering/custom/define.ts +++ b/cocos/rendering/custom/define.ts @@ -1,4 +1,29 @@ -import { ClearFlagBit, Color, Format, LoadOp, Rect, StoreOp, Viewport } from '../../gfx'; +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + +import { BufferInfo, Buffer, BufferUsageBit, ClearFlagBit, Color, DescriptorSet, LoadOp, + Format, Rect, Sampler, StoreOp, Texture, Viewport, MemoryUsageBit } from '../../gfx'; import { Camera, CSMLevel, DirectionalLight, Light, LightType, ReflectionProbe, ShadowType, SKYBOX_FLAG, SpotLight } from '../../render-scene/scene'; import { supportsR32FloatTexture } from '../define'; import { Pipeline } from './pipeline'; @@ -7,6 +32,9 @@ import { Vec4, macro, geometry, toRadian, cclegacy } from '../../core'; import { Material } from '../../asset/assets'; import { SRGBToLinear } from '../pipeline-funcs'; import { RenderWindow } from '../../render-scene/core/render-window'; +import { RenderData } from './render-graph'; +import { WebPipeline } from './web-pipeline'; +import { DescriptorSetData } from './layout-graph'; // Anti-aliasing type, other types will be gradually added in the future export enum AntiAliasing { @@ -287,7 +315,7 @@ export function buildBloomPass (camera: Camera, } ppl.updateRenderTarget(bloomPassPrefilterRTName, width, height); ppl.updateDepthStencil(bloomPassPrefilterDSName, width, height); - const bloomPrefilterPass = ppl.addRasterPass(width, height, 'Bloom_Prefilter'); + const bloomPrefilterPass = ppl.addRasterPass(width, height, 'bloom-prefilter'); bloomPrefilterPass.name = `CameraBloomPrefilterPass${cameraID}`; bloomPrefilterPass.setViewport(new Viewport(area.x, area.y, width, height)); if (ppl.containsResource(inputRT)) { @@ -319,7 +347,7 @@ export function buildBloomPass (camera: Camera, } ppl.updateRenderTarget(bloomPassDownSampleRTName, width, height); ppl.updateDepthStencil(bloomPassDownSampleDSName, width, height); - const bloomDownSamplePass = ppl.addRasterPass(width, height, `Bloom_Downsample${i}`); + const bloomDownSamplePass = ppl.addRasterPass(width, height, `bloom-downsample${i}`); bloomDownSamplePass.name = `CameraBloomDownSamplePass${cameraID}${i}`; bloomDownSamplePass.setViewport(new Viewport(area.x, area.y, width, height)); const computeView = new ComputeView(); @@ -354,7 +382,7 @@ export function buildBloomPass (camera: Camera, } ppl.updateRenderTarget(bloomPassUpSampleRTName, width, height); ppl.updateDepthStencil(bloomPassUpSampleDSName, width, height); - const bloomUpSamplePass = ppl.addRasterPass(width, height, `Bloom_Upsample${i}`); + const bloomUpSamplePass = ppl.addRasterPass(width, height, `bloom-upsample${i}`); bloomUpSamplePass.name = `CameraBloomUpSamplePass${cameraID}${bloomData.iterations - 1 - i}`; bloomUpSamplePass.setViewport(new Viewport(area.x, area.y, width, height)); const computeView = new ComputeView(); @@ -388,7 +416,7 @@ export function buildBloomPass (camera: Camera, } ppl.updateRenderTarget(bloomPassCombineRTName, width, height); ppl.updateDepthStencil(bloomPassCombineDSName, width, height); - const bloomCombinePass = ppl.addRasterPass(width, height, 'Bloom_Combine'); + const bloomCombinePass = ppl.addRasterPass(width, height, 'bloom-combine'); bloomCombinePass.name = `CameraBloomCombinePass${cameraID}`; bloomCombinePass.setViewport(new Viewport(area.x, area.y, width, height)); const computeViewOut = new ComputeView(); @@ -458,7 +486,7 @@ export function buildPostprocessPass (camera: Camera, } ppl.updateRenderWindow(postprocessPassRTName, camera.window); ppl.updateDepthStencil(postprocessPassDS, width, height); - const postprocessPass = ppl.addRasterPass(width, height, 'Postprocess'); + const postprocessPass = ppl.addRasterPass(width, height, 'post-process'); postprocessPass.name = `CameraPostprocessPass${cameraID}`; postprocessPass.setViewport(new Viewport(area.x, area.y, area.width, area.height)); if (ppl.containsResource(inputTex)) { @@ -749,7 +777,7 @@ export function buildGBufferPass (camera: Camera, ppl.updateRenderTarget(gBufferPassEmissive, width, height); ppl.updateDepthStencil(gBufferPassDSName, width, height); // gbuffer pass - const gBufferPass = ppl.addRasterPass(width, height, 'Geometry'); + const gBufferPass = ppl.addRasterPass(width, height, 'default'); gBufferPass.name = `CameraGBufferPass${cameraID}`; gBufferPass.setViewport(new Viewport(area.x, area.y, area.width, area.height)); const rtColor = new Color(0, 0, 0, 0); @@ -838,7 +866,7 @@ export function buildLightingPass (camera: Camera, ppl: Pipeline, gBuffer: GBuff ppl.updateRenderTarget(deferredLightingPassRTName, width, height); ppl.updateDepthStencil(deferredLightingPassDS, width, height); // lighting pass - const lightingPass = ppl.addRasterPass(width, height, 'Lighting'); + const lightingPass = ppl.addRasterPass(width, height, 'deferred-lighting'); lightingPass.name = `CameraLightingPass${cameraID}`; lightingPass.setViewport(new Viewport(area.x, area.y, width, height)); for (const dirShadowName of cameraInfo.mainLightShadowNames) { @@ -1067,3 +1095,98 @@ export function updateCameraUBO (setter: any, camera: Readonly, ppl: Rea setter.setVec4('cc_screenScale', new Vec4(sceneData.shadingScale, sceneData.shadingScale, 1.0 / sceneData.shadingScale, 1.0 / sceneData.shadingScale)); setter.setVec4('cc_exposure', new Vec4(camera.exposure, 1.0 / camera.exposure, sceneData.isHDR ? 1.0 : 0.0, 1.0 / Camera.standardExposureValue)); } + +function bindDescValue (desc: DescriptorSet, binding: number, value) { + if (value instanceof Buffer) { + desc.bindBuffer(binding, value); + } else if (value instanceof Texture) { + desc.bindTexture(binding, value); + } else if (value instanceof Sampler) { + desc.bindSampler(binding, value); + } +} + +function bindGlobalDesc (pipeline: Pipeline, binding: number, value) { + bindDescValue(pipeline.descriptorSet, binding, value); +} + +function getDescBinding (descId, descData: DescriptorSetData): number { + const layoutData = descData; + // find descriptor binding + for (const block of layoutData.descriptorSetLayoutData.descriptorBlocks) { + for (let i = 0; i !== block.descriptors.length; ++i) { + if (descId === block.descriptors[i].descriptorID) { + return block.offset + i; + } + } + } + return -1; +} + +export function getDescBindingFromName (bindingName: string) { + const pipeline = cclegacy.director.root.pipeline as WebPipeline; + const layoutGraph = pipeline.layoutGraph; + const vertIds = layoutGraph.vertices(); + const descId = layoutGraph.attributeIndex.get(bindingName); + let currDesData; + for (const i of vertIds) { + const layout = layoutGraph.getLayout(i); + for (const [k, descData] of layout.descriptorSets) { + const layoutData = descData.descriptorSetLayoutData; + const blocks = layoutData.descriptorBlocks; + for (const b of blocks) { + for (const ds of b.descriptors) { + if (ds.descriptorID === descId) { + currDesData = descData; + return getDescBinding(descId, currDesData); + } + } + } + } + } + return -1; +} + +function applyGlobalDescBinding (pipeline: Pipeline, data: RenderData, isUpdate = false) { + const constants = data.constants; + const samplers = data.samplers; + const textures = data.textures; + const device = cclegacy.director.root.device; + const currPip = pipeline as WebPipeline; + for (const [key, value] of constants) { + const bindId = getDescBinding(key, currPip.globalDescriptorSetData); + let buffer = pipeline.descriptorSet.getBuffer(bindId); + let haveBuff = true; + if (!buffer && !isUpdate) { + buffer = device.createBuffer(new BufferInfo(BufferUsageBit.UNIFORM | BufferUsageBit.TRANSFER_DST, + MemoryUsageBit.HOST | MemoryUsageBit.DEVICE, + value.length * 4, + value.length * 4)); + haveBuff = false; + } + if (isUpdate) buffer.update(new Float32Array(value)); + if (!haveBuff) bindGlobalDesc(pipeline, bindId, buffer); + } + for (const [key, value] of textures) { + const bindId = getDescBinding(key, currPip.globalDescriptorSetData); + const tex = pipeline.descriptorSet.getTexture(bindId); + if (!tex || isUpdate) { + bindGlobalDesc(pipeline, bindId, value); + } + } + for (const [key, value] of samplers) { + const bindId = getDescBinding(key, currPip.globalDescriptorSetData); + const sampler = pipeline.descriptorSet.getSampler(bindId); + if (!sampler || isUpdate) { + bindGlobalDesc(pipeline, bindId, value); + } + } +} + +export function initGlobalDescBinding (pipeline: Pipeline, data: RenderData) { + applyGlobalDescBinding(pipeline, data); +} + +export function updateGlobalDescBinding (pipeline: Pipeline, data: RenderData) { + applyGlobalDescBinding(pipeline, data, true); +} diff --git a/cocos/rendering/custom/effect.ts b/cocos/rendering/custom/effect.ts index e712c41dae..a1e5856069 100644 --- a/cocos/rendering/custom/effect.ts +++ b/cocos/rendering/custom/effect.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { EffectAsset } from '../../asset/assets'; import { CollectVisitor, WebDescriptorHierarchy } from './web-descriptor-hierarchy'; // eslint-disable-next-line max-len @@ -64,7 +88,7 @@ enum BloomStage { } function buildBloomDownSample (lg, idx: number) { - const bloomDownsampleID = lg.addRenderStage(`Bloom_Downsample${idx}`, BloomStage.DOWNSAMPLE); + const bloomDownsampleID = lg.addRenderStage(`bloom-downsample${idx}`, BloomStage.DOWNSAMPLE); lg.addRenderPhase('Queue', bloomDownsampleID); const bloomDownsampleDescriptors = lg.layoutGraph.getDescriptors(bloomDownsampleID); @@ -89,7 +113,7 @@ function buildBloomDownSample (lg, idx: number) { } function buildBloomUpSample (lg, idx: number) { - const bloomUpsampleID = lg.addRenderStage(`Bloom_Upsample${idx}`, BloomStage.UPSAMPLE); + const bloomUpsampleID = lg.addRenderStage(`bloom-upsample${idx}`, BloomStage.UPSAMPLE); lg.addRenderPhase('Queue', bloomUpsampleID); const bloomUpsampleDescriptors = lg.layoutGraph.getDescriptors(bloomUpsampleID); @@ -119,7 +143,7 @@ export function buildForwardLayout (ppl: Pipeline) { const defaultID = lg.addGlobal('default', true, true, true, true, true, true, true, true); lg.mergeDescriptors(defaultID); // 1.=== Bloom prefilter === - const bloomPrefilterID = lg.addRenderStage('Bloom_Prefilter', BloomStage.PREFILTER); + const bloomPrefilterID = lg.addRenderStage('bloom-prefilter', BloomStage.PREFILTER); lg.addRenderPhase('Queue', bloomPrefilterID); const bloomPrefilterDescriptors = lg.layoutGraph.getDescriptors(bloomPrefilterID); // unifom @@ -148,7 +172,7 @@ export function buildForwardLayout (ppl: Pipeline) { buildBloomUpSample(lg, 0); buildBloomUpSample(lg, 1); // 4.=== Bloom combine === - const bloomCombineSampleID = lg.addRenderStage('Bloom_Combine', BloomStage.COMBINE); + const bloomCombineSampleID = lg.addRenderStage('bloom-combine', BloomStage.COMBINE); lg.addRenderPhase('Queue', bloomCombineSampleID); const bloomCombineSampleDescriptors = lg.layoutGraph.getDescriptors(bloomCombineSampleID); @@ -177,7 +201,7 @@ export function buildForwardLayout (ppl: Pipeline) { lg.merge(bloomCombineSampleDescriptors); lg.mergeDescriptors(bloomCombineSampleID); // 5.=== Postprocess === - const postPassID = lg.addRenderStage('Postprocess', DeferredStage.POST); + const postPassID = lg.addRenderStage('post-process', DeferredStage.POST); const postDescriptors = lg.layoutGraph.getDescriptors(postPassID); const postPassBlock = lg.getLayoutBlock(UpdateFrequency.PER_PASS, ParameterType.TABLE, @@ -242,8 +266,8 @@ export function buildDeferredLayout (ppl: Pipeline) { const defaultID = lg.addGlobal('default', true, true, true, true, true, true, true, true); lg.mergeDescriptors(defaultID); const geometryPassID = lg.addRenderStage('Geometry', DeferredStage.GEOMETRY); - const lightingPassID = lg.addRenderStage('Lighting', DeferredStage.LIGHTING); - const postPassID = lg.addRenderStage('Postprocess', DeferredStage.POST); + const lightingPassID = lg.addRenderStage('deferred-lighting', DeferredStage.LIGHTING); + const postPassID = lg.addRenderStage('post-process', DeferredStage.POST); const geometryQueueID = lg.addRenderPhase('Queue', geometryPassID); const lightingQueueID = lg.addRenderPhase('Queue', lightingPassID); diff --git a/cocos/rendering/custom/executor.ts b/cocos/rendering/custom/executor.ts index 7e1c4667a4..11289c2df4 100644 --- a/cocos/rendering/custom/executor.ts +++ b/cocos/rendering/custom/executor.ts @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -30,7 +29,7 @@ */ /* eslint-disable max-len */ import { getPhaseID, InstancedBuffer, PipelineStateManager } from '..'; -import { assert } from '../../core'; +import { assert, cclegacy } from '../../core'; import intersect from '../../core/geometry/intersect'; import { Sphere } from '../../core/geometry/sphere'; import { AccessFlagBit, Attribute, Buffer, BufferInfo, BufferUsageBit, BufferViewInfo, Color, ColorAttachment, CommandBuffer, DepthStencilAttachment, DescriptorSet, DescriptorSetInfo, Device, deviceManager, Format, Framebuffer, @@ -40,13 +39,11 @@ import { legacyCC } from '../../core/global-exports'; import { Vec3 } from '../../core/math/vec3'; import { Vec4 } from '../../core/math/vec4'; import { BatchingSchemes } from '../../render-scene'; -import { DirectionalLight } from '../../render-scene/scene'; import { Camera } from '../../render-scene/scene/camera'; -import { LightType } from '../../render-scene/scene/light'; -import { CSMLevel, ShadowType } from '../../render-scene/scene/shadows'; +import { ShadowType } from '../../render-scene/scene/shadows'; import { Root } from '../../root'; import { BatchedBuffer } from '../batched-buffer'; -import { SetIndex, UBODeferredLight, UBOForwardLight, UBOLocal } from '../define'; +import { isEnableEffect, SetIndex, UBODeferredLight, UBOForwardLight, UBOLocal } from '../define'; import { PipelineSceneData } from '../pipeline-scene-data'; import { PipelineInputAssemblerData } from '../render-pipeline'; import { LayoutGraphData, PipelineLayoutData, RenderPhaseData, RenderStageData } from './layout-graph'; @@ -65,7 +62,7 @@ import { renderProfiler } from '../pipeline-funcs'; import { PlanarShadowQueue } from '../planar-shadow-queue'; import { DefaultVisitor, depthFirstSearch, ReferenceGraphView } from './graph'; import { VectorGraphColorMap } from './effect'; -import { getRenderArea } from './define'; +import { getDescBindingFromName, getRenderArea, updateGlobalDescBinding } from './define'; import { RenderReflectionProbeQueue } from '../render-reflection-probe-queue'; import { ReflectionProbeManager } from '../reflection-probe-manager'; @@ -371,6 +368,7 @@ class BlitDesc { const deferredLitsBufView = device.createBuffer(new BufferViewInfo(this._lightVolumeBuffer, 0, totalSize)); this._lightBufferData = new Float32Array(totalSize / Float32Array.BYTES_PER_ELEMENT); + const binding = isEnableEffect() ? getDescBindingFromName('CCForwardLight') : UBOForwardLight.BINDING; this._stageDesc.bindBuffer(UBOForwardLight.BINDING, deferredLitsBufView); } const _localUBO = device.createBuffer(new BufferInfo( @@ -389,7 +387,7 @@ class DeviceRenderQueue { private _postSceneTasks: DevicePostSceneTask[] = []; private _devicePass: DeviceRenderPass; private _hint: QueueHint = QueueHint.NONE; - private _phaseID = getPhaseID('default'); + private _phaseID: number = getPhaseID('default'); private _renderPhase: RenderPhaseData | null = null; protected _transversal: DeviceSceneTransversal | null = null; get phaseID (): number { return this._phaseID; } @@ -402,6 +400,7 @@ class DeviceRenderQueue { get queueId () { return this._queueId; } constructor (devicePass: DeviceRenderPass) { this._devicePass = devicePass; + if (isEnableEffect()) this._phaseID = cclegacy.rendering.getPhaseID(devicePass.passID, 'default'); this._sceneVisitor = new WebSceneVisitor(this._devicePass.context.commandBuffer, this._devicePass.context.pipeline.pipelineSceneData); } @@ -455,7 +454,7 @@ class DeviceRenderQueue { class SubmitInfo { public instances = new Set(); - public renderInstanceQueue : InstancedBuffer[] = []; + public renderInstanceQueue: InstancedBuffer[] = []; public batches = new Set(); public opaqueList: RenderInfo[] = []; public transparentList: RenderInfo[] = []; @@ -479,11 +478,13 @@ class RenderPassLayoutInfo { this._stage = lg.getRenderStage(layoutId); this._context = context; this._layout = lg.getLayout(layoutId); - const layoutData = this._layout.descriptorSets.get(UpdateFrequency.PER_PASS); + const layoutData = this._layout.descriptorSets.get(UpdateFrequency.PER_PASS); + const globalDesc = context.pipeline.descriptorSet; if (layoutData) { // find resource const deviceTex = context.deviceTextures.get(this._inputName); const gfxTex = deviceTex?.texture; + const layoutDesc = layoutData.descriptorSet!; if (!gfxTex) { throw Error(`Could not find texture with resource name ${this._inputName}`); } @@ -496,10 +497,18 @@ class RenderPassLayoutInfo { // find descriptor binding for (const block of layoutData.descriptorSetLayoutData.descriptorBlocks) { for (let i = 0; i !== block.descriptors.length; ++i) { + const buffer = layoutDesc.getBuffer(block.offset + i); + const texture = layoutDesc.getTexture(block.offset + i); if (descriptorID === block.descriptors[i].descriptorID) { - layoutData.descriptorSet!.bindTexture(block.offset + i, gfxTex); - layoutData.descriptorSet!.bindSampler(block.offset + i, context.device.getSampler(samplerInfo)); - if (!this._descriptorSet) this._descriptorSet = layoutData.descriptorSet; + layoutDesc.bindTexture(block.offset + i, gfxTex); + layoutDesc.bindSampler(block.offset + i, context.device.getSampler(samplerInfo)); + if (!this._descriptorSet) this._descriptorSet = layoutDesc; + continue; + } + if (!buffer && !texture) { + layoutDesc.bindBuffer(block.offset + i, globalDesc.getBuffer(block.offset + i)); + layoutDesc.bindTexture(block.offset + i, globalDesc.getTexture(block.offset + i)); + layoutDesc.bindSampler(block.offset + i, globalDesc.getSampler(block.offset + i)); } } } @@ -534,15 +543,16 @@ class DeviceRenderPass { protected _deviceQueues: DeviceRenderQueue[] = []; protected _clearDepth = 1; protected _clearStencil = 0; + protected _passID: number; protected _context: ExecutorContext; protected _viewport: Viewport | null = null; private _rasterInfo: RasterPassInfo; private _layout: RenderPassLayoutInfo | null = null; - public submitMap: Map = new Map(); constructor (context: ExecutorContext, passInfo: RasterPassInfo) { this._context = context; this._rasterInfo = passInfo; const device = context.device; + this._passID = cclegacy.rendering.getPassID(this._context.renderGraph.getLayout(passInfo.id)); const depthStencilAttachment = new DepthStencilAttachment(); depthStencilAttachment.format = Format.DEPTH_STENCIL; depthStencilAttachment.depthLoadOp = LoadOp.DISCARD; @@ -636,6 +646,7 @@ class DeviceRenderPass { swapchain ? [swapchain.colorTexture] : colorTexs, swapchain ? swapchain.depthStencilTexture : depthTex)); } + get passID (): number { return this._passID; } get renderLayout () { return this._layout; } get context () { return this._context; } get renderPass () { return this._renderPass; } @@ -669,7 +680,7 @@ class DeviceRenderPass { const layoutData = layout.descriptorSets.get(UpdateFrequency.PER_PASS)!; return layoutData; } - genQuadVertexData (surfaceTransform: SurfaceTransform, renderArea: Rect) : Float32Array { + genQuadVertexData (surfaceTransform: SurfaceTransform, renderArea: Rect): Float32Array { const vbData = new Float32Array(4 * 4); const minX = renderArea.x / this._context.width; @@ -747,7 +758,7 @@ class DeviceRenderPass { } private _clear () { - for (const [cam, info] of this.submitMap) { + for (const [cam, info] of this.context.submitMap) { info.additiveLight?.clear(); const it = info.instances.values(); let res = it.next(); while (!res.done) { @@ -761,7 +772,7 @@ class DeviceRenderPass { postPass () { this._clear(); - this.submitMap.clear(); + // this.submitMap.clear(); for (const queue of this._deviceQueues) { queue.postRecord(); } @@ -863,8 +874,8 @@ class DevicePreSceneTask extends WebSceneTask { return; } const devicePass = this._currentQueue.devicePass; - const submitMap = devicePass.submitMap; const context = devicePass.context; + const submitMap = context.submitMap; if (submitMap.has(this.camera)) { this._submitInfo = submitMap.get(this.camera)!; } else { @@ -887,7 +898,7 @@ class DevicePreSceneTask extends WebSceneTask { const probes = ReflectionProbeManager.probeManager.getProbes(); for (let i = 0; i < probes.length; i++) { if (probes[i].hasFrameBuffer(this._currentQueue.devicePass.framebuffer)) { - this._submitInfo.reflectionProbe.gatherRenderObjects(probes[i], this.camera.scene!, this._cmdBuff); + this._submitInfo.reflectionProbe.gatherRenderObjects(probes[i], this.camera, this._cmdBuff); break; } } @@ -905,7 +916,7 @@ class DevicePreSceneTask extends WebSceneTask { for (const subModel of subModels) { const passes = subModel.passes; for (const p of passes) { - if (p.phase !== this._currentQueue.phaseID) continue; + if (((isEnableEffect()) ? p.phaseID : p.phase) !== this._currentQueue.phaseID) continue; const batchingScheme = p.batchingScheme; if (batchingScheme === BatchingSchemes.INSTANCING) { const instancedBuffer = p.getInstancedBuffer(); @@ -961,8 +972,10 @@ class DevicePreSceneTask extends WebSceneTask { const pass = subModel.passes[passIdx]; const shader = subModel.shaders[passIdx]; const currTransparent = pass.blendState.targets[0].blend; - const phases = getPhaseID('default') | getPhaseID('planarShadow'); - if (currTransparent !== isTransparent || !(pass.phase & (isTransparent ? phases : this._currentQueue.phaseID))) { + const passId = this._currentQueue.devicePass.passID; + const phase = isEnableEffect() ? cclegacy.rendering.getPhaseID(passId, 'default') | cclegacy.rendering.getPhaseID(passId, 'planarShadow') + : getPhaseID('default') | getPhaseID('planarShadow'); + if (currTransparent !== isTransparent || !(pass.phaseID & (isTransparent ? phase : this._currentQueue.phaseID))) { return; } const hash = (0 << 30) | pass.priority << 16 | subModel.priority << 8 | passIdx; @@ -1022,57 +1035,8 @@ class DevicePreSceneTask extends WebSceneTask { && this.graphScene.scene!.flags & SceneFlags.SHADOW_CASTER; } - private _bindDescValue (desc: DescriptorSet, binding: number, value) { - if (value instanceof Buffer) { - desc.bindBuffer(binding, value); - } else if (value instanceof Texture) { - desc.bindTexture(binding, value); - } else if (value instanceof Sampler) { - desc.bindSampler(binding, value); - } - } - - private _bindGlobalDesc (context: ExecutorContext, binding: number, value) { - const layoutData = this._currentQueue.devicePass.getGlobalDescData(context)!; - this._bindDescValue(layoutData.descriptorSet!, binding, value); - } - - private _bindDescriptor (context: ExecutorContext, descId: number, value) { - const layoutData = this._currentQueue.devicePass.getGlobalDescData(context)!; - // find descriptor binding - for (const block of layoutData.descriptorSetLayoutData.descriptorBlocks) { - for (let i = 0; i !== block.descriptors.length; ++i) { - if (descId === block.descriptors[i].descriptorID) { - this._bindGlobalDesc(context, block.offset + i, value); - } - } - } - } - protected _updateGlobal (context: ExecutorContext, data: RenderData) { - const constants = data.constants; - const samplers = data.samplers; - const textures = data.textures; - const device = context.root.device; - for (const [key, value] of constants) { - let buffer = context.pipeline.descriptorSet.getBuffer(key); - let haveBuff = true; - if (!buffer) { - buffer = device.createBuffer(new BufferInfo(BufferUsageBit.UNIFORM | BufferUsageBit.TRANSFER_DST, - MemoryUsageBit.HOST | MemoryUsageBit.DEVICE, - value.length * 4, - value.length * 4)); - haveBuff = false; - } - buffer.update(new Float32Array(value)); - if (!haveBuff) this._bindDescriptor(context, key, buffer); - } - for (const [key, value] of textures) { - this._bindDescriptor(context, key, value); - } - for (const [key, value] of samplers) { - this._bindDescriptor(context, key, value); - } + updateGlobalDescBinding(context.pipeline, data); context.pipeline.descriptorSet.update(); } @@ -1135,7 +1099,7 @@ class DeviceSceneTask extends WebSceneTask { get graphScene () { return this._graphScene; } public start () {} protected _recordRenderList (isTransparent: boolean) { - const submitMap = this._currentQueue.devicePass.submitMap; + const submitMap = this._currentQueue.devicePass.context.submitMap; const renderList = isTransparent ? submitMap.get(this.camera!)!.transparentList : submitMap.get(this.camera!)!.opaqueList; for (let i = 0; i < renderList.length; ++i) { const { subModel, passIdx } = renderList[i]; @@ -1155,7 +1119,7 @@ class DeviceSceneTask extends WebSceneTask { this._recordRenderList(false); } protected _recordInstences () { - const submitMap = this._currentQueue.devicePass.submitMap; + const submitMap = this._currentQueue.devicePass.context.submitMap; const it = submitMap.get(this.camera!)!.renderInstanceQueue.length === 0 ? submitMap.get(this.camera!)!.instances.values() : submitMap.get(this.camera!)!.renderInstanceQueue.values(); @@ -1185,7 +1149,7 @@ class DeviceSceneTask extends WebSceneTask { } } protected _recordBatches () { - const submitMap = this._currentQueue.devicePass.submitMap; + const submitMap = this._currentQueue.devicePass.context.submitMap; const it = submitMap.get(this.camera!)!.batches.values(); let res = it.next(); while (!res.done) { let boundPSO = false; @@ -1222,7 +1186,7 @@ class DeviceSceneTask extends WebSceneTask { const count = batch.shaders.length; for (let j = 0; j < count; j++) { const pass = batch.passes[j]; - if (pass.phase !== this._currentQueue.phaseID) continue; + if (((isEnableEffect()) ? pass.phaseID : pass.phase) !== this._currentQueue.phaseID) continue; const shader = batch.shaders[j]; const inputAssembler: any = batch.inputAssembler!; const pso = PipelineStateManager.getOrCreatePipelineState(deviceManager.gfxDevice, pass, shader, this._renderPass, inputAssembler); @@ -1240,13 +1204,13 @@ class DeviceSceneTask extends WebSceneTask { } protected _recordShadowMap () { const context = this._currentQueue.devicePass.context; - const submitMap = this._currentQueue.devicePass.submitMap; + const submitMap = context.submitMap; submitMap.get(this.camera!)?.shadowMap?.recordCommandBuffer(context.device, this._renderPass, context.commandBuffer); } protected _recordReflectionProbe () { const context = this._currentQueue.devicePass.context; - const submitMap = this._currentQueue.devicePass.submitMap; + const submitMap = context.submitMap; submitMap.get(this.camera!)?.reflectionProbe?.recordCommandBuffer(context.device, this._renderPass, context.commandBuffer); } @@ -1256,23 +1220,25 @@ class DeviceSceneTask extends WebSceneTask { && this.graphScene.scene && this.graphScene.scene.flags & SceneFlags.SHADOW_CASTER; } - private _mergeMatToBlitDesc (fromDesc, toDesc) { + private _mergeSrcToTarDesc (fromDesc, toDesc) { fromDesc.update(); const fromGpuDesc = fromDesc.gpuDescriptorSet; const toGpuDesc = toDesc.gpuDescriptorSet; const extResId: number[] = []; for (let i = 0; i < toGpuDesc.gpuDescriptors.length; i++) { + const fromRes = fromGpuDesc.gpuDescriptors[i]; + if (!fromRes) continue; const currRes = toGpuDesc.gpuDescriptors[i]; - if (!currRes.gpuBuffer && fromGpuDesc.gpuDescriptors[i].gpuBuffer) { - currRes.gpuBuffer = fromGpuDesc.gpuDescriptors[i].gpuBuffer; + if (!currRes.gpuBuffer && fromRes.gpuBuffer) { + currRes.gpuBuffer = fromRes.gpuBuffer; extResId.push(i); } else if ('gpuTextureView' in currRes && !currRes.gpuTextureView) { - currRes.gpuTextureView = fromGpuDesc.gpuDescriptors[i].gpuTextureView; - currRes.gpuSampler = fromGpuDesc.gpuDescriptors[i].gpuSampler; + currRes.gpuTextureView = fromRes.gpuTextureView; + currRes.gpuSampler = fromRes.gpuSampler; extResId.push(i); } else if ('gpuTexture' in currRes && !currRes.gpuTexture) { - currRes.gpuTexture = fromGpuDesc.gpuDescriptors[i].gpuTexture; - currRes.gpuSampler = fromGpuDesc.gpuDescriptors[i].gpuSampler; + currRes.gpuTexture = fromRes.gpuTexture; + currRes.gpuSampler = fromRes.gpuSampler; extResId.push(i); } } @@ -1304,6 +1270,7 @@ class DeviceSceneTask extends WebSceneTask { const shader = pass.getShaderVariant(); const devicePass = this._currentQueue.devicePass; const screenIa: any = this._currentQueue.blitDesc!.screenQuad!.quadIA; + const globalDesc = devicePass.context.pipeline.descriptorSet; let pso; if (pass !== null && shader !== null && screenIa !== null) { pso = PipelineStateManager.getOrCreatePipelineState(devicePass.context.device, pass, shader, @@ -1313,20 +1280,21 @@ class DeviceSceneTask extends WebSceneTask { this.visitor.bindPipelineState(pso); const layoutStage = devicePass.renderLayout; const layoutDesc = layoutStage!.descriptorSet!; - const extResId: number[] = this._mergeMatToBlitDesc(pass.descriptorSet, layoutDesc); - // TODO: It will be changed to global later - this.visitor.bindDescriptorSet(SetIndex.MATERIAL, layoutDesc); + const extResId: number[] = isEnableEffect() ? [] : this._mergeSrcToTarDesc(pass.descriptorSet, layoutDesc); + if (isEnableEffect()) this.visitor.bindDescriptorSet(SetIndex.GLOBAL, layoutDesc); + this.visitor.bindDescriptorSet(SetIndex.MATERIAL, isEnableEffect() ? pass.descriptorSet : layoutDesc); this.visitor.bindDescriptorSet(SetIndex.LOCAL, this._currentQueue.blitDesc!.stageDesc!); this.visitor.bindInputAssembler(screenIa); this.visitor.draw(screenIa); // The desc data obtained from the outside should be cleaned up so that the data can be modified this._clearExtBlitDesc(layoutDesc, extResId); + if (isEnableEffect()) this.visitor.bindDescriptorSet(SetIndex.GLOBAL, globalDesc); } } private _recordAdditiveLights () { const devicePass = this._currentQueue.devicePass; - const submitMap = devicePass.submitMap; const context = devicePass.context; + const submitMap = context.submitMap; submitMap.get(this.camera!)?.additiveLight?.recordCommandBuffer(context.device, this._renderPass, devicePass.context.commandBuffer); @@ -1334,8 +1302,8 @@ class DeviceSceneTask extends WebSceneTask { private _recordPlanarShadows () { const devicePass = this._currentQueue.devicePass; - const submitMap = devicePass.submitMap; const context = devicePass.context; + const submitMap = context.submitMap; submitMap.get(this.camera!)?.planarQueue?.recordCommandBuffer(context.device, this._renderPass, devicePass.context.commandBuffer); @@ -1439,6 +1407,7 @@ class ExecutorContext { readonly height: number; readonly additiveLight: RenderAdditiveLightQueue; readonly shadowMapBatched: RenderShadowMapBatchedQueue; + readonly submitMap: Map = new Map(); renderGraph: RenderGraph; } class ResourceVisitor implements ResourceGraphVisitor { @@ -1495,6 +1464,7 @@ export class Executor { execute (rg: RenderGraph) { this._context.renderGraph = rg; + this._context.submitMap.clear(); const cmdBuff = this._context.commandBuffer; cmdBuff.begin(); const visitor = new RenderVisitor(this._context); @@ -1557,13 +1527,24 @@ class PreRenderVisitor extends BaseRenderVisitor implements RenderGraphVisitor { raster (pass: RasterPass) { if (!this.rg.getValid(this.passID)) return; const devicePasses = this.context.devicePasses; - const passHash = stringify(pass); - this.currPass = devicePasses.get(passHash); - if (!this.currPass) { - this.currPass = new DeviceRenderPass(this.context, new RasterPassInfo(this.passID, pass)); - devicePasses.set(passHash, this.currPass); + if (pass.versionName === '') { + const passHash = stringify(pass); + this.currPass = devicePasses.get(passHash); + if (!this.currPass) { + this.currPass = new DeviceRenderPass(this.context, new RasterPassInfo(this.passID, pass)); + devicePasses.set(passHash, this.currPass); + } else { + this.currPass.resetResource(this.passID, pass); + } } else { - this.currPass.resetResource(this.passID, pass); + const passHash = pass.versionName; + this.currPass = devicePasses.get(passHash); + if (!this.currPass || this.currPass.version !== pass.version) { + this.currPass = new DeviceRenderPass(this.context, new RasterPassInfo(this.passID, pass)); + devicePasses.set(passHash, this.currPass); + } else { + this.currPass.resetResource(this.passID, pass); + } } } compute (value: ComputePass) {} @@ -1615,7 +1596,9 @@ class PostRenderVisitor extends BaseRenderVisitor implements RenderGraphVisitor } raster (pass: RasterPass) { const devicePasses = this.context.devicePasses; - const passHash = stringify(pass); + const passHash = pass.versionName === '' + ? stringify(pass) + : pass.versionName; const currPass = devicePasses.get(passHash); if (!currPass) return; this.currPass = currPass; diff --git a/cocos/rendering/custom/graph.ts b/cocos/rendering/custom/graph.ts index 650d89d4e3..d3113f9911 100644 --- a/cocos/rendering/custom/graph.ts +++ b/cocos/rendering/custom/graph.ts @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -251,7 +250,7 @@ export interface IncidenceGraph extends Graph { export interface BidirectionalGraph extends IncidenceGraph { inEdges (v: vertex_descriptor): in_edge_iterator; inDegree (v: vertex_descriptor): number; - degree (v: vertex_descriptor) : number; + degree (v: vertex_descriptor): number; } //-------------------------------------------------------------------------- @@ -425,7 +424,7 @@ export interface AddressableGraph extends ParentGraph { addressable (absPath: string): boolean; locate (absPath: string): vertex_descriptor | null; locateRelative (path: string, start?: vertex_descriptor | null): vertex_descriptor | null; - path (v: vertex_descriptor) : string; + path (v: vertex_descriptor): string; } //-------------------------------------------------------------------------- diff --git a/cocos/rendering/custom/index.jsb.ts b/cocos/rendering/custom/index.jsb.ts index 796380a9a1..9599859065 100644 --- a/cocos/rendering/custom/index.jsb.ts +++ b/cocos/rendering/custom/index.jsb.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,11 +20,11 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ declare const render: any; -import { Pipeline, PipelineBuilder } from './pipeline'; +import { Pipeline, PipelineBuilder, RenderingModule } from './pipeline'; import { buildDeferredLayout, buildForwardLayout } from './effect'; import { macro } from '../../core/platform/macro'; import { DeferredPipelineBuilder, ForwardPipelineBuilder } from './builtin-pipelines'; @@ -39,6 +38,8 @@ export * from './archive'; export const INVALID_ID = 0xFFFFFFFF; export const enableEffectImport = false; +let _renderModule: RenderingModule; + export function createCustomPipeline (): Pipeline { const ppl = render.Factory.createPipeline(); const pplName = macro.CUSTOM_PIPELINE_NAME; @@ -76,19 +77,28 @@ function addCustomBuiltinPipelines (map: Map) { addCustomBuiltinPipelines(customPipelineBuilderMap); export function init (device: Device, arrayBuffer: ArrayBuffer) { - // noop + _renderModule = render.Factory.init(device, arrayBuffer); } export function destroy () { - // noop + render.Factory.destroy(_renderModule); } export function getPassID (name: string | undefined): number { - return INVALID_ID; + if (name === undefined) { + return _renderModule.getPassID('default'); + } + return _renderModule.getPassID(name); } export function getPhaseID (passID: number, name: string | number | undefined): number { - return INVALID_ID; + if (name === undefined) { + return _renderModule.getPhaseID(passID, 'default'); + } + if (typeof(name) === 'number') { + return _renderModule.getPhaseID(passID, name.toString()); + } + return _renderModule.getPhaseID(passID, name); } export function completePhaseName (name: string | number | undefined): string { diff --git a/cocos/rendering/custom/index.ts b/cocos/rendering/custom/index.ts index 8a1682ff58..4fc03095dd 100644 --- a/cocos/rendering/custom/index.ts +++ b/cocos/rendering/custom/index.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,8 +20,9 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ +import { EDITOR } from 'internal:constants'; import { Pipeline, PipelineBuilder } from './pipeline'; import { WebPipeline } from './web-pipeline'; import { buildDeferredLayout, buildForwardLayout } from './effect'; @@ -45,7 +45,7 @@ export * from './types'; export * from './pipeline'; export * from './archive'; -export const enableEffectImport = false; +export const enableEffectImport = !EDITOR; export const programLib: ProgramLibrary = new WebProgramLibrary(defaultLayoutGraph); export function createCustomPipeline (): Pipeline { diff --git a/cocos/rendering/custom/layout-graph-utils.ts b/cocos/rendering/custom/layout-graph-utils.ts index f5022c3615..06c8626977 100644 --- a/cocos/rendering/custom/layout-graph-utils.ts +++ b/cocos/rendering/custom/layout-graph-utils.ts @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -32,6 +31,9 @@ import { DescriptorBlockData, DescriptorData, DescriptorDB, DescriptorSetData, D import { LayoutGraphBuilder } from './pipeline'; import { UpdateFrequency, getUpdateFrequencyName, getDescriptorTypeOrderName, Descriptor, DescriptorBlock, DescriptorBlockFlattened, DescriptorBlockIndex, DescriptorTypeOrder, ParameterType } from './types'; +export const INVALID_ID = 0xFFFFFFFF; + +// get name of gfx.Type function getGfxTypeName (type: Type): string { switch (type) { case Type.UNKNOWN: return 'Unknown'; @@ -85,6 +87,7 @@ function getGfxTypeName (type: Type): string { } } +// get DescriptorType from DescriptorTypeOrder export function getGfxDescriptorType (type: DescriptorTypeOrder): DescriptorType { switch (type) { case DescriptorTypeOrder.UNIFORM_BUFFER: @@ -111,10 +114,40 @@ export function getGfxDescriptorType (type: DescriptorTypeOrder): DescriptorType } } +// get DescriptorTypeOrder from DescriptorType +export function getDescriptorTypeOrder (type: DescriptorType): DescriptorTypeOrder { + switch (type) { + case DescriptorType.UNIFORM_BUFFER: + return DescriptorTypeOrder.UNIFORM_BUFFER; + case DescriptorType.DYNAMIC_UNIFORM_BUFFER: + return DescriptorTypeOrder.DYNAMIC_UNIFORM_BUFFER; + case DescriptorType.SAMPLER_TEXTURE: + return DescriptorTypeOrder.SAMPLER_TEXTURE; + case DescriptorType.SAMPLER: + return DescriptorTypeOrder.SAMPLER; + case DescriptorType.TEXTURE: + return DescriptorTypeOrder.TEXTURE; + case DescriptorType.STORAGE_BUFFER: + return DescriptorTypeOrder.STORAGE_BUFFER; + case DescriptorType.DYNAMIC_STORAGE_BUFFER: + return DescriptorTypeOrder.DYNAMIC_STORAGE_BUFFER; + case DescriptorType.STORAGE_IMAGE: + return DescriptorTypeOrder.STORAGE_IMAGE; + case DescriptorType.INPUT_ATTACHMENT: + return DescriptorTypeOrder.INPUT_ATTACHMENT; + case DescriptorType.UNKNOWN: + default: + console.error('DescriptorTypeOrder not found'); + return DescriptorTypeOrder.INPUT_ATTACHMENT; + } +} + +// find passID using name export function getCustomPassID (lg: LayoutGraphData, name: string | undefined): number { return lg.locateChild(lg.nullVertex(), name || 'default'); } +// find phaseID using passID and phase name export function getCustomPhaseID (lg: LayoutGraphData, passID: number, name: string | number | undefined): number { if (name === undefined) { return lg.locateChild(passID, 'default'); @@ -125,10 +158,12 @@ export function getCustomPhaseID (lg: LayoutGraphData, passID: number, name: str return lg.locateChild(passID, name); } +// check ShaderStageFlagBit has certain bits function hasFlag (flags: ShaderStageFlagBit, flagToTest: ShaderStageFlagBit): boolean { return (flags & flagToTest) !== 0; } +// get name of visibility function getVisibilityName (stage: ShaderStageFlagBit): string { let count = 0; let str = ''; @@ -177,6 +212,7 @@ function getVisibilityName (stage: ShaderStageFlagBit): string { return str; } +// print LayoutGraphData export class PrintVisitor extends DefaultVisitor { discoverVertex (u: number, g: LayoutGraphData) { const ppl: PipelineLayoutData = g.getLayout(u); @@ -248,14 +284,17 @@ export class PrintVisitor extends DefaultVisitor { oss = ''; } +// text tools, indent 4 spaces function indent (space: string): string { return `${space} `; } +// text tools, unindent 4 spaces function unindent (space: string): string { return space.substring(0, space.length > 4 ? space.length - 4 : 0); } +// flatten DescriptorBlock to DescriptorBlockFlattened function convertDescriptorBlock (block: DescriptorBlock): DescriptorBlockFlattened { const flattened = new DescriptorBlockFlattened(); @@ -291,6 +330,7 @@ function convertDescriptorBlock (block: DescriptorBlock): DescriptorBlockFlatten return flattened; } +// cache of descriptor blocks class DescriptorCounter { public addDescriptor (key: string, name: string, count: number) { // key is DescriptorBlockIndex @@ -310,6 +350,7 @@ class DescriptorCounter { readonly inspector = new Map>(); } +// print LayoutGraph (not LayoutGraphData) class LayoutGraphPrintVisitor extends DefaultVisitor { discoverVertex (v: number, g: LayoutGraph) { const info: DescriptorDB = g.getDescriptors(v); @@ -364,6 +405,7 @@ class LayoutGraphPrintVisitor extends DefaultVisitor { oss = ''; } +// get pass name from effect function getPassName (pass: EffectAsset.IPassInfo): string { if (pass.pass === undefined) { return 'default'; @@ -371,6 +413,7 @@ function getPassName (pass: EffectAsset.IPassInfo): string { return pass.pass; } +// get phase name from effect function getPhaseName (pass: EffectAsset.IPassInfo): string { if (pass.phase === undefined) { return 'default'; @@ -381,6 +424,7 @@ function getPhaseName (pass: EffectAsset.IPassInfo): string { return pass.phase; } +// key of Visibility export class VisibilityIndex { constructor ( updateFrequency = UpdateFrequency.PER_INSTANCE, @@ -396,6 +440,7 @@ export class VisibilityIndex { descriptorType: DescriptorTypeOrder; } +// descriptors of same visibility export class VisibilityBlock { public mergeVisibility (name: string, vis: ShaderStageFlagBit) { // for each descriptor, merge visibility @@ -418,6 +463,7 @@ export class VisibilityBlock { descriptors = new Map(); } +// visibility database of phase export class VisibilityDB { public getBlock (index: VisibilityIndex): VisibilityBlock { const key = JSON.stringify(index); @@ -431,6 +477,7 @@ export class VisibilityDB { blocks = new Map(); } +// visibility database of pass export class VisibilityPass { public getPhase (phaseName: string): VisibilityDB { const phase = this.phases.get(phaseName); @@ -516,6 +563,7 @@ export class VisibilityGraph { passes = new Map(); } +// graph coloring help class class VectorGraphColorMap implements MutableVertexPropertyMap { constructor (sz: number) { this.colors = new Array(sz); @@ -529,6 +577,7 @@ class VectorGraphColorMap implements MutableVertexPropertyMap { readonly colors: Array; } +// class to layout all descriptors export class LayoutGraphInfo { constructor (visg: VisibilityGraph) { this.visg = visg; @@ -925,6 +974,7 @@ export class LayoutGraphInfo { } } +// sort descriptorBlocks using DescriptorBlockIndex function sortDescriptorBlocks (lhs: [string, T], rhs: [string, T]): number { const lhsIndex: DescriptorBlockIndex = JSON.parse(lhs[0]); const rhsIndex: DescriptorBlockIndex = JSON.parse(rhs[0]); @@ -939,6 +989,7 @@ function sortDescriptorBlocks (lhs: [string, T], rhs: [string, T]): number { return lhsValue - rhsValue; } +// build LayoutGraphData function buildLayoutGraphDataImpl (graph: LayoutGraph, builder: LayoutGraphBuilder) { for (const v of graph.vertices()) { const db = graph.getDescriptors(v); @@ -1001,7 +1052,8 @@ function buildLayoutGraphDataImpl (graph: LayoutGraph, builder: LayoutGraphBuild } } -function getDescriptorID (lg: LayoutGraphData, name: string): number { +// get descriptor nameID from name +export function getOrCreateDescriptorID (lg: LayoutGraphData, name: string): number { const nameID = lg.attributeIndex.get(name); if (nameID === undefined) { const newID = lg.valueNames.length; @@ -1012,6 +1064,7 @@ function getDescriptorID (lg: LayoutGraphData, name: string): number { return nameID; } +// LayoutGraphData builder class LayoutGraphBuilder2 implements LayoutGraphBuilder { public constructor (lg: LayoutGraphData) { this.lg = lg; @@ -1084,7 +1137,7 @@ class LayoutGraphBuilder2 implements LayoutGraphBuilder { for (let j = 0; j < block.descriptors.length; ++j) { const name: string = block.descriptorNames[j]; const d: Descriptor = block.descriptors[j]; - const nameID = getDescriptorID(lg, name); + const nameID = getOrCreateDescriptorID(lg, name); const data = new DescriptorData(nameID, d.type, d.count); dstBlock.descriptors.push(data); } @@ -1095,7 +1148,7 @@ class LayoutGraphBuilder2 implements LayoutGraphBuilder { const ppl: PipelineLayoutData = g.getLayout(nodeID); const setData = this.getDescriptorSetData(ppl, index.updateFrequency); const layout = setData.descriptorSetLayoutData; - const nameID = getDescriptorID(g, name); + const nameID = getOrCreateDescriptorID(g, name); layout.uniformBlocks.set(nameID, uniformBlock); } reserveDescriptorBlock (nodeID: number, index: DescriptorBlockIndex, block: DescriptorBlockFlattened): void { @@ -1140,6 +1193,7 @@ export function printLayoutGraphData (g: LayoutGraphData): string { return visitor.oss; } +// lookup DescriptorBlockData from Map function getDescriptorBlockData (map: Map, index: DescriptorBlockIndex): DescriptorBlockData { const key = JSON.stringify(index); const block = map.get(key); @@ -1151,6 +1205,7 @@ function getDescriptorBlockData (map: Map, index: D return newBlock; } +// make DescriptorSetLayoutData from effect directly export function makeDescriptorSetLayoutData (lg: LayoutGraphData, rate: UpdateFrequency, set: number, descriptors: EffectAsset.IDescriptorInfo): DescriptorSetLayoutData { @@ -1164,7 +1219,7 @@ export function makeDescriptorSetLayoutData (lg: LayoutGraphData, descriptorType: DescriptorTypeOrder.UNIFORM_BUFFER, visibility: cb.stageFlags, }); - const nameID = getDescriptorID(lg, cb.name); + const nameID = getOrCreateDescriptorID(lg, cb.name); block.descriptors.push(new DescriptorData(nameID, Type.UNKNOWN, 1)); // add uniform buffer uniformBlocks.set(nameID, new UniformBlock(set, 0xFFFFFFFF, cb.name, cb.members, 1)); @@ -1177,7 +1232,7 @@ export function makeDescriptorSetLayoutData (lg: LayoutGraphData, descriptorType: DescriptorTypeOrder.SAMPLER_TEXTURE, visibility: samplerTexture.stageFlags, }); - const nameID = getDescriptorID(lg, samplerTexture.name); + const nameID = getOrCreateDescriptorID(lg, samplerTexture.name); block.descriptors.push(new DescriptorData(nameID, samplerTexture.type, samplerTexture.count)); } for (let i = 0; i < descriptors.samplers.length; i++) { @@ -1188,7 +1243,7 @@ export function makeDescriptorSetLayoutData (lg: LayoutGraphData, descriptorType: DescriptorTypeOrder.SAMPLER, visibility: sampler.stageFlags, }); - const nameID = getDescriptorID(lg, sampler.name); + const nameID = getOrCreateDescriptorID(lg, sampler.name); block.descriptors.push(new DescriptorData(nameID, Type.SAMPLER, sampler.count)); } for (let i = 0; i < descriptors.textures.length; i++) { @@ -1199,7 +1254,7 @@ export function makeDescriptorSetLayoutData (lg: LayoutGraphData, descriptorType: DescriptorTypeOrder.TEXTURE, visibility: texture.stageFlags, }); - const nameID = getDescriptorID(lg, texture.name); + const nameID = getOrCreateDescriptorID(lg, texture.name); block.descriptors.push(new DescriptorData(nameID, texture.type, texture.count)); } for (let i = 0; i < descriptors.buffers.length; i++) { @@ -1210,7 +1265,7 @@ export function makeDescriptorSetLayoutData (lg: LayoutGraphData, descriptorType: DescriptorTypeOrder.STORAGE_BUFFER, visibility: buffer.stageFlags, }); - const nameID = getDescriptorID(lg, buffer.name); + const nameID = getOrCreateDescriptorID(lg, buffer.name); block.descriptors.push(new DescriptorData(nameID, Type.UNKNOWN, 1)); } for (let i = 0; i < descriptors.images.length; i++) { @@ -1221,7 +1276,7 @@ export function makeDescriptorSetLayoutData (lg: LayoutGraphData, descriptorType: DescriptorTypeOrder.STORAGE_IMAGE, visibility: image.stageFlags, }); - const nameID = getDescriptorID(lg, image.name); + const nameID = getOrCreateDescriptorID(lg, image.name); block.descriptors.push(new DescriptorData(nameID, image.type, image.count)); } for (let i = 0; i < descriptors.subpassInputs.length; i++) { @@ -1232,7 +1287,7 @@ export function makeDescriptorSetLayoutData (lg: LayoutGraphData, descriptorType: DescriptorTypeOrder.INPUT_ATTACHMENT, visibility: subpassInput.stageFlags, }); - const nameID = getDescriptorID(lg, subpassInput.name); + const nameID = getOrCreateDescriptorID(lg, subpassInput.name); block.descriptors.push(new DescriptorData(nameID, Type.UNKNOWN, subpassInput.count)); } @@ -1258,6 +1313,11 @@ export function makeDescriptorSetLayoutData (lg: LayoutGraphData, data.uniformBlocks.set(d.descriptorID, ub); } // update block capacity + const binding = data.bindingMap.get(d.descriptorID); + if (binding !== undefined) { + console.error(`Duplicated descriptor ${d.descriptorID}`); + } + data.bindingMap.set(d.descriptorID, block.offset + block.capacity); block.capacity += d.count; } // increate total capacity @@ -1267,6 +1327,7 @@ export function makeDescriptorSetLayoutData (lg: LayoutGraphData, return data; } +// fill DescriptorSetLayoutInfo from DescriptorSetLayoutData export function initializeDescriptorSetLayoutInfo (layoutData: DescriptorSetLayoutData, info: DescriptorSetLayoutInfo): void { for (let i = 0; i < layoutData.descriptorBlocks.length; ++i) { @@ -1299,6 +1360,7 @@ function populatePipelineLayoutInfo (layout: PipelineLayoutData, } } +// initialize layout graph module export function initializeLayoutGraphData (device: Device, lg: LayoutGraphData) { // create descriptor sets _emptyDescriptorSetLayout = device.createDescriptorSetLayout(new DescriptorSetLayoutInfo()); @@ -1333,6 +1395,7 @@ export function initializeLayoutGraphData (device: Device, lg: LayoutGraphData) } } +// terminate layout graph module export function terminateLayoutGraphData (lg: LayoutGraphData) { for (const v of lg.vertices()) { const layoutData = lg.getLayout(v); @@ -1346,14 +1409,17 @@ export function terminateLayoutGraphData (lg: LayoutGraphData) { _emptyDescriptorSetLayout.destroy(); } +// get empty descriptor set layout export function getEmptyDescriptorSetLayout (): DescriptorSetLayout { return _emptyDescriptorSetLayout; } +// get empty pipeline layout export function getEmptyPipelineLayout (): PipelineLayout { return _emptyPipelineLayout; } +// get descriptor set from LayoutGraphData (not from ProgramData) export function getOrCreateDescriptorSetLayout (lg: LayoutGraphData, passID: number, phaseID: number, rate: UpdateFrequency): DescriptorSetLayout { if (rate < UpdateFrequency.PER_PASS) { @@ -1384,6 +1450,7 @@ export function getOrCreateDescriptorSetLayout (lg: LayoutGraphData, return _emptyDescriptorSetLayout; } +// getDescriptorSetLayout from LayoutGraphData export function getDescriptorSetLayout (lg: LayoutGraphData, passID: number, phaseID: number, rate: UpdateFrequency): DescriptorSetLayout | null { if (rate < UpdateFrequency.PER_PASS) { @@ -1414,26 +1481,97 @@ export function getDescriptorSetLayout (lg: LayoutGraphData, return null; } -const _emptyDescriptorSetLayoutData = new DescriptorSetLayoutData(); - -export function getDescriptorSetLayoutData (lg: LayoutGraphData, - passID: number, phaseID: number, rate: UpdateFrequency): DescriptorSetLayoutData { - if (rate < UpdateFrequency.PER_PASS) { - const phaseData = lg.getLayout(phaseID); - const data = phaseData.descriptorSets.get(rate); - if (data !== undefined) { - return data.descriptorSetLayoutData; +// get or create DescriptorBlockData from DescriptorSetLayoutData +export function getOrCreateDescriptorBlockData (data: DescriptorSetLayoutData, + type: DescriptorType, vis: ShaderStageFlagBit): DescriptorBlockData { + const order = getDescriptorTypeOrder(type); + for (const block of data.descriptorBlocks) { + if (block.type === order && block.visibility === vis) { + return block; } - return _emptyDescriptorSetLayoutData; } - - assert(rate === UpdateFrequency.PER_PASS); - assert(passID === lg.getParent(phaseID)); - - const passData = lg.getLayout(passID); - const data = passData.descriptorSets.get(rate); - if (data) { - return data.descriptorSetLayoutData; - } - return _emptyDescriptorSetLayoutData; + const block = new DescriptorBlockData(order, vis); + data.descriptorBlocks.push(block); + return block; +} + +export function getProgramID (lg: LayoutGraphData, phaseID: number, programName: string): number { + assert(phaseID !== lg.nullVertex()); + const phase = lg.getRenderPhase(phaseID); + const programID = phase.shaderIndex.get(programName); + if (programID === undefined) { + return INVALID_ID; + } + return programID; +} + +export function getDescriptorNameID (lg: LayoutGraphData, name: string): number { + const nameID = lg.attributeIndex.get(name); + if (nameID === undefined) { + return INVALID_ID; + } + return nameID; +} + +export function getDescriptorName (lg: LayoutGraphData, nameID: number): string { + if (nameID >= lg.valueNames.length) { + return ''; + } + return lg.valueNames[nameID]; +} + +export function getPerPassDescriptorSetLayoutData (lg: LayoutGraphData, + passID: number): DescriptorSetLayoutData | null { + assert(passID !== lg.nullVertex()); + const node = lg.getLayout(passID); + const set = node.descriptorSets.get(UpdateFrequency.PER_PASS); + if (set === undefined) { + return null; + } + return set.descriptorSetLayoutData; +} + +export function getPerPhaseDescriptorSetLayoutData (lg: LayoutGraphData, + phaseID: number): DescriptorSetLayoutData | null { + assert(phaseID !== lg.nullVertex()); + const node = lg.getLayout(phaseID); + const set = node.descriptorSets.get(UpdateFrequency.PER_PHASE); + if (set === undefined) { + return null; + } + return set.descriptorSetLayoutData; +} + +export function getPerBatchDescriptorSetLayoutData (lg: LayoutGraphData, + phaseID: number, programID): DescriptorSetLayoutData | null { + assert(phaseID !== lg.nullVertex()); + const phase = lg.getRenderPhase(phaseID); + assert(programID < phase.shaderPrograms.length); + const program = phase.shaderPrograms[programID]; + const set = program.layout.descriptorSets.get(UpdateFrequency.PER_BATCH); + if (set === undefined) { + return null; + } + return set.descriptorSetLayoutData; +} + +export function getPerInstanceDescriptorSetLayoutData (lg: LayoutGraphData, + phaseID: number, programID): DescriptorSetLayoutData | null { + assert(phaseID !== lg.nullVertex()); + const phase = lg.getRenderPhase(phaseID); + assert(programID < phase.shaderPrograms.length); + const program = phase.shaderPrograms[programID]; + const set = program.layout.descriptorSets.get(UpdateFrequency.PER_INSTANCE); + if (set === undefined) { + return null; + } + return set.descriptorSetLayoutData; +} + +export function getBinding (layout: DescriptorSetLayoutData, nameID: number) { + const binding = layout.bindingMap.get(nameID); + if (binding === undefined) { + return 0xFFFFFFFF; + } + return binding; } diff --git a/cocos/rendering/custom/layout-graph.ts b/cocos/rendering/custom/layout-graph.ts index 953e180e80..600746bb9b 100644 --- a/cocos/rendering/custom/layout-graph.ts +++ b/cocos/rendering/custom/layout-graph.ts @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -605,16 +604,24 @@ export class DescriptorBlockData { } export class DescriptorSetLayoutData { - constructor (slot = 0xFFFFFFFF, capacity = 0, descriptorBlocks: DescriptorBlockData[] = [], uniformBlocks: Map = new Map()) { + constructor ( + slot = 0xFFFFFFFF, + capacity = 0, + descriptorBlocks: DescriptorBlockData[] = [], + uniformBlocks: Map = new Map(), + bindingMap: Map = new Map(), + ) { this.slot = slot; this.capacity = capacity; this.descriptorBlocks = descriptorBlocks; this.uniformBlocks = uniformBlocks; + this.bindingMap = bindingMap; } slot: number; capacity: number; readonly descriptorBlocks: DescriptorBlockData[]; readonly uniformBlocks: Map; + readonly bindingMap: Map; } export class DescriptorSetData { @@ -1420,6 +1427,11 @@ export function saveDescriptorSetLayoutData (ar: OutputArchive, v: DescriptorSet ar.writeNumber(k1); saveUniformBlock(ar, v1); } + ar.writeNumber(v.bindingMap.size); // Map + for (const [k1, v1] of v.bindingMap) { + ar.writeNumber(k1); + ar.writeNumber(v1); + } } export function loadDescriptorSetLayoutData (ar: InputArchive, v: DescriptorSetLayoutData) { @@ -1440,6 +1452,12 @@ export function loadDescriptorSetLayoutData (ar: InputArchive, v: DescriptorSetL loadUniformBlock(ar, v1); v.uniformBlocks.set(k1, v1); } + sz = ar.readNumber(); // Map + for (let i1 = 0; i1 !== sz; ++i1) { + const k1 = ar.readNumber(); + const v1 = ar.readNumber(); + v.bindingMap.set(k1, v1); + } } export function saveDescriptorSetData (ar: OutputArchive, v: DescriptorSetData) { diff --git a/cocos/rendering/custom/pipeline.ts b/cocos/rendering/custom/pipeline.ts index 8bafe22508..a526cae49f 100644 --- a/cocos/rendering/custom/pipeline.ts +++ b/cocos/rendering/custom/pipeline.ts @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -104,6 +103,7 @@ export interface RasterPassBuilder extends Setter { addQueue (hint: QueueHint): RasterQueueBuilder; addQueue (/*QueueHint.NONE*/): RasterQueueBuilder; setViewport (viewport: Viewport): void; + setVersion (name: string, version: number): void; } export interface ComputeQueueBuilder extends Setter { @@ -189,5 +189,10 @@ export interface PipelineBuilder { setup (cameras: Camera[], pipeline: Pipeline): void; } +export interface RenderingModule { + getPassID (name: string): number; + getPhaseID (passID: number, name: string): number; +} + export class Factory { } diff --git a/cocos/rendering/custom/private.ts b/cocos/rendering/custom/private.ts index dd6bef8031..74e285938f 100644 --- a/cocos/rendering/custom/private.ts +++ b/cocos/rendering/custom/private.ts @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -52,4 +51,7 @@ export interface ProgramLibrary { getProgramVariant (device: Device, phaseID: number, name: string, defines: MacroRecord/*, null*/): ProgramProxy | null; getBlockSizes (phaseID: number, programName: string): number[]; getHandleMap (phaseID: number, programName: string): Record; + getProgramID (phaseID: number, programName: string): number; + getDescriptorNameID (name: string): number; + getDescriptorName (nameID: number): string; } diff --git a/cocos/rendering/custom/render-graph.ts b/cocos/rendering/custom/render-graph.ts index 93583593bc..1ea87b4be8 100644 --- a/cocos/rendering/custom/render-graph.ts +++ b/cocos/rendering/custom/render-graph.ts @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -1025,6 +1024,8 @@ export class RasterPass { width = 0; height = 0; readonly viewport: Viewport = new Viewport(); + versionName = ''; + version = 0; } export class ComputePass { diff --git a/cocos/rendering/custom/serialization.ts b/cocos/rendering/custom/serialization.ts index dea1e78df2..3fc092ed12 100644 --- a/cocos/rendering/custom/serialization.ts +++ b/cocos/rendering/custom/serialization.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { OutputArchive, InputArchive } from './archive'; import { Color, DescriptorSetLayoutBinding, DescriptorSetLayoutInfo, Uniform, UniformBlock } from '../../gfx'; diff --git a/cocos/rendering/custom/types.ts b/cocos/rendering/custom/types.ts index daca469865..6e02f1b51c 100644 --- a/cocos/rendering/custom/types.ts +++ b/cocos/rendering/custom/types.ts @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/rendering/custom/utils.ts b/cocos/rendering/custom/utils.ts index f85ba93b34..b69a79be4c 100644 --- a/cocos/rendering/custom/utils.ts +++ b/cocos/rendering/custom/utils.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + // https://stackoverflow.com/questions/56714318/how-to-disable-multiple-rules-for-eslint-nextline?msclkid=5d4c2298ba7911eca34d0ab30591752e import { Type } from '../../gfx'; diff --git a/cocos/rendering/custom/web-descriptor-hierarchy.ts b/cocos/rendering/custom/web-descriptor-hierarchy.ts index 54e66fdd98..29ca4316de 100644 --- a/cocos/rendering/custom/web-descriptor-hierarchy.ts +++ b/cocos/rendering/custom/web-descriptor-hierarchy.ts @@ -1,19 +1,18 @@ /* eslint-disable max-len */ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/rendering/custom/web-layout-exporter.ts b/cocos/rendering/custom/web-layout-exporter.ts index f8af0e8947..28d825631f 100644 --- a/cocos/rendering/custom/web-layout-exporter.ts +++ b/cocos/rendering/custom/web-layout-exporter.ts @@ -1,19 +1,18 @@ /* eslint-disable @typescript-eslint/restrict-plus-operands */ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/rendering/custom/web-layout-graph.ts b/cocos/rendering/custom/web-layout-graph.ts index 1acb13efa3..fdc01fa864 100644 --- a/cocos/rendering/custom/web-layout-graph.ts +++ b/cocos/rendering/custom/web-layout-graph.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { DEBUG } from 'internal:constants'; import { EffectAsset } from '../../asset/assets'; // eslint-disable-next-line max-len diff --git a/cocos/rendering/custom/web-pipeline.ts b/cocos/rendering/custom/web-pipeline.ts index 66c0056d1e..2d013dda8a 100644 --- a/cocos/rendering/custom/web-pipeline.ts +++ b/cocos/rendering/custom/web-pipeline.ts @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -52,6 +51,7 @@ import { CustomPipelineBuilder } from './custom-pipeline'; import { decideProfilerCamera } from '../pipeline-funcs'; import { DebugViewCompositeType } from '../debug-view'; import { getUBOTypeCount } from './utils'; +import { initGlobalDescBinding } from './define'; export class WebSetter { constructor (data: RenderData, lg: LayoutGraphData) { @@ -524,6 +524,7 @@ export class WebRasterQueueBuilder extends WebSetter implements RasterQueueBuild setShadowUBOView(this, camera); } setTextureUBOView(this, camera, this._pipeline); + initGlobalDescBinding(cclegacy.director.root.pipeline, this._data); } addScene (sceneName: string, sceneFlags = SceneFlags.NONE): void { const sceneData = new SceneData(sceneName, sceneFlags); @@ -550,6 +551,7 @@ export class WebRasterQueueBuilder extends WebSetter implements RasterQueueBuild setShadowUBOView(this, camera); } setTextureUBOView(this, camera, this._pipeline); + initGlobalDescBinding(cclegacy.director.root.pipeline, this._data); } clearRenderTarget (name: string, color: Color = new Color()) { this._renderGraph.addVertex( @@ -583,6 +585,10 @@ export class WebRasterPassBuilder extends WebSetter implements RasterPassBuilder ); this._layoutID = layoutGraph.locateChild(layoutGraph.nullVertex(), layoutName); } + setVersion (name: string, version: number): void { + this._pass.versionName = name; + this._pass.version = version; + } get name () { return this._renderGraph.getName(this._vertID); } @@ -856,7 +862,7 @@ export class WebPipeline implements Pipeline { return this._combineSignY; } - public globalDescriptorSetData () { + get globalDescriptorSetData () { return this._globalDescSetData; } @@ -1147,6 +1153,7 @@ export class WebPipeline implements Pipeline { ); const result = new WebRasterPassBuilder(data, this._renderGraph!, this._layoutGraph, vertID, pass, this._pipelineSceneData); this._updateRasterPassConstants(result, width, height); + initGlobalDescBinding(cclegacy.director.root.pipeline, data); return result; } public getDescriptorSetLayout (shaderName: string, freq: UpdateFrequency): DescriptorSetLayout { @@ -1165,6 +1172,7 @@ export class WebPipeline implements Pipeline { get layoutGraph () { return this._layoutGraph; } + protected _updateRasterPassConstants (setter: WebSetter, width: number, height: number) { const director = cclegacy.director; const root = director.root; diff --git a/cocos/rendering/custom/web-program-library.ts b/cocos/rendering/custom/web-program-library.ts index e2766e77c2..4f7873baab 100644 --- a/cocos/rendering/custom/web-program-library.ts +++ b/cocos/rendering/custom/web-program-library.ts @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -25,20 +24,21 @@ /* eslint-disable max-len */ import { EffectAsset } from '../../asset/assets'; -import { Attribute, DescriptorSetLayout, Device, MemoryAccessBit, PipelineLayout, PipelineLayoutInfo, Shader, ShaderInfo, ShaderStage, ShaderStageFlagBit, Uniform, UniformBlock, UniformInputAttachment, UniformSampler, UniformSamplerTexture, UniformStorageBuffer, UniformStorageImage, UniformTexture } from '../../gfx'; +import { Attribute, DescriptorSetLayout, DESCRIPTOR_BUFFER_TYPE, DESCRIPTOR_SAMPLER_TYPE, Device, MemoryAccessBit, PipelineLayout, PipelineLayoutInfo, Shader, ShaderInfo, ShaderStage, ShaderStageFlagBit, Type, Uniform, UniformBlock, UniformInputAttachment, UniformSampler, UniformSamplerTexture, UniformStorageBuffer, UniformStorageImage, UniformTexture } from '../../gfx'; import { genHandles, getActiveAttributes, getCombinationDefines, getShaderInstanceName, getSize, getVariantKey, populateMacros, prepareDefines } from '../../render-scene/core/program-utils'; import { getDeviceShaderVersion, MacroRecord } from '../../render-scene'; import { IProgramInfo } from '../../render-scene/core/program-lib'; -import { DescriptorSetData, DescriptorSetLayoutData, LayoutGraphData, LayoutGraphDataValue, PipelineLayoutData, RenderPhaseData, ShaderProgramData } from './layout-graph'; +import { DescriptorBlockData, DescriptorData, DescriptorSetData, DescriptorSetLayoutData, LayoutGraphData, LayoutGraphDataValue, PipelineLayoutData, RenderPhaseData, ShaderProgramData } from './layout-graph'; import { ProgramLibrary, ProgramProxy } from './private'; import { DescriptorTypeOrder, UpdateFrequency } from './types'; -import { ProgramGroup, ProgramHost, ProgramInfo, ProgramLibraryData } from './web-types'; -import { getCustomPassID, getCustomPhaseID, getOrCreateDescriptorSetLayout, getEmptyDescriptorSetLayout, getEmptyPipelineLayout, initializeDescriptorSetLayoutInfo, makeDescriptorSetLayoutData, getDescriptorSetLayout } from './layout-graph-utils'; +import { ProgramGroup, ProgramHost, ProgramInfo } from './web-types'; +import { getCustomPassID, getCustomPhaseID, getOrCreateDescriptorSetLayout, getEmptyDescriptorSetLayout, getEmptyPipelineLayout, initializeDescriptorSetLayoutInfo, makeDescriptorSetLayoutData, getDescriptorSetLayout, getOrCreateDescriptorID, getDescriptorTypeOrder, getProgramID, getDescriptorNameID, getDescriptorName, INVALID_ID } from './layout-graph-utils'; import { assert } from '../../core/platform/debug'; +import { IDescriptorSetLayoutInfo, localDescriptorSetLayout } from '../define'; -const INVALID_ID = 0xFFFFFFFF; const _setIndex = [2, 1, 3, 0]; +// make IProgramInfo from IShaderInfo function makeProgramInfo (effectName: string, shader: EffectAsset.IShaderInfo): IProgramInfo { const programInfo = { ...shader } as IProgramInfo; programInfo.effectName = effectName; @@ -48,6 +48,7 @@ function makeProgramInfo (effectName: string, shader: EffectAsset.IShaderInfo): return programInfo; } +// overwrite IProgramInfo using gfx.ShaderInfo function overwriteProgramBlockInfo (shaderInfo: ShaderInfo, programInfo: IProgramInfo) { const set = _setIndex[UpdateFrequency.PER_BATCH]; for (const block of programInfo.blocks) { @@ -68,7 +69,8 @@ function overwriteProgramBlockInfo (shaderInfo: ShaderInfo, programInfo: IProgra } } -function populateMixedShaderInfo ( +// add descriptor to size-reserved descriptor set +function populateGroupedShaderInfo ( layout: DescriptorSetLayoutData, descriptorInfo: EffectAsset.IDescriptorInfo, set: number, shaderInfo: ShaderInfo, blockSizes: number[], @@ -169,6 +171,7 @@ function populateMixedShaderInfo ( } } +// add merged descriptor to gfx.ShaderInfo function populateMergedShaderInfo (valueNames: string[], layout: DescriptorSetLayoutData, set: number, shaderInfo: ShaderInfo, blockSizes: number[]) { @@ -255,6 +258,7 @@ function populateMergedShaderInfo (valueNames: string[], } } +// add descriptor from effect to gfx.ShaderInfo function populateShaderInfo ( descriptorInfo: EffectAsset.IDescriptorInfo, set: number, shaderInfo: ShaderInfo, blockSizes: number[], @@ -303,18 +307,107 @@ function populateShaderInfo ( } } +// add fixed local descriptors to gfx.ShaderInfo +function populateLocalShaderInfo ( + target: EffectAsset.IDescriptorInfo, + source: IDescriptorSetLayoutInfo, shaderInfo: ShaderInfo, blockSizes: number[], +) { + const set = _setIndex[UpdateFrequency.PER_INSTANCE]; + for (let i = 0; i < target.blocks.length; i++) { + const block = target.blocks[i]; + const info = source.layouts[block.name] as UniformBlock | undefined; + const binding = info && source.bindings.find((bd) => bd.binding === info.binding); + if (!info || !binding || !(binding.descriptorType & DESCRIPTOR_BUFFER_TYPE)) { + console.warn(`builtin UBO '${block.name}' not available!`); + continue; + } + blockSizes.push(getSize(block.members)); + shaderInfo.blocks.push(new UniformBlock(set, binding.binding, block.name, + block.members.map((m) => new Uniform(m.name, m.type, m.count)), 1)); // effect compiler guarantees block count = 1 + } + for (let i = 0; i < target.samplerTextures.length; i++) { + const samplerTexture = target.samplerTextures[i]; + const info = source.layouts[samplerTexture.name] as UniformSamplerTexture; + const binding = info && source.bindings.find((bd) => bd.binding === info.binding); + if (!info || !binding || !(binding.descriptorType & DESCRIPTOR_SAMPLER_TYPE)) { + console.warn(`builtin samplerTexture '${samplerTexture.name}' not available!`); + continue; + } + shaderInfo.samplerTextures.push(new UniformSamplerTexture( + set, binding.binding, samplerTexture.name, samplerTexture.type, samplerTexture.count, + )); + } +} + +function setFlattenedBinding (setOffsets: number[], + descriptors: UniformBlock[] + | UniformSamplerTexture[] + | UniformSampler[] + | UniformTexture[] + | UniformStorageBuffer[] + | UniformStorageImage[] + | UniformInputAttachment[]) { + for (const d of descriptors) { + d.flattened = setOffsets[d.set] + d.binding; + } +} + +function getIDescriptorSetLayoutInfoCapacity (info: IDescriptorSetLayoutInfo): number { + let capacity = 0; + for (const binding of info.bindings) { + capacity += binding.count; + } + return capacity; +} + +function calculateFlattenedBinding ( + descriptorSets: (DescriptorSetLayoutData | null)[], + fixedInstanceDescriptorSetLayout: IDescriptorSetLayoutInfo | null, + shaderInfo: ShaderInfo, +) { + const passCapacity = descriptorSets[UpdateFrequency.PER_PASS]?.capacity || 0; + const phaseCapacity = descriptorSets[UpdateFrequency.PER_PHASE]?.capacity || 0; + // const batchCapacity = descriptorSets[UpdateFrequency.PER_BATCH]?.capacity || 0; // dynamic size + const instanceCapacity = fixedInstanceDescriptorSetLayout + ? getIDescriptorSetLayoutInfoCapacity(fixedInstanceDescriptorSetLayout) + : (descriptorSets[UpdateFrequency.PER_INSTANCE]?.capacity || 0); + + const passOffset = 0; + const phaseOffset = passOffset + passCapacity; + const instanceOffset = phaseOffset + phaseCapacity; + const batchOffset = instanceOffset + instanceCapacity; + + const offsets = new Array(4); + offsets[_setIndex[UpdateFrequency.PER_PASS]] = passOffset; + offsets[_setIndex[UpdateFrequency.PER_PHASE]] = phaseOffset; + offsets[_setIndex[UpdateFrequency.PER_BATCH]] = batchOffset; + offsets[_setIndex[UpdateFrequency.PER_INSTANCE]] = instanceOffset; + + setFlattenedBinding(offsets, shaderInfo.blocks); + setFlattenedBinding(offsets, shaderInfo.samplerTextures); + setFlattenedBinding(offsets, shaderInfo.samplers); + setFlattenedBinding(offsets, shaderInfo.textures); + setFlattenedBinding(offsets, shaderInfo.buffers); + setFlattenedBinding(offsets, shaderInfo.images); +} + +// make gfx.ShaderInfo function makeShaderInfo ( lg: LayoutGraphData, passLayouts: PipelineLayoutData, phaseLayouts: PipelineLayoutData, srcShaderInfo: EffectAsset.IShaderInfo, programData: ShaderProgramData | null, + fixedLocal: boolean, ): [ShaderInfo, Array] { + const descriptorSets: Array = [null, null, null, null]; + let fixedInstanceDescriptorSetLayout: IDescriptorSetLayoutInfo | null = null; const shaderInfo = new ShaderInfo(); const blockSizes = new Array(); { // pass const passLayout = passLayouts.descriptorSets.get(UpdateFrequency.PER_PASS); if (passLayout) { + descriptorSets[UpdateFrequency.PER_PASS] = passLayout.descriptorSetLayoutData; populateMergedShaderInfo(lg.valueNames, passLayout.descriptorSetLayoutData, _setIndex[UpdateFrequency.PER_PASS], shaderInfo, blockSizes); } @@ -322,6 +415,7 @@ function makeShaderInfo ( { // phase const phaseLayout = phaseLayouts.descriptorSets.get(UpdateFrequency.PER_PHASE); if (phaseLayout) { + descriptorSets[UpdateFrequency.PER_PHASE] = phaseLayout.descriptorSetLayoutData; populateMergedShaderInfo(lg.valueNames, phaseLayout.descriptorSetLayoutData, _setIndex[UpdateFrequency.PER_PHASE], shaderInfo, blockSizes); } @@ -331,13 +425,15 @@ function makeShaderInfo ( if (programData) { const perBatch = programData.layout.descriptorSets.get(UpdateFrequency.PER_BATCH); if (perBatch) { + descriptorSets[UpdateFrequency.PER_BATCH] = perBatch.descriptorSetLayoutData; populateMergedShaderInfo(lg.valueNames, perBatch.descriptorSetLayoutData, _setIndex[UpdateFrequency.PER_BATCH], shaderInfo, blockSizes); } } else { const batchLayout = phaseLayouts.descriptorSets.get(UpdateFrequency.PER_BATCH); if (batchLayout) { - populateMixedShaderInfo(batchLayout.descriptorSetLayoutData, + descriptorSets[UpdateFrequency.PER_BATCH] = batchLayout.descriptorSetLayoutData; + populateGroupedShaderInfo(batchLayout.descriptorSetLayoutData, batchInfo, _setIndex[UpdateFrequency.PER_BATCH], shaderInfo, blockSizes); } @@ -346,20 +442,28 @@ function makeShaderInfo ( { // instance const instanceInfo = srcShaderInfo.descriptors[UpdateFrequency.PER_INSTANCE]; if (programData) { - const perInstance = programData.layout.descriptorSets.get(UpdateFrequency.PER_INSTANCE); - if (perInstance) { - populateMergedShaderInfo(lg.valueNames, perInstance.descriptorSetLayoutData, - _setIndex[UpdateFrequency.PER_INSTANCE], shaderInfo, blockSizes); + if (fixedLocal) { + fixedInstanceDescriptorSetLayout = localDescriptorSetLayout; + populateLocalShaderInfo(instanceInfo, localDescriptorSetLayout, shaderInfo, blockSizes); + } else { + const perInstance = programData.layout.descriptorSets.get(UpdateFrequency.PER_INSTANCE); + if (perInstance) { + descriptorSets[UpdateFrequency.PER_INSTANCE] = perInstance.descriptorSetLayoutData; + populateMergedShaderInfo(lg.valueNames, perInstance.descriptorSetLayoutData, + _setIndex[UpdateFrequency.PER_INSTANCE], shaderInfo, blockSizes); + } } } else { const instanceLayout = phaseLayouts.descriptorSets.get(UpdateFrequency.PER_INSTANCE); if (instanceLayout) { - populateMixedShaderInfo(instanceLayout.descriptorSetLayoutData, + descriptorSets[UpdateFrequency.PER_INSTANCE] = instanceLayout.descriptorSetLayoutData; + populateGroupedShaderInfo(instanceLayout.descriptorSetLayoutData, instanceInfo, _setIndex[UpdateFrequency.PER_INSTANCE], shaderInfo, blockSizes); } } } + calculateFlattenedBinding(descriptorSets, fixedInstanceDescriptorSetLayout, shaderInfo); shaderInfo.stages.push(new ShaderStage(ShaderStageFlagBit.VERTEX, '')); shaderInfo.stages.push(new ShaderStage(ShaderStageFlagBit.FRAGMENT, '')); return [shaderInfo, blockSizes]; @@ -378,27 +482,93 @@ class WebProgramProxy implements ProgramProxy { host: ProgramHost; } +// find name and type from local descriptor set info +function getDescriptorNameAndType (source: IDescriptorSetLayoutInfo, binding: number): [string, Type] { + for (const name in source.layouts) { + const v = source.layouts[name]; + if (v.binding === binding) { + assert(v.name === name); + let type = Type.UNKNOWN; + if (v instanceof UniformSamplerTexture) { + type = v.type; + } else if (v instanceof UniformStorageImage) { + type = v.type; + } + return [v.name, type]; + } + } + console.error('descriptor not found'); + return ['', Type.UNKNOWN]; +} + +// make DescriptorSetLayoutData from local descriptor set info +function makeLocalDescriptorSetLayoutData (lg: LayoutGraphData, + source: IDescriptorSetLayoutInfo): DescriptorSetLayoutData { + const data = new DescriptorSetLayoutData(); + for (const b of source.bindings) { + const [name, type] = getDescriptorNameAndType(source, b.binding); + const nameID = getOrCreateDescriptorID(lg, name); + const order = getDescriptorTypeOrder(b.descriptorType); + const block = new DescriptorBlockData(order, b.stageFlags, b.count); + block.offset = b.binding; + block.descriptors.push(new DescriptorData(nameID, type, b.count)); + data.descriptorBlocks.push(block); + const binding = data.bindingMap.get(nameID); + if (binding !== undefined) { + console.error(`duplicate descriptor name '${name}'`); + } + data.bindingMap.set(nameID, b.binding); + const v = source.layouts[name]; + if (v instanceof UniformBlock) { + data.uniformBlocks.set(nameID, v); + } + } + return data; +} + +// make descriptor sets for ShaderProgramData (PerBatch, PerInstance) function buildProgramData ( programName: string, srcShaderInfo: EffectAsset.IShaderInfo, lg: LayoutGraphData, phase: RenderPhaseData, programData: ShaderProgramData, + fixedLocal: boolean, ) { { const perBatch = makeDescriptorSetLayoutData(lg, UpdateFrequency.PER_BATCH, _setIndex[UpdateFrequency.PER_BATCH], srcShaderInfo.descriptors[UpdateFrequency.PER_BATCH]); - const setData = new DescriptorSetData(perBatch); + const setData = new DescriptorSetData(perBatch); initializeDescriptorSetLayoutInfo(setData.descriptorSetLayoutData, setData.descriptorSetLayoutInfo); programData.layout.descriptorSets.set(UpdateFrequency.PER_BATCH, setData); } - { + if (fixedLocal) { + const perInstance = makeLocalDescriptorSetLayoutData(lg, localDescriptorSetLayout); + const setData = new DescriptorSetData(perInstance); + initializeDescriptorSetLayoutInfo(setData.descriptorSetLayoutData, + setData.descriptorSetLayoutInfo); + if (localDescriptorSetLayout.bindings.length !== setData.descriptorSetLayoutInfo.bindings.length) { + console.error('local descriptor set layout inconsistent'); + } else { + for (let k = 0; k !== localDescriptorSetLayout.bindings.length; ++k) { + const b = localDescriptorSetLayout.bindings[k]; + const b2 = setData.descriptorSetLayoutInfo.bindings[k]; + if (b.binding !== b2.binding + || b.descriptorType !== b2.descriptorType + || b.count !== b2.count + || b.stageFlags !== b2.stageFlags) { + console.error('local descriptor set layout inconsistent'); + } + } + } + programData.layout.descriptorSets.set(UpdateFrequency.PER_INSTANCE, setData); + } else { const perInstance = makeDescriptorSetLayoutData(lg, UpdateFrequency.PER_INSTANCE, _setIndex[UpdateFrequency.PER_INSTANCE], srcShaderInfo.descriptors[UpdateFrequency.PER_INSTANCE]); - const setData = new DescriptorSetData(perInstance); + const setData = new DescriptorSetData(perInstance); initializeDescriptorSetLayoutInfo(setData.descriptorSetLayoutData, setData.descriptorSetLayoutInfo); programData.layout.descriptorSets.set(UpdateFrequency.PER_INSTANCE, setData); @@ -408,6 +578,7 @@ function buildProgramData ( phase.shaderPrograms.push(programData); } +// get or create PerProgram gfx.DescriptorSetLayout function getOrCreateProgramDescriptorSetLayout (device: Device, lg: LayoutGraphData, phaseID: number, programName: string, rate: UpdateFrequency): DescriptorSetLayout { @@ -430,6 +601,7 @@ function getOrCreateProgramDescriptorSetLayout (device: Device, return layout.descriptorSetLayout; } +// get PerProgram gfx.DescriptorSetLayout function getProgramDescriptorSetLayout (device: Device, lg: LayoutGraphData, phaseID: number, programName: string, rate: UpdateFrequency): DescriptorSetLayout | null { @@ -452,6 +624,7 @@ function getProgramDescriptorSetLayout (device: Device, return layout.descriptorSetLayout; } +// find shader program in LayoutGraphData function getEffectShader (lg: LayoutGraphData, effect: EffectAsset, pass: EffectAsset.IPassInfo): [number, number, EffectAsset.IShaderInfo | null, number] { const programName = pass.program; @@ -478,6 +651,7 @@ function getEffectShader (lg: LayoutGraphData, effect: EffectAsset, return [passID, phaseID, srcShaderInfo, shaderID]; } +// valid IShaderInfo is compatible function validateShaderInfo (srcShaderInfo: EffectAsset.IShaderInfo): number { // source shader info if (srcShaderInfo.descriptors === undefined) { @@ -487,15 +661,16 @@ function validateShaderInfo (srcShaderInfo: EffectAsset.IShaderInfo): number { return 0; } -export class WebProgramLibrary extends ProgramLibraryData implements ProgramLibrary { +export class WebProgramLibrary implements ProgramLibrary { constructor (lg: LayoutGraphData) { - super(lg); + this.layoutGraph = lg; for (const v of lg.vertices()) { if (lg.holds(LayoutGraphDataValue.RenderPhase, v)) { this.phases.set(v, new ProgramGroup()); } } } + // add effect to database addEffect (effect: EffectAsset): void { const lg = this.layoutGraph; for (const tech of effect.techniques) { @@ -526,12 +701,12 @@ export class WebProgramLibrary extends ProgramLibraryData implements ProgramLibr if (!this.mergeHighFrequency) { const phase = lg.getRenderPhase(phaseID); programData = new ShaderProgramData(); - buildProgramData(programName, srcShaderInfo, lg, phase, programData); + buildProgramData(programName, srcShaderInfo, lg, phase, programData, this.fixedLocal); } // shaderInfo and blockSizes const [shaderInfo, blockSizes] = makeShaderInfo(lg, passLayout, phaseLayout, - srcShaderInfo, programData); + srcShaderInfo, programData, this.fixedLocal); // overwrite programInfo overwriteProgramBlockInfo(shaderInfo, programInfo); @@ -551,6 +726,7 @@ export class WebProgramLibrary extends ProgramLibraryData implements ProgramLibr } } } + // precompile effect precompileEffect (device: Device, effect: EffectAsset): void { const lg = this.layoutGraph; for (const tech of effect.techniques) { @@ -575,6 +751,7 @@ export class WebProgramLibrary extends ProgramLibraryData implements ProgramLibr } } } + // get IProgramInfo getProgramInfo (phaseID: number, programName: string): IProgramInfo { assert(phaseID !== INVALID_ID); const group = this.phases.get(phaseID)!; @@ -582,13 +759,14 @@ export class WebProgramLibrary extends ProgramLibraryData implements ProgramLibr return info.programInfo; } + // get gfx.ShaderInfo getShaderInfo (phaseID: number, programName: string): ShaderInfo { assert(phaseID !== INVALID_ID); const group = this.phases.get(phaseID)!; const info = group.programInfos.get(programName)!; return info.shaderInfo; } - + // get shader key getKey (phaseID: number, programName: string, defines: MacroRecord): string { assert(phaseID !== INVALID_ID); // get phase @@ -605,7 +783,7 @@ export class WebProgramLibrary extends ProgramLibraryData implements ProgramLibr } return getVariantKey(info.programInfo, defines); } - + // get program variant getProgramVariant (device: Device, phaseID: number, name: string, defines: MacroRecord, key: string | null = null): ProgramProxy | null { assert(phaseID !== INVALID_ID); // get phase @@ -635,7 +813,7 @@ export class WebProgramLibrary extends ProgramLibraryData implements ProgramLibr // prepare variant const macroArray = prepareDefines(defines, programInfo.defines); const prefix = this.layoutGraph.constantMacros + programInfo.constantMacros - + macroArray.reduce((acc, cur) => `${acc}#define ${cur.name} ${cur.value}\n`, ''); + + macroArray.reduce((acc, cur) => `${acc}#define ${cur.name} ${cur.value}\n`, ''); let src = programInfo.glsl3; const deviceShaderVersion = getDeviceShaderVersion(device); @@ -662,6 +840,7 @@ export class WebProgramLibrary extends ProgramLibraryData implements ProgramLibr // create return new WebProgramProxy(host); } + // get material descriptor set layout getMaterialDescriptorSetLayout (device: Device, phaseID: number, programName: string): DescriptorSetLayout { if (this.mergeHighFrequency) { assert(phaseID !== INVALID_ID); @@ -671,6 +850,7 @@ export class WebProgramLibrary extends ProgramLibraryData implements ProgramLibr return getOrCreateProgramDescriptorSetLayout(device, this.layoutGraph, phaseID, programName, UpdateFrequency.PER_BATCH); } + // get local descriptor set layout getLocalDescriptorSetLayout (device: Device, phaseID: number, programName: string): DescriptorSetLayout { if (this.mergeHighFrequency) { assert(phaseID !== INVALID_ID); @@ -680,6 +860,7 @@ export class WebProgramLibrary extends ProgramLibraryData implements ProgramLibr return getOrCreateProgramDescriptorSetLayout(device, this.layoutGraph, phaseID, programName, UpdateFrequency.PER_INSTANCE); } + // get related uniform block sizes getBlockSizes (phaseID: number, programName: string): number[] { assert(phaseID !== INVALID_ID); const group = this.phases.get(phaseID); @@ -694,6 +875,7 @@ export class WebProgramLibrary extends ProgramLibraryData implements ProgramLibr } return info.blockSizes; } + // get property handle map getHandleMap (phaseID: number, programName: string): Record { assert(phaseID !== INVALID_ID); const group = this.phases.get(phaseID); @@ -708,6 +890,7 @@ export class WebProgramLibrary extends ProgramLibraryData implements ProgramLibr } return info.handleMap; } + // get shader pipeline layout getPipelineLayout (device: Device, phaseID: number, programName: string): PipelineLayout { if (this.mergeHighFrequency) { assert(phaseID !== INVALID_ID); @@ -752,4 +935,17 @@ export class WebProgramLibrary extends ProgramLibraryData implements ProgramLibr programData.pipelineLayout = device.createPipelineLayout(info); return programData.pipelineLayout; } + getProgramID (phaseID: number, programName: string): number { + return getProgramID(this.layoutGraph, phaseID, programName); + } + getDescriptorNameID (name: string): number { + return getDescriptorNameID(this.layoutGraph, name); + } + getDescriptorName (nameID: number): string { + return getDescriptorName(this.layoutGraph, nameID); + } + layoutGraph: LayoutGraphData; + readonly phases: Map = new Map(); + mergeHighFrequency = false; + fixedLocal = true; } diff --git a/cocos/rendering/custom/web-scene-visitor.ts b/cocos/rendering/custom/web-scene-visitor.ts index cd5c573d2b..81f3d187c1 100644 --- a/cocos/rendering/custom/web-scene-visitor.ts +++ b/cocos/rendering/custom/web-scene-visitor.ts @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/rendering/custom/web-scene.ts b/cocos/rendering/custom/web-scene.ts index 42d2e29d52..026c26e51d 100644 --- a/cocos/rendering/custom/web-scene.ts +++ b/cocos/rendering/custom/web-scene.ts @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -32,7 +31,6 @@ import { PipelineSceneData } from '../pipeline-scene-data'; import { SceneTask, SceneTransversal, SceneVisitor } from './pipeline'; import { TaskType } from './types'; import { PipelineUBO } from '../pipeline-ubo'; -import { LODModelsCachedUtils } from '../lod-models-utils'; export class RenderObject implements IRenderObject { public model: Model; @@ -110,16 +108,12 @@ export class WebSceneTask implements SceneTask { const models = scene!.models; const visibility = camera.visibility; - if (scene) { - LODModelsCachedUtils.updateCachedLODModels(scene, camera); - } - for (let i = 0; i < models.length; i++) { const model = models[i]; // filter model by view visibility if (model.enabled) { - if (LODModelsCachedUtils.isLODModelCulled(model)) { + if (scene && scene.isCulledByLod(camera, model)) { continue; } @@ -139,7 +133,6 @@ export class WebSceneTask implements SceneTask { } } } - LODModelsCachedUtils.clearCachedLODModels(); } public start (): void { diff --git a/cocos/rendering/custom/web-types.ts b/cocos/rendering/custom/web-types.ts index 3be03dcad5..8b2add1e25 100644 --- a/cocos/rendering/custom/web-types.ts +++ b/cocos/rendering/custom/web-types.ts @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -30,7 +29,6 @@ */ /* eslint-disable max-len */ import { Attribute, Shader, ShaderInfo } from '../../gfx'; -import { LayoutGraphData } from './layout-graph'; import { IProgramInfo } from '../../render-scene/core/program-lib'; export class ProgramInfo { @@ -58,19 +56,10 @@ export class ProgramHost { constructor (program: Shader) { this.program = program; } - readonly program: Shader; + /*refcount*/ program: Shader; } export class ProgramGroup { readonly programInfos: Map = new Map(); readonly programHosts: Map = new Map(); } - -export class ProgramLibraryData { - constructor (layoutGraph: LayoutGraphData) { - this.layoutGraph = layoutGraph; - } - /*pointer*/ layoutGraph: LayoutGraphData; - readonly phases: Map = new Map(); - mergeHighFrequency = false; -} diff --git a/cocos/rendering/debug-view.ts b/cocos/rendering/debug-view.ts index eb9a6de160..508f0a12f3 100644 --- a/cocos/rendering/debug-view.ts +++ b/cocos/rendering/debug-view.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { JSB } from 'internal:constants'; import { cclegacy } from '../core'; diff --git a/cocos/rendering/deferred/bloom-stage.ts b/cocos/rendering/deferred/bloom-stage.ts index a7dea9c9be..76c26acad4 100644 --- a/cocos/rendering/deferred/bloom-stage.ts +++ b/cocos/rendering/deferred/bloom-stage.ts @@ -1,18 +1,18 @@ /* Copyright (c) Huawei Technologies Co., Ltd. 2020-2021. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ /** * @category pipeline diff --git a/cocos/rendering/deferred/deferred-pipeline-scene-data.ts b/cocos/rendering/deferred/deferred-pipeline-scene-data.ts index fa5505fd3a..0c995b6b19 100644 --- a/cocos/rendering/deferred/deferred-pipeline-scene-data.ts +++ b/cocos/rendering/deferred/deferred-pipeline-scene-data.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Device } from '../../gfx'; import { MAX_BLOOM_FILTER_PASS_NUM } from '../render-pipeline'; diff --git a/cocos/rendering/deferred/deferred-pipeline.ts b/cocos/rendering/deferred/deferred-pipeline.ts index ddba0ccef8..6d16109f25 100644 --- a/cocos/rendering/deferred/deferred-pipeline.ts +++ b/cocos/rendering/deferred/deferred-pipeline.ts @@ -1,18 +1,18 @@ /* Copyright (c) Huawei Technologies Co., Ltd. 2020-2021. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ /** * @category pipeline diff --git a/cocos/rendering/deferred/gbuffer-stage.ts b/cocos/rendering/deferred/gbuffer-stage.ts index fd602058b4..c846d652f2 100644 --- a/cocos/rendering/deferred/gbuffer-stage.ts +++ b/cocos/rendering/deferred/gbuffer-stage.ts @@ -1,18 +1,18 @@ /* Copyright (c) Huawei Technologies Co., Ltd. 2020-2021. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ /** * @category pipeline diff --git a/cocos/rendering/deferred/lighting-stage.ts b/cocos/rendering/deferred/lighting-stage.ts index 10aa72c688..d6d0e2c8f8 100644 --- a/cocos/rendering/deferred/lighting-stage.ts +++ b/cocos/rendering/deferred/lighting-stage.ts @@ -1,18 +1,18 @@ /* Copyright (c) Huawei Technologies Co., Ltd. 2020-2021. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ /** * @category pipeline @@ -280,7 +280,7 @@ export class LightingStage extends RenderStage { cmdBuff.bindDescriptorSet(SetIndex.GLOBAL, pipeline.descriptorSet); const inputAssembler = pipeline.quadIAOffscreen; - let pso:PipelineState|null = null; + let pso: PipelineState|null = null; if (pass != null && shader != null && inputAssembler != null) { pso = PipelineStateManager.getOrCreatePipelineState(device, pass, shader, renderPass, inputAssembler); } diff --git a/cocos/rendering/deferred/main-flow.ts b/cocos/rendering/deferred/main-flow.ts index e91319e890..2ecdb08127 100644 --- a/cocos/rendering/deferred/main-flow.ts +++ b/cocos/rendering/deferred/main-flow.ts @@ -1,18 +1,18 @@ /* Copyright (c) Huawei Technologies Co., Ltd. 2020-2021. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ /** * @category pipeline.deferred diff --git a/cocos/rendering/deferred/postprocess-stage.ts b/cocos/rendering/deferred/postprocess-stage.ts index 8de2bafb64..db7e20adf7 100644 --- a/cocos/rendering/deferred/postprocess-stage.ts +++ b/cocos/rendering/deferred/postprocess-stage.ts @@ -1,18 +1,18 @@ /* Copyright (c) Huawei Technologies Co., Ltd. 2020-2021. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ /** * @category pipeline diff --git a/cocos/rendering/define.ts b/cocos/rendering/define.ts index 507c75d089..da085fad1a 100644 --- a/cocos/rendering/define.ts +++ b/cocos/rendering/define.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Pass } from '../render-scene/core/pass'; import { Model } from '../render-scene/scene/model'; @@ -755,4 +754,8 @@ export function supportsR32FloatTexture (device: Device) { && !(device.gfxAPI === API.WEBGL); // wegl 1 Single-channel float type is not supported under webgl1, so it is excluded } +export function isEnableEffect (): boolean { + return !!(cclegacy.rendering && cclegacy.rendering.enableEffectImport); +} + /* eslint-enable max-len */ diff --git a/cocos/rendering/deprecated.ts b/cocos/rendering/deprecated.ts index 84c70ddf87..02cc536064 100644 --- a/cocos/rendering/deprecated.ts +++ b/cocos/rendering/deprecated.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { markAsWarning } from '../core'; import { RenderPipeline } from './render-pipeline'; diff --git a/cocos/rendering/enum.ts b/cocos/rendering/enum.ts index 90442e9e22..f717efccab 100644 --- a/cocos/rendering/enum.ts +++ b/cocos/rendering/enum.ts @@ -1,18 +1,18 @@ /* Copyright (c) Huawei Technologies Co., Ltd. 2020-2021. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ export enum CommonStagePriority { BLOOM = 18, diff --git a/cocos/rendering/forward/forward-flow.ts b/cocos/rendering/forward/forward-flow.ts index 55a9f3ece6..a31191e40e 100644 --- a/cocos/rendering/forward/forward-flow.ts +++ b/cocos/rendering/forward/forward-flow.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass } from 'cc.decorator'; import { PIPELINE_FLOW_FORWARD } from '../define'; diff --git a/cocos/rendering/forward/forward-pipeline.ts b/cocos/rendering/forward/forward-pipeline.ts index 5da0e030e1..2491f05a75 100644 --- a/cocos/rendering/forward/forward-pipeline.ts +++ b/cocos/rendering/forward/forward-pipeline.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, displayOrder, type, serializable } from 'cc.decorator'; import { EDITOR } from 'internal:constants'; diff --git a/cocos/rendering/forward/forward-stage.ts b/cocos/rendering/forward/forward-stage.ts index 26c8ecfa78..00da442cc3 100644 --- a/cocos/rendering/forward/forward-stage.ts +++ b/cocos/rendering/forward/forward-stage.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, displayOrder, type, serializable } from 'cc.decorator'; import { SetIndex } from '../define'; diff --git a/cocos/rendering/geometry-renderer.jsb.ts b/cocos/rendering/geometry-renderer.jsb.ts index 3eb0d30f4b..fd6f290310 100644 --- a/cocos/rendering/geometry-renderer.jsb.ts +++ b/cocos/rendering/geometry-renderer.jsb.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/rendering/geometry-renderer.ts b/cocos/rendering/geometry-renderer.ts index 7fe5606941..e48ebe4016 100644 --- a/cocos/rendering/geometry-renderer.ts +++ b/cocos/rendering/geometry-renderer.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Color, Mat4, Vec3, Vec4, geometry, warnID, toRadian, cclegacy } from '../core'; import { SetIndex } from './define'; diff --git a/cocos/rendering/global-descriptor-set-manager.ts b/cocos/rendering/global-descriptor-set-manager.ts index 8cd034d5ab..61e2dc7b95 100644 --- a/cocos/rendering/global-descriptor-set-manager.ts +++ b/cocos/rendering/global-descriptor-set-manager.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,12 +20,14 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ +import { cclegacy } from '../core'; import { Device, BufferUsageBit, MemoryUsageBit, BufferInfo, Filter, Address, Sampler, DescriptorSet, DescriptorSetInfo, Buffer, Texture, DescriptorSetLayoutInfo, DescriptorSetLayout, SamplerInfo } from '../gfx'; import { Light } from '../render-scene/scene'; -import { UBOShadow, globalDescriptorSetLayout, PipelineGlobalBindings } from './define'; +import { getDescBindingFromName } from './custom/define'; +import { UBOShadow, globalDescriptorSetLayout, PipelineGlobalBindings, isEnableEffect } from './define'; const _samplerLinearInfo = new SamplerInfo( Filter.LINEAR, @@ -194,7 +195,8 @@ export class GlobalDSManager { UBOShadow.SIZE, UBOShadow.SIZE, )); - descriptorSet.bindBuffer(UBOShadow.BINDING, shadowUBO); + const binding = isEnableEffect() ? getDescBindingFromName('CCShadow') : UBOShadow.BINDING; + descriptorSet.bindBuffer(binding, shadowUBO); descriptorSet.update(); } diff --git a/cocos/rendering/index.jsb.ts b/cocos/rendering/index.jsb.ts index 4ef984fead..be1f12e5fe 100644 --- a/cocos/rendering/index.jsb.ts +++ b/cocos/rendering/index.jsb.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,13 +20,16 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ declare const nr: any; +declare const jsb: any; import { getPhaseID } from './pass-phase'; -import { js } from '../core'; +import { ccenum, CCString, js } from '../core'; import * as pipeline from './define'; +import { ccclass, serializable, editable, type, visible } from '../core/data/class-decorator'; +import { legacyCC } from '../core/global-exports'; export { pipeline }; nr.getPhaseID = getPhaseID; @@ -48,26 +50,28 @@ export const LightingStage = nr.LightingStage; export const PostProcessStage = nr.PostProcessStage; export const GbufferStage = nr.GbufferStage; export const BloomStage = nr.BloomStage; +export const ReflectionProbeFlow = nr.ReflectionProbeFlow; +export const ReflectionProbeStage = nr.ReflectionProbeStage; export { PipelineEventType } from './pipeline-event'; let getOrCreatePipelineState = nr.PipelineStateManager.getOrCreatePipelineState; -nr.PipelineStateManager.getOrCreatePipelineState = function(device, pass, shader, renderPass, ia) { +nr.PipelineStateManager.getOrCreatePipelineState = function (device, pass, shader, renderPass, ia) { return getOrCreatePipelineState(pass, shader, renderPass, ia); //cjh TODO: remove hacking. c++ API doesn't access device argument. }; // ForwardPipeline const forwardPipelineProto = ForwardPipeline.prototype; -forwardPipelineProto._ctor = function() { +forwardPipelineProto._ctor = function () { this._tag = 0; this._flows = []; }; forwardPipelineProto.init = function () { - for (let i = 0; i < this._flows.length; i++) { - this._flows[i].init(this); - } - const info = new nr.RenderPipelineInfo(this._tag, this._flows); - this.initialize(info); + for (let i = 0; i < this._flows.length; i++) { + this._flows[i].init(this); + } + const info = new nr.RenderPipelineInfo(this._tag, this._flows); + this.initialize(info); }; const oldForwardOnLoaded = forwardPipelineProto.onLoaded; @@ -82,13 +86,13 @@ forwardPipelineProto.onLoaded = function () { } const forwardFlowProto = ForwardFlow.prototype; -forwardFlowProto._ctor = function() { +forwardFlowProto._ctor = function () { this._name = 0; this._priority = 0; this._tag = 0; this._stages = []; } -forwardFlowProto.init = function(pipeline) { +forwardFlowProto.init = function (pipeline) { for (let i = 0; i < this._stages.length; i++) { this._stages[i].init(pipeline); } @@ -97,28 +101,43 @@ forwardFlowProto.init = function(pipeline) { } const shadowFlowProto = ShadowFlow.prototype; -shadowFlowProto._ctor = function() { - this._name = 0; - this._priority = 0; - this._tag = 0; - this._stages = []; +shadowFlowProto._ctor = function () { + this._name = 0; + this._priority = 0; + this._tag = 0; + this._stages = []; } shadowFlowProto.init = function (pipeline) { for (let i = 0; i < this._stages.length; i++) { - this._stages[i].init(pipeline); + this._stages[i].init(pipeline); + } + const info = new nr.RenderFlowInfo(this._name, this._priority, this._tag, this._stages); + this.initialize(info); +} + +const reflectionProbeFlowProto = ReflectionProbeFlow.prototype; +reflectionProbeFlowProto._ctor = function () { + this._name = 0; + this._priority = 0; + this._tag = 0; + this._stages = []; +} +reflectionProbeFlowProto.init = function (pipeline) { + for (let i = 0; i < this._stages.length; i++) { + this._stages[i].init(pipeline); } const info = new nr.RenderFlowInfo(this._name, this._priority, this._tag, this._stages); this.initialize(info); } const forwardStageProto = ForwardStage.prototype; -forwardStageProto._ctor = function() { +forwardStageProto._ctor = function () { this._name = 0; this._priority = 0; this._tag = 0; this.renderQueues = []; } -forwardStageProto.init = function(pipeline) { +forwardStageProto.init = function (pipeline) { const queues = []; for (let i = 0; i < this.renderQueues.length; i++) { // @ts-ignore @@ -129,34 +148,76 @@ forwardStageProto.init = function(pipeline) { } const shadowStageProto = ShadowStage.prototype; -shadowStageProto._ctor = function() { +shadowStageProto._ctor = function () { this._name = 0; this._priority = 0; this._tag = 0; } -shadowStageProto.init = function(pipeline) { + +const reflectionProbeStage = ReflectionProbeStage.prototype; +reflectionProbeStage._ctor = function () { + this._name = 0; + this._priority = 0; + this._tag = 0; + this.renderQueues = []; +} +reflectionProbeStage.init = function (pipeline) { + const queues = []; + for (let i = 0; i < this.renderQueues.length; i++) { + // @ts-ignore + queues.push(this.renderQueues[i].init()); + } + const info = new nr.RenderStageInfo(this._name, this._priority, this._tag, queues); + this.initialize(info); +} + + +export enum RenderQueueSortMode { + FRONT_TO_BACK, + BACK_TO_FRONT, +} +ccenum(RenderQueueSortMode); + +shadowStageProto.init = function (pipeline) { const info = new nr.RenderStageInfo(this._name, this._priority, this._tag, []); this.initialize(info); } export class RenderQueueDesc { - public isTransparent = false; - public sortMode = 0; - public stages = []; - constructor() { - this.isTransparent = false; - this.sortMode = 0; - this.stages = []; - } + /** + * @en Whether the render queue is a transparent queue + * @zh 当前队列是否是半透明队列 + */ + @serializable + @editable + public isTransparent = false; - public init() { - return new nr.RenderQueueDesc(this.isTransparent, this.sortMode, this.stages); - } + /** + * @en The sort mode of the render queue + * @zh 渲染队列的排序模式 + */ + @type(RenderQueueSortMode) + public sortMode: RenderQueueSortMode = RenderQueueSortMode.FRONT_TO_BACK; + + /** + * @en The stages using this queue + * @zh 使用当前渲染队列的阶段列表 + */ + @type([CCString]) + public stages: string[] = []; + + constructor() { + this.stages = []; + } + + public init() { + return new nr.RenderQueueDesc(this.isTransparent, this.sortMode, this.stages); + } } const deferredPipelineProto = DeferredPipeline.prototype; -deferredPipelineProto._ctor = function() { +deferredPipelineProto._ctor = function () { this._tag = 0; this._flows = []; this.renderTextures = []; @@ -176,28 +237,28 @@ deferredPipelineProto.onLoaded = function () { } const mainFlowProto = MainFlow.prototype; -mainFlowProto._ctor = function() { +mainFlowProto._ctor = function () { this._name = 0; this._priority = 0; this._tag = 0; this._stages = []; } -mainFlowProto.init = function(pipeline) { +mainFlowProto.init = function (pipeline) { for (let i = 0; i < this._stages.length; i++) { - this._stages[i].init(pipeline); + this._stages[i].init(pipeline); } let info = new nr.RenderFlowInfo(this._name, this._priority, this._tag, this._stages); this.initialize(info); } const gbufferStageProto = GbufferStage.prototype; -gbufferStageProto._ctor = function() { +gbufferStageProto._ctor = function () { this._name = 0; this._priority = 0; this._tag = 0; this.renderQueues = []; } -gbufferStageProto.init = function(pipeline) { +gbufferStageProto.init = function (pipeline) { const queues = []; for (let i = 0; i < this.renderQueues.length; i++) { // @ts-ignore @@ -209,14 +270,14 @@ gbufferStageProto.init = function(pipeline) { const lightingStageProto = LightingStage.prototype; -lightingStageProto._ctor = function() { +lightingStageProto._ctor = function () { this._name = 0; this._priority = 0; this._tag = 0; this.renderQueues = []; this._deferredMaterial = null; } -lightingStageProto.init = function(pipeline) { +lightingStageProto.init = function (pipeline) { const queues = []; for (let i = 0; i < this.renderQueues.length; i++) { // @ts-ignore @@ -228,14 +289,14 @@ lightingStageProto.init = function(pipeline) { } const bloomStageProto = BloomStage.prototype; -bloomStageProto._ctor = function() { +bloomStageProto._ctor = function () { this._name = 0; this._priority = 0; this._tag = 0; this.renderQueues = []; this._bloomMaterial = null; } -bloomStageProto.init = function(pipeline) { +bloomStageProto.init = function (pipeline) { const queues = []; for (let i = 0; i < this.renderQueues.length; i++) { // @ts-ignore @@ -247,14 +308,14 @@ bloomStageProto.init = function(pipeline) { } const postProcessStageProto = PostProcessStage.prototype; -postProcessStageProto._ctor = function() { +postProcessStageProto._ctor = function () { this._name = 0; this._priority = 0; this._tag = 0; this.renderQueues = []; this._postProcessMaterial = null; } -postProcessStageProto.init = function(pipeline) { +postProcessStageProto.init = function (pipeline) { const queues = []; for (let i = 0; i < this.renderQueues.length; i++) { // @ts-ignore @@ -266,15 +327,196 @@ postProcessStageProto.init = function(pipeline) { this.initialize(info); } -js.setClassName('DeferredPipeline', DeferredPipeline); -js.setClassName('MainFlow', MainFlow); -js.setClassName('GbufferStage', GbufferStage); -js.setClassName('LightingStage', LightingStage); -js.setClassName('BloomStage', BloomStage); -js.setClassName('PostProcessStage',PostProcessStage); -js.setClassName('ForwardPipeline', ForwardPipeline); -js.setClassName('ForwardFlow', ForwardFlow); -js.setClassName('ShadowFlow', ShadowFlow); -js.setClassName('ForwardStage', ForwardStage); -js.setClassName('ShadowStage', ShadowStage); -js.setClassName('RenderQueueDesc', RenderQueueDesc); + +legacyCC.RenderFlow = RenderFlow; +legacyCC.RenderStage = RenderStage; +legacyCC.RenderPipeline = RenderPipeline; + + +const RenderTexture: any = jsb.RenderTexture; +@ccclass('RenderTextureConfig') +class RenderTextureConfig { + @serializable + @editable + public name = ''; + @type(RenderTexture) + public texture: RenderTexture | null = null; +} + + +function proxyArrayAttribute(proto: any, attr: string) { + const underlyingAttr = `_udl_${attr}`; + const underlyingPropt = Object.getOwnPropertyDescriptor(proto, attr); + if (!underlyingPropt) { + console.error(`Attribute ${attr} is not defined in function ${proto.constructor.name}`); + return; + } + Object.defineProperty(proto, underlyingAttr, underlyingPropt!); + Object.defineProperty(proto, attr, { + configurable: true, + enumerable: true, + get: function () { + const self = this; + return new Proxy(this[underlyingAttr], { + get(target, prop, receiver) { + // console.log('GET: ' + String(prop) ); + return Reflect.get(target, prop, receiver); + }, + set(target, prop, receiver) { + // console.log('SET: ' + String(prop) ); + const ret = Reflect.set(target, prop, receiver); + self[underlyingAttr] = target; + return ret; + } + }); + }, + set: function (v) { + this[underlyingAttr] = v; + } + }); +} + +function declType(proto: any, attrType: any, attr: string, dft: () => any) { + (type(attrType) as any)(proto, attr, dft); +} + + +function declArrayPropetry(proto: any, attr: string) { + const udKey = `__arr_${attr}`; + Object.defineProperty(proto, attr, { + configurable: true, + enumerable: true, + get() { + if (!this[udKey]) { + this[udKey] = []; + } + return this[udKey]; + }, + set(v: any) { + if (!this[udKey]) { + this[udKey] = []; + } + this[udKey] = v; + } + }); +} +function declObjectPropetry(proto: any, attr: string, dftValue: any) { + const udKey = `__obj_${attr}`; + Object.defineProperty(proto, attr, { + configurable: true, + enumerable: true, + get() { + if (this[udKey] === undefined) { + this[udKey] = dftValue; + } + return this[udKey]; + }, + set(v: any) { + if (this[udKey] === undefined) { + this[udKey] = dftValue; + } + this[udKey] = v; + } + }); + +} + +declArrayPropetry(DeferredPipeline.prototype, 'renderTextures'); +declArrayPropetry(ForwardPipeline.prototype, 'renderTextures'); +declArrayPropetry(GbufferStage.prototype, 'renderQueues'); +declArrayPropetry(LightingStage.prototype, 'renderQueues'); +declArrayPropetry(PostProcessStage.prototype, 'renderQueues'); +declArrayPropetry(ForwardStage.prototype, 'renderQueues'); + +declObjectPropetry(LightingStage.prototype, '_deferredMaterial', null); +declObjectPropetry(BloomStage.prototype, '_bloomMaterial', null); +declObjectPropetry(PostProcessStage.prototype, '_postProcessMaterial', null); + +editable(RenderStage.prototype, '_name', () => ''); +editable(RenderStage.prototype, '_tag', () => 0); +editable(RenderStage.prototype, '_priority', () => 0); +serializable(RenderStage.prototype, '_tag', () => 0); +serializable(RenderStage.prototype, '_priority', () => 0); + +editable(RenderFlow.prototype, '_name', () => ''); +editable(RenderFlow.prototype, '_priority', () => 0); +editable(RenderFlow.prototype, '_tag', () => 0); +editable(RenderFlow.prototype, '_stages', () => []); +declType(RenderFlow.prototype, [RenderStage], '_stages', () => []); +proxyArrayAttribute(RenderFlow.prototype, '_stages'); +serializable(RenderFlow.prototype, '_name', () => ''); +serializable(RenderFlow.prototype, '_priority', () => 0); +serializable(RenderFlow.prototype, '_tag', () => 0); +serializable(RenderFlow.prototype, '_stages', () => []); + +editable(RenderPipeline.prototype, '_tag', () => 0); +editable(RenderPipeline.prototype, '_name', () => []); +serializable(RenderPipeline.prototype, '_tag', () => 0); +serializable(RenderPipeline.prototype, '_name', () => ''); + +editable(RenderPipeline.prototype, '_flows', () => []); +declType(RenderPipeline.prototype, [RenderFlow], '_flows', () => []); +proxyArrayAttribute(RenderPipeline.prototype, '_flows'); +serializable(RenderPipeline.prototype, '_flows', () => []); + +editable(DeferredPipeline.prototype, 'renderTextures', () => []); +declType(DeferredPipeline.prototype, [RenderTextureConfig], "renderTextures", () => []); +proxyArrayAttribute(DeferredPipeline.prototype, 'renderTextures'); +serializable(DeferredPipeline.prototype, 'renderTextures', () => []); + + +editable(ForwardPipeline.prototype, 'renderTextures', () => []); +declType(ForwardPipeline.prototype, [RenderTextureConfig], "renderTextures", () => []); +proxyArrayAttribute(ForwardPipeline.prototype, 'renderTextures'); +serializable(ForwardPipeline.prototype, 'renderTextures', () => []); + +declType(GbufferStage.prototype, [RenderQueueDesc], 'renderQueues', () => []); +proxyArrayAttribute(GbufferStage.prototype, 'renderQueues'); +serializable(GbufferStage.prototype, 'renderQueues', () => []); + +// serializable(RenderQueueDesc.prototype, 'isTransparent', () => false); +// editable(RenderQueueDesc.prototype, 'isTransparent', () => false); +// editable(RenderQueueDesc.prototype, 'sortMode', () => false); +// editable(RenderQueueDesc.prototype, 'stages', () => []); + +editable(LightingStage.prototype, '_deferredMaterial', () => null); +declType(LightingStage.prototype, jsb.Material, '_deferredMaterial', () => null); +declType(LightingStage.prototype, [RenderQueueDesc], 'renderQueues', () => []); +proxyArrayAttribute(LightingStage.prototype, 'renderQueues'); +serializable(LightingStage.prototype, '_deferredMaterial', () => null); +serializable(LightingStage.prototype, 'renderQueue', () => []); + +editable(BloomStage.prototype, '_bloomMaterial', () => null); +declType(BloomStage.prototype, jsb.Material, '_bloomMaterial', () => []); +serializable(BloomStage.prototype, '_bloomMaterial', () => null); + + +declType(PostProcessStage.prototype, [RenderQueueDesc], 'renderQueues', () => []); +proxyArrayAttribute(PostProcessStage.prototype, 'renderQueues'); +editable(PostProcessStage.prototype, '_postProcessMaterial', () => null); +declType(PostProcessStage.prototype, jsb.Material, '_postProcessMaterial', () => null); +serializable(PostProcessStage.prototype, 'renderQueues', () => []); +serializable(PostProcessStage.prototype, '_postProcessMaterial', () => null); + +declType(ForwardStage.prototype, [RenderQueueDesc], 'renderQueues', () => []); +proxyArrayAttribute(ForwardStage.prototype, 'renderQueues'); +serializable(ForwardStage.prototype, 'renderQueues', () => []); + +//-------------------- register types -------------------- +ccclass('cc.RenderPipeline')(RenderPipeline); +ccclass('RenderStage')(RenderStage) +ccclass('RenderFlow')(RenderFlow) +ccclass('ForwardPipeline')(ForwardPipeline); +ccclass('DeferredPipeline')(DeferredPipeline); +ccclass('MainFlow')(MainFlow); +ccclass('ForwardFlow')(ForwardFlow); +ccclass('ShadowFlow')(ShadowFlow); +ccclass('GbufferStage')(GbufferStage); +ccclass('LightingStage')(LightingStage); +ccclass('BloomStage')(BloomStage); +ccclass('PostProcessStage')(PostProcessStage); +ccclass('ForwardStage')(ForwardStage); +ccclass('ShadowStage')(ShadowStage); +ccclass('RenderQueueDesc')(RenderQueueDesc); +ccclass('ReflectionProbeFlow')(ReflectionProbeFlow); +ccclass('ReflectionProbeStage')(ReflectionProbeStage); \ No newline at end of file diff --git a/cocos/rendering/index.ts b/cocos/rendering/index.ts index 104cfaec0f..d261599fb2 100644 --- a/cocos/rendering/index.ts +++ b/cocos/rendering/index.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import './deprecated'; import * as pipeline from './define'; diff --git a/cocos/rendering/instanced-buffer.ts b/cocos/rendering/instanced-buffer.ts index 8a2628ca70..bb758e0730 100644 --- a/cocos/rendering/instanced-buffer.ts +++ b/cocos/rendering/instanced-buffer.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Pass } from '../render-scene'; import { IInstancedAttributeBlock, SubModel } from '../render-scene/scene'; diff --git a/cocos/rendering/lod-group-editor-utility.ts b/cocos/rendering/lod-group-editor-utility.ts index 1a889d0139..78817d85f1 100644 --- a/cocos/rendering/lod-group-editor-utility.ts +++ b/cocos/rendering/lod-group-editor-utility.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { LODGroup } from "../3d/lod/lodgroup-component"; import { Vec3, assertIsTrue } from '../core'; diff --git a/cocos/rendering/lod-models-utils.ts b/cocos/rendering/lod-models-utils.ts deleted file mode 100644 index 002965562b..0000000000 --- a/cocos/rendering/lod-models-utils.ts +++ /dev/null @@ -1,95 +0,0 @@ -/* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. - - https://www.cocos.com/ - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - */ - -import { Model } from '../render-scene/scene/model'; -import { Camera } from '../render-scene/scene/camera'; -import { RenderScene } from '../render-scene'; - -/** - * @engineInternal - * @zh LOD所有级别中存储的model集合;包含多个LODGroup的所有LOD - * @en The collection of models stored in all levels of LOD, All LODs containing multiple LODGroups. - */ -const modelsInAnyLODGroup = new Map(); -/** - * @engineInternal - * @zh 指定相机下,某一级LOD使用的model集合;可能包含多个LODGroup的某一级LOD - * @en Specify the model set used by a level of LOD under the camera, LOD of a level that may contain multiple LODGroups. - */ -const visibleModelsByAnyLODGroup = new Map(); - -export class LODModelsCachedUtils { - /** - * @en Insert visible LOD models into visibleModelsByAnyLODGroup, Add all models on lodGroups to modelsInAnyLODGroup - */ - public static updateCachedLODModels (scene: RenderScene, camera: Camera) { - // eslint-disable-next-line no-lone-blocks - for (const lodGroup of scene.lodGroups) { - if (lodGroup.enabled) { - const LODLevels = lodGroup.getLockedLODLevels(); - const count = LODLevels.length; - //count == 0 will return to standard LOD processing. - if (count > 0) { - for (let index = 0; index < lodGroup.lodCount; index++) { - const lod = lodGroup.lodDataArray[index]; - for (const model of lod.models) { - for (let i = 0; i < count; i++) { - // The LOD level to use. - if (LODLevels[i] === index) { - if (model && model.node && model.node.active) { - visibleModelsByAnyLODGroup.set(model, true); - break; - } - } - } - modelsInAnyLODGroup.set(model, true); - } - } - continue; - } - - const visIndex = lodGroup.getVisibleLODLevel(camera); - for (let index = 0; index < lodGroup.lodCount; index++) { - const lod = lodGroup.lodDataArray[index]; - for (const model of lod.models) { - if (visIndex === index && model && model.node && model.node.active) { - visibleModelsByAnyLODGroup.set(model, true); - } - modelsInAnyLODGroup.set(model, true); - } - } - } - } - } - - public static isLODModelCulled (model: Model) { - return modelsInAnyLODGroup.get(model) && !visibleModelsByAnyLODGroup.get(model); - } - - public static clearCachedLODModels () { - modelsInAnyLODGroup.clear(); - visibleModelsByAnyLODGroup.clear(); - } -} diff --git a/cocos/rendering/pass-phase.jsb.ts b/cocos/rendering/pass-phase.jsb.ts index 5851b81253..8af6dcacaf 100644 --- a/cocos/rendering/pass-phase.jsb.ts +++ b/cocos/rendering/pass-phase.jsb.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ declare const nr: any; diff --git a/cocos/rendering/pass-phase.ts b/cocos/rendering/pass-phase.ts index 3ff6f54157..628eac3f23 100644 --- a/cocos/rendering/pass-phase.ts +++ b/cocos/rendering/pass-phase.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ export const getPhaseID = (() => { const phases: Map = new Map(); diff --git a/cocos/rendering/pipeline-event.ts b/cocos/rendering/pipeline-event.ts index 77c257cb4c..ff2af4d8c1 100644 --- a/cocos/rendering/pipeline-event.ts +++ b/cocos/rendering/pipeline-event.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { EventTarget } from '../core'; export enum PipelineEventType { diff --git a/cocos/rendering/pipeline-funcs.ts b/cocos/rendering/pipeline-funcs.ts index 741fdbf138..b212288ded 100644 --- a/cocos/rendering/pipeline-funcs.ts +++ b/cocos/rendering/pipeline-funcs.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { EDITOR } from 'internal:constants'; import { CommandBuffer, Device, Rect, RenderPass, Viewport } from '../gfx'; diff --git a/cocos/rendering/pipeline-scene-data.ts b/cocos/rendering/pipeline-scene-data.ts index 23a42eca08..13ac04e3a0 100644 --- a/cocos/rendering/pipeline-scene-data.ts +++ b/cocos/rendering/pipeline-scene-data.ts @@ -1,15 +1,16 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -17,7 +18,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Fog } from '../render-scene/scene/fog'; import { Ambient } from '../render-scene/scene/ambient'; diff --git a/cocos/rendering/pipeline-serialization.ts b/cocos/rendering/pipeline-serialization.ts index 2d80f27d42..9fcd89a4d0 100644 --- a/cocos/rendering/pipeline-serialization.ts +++ b/cocos/rendering/pipeline-serialization.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, type, serializable, editable } from 'cc.decorator'; import { CCString, ccenum } from '../core'; diff --git a/cocos/rendering/pipeline-state-manager.ts b/cocos/rendering/pipeline-state-manager.ts index 56c26ac03d..afd645fbfd 100644 --- a/cocos/rendering/pipeline-state-manager.ts +++ b/cocos/rendering/pipeline-state-manager.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Shader, RenderPass, InputAssembler, Device, PipelineState, InputState, PipelineStateInfo } from '../gfx'; import { Pass } from '../render-scene/core/pass'; diff --git a/cocos/rendering/pipeline-ubo.ts b/cocos/rendering/pipeline-ubo.ts index 96cf1d4908..ad08c2c47b 100644 --- a/cocos/rendering/pipeline-ubo.ts +++ b/cocos/rendering/pipeline-ubo.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,10 +20,10 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { UBOGlobal, UBOShadow, UBOCamera, UNIFORM_SHADOWMAP_BINDING, - supportsR32FloatTexture, UNIFORM_SPOT_SHADOW_MAP_TEXTURE_BINDING, UBOCSM } from './define'; + supportsR32FloatTexture, UNIFORM_SPOT_SHADOW_MAP_TEXTURE_BINDING, UBOCSM, isEnableEffect } from './define'; import { Device, BufferInfo, BufferUsageBit, MemoryUsageBit, DescriptorSet } from '../gfx'; import { Camera } from '../render-scene/scene/camera'; import { Mat4, Vec3, Vec4, Color, toRadian, cclegacy } from '../core'; @@ -36,6 +35,8 @@ import { RenderWindow } from '../render-scene/core/render-window'; import { builtinResMgr } from '../asset/asset-manager/builtin-res-mgr'; import { Texture2D } from '../asset/assets'; import { DebugViewCompositeType } from './debug-view'; +import { legacyCC } from '../core/global-exports'; +import { getDescBindingFromName } from './custom/define'; const _matShadowView = new Mat4(); const _matShadowProj = new Mat4(); @@ -161,6 +162,7 @@ export class PipelineUBO { cv[UBOCamera.CAMERA_POS_OFFSET + 3] = this.getCombineSignY(); cv[UBOCamera.SURFACE_TRANSFORM_OFFSET] = camera.surfaceTransform; + cv[UBOCamera.SURFACE_TRANSFORM_OFFSET + 1] = camera.cameraUsage; cv[UBOCamera.SURFACE_TRANSFORM_OFFSET + 2] = Math.cos(toRadian(sceneData.skybox.getRotationAngle())); cv[UBOCamera.SURFACE_TRANSFORM_OFFSET + 3] = Math.sin(toRadian(sceneData.skybox.getRotationAngle())); @@ -432,6 +434,9 @@ export class PipelineUBO { this._device = device; this._pipeline = pipeline; const ds = this._pipeline.descriptorSet; + if (isEnableEffect()) { + return; + } this._initCombineSignY(); const globalUBO = device.createBuffer(new BufferInfo( @@ -455,14 +460,16 @@ export class PipelineUBO { UBOShadow.SIZE, UBOShadow.SIZE, )); - ds.bindBuffer(UBOShadow.BINDING, shadowUBO); + const binding = isEnableEffect() ? getDescBindingFromName('CCShadow') : UBOShadow.BINDING; + ds.bindBuffer(binding, shadowUBO); const csmUBO = device.createBuffer(new BufferInfo( BufferUsageBit.UNIFORM | BufferUsageBit.TRANSFER_DST, MemoryUsageBit.HOST | MemoryUsageBit.DEVICE, UBOCSM.SIZE, UBOCSM.SIZE, )); - ds.bindBuffer(UBOCSM.BINDING, csmUBO); + const csmBinding = isEnableEffect() ? getDescBindingFromName('CCCSM') : UBOCSM.BINDING; + ds.bindBuffer(csmBinding, csmUBO); } /** @@ -506,8 +513,10 @@ export class PipelineUBO { } PipelineUBO.updateShadowUBOView(this._pipeline, this._shadowUBO, this._csmUBO, camera); ds.update(); - cmdBuffer[0].updateBuffer(ds.getBuffer(UBOShadow.BINDING), this._shadowUBO); - cmdBuffer[0].updateBuffer(ds.getBuffer(UBOCSM.BINDING), this._csmUBO); + const binding = isEnableEffect() ? getDescBindingFromName('CCShadow') : UBOShadow.BINDING; + cmdBuffer[0].updateBuffer(ds.getBuffer(binding), this._shadowUBO); + const csmBinding = isEnableEffect() ? getDescBindingFromName('CCCSM') : UBOCSM.BINDING; + cmdBuffer[0].updateBuffer(ds.getBuffer(csmBinding), this._csmUBO); } public updateShadowUBOLight (globalDS: DescriptorSet, light: Light, level = 0) { @@ -515,7 +524,8 @@ export class PipelineUBO { globalDS.bindTexture(UNIFORM_SHADOWMAP_BINDING, builtinResMgr.get('default-texture').getGFXTexture()!); globalDS.bindTexture(UNIFORM_SPOT_SHADOW_MAP_TEXTURE_BINDING, builtinResMgr.get('default-texture').getGFXTexture()!); globalDS.update(); - this._pipeline.commandBuffers[0].updateBuffer(globalDS.getBuffer(UBOShadow.BINDING), this._shadowUBO); + const binding = isEnableEffect() ? getDescBindingFromName('CCShadow') : UBOShadow.BINDING; + this._pipeline.commandBuffers[0].updateBuffer(globalDS.getBuffer(binding), this._shadowUBO); } public updateShadowUBORange (offset: number, data: Mat4 | Color) { diff --git a/cocos/rendering/planar-shadow-queue.ts b/cocos/rendering/planar-shadow-queue.ts index d985b9ba3a..110b0991c2 100644 --- a/cocos/rendering/planar-shadow-queue.ts +++ b/cocos/rendering/planar-shadow-queue.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { geometry } from '../core'; import { SetIndex } from './define'; @@ -33,13 +32,12 @@ import { ShadowType } from '../render-scene/scene/shadows'; import { Layers } from '../scene-graph/layers'; import { PipelineRuntime } from './custom/pipeline'; import { BatchingSchemes } from '../render-scene/core/pass'; -import { LODModelsCachedUtils } from './lod-models-utils'; const _ab = new geometry.AABB(); export class PlanarShadowQueue { private _pendingSubModels: SubModel[] = []; - private _castModels:Model[] = []; + private _castModels: Model[] = []; private _instancedQueue = new RenderInstancedQueue(); private _pipeline: PipelineRuntime; @@ -60,16 +58,14 @@ export class PlanarShadowQueue { const shadowVisible = (camera.visibility & Layers.BitMask.DEFAULT) !== 0; if (!scene.mainLight || !shadowVisible) { return; } - LODModelsCachedUtils.updateCachedLODModels(scene, camera); const models = scene.models; for (let i = 0; i < models.length; i++) { const model = models[i]; - if (LODModelsCachedUtils.isLODModelCulled(model)) { + if (scene.isCulledByLod(camera, model)) { continue; } if (model.enabled && model.node && model.castShadow) { this._castModels.push(model); } } - LODModelsCachedUtils.clearCachedLODModels(); const instancedBuffer = shadows.instancingMaterial.passes[0].getInstancedBuffer(); this._instancedQueue.queue.add(instancedBuffer); diff --git a/cocos/rendering/reflection-probe-manager.ts b/cocos/rendering/reflection-probe-manager.ts index 5f746b17a7..53ce9a1695 100644 --- a/cocos/rendering/reflection-probe-manager.ts +++ b/cocos/rendering/reflection-probe-manager.ts @@ -1,19 +1,18 @@ /* eslint-disable max-len */ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -22,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { EDITOR } from 'internal:constants'; import { MeshRenderer, ReflectionProbeType } from '../3d/framework/mesh-renderer'; @@ -34,7 +33,7 @@ import { ProbeType, ReflectionProbe } from '../render-scene/scene/reflection-pro import { Layers } from '../scene-graph/layers'; const REFLECTION_PROBE_DEFAULT_MASK = Layers.makeMaskExclude([Layers.BitMask.UI_2D, Layers.BitMask.UI_3D, Layers.BitMask.GIZMOS, Layers.BitMask.EDITOR, - Layers.BitMask.SCENE_GIZMO, Layers.BitMask.PROFILER]); + Layers.BitMask.SCENE_GIZMO, Layers.BitMask.PROFILER, Layers.Enum.IGNORE_RAYCAST]); export class ReflectionProbeManager { public static probeManager: ReflectionProbeManager; private _probes: ReflectionProbe[] = []; @@ -55,9 +54,7 @@ export class ReflectionProbeManager { private _usePlanarModels = new Map(); constructor () { - if (EDITOR) { - director.on(Director.EVENT_BEFORE_UPDATE, this.onUpdateProbes, this); - } + director.on(Director.EVENT_BEFORE_UPDATE, this.onUpdateProbes, this); } /** @@ -296,7 +293,21 @@ export class ReflectionProbeManager { if (!probe || !probe.previewSphere) return; const meshRender = probe.previewSphere.getComponent(MeshRenderer); if (meshRender) { - meshRender.updateProbeCubemap(probe.cubemap); + meshRender.updateProbeCubemap(probe.cubemap, !probe.cubemap); + } + } + + /** + * @en Update the preview plane of the Reflection Probe planar mode. + * @zh 更新反射探针预览平面 + */ + public updatePreviewPlane (probe: ReflectionProbe) { + if (!probe || !probe.previewPlane) return; + const meshRender = probe.previewPlane.getComponent(MeshRenderer); + if (meshRender) { + if (probe.realtimePlanarTexture) { + this.updatePlanarMap(probe, probe.realtimePlanarTexture.getGFXTexture()); + } } } diff --git a/cocos/rendering/reflection-probe/reflection-probe-flow.ts b/cocos/rendering/reflection-probe/reflection-probe-flow.ts index 47c9d3a983..490195b4b8 100644 --- a/cocos/rendering/reflection-probe/reflection-probe-flow.ts +++ b/cocos/rendering/reflection-probe/reflection-probe-flow.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { EDITOR } from 'internal:constants'; import { ccclass } from 'cc.decorator'; import { IRenderFlowInfo, RenderFlow } from '../render-flow'; @@ -79,8 +78,10 @@ export class ReflectionProbeFlow extends RenderFlow { for (let i = 0; i < this._stages.length; i++) { const probeStage = this._stages[i] as ReflectionProbeStage; if (probe.probeType === ProbeType.PLANAR) { + cclegacy.internal.reflectionProbeManager.updatePlanarMap(probe, null); probeStage.setUsageInfo(probe, probe.realtimePlanarTexture!.window!.framebuffer); probeStage.render(camera); + cclegacy.internal.reflectionProbeManager.updatePlanarMap(probe, probe.realtimePlanarTexture!.getGFXTexture()); } else { for (let faceIdx = 0; faceIdx < 6; faceIdx++) { //update camera dirction diff --git a/cocos/rendering/reflection-probe/reflection-probe-stage.ts b/cocos/rendering/reflection-probe/reflection-probe-stage.ts index d9776ae553..bd7be75715 100644 --- a/cocos/rendering/reflection-probe/reflection-probe-stage.ts +++ b/cocos/rendering/reflection-probe/reflection-probe-stage.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass } from 'cc.decorator'; import { Color, Rect, Framebuffer, ClearFlagBit } from '../../gfx'; @@ -99,7 +98,7 @@ export class ReflectionProbeStage extends RenderStage { public render (camera: Camera) { const pipeline = this._pipeline; const cmdBuff = pipeline.commandBuffers[0]; - this._probeRenderQueue.gatherRenderObjects(this._probe!, camera.scene!, cmdBuff); + this._probeRenderQueue.gatherRenderObjects(this._probe!, camera, cmdBuff); pipeline.pipelineUBO.updateCameraUBO(this._probe!.camera); this._renderArea.x = 0; diff --git a/cocos/rendering/render-additive-light-queue.ts b/cocos/rendering/render-additive-light-queue.ts index b84dfec9a8..84254af6c1 100644 --- a/cocos/rendering/render-additive-light-queue.ts +++ b/cocos/rendering/render-additive-light-queue.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,12 +20,12 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { BatchingSchemes, Pass } from '../render-scene/core/pass'; import { Model } from '../render-scene/scene/model'; import { PipelineStateManager } from './pipeline-state-manager'; -import { Vec3, nextPow2, Mat4, Color, Pool, geometry } from '../core'; +import { Vec3, nextPow2, Mat4, Color, Pool, geometry, cclegacy } from '../core'; import { Device, RenderPass, Buffer, BufferUsageBit, MemoryUsageBit, BufferInfo, BufferViewInfo, CommandBuffer } from '../gfx'; import { RenderBatchedQueue } from './render-batched-queue'; @@ -37,11 +36,12 @@ import { SubModel } from '../render-scene/scene/submodel'; import { getPhaseID } from './pass-phase'; import { Light, LightType } from '../render-scene/scene/light'; import { SetIndex, UBOForwardLight, UBOShadow, UNIFORM_SHADOWMAP_BINDING, - UNIFORM_SPOT_SHADOW_MAP_TEXTURE_BINDING, supportsR32FloatTexture } from './define'; + UNIFORM_SPOT_SHADOW_MAP_TEXTURE_BINDING, supportsR32FloatTexture, isEnableEffect } from './define'; import { Camera, ShadowType } from '../render-scene/scene'; import { GlobalDSManager } from './global-descriptor-set-manager'; import { PipelineUBO } from './pipeline-ubo'; import { PipelineRuntime } from './custom/pipeline'; +import { getDescBindingFromName } from './custom/define'; interface IAdditiveLightPass { subModel: SubModel; @@ -67,16 +67,22 @@ function cullSpotLight (light: SpotLight, model: Model) { && (!geometry.intersect.aabbWithAABB(model.worldBounds, light.aabb) || !geometry.intersect.aabbFrustum(model.worldBounds, light.frustum))); } -const _phaseID = getPhaseID('forward-add'); +const phaseName = 'forward-add'; +let _phaseID = getPhaseID(phaseName); const _lightPassIndices: number[] = []; function getLightPassIndices (subModels: SubModel[], lightPassIndices: number[]) { + const r = cclegacy.rendering; + if (isEnableEffect()) { + _phaseID = r.getPhaseID(r.getPassID('default'), phaseName); + } lightPassIndices.length = 0; let hasValidLightPass = false; for (let j = 0; j < subModels.length; j++) { const { passes } = subModels[j]; let lightPassIndex = -1; for (let k = 0; k < passes.length; k++) { - if (passes[k].phase === _phaseID) { + if (((!r || !r.enableEffectImport) && passes[k].phase === _phaseID) + || (isEnableEffect() && passes[k].phaseID === _phaseID)) { lightPassIndex = k; hasValidLightPass = true; break; @@ -155,7 +161,8 @@ export class RenderAdditiveLightQueue { const key = keys[i]; const descriptorSet = descriptorSetMap.get(key)!; if (descriptorSet) { - descriptorSet.getBuffer(UBOShadow.BINDING).destroy(); + const binding = isEnableEffect() ? getDescBindingFromName('CCShadow') : UBOShadow.BINDING; + descriptorSet.getBuffer(binding).destroy(); descriptorSet.getTexture(UNIFORM_SHADOWMAP_BINDING).destroy(); descriptorSet.getTexture(UNIFORM_SPOT_SHADOW_MAP_TEXTURE_BINDING).destroy(); descriptorSet.destroy(); @@ -195,6 +202,7 @@ export class RenderAdditiveLightQueue { if (isTransparent) { continue; } + const binding = isEnableEffect() ? getDescBindingFromName('CCForwardLight') : UBOForwardLight.BINDING; subModel.descriptorSet.bindBuffer(UBOForwardLight.BINDING, this._firstLightBufferView); subModel.descriptorSet.update(); @@ -255,7 +263,7 @@ export class RenderAdditiveLightQueue { } // light culling - protected _lightCulling (model:Model, validPunctualLights: Light[]) { + protected _lightCulling (model: Model, validPunctualLights: Light[]) { let isCulled = false; for (let l = 0; l < validPunctualLights.length; l++) { const light = validPunctualLights[l]; @@ -332,8 +340,8 @@ export class RenderAdditiveLightQueue { const light = validPunctualLights[i]; const descriptorSet = globalDSManager.getOrCreateDescriptorSet(light); if (!descriptorSet) { continue; } - let matShadowProj : Mat4; - let matShadowInvProj : Mat4; + let matShadowProj: Mat4; + let matShadowInvProj: Mat4; switch (light.type) { case LightType.SPHERE: { // planar PROJ @@ -422,8 +430,8 @@ export class RenderAdditiveLightQueue { default: } descriptorSet.update(); - - cmdBuff.updateBuffer(descriptorSet.getBuffer(UBOShadow.BINDING)!, this._shadowUBO); + const binding = isEnableEffect() ? getDescBindingFromName('CCShadow') : UBOShadow.BINDING; + cmdBuff.updateBuffer(descriptorSet.getBuffer(binding)!, this._shadowUBO); } } diff --git a/cocos/rendering/render-batched-queue.ts b/cocos/rendering/render-batched-queue.ts index 3393077192..96aa9e671b 100644 --- a/cocos/rendering/render-batched-queue.ts +++ b/cocos/rendering/render-batched-queue.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { BatchedBuffer } from './batched-buffer'; import { PipelineStateManager } from './pipeline-state-manager'; diff --git a/cocos/rendering/render-flow.ts b/cocos/rendering/render-flow.ts index 7e8e86ef15..84b5004815 100644 --- a/cocos/rendering/render-flow.ts +++ b/cocos/rendering/render-flow.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, displayOrder, serializable, type } from 'cc.decorator'; import { RenderStage } from './render-stage'; diff --git a/cocos/rendering/render-instanced-queue.ts b/cocos/rendering/render-instanced-queue.ts index e376ad2c1a..9be4e7e753 100644 --- a/cocos/rendering/render-instanced-queue.ts +++ b/cocos/rendering/render-instanced-queue.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { InstancedBuffer } from './instanced-buffer'; import { Device, RenderPass, PipelineState, CommandBuffer, DescriptorSet } from '../gfx'; diff --git a/cocos/rendering/render-pipeline.jsb.ts b/cocos/rendering/render-pipeline.jsb.ts index 879ad9c365..ef548dafca 100644 --- a/cocos/rendering/render-pipeline.jsb.ts +++ b/cocos/rendering/render-pipeline.jsb.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { cclegacy } from '../core'; export const RenderPipeline = nr.RenderPipeline; diff --git a/cocos/rendering/render-pipeline.ts b/cocos/rendering/render-pipeline.ts index 3e997be582..8cef2c0c9f 100644 --- a/cocos/rendering/render-pipeline.ts +++ b/cocos/rendering/render-pipeline.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, displayOrder, serializable, type } from 'cc.decorator'; import { systemInfo } from 'pal/system-info'; diff --git a/cocos/rendering/render-queue.ts b/cocos/rendering/render-queue.ts index 3a829ff599..41002f03b5 100644 --- a/cocos/rendering/render-queue.ts +++ b/cocos/rendering/render-queue.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { RecyclePool, CachedArray } from '../core'; import { IRenderObject, IRenderPass, IRenderQueueDesc, SetIndex } from './define'; diff --git a/cocos/rendering/render-reflection-probe-queue.ts b/cocos/rendering/render-reflection-probe-queue.ts index 129beac93b..ada6fe9c95 100644 --- a/cocos/rendering/render-reflection-probe-queue.ts +++ b/cocos/rendering/render-reflection-probe-queue.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,21 +20,21 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { SubModel } from '../render-scene/scene/submodel'; -import { SetIndex } from './define'; +import { isEnableEffect, SetIndex } from './define'; import { Device, RenderPass, Shader, CommandBuffer } from '../gfx'; import { getPhaseID } from './pass-phase'; import { PipelineStateManager } from './pipeline-state-manager'; import { Pass, BatchingSchemes } from '../render-scene/core/pass'; import { Model } from '../render-scene/scene/model'; -import { ProbeType, ReflectionProbe, SKYBOX_FLAG } from '../render-scene/scene'; +import { Camera, ProbeType, ReflectionProbe, SKYBOX_FLAG } from '../render-scene/scene'; import { PipelineRuntime } from './custom/pipeline'; import { IMacroPatch, RenderScene } from '../render-scene'; import { RenderInstancedQueue } from './render-instanced-queue'; import { RenderBatchedQueue } from './render-batched-queue'; -import { geometry } from '../core'; +import { cclegacy, geometry } from '../core'; import { Layers } from '../scene-graph/layers'; // eslint-disable-next-line max-len @@ -43,12 +42,14 @@ const REFLECTION_PROBE_DEFAULT_MASK = Layers.makeMaskExclude([Layers.BitMask.UI_ Layers.BitMask.SCENE_GIZMO, Layers.BitMask.PROFILER]); const CC_USE_RGBE_OUTPUT = 'CC_USE_RGBE_OUTPUT'; -const _phaseID = getPhaseID('default'); -const _phaseReflectMapID = getPhaseID('reflect-map'); +let _phaseID = getPhaseID('default'); +let _phaseReflectMapID = getPhaseID('reflect-map'); function getPassIndex (subModel: SubModel): number { const passes = subModel.passes; + const r = cclegacy.rendering; + if (isEnableEffect()) _phaseID = r.getPhaseID(r.getPassID('default'), 'default'); for (let k = 0; k < passes.length; k++) { - if (passes[k].phase === _phaseID) { + if (((!r || !r.enableEffectImport) && passes[k].phase === _phaseID) || (isEnableEffect() && passes[k].phaseID === _phaseID)) { return k; } } @@ -57,8 +58,11 @@ function getPassIndex (subModel: SubModel): number { function getReflectMapPassIndex (subModel: SubModel): number { const passes = subModel.passes; + const r = cclegacy.rendering; + if (isEnableEffect()) _phaseReflectMapID = r.getPhaseID(r.getPassID('default'), 'reflect-map'); for (let k = 0; k < passes.length; k++) { - if (passes[k].phase === _phaseReflectMapID) { + if (((!r || !r.enableEffectImport) && passes[k].phase === _phaseReflectMapID) + || (isEnableEffect() && passes[k].phaseID === _phaseReflectMapID)) { return k; } } @@ -74,7 +78,7 @@ export class RenderReflectionProbeQueue { private _subModelsArray: SubModel[] = []; private _passArray: Pass[] = []; private _shaderArray: Shader[] = []; - private _rgbeSubModelsArray:SubModel[]=[] + private _rgbeSubModelsArray: SubModel[]=[] private _instancedQueue: RenderInstancedQueue; private _batchedQueue: RenderBatchedQueue; @@ -83,8 +87,9 @@ export class RenderReflectionProbeQueue { this._instancedQueue = new RenderInstancedQueue(); this._batchedQueue = new RenderBatchedQueue(); } - public gatherRenderObjects (probe: ReflectionProbe, scene:RenderScene, cmdBuff: CommandBuffer) { + public gatherRenderObjects (probe: ReflectionProbe, camera: Camera, cmdBuff: CommandBuffer) { this.clear(); + const scene = camera.scene!; const sceneData = this._pipeline.pipelineSceneData; const skybox = sceneData.skybox; @@ -97,6 +102,9 @@ export class RenderReflectionProbeQueue { for (let i = 0; i < models.length; i++) { const model = models[i]; + if (scene.isCulledByLod(camera, model)) { + continue; + } // filter model by view visibility if (model.enabled && model.node && model.worldBounds && model.bakeToReflectionProbe) { if (probe.probeType === ProbeType.CUBE) { diff --git a/cocos/rendering/render-shadow-map-batched-queue.ts b/cocos/rendering/render-shadow-map-batched-queue.ts index d245f468be..36f2eb25a9 100644 --- a/cocos/rendering/render-shadow-map-batched-queue.ts +++ b/cocos/rendering/render-shadow-map-batched-queue.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,10 +20,10 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { SubModel } from '../render-scene/scene/submodel'; -import { SetIndex } from './define'; +import { isEnableEffect, SetIndex } from './define'; import { Device, RenderPass, Shader, CommandBuffer } from '../gfx'; import { getPhaseID } from './pass-phase'; import { PipelineStateManager } from './pipeline-state-manager'; @@ -33,17 +32,20 @@ import { RenderInstancedQueue } from './render-instanced-queue'; import { RenderBatchedQueue } from './render-batched-queue'; import { ShadowType } from '../render-scene/scene/shadows'; import { Light, LightType } from '../render-scene/scene/light'; -import { geometry } from '../core'; +import { cclegacy, geometry } from '../core'; import { Model } from '../render-scene/scene/model'; import { Camera, DirectionalLight, SpotLight } from '../render-scene/scene'; import { shadowCulling } from './scene-culling'; import { PipelineRuntime } from './custom/pipeline'; -const _phaseID = getPhaseID('shadow-caster'); -function getShadowPassIndex (subModel: SubModel) : number { +let _phaseID = getPhaseID('shadow-caster'); +function getShadowPassIndex (subModel: SubModel): number { const passes = subModel.passes; + const r = cclegacy.rendering; + if (isEnableEffect()) _phaseID = r.getPhaseID(r.getPassID('default'), 'shadow-caster'); for (let k = 0; k < passes.length; k++) { - if (passes[k].phase === _phaseID) { + if (((!r || !r.enableEffectImport) && passes[k].phase === _phaseID) + || (isEnableEffect() && passes[k].phaseID === _phaseID)) { return k; } } diff --git a/cocos/rendering/render-stage.jsb.ts b/cocos/rendering/render-stage.jsb.ts new file mode 100644 index 0000000000..937994e78a --- /dev/null +++ b/cocos/rendering/render-stage.jsb.ts @@ -0,0 +1,30 @@ +/* + Copyright (c) 2018-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + +declare var nr:any; + +import { legacyCC } from '../core/global-exports'; +export const RenderStage = nr.RenderStage; +// Do not delete, for the class detection of editor +legacyCC.RenderStage = RenderStage; diff --git a/cocos/rendering/render-stage.ts b/cocos/rendering/render-stage.ts index 6e4bd5227e..843afb2780 100644 --- a/cocos/rendering/render-stage.ts +++ b/cocos/rendering/render-stage.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, displayOrder, serializable } from 'cc.decorator'; import { cclegacy } from '../core'; diff --git a/cocos/rendering/scene-culling.ts b/cocos/rendering/scene-culling.ts index eca56a62f0..31eeaf9792 100644 --- a/cocos/rendering/scene-culling.ts +++ b/cocos/rendering/scene-culling.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { EDITOR } from 'internal:constants'; import { Model } from '../render-scene/scene/model'; import { Camera, CameraUsage, SKYBOX_FLAG } from '../render-scene/scene/camera'; @@ -31,7 +30,6 @@ import { IRenderObject, UBOShadow } from './define'; import { ShadowType, CSMOptimizationMode } from '../render-scene/scene/shadows'; import { PipelineSceneData } from './pipeline-scene-data'; import { ShadowLayerVolume } from './shadow/csm-layers'; -import { LODModelsCachedUtils } from './lod-models-utils'; const _tempVec3 = new Vec3(); const _sphere = geometry.Sphere.create(0, 0, 0, 1); @@ -160,7 +158,7 @@ export function sceneCulling (pipeline: RenderPipeline, camera: Camera) { function enqueueRenderObject (model: Model) { // filter model by view visibility if (model.enabled) { - if (LODModelsCachedUtils.isLODModelCulled(model)) { + if (scene.isCulledByLod(camera, model)) { return; } @@ -181,9 +179,7 @@ export function sceneCulling (pipeline: RenderPipeline, camera: Camera) { } } - LODModelsCachedUtils.updateCachedLODModels(scene, camera); for (let i = 0; i < models.length; i++) { enqueueRenderObject(models[i]); } - LODModelsCachedUtils.clearCachedLODModels(); } diff --git a/cocos/rendering/shadow/csm-layers.ts b/cocos/rendering/shadow/csm-layers.ts index b47bfc75c3..e5bab7a50e 100644 --- a/cocos/rendering/shadow/csm-layers.ts +++ b/cocos/rendering/shadow/csm-layers.ts @@ -1,15 +1,16 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -17,7 +18,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { DirectionalLight, Camera, Shadows, CSMLevel, CSMOptimizationMode } from '../../render-scene/scene'; import { Mat4, Vec3, Vec2, Vec4 } from '../../core/math'; diff --git a/cocos/rendering/shadow/shadow-flow.ts b/cocos/rendering/shadow/shadow-flow.ts index bf8cfcc8a2..8347ce105f 100644 --- a/cocos/rendering/shadow/shadow-flow.ts +++ b/cocos/rendering/shadow/shadow-flow.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass } from 'cc.decorator'; import { PIPELINE_FLOW_SHADOW, supportsR32FloatTexture, UBOCamera, UBOCSM, UBOGlobal, UBOShadow } from '../define'; diff --git a/cocos/rendering/shadow/shadow-stage.ts b/cocos/rendering/shadow/shadow-stage.ts index 9e3b1151f8..4f8d8b38bf 100644 --- a/cocos/rendering/shadow/shadow-stage.ts +++ b/cocos/rendering/shadow/shadow-stage.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass } from 'cc.decorator'; import { Color, Rect, Framebuffer, DescriptorSet } from '../../gfx'; diff --git a/cocos/rendering/ui-phase.ts b/cocos/rendering/ui-phase.ts index 83a7d172f6..50a827ecdf 100644 --- a/cocos/rendering/ui-phase.ts +++ b/cocos/rendering/ui-phase.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2018-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2018-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -25,14 +24,19 @@ import { RenderPass } from '../gfx'; import { PipelineStateManager } from './pipeline-state-manager'; -import { SetIndex } from './define'; +import { isEnableEffect, SetIndex } from './define'; import { Camera } from '../render-scene/scene/camera'; import { RenderPipeline } from './render-pipeline'; import { getPhaseID } from './pass-phase'; +import { cclegacy } from '../core'; export class UIPhase { private _phaseID = getPhaseID('default'); private declare _pipeline: RenderPipeline; + constructor () { + const r = cclegacy.rendering; + if (isEnableEffect()) this._phaseID = r.getPhaseID(r.getPassID('default'), 'default'); + } public activate (pipeline: RenderPipeline) { this._pipeline = pipeline; diff --git a/cocos/root.jsb.ts b/cocos/root.jsb.ts index 909b95fffd..956ff61c14 100644 --- a/cocos/root.jsb.ts +++ b/cocos/root.jsb.ts @@ -1,6 +1,31 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { legacyCC } from './core/global-exports'; import { DataPoolManager } from './3d/skeletal-animation/data-pool-manager'; import { Device, deviceManager } from './gfx'; +import { EDITOR } from "internal:constants"; import { DebugView } from './rendering/debug-view'; import { buildDeferredLayout, buildForwardLayout } from './rendering/custom/effect'; import { settings, Settings, warnID, Pool, macro } from './core'; @@ -59,7 +84,7 @@ Object.defineProperty(rootProto, 'dataPoolManager', { Object.defineProperty(rootProto, 'pipelineEvent', { configurable: true, enumerable: true, - get () { + get() { return this._pipelineEvent; } }); @@ -67,19 +92,19 @@ Object.defineProperty(rootProto, 'pipelineEvent', { Object.defineProperty(rootProto, 'debugView', { configurable: true, enumerable: true, - get () { + get() { return this._debugView; } }); class DummyPipelineEvent { - on (type: any, callback: any, target?: any, once?: boolean) {} - once (type: any, callback: any, target?: any) {} - off (type: any, callback?: any, target?: any) {} - emit (type: any, arg0?: any, arg1?: any, arg2?: any, arg3?: any, arg4?: any) {} - targetOff (typeOrTarget: any) {} - removeAll (typeOrTarget: any) {} - hasEventListener (type: any, callback?: any, target?: any): boolean { return false; } + on(type: any, callback: any, target?: any, once?: boolean) { } + once(type: any, callback: any, target?: any) { } + off(type: any, callback?: any, target?: any) { } + emit(type: any, arg0?: any, arg1?: any, arg2?: any, arg3?: any, arg4?: any) { } + targetOff(typeOrTarget: any) { } + removeAll(typeOrTarget: any) { } + hasEventListener(type: any, callback?: any, target?: any): boolean { return false; } } rootProto._ctor = function (device: Device) { @@ -161,17 +186,17 @@ rootProto.recycleLight = function (l) { p.free(l); if (l.scene) { switch (l.type) { - case LightType.DIRECTIONAL: - l.scene.removeDirectionalLight(l); - break; - case LightType.SPHERE: - l.scene.removeSphereLight(l); - break; - case LightType.SPOT: - l.scene.removeSpotLight(l); - break; - default: - break; + case LightType.DIRECTIONAL: + l.scene.removeDirectionalLight(l); + break; + case LightType.SPHERE: + l.scene.removeSphereLight(l); + break; + case LightType.SPOT: + l.scene.removeSpotLight(l); + break; + default: + break; } } } @@ -189,6 +214,13 @@ rootProto._onDirectorAfterRender = function () { legacyCC.director.emit(legacyCC.Director.EVENT_AFTER_RENDER); }; +rootProto._onDirectorPipelineChanged = function () { + const scene = legacyCC.director.getScene(); + if (scene) { + scene._activate(); + } +} + const oldFrameMove = rootProto.frameMove; rootProto.frameMove = function (deltaTime: number) { oldFrameMove.call(this, deltaTime, legacyCC.director.getTotalFrames()); @@ -215,7 +247,6 @@ rootProto.setRenderPipeline = function (pipeline) { } ppl = oldSetPipeline.call(this, pipeline); } - this._createBatcher2D(); return ppl; } diff --git a/cocos/root.ts b/cocos/root.ts index 27dc88d0b3..4dac0346b1 100644 --- a/cocos/root.ts +++ b/cocos/root.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Pool, cclegacy, warnID, settings, Settings, macro } from './core'; import { RenderPipeline, createDefaultPipeline, DeferredPipeline } from './rendering'; diff --git a/cocos/scene-graph/component-event-handler.schema.ts b/cocos/scene-graph/component-event-handler.schema.ts index 887558c4ef..d814a849ca 100644 --- a/cocos/scene-graph/component-event-handler.schema.ts +++ b/cocos/scene-graph/component-event-handler.schema.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { CCClass } from '../core/data'; import { Node } from './node'; import { EventHandler } from './component-event-handler'; diff --git a/cocos/scene-graph/component-event-handler.ts b/cocos/scene-graph/component-event-handler.ts index 8051d3dc95..40e7883174 100644 --- a/cocos/scene-graph/component-event-handler.ts +++ b/cocos/scene-graph/component-event-handler.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/scene-graph/component-scheduler.ts b/cocos/scene-graph/component-scheduler.ts index 20a199dd67..e8b855502f 100644 --- a/cocos/scene-graph/component-scheduler.ts +++ b/cocos/scene-graph/component-scheduler.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/scene-graph/component.ts b/cocos/scene-graph/component.ts index 89fddd0f4e..654bc9461a 100644 --- a/cocos/scene-graph/component.ts +++ b/cocos/scene-graph/component.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/scene-graph/deprecated-3.7.0.ts b/cocos/scene-graph/deprecated-3.7.0.ts index 5428f5b173..a62b7a8afc 100644 --- a/cocos/scene-graph/deprecated-3.7.0.ts +++ b/cocos/scene-graph/deprecated-3.7.0.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { deprecateModuleExportedName } from '../core/utils/x-deprecated'; deprecateModuleExportedName({ diff --git a/cocos/scene-graph/deprecated.ts b/cocos/scene-graph/deprecated.ts index d5acb2f5ca..c55908ab55 100644 --- a/cocos/scene-graph/deprecated.ts +++ b/cocos/scene-graph/deprecated.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { EDITOR } from 'internal:constants'; import { ccclass } from 'cc.decorator'; diff --git a/cocos/scene-graph/find.ts b/cocos/scene-graph/find.ts index 8d83c3cf86..c8b93b9300 100644 --- a/cocos/scene-graph/find.ts +++ b/cocos/scene-graph/find.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/scene-graph/index.jsb.ts b/cocos/scene-graph/index.jsb.ts index f0c044c1e8..c4bcdc8a88 100644 --- a/cocos/scene-graph/index.jsb.ts +++ b/cocos/scene-graph/index.jsb.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import './component-event-handler.schema'; import './node-event-processor'; diff --git a/cocos/scene-graph/index.ts b/cocos/scene-graph/index.ts index f2123a2384..477e5464ce 100644 --- a/cocos/scene-graph/index.ts +++ b/cocos/scene-graph/index.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/scene-graph/layers.jsb.ts b/cocos/scene-graph/layers.jsb.ts index d769520386..3aff979942 100644 --- a/cocos/scene-graph/layers.jsb.ts +++ b/cocos/scene-graph/layers.jsb.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { legacyCC } from '../core/global-exports'; diff --git a/cocos/scene-graph/layers.ts b/cocos/scene-graph/layers.ts index 9e8c94c449..5e95be58cd 100644 --- a/cocos/scene-graph/layers.ts +++ b/cocos/scene-graph/layers.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/scene-graph/node-activator.ts b/cocos/scene-graph/node-activator.ts index 715d765add..3af611b86c 100644 --- a/cocos/scene-graph/node-activator.ts +++ b/cocos/scene-graph/node-activator.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/scene-graph/node-dev.ts b/cocos/scene-graph/node-dev.ts index 8b3d9979a5..11818e4ed7 100644 --- a/cocos/scene-graph/node-dev.ts +++ b/cocos/scene-graph/node-dev.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -31,6 +30,7 @@ import { error, errorID, getError } from '../core/platform/debug'; import { Component } from './component'; const Destroying = CCObject.Flags.Destroying; +const IS_PREVIEW = !!legacyCC.GAME_VIEW; export function nodePolyfill (Node) { if (EDITOR || TEST) { @@ -45,7 +45,34 @@ export function nodePolyfill (Node) { } return true; }; - + /** + * @method _getDependComponent + * @param {Component} depended + * @return {Component[]} + */ + Node.prototype._getDependComponent = function (depended) { + const dependant: Component[] = []; + for (let i = 0; i < this._components.length; i++) { + const comp = this._components[i]; + if (comp !== depended && comp.isValid && !legacyCC.Object._willDestroy(comp)) { + const reqComps = comp.constructor._requireComponent; + if (reqComps) { + if (Array.isArray(reqComps)) { + for (let i = 0; i < reqComps.length; i++) { + if (depended instanceof reqComps[i]) { + dependant.push(comp); + } + } + } else if (depended instanceof reqComps) { + dependant.push(comp); + } + } + } + } + return dependant; + }; + } + if ((EDITOR && !IS_PREVIEW) || TEST) { /** * This api should only used by undo system * @method _addComponentAt @@ -87,7 +114,7 @@ export function nodePolyfill (Node) { comp.node = this; this._components.splice(index, 0, comp); - if (EDITOR && EditorExtends.Node && EditorExtends.Component) { + if (EDITOR && !IS_PREVIEW && EditorExtends.Node && EditorExtends.Component) { const node = EditorExtends.Node.getNode(this._id); if (node) { EditorExtends.Component.add(comp._id, comp); @@ -99,33 +126,6 @@ export function nodePolyfill (Node) { return undefined; }; - /** - * @method _getDependComponent - * @param {Component} depended - * @return {Component[]} - */ - Node.prototype._getDependComponent = function (depended) { - const dependant: Component[] = []; - for (let i = 0; i < this._components.length; i++) { - const comp = this._components[i]; - if (comp !== depended && comp.isValid && !legacyCC.Object._willDestroy(comp)) { - const reqComps = comp.constructor._requireComponent; - if (reqComps) { - if (Array.isArray(reqComps)) { - for (let i = 0; i < reqComps.length; i++) { - if (depended instanceof reqComps[i]) { - dependant.push(comp); - } - } - } else if (depended instanceof reqComps) { - dependant.push(comp); - } - } - } - } - return dependant; - }; - Node.prototype.onRestore = function () { // check activity state const shouldActiveNow = this._active && !!(this._parent && this._parent._activeInHierarchy); @@ -147,7 +147,7 @@ export function nodePolyfill (Node) { Node.prototype._onRestoreBase = Node.prototype.onRestore; } - if (EDITOR || TEST) { + if ((EDITOR && !IS_PREVIEW) || TEST) { Node.prototype._registerIfAttached = function (register) { if (!this._id) { console.warn(`Node(${this && this.name}}) is invalid or its data is corrupted.`); @@ -191,8 +191,9 @@ export function nodePolyfill (Node) { // promote debug info js.get(Node.prototype, ' INFO ', function () { let path = ''; - // @ts-expect-error - let node = this; + // @ts-expect-error: type of this + // eslint-disable-next-line @typescript-eslint/no-this-alias + let node: any = this; while (node && !(node instanceof legacyCC.Scene)) { if (path) { path = `${node.name}/${path}`; @@ -201,7 +202,7 @@ export function nodePolyfill (Node) { } node = node._parent; } - // @ts-expect-error + // @ts-expect-error: type of this return `${this.name}, path: ${path}`; }); } diff --git a/cocos/scene-graph/node-enum.ts b/cocos/scene-graph/node-enum.ts index 258faa6767..086dcec26f 100644 --- a/cocos/scene-graph/node-enum.ts +++ b/cocos/scene-graph/node-enum.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/scene-graph/node-event-processor.ts b/cocos/scene-graph/node-event-processor.ts index 08ea516b12..d4e7c03b1f 100644 --- a/cocos/scene-graph/node-event-processor.ts +++ b/cocos/scene-graph/node-event-processor.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/scene-graph/node-event.ts b/cocos/scene-graph/node-event.ts index d1bd3201ee..8db3316d83 100644 --- a/cocos/scene-graph/node-event.ts +++ b/cocos/scene-graph/node-event.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -159,16 +158,6 @@ export enum NodeEventType { */ TRANSFORM_CHANGED = 'transform-changed', - /** - * @en - * The event type for position, rotation, scale changed of ancestor nodes including current node. - * Use the type parameter as `Node.TransformBit` to check which part is changed - * - * @zh - * 祖先或当前节点改变位置、旋转或缩放事件。如果具体需要判断是哪一个事件,可通过判断回调的第一个参数类型是 `Node.TransformBit` 中的哪一个来获取 - */ - ANCESTOR_TRANSFORM_CHANGED = 'ancestor-transform-changed', - /** * @en * The event occur when mobility changed. diff --git a/cocos/scene-graph/node-ui-properties.ts b/cocos/scene-graph/node-ui-properties.ts index 8914e216c8..0b4ff97199 100644 --- a/cocos/scene-graph/node-ui-properties.ts +++ b/cocos/scene-graph/node-ui-properties.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/scene-graph/node.jsb.ts b/cocos/scene-graph/node.jsb.ts index e6c8111402..2e7b532e8e 100644 --- a/cocos/scene-graph/node.jsb.ts +++ b/cocos/scene-graph/node.jsb.ts @@ -1,15 +1,16 @@ /* - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -181,9 +182,9 @@ nodeProto.addComponent = function (typeOrClassName) { throw TypeError(getError(3810)); } - // if (EDITOR && (constructor as typeof constructor & { _disallowMultiple?: unknown })._disallowMultiple) { - // this._checkMultipleComp!(constructor); - // } + if (EDITOR && (constructor as typeof constructor & { _disallowMultiple?: unknown })._disallowMultiple) { + this._checkMultipleComp!(constructor); + } // check requirement @@ -234,13 +235,12 @@ nodeProto.removeComponent = function (component) { }; const REGISTERED_EVENT_MASK_TRANSFORM_CHANGED = (1 << 0); -const REGISTERED_EVENT_MASK_ANCESTOR_TRANSFORM_CHANGED = (1 << 1); -const REGISTERED_EVENT_MASK_PARENT_CHANGED = (1 << 2); -const REGISTERED_EVENT_MASK_MOBILITY_CHANGED = (1 << 3); -const REGISTERED_EVENT_MASK_LAYER_CHANGED = (1 << 4); -const REGISTERED_EVENT_MASK_CHILD_REMOVED_CHANGED = (1 << 5); -const REGISTERED_EVENT_MASK_CHILD_ADDED_CHANGED = (1 << 6); -const REGISTERED_EVENT_MASK_SIBLING_ORDER_CHANGED_CHANGED = (1 << 7); +const REGISTERED_EVENT_MASK_PARENT_CHANGED = (1 << 1); +const REGISTERED_EVENT_MASK_MOBILITY_CHANGED = (1 << 2); +const REGISTERED_EVENT_MASK_LAYER_CHANGED = (1 << 3); +const REGISTERED_EVENT_MASK_CHILD_REMOVED_CHANGED = (1 << 4); +const REGISTERED_EVENT_MASK_CHILD_ADDED_CHANGED = (1 << 5); +const REGISTERED_EVENT_MASK_SIBLING_ORDER_CHANGED_CHANGED = (1 << 6); nodeProto.on = function (type, callback, target, useCapture: any = false) { switch (type) { @@ -251,13 +251,6 @@ nodeProto.on = function (type, callback, target, useCapture: any = false) { this._registeredNodeEventTypeMask |= REGISTERED_EVENT_MASK_TRANSFORM_CHANGED; } break; - case NodeEventType.ANCESTOR_TRANSFORM_CHANGED: - this._eventMask |= TRANSFORM_ON; - if (!(this._registeredNodeEventTypeMask & REGISTERED_EVENT_MASK_ANCESTOR_TRANSFORM_CHANGED)) { - this._registerOnAncestorTransformChanged(); - this._registeredNodeEventTypeMask |= REGISTERED_EVENT_MASK_ANCESTOR_TRANSFORM_CHANGED; - } - break; case NodeEventType.PARENT_CHANGED: if (!(this._registeredNodeEventTypeMask & REGISTERED_EVENT_MASK_PARENT_CHANGED)) { this._registerOnParentChanged(); @@ -310,9 +303,6 @@ nodeProto.off = function (type: string, callback?, target?, useCapture = false) case NodeEventType.TRANSFORM_CHANGED: this._eventMask &= ~TRANSFORM_ON; break; - case NodeEventType.ANCESTOR_TRANSFORM_CHANGED: - this._eventMask &= ~TRANSFORM_ON; - break; default: break; } @@ -403,10 +393,6 @@ nodeProto._onTransformChanged = function (transformType) { this.emit(NodeEventType.TRANSFORM_CHANGED, transformType); }; -nodeProto._onAncestorTransformChanged = function (transformType) { - this.emit(NodeEventType.ANCESTOR_TRANSFORM_CHANGED, transformType); -}; - nodeProto._onParentChanged = function (oldParent) { this.emit(NodeEventType.PARENT_CHANGED, oldParent); }; diff --git a/cocos/scene-graph/node.ts b/cocos/scene-graph/node.ts index f1bd99156c..84e7ac6ca1 100644 --- a/cocos/scene-graph/node.ts +++ b/cocos/scene-graph/node.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -1938,9 +1937,7 @@ export class Node extends CCObject implements ISchedulable, CustomSerializable { hasChangedFlags = cur.hasChangedFlags; if (cur.isValid && (cur._dirtyFlags & hasChangedFlags & dirtyBit) !== dirtyBit) { cur._dirtyFlags |= dirtyBit; - cur.hasChangedFlags = hasChangedFlags | dirtyBit; - cur.emit(NodeEventType.ANCESTOR_TRANSFORM_CHANGED, dirtyBit); children = cur._children; l = children.length; diff --git a/cocos/scene-graph/prefab/index.ts b/cocos/scene-graph/prefab/index.ts index b74bc1dbb3..7865f2c341 100644 --- a/cocos/scene-graph/prefab/index.ts +++ b/cocos/scene-graph/prefab/index.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + // To keep compatibility: // - prefab-info.ts is exported in utils.ts // - utils.ts is exported in prefab.ts diff --git a/cocos/scene-graph/prefab/prefab-info.ts b/cocos/scene-graph/prefab/prefab-info.ts index a85660800b..e1e994e29f 100644 --- a/cocos/scene-graph/prefab/prefab-info.ts +++ b/cocos/scene-graph/prefab/prefab-info.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { ccclass, serializable, editable, type } from 'cc.decorator'; import { EDITOR } from 'internal:constants'; import { cclegacy } from '../../core'; diff --git a/cocos/scene-graph/prefab/prefab.ts b/cocos/scene-graph/prefab/prefab.ts index 4a1e3a68b9..d9da0f7a0d 100644 --- a/cocos/scene-graph/prefab/prefab.ts +++ b/cocos/scene-graph/prefab/prefab.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -25,7 +24,7 @@ */ import { ccclass, serializable, editable } from 'cc.decorator'; -import { SUPPORT_JIT, ALIPAY, RUNTIME_BASED } from 'internal:constants'; +import { SUPPORT_JIT, ALIPAY, RUNTIME_BASED, JSB } from 'internal:constants'; import { compile } from '../../serialization/instantiate-jit'; import { js } from '../../core'; import { Enum } from '../../core/value-types'; @@ -33,6 +32,7 @@ import { Asset } from '../../asset/assets/asset'; import { Node } from '../node'; import { legacyCC } from '../../core/global-exports'; import { warnID } from '../../core/platform/debug'; +import { updateChildrenForDeserialize } from '../../core/utils/jsb-utils'; import * as utils from './utils'; /** @@ -200,6 +200,9 @@ export class Prefab extends Asset { const rootNode = this.data as Node; utils.expandNestedPrefabInstanceNode(rootNode); utils.applyTargetOverrides(rootNode); + if (JSB) { + updateChildrenForDeserialize(rootNode); + } } } diff --git a/cocos/scene-graph/prefab/utils.ts b/cocos/scene-graph/prefab/utils.ts index bd0c82bdf8..a35f84f9bb 100644 --- a/cocos/scene-graph/prefab/utils.ts +++ b/cocos/scene-graph/prefab/utils.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/scene-graph/scene-globals.jsb.ts b/cocos/scene-graph/scene-globals.jsb.ts index 3f6e0f40f9..7b1e6475cc 100644 --- a/cocos/scene-graph/scene-globals.jsb.ts +++ b/cocos/scene-graph/scene-globals.jsb.ts @@ -1,15 +1,16 @@ /* - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -531,7 +532,7 @@ serializable(LightProbeInfoProto, '_showConvex', () => false); serializable(LightProbeInfoProto, '_data', () => null); const lightProbeGIScaleDescriptor = Object.getOwnPropertyDescriptor(LightProbeInfoProto, 'giScale'); -range([0.01, 100, 1])(LightProbeInfoProto, 'giScale', lightProbeGIScaleDescriptor) +range([0, 100, 1])(LightProbeInfoProto, 'giScale', lightProbeGIScaleDescriptor) type(CCFloat)(LightProbeInfoProto, 'giScale', lightProbeGIScaleDescriptor) displayName('GIScale')(LightProbeInfoProto, 'giScale', lightProbeGIScaleDescriptor) tooltip('i18n:light_probe.giScale')(LightProbeInfoProto, 'giScale', lightProbeGIScaleDescriptor); diff --git a/cocos/scene-graph/scene-globals.ts b/cocos/scene-graph/scene-globals.ts index b553b17d08..3aea69c424 100644 --- a/cocos/scene-graph/scene-globals.ts +++ b/cocos/scene-graph/scene-globals.ts @@ -1,16 +1,17 @@ /* eslint-disable func-names */ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -1072,7 +1073,7 @@ export class LightProbeInfo { * @zh GI乘数 */ @editable - @range([0.01, 100, 1]) + @range([0, 100, 1]) @type(CCFloat) @tooltip('i18n:light_probe.giScale') @displayName('GIScale') diff --git a/cocos/scene-graph/scene.jsb.ts b/cocos/scene-graph/scene.jsb.ts index ebbf27b5d4..e4a379132d 100644 --- a/cocos/scene-graph/scene.jsb.ts +++ b/cocos/scene-graph/scene.jsb.ts @@ -1,15 +1,16 @@ /* - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -123,7 +124,7 @@ sceneProto._activate = function (active: boolean) { } legacyCC.director._nodeActivator.activateNode(this, active); // The test environment does not currently support the renderer - if (!TEST) { + if (!TEST || EDITOR) { this._globals.activate(this); if (this._renderScene) { this._renderScene.activate(); diff --git a/cocos/scene-graph/scene.ts b/cocos/scene-graph/scene.ts index 5882ae9205..5777471035 100644 --- a/cocos/scene-graph/scene.ts +++ b/cocos/scene-graph/scene.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/scene-graph/utils.jsb.ts b/cocos/scene-graph/utils.jsb.ts index ffe993522c..3181272e12 100644 --- a/cocos/scene-graph/utils.jsb.ts +++ b/cocos/scene-graph/utils.jsb.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { IMat4Like, Mat4 } from '../core/math'; diff --git a/cocos/serialization/ccon.ts b/cocos/serialization/ccon.ts index 3ca5d840ef..a284dc0a39 100644 --- a/cocos/serialization/ccon.ts +++ b/cocos/serialization/ccon.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { getError, cclegacy } from '../core'; const VERSION = 1; diff --git a/cocos/serialization/deserialize-dynamic-empty.ts b/cocos/serialization/deserialize-dynamic-empty.ts index 9e91fbedb0..2b82628f85 100644 --- a/cocos/serialization/deserialize-dynamic-empty.ts +++ b/cocos/serialization/deserialize-dynamic-empty.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + export function deserializeDynamic() { throw new Error(`Should not called`); diff --git a/cocos/serialization/deserialize-dynamic.ts b/cocos/serialization/deserialize-dynamic.ts index 227ac1e87e..54026a7b23 100644 --- a/cocos/serialization/deserialize-dynamic.ts +++ b/cocos/serialization/deserialize-dynamic.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/serialization/deserialize-symbols.ts b/cocos/serialization/deserialize-symbols.ts index 6e91702b70..82329e14e6 100644 --- a/cocos/serialization/deserialize-symbols.ts +++ b/cocos/serialization/deserialize-symbols.ts @@ -1 +1,25 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + export const onAfterDeserializedTag = Symbol('[[OnAfterDeserialized]]'); diff --git a/cocos/serialization/deserialize.ts b/cocos/serialization/deserialize.ts index 6e4a2fcf7d..17416b775c 100644 --- a/cocos/serialization/deserialize.ts +++ b/cocos/serialization/deserialize.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/serialization/index.ts b/cocos/serialization/index.ts index 99aa572c19..5f62357032 100644 --- a/cocos/serialization/index.ts +++ b/cocos/serialization/index.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2018-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2018-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/serialization/instantiate-jit.ts b/cocos/serialization/instantiate-jit.ts index 116884547f..32956f79f5 100644 --- a/cocos/serialization/instantiate-jit.ts +++ b/cocos/serialization/instantiate-jit.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/serialization/instantiate.ts b/cocos/serialization/instantiate.ts index cf7b9ddb10..77d01f42a5 100644 --- a/cocos/serialization/instantiate.ts +++ b/cocos/serialization/instantiate.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/serialization/report-missing-class.ts b/cocos/serialization/report-missing-class.ts index e909fede75..f561104290 100644 --- a/cocos/serialization/report-missing-class.ts +++ b/cocos/serialization/report-missing-class.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { EDITOR } from 'internal:constants'; import { errorID } from '../core'; diff --git a/cocos/sorting/index.ts b/cocos/sorting/index.ts index 710478baf0..7f27c19521 100644 --- a/cocos/sorting/index.ts +++ b/cocos/sorting/index.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/sorting/sorting-layers.ts b/cocos/sorting/sorting-layers.ts index e2cd458a5a..7a00532794 100644 --- a/cocos/sorting/sorting-layers.ts +++ b/cocos/sorting/sorting-layers.ts @@ -1,15 +1,16 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE diff --git a/cocos/sorting/sorting.ts b/cocos/sorting/sorting.ts index ea11231d28..399f083761 100644 --- a/cocos/sorting/sorting.ts +++ b/cocos/sorting/sorting.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, disallowMultiple, editable, executeInEditMode, menu, range, serializable, type } from 'cc.decorator'; import { clamp } from '../core/math'; diff --git a/cocos/spine/assembler/index.ts b/cocos/spine/assembler/index.ts index f4e6c4dcc8..afd9d24527 100644 --- a/cocos/spine/assembler/index.ts +++ b/cocos/spine/assembler/index.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { IAssemblerManager } from '../../2d/renderer/base'; import { Skeleton } from '../skeleton'; import { simple } from './simple'; diff --git a/cocos/spine/assembler/simple.ts b/cocos/spine/assembler/simple.ts index fab701274c..0c4ee90d7e 100644 --- a/cocos/spine/assembler/simple.ts +++ b/cocos/spine/assembler/simple.ts @@ -1,19 +1,18 @@ /* eslint-disable max-len */ /* - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -22,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import spine from '../lib/spine-core.js'; import { IAssembler } from '../../2d/renderer/base'; diff --git a/cocos/spine/attach-util.ts b/cocos/spine/attach-util.ts index 076426cd9b..05535143a5 100644 --- a/cocos/spine/attach-util.ts +++ b/cocos/spine/attach-util.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Mat4 } from '../core'; import { Skeleton } from './skeleton'; diff --git a/cocos/spine/index.jsb.ts b/cocos/spine/index.jsb.ts index bf974f52ad..191be172ae 100644 --- a/cocos/spine/index.jsb.ts +++ b/cocos/spine/index.jsb.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccenum } from '../core'; import { legacyCC } from '../core/global-exports'; @@ -48,8 +47,7 @@ export * from './skeleton'; export * from './skeleton-data'; export * from './assembler'; -declare const window: any; -export const spine = window.spine; +export const spine = globalThis.spine; export const VertexEffectDelegate = spine.VertexEffectDelegate; /** diff --git a/cocos/spine/index.ts b/cocos/spine/index.ts index 354fadd106..b3d27ab1c2 100644 --- a/cocos/spine/index.ts +++ b/cocos/spine/index.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccenum } from '../core'; import spine from './lib/spine-core'; diff --git a/cocos/spine/lib/LICENSE b/cocos/spine/lib/LICENSE index 4501a611fd..b5136f1d38 100644 --- a/cocos/spine/lib/LICENSE +++ b/cocos/spine/lib/LICENSE @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + Spine Runtimes License Agreement Last updated May 1, 2019. Replaces all prior versions. diff --git a/cocos/spine/lib/spine-core.d.ts b/cocos/spine/lib/spine-core.d.ts index 6d7e143adc..e39bcae120 100644 --- a/cocos/spine/lib/spine-core.d.ts +++ b/cocos/spine/lib/spine-core.d.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + declare namespace spine { class Animation { name: string; diff --git a/cocos/spine/lib/spine-core.js b/cocos/spine/lib/spine-core.js index b2137750c1..bb3d70d30c 100644 --- a/cocos/spine/lib/spine-core.js +++ b/cocos/spine/lib/spine-core.js @@ -14,7 +14,10 @@ var __extends = (this && this.__extends) || (function () { }; })(); var spine; +const ccwindow = typeof globalThis.jsb !== 'undefined' ? ( typeof jsb.window !== 'undefined' ? jsb.window : window) : window; (function (spine) { + + var Animation = (function () { function Animation(name, timelines, duration) { if (name == null) @@ -2245,7 +2248,7 @@ var spine; if (error === void 0) { error = null; } path = this.pathPrefix + path; this.toLoad++; - var img = new Image(); + var img = new ccwindow.Image(); img.crossOrigin = "anonymous"; img.onload = function (ev) { var texture = _this.textureLoader(img); @@ -2270,7 +2273,7 @@ var spine; if (error === void 0) { error = null; } path = this.pathPrefix + path; this.toLoad++; - var img = new Image(); + var img = new ccwindow.Image(); img.onload = function (ev) { var texture = _this.textureLoader(img); _this.assets[path] = texture; @@ -2301,7 +2304,7 @@ var spine; try { var atlas = new spine.TextureAtlas(atlasData, function (path) { atlasPages.push(parent + "/" + path); - var image = document.createElement("img"); + var image = new ccwindow.Image(); image.width = 16; image.height = 16; return new spine.FakeTexture(image); @@ -3543,7 +3546,7 @@ var spine; path = this.pathPrefix + path; if (!this.queueAsset(clientId, textureLoader, path)) return; - var img = new Image(); + var img = new ccwindow.Image(); img.src = path; img.crossOrigin = "anonymous"; img.onload = function (ev) { diff --git a/cocos/spine/skeleton-cache.ts b/cocos/spine/skeleton-cache.ts index 7c9f8374eb..075856fd0d 100644 --- a/cocos/spine/skeleton-cache.ts +++ b/cocos/spine/skeleton-cache.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { TrackEntryListeners } from './track-entry-listeners'; import spine from './lib/spine-core.js'; diff --git a/cocos/spine/skeleton-data.ts b/cocos/spine/skeleton-data.ts index 8e8f63a0a6..4b0fd10274 100644 --- a/cocos/spine/skeleton-data.ts +++ b/cocos/spine/skeleton-data.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { EDITOR } from 'internal:constants'; import { CCString, Enum } from '../core'; diff --git a/cocos/spine/skeleton-system.ts b/cocos/spine/skeleton-system.ts index 1b3822e13c..35623625bc 100644 --- a/cocos/spine/skeleton-system.ts +++ b/cocos/spine/skeleton-system.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { director } from '../game/director'; import { System } from '../core'; diff --git a/cocos/spine/skeleton-texture.ts b/cocos/spine/skeleton-texture.ts index d6a39ee0b3..b211781a05 100644 --- a/cocos/spine/skeleton-texture.ts +++ b/cocos/spine/skeleton-texture.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Material, Texture2D } from '../asset/assets'; import { Filter, WrapMode } from '../asset/assets/asset-enum'; diff --git a/cocos/spine/skeleton.ts b/cocos/spine/skeleton.ts index c9a878d567..1a9c8dcb8d 100644 --- a/cocos/spine/skeleton.ts +++ b/cocos/spine/skeleton.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { EDITOR } from 'internal:constants'; import { TrackEntryListeners } from './track-entry-listeners'; diff --git a/cocos/spine/track-entry-listeners.ts b/cocos/spine/track-entry-listeners.ts index c2af46bd42..2ae1c55538 100644 --- a/cocos/spine/track-entry-listeners.ts +++ b/cocos/spine/track-entry-listeners.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import spine from './lib/spine-core.js'; diff --git a/cocos/spine/vertex-effect-delegate.ts b/cocos/spine/vertex-effect-delegate.ts index d642564fa7..d54addf4b1 100644 --- a/cocos/spine/vertex-effect-delegate.ts +++ b/cocos/spine/vertex-effect-delegate.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import spine from './lib/spine-core.js'; diff --git a/cocos/terrain/height-field.ts b/cocos/terrain/height-field.ts index 2f2176afb6..ba5b548810 100644 --- a/cocos/terrain/height-field.ts +++ b/cocos/terrain/height-field.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { clamp } from '../core/math'; diff --git a/cocos/terrain/index.ts b/cocos/terrain/index.ts index c7e2590f7f..ca25f8d60c 100644 --- a/cocos/terrain/index.ts +++ b/cocos/terrain/index.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ export * from './height-field'; export * from './terrain'; diff --git a/cocos/terrain/terrain-asset.ts b/cocos/terrain/terrain-asset.ts index e1d9a4f470..2a23b84109 100644 --- a/cocos/terrain/terrain-asset.ts +++ b/cocos/terrain/terrain-asset.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, serializable } from 'cc.decorator'; import { Asset, Texture2D } from '../asset/assets'; @@ -47,6 +46,7 @@ export const TERRAIN_DATA_VERSION3 = 0x01010003; export const TERRAIN_DATA_VERSION4 = 0x01010004; export const TERRAIN_DATA_VERSION5 = 0x01010005; export const TERRAIN_DATA_VERSION6 = 0x01010006; +export const TERRAIN_DATA_VERSION7 = 0x01010007; export const TERRAIN_DATA_VERSION_DEFAULT = 0x01010111; class TerrainBuffer { @@ -127,6 +127,22 @@ class TerrainBuffer { this.length += 4 * value.length; } + public writeDouble (value: number) { + this.reserve(this.length + 8); + + this._buffView.setFloat64(this.length, value, true); + this.length += 8; + } + + public writeDoubleArray (value: number[]) { + this.reserve(this.length + 8 * value.length); + + for (let i = 0; i < value.length; ++i) { + this._buffView.setFloat64(this.length + i * 8, value[i], true); + } + this.length += 8 * value.length; + } + public writeString (value: string) { this.reserve(this.length + value.length + 4); @@ -177,6 +193,20 @@ class TerrainBuffer { return value; } + public readDouble () { + const value = this._buffView.getFloat64(this._seekPos, true); + this._seekPos += 8; + return value; + } + + public readDoubleArray (value: number[]) { + for (let i = 0; i < value.length; ++i) { + value[i] = this._buffView.getFloat64(this._seekPos + i * 4, true); + } + this._seekPos += 8 * value.length; + return value; + } + public readString () { const length = this.readInt(); @@ -444,12 +474,19 @@ export class TerrainAsset extends Asset { && this._version !== TERRAIN_DATA_VERSION3 && this._version !== TERRAIN_DATA_VERSION4 && this._version !== TERRAIN_DATA_VERSION5 - && this._version !== TERRAIN_DATA_VERSION6) { + && this._version !== TERRAIN_DATA_VERSION6 + && this._version !== TERRAIN_DATA_VERSION7) { return false; } // geometry info - this.tileSize = stream.readFloat(); + if (this._version >= TERRAIN_DATA_VERSION7) { + this.tileSize = stream.readDouble(); + } else { + this.tileSize = stream.readFloat(); + } + this.tileSize = Math.floor(this.tileSize * 100) / 100.0; + stream.readIntArray(this._blockCount); this.weightMapSize = stream.readInt16(); this.lightMapSize = stream.readInt16(); @@ -493,13 +530,22 @@ export class TerrainAsset extends Asset { for (let i = 0; i < this._layerBinaryInfos.length; ++i) { this._layerBinaryInfos[i] = new TerrainLayerBinaryInfo(); this._layerBinaryInfos[i].slot = stream.readInt(); - this._layerBinaryInfos[i].tileSize = stream.readFloat(); + if (this._version >= TERRAIN_DATA_VERSION7) { + this._layerBinaryInfos[i].tileSize = stream.readDouble(); + } else { + this._layerBinaryInfos[i].tileSize = stream.readFloat(); + } this._layerBinaryInfos[i].detailMapId = stream.readString(); if (this._version >= TERRAIN_DATA_VERSION4) { this._layerBinaryInfos[i].normalMapId = stream.readString(); - this._layerBinaryInfos[i].roughness = stream.readFloat(); - this._layerBinaryInfos[i].metallic = stream.readFloat(); + if (this._version >= TERRAIN_DATA_VERSION7) { + this._layerBinaryInfos[i].roughness = stream.readDouble(); + this._layerBinaryInfos[i].metallic = stream.readDouble(); + } else { + this._layerBinaryInfos[i].roughness = stream.readFloat(); + this._layerBinaryInfos[i].metallic = stream.readFloat(); + } } } } @@ -514,10 +560,10 @@ export class TerrainAsset extends Asset { const stream = new TerrainBuffer(); // version - stream.writeInt32(TERRAIN_DATA_VERSION6); + stream.writeInt32(TERRAIN_DATA_VERSION7); // geometry info - stream.writeFloat(this.tileSize); + stream.writeDouble(this.tileSize); stream.writeIntArray(this._blockCount); stream.writeInt16(this.weightMapSize); stream.writeInt16(this.lightMapSize); @@ -565,11 +611,11 @@ export class TerrainAsset extends Asset { stream.writeInt32(layerBinaryInfos.length); for (let i = 0; i < layerBinaryInfos.length; ++i) { stream.writeInt32(layerBinaryInfos[i].slot); - stream.writeFloat(layerBinaryInfos[i].tileSize); + stream.writeDouble(layerBinaryInfos[i].tileSize); stream.writeString(layerBinaryInfos[i].detailMapId); stream.writeString(layerBinaryInfos[i].normalMapId); - stream.writeFloat(layerBinaryInfos[i].roughness); - stream.writeFloat(layerBinaryInfos[i].metallic); + stream.writeDouble(layerBinaryInfos[i].roughness); + stream.writeDouble(layerBinaryInfos[i].metallic); } return stream.buffer; diff --git a/cocos/terrain/terrain-lod.ts b/cocos/terrain/terrain-lod.ts index 02bab8ca67..45bb73f27f 100644 --- a/cocos/terrain/terrain-lod.ts +++ b/cocos/terrain/terrain-lod.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ export const TERRAIN_LOD_VERTS = 33; export const TERRAIN_LOD_TILES = 32; diff --git a/cocos/terrain/terrain.ts b/cocos/terrain/terrain.ts index 1c319f6a50..7a69a56c9e 100644 --- a/cocos/terrain/terrain.ts +++ b/cocos/terrain/terrain.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, disallowMultiple, executeInEditMode, help, visible, type, serializable, editable, disallowAnimation } from 'cc.decorator'; import { builtinResMgr } from '../asset/asset-manager'; diff --git a/cocos/tiledmap/assembler/index.ts b/cocos/tiledmap/assembler/index.ts index 38f4cbf191..0434870661 100644 --- a/cocos/tiledmap/assembler/index.ts +++ b/cocos/tiledmap/assembler/index.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/tiledmap/assembler/simple.ts b/cocos/tiledmap/assembler/simple.ts index 6ba7d36e5b..8ba6a9309f 100644 --- a/cocos/tiledmap/assembler/simple.ts +++ b/cocos/tiledmap/assembler/simple.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/tiledmap/index.ts b/cocos/tiledmap/index.ts index 9c4b8315d3..97060cf710 100644 --- a/cocos/tiledmap/index.ts +++ b/cocos/tiledmap/index.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2018-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2018-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ export * from './tiled-map'; export * from './tiled-map-asset'; diff --git a/cocos/tiledmap/tiled-layer.ts b/cocos/tiledmap/tiled-layer.ts index fcb4ac15b7..4e315cf26d 100644 --- a/cocos/tiledmap/tiled-layer.ts +++ b/cocos/tiledmap/tiled-layer.ts @@ -1,20 +1,19 @@ /* eslint-disable default-case */ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -23,7 +22,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass } from 'cc.decorator'; diff --git a/cocos/tiledmap/tiled-map-asset.ts b/cocos/tiledmap/tiled-map-asset.ts index 75952efab9..02e52d9e04 100644 --- a/cocos/tiledmap/tiled-map-asset.ts +++ b/cocos/tiledmap/tiled-map-asset.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -22,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, type, serializable } from 'cc.decorator'; import { Asset } from '../asset/assets/asset'; diff --git a/cocos/tiledmap/tiled-map.ts b/cocos/tiledmap/tiled-map.ts index deee018866..908bb0f422 100644 --- a/cocos/tiledmap/tiled-map.ts +++ b/cocos/tiledmap/tiled-map.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, displayOrder, executeInEditMode, help, menu, requireComponent, type, serializable, editable } from 'cc.decorator'; import { EDITOR, JSB } from 'internal:constants'; diff --git a/cocos/tiledmap/tiled-object-group.ts b/cocos/tiledmap/tiled-object-group.ts index 21210b4e6d..7b735fd66b 100644 --- a/cocos/tiledmap/tiled-object-group.ts +++ b/cocos/tiledmap/tiled-object-group.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -22,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, help, type, requireComponent } from 'cc.decorator'; import { Component } from '../scene-graph/component'; diff --git a/cocos/tiledmap/tiled-tile.ts b/cocos/tiledmap/tiled-tile.ts index 101c9226a1..82cb6e1959 100644 --- a/cocos/tiledmap/tiled-tile.ts +++ b/cocos/tiledmap/tiled-tile.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -22,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ /** * @en TiledTile can control the specified map tile. diff --git a/cocos/tiledmap/tiled-types.ts b/cocos/tiledmap/tiled-types.ts index 1724c5da9b..7967ecd725 100644 --- a/cocos/tiledmap/tiled-types.ts +++ b/cocos/tiledmap/tiled-types.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Color, Rect, Size, Vec2 } from '../core'; import { SpriteFrame } from '../2d/assets'; diff --git a/cocos/tiledmap/tiled-utils.ts b/cocos/tiledmap/tiled-utils.ts index 7aa1a01283..9770636e9c 100644 --- a/cocos/tiledmap/tiled-utils.ts +++ b/cocos/tiledmap/tiled-utils.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { SpriteFrame } from '../2d/assets'; import { Texture2D } from '../asset/assets'; diff --git a/cocos/tiledmap/tmx-xml-parser.ts b/cocos/tiledmap/tmx-xml-parser.ts index 125b86b452..38f347abcc 100644 --- a/cocos/tiledmap/tmx-xml-parser.ts +++ b/cocos/tiledmap/tmx-xml-parser.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Label, HorizontalTextAlignment, VerticalTextAlignment } from '../2d/components/label'; import codec from '../../external/compression/ZipUtils.js'; diff --git a/cocos/tween/actions/action-instant.ts b/cocos/tween/actions/action-instant.ts index cc73f8352f..3847be7b86 100644 --- a/cocos/tween/actions/action-instant.ts +++ b/cocos/tween/actions/action-instant.ts @@ -2,16 +2,16 @@ Copyright (c) 2008-2010 Ricardo Quesada Copyright (c) 2011-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. diff --git a/cocos/tween/actions/action-interval.ts b/cocos/tween/actions/action-interval.ts index 7ff1598cd1..5ef489ccf7 100644 --- a/cocos/tween/actions/action-interval.ts +++ b/cocos/tween/actions/action-interval.ts @@ -2,16 +2,16 @@ Copyright (c) 2008-2010 Ricardo Quesada Copyright (c) 2011-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. diff --git a/cocos/tween/actions/action-manager.ts b/cocos/tween/actions/action-manager.ts index c6cd78ffac..82eacd281f 100644 --- a/cocos/tween/actions/action-manager.ts +++ b/cocos/tween/actions/action-manager.ts @@ -2,16 +2,16 @@ Copyright (c) 2008-2010 Ricardo Quesada Copyright (c) 2011-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +23,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { errorID, logID } from '../../core/platform/debug'; import { Action } from './action'; diff --git a/cocos/tween/actions/action.ts b/cocos/tween/actions/action.ts index ae58ee11fb..4da6f6c775 100644 --- a/cocos/tween/actions/action.ts +++ b/cocos/tween/actions/action.ts @@ -2,16 +2,16 @@ Copyright (c) 2008-2010 Ricardo Quesada Copyright (c) 2011-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. diff --git a/cocos/tween/export-api.ts b/cocos/tween/export-api.ts index 7fcc90a0e7..339043ac1f 100644 --- a/cocos/tween/export-api.ts +++ b/cocos/tween/export-api.ts @@ -1,19 +1,18 @@ /* eslint-disable @typescript-eslint/ban-types */ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -22,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ /** * @en diff --git a/cocos/tween/index.ts b/cocos/tween/index.ts index f7c4f0fa8c..fbafe26032 100644 --- a/cocos/tween/index.ts +++ b/cocos/tween/index.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/tween/set-action.ts b/cocos/tween/set-action.ts index 43d0cc649b..3adb5c77f3 100644 --- a/cocos/tween/set-action.ts +++ b/cocos/tween/set-action.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ActionInstant } from './actions/action-instant'; diff --git a/cocos/tween/tween-action.ts b/cocos/tween/tween-action.ts index 20b4fe30ef..5c47092a05 100644 --- a/cocos/tween/tween-action.ts +++ b/cocos/tween/tween-action.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { warnID, warn, easing } from '../core'; import { ActionInterval } from './actions/action-interval'; diff --git a/cocos/tween/tween-system.ts b/cocos/tween/tween-system.ts index d67e7419d3..008b6f46cc 100644 --- a/cocos/tween/tween-system.ts +++ b/cocos/tween/tween-system.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { EDITOR } from 'internal:constants'; import { System, cclegacy } from '../core'; diff --git a/cocos/tween/tween.ts b/cocos/tween/tween.ts index 2275b9b29f..fdf7ce4ecf 100644 --- a/cocos/tween/tween.ts +++ b/cocos/tween/tween.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { TweenSystem } from './tween-system'; import { warn } from '../core'; diff --git a/cocos/ui/block-input-events.ts b/cocos/ui/block-input-events.ts index 0161bdf31a..7321e501cd 100644 --- a/cocos/ui/block-input-events.ts +++ b/cocos/ui/block-input-events.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/ui/button.ts b/cocos/ui/button.ts index 20fab274e6..fbf8f0c615 100644 --- a/cocos/ui/button.ts +++ b/cocos/ui/button.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/ui/deprecated-1.2.0.ts b/cocos/ui/deprecated-1.2.0.ts index a99c7de028..e8c944e097 100644 --- a/cocos/ui/deprecated-1.2.0.ts +++ b/cocos/ui/deprecated-1.2.0.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { deprecateModuleExportedName } from '../core/utils/x-deprecated'; diff --git a/cocos/ui/deprecated.ts b/cocos/ui/deprecated.ts index 94985c767e..a706f9ae98 100644 --- a/cocos/ui/deprecated.ts +++ b/cocos/ui/deprecated.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import './deprecated-1.2.0'; import { UICoordinateTracker } from './ui-coordinate-tracker'; diff --git a/cocos/ui/editbox/edit-box-impl-base.ts b/cocos/ui/editbox/edit-box-impl-base.ts index 79cafb19b5..7d75bbd191 100644 --- a/cocos/ui/editbox/edit-box-impl-base.ts +++ b/cocos/ui/editbox/edit-box-impl-base.ts @@ -2,20 +2,19 @@ Copyright (c) 2011-2012 cocos2d-x.org Copyright (c) 2012 James Chen Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/ui/editbox/edit-box-impl.ts b/cocos/ui/editbox/edit-box-impl.ts index 34c563e759..9fcc7b7a95 100644 --- a/cocos/ui/editbox/edit-box-impl.ts +++ b/cocos/ui/editbox/edit-box-impl.ts @@ -2,20 +2,19 @@ Copyright (c) 2011-2012 cocos2d-x.org Copyright (c) 2012 James Chen Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -40,6 +39,9 @@ import { tabIndexUtil } from './tabIndexUtil'; import { InputFlag, InputMode, KeyboardReturnType } from './types'; import { EditBoxImplBase } from './edit-box-impl-base'; import { BrowserType, OS } from '../../../pal/system-info/enum-type'; +import { ccwindow } from '../../core/global-exports'; + +const ccdocument = ccwindow.document; // https://segmentfault.com/q/1010000002914610 const SCROLLY = 40; @@ -169,18 +171,18 @@ export class EditBoxImpl extends EditBoxImplBase { private _createInput () { this._isTextArea = false; - this._edTxt = document.createElement('input'); + this._edTxt = ccdocument.createElement('input'); } private _createTextArea () { this._isTextArea = true; - this._edTxt = document.createElement('textarea'); + this._edTxt = ccdocument.createElement('textarea'); } private _addDomToGameContainer () { if (game.container && this._edTxt) { game.container.appendChild(this._edTxt); - document.head.appendChild(this._placeholderStyleSheet!); + ccdocument.head.appendChild(this._placeholderStyleSheet!); } } @@ -189,9 +191,9 @@ export class EditBoxImpl extends EditBoxImplBase { if (hasElem && this._edTxt) { game.container!.removeChild(this._edTxt); } - const hasStyleSheet = contains(document.head, this._placeholderStyleSheet); + const hasStyleSheet = contains(ccdocument.head, this._placeholderStyleSheet); if (hasStyleSheet) { - document.head.removeChild(this._placeholderStyleSheet!); + ccdocument.head.removeChild(this._placeholderStyleSheet!); } this._edTxt = null; @@ -241,7 +243,7 @@ export class EditBoxImpl extends EditBoxImplBase { private _adjustWindowScroll () { setTimeout(() => { - if (window.scrollY < SCROLLY) { + if (ccwindow.scrollY < SCROLLY) { this._edTxt!.scrollIntoView({ block: 'start', inline: 'nearest', behavior: 'smooth' }); } }, DELAY_TIME); @@ -250,14 +252,14 @@ export class EditBoxImpl extends EditBoxImplBase { private _scrollBackWindow () { setTimeout(() => { if (sys.browserType === BrowserType.WECHAT && sys.os === OS.IOS) { - if (window.top) { - window.top.scrollTo(0, 0); + if (ccwindow.top) { + ccwindow.top.scrollTo(0, 0); } return; } - window.scrollTo(0, 0); + ccwindow.scrollTo(0, 0); }, DELAY_TIME); } @@ -428,7 +430,7 @@ export class EditBoxImpl extends EditBoxImplBase { elem.style.overflowY = 'scroll'; } - this._placeholderStyleSheet = document.createElement('style'); + this._placeholderStyleSheet = ccdocument.createElement('style'); } private _updateStyleSheet () { diff --git a/cocos/ui/editbox/edit-box.ts b/cocos/ui/editbox/edit-box.ts index e30ef13b67..c3ee9e4e67 100644 --- a/cocos/ui/editbox/edit-box.ts +++ b/cocos/ui/editbox/edit-box.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/ui/editbox/tabIndexUtil.ts b/cocos/ui/editbox/tabIndexUtil.ts index 6b003f0540..525fc542dd 100644 --- a/cocos/ui/editbox/tabIndexUtil.ts +++ b/cocos/ui/editbox/tabIndexUtil.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { EditBoxImpl } from './edit-box-impl'; diff --git a/cocos/ui/editbox/types.ts b/cocos/ui/editbox/types.ts index a8388920b9..709136b9cf 100644 --- a/cocos/ui/editbox/types.ts +++ b/cocos/ui/editbox/types.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/ui/index.ts b/cocos/ui/index.ts index 0dc6e8c996..29028e2e91 100644 --- a/cocos/ui/index.ts +++ b/cocos/ui/index.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ export { Button } from './button'; export { EditBox } from './editbox/edit-box'; diff --git a/cocos/ui/layout.ts b/cocos/ui/layout.ts index e21504f82d..77251cdb26 100644 --- a/cocos/ui/layout.ts +++ b/cocos/ui/layout.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/ui/page-view-indicator.ts b/cocos/ui/page-view-indicator.ts index f8512099be..23ec00c695 100644 --- a/cocos/ui/page-view-indicator.ts +++ b/cocos/ui/page-view-indicator.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/ui/page-view.ts b/cocos/ui/page-view.ts index 6046b8cc79..aa625b8c0a 100644 --- a/cocos/ui/page-view.ts +++ b/cocos/ui/page-view.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/ui/progress-bar.ts b/cocos/ui/progress-bar.ts index a149919a0d..0257136298 100644 --- a/cocos/ui/progress-bar.ts +++ b/cocos/ui/progress-bar.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/ui/safe-area.ts b/cocos/ui/safe-area.ts index 0ea07fdea6..91c62d8a7f 100644 --- a/cocos/ui/safe-area.ts +++ b/cocos/ui/safe-area.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, help, executionOrder, menu, executeInEditMode, requireComponent } from 'cc.decorator'; import { EDITOR } from 'internal:constants'; diff --git a/cocos/ui/scroll-bar.ts b/cocos/ui/scroll-bar.ts index 3e1ebae97b..163d2a34ec 100644 --- a/cocos/ui/scroll-bar.ts +++ b/cocos/ui/scroll-bar.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/ui/scroll-view.ts b/cocos/ui/scroll-view.ts index 42610be5f2..5243a210f7 100644 --- a/cocos/ui/scroll-view.ts +++ b/cocos/ui/scroll-view.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -1145,15 +1144,6 @@ export class ScrollView extends ViewGroup { this._topBoundary = this._bottomBoundary + viewTrans.height; this._moveContentToTopLeft(viewTrans.contentSize); - this._updateScrollBarState(); - - // to avoid size changed and auto-spring-back after touching end. - const boundary = this._getHowMuchOutOfBoundary(); - // if the _outOfBoundaryAmount !== Vec3.zero, the content will roll after touching end - // we should release this rolling event in advance in order to avoid the weird rolling after touching end - if (boundary.x !== 0 || boundary.y !== 0) { - this._moveContent(boundary); - } } } @@ -1430,7 +1420,7 @@ export class ScrollView extends ViewGroup { const outOfBoundary = this._getHowMuchOutOfBoundary(); _tempVec3.set(this._getContentPosition()); _tempVec3.add(outOfBoundary); - this._content.setPosition(_tempVec3); + this._setContentPosition(_tempVec3); this._updateScrollBar(Vec2.ZERO); } } @@ -1861,12 +1851,10 @@ export class ScrollView extends ViewGroup { handleInputDevice = event.handleInputDevice; } let value; - if (!this.enabledInHierarchy) { + if (!this.enabledInHierarchy || this._hoverIn === XrhoverType.NONE) { return; } - if (this._hoverIn === XrhoverType.NONE) { - return; - } else if (this._hoverIn === XrhoverType.LEFT) { + if (this._hoverIn === XrhoverType.LEFT) { value = handleInputDevice.leftStick.getValue(); if (!value.equals(Vec2.ZERO)) { this._xrThumbStickMove(value); diff --git a/cocos/ui/slider.ts b/cocos/ui/slider.ts index c4742170ae..adb6f9d542 100644 --- a/cocos/ui/slider.ts +++ b/cocos/ui/slider.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/ui/sub-context-view.ts b/cocos/ui/sub-context-view.ts index ff5e73c021..f1cb7a51a9 100644 --- a/cocos/ui/sub-context-view.ts +++ b/cocos/ui/sub-context-view.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/ui/toggle-container.ts b/cocos/ui/toggle-container.ts index 5175f9f18d..7f537efc75 100644 --- a/cocos/ui/toggle-container.ts +++ b/cocos/ui/toggle-container.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/ui/toggle.ts b/cocos/ui/toggle.ts index f9a0d42a66..6a1724c9aa 100644 --- a/cocos/ui/toggle.ts +++ b/cocos/ui/toggle.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/ui/ui-coordinate-tracker.ts b/cocos/ui/ui-coordinate-tracker.ts index 678d4c24dd..e0ce7d3d9c 100644 --- a/cocos/ui/ui-coordinate-tracker.ts +++ b/cocos/ui/ui-coordinate-tracker.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/ui/view-group.ts b/cocos/ui/view-group.ts index 4f72c07889..383afce0c6 100644 --- a/cocos/ui/view-group.ts +++ b/cocos/ui/view-group.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/ui/view.ts b/cocos/ui/view.ts index d9d61181df..7fad69d9c1 100644 --- a/cocos/ui/view.ts +++ b/cocos/ui/view.ts @@ -2,16 +2,16 @@ Copyright (c) 2008-2010 Ricardo Quesada Copyright (c) 2011-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. diff --git a/cocos/ui/widget-manager.ts b/cocos/ui/widget-manager.ts index fc6cc5d1c3..fc17e2f2fc 100644 --- a/cocos/ui/widget-manager.ts +++ b/cocos/ui/widget-manager.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/ui/widget.ts b/cocos/ui/widget.ts index 767457b94b..e2cc51995c 100644 --- a/cocos/ui/widget.ts +++ b/cocos/ui/widget.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/cocos/video/assets/video-clip.ts b/cocos/video/assets/video-clip.ts index 677b325fe4..74f88eb926 100644 --- a/cocos/video/assets/video-clip.ts +++ b/cocos/video/assets/video-clip.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, serializable } from 'cc.decorator'; import { Asset } from '../../asset/assets'; diff --git a/cocos/video/deprecated.ts b/cocos/video/deprecated.ts index 9e58ea66f1..0adb22686a 100644 --- a/cocos/video/deprecated.ts +++ b/cocos/video/deprecated.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { replaceProperty } from '../core/utils/x-deprecated'; import { VideoPlayer } from './video-player'; diff --git a/cocos/video/index.ts b/cocos/video/index.ts index e3154fd780..84f2f61f30 100644 --- a/cocos/video/index.ts +++ b/cocos/video/index.ts @@ -1,26 +1,25 @@ /* -Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. +Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license -to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The software or tools in this License Agreement are licensed, not sold. -Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. */ import './video-downloader'; diff --git a/cocos/video/video-downloader.ts b/cocos/video/video-downloader.ts index 8201ff48a5..25168bfab8 100644 --- a/cocos/video/video-downloader.ts +++ b/cocos/video/video-downloader.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -22,18 +21,21 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import downloader from '../asset/asset-manager/downloader'; import factory from '../asset/asset-manager/factory'; import { CompleteCallback, IDownloadParseOptions } from '../asset/asset-manager/shared'; import { log } from '../core/platform/debug'; import { VideoClip } from './assets/video-clip'; +import { ccwindow } from '../core/global-exports'; + +const ccdocument = ccwindow.document; // eslint-disable-next-line consistent-return export function downloadVideo (url: string, options: IDownloadParseOptions, onComplete: CompleteCallback) { - const video = document.createElement('video'); - const source = document.createElement('source'); + const video = ccdocument.createElement('video'); + const source = ccdocument.createElement('source'); video.appendChild(source); const req = new XMLHttpRequest(); diff --git a/cocos/video/video-player-enums.ts b/cocos/video/video-player-enums.ts index c4e1065327..21c5fc0ad5 100644 --- a/cocos/video/video-player-enums.ts +++ b/cocos/video/video-player-enums.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,11 +20,11 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ /** * @en Enum for video resource type. - * @zh 视频来源 + * @zh 视频资源类型枚举。 */ import { Enum } from '../core/value-types'; @@ -34,71 +33,91 @@ export const ResourceType = Enum({ * @en * The remote resource type. * @zh - * 远程视频 + * 远程视频。 */ REMOTE: 0, /** * @en * The local resource type. * @zh - * 本地视频 + * 本地视频。 */ LOCAL: 1, }); export enum EventType { /** - * @en None - * @zh 无 + * @en None. + * @zh 无。 */ NONE = 'none', /** * @en The video is playing. - * @zh 视频播放中 + * @zh 视频播放中。 */ PLAYING = 'playing', /** - * @en Video paused - * @zh 视频暂停中 + * @en Video paused. + * @zh 视频暂停中。 */ PAUSED = 'paused', /** - * @en Video stopped - * @zh 视频停止中 + * @en Video stopped. + * @zh 视频停止中。 */ STOPPED = 'stopped', /** - * @en End of video - * @zh 视频播放完毕 + * @en Video playback complete. + * @zh 视频播放完毕。 */ COMPLETED = 'completed', /** - * @en Video metadata loading complete - * @zh 视频元数据加载完毕 + * @en Video metadata loading complete. + * @zh 视频元数据加载完毕。 */ META_LOADED = 'meta-loaded', /** - * @en The video is ready to play when loaded - * @zh 视频加载完毕可播放 + * @en The video is ready to play when loaded. + * @zh 视频加载完毕可播放。 */ READY_TO_PLAY = 'ready-to-play', /** - * @en Video Trigger Error - * @zh 处理视频时触发的错误 + * @en Errors triggered while processing video + * @zh 处理视频时触发的错误。 */ ERROR = 'error', /** - * @en Video clicked - * @zh 视频被点击 + * @en Video is clicked. + * @zh 视频被点击。 */ CLICKED = 'clicked', } export enum READY_STATE { - HAVE_NOTHING, // 没有关于音频/视频是否就绪的信息 - HAVE_METADATA, // 关于音频/视频就绪的元数据 - HAVE_CURRENT_DATA, // 关于当前播放位置的数据是可用的,但没有足够的数据来播放下一帧/毫秒 - HAVE_FUTURE_DATA, // 当前及至少下一帧的数据是可用的 - HAVE_ENOUGH_DATA // 可用数据足以开始播放 + /** + * @en No information about whether audio/video is ready. + * @zh 没有关于音频/视频是否就绪的信息。 + */ + HAVE_NOTHING, + /** + * @en Metadata about audio/video ready. + * @zh 关于音频/视频就绪的元数据。 + */ + HAVE_METADATA, + /** + * @en Data is available for the current playback position, but not enough data to play the next frame/ms. + * @zh 当前播放位置的数据可用,但没有足够的数据来播放下一帧/毫秒。 + */ + HAVE_CURRENT_DATA, + /** + * @en Data for the current and at least the next frame is available. + * @zh 当前及至少下一帧的数据是可用的。 + */ + HAVE_FUTURE_DATA, + /** + * @en Available data is enough to start playback. + * @zh 可用数据足以开始播放。 + */ + HAVE_ENOUGH_DATA } diff --git a/cocos/video/video-player-impl-manager.ts b/cocos/video/video-player-impl-manager.ts index 4a1e653d86..4b709dd5df 100644 --- a/cocos/video/video-player-impl-manager.ts +++ b/cocos/video/video-player-impl-manager.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { legacyCC } from '../core/global-exports'; import { VideoPlayer } from './video-player'; diff --git a/cocos/video/video-player-impl-web.ts b/cocos/video/video-player-impl-web.ts index 71f585388f..9cb65e21ab 100644 --- a/cocos/video/video-player-impl-web.ts +++ b/cocos/video/video-player-impl-web.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { screenAdapter } from 'pal/screen-adapter'; import { mat4, visibleRect } from '../core'; @@ -32,6 +31,9 @@ import { EventType, READY_STATE } from './video-player-enums'; import { VideoPlayerImpl } from './video-player-impl'; import { ClearFlagBit } from '../gfx'; import { BrowserType, OS } from '../../pal/system-info/enum-type'; +import { ccwindow } from '../core/global-exports'; + +const ccdocument = ccwindow.document; const MIN_ZINDEX = -(2 ** 15); @@ -48,7 +50,7 @@ export class VideoPlayerImplWeb extends VideoPlayerImpl { super(component); } - protected addListener (type: string, handler: (e: Event)=> void) { + protected addListener (type: string, handler: (e: Event) => void) { if (!this._video) { return; } @@ -69,7 +71,7 @@ export class VideoPlayerImplWeb extends VideoPlayerImpl { if (this.video) { const promise = this.video.play(); // the play API can only be initiated by user gesture. - if (window.Promise && promise instanceof Promise) { + if (ccwindow.Promise && promise instanceof Promise) { // eslint-disable-next-line @typescript-eslint/no-floating-promises promise.catch((error) => { // Auto-play was prevented @@ -250,7 +252,7 @@ export class VideoPlayerImplWeb extends VideoPlayerImpl { } public createVideoPlayer (url: string) { - const video = this._video = document.createElement('video'); + const video = this._video = ccdocument.createElement('video'); video.className = 'cocosVideo'; video.style.visibility = 'hidden'; video.style.position = 'absolute'; @@ -266,7 +268,7 @@ export class VideoPlayerImplWeb extends VideoPlayerImpl { video.setAttribute('playsinline', ''); this._bindDomEvent(); game.container!.appendChild(video); - const source = document.createElement('source'); + const source = ccdocument.createElement('source'); video.appendChild(source); source.src = url; } diff --git a/cocos/video/video-player-impl.ts b/cocos/video/video-player-impl.ts index 9ea80a354b..33c00ffd30 100644 --- a/cocos/video/video-player-impl.ts +++ b/cocos/video/video-player-impl.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { legacyCC } from '../core/global-exports'; import { UITransform } from '../2d/framework'; @@ -36,8 +35,8 @@ export abstract class VideoPlayerImpl { protected _state = EventType.NONE; protected _video: HTMLVideoElement | null = null; - protected _onHide: () => void; - protected _onShow: () => void; + protected _onInterruptedBegin: () => void; + protected _onInterruptedEnd: () => void; protected _interrupted = false; protected _loaded = false; @@ -75,20 +74,20 @@ export abstract class VideoPlayerImpl { this._component = component; this._node = component.node; this._uiTrans = component.node.getComponent(UITransform); - this._onHide = () => { + this._onInterruptedBegin = () => { if (!this.video || this._state !== EventType.PLAYING) { return; } this.video.pause(); this._interrupted = true; }; - this._onShow = () => { + this._onInterruptedEnd = () => { if (!this._interrupted || !this.video) { return; } // eslint-disable-next-line @typescript-eslint/no-floating-promises this.video.play(); this._interrupted = false; }; - /* handle hide & show */ - legacyCC.game.on(legacyCC.Game.EVENT_HIDE, this._onHide); - legacyCC.game.on(legacyCC.Game.EVENT_SHOW, this._onShow); + /* handle pause & resume */ + legacyCC.game.on(legacyCC.Game.EVENT_PAUSE, this._onInterruptedBegin); + legacyCC.game.on(legacyCC.Game.EVENT_RESUME, this._onInterruptedEnd); } // @@ -114,7 +113,7 @@ export abstract class VideoPlayerImpl { public abstract syncPlaybackRate(val: number): void; public abstract syncVolume(val: number): void; public abstract syncMute(enabled: boolean): void; - public abstract syncLoop(enabled: boolean):void + public abstract syncLoop(enabled: boolean): void public abstract syncMatrix(): void; // get video player data @@ -253,8 +252,8 @@ export abstract class VideoPlayerImpl { public destroy () { this.removeVideoPlayer(); this._componentEventList.clear(); - legacyCC.game.off(legacyCC.Game.EVENT_HIDE, this._onHide); - legacyCC.game.off(legacyCC.Game.EVENT_SHOW, this._onShow); + legacyCC.game.off(legacyCC.Game.EVENT_PAUSE, this._onInterruptedBegin); + legacyCC.game.off(legacyCC.Game.EVENT_RESUME, this._onInterruptedEnd); } } diff --git a/cocos/video/video-player.ts b/cocos/video/video-player.ts index 08993528f8..75a9cf8409 100644 --- a/cocos/video/video-player.ts +++ b/cocos/video/video-player.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, displayOrder, executeInEditMode, help, menu, slide, range, requireComponent, tooltip, type, serializable } from 'cc.decorator'; import { EDITOR } from 'internal:constants'; @@ -99,7 +98,7 @@ export class VideoPlayer extends Component { * @en * The remote URL of video. * @zh - * 远程视频的 URL + * 远程视频的 URL。 */ @tooltip('i18n:videoplayer.remoteURL') get remoteURL () { @@ -114,7 +113,7 @@ export class VideoPlayer extends Component { /** * @en - * The local video clip + * The local video clip. * @zh * 本地视频剪辑。 */ @@ -132,9 +131,9 @@ export class VideoPlayer extends Component { /** * @en - * Whether the video start playing automatically after loaded? + * Whether the video start playing automatically after loaded. * @zh - * 视频加载后是否自动开始播放? + * 视频加载后是否自动开始播放。 */ @tooltip('i18n:videoplayer.playOnAwake') get playOnAwake () { @@ -146,9 +145,9 @@ export class VideoPlayer extends Component { /** * @en - * The Video playback rate + * The Video playback rate. The value range is from [0.0 ~ 10.0]. * @zh - * 视频播放时的速率(0.0 ~ 10.0) + * 视频播放时的速率, 值的区间为[0.0 ~ 10.0]。 */ @slide @range([0.0, 10, 1.0]) @@ -165,9 +164,9 @@ export class VideoPlayer extends Component { /** * @en - * The volume of the video. + * The volume of the video. The value range is from [0.0 ~ 1.0]. * @zh - * 视频的音量(0.0 ~ 1.0) + * 视频的音量. 值的区间为[0.0 ~ 1.0]。 */ @slide @range([0.0, 1.0, 0.1]) @@ -184,9 +183,9 @@ export class VideoPlayer extends Component { /** * @en - * Mutes the VideoPlayer. Mute sets the volume=0, Un-Mute restore the original volume. + * Mutes the VideoPlayer. When the volume is set to 0, the volume is muted, and unmuted is to restore the original volume. * @zh - * 是否静音视频。静音时设置音量为 0,取消静音是恢复原来的音量。 + * 是否静音视频。设置音量为0时是静音,取消静音是恢复原来的音量。 */ @tooltip('i18n:videoplayer.mute') get mute () { @@ -201,9 +200,9 @@ export class VideoPlayer extends Component { /** * @en - * Whether the video should be played again at the end + * Whether the video should play again when it ends. * @zh - * 视频是否应在结束时再次播放 + * 视频是否应在结束时再次播放。 */ @tooltip('i18n:videoplayer.loop') get loop () { @@ -218,9 +217,9 @@ export class VideoPlayer extends Component { /** * @en - * Whether keep the aspect ration of the original video. + * Whether to keep the original aspect ratio of the video. * @zh - * 是否保持视频原来的宽高比 + * 是否保持视频原来的宽高比。 */ @tooltip('i18n:videoplayer.keepAspectRatio') get keepAspectRatio () { @@ -237,9 +236,9 @@ export class VideoPlayer extends Component { /** * @en - * Whether play video in fullscreen mode. + * Whether to play the video in full screen. * @zh - * 是否全屏播放视频 + * 是否全屏播放视频。 */ @tooltip('i18n:videoplayer.fullScreenOnAwake') get fullScreenOnAwake () { @@ -262,12 +261,14 @@ export class VideoPlayer extends Component { /** * @en - * Always below the game view (only useful on Web. - * Note: The specific effects are not guaranteed to be consistent, depending on whether each browser supports or restricts). - * Note: This property depends on the translucency of Canvas, please enable ENABLE_TRANSPARENT_CANVAS in the project preferences + * Always at the bottom of the game view. + * This property relies on the translucency feature of Canvas, please enable ENABLE_TRANSPARENT_CANVAS in project preferences. + * Note: It's only available on the Web platform. + * Due to the support and limitations of each browser, the effect may not be guaranteed to be consistent. * @zh - * 永远在游戏视图最底层(这个属性只有在 Web 平台上有效果。注意:具体效果无法保证一致,跟各个浏览器是否支持与限制有关) - * 注意:该属性依赖 Canvas 的半透明特性,请在项目偏好设置里开启 ENABLE_TRANSPARENT_CANVAS + * 永远在游戏视图最底层。 + * 该属性依赖 Canvas 的半透明特性,请在项目偏好设置里开启 ENABLE_TRANSPARENT_CANVAS。 + * 注意:该属性只有在 Web 平台上有效果。由于各浏览器的支持与限制,效果可能无法保证一致。 */ @tooltip('i18n:videoplayer.stayOnBottom') get stayOnBottom () { @@ -287,7 +288,7 @@ export class VideoPlayer extends Component { /** * @en - * The video player's callback, it will be triggered when certain event occurs, like: playing, paused, stopped and completed. + * The video player's callback, it will be triggered in certain situations, such as playing, paused, stopped and completed. * @zh * 视频播放回调函数,该回调函数会在特定情况被触发,比如播放中,暂时,停止和完成播放。 */ @@ -299,9 +300,9 @@ export class VideoPlayer extends Component { /** * @en - * Raw video objects for user customization + * Gets the original video object, generally used for user customization. * @zh - * 原始视频对象,用于用户定制 + * 获取原始视频对象,一般用于用户定制。 */ get nativeVideo () { return (this._impl && this._impl.video) || null; @@ -309,14 +310,21 @@ export class VideoPlayer extends Component { /** * @en - * The current playback time of the now playing item in seconds, you could also change the start playback time. + * Gets the time progress of the current video playback. * @zh - * 指定视频从什么时间点开始播放,单位是秒,也可以用来获取当前视频播放的时间进度。 + * 获取当前视频播放的时间进度。 */ get currentTime () { if (!this._impl) { return this._cachedCurrentTime; } return this._impl.getCurrentTime(); } + + /** + * @en + * Sets the time point when the video starts to play, in seconds. + * @zh + * 设置视频开始播放的时间点,单位是秒。 + */ set currentTime (val: number) { if (Number.isNaN(val)) { warn(`illegal video time! value:${val}`); return; } val = clamp(val, 0, this.duration); @@ -328,7 +336,7 @@ export class VideoPlayer extends Component { /** * @en - * Get the audio duration, in seconds. + * Gets the audio duration, in seconds. * @zh * 获取以秒为单位的视频总时长。 */ @@ -339,7 +347,7 @@ export class VideoPlayer extends Component { /** * @en - * Get current audio state. + * Gets current audio state. * @zh * 获取当前视频状态。 */ @@ -350,9 +358,9 @@ export class VideoPlayer extends Component { /** * @en - * Is the audio currently playing? + * Whether the current video is playing, The return value type is Boolean. * @zh - * 当前视频是否正在播放? + * 当前视频是否正在播放,返回值为布尔类型。 */ get isPlaying () { if (!this._impl) { return false; } @@ -456,8 +464,8 @@ export class VideoPlayer extends Component { ComponentEventHandler.emitEvents(this.videoPlayerEvent, this, EventType.ERROR); this.node.emit(EventType.ERROR, this); } - - public onClicked() { + + public onClicked () { ComponentEventHandler.emitEvents(this.videoPlayerEvent, this, EventType.CLICKED); this.node.emit(EventType.CLICKED, this); } @@ -480,9 +488,10 @@ export class VideoPlayer extends Component { /** * @en + * Resume the clip. * If a video is paused, call this method to resume playing. * @zh - * 如果一个视频播放被暂停播放了,调用这个接口可以继续播放。 + * 继续播放。如果一个视频播放被暂停播放了,调用这个接口可以继续播放。 */ public resume () { if (this._impl) { diff --git a/cocos/web-view/web-view-enums.ts b/cocos/web-view/web-view-enums.ts index 7996f3e80e..dbbc9d159d 100644 --- a/cocos/web-view/web-view-enums.ts +++ b/cocos/web-view/web-view-enums.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,27 +20,27 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ export enum EventType { /** - * @en None - * @zh 无 + * @en None. + * @zh 无。 */ NONE = 'none', /** - * @en Web page Load completed. - * @zh 网页加载完成 + * @en Web page is loading. + * @zh 网页加载中。 */ LOADING = 'loading', /** - * @en Web page is loading. - * @zh 网页加载中 + * @en Web page Load completed. + * @zh 网页加载完成。 */ LOADED = 'loaded', /** * @en Web page error occurs when loading. - * @zh 网页加载出错 + * @zh 网页加载出错。 */ ERROR = 'error', } diff --git a/cocos/web-view/web-view-impl-manager.ts b/cocos/web-view/web-view-impl-manager.ts index 0b9ddf3b02..885ed6ae5f 100644 --- a/cocos/web-view/web-view-impl-manager.ts +++ b/cocos/web-view/web-view-impl-manager.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { legacyCC } from '../core/global-exports'; import { WebViewImplWeb } from './web-view-impl-web'; diff --git a/cocos/web-view/web-view-impl-web.ts b/cocos/web-view/web-view-impl-web.ts index 9b91107c0b..8e95e1f4db 100644 --- a/cocos/web-view/web-view-impl-web.ts +++ b/cocos/web-view/web-view-impl-web.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { screenAdapter } from 'pal/screen-adapter'; import { EventType } from './web-view-enums'; @@ -30,6 +29,9 @@ import { WebViewImpl } from './web-view-impl'; import { game } from '../game'; import { mat4 } from '../core/math'; import { contains } from '../core/utils/misc'; +import { ccwindow } from '../core/global-exports'; + +const ccdocument = ccwindow.document; const _mat4_temp = mat4(); @@ -65,7 +67,7 @@ export class WebViewImplWeb extends WebViewImpl { } public createWebView () { - const wrapper = document.createElement('div'); + const wrapper = ccdocument.createElement('div'); this._wrapper = wrapper; wrapper.id = 'webview-wrapper'; wrapper.style['-webkit-overflow'] = 'auto'; @@ -77,7 +79,7 @@ export class WebViewImplWeb extends WebViewImpl { wrapper.style['-webkit-transform-origin'] = '0px 100% 0px'; game.container!.appendChild(wrapper); - const webview = document.createElement('iframe'); + const webview = ccdocument.createElement('iframe'); this._webview = webview; webview.id = 'webview'; webview.style.border = 'none'; diff --git a/cocos/web-view/web-view-impl.ts b/cocos/web-view/web-view-impl.ts index 815de297fc..101f50974a 100644 --- a/cocos/web-view/web-view-impl.ts +++ b/cocos/web-view/web-view-impl.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { legacyCC } from '../core/global-exports'; import { WebView } from './web-view'; diff --git a/cocos/web-view/web-view.ts b/cocos/web-view/web-view.ts index 2aaa5129d7..5708291d55 100644 --- a/cocos/web-view/web-view.ts +++ b/cocos/web-view/web-view.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ccclass, help, executeInEditMode, menu, tooltip, type, displayOrder, serializable, requireComponent } from 'cc.decorator'; import { EDITOR } from 'internal:constants'; @@ -34,10 +33,9 @@ import type { WebViewImpl } from './web-view-impl'; /** * @en - * WebView is a component for display web pages in the game. - * Because different platforms have different authorization, - * API and control methods for WebView component. - * And have not yet formed a unified standard, only Web, iOS, and Android platforms are currently supported. + * WebView component, used to display web pages in the game. + * Since different platforms have different authorizations, APIs, and control methods for WebView components, there is no unified standard yet. + * So currently only Web, iOS, and Android platforms are supported. * @zh * WebView 组件,用于在游戏中显示网页。 * 由于不同平台对于 WebView 组件的授权、API、控制方式都不同,还没有形成统一的标准,所以目前只支持 Web、iOS 和 Android 平台。 @@ -54,8 +52,8 @@ export class WebView extends Component { protected _impl: WebViewImpl | null = null; /** - * @en WebView event type - * @zh 网页视图事件类型 + * @en WebView event type. + * @zh 网页视图事件类型。 */ public static EventType = EventType; @@ -63,7 +61,7 @@ export class WebView extends Component { * @en * A given URL to be loaded by the WebView, it should have a http or https prefix. * @zh - * 指定 WebView 加载的网址,它应该是一个 http 或者 https 开头的字符串 + * 指定 WebView 加载的网址,它应该是一个 http 或者 https 开头的字符串。 */ @tooltip('i18n:webview.url') get url () { @@ -78,9 +76,9 @@ export class WebView extends Component { /** * @en - * The webview's event callback , it will be triggered when certain webview event occurs. + * The webview's event callback, it will be triggered after the loading is completed or when the loading error occurs. * @zh - * WebView 的回调事件,当网页加载过程中,加载完成后或者加载出错时都会回调此函数 + * WebView 的回调事件,当网页加载过程中,加载完成后或者加载出错时都会回调此函数。 */ @serializable @type([ComponentEventHandler]) @@ -90,9 +88,9 @@ export class WebView extends Component { /** * @en - * Raw webview objects for user customization + * Raw webview objects for user customization. * @zh - * 原始网页对象,用于用户定制 + * 原始网页对象,用于用户定制。 */ get nativeWebView () { return (this._impl && this._impl.webview) || null; @@ -100,7 +98,7 @@ export class WebView extends Component { /** * @en - * Get current audio state. + * Gets the current webview state. * @zh * 获取当前网页视图状态。 */ @@ -111,12 +109,12 @@ export class WebView extends Component { /** * @en - * Set javascript interface scheme (see also setOnJSCallback).
- * Note: Supports only on the Android and iOS. For HTML5, please refer to the official documentation.
+ * Sets javascript interface scheme (see also setOnJSCallback). + * Note: Supports only on the Android and iOS. For HTML5, please refer to the official documentation. * Please refer to the official documentation for more details. * @zh - * 设置 JavaScript 接口方案(与 'setOnJSCallback' 配套使用)。
- * 注意:只支持 Android 和 iOS ,Web 端用法请前往官方文档查看。
+ * 设置 JavaScript 接口方案(与 'setOnJSCallback' 配套使用)。 + * 注意:只支持 Android 和 iOS ,Web 端用法请前往官方文档查看。 * 详情请参阅官方文档 * @method setJavascriptInterfaceScheme * @param {String} scheme @@ -130,13 +128,13 @@ export class WebView extends Component { /** * @en * This callback called when load URL that start with javascript - * interface scheme (see also setJavascriptInterfaceScheme).
- * Note: Supports only on the Android and iOS. For HTML5, please refer to the official documentation.
+ * interface scheme (see also setJavascriptInterfaceScheme). + * Note: Supports only on the Android and iOS. For HTML5, please refer to the official documentation. * Please refer to the official documentation for more details. * @zh - * 当加载 URL 以 JavaScript 接口方案开始时调用这个回调函数。
+ * 当加载 URL 以 JavaScript 接口方案开始时调用这个回调函数。 * 注意:只支持 Android 和 iOS,Web 端用法请前往官方文档查看。 - * 详情请参阅官方文档 + * 详情请参阅官方文档。 * @method setOnJSCallback * @param {Function} callback */ @@ -148,12 +146,12 @@ export class WebView extends Component { /** * @en - * Evaluates JavaScript in the context of the currently displayed page.
- * Please refer to the official document for more details
- * Note: Cross domain issues need to be resolved by yourself
+ * Evaluates JavaScript in the context of the currently displayed page. + * Please refer to the official document for more details + * Note: Cross domain issues need to be resolved by yourself * @zh - * 执行 WebView 内部页面脚本(详情请参阅官方文档)
- * 注意:需要自行解决跨域问题 + * 执行 WebView 内部页面脚本(详情请参阅官方文档)。 + * 注意:需要自行解决跨域问题。 * @method evaluateJS * @param {String} str */ diff --git a/cocos/webgpu/instantiated.ts b/cocos/webgpu/instantiated.ts index ef9a10fb09..633c441713 100644 --- a/cocos/webgpu/instantiated.ts +++ b/cocos/webgpu/instantiated.ts @@ -1,20 +1,19 @@ /* eslint-disable @typescript-eslint/no-floating-promises */ /* eslint-disable no-void */ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -23,7 +22,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { WEBGPU } from 'internal:constants'; import webgpuUrl from 'url:native/external/emscripten/webgpu/webgpu_wasm.wasm'; import glslangUrl from 'url:native/external/emscripten/webgpu/glslang.wasm'; diff --git a/cocos/xr/event/xr-event-handle.ts b/cocos/xr/event/xr-event-handle.ts index c14d88fd5c..c6a224f1c0 100644 --- a/cocos/xr/event/xr-event-handle.ts +++ b/cocos/xr/event/xr-event-handle.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { Vec3 } from '../../core/math'; import { Event } from '../../input/types'; diff --git a/cocos/xr/index.ts b/cocos/xr/index.ts index 7f77ced471..bd923db804 100644 --- a/cocos/xr/index.ts +++ b/cocos/xr/index.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ export * from './event/xr-event-handle'; export * from './rendering/ar-background-stage'; diff --git a/cocos/xr/rendering/ar-background-stage.ts b/cocos/xr/rendering/ar-background-stage.ts index 08b766e86e..fd5635753c 100644 --- a/cocos/xr/rendering/ar-background-stage.ts +++ b/cocos/xr/rendering/ar-background-stage.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. https://www.cocos.com/ Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +*/ import { ColorAttachment, DepthStencilAttachment, deviceManager, Rect, RenderPassInfo, StoreOp } from '../../gfx'; import { IRenderStageInfo, RenderStage } from '../../rendering/render-stage'; diff --git a/editor/assets/chunks/builtin/uniforms/cc-global.chunk b/editor/assets/chunks/builtin/uniforms/cc-global.chunk index 7d742e8779..8b75cbe57a 100644 --- a/editor/assets/chunks/builtin/uniforms/cc-global.chunk +++ b/editor/assets/chunks/builtin/uniforms/cc-global.chunk @@ -23,7 +23,7 @@ layout(set = 0, binding = 1) uniform CCCamera { highp mat4 cc_matViewProj; // view-projection matrix highp mat4 cc_matViewProjInv; // inverse view-projection matrix highp vec4 cc_cameraPos; // xyz: camera position w: flip NDC sign - mediump vec4 cc_surfaceTransform; // x: surface transform y: unused zw: skybox rotation angle cos/sin value + mediump vec4 cc_surfaceTransform; // x: surface transform y: camera usage zw: skybox rotation angle cos/sin value mediump vec4 cc_screenScale; // xy: screen scale, zw: inverse screen scale mediump vec4 cc_exposure; // x: exposure, y: inverse exposure, z: HDR flag, w: inverse standard exposure value mediump vec4 cc_mainLitDir; // xyz: main direcitonal light direction, w: enable shadow diff --git a/editor/assets/chunks/common/debug/debug-view-define.chunk b/editor/assets/chunks/common/debug/debug-view-define.chunk index 701aa143ea..5af05c548e 100644 --- a/editor/assets/chunks/common/debug/debug-view-define.chunk +++ b/editor/assets/chunks/common/debug/debug-view-define.chunk @@ -44,18 +44,19 @@ #define CC_SURFACES_DEBUG_VIEW_SINGLE 1 #define CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC 2 -#pragma define IS_DEBUG_VIEW_SINGLE_MODE(mode) equalf(cc_debug_view_mode.x, mode) -#define IS_DEBUG_VIEW_LIGHTING_ENABLE_WITH_ALBEDO (cc_debug_view_mode.y > 0.0) -#define IS_DEBUG_VIEW_MISC_ENABLE_CSM_LAYER_COLORATION (cc_debug_view_mode.z > 0.0) -#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_DIRECT_DIFFUSE (cc_debug_view_composite_pack_1.x > 0.0) -#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_DIRECT_SPECULAR (cc_debug_view_composite_pack_1.y > 0.0) -#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_ENV_DIFFUSE (cc_debug_view_composite_pack_1.z > 0.0) -#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_ENV_SPECULAR (cc_debug_view_composite_pack_1.w > 0.0) -#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_EMISSIVE (cc_debug_view_composite_pack_2.x > 0.0) -#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_LIGHT_MAP (cc_debug_view_composite_pack_2.y > 0.0) -#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_SHADOW (cc_debug_view_composite_pack_2.z > 0.0) -#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_AO (cc_debug_view_composite_pack_2.w > 0.0) -#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_NORMAL_MAP (cc_debug_view_composite_pack_3.x > 0.0) -#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_FOG (cc_debug_view_composite_pack_3.y > 0.0) -#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_TONE_MAPPING (cc_debug_view_composite_pack_3.z > 0.0) -#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_GAMMA_CORRECTION (cc_debug_view_composite_pack_3.w > 0.0) +#define IS_DEBUG_VIEW_ENABLE_WITH_CAMERA (cc_surfaceTransform.y != 3.0) +#pragma define IS_DEBUG_VIEW_SINGLE_MODE(mode) (equalf(cc_debug_view_mode.x, mode) && (cc_surfaceTransform.y != 3.0)) +#define IS_DEBUG_VIEW_LIGHTING_ENABLE_WITH_ALBEDO ((cc_debug_view_mode.y > 0.0) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA) +#define IS_DEBUG_VIEW_MISC_ENABLE_CSM_LAYER_COLORATION ((cc_debug_view_mode.z > 0.0) && IS_DEBUG_VIEW_ENABLE_WITH_CAMERA) +#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_DIRECT_DIFFUSE ((cc_debug_view_composite_pack_1.x > 0.0) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA) +#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_DIRECT_SPECULAR ((cc_debug_view_composite_pack_1.y > 0.0) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA) +#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_ENV_DIFFUSE ((cc_debug_view_composite_pack_1.z > 0.0) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA) +#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_ENV_SPECULAR ((cc_debug_view_composite_pack_1.w > 0.0) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA) +#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_EMISSIVE ((cc_debug_view_composite_pack_2.x > 0.0) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA) +#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_LIGHT_MAP ((cc_debug_view_composite_pack_2.y > 0.0) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA) +#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_SHADOW ((cc_debug_view_composite_pack_2.z > 0.0) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA) +#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_AO ((cc_debug_view_composite_pack_2.w > 0.0) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA) +#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_NORMAL_MAP ((cc_debug_view_composite_pack_3.x > 0.0) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA) +#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_FOG ((cc_debug_view_composite_pack_3.y > 0.0) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA) +#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_TONE_MAPPING ((cc_debug_view_composite_pack_3.z > 0.0) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA) +#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_GAMMA_CORRECTION ((cc_debug_view_composite_pack_3.w > 0.0) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA) diff --git a/editor/assets/chunks/lighting-models/model-functions/standard-common.chunk b/editor/assets/chunks/lighting-models/model-functions/standard-common.chunk index beff7b9d4e..515ff46b65 100644 --- a/editor/assets/chunks/lighting-models/model-functions/standard-common.chunk +++ b/editor/assets/chunks/lighting-models/model-functions/standard-common.chunk @@ -121,8 +121,14 @@ vec3 CalculateEnvironmentSpecular(in LightingIntermediateData lightingData, floa vec3 R = normalize(CalculateReflectDirection(lightingData.N, lightingData.V, lightingData.NoV)); vec3 worldPos; HIGHP_VALUE_FROM_STRUCT_DEFINED(worldPos, lightingData.worldPosition); - vec2 screenUV = GetPlanarReflectScreenUV(worldPos, cc_matViewProj, cc_cameraPos.w, lightingData.V, R); - envSpec = fragTextureLod(cc_reflectionProbePlanarMap, screenUV, cc_ambientGround.w).xyz; + // todo: + // vec4 cc_planarReflectionPlane = vec4(-1.0, 0.0, 0.0, 0.0); + // float cc_planarReflectionDepthScale = 1.0; + // vec3 bumpedWorldPos = CalculatePlanarReflectPositionOnPlane(lightingData.N, lightingData.V, worldPos, cc_planarReflectionPlane, cc_cameraPos.xyz, cc_planarReflectionDepthScale); + vec3 bumpedWorldPos = worldPos; + vec2 screenUV = GetPlanarReflectScreenUV(bumpedWorldPos, cc_matViewProj, cc_cameraPos.w, lightingData.V, R); + vec4 rgbe = fragTextureLod(cc_reflectionProbePlanarMap, screenUV, cc_ambientGround.w); + envSpec = unpackRGBE(rgbe); #endif #elif CC_USE_IBL envSpec = SampleEnvironmentSpecular(cc_environment, lightingData, cc_ambientGround.w); diff --git a/editor/assets/chunks/shading-entries/main-functions/render-to-scene/pipeline/forward-fs.chunk b/editor/assets/chunks/shading-entries/main-functions/render-to-scene/pipeline/forward-fs.chunk index a71721258d..b8fa5af41a 100644 --- a/editor/assets/chunks/shading-entries/main-functions/render-to-scene/pipeline/forward-fs.chunk +++ b/editor/assets/chunks/shading-entries/main-functions/render-to-scene/pipeline/forward-fs.chunk @@ -93,9 +93,10 @@ void main() { debugColor.rgb = LinearToSRGB(debugColor.rgb); } } - - fragColorX = debugColor; - return; + if (IS_DEBUG_VIEW_ENABLE_WITH_CAMERA) { + fragColorX = debugColor; + return; + } #elif CC_USE_DEBUG_VIEW == CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC && CC_SURFACES_ENABLE_DEBUG_VIEW CCSurfacesDebugViewCompositeLightingResult(lightingResult); diff --git a/editor/assets/effects/pipeline/bloom.effect b/editor/assets/effects/pipeline/bloom.effect index c1593f05c7..110f47baf2 100644 --- a/editor/assets/effects/pipeline/bloom.effect +++ b/editor/assets/effects/pipeline/bloom.effect @@ -5,38 +5,86 @@ CCEffect %{ - passes: - vert: bloom-vs frag: prefilter-fs - phase: bloom-prefilter + pass: bloom-prefilter depthStencilState: depthTest: false depthWrite: false # Supports up to MAX_BLOOM_FILTER_PASS_NUM upsample/downsample passes - - &downsample - vert: bloom-vs - frag: downsample-fs - phase: bloom-downsample - depthStencilState: - depthTest: false - depthWrite: false - - *downsample - - *downsample - - *downsample - - *downsample - - *downsample - - &upsample - vert: bloom-vs - frag: upsample-fs - phase: bloom-upsample - depthStencilState: - depthTest: false - depthWrite: false - - *upsample - - *upsample - - *upsample - - *upsample - - *upsample + - vert: bloom-vs + frag: downsample-fs + pass: bloom-downsample0 + depthStencilState: + depthTest: false + depthWrite: false + - vert: bloom-vs + frag: downsample-fs + pass: bloom-downsample1 + depthStencilState: + depthTest: false + depthWrite: false + - vert: bloom-vs + frag: downsample-fs + pass: bloom-downsample2 + depthStencilState: + depthTest: false + depthWrite: false + - vert: bloom-vs + frag: downsample-fs + pass: bloom-downsample3 + depthStencilState: + depthTest: false + depthWrite: false + - vert: bloom-vs + frag: downsample-fs + pass: bloom-downsample4 + depthStencilState: + depthTest: false + depthWrite: false + - vert: bloom-vs + frag: downsample-fs + pass: bloom-downsample5 + depthStencilState: + depthTest: false + depthWrite: false + - vert: bloom-vs + frag: upsample-fs + pass: bloom-upsample0 + depthStencilState: + depthTest: false + depthWrite: false + - vert: bloom-vs + frag: upsample-fs + pass: bloom-upsample1 + depthStencilState: + depthTest: false + depthWrite: false + - vert: bloom-vs + frag: upsample-fs + pass: bloom-upsample2 + depthStencilState: + depthTest: false + depthWrite: false + - vert: bloom-vs + frag: upsample-fs + pass: bloom-upsample3 + depthStencilState: + depthTest: false + depthWrite: false + - vert: bloom-vs + frag: upsample-fs + pass: bloom-upsample4 + depthStencilState: + depthTest: false + depthWrite: false + - vert: bloom-vs + frag: upsample-fs + pass: bloom-upsample5 + depthStencilState: + depthTest: false + depthWrite: false - vert: bloom-vs frag: combine-fs - phase: bloom-combine + pass: bloom-combine depthStencilState: depthTest: false depthWrite: false @@ -70,6 +118,7 @@ CCProgram prefilter-fs %{ uniform BloomUBO { mediump vec4 texSize; }; + #pragma rate outputResultMap pass uniform sampler2D outputResultMap; layout(location = 0) out vec4 fragColor; @@ -98,6 +147,7 @@ CCProgram downsample-fs %{ uniform BloomUBO { mediump vec4 texSize; }; + #pragma rate bloomTexture pass uniform sampler2D bloomTexture; layout(location = 0) out vec4 fragColor; @@ -140,6 +190,7 @@ CCProgram upsample-fs %{ uniform BloomUBO { mediump vec4 texSize; }; + #pragma rate bloomTexture pass uniform sampler2D bloomTexture; layout(location = 0) out vec4 fragColor; @@ -182,7 +233,9 @@ CCProgram combine-fs %{ uniform BloomUBO { mediump vec4 texSize; }; + #pragma rate outputResultMap pass uniform sampler2D outputResultMap; + #pragma rate bloomTexture pass uniform sampler2D bloomTexture; layout(location = 0) out vec4 fragColor; diff --git a/editor/assets/effects/pipeline/deferred-lighting.effect b/editor/assets/effects/pipeline/deferred-lighting.effect index e1f3526970..e6287ad97c 100644 --- a/editor/assets/effects/pipeline/deferred-lighting.effect +++ b/editor/assets/effects/pipeline/deferred-lighting.effect @@ -5,7 +5,7 @@ CCEffect %{ - passes: - vert: lighting-vs frag: lighting-fs - phase: deferred-lighting + pass: deferred-lighting depthStencilState: depthFunc: greater depthTest: true @@ -60,9 +60,13 @@ CCProgram lighting-fs %{ layout(binding = 3) uniform sampler2D depth_stencil; #endif #else + #pragma rate gbuffer_albedoMap pass layout(binding = 0) uniform sampler2D gbuffer_albedoMap; + #pragma rate gbuffer_normalMap pass layout(binding = 1) uniform sampler2D gbuffer_normalMap; + #pragma rate gbuffer_emissiveMap pass layout(binding = 2) uniform sampler2D gbuffer_emissiveMap; + #pragma rate depth_stencil pass layout(binding = 3) uniform sampler2D depth_stencil; #endif diff --git a/editor/assets/effects/pipeline/post-process.effect b/editor/assets/effects/pipeline/post-process.effect index 3b9023bd22..5e99e8ee7a 100644 --- a/editor/assets/effects/pipeline/post-process.effect +++ b/editor/assets/effects/pipeline/post-process.effect @@ -5,7 +5,7 @@ CCEffect %{ - passes: - vert: post-process-vs frag: post-process-fs - phase: post-process + pass: post-process depthStencilState: depthTest: false depthWrite: false @@ -44,6 +44,7 @@ CCProgram post-process-fs %{ #include in vec2 v_uv; + #pragma rate outputResultMap pass layout(binding = 0) uniform sampler2D outputResultMap; layout(location = 0) out vec4 fragColor; diff --git a/editor/exports/distributed.ts b/editor/exports/distributed.ts deleted file mode 100644 index 45ff6b046c..0000000000 --- a/editor/exports/distributed.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '../../cocos/core/distributed/utils'; diff --git a/editor/exports/lod-group-utils.ts b/editor/exports/lod-group-utils.ts index be2b099c65..768f4c7cc9 100644 --- a/editor/exports/lod-group-utils.ts +++ b/editor/exports/lod-group-utils.ts @@ -1,2 +1 @@ export { LODGroupEditorUtility } from '../../cocos/rendering/lod-group-editor-utility'; -export { LODModelsCachedUtils } from '../../cocos/rendering/lod-models-utils'; diff --git a/editor/inspector/assets/fbx/model.js b/editor/inspector/assets/fbx/model.js index b729b13af0..4a2392dd5c 100644 --- a/editor/inspector/assets/fbx/model.js +++ b/editor/inspector/assets/fbx/model.js @@ -32,7 +32,7 @@ exports.template = /* html */` - + diff --git a/editor/inspector/assets/mesh-preview.js b/editor/inspector/assets/mesh-preview.js index 51f35d80b6..e6aad44ed0 100644 --- a/editor/inspector/assets/mesh-preview.js +++ b/editor/inspector/assets/mesh-preview.js @@ -245,7 +245,6 @@ exports.methods = { } if (panel.$.previewType.value === previewSelectType.uv) { info = panel.glPreview.computedUV(panel.previewUVs[panel.$.previewChannel.value], canvas.width, canvas.height); - info.buffer = info.data; } panel.glPreview.drawGL(info); diff --git a/editor/inspector/components/class.js b/editor/inspector/components/class.js index 3c9f82169c..c7a53033e9 100644 --- a/editor/inspector/components/class.js +++ b/editor/inspector/components/class.js @@ -26,6 +26,8 @@ exports.methods = { $group.setAttribute('class', 'tab-group'); $group.dump = dump; $group.tabs = {}; + $group.displayOrder = dump.displayOrder; + $group.$header = document.createElement('ui-tab'); $group.$header.setAttribute('class', 'tab-header'); $group.appendChild($group.$header); @@ -80,7 +82,8 @@ exports.methods = { $button.appendChild($label); $group.$header.appendChild($button); }, - appendChildByDisplayOrder(parent, newChild, displayOrder = 0) { + appendChildByDisplayOrder(parent, newChild) { + const displayOrder = newChild.displayOrder || 0; const children = Array.from(parent.children); const child = children.find(child => child.dump && child.displayOrder > displayOrder); if (child) { @@ -145,22 +148,22 @@ async function update(dump) { } if ($panel.$groups[id]) { if (!$panel.$groups[id].isConnected) { - $panel.appendChildByDisplayOrder($section, $panel.$groups[id], dump.groups[id].displayOrder); + $panel.appendChildByDisplayOrder($section, $panel.$groups[id]); } if (dump.groups[id].style === 'tab') { $panel.appendToTabGroup($panel.$groups[id], name); } } - $panel.appendChildByDisplayOrder($panel.$groups[id].tabs[name], $prop, $prop.displayOrder); + $panel.appendChildByDisplayOrder($panel.$groups[id].tabs[name], $prop); } else { - $panel.appendChildByDisplayOrder($section, $prop, $prop.displayOrder); + $panel.appendChildByDisplayOrder($section, $prop); } } else if (!$prop.isConnected || !$prop.parentElement) { if (info.group && dump.groups) { const { id = 'default', name } = info.group; - $panel.appendChildByDisplayOrder($panel.$groups[id].tabs[name], $prop, $prop.displayOrder); + $panel.appendChildByDisplayOrder($panel.$groups[id].tabs[name], $prop); } else { - $panel.appendChildByDisplayOrder($section, $prop, $prop.displayOrder); + $panel.appendChildByDisplayOrder($section, $prop); } } $prop.render(info); diff --git a/editor/inspector/components/lod-group/lod-item.js b/editor/inspector/components/lod-group/lod-item.js index 8213e24655..f8cb616a34 100644 --- a/editor/inspector/components/lod-group/lod-item.js +++ b/editor/inspector/components/lod-group/lod-item.js @@ -28,7 +28,7 @@ exports.template = ` :ref="screenUsagePercentageRef" :min="minScreenUsagePercentage" :max="maxScreenUsagePercentage" - :value="data.value.screenUsagePercentage.value * 100" + :value="Editor.Utils.Math.multi(data.value.screenUsagePercentage.value, 100)" @confirm="onScreenSizeConfirm($event)"> @@ -100,8 +100,8 @@ exports.watch = { const LODs = obj.value.LODs.value; const min = LODs[that.index + 1] ? LODs[that.index + 1].value.screenUsagePercentage.value : 0; const max = LODs[that.index - 1] ? LODs[that.index - 1].value.screenUsagePercentage.value : null; - that.minScreenUsagePercentage = min * 100; - that.maxScreenUsagePercentage = max ? max * 100 : null; + that.minScreenUsagePercentage = Editor.Utils.Math.multi(min, 100); + that.maxScreenUsagePercentage = max ? Editor.Utils.Math.multi(max, 100) : null; } that.$nextTick(() => { that.data = obj.value.LODs.value[that.index]; @@ -128,7 +128,7 @@ exports.methods = { if (!that.enableUpdateScreenUsagePercentage) { return; } - that.data.value.screenUsagePercentage.value = event.target.value / 100; + that.data.value.screenUsagePercentage.value = Editor.Utils.Math.divide(event.target.value, 100); that.updateDump(that.data.value.screenUsagePercentage); trackEventWithTimer('LOD', 'A100009'); }, @@ -163,8 +163,8 @@ exports.methods = { const that = this; let size = await Editor.Message.request('scene', 'lod-apply-current-camera-size', that.dump.value.uuid.value); if (that.$refs[that.screenUsagePercentageRef]) { - const min = that.$refs[that.screenUsagePercentageRef].min / 100 || 0; - const max = that.$refs[that.screenUsagePercentageRef].max ? that.$refs[that.screenUsagePercentageRef].max / 100 : null; + const min = Editor.Utils.Math.divide(that.$refs[that.screenUsagePercentageRef].min, 100) || 0; + const max = that.$refs[that.screenUsagePercentageRef].max ? Editor.Utils.Math.divide(that.$refs[that.screenUsagePercentageRef].max, 100) : null; if (size < min) { size = min; console.log(Editor.I18n.t('ENGINE.components.lod.applyCameraSizeLessThanMinimum')); diff --git a/editor/inspector/components/lod-group/multi-lod-group.js b/editor/inspector/components/lod-group/multi-lod-group.js index ed4b9194e9..afced91e2a 100644 --- a/editor/inspector/components/lod-group/multi-lod-group.js +++ b/editor/inspector/components/lod-group/multi-lod-group.js @@ -29,7 +29,7 @@ exports.template = ` :min="calculateMultiRange('min', index)" :max="calculateMultiRange('max', index)" :invalid="screenSize === 'invalid'" - :value="screenSize === 'invalid' ? null : screenSize * 100" + :value="screenSize === 'invalid' ? null : Editor.Utils.Math.multi(screenSize, 100)" @confirm="onMultiScreenSizeConfirm($event, index)" > @@ -93,7 +93,7 @@ exports.methods = { onMultiScreenSizeConfirm(event, index) { const that = this; that.dump.value.LODs.values.forEach((lod) => { - lod[index] && (lod[index].value.screenUsagePercentage.value = event.target.value / 100); + lod[index] && (lod[index].value.screenUsagePercentage.value = Editor.Utils.Math.divide(event.target.value, 100)); }); that.updateDump(that.dump.value.LODs); trackEventWithTimer('LOD', 'A100011'); @@ -125,7 +125,7 @@ exports.methods = { min = multiLods[index + 1].value.screenUsagePercentage.value; } } - return min * 100; + return Editor.Utils.Math.multi(min, 100); } else if (range === 'max') { let max = that.dump.value.LODs.values[0][index - 1] ? that.dump.value.LODs.values[0][index - 1].value.screenUsagePercentage.value : null; if (max) { @@ -135,7 +135,7 @@ exports.methods = { max = multiLods[index - 1].value.screenUsagePercentage.value; } } - return max * 100; + return Editor.Utils.Math.multi(max, 100); } } return null; diff --git a/editor/inspector/contributions/node.js b/editor/inspector/contributions/node.js index 0c3332c8a9..40144b5935 100644 --- a/editor/inspector/contributions/node.js +++ b/editor/inspector/contributions/node.js @@ -924,6 +924,9 @@ const Elements = { panel.$.nodeLink.addEventListener('click', (event) => { event.stopPropagation(); }); + + Elements.node.i18nChangeBind = Elements.node.i18nChange.bind(panel); + Editor.Message.addBroadcastListener('i18n:change', Elements.node.i18nChangeBind); }, async update() { const panel = this; @@ -1162,6 +1165,32 @@ const Elements = { delete panel.$.nodeSection.__node_panels__; } }, + close() { + Editor.Message.removeBroadcastListener('i18n:change', Elements.node.i18nChangeBind); + }, + i18nChange() { + const panel = this; + + panel.$.nodeLink.value = Editor.I18n.t('ENGINE.help.cc.Node'); + + const sectionBody = panel.$.sectionBody; + for (let index = 0; index < sectionBody.__sections__.length; index++) { + const $section = sectionBody.__sections__[index]; + const $link = $section.querySelector('ui-link'); + + if (!$link) { + continue; + } + + const dump = $section.dump; + const url = panel.getHelpUrl(dump.editor); + if (url) { + $link.setAttribute('value', url); + } else { + $link.removeAttribute('value'); + } + } + }, }, missingComponent: { ready() { @@ -1637,6 +1666,13 @@ exports.methods = { const clipboardNodeWorldTransform = Editor.Clipboard.read('_dump_node_world_transform_'); const clipboardComponentInfo = Editor.Clipboard.read('_dump_component_'); + function notEqualDefaultValueVec3(propName) { + const keys = ['x', 'y', 'z']; + return keys.some(key => { + return dump[propName].value[key] !== dump[propName].default.value[key].value; + }); + } + Editor.Menu.popup({ menu: [ { @@ -1758,7 +1794,7 @@ exports.methods = { { type: 'separator' }, { label: Editor.I18n.t('ENGINE.menu.reset_node_position'), - enabled: !dump.position.readonly && JSON.stringify(dump.position.value) !== JSON.stringify(dump.position.default), + enabled: !dump.position.readonly && notEqualDefaultValueVec3('position'), async click() { Editor.Message.send('scene', 'snapshot'); @@ -1774,7 +1810,7 @@ exports.methods = { }, { label: Editor.I18n.t('ENGINE.menu.reset_node_rotation'), - enabled: !dump.rotation.readonly && JSON.stringify(dump.rotation.value) !== JSON.stringify(dump.rotation.default), + enabled: !dump.rotation.readonly && notEqualDefaultValueVec3('rotation'), async click() { Editor.Message.send('scene', 'snapshot'); @@ -1790,7 +1826,7 @@ exports.methods = { }, { label: Editor.I18n.t('ENGINE.menu.reset_node_scale'), - enabled: !dump.scale.readonly && JSON.stringify(dump.scale.value) !== JSON.stringify(dump.scale.default), + enabled: !dump.scale.readonly && notEqualDefaultValueVec3('scale'), async click() { Editor.Message.send('scene', 'snapshot'); @@ -1806,7 +1842,7 @@ exports.methods = { }, { label: Editor.I18n.t('ENGINE.menu.reset_node_mobility'), - enabled: !dump.mobility.readonly && JSON.stringify(dump.mobility.value) !== JSON.stringify(dump.mobility.default), + enabled: !dump.mobility.readonly && dump.mobility.value !== dump.mobility.default, async click() { Editor.Message.send('scene', 'snapshot'); diff --git a/editor/inspector/utils/prop.js b/editor/inspector/utils/prop.js index 0ebec643d4..459bd2c378 100644 --- a/editor/inspector/utils/prop.js +++ b/editor/inspector/utils/prop.js @@ -240,7 +240,7 @@ exports.updatePropByDump = function(panel, dump) { if (panel.$groups[id]) { if (!panel.$groups[id].isConnected) { - exports.appendChildByDisplayOrder(panel.$.componentContainer, panel.$groups[id], dump.groups[id].displayOrder); + exports.appendChildByDisplayOrder(panel.$.componentContainer, panel.$groups[id]); } if (dump.groups[id].style === 'tab') { @@ -248,18 +248,18 @@ exports.updatePropByDump = function(panel, dump) { } } - exports.appendChildByDisplayOrder(panel.$groups[id].tabs[name], $prop, $prop.displayOrder); + exports.appendChildByDisplayOrder(panel.$groups[id].tabs[name], $prop); } else { - exports.appendChildByDisplayOrder(panel.$.componentContainer, $prop, $prop.displayOrder); + exports.appendChildByDisplayOrder(panel.$.componentContainer, $prop); } } } else if (!$prop.isConnected || !$prop.parentElement) { if (!element || !element.isAppendToParent || element.isAppendToParent.call(panel)) { if (info.group && dump.groups) { const { id = 'default', name } = info.group; - exports.appendChildByDisplayOrder(panel.$groups[id].tabs[name], $prop, $prop.displayOrder); + exports.appendChildByDisplayOrder(panel.$groups[id].tabs[name], $prop); } else { - exports.appendChildByDisplayOrder(panel.$.componentContainer, $prop, $prop.displayOrder); + exports.appendChildByDisplayOrder(panel.$.componentContainer, $prop); } } } @@ -339,6 +339,7 @@ exports.createTabGroup = function(dump, panel) { $group.dump = dump; $group.tabs = {}; + $group.displayOrder = dump.displayOrder; $group.$header = document.createElement('ui-tab'); $group.$header.setAttribute('class', 'tab-header'); @@ -423,7 +424,8 @@ exports.appendToTabGroup = function($group, tabName) { $group.$header.appendChild($button); }; -exports.appendChildByDisplayOrder = function(parent, newChild, displayOrder = 0) { +exports.appendChildByDisplayOrder = function(parent, newChild) { + const displayOrder = newChild.displayOrder || 0; const children = Array.from(parent.children); const child = children.find((child) => { diff --git a/exports/physics-cannon.ts b/exports/physics-cannon.ts index 7501c1e668..5e3f43f27e 100644 --- a/exports/physics-cannon.ts +++ b/exports/physics-cannon.ts @@ -26,7 +26,7 @@ import CANNON from '@cocos/cannon'; import '../cocos/physics/cannon/instantiate'; -if (window) window.CANNON = CANNON; +if (globalThis) globalThis.CANNON = CANNON; // polyfill config (CANNON as any).CC_CONFIG = { diff --git a/licenses/ENGINE_license.txt b/licenses/ENGINE_license.txt deleted file mode 100644 index a6618f89ea..0000000000 --- a/licenses/ENGINE_license.txt +++ /dev/null @@ -1,23 +0,0 @@ -Copyright (c) 2013-2016 Chukong Technologies Inc. -Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd. - -http://www.cocos.com - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated engine source code (the "Software"), a limited, -worldwide, royalty-free, non-assignable, revocable and non-exclusive license -to use Cocos Creator solely to develop games on your target platforms. You shall -not use Cocos Creator software for developing other software or tools that's -used for developing games. You are not granted to publish, distribute, -sublicense, and/or sell copies of Cocos Creator. - -The software or tools in this License Agreement are licensed, not sold. -Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/native/CMakeLists.txt b/native/CMakeLists.txt index 2a27a906a3..201188e535 100644 --- a/native/CMakeLists.txt +++ b/native/CMakeLists.txt @@ -444,6 +444,7 @@ cocos_source_files( cocos/base/StringPool.h cocos/base/StringUtil.cpp cocos/base/StringUtil.h + cocos/base/TemplateUtils.h cocos/base/ThreadPool.cpp cocos/base/ThreadPool.h cocos/base/TypeDef.h @@ -1087,6 +1088,8 @@ cocos_source_files( cocos/renderer/core/PassUtils.cpp cocos/renderer/core/ProgramLib.h cocos/renderer/core/ProgramLib.cpp + cocos/renderer/core/ProgramUtils.h + cocos/renderer/core/ProgramUtils.cpp cocos/renderer/core/MaterialInstance.h cocos/renderer/core/MaterialInstance.cpp cocos/renderer/core/PassInstance.h @@ -1248,8 +1251,6 @@ cocos_source_files( cocos/renderer/pipeline/Define.cpp cocos/renderer/pipeline/GlobalDescriptorSetManager.h cocos/renderer/pipeline/GlobalDescriptorSetManager.cpp - cocos/renderer/pipeline/LODModelsUtil.cpp - cocos/renderer/pipeline/LODModelsUtil.h cocos/renderer/pipeline/InstancedBuffer.cpp cocos/renderer/pipeline/InstancedBuffer.h cocos/renderer/pipeline/PipelineStateManager.cpp @@ -1313,7 +1314,7 @@ cocos_source_files( cocos/renderer/pipeline/helper/Utils.cpp cocos/renderer/pipeline/custom/BinaryArchive.h cocos/renderer/pipeline/custom/FrameGraphDispatcher.cpp - cocos/renderer/pipeline/custom/SerializationUtils.h + cocos/renderer/pipeline/custom/details/SerializationUtils.h cocos/renderer/pipeline/custom/test/test.h cocos/renderer/pipeline/custom/NativeDefaultScene.cpp cocos/renderer/pipeline/custom/NativeResourceGraph.cpp @@ -1331,23 +1332,27 @@ cocos_source_files( cocos/renderer/pipeline/custom/FGDispatcherTypes.h cocos/renderer/pipeline/custom/LayoutGraphFwd.h cocos/renderer/pipeline/custom/LayoutGraphGraphs.h - cocos/renderer/pipeline/custom/LayoutGraphJsb.cpp - cocos/renderer/pipeline/custom/LayoutGraphJsb.h cocos/renderer/pipeline/custom/LayoutGraphNames.h - cocos/renderer/pipeline/custom/LayoutGraphReflection.cpp - cocos/renderer/pipeline/custom/LayoutGraphReflection.h cocos/renderer/pipeline/custom/LayoutGraphSerialization.h cocos/renderer/pipeline/custom/LayoutGraphTypes.cpp cocos/renderer/pipeline/custom/LayoutGraphTypes.h + cocos/renderer/pipeline/custom/LayoutGraphUtils.cpp + cocos/renderer/pipeline/custom/LayoutGraphUtils.h cocos/renderer/pipeline/custom/NativeExecutor.cpp - cocos/renderer/pipeline/custom/NativeLayoutGraphImpl.cpp + cocos/renderer/pipeline/custom/NativeFactory.cpp + cocos/renderer/pipeline/custom/NativeFwd.h + cocos/renderer/pipeline/custom/NativeLayoutGraph.cpp + cocos/renderer/pipeline/custom/NativePipeline.cpp cocos/renderer/pipeline/custom/NativePipelineFwd.h cocos/renderer/pipeline/custom/NativePipelineGraphs.h - cocos/renderer/pipeline/custom/NativePipelineImpl.cpp cocos/renderer/pipeline/custom/NativePipelineTypes.cpp cocos/renderer/pipeline/custom/NativePipelineTypes.h + cocos/renderer/pipeline/custom/NativeProgramLibrary.cpp cocos/renderer/pipeline/custom/NativeRenderGraph.cpp cocos/renderer/pipeline/custom/NativeRenderQueue.cpp + cocos/renderer/pipeline/custom/NativeRenderingModule.cpp + cocos/renderer/pipeline/custom/NativeTypes.cpp + cocos/renderer/pipeline/custom/NativeTypes.h cocos/renderer/pipeline/custom/PrivateFwd.h cocos/renderer/pipeline/custom/PrivateTypes.cpp cocos/renderer/pipeline/custom/PrivateTypes.h @@ -1355,22 +1360,14 @@ cocos_source_files( cocos/renderer/pipeline/custom/RenderCommonJsb.cpp cocos/renderer/pipeline/custom/RenderCommonJsb.h cocos/renderer/pipeline/custom/RenderCommonNames.h - cocos/renderer/pipeline/custom/RenderCommonReflection.cpp - cocos/renderer/pipeline/custom/RenderCommonReflection.h cocos/renderer/pipeline/custom/RenderCommonSerialization.h cocos/renderer/pipeline/custom/RenderCommonTypes.cpp cocos/renderer/pipeline/custom/RenderCommonTypes.h cocos/renderer/pipeline/custom/RenderGraphFwd.h cocos/renderer/pipeline/custom/RenderGraphGraphs.h - cocos/renderer/pipeline/custom/RenderGraphJsb.cpp - cocos/renderer/pipeline/custom/RenderGraphJsb.h - cocos/renderer/pipeline/custom/RenderGraphNames.h - cocos/renderer/pipeline/custom/RenderGraphReflection.cpp - cocos/renderer/pipeline/custom/RenderGraphReflection.h cocos/renderer/pipeline/custom/RenderGraphTypes.cpp cocos/renderer/pipeline/custom/RenderGraphTypes.h cocos/renderer/pipeline/custom/RenderInterfaceFwd.h - cocos/renderer/pipeline/custom/RenderInterfaceImpl.cpp cocos/renderer/pipeline/custom/RenderInterfaceTypes.cpp cocos/renderer/pipeline/custom/RenderInterfaceTypes.h ) diff --git a/native/cmake/scripts/engine-version.js b/native/cmake/scripts/engine-version.js index cf61296ad4..5095e0f6cb 100644 --- a/native/cmake/scripts/engine-version.js +++ b/native/cmake/scripts/engine-version.js @@ -36,29 +36,29 @@ const minorVersion = parseInt(version_result[2]); const patchVersion = version_result[4] ? parseInt(version_result[4]) : 0; const preRelease = version_result[6] ? version_result[6] : 'release'; const versionIntValue = majorVersion * 10000 + minorVersion * 100 + patchVersion; +const fullYear = (new Date).getFullYear(); const version_header = `/**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. +Copyright (c) ${fullYear <= 2022 ? "2022" : "2022-"+fullYear} Xiamen Yaji Software Co., Ltd. - http://www.cocos.com +http://www.cocos.com - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. ****************************************************************************/ #pragma once diff --git a/native/cocos/2d/renderer/Batcher2d.cpp b/native/cocos/2d/renderer/Batcher2d.cpp index 0ee8bc517e..3625d4ad68 100644 --- a/native/cocos/2d/renderer/Batcher2d.cpp +++ b/native/cocos/2d/renderer/Batcher2d.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -27,6 +26,7 @@ #include "application/ApplicationManager.h" #include "base/TypeDef.h" #include "core/Root.h" +#include "core/scene-graph/Scene.h" #include "editor-support/MiddlewareManager.h" #include "renderer/pipeline/Define.h" #include "scene/Pass.h" @@ -94,9 +94,18 @@ void Batcher2d::syncRootNodesToNative(ccstd::vector&& rootNodes) { } void Batcher2d::fillBuffersAndMergeBatches() { + size_t index = 0; for (auto* rootNode : _rootNodeArr) { + // _batches will add by generateBatch walk(rootNode, 1); generateBatch(_currEntity, _currDrawInfo); + + auto* scene = rootNode->getScene()->getRenderScene(); + size_t const count = _batches.size(); + for (size_t i = index; i < count; i++) { + scene->addBatch(_batches.at(i)); + } + index = count; } } @@ -265,11 +274,7 @@ CC_FORCE_INLINE void Batcher2d::handleMiddlewareDraw(RenderEntity* entity, Rende // check for merge draw auto enableBatch = !entity->getUseLocal(); - if (enableBatch && _currTexture == texture && _currMeshBuffer == meshBuffer - && !_currEntity->getUseLocal() - && material->getHash() == _currMaterial->getHash() - && drawInfo->getIndexOffset() == _currDrawInfo->getIndexOffset() + _currDrawInfo->getIbCount() - && layer == _currLayer) { + if (enableBatch && _currTexture == texture && _currMeshBuffer == meshBuffer && !_currEntity->getUseLocal() && material->getHash() == _currMaterial->getHash() && drawInfo->getIndexOffset() == _currDrawInfo->getIndexOffset() + _currDrawInfo->getIbCount() && layer == _currLayer) { auto ibCount = _currDrawInfo->getIbCount(); _currDrawInfo->setIbCount(ibCount + drawInfo->getIbCount()); } else { @@ -477,12 +482,6 @@ bool Batcher2d::initialize() { void Batcher2d::update() { fillBuffersAndMergeBatches(); resetRenderStates(); - - for (const auto& scene : Root::getInstance()->getScenes()) { - for (auto* batch : _batches) { - scene->addBatch(batch); - } - } } void Batcher2d::uploadBuffers() { diff --git a/native/cocos/2d/renderer/Batcher2d.h b/native/cocos/2d/renderer/Batcher2d.h index b49e955b82..8aa875b91f 100644 --- a/native/cocos/2d/renderer/Batcher2d.h +++ b/native/cocos/2d/renderer/Batcher2d.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/2d/renderer/RenderDrawInfo.cpp b/native/cocos/2d/renderer/RenderDrawInfo.cpp index 413217d818..4c05041e78 100644 --- a/native/cocos/2d/renderer/RenderDrawInfo.cpp +++ b/native/cocos/2d/renderer/RenderDrawInfo.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/2d/renderer/RenderDrawInfo.h b/native/cocos/2d/renderer/RenderDrawInfo.h index f3271d9926..a0beea79ef 100644 --- a/native/cocos/2d/renderer/RenderDrawInfo.h +++ b/native/cocos/2d/renderer/RenderDrawInfo.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/2d/renderer/RenderEntity.cpp b/native/cocos/2d/renderer/RenderEntity.cpp index b0317c60a8..3010e7e975 100644 --- a/native/cocos/2d/renderer/RenderEntity.cpp +++ b/native/cocos/2d/renderer/RenderEntity.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/2d/renderer/RenderEntity.h b/native/cocos/2d/renderer/RenderEntity.h index f61e1d121f..c5e4700edb 100644 --- a/native/cocos/2d/renderer/RenderEntity.h +++ b/native/cocos/2d/renderer/RenderEntity.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/2d/renderer/StencilManager.cpp b/native/cocos/2d/renderer/StencilManager.cpp index b401c79612..e9f0f4bba3 100644 --- a/native/cocos/2d/renderer/StencilManager.cpp +++ b/native/cocos/2d/renderer/StencilManager.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/2d/renderer/StencilManager.h b/native/cocos/2d/renderer/StencilManager.h index c56afa5e8a..8853fbe538 100644 --- a/native/cocos/2d/renderer/StencilManager.h +++ b/native/cocos/2d/renderer/StencilManager.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/2d/renderer/UIMeshBuffer.cpp b/native/cocos/2d/renderer/UIMeshBuffer.cpp index 2bf6dc4901..6f539c46e2 100644 --- a/native/cocos/2d/renderer/UIMeshBuffer.cpp +++ b/native/cocos/2d/renderer/UIMeshBuffer.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -49,7 +48,7 @@ void UIMeshBuffer::setIData(uint16_t* iData) { _iData = iData; } -void UIMeshBuffer::initialize(ccstd::vector &&attrs, bool needCreateLayout) { +void UIMeshBuffer::initialize(ccstd::vector&& attrs, bool needCreateLayout) { _attributes = attrs; _vertexFormatBytes = getAttributesStride(attrs); if (needCreateLayout) { diff --git a/native/cocos/2d/renderer/UIMeshBuffer.h b/native/cocos/2d/renderer/UIMeshBuffer.h index 52e3a04570..1ae94eed18 100644 --- a/native/cocos/2d/renderer/UIMeshBuffer.h +++ b/native/cocos/2d/renderer/UIMeshBuffer.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/2d/renderer/UIModelProxy.cpp b/native/cocos/2d/renderer/UIModelProxy.cpp index da5ed53838..5d3e23ba75 100644 --- a/native/cocos/2d/renderer/UIModelProxy.cpp +++ b/native/cocos/2d/renderer/UIModelProxy.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/2d/renderer/UIModelProxy.h b/native/cocos/2d/renderer/UIModelProxy.h index e19393b868..c069980802 100644 --- a/native/cocos/2d/renderer/UIModelProxy.h +++ b/native/cocos/2d/renderer/UIModelProxy.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/3d/assets/Mesh.cpp b/native/cocos/3d/assets/Mesh.cpp index 19eaec9ee1..588247e8d7 100644 --- a/native/cocos/3d/assets/Mesh.cpp +++ b/native/cocos/3d/assets/Mesh.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/3d/assets/Mesh.h b/native/cocos/3d/assets/Mesh.h index 0eff1c2267..8f7c37fd52 100644 --- a/native/cocos/3d/assets/Mesh.h +++ b/native/cocos/3d/assets/Mesh.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/3d/assets/Morph.cpp b/native/cocos/3d/assets/Morph.cpp index ddb2144a12..a6597b1177 100644 --- a/native/cocos/3d/assets/Morph.cpp +++ b/native/cocos/3d/assets/Morph.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/3d/assets/Morph.h b/native/cocos/3d/assets/Morph.h index ba4cd7d4c5..30c670a0b4 100644 --- a/native/cocos/3d/assets/Morph.h +++ b/native/cocos/3d/assets/Morph.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/3d/assets/MorphRendering.cpp b/native/cocos/3d/assets/MorphRendering.cpp index cac7a8c986..43bbdd7402 100644 --- a/native/cocos/3d/assets/MorphRendering.cpp +++ b/native/cocos/3d/assets/MorphRendering.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -258,7 +257,7 @@ Vec4TextureFactory createVec4TextureFactory(gfx::Device *gfxDevice, uint32_t vec uint32_t width = 0; uint32_t height = 0; bestSizeToHavePixels(pixelRequired, &width, &height); - CC_ASSERT_GE(width * height , pixelRequired); + CC_ASSERT_GE(width * height, pixelRequired); Vec4TextureFactory ret; ret.width = width; diff --git a/native/cocos/3d/assets/MorphRendering.h b/native/cocos/3d/assets/MorphRendering.h index e489045708..36dc7aa3c7 100644 --- a/native/cocos/3d/assets/MorphRendering.h +++ b/native/cocos/3d/assets/MorphRendering.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/3d/assets/Skeleton.cpp b/native/cocos/3d/assets/Skeleton.cpp index 725d362299..5554194766 100644 --- a/native/cocos/3d/assets/Skeleton.cpp +++ b/native/cocos/3d/assets/Skeleton.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/3d/assets/Skeleton.h b/native/cocos/3d/assets/Skeleton.h index 7f34b50a06..73e21848b9 100644 --- a/native/cocos/3d/assets/Skeleton.h +++ b/native/cocos/3d/assets/Skeleton.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/3d/assets/Types.cpp b/native/cocos/3d/assets/Types.cpp index f4f85312ee..db3c33e3ed 100644 --- a/native/cocos/3d/assets/Types.cpp +++ b/native/cocos/3d/assets/Types.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/3d/assets/Types.h b/native/cocos/3d/assets/Types.h index 0245fd61f3..1e919356bf 100644 --- a/native/cocos/3d/assets/Types.h +++ b/native/cocos/3d/assets/Types.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -37,7 +36,7 @@ using MeshWeightsType = ccstd::vector; * @en Array views for index buffer * @zh 允许存储索引的数组视图 */ -using IBArray = ccstd::variant; +using IBArray = ccstd::variant; template T getIBArrayValue(const IBArray &arr, uint32_t idx) { diff --git a/native/cocos/3d/misc/Buffer.cpp b/native/cocos/3d/misc/Buffer.cpp index 7353b8be1e..943188d0fb 100644 --- a/native/cocos/3d/misc/Buffer.cpp +++ b/native/cocos/3d/misc/Buffer.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -53,7 +52,7 @@ ccstd::string getDataViewType(const gfx::FormatInfo &info) { } // namespace -using DataVariant = ccstd::variant; +using DataVariant = ccstd::variant; using MapBufferCallback = std::function; DataView mapBuffer(DataView &target, @@ -102,11 +101,21 @@ DataView mapBuffer(DataView &target, const uint32_t y = x + componentBytesLength * iComponent; if (isFloat) { float cur = target.getFloat32(y); - out->setFloat32(y, ccstd::get<1>(callback(cur, iComponent, target))); + auto dataVariant = callback(cur, iComponent, target); + if (ccstd::holds_alternative(dataVariant)) { + out->setFloat32(y, ccstd::get(dataVariant)); + } else { + CC_LOG_ERROR("mapBuffer, wrong data type, expect float"); + } } else { int32_t cur = target.readInt(intReader, y); // iComponent is usually more useful than y - (target.*intWritter)(y, ccstd::get<0>(callback(cur, iComponent, target))); + auto dataVariant = callback(cur, iComponent, target); + if (ccstd::holds_alternative(dataVariant)) { + (target.*intWritter)(y, ccstd::get(dataVariant)); + } else { + CC_LOG_ERROR("mapBuffer, wrong data type, expect int32_t"); + } } } } diff --git a/native/cocos/3d/misc/Buffer.h b/native/cocos/3d/misc/Buffer.h index a9c8d7c889..e30610179d 100644 --- a/native/cocos/3d/misc/Buffer.h +++ b/native/cocos/3d/misc/Buffer.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -112,7 +111,7 @@ void writeBuffer(DataView &target, } } -using DataVariant = ccstd::variant; +using DataVariant = ccstd::variant; using MapBufferCallback = std::function; DataView mapBuffer(DataView &target, diff --git a/native/cocos/3d/misc/BufferBlob.cpp b/native/cocos/3d/misc/BufferBlob.cpp index 5ab564cfc3..9fe2e5cf4d 100644 --- a/native/cocos/3d/misc/BufferBlob.cpp +++ b/native/cocos/3d/misc/BufferBlob.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/3d/misc/BufferBlob.h b/native/cocos/3d/misc/BufferBlob.h index 17a7a01aae..ce8f70fc2a 100644 --- a/native/cocos/3d/misc/BufferBlob.h +++ b/native/cocos/3d/misc/BufferBlob.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -41,7 +40,7 @@ public: ArrayBuffer::Ptr getCombined(); private: - ccstd::vector> _arrayBufferOrPaddings; + ccstd::vector> _arrayBufferOrPaddings; uint32_t _length{0}; }; diff --git a/native/cocos/3d/misc/CreateMesh.cpp b/native/cocos/3d/misc/CreateMesh.cpp index 0bcf588fb3..fa3ee334b6 100644 --- a/native/cocos/3d/misc/CreateMesh.cpp +++ b/native/cocos/3d/misc/CreateMesh.cpp @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #include "3d/misc/CreateMesh.h" #include #include "3d/misc/Buffer.h" diff --git a/native/cocos/3d/misc/CreateMesh.h b/native/cocos/3d/misc/CreateMesh.h index 8e1f192668..b87be8ad19 100644 --- a/native/cocos/3d/misc/CreateMesh.h +++ b/native/cocos/3d/misc/CreateMesh.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/3d/models/BakedSkinningModel.cpp b/native/cocos/3d/models/BakedSkinningModel.cpp index e201f229f4..4783185c16 100644 --- a/native/cocos/3d/models/BakedSkinningModel.cpp +++ b/native/cocos/3d/models/BakedSkinningModel.cpp @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #include "3d/models/BakedSkinningModel.h" #include "3d/assets/Mesh.h" //#include "3d/skeletal-animation/DataPoolManager.h" diff --git a/native/cocos/3d/models/BakedSkinningModel.h b/native/cocos/3d/models/BakedSkinningModel.h index 94a661f670..8a01914a43 100644 --- a/native/cocos/3d/models/BakedSkinningModel.h +++ b/native/cocos/3d/models/BakedSkinningModel.h @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once diff --git a/native/cocos/3d/models/MorphModel.cpp b/native/cocos/3d/models/MorphModel.cpp index 429e01670d..943ceaba61 100644 --- a/native/cocos/3d/models/MorphModel.cpp +++ b/native/cocos/3d/models/MorphModel.cpp @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #include "3d/models/MorphModel.h" namespace cc { diff --git a/native/cocos/3d/models/MorphModel.h b/native/cocos/3d/models/MorphModel.h index 6fcd5fc4cd..1ba013d015 100644 --- a/native/cocos/3d/models/MorphModel.h +++ b/native/cocos/3d/models/MorphModel.h @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once #include diff --git a/native/cocos/3d/models/SkinningModel.cpp b/native/cocos/3d/models/SkinningModel.cpp index adf675ff2a..e7a06f90d8 100644 --- a/native/cocos/3d/models/SkinningModel.cpp +++ b/native/cocos/3d/models/SkinningModel.cpp @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #include "3d/models/SkinningModel.h" #include diff --git a/native/cocos/3d/models/SkinningModel.h b/native/cocos/3d/models/SkinningModel.h index bdead040a6..486f392243 100644 --- a/native/cocos/3d/models/SkinningModel.h +++ b/native/cocos/3d/models/SkinningModel.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/3d/skeletal-animation/SkeletalAnimationUtils.cpp b/native/cocos/3d/skeletal-animation/SkeletalAnimationUtils.cpp index ca9f621252..a6b3fc1be8 100644 --- a/native/cocos/3d/skeletal-animation/SkeletalAnimationUtils.cpp +++ b/native/cocos/3d/skeletal-animation/SkeletalAnimationUtils.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/3d/skeletal-animation/SkeletalAnimationUtils.h b/native/cocos/3d/skeletal-animation/SkeletalAnimationUtils.h index d599a48211..ff78a9477f 100644 --- a/native/cocos/3d/skeletal-animation/SkeletalAnimationUtils.h +++ b/native/cocos/3d/skeletal-animation/SkeletalAnimationUtils.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/application/ApplicationManager.cpp b/native/cocos/application/ApplicationManager.cpp index 0cc78e62b1..7d17ae3b0e 100644 --- a/native/cocos/application/ApplicationManager.cpp +++ b/native/cocos/application/ApplicationManager.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/application/ApplicationManager.h b/native/cocos/application/ApplicationManager.h index 96d147c471..b9a5307343 100644 --- a/native/cocos/application/ApplicationManager.h +++ b/native/cocos/application/ApplicationManager.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/application/BaseApplication.h b/native/cocos/application/BaseApplication.h index 9ed5eb32f7..e29583bd8f 100644 --- a/native/cocos/application/BaseApplication.h +++ b/native/cocos/application/BaseApplication.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/application/BaseGame.cpp b/native/cocos/application/BaseGame.cpp index ac2e1620c0..fa7ee208c6 100644 --- a/native/cocos/application/BaseGame.cpp +++ b/native/cocos/application/BaseGame.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -50,13 +49,13 @@ int BaseGame::init() { std::call_once(_windowCreateFlag, [&]() { ISystemWindowInfo info; info.title = _windowInfo.title; -#if CC_PLATFORM == CC_PLATFORM_WINDOWS + #if CC_PLATFORM == CC_PLATFORM_WINDOWS info.x = _windowInfo.x == -1 ? 50 : _windowInfo.x; // 50 meams move window a little for now info.y = _windowInfo.y == -1 ? 50 : _windowInfo.y; // same above -#else + #else info.x = _windowInfo.x == -1 ? 0 : _windowInfo.x; info.y = _windowInfo.y == -1 ? 0 : _windowInfo.y; -#endif + #endif info.width = _windowInfo.width; info.height = _windowInfo.height; info.flags = _windowInfo.flags; diff --git a/native/cocos/application/BaseGame.h b/native/cocos/application/BaseGame.h index d4e16bd4ef..308f293f74 100644 --- a/native/cocos/application/BaseGame.h +++ b/native/cocos/application/BaseGame.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/application/CocosApplication.cpp b/native/cocos/application/CocosApplication.cpp index c50ffcb2d4..057c8d1622 100644 --- a/native/cocos/application/CocosApplication.cpp +++ b/native/cocos/application/CocosApplication.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/application/CocosApplication.h b/native/cocos/application/CocosApplication.h index 28dedd85d3..c46c4d820e 100644 --- a/native/cocos/application/CocosApplication.h +++ b/native/cocos/application/CocosApplication.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/audio/AudioEngine.cpp b/native/cocos/audio/AudioEngine.cpp index 5fb03611bb..611296ab81 100644 --- a/native/cocos/audio/AudioEngine.cpp +++ b/native/cocos/audio/AudioEngine.cpp @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/audio/android/AssetFd.cpp b/native/cocos/audio/android/AssetFd.cpp index 53eaa35861..7011be2687 100644 --- a/native/cocos/audio/android/AssetFd.cpp +++ b/native/cocos/audio/android/AssetFd.cpp @@ -1,32 +1,32 @@ /**************************************************************************** -Copyright (c) 2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. -http://www.cocos2d-x.org + http://www.cocos2d-x.org -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #define LOG_TAG "AssetFd" -#include "audio/android/cutils/log.h" #include "audio/android/AssetFd.h" +#include "audio/android/cutils/log.h" namespace cc { diff --git a/native/cocos/audio/android/AssetFd.h b/native/cocos/audio/android/AssetFd.h index 21d40f849a..e883a7441f 100644 --- a/native/cocos/audio/android/AssetFd.h +++ b/native/cocos/audio/android/AssetFd.h @@ -1,26 +1,26 @@ /**************************************************************************** -Copyright (c) 2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. -http://www.cocos2d-x.org + http://www.cocos2d-x.org -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #pragma once diff --git a/native/cocos/audio/android/AudioDecoder.cpp b/native/cocos/audio/android/AudioDecoder.cpp index 05fc925467..1a495db968 100644 --- a/native/cocos/audio/android/AudioDecoder.cpp +++ b/native/cocos/audio/android/AudioDecoder.cpp @@ -1,26 +1,26 @@ /**************************************************************************** -Copyright (c) 2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. -http://www.cocos2d-x.org + http://www.cocos2d-x.org -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #define LOG_TAG "AudioDecoder" diff --git a/native/cocos/audio/android/AudioDecoder.h b/native/cocos/audio/android/AudioDecoder.h index c60e6b5db7..29f2bcce54 100644 --- a/native/cocos/audio/android/AudioDecoder.h +++ b/native/cocos/audio/android/AudioDecoder.h @@ -1,26 +1,26 @@ /**************************************************************************** -Copyright (c) 2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. -http://www.cocos2d-x.org + http://www.cocos2d-x.org -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #pragma once diff --git a/native/cocos/audio/android/AudioDecoderMp3.cpp b/native/cocos/audio/android/AudioDecoderMp3.cpp index b41ad9c13c..9aa3164bd8 100644 --- a/native/cocos/audio/android/AudioDecoderMp3.cpp +++ b/native/cocos/audio/android/AudioDecoderMp3.cpp @@ -1,26 +1,26 @@ /**************************************************************************** -Copyright (c) 2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. -http://www.cocos2d-x.org + http://www.cocos2d-x.org -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #define LOG_TAG "AudioDecoderMp3" diff --git a/native/cocos/audio/android/AudioDecoderMp3.h b/native/cocos/audio/android/AudioDecoderMp3.h index 38ddbcb98f..df42f31622 100644 --- a/native/cocos/audio/android/AudioDecoderMp3.h +++ b/native/cocos/audio/android/AudioDecoderMp3.h @@ -1,26 +1,26 @@ /**************************************************************************** -Copyright (c) 2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. -http://www.cocos2d-x.org + http://www.cocos2d-x.org -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #pragma once diff --git a/native/cocos/audio/android/AudioDecoderOgg.cpp b/native/cocos/audio/android/AudioDecoderOgg.cpp index 1b70b5e3e9..c49e16ed0c 100644 --- a/native/cocos/audio/android/AudioDecoderOgg.cpp +++ b/native/cocos/audio/android/AudioDecoderOgg.cpp @@ -1,26 +1,26 @@ /**************************************************************************** -Copyright (c) 2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. -http://www.cocos2d-x.org + http://www.cocos2d-x.org -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #define LOG_TAG "AudioDecoderOgg" diff --git a/native/cocos/audio/android/AudioDecoderOgg.h b/native/cocos/audio/android/AudioDecoderOgg.h index b4a2e21005..943d3e8855 100644 --- a/native/cocos/audio/android/AudioDecoderOgg.h +++ b/native/cocos/audio/android/AudioDecoderOgg.h @@ -1,26 +1,26 @@ /**************************************************************************** -Copyright (c) 2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. -http://www.cocos2d-x.org + http://www.cocos2d-x.org -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #pragma once diff --git a/native/cocos/audio/android/AudioDecoderProvider.cpp b/native/cocos/audio/android/AudioDecoderProvider.cpp index ad4ce2eaa3..ff71dce167 100644 --- a/native/cocos/audio/android/AudioDecoderProvider.cpp +++ b/native/cocos/audio/android/AudioDecoderProvider.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #define LOG_TAG "AudioDecoderProvider" diff --git a/native/cocos/audio/android/AudioDecoderProvider.h b/native/cocos/audio/android/AudioDecoderProvider.h index 64fd12836b..2a26baadde 100644 --- a/native/cocos/audio/android/AudioDecoderProvider.h +++ b/native/cocos/audio/android/AudioDecoderProvider.h @@ -1,26 +1,26 @@ /**************************************************************************** -Copyright (c) 2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. -http://www.cocos2d-x.org + http://www.cocos2d-x.org -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #pragma once diff --git a/native/cocos/audio/android/AudioDecoderSLES.cpp b/native/cocos/audio/android/AudioDecoderSLES.cpp index 756c154efc..7085158493 100644 --- a/native/cocos/audio/android/AudioDecoderSLES.cpp +++ b/native/cocos/audio/android/AudioDecoderSLES.cpp @@ -1,26 +1,26 @@ /**************************************************************************** -Copyright (c) 2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. -http://www.cocos2d-x.org + http://www.cocos2d-x.org -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #define LOG_TAG "AudioDecoderSLES" diff --git a/native/cocos/audio/android/AudioDecoderSLES.h b/native/cocos/audio/android/AudioDecoderSLES.h index 2e48108a80..bbc520c872 100644 --- a/native/cocos/audio/android/AudioDecoderSLES.h +++ b/native/cocos/audio/android/AudioDecoderSLES.h @@ -1,26 +1,26 @@ /**************************************************************************** -Copyright (c) 2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. -http://www.cocos2d-x.org + http://www.cocos2d-x.org -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #pragma once diff --git a/native/cocos/audio/android/AudioDecoderWav.cpp b/native/cocos/audio/android/AudioDecoderWav.cpp index d3f384e447..4aecbebb5e 100644 --- a/native/cocos/audio/android/AudioDecoderWav.cpp +++ b/native/cocos/audio/android/AudioDecoderWav.cpp @@ -1,26 +1,26 @@ /**************************************************************************** -Copyright (c) 2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. -http://www.cocos2d-x.org + http://www.cocos2d-x.org -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #define LOG_TAG "AudioDecoderWav" diff --git a/native/cocos/audio/android/AudioDecoderWav.h b/native/cocos/audio/android/AudioDecoderWav.h index 22f8cd0d8b..69dae44001 100644 --- a/native/cocos/audio/android/AudioDecoderWav.h +++ b/native/cocos/audio/android/AudioDecoderWav.h @@ -1,26 +1,26 @@ /**************************************************************************** -Copyright (c) 2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. -http://www.cocos2d-x.org + http://www.cocos2d-x.org -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #pragma once diff --git a/native/cocos/audio/android/AudioEngine-inl.cpp b/native/cocos/audio/android/AudioEngine-inl.cpp index 92b525c61b..c8edb66a8a 100644 --- a/native/cocos/audio/android/AudioEngine-inl.cpp +++ b/native/cocos/audio/android/AudioEngine-inl.cpp @@ -1,15 +1,15 @@ /**************************************************************************** Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #define LOG_TAG "AudioEngineImpl" #include "audio/android/AudioEngine-inl.h" diff --git a/native/cocos/audio/android/AudioEngine-inl.h b/native/cocos/audio/android/AudioEngine-inl.h index 3ae740908e..99fcd8943e 100644 --- a/native/cocos/audio/android/AudioEngine-inl.h +++ b/native/cocos/audio/android/AudioEngine-inl.h @@ -1,15 +1,15 @@ /**************************************************************************** Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,8 +20,8 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ****************************************************************************/ + THE SOFTWARE. +****************************************************************************/ #pragma once #include diff --git a/native/cocos/audio/android/AudioMixerController.cpp b/native/cocos/audio/android/AudioMixerController.cpp index 5f1d936d5b..31aec82d13 100644 --- a/native/cocos/audio/android/AudioMixerController.cpp +++ b/native/cocos/audio/android/AudioMixerController.cpp @@ -1,26 +1,26 @@ /**************************************************************************** -Copyright (c) 2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. -http://www.cocos2d-x.org + http://www.cocos2d-x.org -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #define LOG_TAG "AudioMixerController" diff --git a/native/cocos/audio/android/AudioMixerController.h b/native/cocos/audio/android/AudioMixerController.h index 1d2b2367f5..534e61f6e2 100644 --- a/native/cocos/audio/android/AudioMixerController.h +++ b/native/cocos/audio/android/AudioMixerController.h @@ -1,26 +1,26 @@ /**************************************************************************** -Copyright (c) 2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. -http://www.cocos2d-x.org + http://www.cocos2d-x.org -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #pragma once diff --git a/native/cocos/audio/android/AudioPlayerProvider.cpp b/native/cocos/audio/android/AudioPlayerProvider.cpp index 620666268d..9df58e00b3 100644 --- a/native/cocos/audio/android/AudioPlayerProvider.cpp +++ b/native/cocos/audio/android/AudioPlayerProvider.cpp @@ -1,26 +1,26 @@ /**************************************************************************** -Copyright (c) 2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. -http://www.cocos2d-x.org + http://www.cocos2d-x.org -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #include diff --git a/native/cocos/audio/android/AudioPlayerProvider.h b/native/cocos/audio/android/AudioPlayerProvider.h index 20287b93ba..6b42cc1660 100644 --- a/native/cocos/audio/android/AudioPlayerProvider.h +++ b/native/cocos/audio/android/AudioPlayerProvider.h @@ -1,26 +1,26 @@ /**************************************************************************** -Copyright (c) 2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. -http://www.cocos2d-x.org + http://www.cocos2d-x.org -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #pragma once diff --git a/native/cocos/audio/android/IAudioPlayer.h b/native/cocos/audio/android/IAudioPlayer.h index 55410f18eb..e6ff5c0126 100644 --- a/native/cocos/audio/android/IAudioPlayer.h +++ b/native/cocos/audio/android/IAudioPlayer.h @@ -1,26 +1,26 @@ /**************************************************************************** -Copyright (c) 2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. -http://www.cocos2d-x.org + http://www.cocos2d-x.org -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #pragma once diff --git a/native/cocos/audio/android/ICallerThreadUtils.h b/native/cocos/audio/android/ICallerThreadUtils.h index d80982c4e1..740859b4de 100644 --- a/native/cocos/audio/android/ICallerThreadUtils.h +++ b/native/cocos/audio/android/ICallerThreadUtils.h @@ -1,26 +1,26 @@ /**************************************************************************** -Copyright (c) 2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. -http://www.cocos2d-x.org + http://www.cocos2d-x.org -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #pragma once diff --git a/native/cocos/audio/android/IVolumeProvider.h b/native/cocos/audio/android/IVolumeProvider.h index c1b49a71d7..041eb1418c 100644 --- a/native/cocos/audio/android/IVolumeProvider.h +++ b/native/cocos/audio/android/IVolumeProvider.h @@ -1,26 +1,26 @@ /**************************************************************************** -Copyright (c) 2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. -http://www.cocos2d-x.org + http://www.cocos2d-x.org -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #pragma once diff --git a/native/cocos/audio/android/OpenSLHelper.h b/native/cocos/audio/android/OpenSLHelper.h index 01375dabb3..bc5af78424 100644 --- a/native/cocos/audio/android/OpenSLHelper.h +++ b/native/cocos/audio/android/OpenSLHelper.h @@ -1,26 +1,26 @@ /**************************************************************************** -Copyright (c) 2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. -http://www.cocos2d-x.org + http://www.cocos2d-x.org -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #pragma once diff --git a/native/cocos/audio/android/PcmAudioPlayer.cpp b/native/cocos/audio/android/PcmAudioPlayer.cpp index a4d5ee2a04..571db2c8e2 100644 --- a/native/cocos/audio/android/PcmAudioPlayer.cpp +++ b/native/cocos/audio/android/PcmAudioPlayer.cpp @@ -1,26 +1,26 @@ /**************************************************************************** -Copyright (c) 2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. -http://www.cocos2d-x.org + http://www.cocos2d-x.org -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #define LOG_TAG "PcmAudioPlayer" diff --git a/native/cocos/audio/android/PcmAudioPlayer.h b/native/cocos/audio/android/PcmAudioPlayer.h index 8ba5e62372..dfb0950992 100644 --- a/native/cocos/audio/android/PcmAudioPlayer.h +++ b/native/cocos/audio/android/PcmAudioPlayer.h @@ -1,26 +1,26 @@ /**************************************************************************** -Copyright (c) 2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. -http://www.cocos2d-x.org + http://www.cocos2d-x.org -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #pragma once diff --git a/native/cocos/audio/android/PcmAudioService.cpp b/native/cocos/audio/android/PcmAudioService.cpp index 8749615651..da5d63f786 100644 --- a/native/cocos/audio/android/PcmAudioService.cpp +++ b/native/cocos/audio/android/PcmAudioService.cpp @@ -1,26 +1,26 @@ /**************************************************************************** -Copyright (c) 2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. -http://www.cocos2d-x.org + http://www.cocos2d-x.org -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #define LOG_TAG "PcmAudioService" diff --git a/native/cocos/audio/android/PcmAudioService.h b/native/cocos/audio/android/PcmAudioService.h index 999afa779e..90a8a8e650 100644 --- a/native/cocos/audio/android/PcmAudioService.h +++ b/native/cocos/audio/android/PcmAudioService.h @@ -1,26 +1,26 @@ /**************************************************************************** -Copyright (c) 2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. -http://www.cocos2d-x.org + http://www.cocos2d-x.org -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #pragma once @@ -29,8 +29,8 @@ THE SOFTWARE. #include "audio/android/OpenSLHelper.h" #include "audio/android/PcmData.h" -#include #include +#include namespace cc { diff --git a/native/cocos/audio/android/PcmBufferProvider.cpp b/native/cocos/audio/android/PcmBufferProvider.cpp index 5ee675f1ab..71b571e8b9 100644 --- a/native/cocos/audio/android/PcmBufferProvider.cpp +++ b/native/cocos/audio/android/PcmBufferProvider.cpp @@ -1,26 +1,26 @@ /**************************************************************************** -Copyright (c) 2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. -http://www.cocos2d-x.org + http://www.cocos2d-x.org -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #define LOG_TAG "PcmBufferProvider" diff --git a/native/cocos/audio/android/PcmBufferProvider.h b/native/cocos/audio/android/PcmBufferProvider.h index 462abc2a15..ece61a75b4 100644 --- a/native/cocos/audio/android/PcmBufferProvider.h +++ b/native/cocos/audio/android/PcmBufferProvider.h @@ -1,26 +1,26 @@ /**************************************************************************** -Copyright (c) 2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. -http://www.cocos2d-x.org + http://www.cocos2d-x.org -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #pragma once diff --git a/native/cocos/audio/android/PcmData.cpp b/native/cocos/audio/android/PcmData.cpp index 83bed91c72..324198405f 100644 --- a/native/cocos/audio/android/PcmData.cpp +++ b/native/cocos/audio/android/PcmData.cpp @@ -1,26 +1,26 @@ /**************************************************************************** -Copyright (c) 2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. -http://www.cocos2d-x.org + http://www.cocos2d-x.org -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #define LOG_TAG "PcmData" diff --git a/native/cocos/audio/android/PcmData.h b/native/cocos/audio/android/PcmData.h index 214b665949..b1096e36d8 100644 --- a/native/cocos/audio/android/PcmData.h +++ b/native/cocos/audio/android/PcmData.h @@ -1,26 +1,26 @@ /**************************************************************************** -Copyright (c) 2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. -http://www.cocos2d-x.org + http://www.cocos2d-x.org -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #pragma once diff --git a/native/cocos/audio/android/Track.cpp b/native/cocos/audio/android/Track.cpp index 171920c85f..9014ae7ace 100644 --- a/native/cocos/audio/android/Track.cpp +++ b/native/cocos/audio/android/Track.cpp @@ -1,32 +1,32 @@ /**************************************************************************** -Copyright (c) 2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. -http://www.cocos2d-x.org + http://www.cocos2d-x.org -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #define LOG_TAG "Track" -#include "audio/android/cutils/log.h" #include "audio/android/Track.h" +#include "audio/android/cutils/log.h" #include diff --git a/native/cocos/audio/android/Track.h b/native/cocos/audio/android/Track.h index aa46722fc4..9b3c0b8125 100644 --- a/native/cocos/audio/android/Track.h +++ b/native/cocos/audio/android/Track.h @@ -1,33 +1,33 @@ /**************************************************************************** -Copyright (c) 2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. -http://www.cocos2d-x.org + http://www.cocos2d-x.org -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #pragma once -#include "audio/android/PcmData.h" #include "audio/android/IVolumeProvider.h" #include "audio/android/PcmBufferProvider.h" +#include "audio/android/PcmData.h" #include #include diff --git a/native/cocos/audio/android/UrlAudioPlayer.cpp b/native/cocos/audio/android/UrlAudioPlayer.cpp index 228e375356..002f336168 100644 --- a/native/cocos/audio/android/UrlAudioPlayer.cpp +++ b/native/cocos/audio/android/UrlAudioPlayer.cpp @@ -1,26 +1,26 @@ /**************************************************************************** -Copyright (c) 2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. -http://www.cocos2d-x.org + http://www.cocos2d-x.org -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #define LOG_TAG "UrlAudioPlayer" diff --git a/native/cocos/audio/android/UrlAudioPlayer.h b/native/cocos/audio/android/UrlAudioPlayer.h index 9084f5e754..0b289e8587 100644 --- a/native/cocos/audio/android/UrlAudioPlayer.h +++ b/native/cocos/audio/android/UrlAudioPlayer.h @@ -1,26 +1,26 @@ /**************************************************************************** -Copyright (c) 2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. -http://www.cocos2d-x.org + http://www.cocos2d-x.org -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #pragma once diff --git a/native/cocos/audio/android/audio.h b/native/cocos/audio/android/audio.h index ef336c6e65..c790eca215 100644 --- a/native/cocos/audio/android/audio.h +++ b/native/cocos/audio/android/audio.h @@ -1,34 +1,34 @@ /**************************************************************************** -Copyright (c) 2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. -http://www.cocos2d-x.org + http://www.cocos2d-x.org -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #pragma once // ---------------------------------------------------------------------------- -#include #include +#include #include "audio/android/cutils/bitops.h" #define PROPERTY_VALUE_MAX 256 diff --git a/native/cocos/audio/android/utils/Utils.cpp b/native/cocos/audio/android/utils/Utils.cpp index 860f8e323d..378ecc400a 100644 --- a/native/cocos/audio/android/utils/Utils.cpp +++ b/native/cocos/audio/android/utils/Utils.cpp @@ -1,30 +1,30 @@ /**************************************************************************** -Copyright (c) 2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. -http://www.cocos2d-x.org + http://www.cocos2d-x.org -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #include "audio/android/utils/Utils.h" -#include "platform/BasePlatform.h" #include +#include "platform/BasePlatform.h" namespace cc { diff --git a/native/cocos/audio/android/utils/Utils.h b/native/cocos/audio/android/utils/Utils.h index 7995dfe972..bc0c644780 100644 --- a/native/cocos/audio/android/utils/Utils.h +++ b/native/cocos/audio/android/utils/Utils.h @@ -1,26 +1,26 @@ /**************************************************************************** -Copyright (c) 2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. -http://www.cocos2d-x.org + http://www.cocos2d-x.org -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #pragma once diff --git a/native/cocos/audio/apple/AudioCache.h b/native/cocos/audio/apple/AudioCache.h index 703fccd8cf..060426fe6f 100644 --- a/native/cocos/audio/apple/AudioCache.h +++ b/native/cocos/audio/apple/AudioCache.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/audio/apple/AudioDecoder.h b/native/cocos/audio/apple/AudioDecoder.h index 9efb03eb81..8e59543f8e 100644 --- a/native/cocos/audio/apple/AudioDecoder.h +++ b/native/cocos/audio/apple/AudioDecoder.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/audio/apple/AudioEngine-inl.h b/native/cocos/audio/apple/AudioEngine-inl.h index 77bef7789e..18bba6ef9d 100644 --- a/native/cocos/audio/apple/AudioEngine-inl.h +++ b/native/cocos/audio/apple/AudioEngine-inl.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/audio/apple/AudioMacros.h b/native/cocos/audio/apple/AudioMacros.h index 9c8b8598cd..79bdd423e2 100644 --- a/native/cocos/audio/apple/AudioMacros.h +++ b/native/cocos/audio/apple/AudioMacros.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/audio/apple/AudioPlayer.h b/native/cocos/audio/apple/AudioPlayer.h index 8b28297d64..62e7ea1df5 100644 --- a/native/cocos/audio/apple/AudioPlayer.h +++ b/native/cocos/audio/apple/AudioPlayer.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/audio/common/decoder/AudioDecoder.cpp b/native/cocos/audio/common/decoder/AudioDecoder.cpp index a51c25d70c..dad85d1233 100644 --- a/native/cocos/audio/common/decoder/AudioDecoder.cpp +++ b/native/cocos/audio/common/decoder/AudioDecoder.cpp @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/audio/common/decoder/AudioDecoder.h b/native/cocos/audio/common/decoder/AudioDecoder.h index abeaeb08a0..8bf344980f 100644 --- a/native/cocos/audio/common/decoder/AudioDecoder.h +++ b/native/cocos/audio/common/decoder/AudioDecoder.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/audio/common/decoder/AudioDecoderManager.cpp b/native/cocos/audio/common/decoder/AudioDecoderManager.cpp index 3c14f00112..a2483722c9 100644 --- a/native/cocos/audio/common/decoder/AudioDecoderManager.cpp +++ b/native/cocos/audio/common/decoder/AudioDecoderManager.cpp @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/audio/common/decoder/AudioDecoderManager.h b/native/cocos/audio/common/decoder/AudioDecoderManager.h index 1465fbfe26..49ac29c1d0 100644 --- a/native/cocos/audio/common/decoder/AudioDecoderManager.h +++ b/native/cocos/audio/common/decoder/AudioDecoderManager.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/audio/common/decoder/AudioDecoderMp3.cpp b/native/cocos/audio/common/decoder/AudioDecoderMp3.cpp index 57aa27dac8..7b9f31376b 100644 --- a/native/cocos/audio/common/decoder/AudioDecoderMp3.cpp +++ b/native/cocos/audio/common/decoder/AudioDecoderMp3.cpp @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/audio/common/decoder/AudioDecoderMp3.h b/native/cocos/audio/common/decoder/AudioDecoderMp3.h index 4405273dcf..e77a831f2a 100644 --- a/native/cocos/audio/common/decoder/AudioDecoderMp3.h +++ b/native/cocos/audio/common/decoder/AudioDecoderMp3.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/audio/common/decoder/AudioDecoderOgg.cpp b/native/cocos/audio/common/decoder/AudioDecoderOgg.cpp index 7643359f81..e78babc1c2 100644 --- a/native/cocos/audio/common/decoder/AudioDecoderOgg.cpp +++ b/native/cocos/audio/common/decoder/AudioDecoderOgg.cpp @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/audio/common/decoder/AudioDecoderOgg.h b/native/cocos/audio/common/decoder/AudioDecoderOgg.h index 165ad0019e..2a2a854dd1 100644 --- a/native/cocos/audio/common/decoder/AudioDecoderOgg.h +++ b/native/cocos/audio/common/decoder/AudioDecoderOgg.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/audio/common/decoder/AudioDecoderWav.cpp b/native/cocos/audio/common/decoder/AudioDecoderWav.cpp index 5a91dd8e2b..6487f330ef 100644 --- a/native/cocos/audio/common/decoder/AudioDecoderWav.cpp +++ b/native/cocos/audio/common/decoder/AudioDecoderWav.cpp @@ -1,26 +1,26 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. +Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #define LOG_TAG "AudioDecoderWav" @@ -59,7 +59,7 @@ bool AudioDecoderWav::open(const char *path) { } CC_LOG_DEBUG("wav info: frames: %d, samplerate: %d, channels: %d, format: %d", info.frames, info.samplerate, info.channels, info.format); _pcmHeader.channelCount = info.channels; - _pcmHeader.bytesPerFrame = 2 * info.channels; // FIXED_16 + _pcmHeader.bytesPerFrame = 2 * info.channels; // FIXED_16 _pcmHeader.dataFormat = AudioDataFormat::SIGNED_16; //FIXED, _pcmHeader.sampleRate = info.samplerate; _pcmHeader.totalFrames = info.frames; diff --git a/native/cocos/audio/common/decoder/AudioDecoderWav.h b/native/cocos/audio/common/decoder/AudioDecoderWav.h index 63feee0fcd..8016310048 100644 --- a/native/cocos/audio/common/decoder/AudioDecoderWav.h +++ b/native/cocos/audio/common/decoder/AudioDecoderWav.h @@ -1,26 +1,26 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. +Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #pragma once diff --git a/native/cocos/audio/include/AudioDef.h b/native/cocos/audio/include/AudioDef.h index 441d26ba3c..6fcf1dd717 100644 --- a/native/cocos/audio/include/AudioDef.h +++ b/native/cocos/audio/include/AudioDef.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/audio/include/AudioEngine.h b/native/cocos/audio/include/AudioEngine.h index 1695526fef..06de510a28 100644 --- a/native/cocos/audio/include/AudioEngine.h +++ b/native/cocos/audio/include/AudioEngine.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/audio/include/AudioMacros.h b/native/cocos/audio/include/AudioMacros.h index 8573fe8936..1dda79f342 100644 --- a/native/cocos/audio/include/AudioMacros.h +++ b/native/cocos/audio/include/AudioMacros.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/audio/include/Export.h b/native/cocos/audio/include/Export.h index 30f5ae839d..c8c654d434 100644 --- a/native/cocos/audio/include/Export.h +++ b/native/cocos/audio/include/Export.h @@ -1,20 +1,19 @@ /**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/audio/oalsoft/AudioCache.cpp b/native/cocos/audio/oalsoft/AudioCache.cpp index e33ca5752f..0b80043aa0 100644 --- a/native/cocos/audio/oalsoft/AudioCache.cpp +++ b/native/cocos/audio/oalsoft/AudioCache.cpp @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -112,7 +111,7 @@ void AudioCache::readDataTask(unsigned int selfId) { } const uint32_t originalTotalFrames = decoder->getTotalFrames(); - _bytesPerFrame = decoder->getBytesPerFrame(); + _bytesPerFrame = decoder->getBytesPerFrame(); const uint32_t sampleRate = decoder->getSampleRate(); _channelCount = decoder->getChannelCount(); diff --git a/native/cocos/audio/oalsoft/AudioCache.h b/native/cocos/audio/oalsoft/AudioCache.h index 981b848b47..160d946712 100644 --- a/native/cocos/audio/oalsoft/AudioCache.h +++ b/native/cocos/audio/oalsoft/AudioCache.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/audio/oalsoft/AudioEngine-soft.cpp b/native/cocos/audio/oalsoft/AudioEngine-soft.cpp index 9d080ddaa2..0831fb4534 100644 --- a/native/cocos/audio/oalsoft/AudioEngine-soft.cpp +++ b/native/cocos/audio/oalsoft/AudioEngine-soft.cpp @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/audio/oalsoft/AudioEngine-soft.h b/native/cocos/audio/oalsoft/AudioEngine-soft.h index ba2322d9af..0d49942c85 100644 --- a/native/cocos/audio/oalsoft/AudioEngine-soft.h +++ b/native/cocos/audio/oalsoft/AudioEngine-soft.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/audio/oalsoft/AudioPlayer.cpp b/native/cocos/audio/oalsoft/AudioPlayer.cpp index 9e1b160b5d..f7db95e24a 100644 --- a/native/cocos/audio/oalsoft/AudioPlayer.cpp +++ b/native/cocos/audio/oalsoft/AudioPlayer.cpp @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/audio/oalsoft/AudioPlayer.h b/native/cocos/audio/oalsoft/AudioPlayer.h index 2483209a39..51e4356c13 100644 --- a/native/cocos/audio/oalsoft/AudioPlayer.h +++ b/native/cocos/audio/oalsoft/AudioPlayer.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/audio/ohos/AudioDecoderWav.cpp b/native/cocos/audio/ohos/AudioDecoderWav.cpp index 94ad971cd8..6fd0028694 100644 --- a/native/cocos/audio/ohos/AudioDecoderWav.cpp +++ b/native/cocos/audio/ohos/AudioDecoderWav.cpp @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/audio/ohos/AudioDecoderWav.h b/native/cocos/audio/ohos/AudioDecoderWav.h index 34b2025cd6..4c6275d429 100644 --- a/native/cocos/audio/ohos/AudioDecoderWav.h +++ b/native/cocos/audio/ohos/AudioDecoderWav.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/audio/ohos/FsCallback.cpp b/native/cocos/audio/ohos/FsCallback.cpp index 35ae98e1bc..7b1fd9cbe0 100644 --- a/native/cocos/audio/ohos/FsCallback.cpp +++ b/native/cocos/audio/ohos/FsCallback.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/audio/ohos/FsCallback.h b/native/cocos/audio/ohos/FsCallback.h index ca859183d0..b75ca87072 100644 --- a/native/cocos/audio/ohos/FsCallback.h +++ b/native/cocos/audio/ohos/FsCallback.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/Agent.h b/native/cocos/base/Agent.h index 8afe77b53a..48542eab70 100644 --- a/native/cocos/base/Agent.h +++ b/native/cocos/base/Agent.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/Assertf.h b/native/cocos/base/Assertf.h index 273174461b..cea0270a8c 100644 --- a/native/cocos/base/Assertf.h +++ b/native/cocos/base/Assertf.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -32,15 +31,15 @@ #if CC_DEBUG && !NDEBUG #if (CC_PLATFORM == CC_PLATFORM_WINDOWS) - #define CC_ASSERT_FORMAT(cond, fmt, ...) \ - do { \ - if (!(cond)) { \ - char message[256] = {0}; \ - wchar_t messageTmp[256] = {0}; \ + #define CC_ASSERT_FORMAT(cond, fmt, ...) \ + do { \ + if (!(cond)) { \ + char message[256] = {0}; \ + wchar_t messageTmp[256] = {0}; \ snprintf(message, sizeof(message), "CC_ASSERT(%s) failed. " fmt "\n%s", #cond, ##__VA_ARGS__, __FUNCTION__); \ - std::copy(message, message + strlen(message), messageTmp); \ - _wassert(messageTmp, _CRT_WIDE(__FILE__), (unsigned)__LINE__); \ - } \ + std::copy(message, message + strlen(message), messageTmp); \ + _wassert(messageTmp, _CRT_WIDE(__FILE__), (unsigned)__LINE__); \ + } \ } while (false) #define CC_ABORTF(fmt, ...) \ @@ -53,13 +52,13 @@ } while (false) #elif (CC_PLATFORM == CC_PLATFORM_ANDROID) - #define CC_ASSERT_FORMAT(cond, fmt, ...) \ - do { \ - if (__builtin_expect(!(cond), 0)) { \ - char message[256] = {0}; \ + #define CC_ASSERT_FORMAT(cond, fmt, ...) \ + do { \ + if (__builtin_expect(!(cond), 0)) { \ + char message[256] = {0}; \ snprintf(message, sizeof(message), "CC_ASSERT(%s) failed. " fmt, #cond, ##__VA_ARGS__); \ - __assert2(__FILE__, __LINE__, __PRETTY_FUNCTION__, message); \ - } \ + __assert2(__FILE__, __LINE__, __PRETTY_FUNCTION__, message); \ + } \ } while (false) #define CC_ABORTF(fmt, ...) \ do { \ @@ -68,19 +67,19 @@ __assert2(__FILE__, __LINE__, __PRETTY_FUNCTION__, message); \ } while (false) #elif CC_PLATFORM == CC_PLATFORM_IOS || CC_PLATFORM == CC_PLATFORM_MACOS - #define CC_ASSERT_FORMAT(cond, fmt, ...) \ - do { \ - if (__builtin_expect(!(cond), 0)) { \ - char message[256] = {0}; \ + #define CC_ASSERT_FORMAT(cond, fmt, ...) \ + do { \ + if (__builtin_expect(!(cond), 0)) { \ + char message[256] = {0}; \ snprintf(message, sizeof(message), "CC_ASSERT(%s) failed. " fmt, #cond, ##__VA_ARGS__); \ - __assert(message, __FILE__, __LINE__); \ - } \ + __assert(message, __FILE__, __LINE__); \ + } \ } while (false) - #define CC_ABORTF(fmt, ...) \ - do { \ - char message[256] = {0}; \ + #define CC_ABORTF(fmt, ...) \ + do { \ + char message[256] = {0}; \ snprintf(message, sizeof(message), fmt, ##__VA_ARGS__); \ - __assert(message, __FILE__, __LINE__); \ + __assert(message, __FILE__, __LINE__); \ } while (false) #else #define CC_ASSERT_FORMAT(cond, ...) assert(cond) @@ -147,8 +146,8 @@ * CC_ABORTF("Invalidate state code %d", statusCode); * CC_ABORTF("Should crash in debug mode") */ - #define CC_ABORT() abort() - #define CC_ASSERT(cond) _CC_ASSERT_(cond) + #define CC_ABORT() abort() + #define CC_ASSERT(cond) _CC_ASSERT_(cond) #else #define CC_ASSERTF(...) ((void)0) diff --git a/native/cocos/base/Compressed.cpp b/native/cocos/base/Compressed.cpp index 415c2a725c..4f738ec378 100644 --- a/native/cocos/base/Compressed.cpp +++ b/native/cocos/base/Compressed.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -25,8 +24,8 @@ #include -#include "base/Utils.h" #include "base/Compressed.h" +#include "base/Utils.h" // compressed file header static const uint32_t COMPRESSED_HEADER_LENGTH = 4; @@ -59,7 +58,7 @@ uint32_t getChunkSizes(const unsigned char* pFile, uint32_t level) { } unsigned char* getChunk(const unsigned char* pFile, uint32_t level) { - unsigned char *dstData = nullptr; + unsigned char* dstData = nullptr; const auto chunkCount = getChunkNumbers(pFile); const auto compressedFileHeaderLength = COMPRESSED_HEADER_LENGTH + COMPRESSED_MIPMAP_LEVEL_COUNT_LENGTH + COMPRESSED_MIPMAP_DATA_SIZE_LENGTH * chunkCount; diff --git a/native/cocos/base/Compressed.h b/native/cocos/base/Compressed.h index e46cdb22ed..6e02e1b490 100644 --- a/native/cocos/base/Compressed.h +++ b/native/cocos/base/Compressed.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/Config.h b/native/cocos/base/Config.h index 105597999f..31805b9424 100644 --- a/native/cocos/base/Config.h +++ b/native/cocos/base/Config.h @@ -3,20 +3,19 @@ Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2011 Zynga Inc. Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/Data.cpp b/native/cocos/base/Data.cpp index b0dd78b260..b755846f60 100644 --- a/native/cocos/base/Data.cpp +++ b/native/cocos/base/Data.cpp @@ -1,20 +1,19 @@ /**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/Data.h b/native/cocos/base/Data.h index 502f79136e..951070e1ed 100644 --- a/native/cocos/base/Data.h +++ b/native/cocos/base/Data.h @@ -1,20 +1,19 @@ /**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/DeferredReleasePool.cpp b/native/cocos/base/DeferredReleasePool.cpp index 4d5534c575..e5d8baf9c2 100644 --- a/native/cocos/base/DeferredReleasePool.cpp +++ b/native/cocos/base/DeferredReleasePool.cpp @@ -1,20 +1,19 @@ /**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/DeferredReleasePool.h b/native/cocos/base/DeferredReleasePool.h index f20414c8df..e121b8e37d 100644 --- a/native/cocos/base/DeferredReleasePool.h +++ b/native/cocos/base/DeferredReleasePool.h @@ -1,20 +1,19 @@ /**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/IndexHandle.h b/native/cocos/base/IndexHandle.h index a4ab8f445b..58d31bf97c 100644 --- a/native/cocos/base/IndexHandle.h +++ b/native/cocos/base/IndexHandle.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/Locked.h b/native/cocos/base/Locked.h index 7e1f0fb8c2..c8416475ca 100644 --- a/native/cocos/base/Locked.h +++ b/native/cocos/base/Locked.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/Log.cpp b/native/cocos/base/Log.cpp index 13dd14642a..d00caaf722 100644 --- a/native/cocos/base/Log.cpp +++ b/native/cocos/base/Log.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/Log.h b/native/cocos/base/Log.h index 1b9e333660..3613fc2279 100644 --- a/native/cocos/base/Log.h +++ b/native/cocos/base/Log.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/LogRemote.cpp b/native/cocos/base/LogRemote.cpp index c2783e75c1..b082050a01 100644 --- a/native/cocos/base/LogRemote.cpp +++ b/native/cocos/base/LogRemote.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -52,7 +51,7 @@ namespace { // #define AUTO_TEST_CONFIG_FILE "auto-test-config.json" // v1 - #define AUTO_TEST_CONFIG_FILE "testConfig.json" // v2 + #define AUTO_TEST_CONFIG_FILE "testConfig.json" // v2 #define OLD_ATC_KEY_CONFIG "ServerConfig" #define OLD_ATC_KEY_IP "IP" diff --git a/native/cocos/base/Macros.h b/native/cocos/base/Macros.h index 228481de56..36fcbc497c 100644 --- a/native/cocos/base/Macros.h +++ b/native/cocos/base/Macros.h @@ -3,20 +3,19 @@ Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2011 Zynga Inc. Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/Object.h b/native/cocos/base/Object.h index 22a3601920..9c769f6bf5 100755 --- a/native/cocos/base/Object.h +++ b/native/cocos/base/Object.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/Ptr.h b/native/cocos/base/Ptr.h index a5ba6a9f79..bda8043db3 100644 --- a/native/cocos/base/Ptr.h +++ b/native/cocos/base/Ptr.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ // Originally the class is from WebRTC. // https://chromium.googlesource.com/external/webrtc/+/master/api/scoped_refptr.h diff --git a/native/cocos/base/Random.h b/native/cocos/base/Random.h index 623f83ef0c..7707bb50d2 100644 --- a/native/cocos/base/Random.h +++ b/native/cocos/base/Random.h @@ -1,20 +1,19 @@ /**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/RefCounted.cpp b/native/cocos/base/RefCounted.cpp index 54d39ab4d1..fe80190507 100644 --- a/native/cocos/base/RefCounted.cpp +++ b/native/cocos/base/RefCounted.cpp @@ -1,20 +1,19 @@ /**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/RefCounted.h b/native/cocos/base/RefCounted.h index bfd9ac350c..9220251421 100644 --- a/native/cocos/base/RefCounted.h +++ b/native/cocos/base/RefCounted.h @@ -1,20 +1,19 @@ /**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/RefMap.h b/native/cocos/base/RefMap.h index 52412faf0b..3f92afb711 100644 --- a/native/cocos/base/RefMap.h +++ b/native/cocos/base/RefMap.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/RefVector.h b/native/cocos/base/RefVector.h index 5840adb471..97db4e23c2 100644 --- a/native/cocos/base/RefVector.h +++ b/native/cocos/base/RefVector.h @@ -2,20 +2,19 @@ Copyright (c) 2010 ForzeField Studios S.L. http://forzefield.com Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/Scheduler.cpp b/native/cocos/base/Scheduler.cpp index 68fca8e41d..074e9c60fb 100644 --- a/native/cocos/base/Scheduler.cpp +++ b/native/cocos/base/Scheduler.cpp @@ -3,20 +3,19 @@ Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2011 Zynga Inc. Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/Scheduler.h b/native/cocos/base/Scheduler.h index 0b8a651be5..1bdaea8c84 100644 --- a/native/cocos/base/Scheduler.h +++ b/native/cocos/base/Scheduler.h @@ -3,20 +3,19 @@ Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2011 Zynga Inc. Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/StringHandle.cpp b/native/cocos/base/StringHandle.cpp index cf419731a3..17a3681768 100644 --- a/native/cocos/base/StringHandle.cpp +++ b/native/cocos/base/StringHandle.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/StringHandle.h b/native/cocos/base/StringHandle.h index b7485373ea..723d8483bd 100644 --- a/native/cocos/base/StringHandle.h +++ b/native/cocos/base/StringHandle.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/StringPool.h b/native/cocos/base/StringPool.h index 8791da4df5..3e807f2574 100644 --- a/native/cocos/base/StringPool.h +++ b/native/cocos/base/StringPool.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/StringUtil.cpp b/native/cocos/base/StringUtil.cpp index fd324f9a44..30512dda36 100644 --- a/native/cocos/base/StringUtil.cpp +++ b/native/cocos/base/StringUtil.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/StringUtil.h b/native/cocos/base/StringUtil.h index 8ca6ce2746..50866c536d 100644 --- a/native/cocos/base/StringUtil.h +++ b/native/cocos/base/StringUtil.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/TemplateUtils.h b/native/cocos/base/TemplateUtils.h new file mode 100644 index 0000000000..58815625b7 --- /dev/null +++ b/native/cocos/base/TemplateUtils.h @@ -0,0 +1,47 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ +#pragma once + +namespace cc { + +/* overloaded is used in ccstd::visit a variant value. For example: + + ccstd::variant value; + ccstd::visit(cc::overloaded{ + [](auto& v) { + // Do something with v + }, + [](ccstd::monostate&) {} // Do nothing if value isn't initialized + }, value); + + */ + +// https://stackoverflow.com/questions/69915380/what-does-templateclass-ts-struct-overloaded-ts-using-tsoperator +// https://en.cppreference.com/w/cpp/language/class_template_argument_deduction +template +struct overloaded : Ts... { using Ts::operator()...; }; +template +overloaded(Ts...) -> overloaded; + +} // namespace cc diff --git a/native/cocos/base/ThreadPool.cpp b/native/cocos/base/ThreadPool.cpp index 5ac46f241e..49bc42291b 100644 --- a/native/cocos/base/ThreadPool.cpp +++ b/native/cocos/base/ThreadPool.cpp @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016-2017 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/ThreadPool.h b/native/cocos/base/ThreadPool.h index 6236d1dd10..1227b0c66a 100644 --- a/native/cocos/base/ThreadPool.h +++ b/native/cocos/base/ThreadPool.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016-2017 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/Timer.cpp b/native/cocos/base/Timer.cpp index 37cb30dc85..7ce3f232b4 100644 --- a/native/cocos/base/Timer.cpp +++ b/native/cocos/base/Timer.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/Timer.h b/native/cocos/base/Timer.h index 5dfef95d33..b55f9942c3 100644 --- a/native/cocos/base/Timer.h +++ b/native/cocos/base/Timer.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/TypeDef.h b/native/cocos/base/TypeDef.h index 72efcd2d4c..23f89fdbc3 100644 --- a/native/cocos/base/TypeDef.h +++ b/native/cocos/base/TypeDef.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/UTF8.cpp b/native/cocos/base/UTF8.cpp index 6b0cd0f366..5e2feac817 100644 --- a/native/cocos/base/UTF8.cpp +++ b/native/cocos/base/UTF8.cpp @@ -1,20 +1,19 @@ /**************************************************************************** Copyright (c) 2014 cocos2d-x.org Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/UTF8.h b/native/cocos/base/UTF8.h index 8379bc0cf6..d8e5c61b6b 100644 --- a/native/cocos/base/UTF8.h +++ b/native/cocos/base/UTF8.h @@ -1,20 +1,19 @@ /**************************************************************************** Copyright (c) 2014 cocos2d-x.org Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/Utils.cpp b/native/cocos/base/Utils.cpp index ec199f39ef..c7f268ce3d 100644 --- a/native/cocos/base/Utils.cpp +++ b/native/cocos/base/Utils.cpp @@ -1,20 +1,19 @@ /**************************************************************************** Copyright (c) 2010 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/Utils.h b/native/cocos/base/Utils.h index 692cc97e18..95da0d18d2 100644 --- a/native/cocos/base/Utils.h +++ b/native/cocos/base/Utils.h @@ -1,20 +1,19 @@ /**************************************************************************** Copyright (c) 2010 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/Value.cpp b/native/cocos/base/Value.cpp index d51bf717ee..eb50257376 100644 --- a/native/cocos/base/Value.cpp +++ b/native/cocos/base/Value.cpp @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/Value.h b/native/cocos/base/Value.h index fdfbeadc8a..46a2bf0943 100644 --- a/native/cocos/base/Value.h +++ b/native/cocos/base/Value.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/ZipUtils.cpp b/native/cocos/base/ZipUtils.cpp index 4c7f28ced5..dba95613b7 100644 --- a/native/cocos/base/ZipUtils.cpp +++ b/native/cocos/base/ZipUtils.cpp @@ -1,20 +1,19 @@ /**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/ZipUtils.h b/native/cocos/base/ZipUtils.h index 3936d53597..52cc1df315 100644 --- a/native/cocos/base/ZipUtils.h +++ b/native/cocos/base/ZipUtils.h @@ -1,20 +1,19 @@ /**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/astc.cpp b/native/cocos/base/astc.cpp index de0226a9c2..3c79e0340d 100644 --- a/native/cocos/base/astc.cpp +++ b/native/cocos/base/astc.cpp @@ -1,20 +1,19 @@ /**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/astc.h b/native/cocos/base/astc.h index 88feb709dc..93b75de2f3 100644 --- a/native/cocos/base/astc.h +++ b/native/cocos/base/astc.h @@ -1,20 +1,19 @@ /**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/base64.cpp b/native/cocos/base/base64.cpp index f4fd0f8132..e559a8d542 100644 --- a/native/cocos/base/base64.cpp +++ b/native/cocos/base/base64.cpp @@ -1,20 +1,19 @@ /**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/base64.h b/native/cocos/base/base64.h index 234d172457..6bef1fdaed 100644 --- a/native/cocos/base/base64.h +++ b/native/cocos/base/base64.h @@ -1,20 +1,19 @@ /**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/csscolorparser.cpp b/native/cocos/base/csscolorparser.cpp index 31b6edc178..f1aa95de83 100644 --- a/native/cocos/base/csscolorparser.cpp +++ b/native/cocos/base/csscolorparser.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/csscolorparser.h b/native/cocos/base/csscolorparser.h index d5192efc12..d2125ef516 100644 --- a/native/cocos/base/csscolorparser.h +++ b/native/cocos/base/csscolorparser.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/etc1.cpp b/native/cocos/base/etc1.cpp index 68f4570b40..570fc60986 100644 --- a/native/cocos/base/etc1.cpp +++ b/native/cocos/base/etc1.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/etc1.h b/native/cocos/base/etc1.h index 829e2d4e73..b9b46f2b70 100644 --- a/native/cocos/base/etc1.h +++ b/native/cocos/base/etc1.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/etc2.cpp b/native/cocos/base/etc2.cpp index 4a0d1bc435..07aae502b0 100644 --- a/native/cocos/base/etc2.cpp +++ b/native/cocos/base/etc2.cpp @@ -1,20 +1,19 @@ /**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/etc2.h b/native/cocos/base/etc2.h index 52bb509f90..e01d4c342c 100644 --- a/native/cocos/base/etc2.h +++ b/native/cocos/base/etc2.h @@ -1,20 +1,19 @@ /**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/job-system/JobSystem.h b/native/cocos/base/job-system/JobSystem.h index 8888854a37..9d06b59157 100644 --- a/native/cocos/base/job-system/JobSystem.h +++ b/native/cocos/base/job-system/JobSystem.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/job-system/job-system-dummy/DummyJobGraph.cpp b/native/cocos/base/job-system/job-system-dummy/DummyJobGraph.cpp index c777d085a8..414dbed734 100644 --- a/native/cocos/base/job-system/job-system-dummy/DummyJobGraph.cpp +++ b/native/cocos/base/job-system/job-system-dummy/DummyJobGraph.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/job-system/job-system-dummy/DummyJobGraph.h b/native/cocos/base/job-system/job-system-dummy/DummyJobGraph.h index d5da3441ef..dc6c16bfb7 100644 --- a/native/cocos/base/job-system/job-system-dummy/DummyJobGraph.h +++ b/native/cocos/base/job-system/job-system-dummy/DummyJobGraph.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/job-system/job-system-dummy/DummyJobSystem.cpp b/native/cocos/base/job-system/job-system-dummy/DummyJobSystem.cpp index 4269f8e51f..bd950a626a 100644 --- a/native/cocos/base/job-system/job-system-dummy/DummyJobSystem.cpp +++ b/native/cocos/base/job-system/job-system-dummy/DummyJobSystem.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/job-system/job-system-dummy/DummyJobSystem.h b/native/cocos/base/job-system/job-system-dummy/DummyJobSystem.h index 3ed65488c1..5aa8a0b1b5 100644 --- a/native/cocos/base/job-system/job-system-dummy/DummyJobSystem.h +++ b/native/cocos/base/job-system/job-system-dummy/DummyJobSystem.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/job-system/job-system-taskflow/TFJobGraph.cpp b/native/cocos/base/job-system/job-system-taskflow/TFJobGraph.cpp index c19392026b..36e835c345 100644 --- a/native/cocos/base/job-system/job-system-taskflow/TFJobGraph.cpp +++ b/native/cocos/base/job-system/job-system-taskflow/TFJobGraph.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/job-system/job-system-taskflow/TFJobGraph.h b/native/cocos/base/job-system/job-system-taskflow/TFJobGraph.h index e51fd58bb2..e64b60cc17 100644 --- a/native/cocos/base/job-system/job-system-taskflow/TFJobGraph.h +++ b/native/cocos/base/job-system/job-system-taskflow/TFJobGraph.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/job-system/job-system-taskflow/TFJobSystem.cpp b/native/cocos/base/job-system/job-system-taskflow/TFJobSystem.cpp index 333b07b00b..54ae1596fc 100644 --- a/native/cocos/base/job-system/job-system-taskflow/TFJobSystem.cpp +++ b/native/cocos/base/job-system/job-system-taskflow/TFJobSystem.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/job-system/job-system-taskflow/TFJobSystem.h b/native/cocos/base/job-system/job-system-taskflow/TFJobSystem.h index df5dcc2df1..ec98702fe3 100644 --- a/native/cocos/base/job-system/job-system-taskflow/TFJobSystem.h +++ b/native/cocos/base/job-system/job-system-taskflow/TFJobSystem.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/job-system/job-system-tbb/TBBJobGraph.cpp b/native/cocos/base/job-system/job-system-tbb/TBBJobGraph.cpp index 31ed6339e0..f8a71bef99 100644 --- a/native/cocos/base/job-system/job-system-tbb/TBBJobGraph.cpp +++ b/native/cocos/base/job-system/job-system-tbb/TBBJobGraph.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/job-system/job-system-tbb/TBBJobGraph.h b/native/cocos/base/job-system/job-system-tbb/TBBJobGraph.h index 8bc849821e..9356678a6b 100644 --- a/native/cocos/base/job-system/job-system-tbb/TBBJobGraph.h +++ b/native/cocos/base/job-system/job-system-tbb/TBBJobGraph.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/job-system/job-system-tbb/TBBJobSystem.cpp b/native/cocos/base/job-system/job-system-tbb/TBBJobSystem.cpp index dc1c45444b..0233f4e631 100644 --- a/native/cocos/base/job-system/job-system-tbb/TBBJobSystem.cpp +++ b/native/cocos/base/job-system/job-system-tbb/TBBJobSystem.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/job-system/job-system-tbb/TBBJobSystem.h b/native/cocos/base/job-system/job-system-tbb/TBBJobSystem.h index c9e7c1c279..0c5ce33c50 100644 --- a/native/cocos/base/job-system/job-system-tbb/TBBJobSystem.h +++ b/native/cocos/base/job-system/job-system-tbb/TBBJobSystem.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/memory/CallStack.cpp b/native/cocos/base/memory/CallStack.cpp index 00b4a9aaad..1b105ccf3c 100644 --- a/native/cocos/base/memory/CallStack.cpp +++ b/native/cocos/base/memory/CallStack.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/memory/CallStack.h b/native/cocos/base/memory/CallStack.h index 208129083c..f65501afab 100644 --- a/native/cocos/base/memory/CallStack.h +++ b/native/cocos/base/memory/CallStack.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/memory/Memory.h b/native/cocos/base/memory/Memory.h index 061f0e93f6..72dabe0c86 100644 --- a/native/cocos/base/memory/Memory.h +++ b/native/cocos/base/memory/Memory.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/memory/MemoryHook.cpp b/native/cocos/base/memory/MemoryHook.cpp index ba29c8f639..9aabe3794a 100644 --- a/native/cocos/base/memory/MemoryHook.cpp +++ b/native/cocos/base/memory/MemoryHook.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -31,8 +30,8 @@ #if CC_PLATFORM == CC_PLATFORM_ANDROID #define __GNU_SOURCE + #include #include - #include static NewHookType g_new_hooker = nullptr; static DeleteHookType g_delete_hooker = nullptr; diff --git a/native/cocos/base/memory/MemoryHook.h b/native/cocos/base/memory/MemoryHook.h index 8cd36d655c..4330777630 100644 --- a/native/cocos/base/memory/MemoryHook.h +++ b/native/cocos/base/memory/MemoryHook.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/std/any.h b/native/cocos/base/std/any.h index ef7945b5e4..15273c34d0 100644 --- a/native/cocos/base/std/any.h +++ b/native/cocos/base/std/any.h @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once diff --git a/native/cocos/base/std/container/array.h b/native/cocos/base/std/container/array.h index 3f748be5e6..c3786114e6 100644 --- a/native/cocos/base/std/container/array.h +++ b/native/cocos/base/std/container/array.h @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once diff --git a/native/cocos/base/std/container/deque.h b/native/cocos/base/std/container/deque.h index 2950b0fa15..8e7bd41327 100644 --- a/native/cocos/base/std/container/deque.h +++ b/native/cocos/base/std/container/deque.h @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once diff --git a/native/cocos/base/std/container/list.h b/native/cocos/base/std/container/list.h index 3f65deffca..833e62acb6 100644 --- a/native/cocos/base/std/container/list.h +++ b/native/cocos/base/std/container/list.h @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once diff --git a/native/cocos/base/std/container/map.h b/native/cocos/base/std/container/map.h index 430eee8638..80952c0960 100644 --- a/native/cocos/base/std/container/map.h +++ b/native/cocos/base/std/container/map.h @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once diff --git a/native/cocos/base/std/container/queue.h b/native/cocos/base/std/container/queue.h index 2f2b609b51..406011beac 100644 --- a/native/cocos/base/std/container/queue.h +++ b/native/cocos/base/std/container/queue.h @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once diff --git a/native/cocos/base/std/container/set.h b/native/cocos/base/std/container/set.h index f68acab8a4..072aef27fc 100644 --- a/native/cocos/base/std/container/set.h +++ b/native/cocos/base/std/container/set.h @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #pragma once #include diff --git a/native/cocos/base/std/container/string.h b/native/cocos/base/std/container/string.h index c653227de7..53da9907ab 100644 --- a/native/cocos/base/std/container/string.h +++ b/native/cocos/base/std/container/string.h @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once diff --git a/native/cocos/base/std/container/unordered_map.h b/native/cocos/base/std/container/unordered_map.h index 84ad129498..5927c9f464 100644 --- a/native/cocos/base/std/container/unordered_map.h +++ b/native/cocos/base/std/container/unordered_map.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once @@ -47,6 +46,6 @@ template < class T, class Hash = ccstd::hash, class Pred = std::equal_to> -using unordered_multimap =std::unordered_multimap>>; -} +using unordered_multimap = std::unordered_multimap>>; +} // namespace pmr } // namespace ccstd diff --git a/native/cocos/base/std/container/unordered_set.h b/native/cocos/base/std/container/unordered_set.h index bc076c94ad..084376242e 100644 --- a/native/cocos/base/std/container/unordered_set.h +++ b/native/cocos/base/std/container/unordered_set.h @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #pragma once #include diff --git a/native/cocos/base/std/container/vector.h b/native/cocos/base/std/container/vector.h index e14d1e9d90..3a34a02f04 100644 --- a/native/cocos/base/std/container/vector.h +++ b/native/cocos/base/std/container/vector.h @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once diff --git a/native/cocos/base/std/optional.h b/native/cocos/base/std/optional.h index e59a096db6..4f14586988 100644 --- a/native/cocos/base/std/optional.h +++ b/native/cocos/base/std/optional.h @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once diff --git a/native/cocos/base/std/variant.h b/native/cocos/base/std/variant.h index 96bfd41b88..f457b25a1e 100644 --- a/native/cocos/base/std/variant.h +++ b/native/cocos/base/std/variant.h @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once diff --git a/native/cocos/base/threading/AutoReleasePool.cpp b/native/cocos/base/threading/AutoReleasePool.cpp index baac3cd69a..cded966cd4 100644 --- a/native/cocos/base/threading/AutoReleasePool.cpp +++ b/native/cocos/base/threading/AutoReleasePool.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/threading/AutoReleasePool.h b/native/cocos/base/threading/AutoReleasePool.h index ed104dbe6a..6086333d8f 100644 --- a/native/cocos/base/threading/AutoReleasePool.h +++ b/native/cocos/base/threading/AutoReleasePool.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/threading/ConditionVariable.cpp b/native/cocos/base/threading/ConditionVariable.cpp index b1ae710148..b34e93ba29 100644 --- a/native/cocos/base/threading/ConditionVariable.cpp +++ b/native/cocos/base/threading/ConditionVariable.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/threading/ConditionVariable.h b/native/cocos/base/threading/ConditionVariable.h index 18d52c782e..4be0504b9e 100644 --- a/native/cocos/base/threading/ConditionVariable.h +++ b/native/cocos/base/threading/ConditionVariable.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/threading/Event.h b/native/cocos/base/threading/Event.h index 4b0d829387..eee27bbbcb 100644 --- a/native/cocos/base/threading/Event.h +++ b/native/cocos/base/threading/Event.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/threading/MessageQueue.cpp b/native/cocos/base/threading/MessageQueue.cpp index 45346d7aa5..febebe9f9d 100644 --- a/native/cocos/base/threading/MessageQueue.cpp +++ b/native/cocos/base/threading/MessageQueue.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -268,6 +267,10 @@ Message *MessageQueue::readMessage() noexcept { return msg; } +MessageQueue::~MessageQueue() { + recycleMemoryChunk(_writer.currentMemoryChunk); +} + void MessageQueue::consumerThreadLoop() noexcept { while (!_reader.terminateConsumerThread) { AutoReleasePool autoReleasePool; diff --git a/native/cocos/base/threading/MessageQueue.h b/native/cocos/base/threading/MessageQueue.h index 9640374b94..868643c2b3 100644 --- a/native/cocos/base/threading/MessageQueue.h +++ b/native/cocos/base/threading/MessageQueue.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -96,7 +95,7 @@ public: static constexpr uint32_t MEMORY_CHUNK_SIZE = 4096 * 16; MessageQueue(); - ~MessageQueue() = default; + ~MessageQueue(); MessageQueue(MessageQueue const &) = delete; MessageQueue(MessageQueue &&) = delete; MessageQueue &operator=(MessageQueue const &) = delete; diff --git a/native/cocos/base/threading/ReadWriteLock.h b/native/cocos/base/threading/ReadWriteLock.h index 90c384a019..5442d15f94 100644 --- a/native/cocos/base/threading/ReadWriteLock.h +++ b/native/cocos/base/threading/ReadWriteLock.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/threading/Semaphore.cpp b/native/cocos/base/threading/Semaphore.cpp index 749d55dd62..86249a2927 100644 --- a/native/cocos/base/threading/Semaphore.cpp +++ b/native/cocos/base/threading/Semaphore.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/threading/Semaphore.h b/native/cocos/base/threading/Semaphore.h index 4ee26ddf8f..b0974ae6d1 100644 --- a/native/cocos/base/threading/Semaphore.h +++ b/native/cocos/base/threading/Semaphore.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/threading/ThreadPool.cpp b/native/cocos/base/threading/ThreadPool.cpp index 5d6b1428ac..3eb983c688 100644 --- a/native/cocos/base/threading/ThreadPool.cpp +++ b/native/cocos/base/threading/ThreadPool.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/threading/ThreadPool.h b/native/cocos/base/threading/ThreadPool.h index af12640024..4487093778 100644 --- a/native/cocos/base/threading/ThreadPool.h +++ b/native/cocos/base/threading/ThreadPool.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/threading/ThreadSafeCounter.h b/native/cocos/base/threading/ThreadSafeCounter.h index 86edff7fe2..92ab1f4102 100644 --- a/native/cocos/base/threading/ThreadSafeCounter.h +++ b/native/cocos/base/threading/ThreadSafeCounter.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/threading/ThreadSafeLinearAllocator.cpp b/native/cocos/base/threading/ThreadSafeLinearAllocator.cpp index 00f2167ab0..1d3b3e0d58 100644 --- a/native/cocos/base/threading/ThreadSafeLinearAllocator.cpp +++ b/native/cocos/base/threading/ThreadSafeLinearAllocator.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/base/threading/ThreadSafeLinearAllocator.h b/native/cocos/base/threading/ThreadSafeLinearAllocator.h index 5f6f3638dd..666da17c98 100644 --- a/native/cocos/base/threading/ThreadSafeLinearAllocator.h +++ b/native/cocos/base/threading/ThreadSafeLinearAllocator.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/auto/jsb_2d_auto.cpp b/native/cocos/bindings/auto/jsb_2d_auto.cpp index 53d4a93fca..3ae50e93a1 100644 --- a/native/cocos/bindings/auto/jsb_2d_auto.cpp +++ b/native/cocos/bindings/auto/jsb_2d_auto.cpp @@ -9,20 +9,19 @@ * ----------------------------------------------------------------------------- */ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/auto/jsb_2d_auto.h b/native/cocos/bindings/auto/jsb_2d_auto.h index 72e56f80cf..dc6cf5f682 100644 --- a/native/cocos/bindings/auto/jsb_2d_auto.h +++ b/native/cocos/bindings/auto/jsb_2d_auto.h @@ -9,20 +9,19 @@ * ----------------------------------------------------------------------------- */ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/auto/jsb_ar_auto.cpp b/native/cocos/bindings/auto/jsb_ar_auto.cpp index d79a82d125..d75c202908 100644 --- a/native/cocos/bindings/auto/jsb_ar_auto.cpp +++ b/native/cocos/bindings/auto/jsb_ar_auto.cpp @@ -9,20 +9,19 @@ * ----------------------------------------------------------------------------- */ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -66,6 +65,28 @@ se::Class* __jsb_cc_ar_ARModule_class = nullptr; se::Object* __jsb_cc_ar_ARModule_proto = nullptr; SE_DECLARE_FINALIZE_FUNC(js_delete_cc_ar_ARModule) +static bool js_cc_ar_ARModule_createARModule_static(se::State& s) +{ + CC_UNUSED bool ok = true; + const auto& args = s.args(); + size_t argc = args.size(); + cc::ar::ARModule *result = 0 ; + + if(argc != 0) { + SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); + return false; + } + result = (cc::ar::ARModule *)cc::ar::ARModule::createARModule(); + + ok &= nativevalue_to_se(result, s.rval(), s.thisObject()); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); + + + return true; +} +SE_BIND_FUNC(js_cc_ar_ARModule_createARModule_static) + static bool js_cc_ar_ARModule_get_static(se::State& s) { CC_UNUSED bool ok = true; @@ -601,6 +622,49 @@ static bool js_cc_ar_ARModule_getCameraDepthBuffer(se::State& s) } SE_BIND_FUNC(js_cc_ar_ARModule_getCameraDepthBuffer) +static bool js_cc_ar_ARModule_getTexInitFlag(se::State& s) +{ + CC_UNUSED bool ok = true; + const auto& args = s.args(); + size_t argc = args.size(); + cc::ar::ARModule *arg1 = (cc::ar::ARModule *) NULL ; + bool result; + + if(argc != 0) { + SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); + return false; + } + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + result = (bool)((cc::ar::ARModule const *)arg1)->getTexInitFlag(); + + ok &= nativevalue_to_se(result, s.rval(), s.thisObject()); + + + return true; +} +SE_BIND_FUNC(js_cc_ar_ARModule_getTexInitFlag) + +static bool js_cc_ar_ARModule_resetTexInitFlag(se::State& s) +{ + CC_UNUSED bool ok = true; + const auto& args = s.args(); + size_t argc = args.size(); + cc::ar::ARModule *arg1 = (cc::ar::ARModule *) NULL ; + + if(argc != 0) { + SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); + return false; + } + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + (arg1)->resetTexInitFlag(); + + + return true; +} +SE_BIND_FUNC(js_cc_ar_ARModule_resetTexInitFlag) + static bool js_cc_ar_ARModule_enableLightEstimate(se::State& s) { CC_UNUSED bool ok = true; @@ -1164,6 +1228,8 @@ bool js_register_cc_ar_ARModule(se::Object* obj) { cls->defineFunction("setCameraTextureName", _SE(js_cc_ar_ARModule_setCameraTextureName)); cls->defineFunction("getCameraTextureRef", _SE(js_cc_ar_ARModule_getCameraTextureRef)); cls->defineFunction("getCameraDepthBuffer", _SE(js_cc_ar_ARModule_getCameraDepthBuffer)); + cls->defineFunction("getTexInitFlag", _SE(js_cc_ar_ARModule_getTexInitFlag)); + cls->defineFunction("resetTexInitFlag", _SE(js_cc_ar_ARModule_resetTexInitFlag)); cls->defineFunction("enableLightEstimate", _SE(js_cc_ar_ARModule_enableLightEstimate)); cls->defineFunction("getMainLightDirection", _SE(js_cc_ar_ARModule_getMainLightDirection)); cls->defineFunction("getMainLightIntensity", _SE(js_cc_ar_ARModule_getMainLightIntensity)); @@ -1187,6 +1253,7 @@ bool js_register_cc_ar_ARModule(se::Object* obj) { cls->defineFunction("enableFaceTracking", _SE(js_cc_ar_ARModule_enableFaceTracking)); + cls->defineStaticFunction("createARModule", _SE(js_cc_ar_ARModule_createARModule_static)); cls->defineStaticFunction("get", _SE(js_cc_ar_ARModule_get_static)); diff --git a/native/cocos/bindings/auto/jsb_ar_auto.h b/native/cocos/bindings/auto/jsb_ar_auto.h index f75acd15df..27ac7f631b 100644 --- a/native/cocos/bindings/auto/jsb_ar_auto.h +++ b/native/cocos/bindings/auto/jsb_ar_auto.h @@ -9,20 +9,19 @@ * ----------------------------------------------------------------------------- */ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/auto/jsb_assets_auto.cpp b/native/cocos/bindings/auto/jsb_assets_auto.cpp index 32008a9f2d..92015dbc29 100644 --- a/native/cocos/bindings/auto/jsb_assets_auto.cpp +++ b/native/cocos/bindings/auto/jsb_assets_auto.cpp @@ -9,20 +9,19 @@ * ----------------------------------------------------------------------------- */ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -11512,6 +11511,43 @@ static bool js_cc_IPassInfoFull_phase_get(se::State& s) } SE_BIND_PROP_GET(js_cc_IPassInfoFull_phase_get) +static bool js_cc_IPassInfoFull_pass_set(se::State& s) +{ + CC_UNUSED bool ok = true; + const auto& args = s.args(); + size_t argc = args.size(); + cc::IPassInfoFull *arg1 = (cc::IPassInfoFull *) NULL ; + + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + + ok &= sevalue_to_native(args[0], &arg1->pass, s.thisObject()); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + + + + return true; +} +SE_BIND_PROP_SET(js_cc_IPassInfoFull_pass_set) + +static bool js_cc_IPassInfoFull_pass_get(se::State& s) +{ + CC_UNUSED bool ok = true; + cc::IPassInfoFull *arg1 = (cc::IPassInfoFull *) NULL ; + + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + + ok &= nativevalue_to_se(arg1->pass, s.rval(), s.thisObject() /*ctx*/); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + SE_HOLD_RETURN_VALUE(arg1->pass, s.thisObject(), s.rval()); + + + + return true; +} +SE_BIND_PROP_GET(js_cc_IPassInfoFull_pass_get) + static bool js_cc_IPassInfoFull_program_set(se::State& s) { CC_UNUSED bool ok = true; @@ -11930,6 +11966,12 @@ bool sevalue_to_native(const se::Value &from, cc::IPassInfoFull * to, se::Object } + json->getProperty("pass", &field, true); + if (!field.isNullOrUndefined()) { + ok &= sevalue_to_native(field, &(to->pass), ctx); + } + + json->getProperty("program", &field, true); if (!field.isNullOrUndefined()) { ok &= sevalue_to_native(field, &(to->program), ctx); @@ -11994,6 +12036,7 @@ bool js_register_cc_IPassInfoFull(se::Object* obj) { cls->defineProperty("blendState", _SE(js_cc_IPassInfoFull_blendState_get), _SE(js_cc_IPassInfoFull_blendState_set)); cls->defineProperty("dynamicStates", _SE(js_cc_IPassInfoFull_dynamicStates_get), _SE(js_cc_IPassInfoFull_dynamicStates_set)); cls->defineProperty("phase", _SE(js_cc_IPassInfoFull_phase_get), _SE(js_cc_IPassInfoFull_phase_set)); + cls->defineProperty("pass", _SE(js_cc_IPassInfoFull_pass_get), _SE(js_cc_IPassInfoFull_pass_set)); cls->defineProperty("program", _SE(js_cc_IPassInfoFull_program_get), _SE(js_cc_IPassInfoFull_program_set)); cls->defineProperty("embeddedMacros", _SE(js_cc_IPassInfoFull_embeddedMacros_get), _SE(js_cc_IPassInfoFull_embeddedMacros_set)); cls->defineProperty("propertyIndex", _SE(js_cc_IPassInfoFull_propertyIndex_get), _SE(js_cc_IPassInfoFull_propertyIndex_set)); @@ -16660,6 +16703,43 @@ static bool js_cc_IShaderInfo_subpassInputs_get(se::State& s) } SE_BIND_PROP_GET(js_cc_IShaderInfo_subpassInputs_get) +static bool js_cc_IShaderInfo_descriptors_set(se::State& s) +{ + CC_UNUSED bool ok = true; + const auto& args = s.args(); + size_t argc = args.size(); + cc::IShaderInfo *arg1 = (cc::IShaderInfo *) NULL ; + + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + + ok &= sevalue_to_native(args[0], &arg1->descriptors, s.thisObject()); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + + + + return true; +} +SE_BIND_PROP_SET(js_cc_IShaderInfo_descriptors_set) + +static bool js_cc_IShaderInfo_descriptors_get(se::State& s) +{ + CC_UNUSED bool ok = true; + cc::IShaderInfo *arg1 = (cc::IShaderInfo *) NULL ; + + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + + ok &= nativevalue_to_se(arg1->descriptors, s.rval(), s.thisObject() /*ctx*/); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + SE_HOLD_RETURN_VALUE(arg1->descriptors, s.thisObject(), s.rval()); + + + + return true; +} +SE_BIND_PROP_GET(js_cc_IShaderInfo_descriptors_get) + static bool js_cc_IShaderInfo_getSource(se::State& s) { CC_UNUSED bool ok = true; @@ -16817,6 +16897,12 @@ bool sevalue_to_native(const se::Value &from, cc::IShaderInfo * to, se::Object * } + json->getProperty("descriptors", &field, true); + if (!field.isNullOrUndefined()) { + ok &= sevalue_to_native(field, &(to->descriptors), ctx); + } + + return ok; } @@ -16840,6 +16926,7 @@ bool js_register_cc_IShaderInfo(se::Object* obj) { cls->defineProperty("buffers", _SE(js_cc_IShaderInfo_buffers_get), _SE(js_cc_IShaderInfo_buffers_set)); cls->defineProperty("images", _SE(js_cc_IShaderInfo_images_get), _SE(js_cc_IShaderInfo_images_set)); cls->defineProperty("subpassInputs", _SE(js_cc_IShaderInfo_subpassInputs_get), _SE(js_cc_IShaderInfo_subpassInputs_set)); + cls->defineProperty("descriptors", _SE(js_cc_IShaderInfo_descriptors_get), _SE(js_cc_IShaderInfo_descriptors_set)); cls->defineFunction("getSource", _SE(js_cc_IShaderInfo_getSource)); diff --git a/native/cocos/bindings/auto/jsb_assets_auto.h b/native/cocos/bindings/auto/jsb_assets_auto.h index 6e4f0c3031..5a287bf4f1 100644 --- a/native/cocos/bindings/auto/jsb_assets_auto.h +++ b/native/cocos/bindings/auto/jsb_assets_auto.h @@ -9,20 +9,19 @@ * ----------------------------------------------------------------------------- */ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/auto/jsb_audio_auto.cpp b/native/cocos/bindings/auto/jsb_audio_auto.cpp index 3a8ab2b70f..623f9f95a0 100644 --- a/native/cocos/bindings/auto/jsb_audio_auto.cpp +++ b/native/cocos/bindings/auto/jsb_audio_auto.cpp @@ -9,20 +9,19 @@ * ----------------------------------------------------------------------------- */ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/auto/jsb_audio_auto.h b/native/cocos/bindings/auto/jsb_audio_auto.h index ea5d5352fa..d68b2ac375 100644 --- a/native/cocos/bindings/auto/jsb_audio_auto.h +++ b/native/cocos/bindings/auto/jsb_audio_auto.h @@ -9,20 +9,19 @@ * ----------------------------------------------------------------------------- */ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/auto/jsb_cocos_auto.cpp b/native/cocos/bindings/auto/jsb_cocos_auto.cpp index 9d271e44a3..d8fbe78e71 100644 --- a/native/cocos/bindings/auto/jsb_cocos_auto.cpp +++ b/native/cocos/bindings/auto/jsb_cocos_auto.cpp @@ -9,20 +9,19 @@ * ----------------------------------------------------------------------------- */ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -1684,6 +1683,26 @@ static bool js_delete_cc_CCObject(se::State& s) } SE_BIND_FINALIZE_FUNC(js_delete_cc_CCObject) +static bool js_cc_CCObject_destruct(se::State& s) +{ + CC_UNUSED bool ok = true; + const auto& args = s.args(); + size_t argc = args.size(); + cc::CCObject *arg1 = (cc::CCObject *) NULL ; + + if(argc != 0) { + SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); + return false; + } + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + (arg1)->destruct(); + + + return true; +} +SE_BIND_FUNC(js_cc_CCObject_destruct) + static bool js_cc_CCObject__destroy(se::State& s) { CC_UNUSED bool ok = true; @@ -1901,6 +1920,7 @@ bool js_register_cc_CCObject(se::Object* obj) { cls->defineProperty("replicated", _SE(js_cc_CCObject_replicated_get), _SE(js_cc_CCObject_replicated_set)); cls->defineProperty("isValid", _SE(js_cc_CCObject_isValid_get), nullptr); + cls->defineFunction("destruct", _SE(js_cc_CCObject_destruct)); cls->defineFunction("_destroy", _SE(js_cc_CCObject__destroy)); cls->defineFunction("_destroyImmediate", _SE(js_cc_CCObject__destroyImmediate)); cls->defineFunction("toString", _SE(js_cc_CCObject_toString)); diff --git a/native/cocos/bindings/auto/jsb_cocos_auto.h b/native/cocos/bindings/auto/jsb_cocos_auto.h index 2e8fa3e2c8..a0e636f194 100644 --- a/native/cocos/bindings/auto/jsb_cocos_auto.h +++ b/native/cocos/bindings/auto/jsb_cocos_auto.h @@ -9,20 +9,19 @@ * ----------------------------------------------------------------------------- */ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/auto/jsb_dragonbones_auto.cpp b/native/cocos/bindings/auto/jsb_dragonbones_auto.cpp index 97519138c2..35d17caac0 100644 --- a/native/cocos/bindings/auto/jsb_dragonbones_auto.cpp +++ b/native/cocos/bindings/auto/jsb_dragonbones_auto.cpp @@ -9,20 +9,19 @@ * ----------------------------------------------------------------------------- */ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/auto/jsb_dragonbones_auto.h b/native/cocos/bindings/auto/jsb_dragonbones_auto.h index 08c681ead2..ef6df2be46 100644 --- a/native/cocos/bindings/auto/jsb_dragonbones_auto.h +++ b/native/cocos/bindings/auto/jsb_dragonbones_auto.h @@ -9,20 +9,19 @@ * ----------------------------------------------------------------------------- */ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/auto/jsb_editor_support_auto.cpp b/native/cocos/bindings/auto/jsb_editor_support_auto.cpp index f39c1728da..531cda6e59 100644 --- a/native/cocos/bindings/auto/jsb_editor_support_auto.cpp +++ b/native/cocos/bindings/auto/jsb_editor_support_auto.cpp @@ -9,20 +9,19 @@ * ----------------------------------------------------------------------------- */ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/auto/jsb_editor_support_auto.h b/native/cocos/bindings/auto/jsb_editor_support_auto.h index 6a8e25ea92..dc650ac41a 100644 --- a/native/cocos/bindings/auto/jsb_editor_support_auto.h +++ b/native/cocos/bindings/auto/jsb_editor_support_auto.h @@ -9,20 +9,19 @@ * ----------------------------------------------------------------------------- */ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/auto/jsb_extension_auto.cpp b/native/cocos/bindings/auto/jsb_extension_auto.cpp index 261d6636a1..0803c1d03d 100644 --- a/native/cocos/bindings/auto/jsb_extension_auto.cpp +++ b/native/cocos/bindings/auto/jsb_extension_auto.cpp @@ -9,20 +9,19 @@ * ----------------------------------------------------------------------------- */ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/auto/jsb_extension_auto.h b/native/cocos/bindings/auto/jsb_extension_auto.h index 2e3d5c4015..b348bffa0a 100644 --- a/native/cocos/bindings/auto/jsb_extension_auto.h +++ b/native/cocos/bindings/auto/jsb_extension_auto.h @@ -9,20 +9,19 @@ * ----------------------------------------------------------------------------- */ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/auto/jsb_geometry_auto.cpp b/native/cocos/bindings/auto/jsb_geometry_auto.cpp index 0e3b5707ac..015be378f5 100644 --- a/native/cocos/bindings/auto/jsb_geometry_auto.cpp +++ b/native/cocos/bindings/auto/jsb_geometry_auto.cpp @@ -9,20 +9,19 @@ * ----------------------------------------------------------------------------- */ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/auto/jsb_geometry_auto.h b/native/cocos/bindings/auto/jsb_geometry_auto.h index 8010ec932d..81ea1379b3 100644 --- a/native/cocos/bindings/auto/jsb_geometry_auto.h +++ b/native/cocos/bindings/auto/jsb_geometry_auto.h @@ -9,20 +9,19 @@ * ----------------------------------------------------------------------------- */ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/auto/jsb_gfx_auto.cpp b/native/cocos/bindings/auto/jsb_gfx_auto.cpp index 143ccc9a16..c0ccb7f54c 100644 --- a/native/cocos/bindings/auto/jsb_gfx_auto.cpp +++ b/native/cocos/bindings/auto/jsb_gfx_auto.cpp @@ -9,20 +9,19 @@ * ----------------------------------------------------------------------------- */ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/auto/jsb_gfx_auto.h b/native/cocos/bindings/auto/jsb_gfx_auto.h index 4184f4d0d4..4dc65da569 100644 --- a/native/cocos/bindings/auto/jsb_gfx_auto.h +++ b/native/cocos/bindings/auto/jsb_gfx_auto.h @@ -9,20 +9,19 @@ * ----------------------------------------------------------------------------- */ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/auto/jsb_gi_auto.cpp b/native/cocos/bindings/auto/jsb_gi_auto.cpp index f8659a58bb..e5168230f7 100644 --- a/native/cocos/bindings/auto/jsb_gi_auto.cpp +++ b/native/cocos/bindings/auto/jsb_gi_auto.cpp @@ -9,20 +9,19 @@ * ----------------------------------------------------------------------------- */ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/auto/jsb_gi_auto.h b/native/cocos/bindings/auto/jsb_gi_auto.h index d9a4a1c84e..79d476f6ab 100644 --- a/native/cocos/bindings/auto/jsb_gi_auto.h +++ b/native/cocos/bindings/auto/jsb_gi_auto.h @@ -9,20 +9,19 @@ * ----------------------------------------------------------------------------- */ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/auto/jsb_network_auto.cpp b/native/cocos/bindings/auto/jsb_network_auto.cpp index d9c1082afb..98b169f177 100644 --- a/native/cocos/bindings/auto/jsb_network_auto.cpp +++ b/native/cocos/bindings/auto/jsb_network_auto.cpp @@ -9,20 +9,19 @@ * ----------------------------------------------------------------------------- */ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/auto/jsb_network_auto.h b/native/cocos/bindings/auto/jsb_network_auto.h index 8c4e708d7d..37cc477775 100644 --- a/native/cocos/bindings/auto/jsb_network_auto.h +++ b/native/cocos/bindings/auto/jsb_network_auto.h @@ -9,20 +9,19 @@ * ----------------------------------------------------------------------------- */ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/auto/jsb_physics_auto.cpp b/native/cocos/bindings/auto/jsb_physics_auto.cpp index 3ca89b717c..3a0e223038 100644 --- a/native/cocos/bindings/auto/jsb_physics_auto.cpp +++ b/native/cocos/bindings/auto/jsb_physics_auto.cpp @@ -9,20 +9,19 @@ * ----------------------------------------------------------------------------- */ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/auto/jsb_physics_auto.h b/native/cocos/bindings/auto/jsb_physics_auto.h index d926d7f429..e3ed09be67 100644 --- a/native/cocos/bindings/auto/jsb_physics_auto.h +++ b/native/cocos/bindings/auto/jsb_physics_auto.h @@ -9,20 +9,19 @@ * ----------------------------------------------------------------------------- */ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/auto/jsb_pipeline_auto.cpp b/native/cocos/bindings/auto/jsb_pipeline_auto.cpp index 269f4436bf..446b58a559 100644 --- a/native/cocos/bindings/auto/jsb_pipeline_auto.cpp +++ b/native/cocos/bindings/auto/jsb_pipeline_auto.cpp @@ -9,20 +9,19 @@ * ----------------------------------------------------------------------------- */ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -59,6 +58,7 @@ #include "bindings/auto/jsb_pipeline_auto.h" #include "bindings/auto/jsb_scene_auto.h" #include "bindings/auto/jsb_gfx_auto.h" +#include "bindings/auto/jsb_assets_auto.h" #include "bindings/auto/jsb_cocos_auto.h" #include "renderer/pipeline/PipelineUBO.h" @@ -99,6 +99,14 @@ using namespace cc; #define cc_pipeline_RenderPipeline_shadingScale_set(self_, val_) self_->setShadingScale(val_) +#define cc_pipeline_RenderPipeline__tag_get(self_) self_->getTag() +#define cc_pipeline_RenderPipeline__tag_set(self_, val_) self_->setTag(val_) + + +#define cc_pipeline_RenderPipeline__flows_get(self_) self_->getFlows() +#define cc_pipeline_RenderPipeline__flows_set(self_, val_) self_->setFlows(val_) + + #define cc_pipeline_PipelineSceneData_isHDR_get(self_) self_->isHDR() #define cc_pipeline_PipelineSceneData_isHDR_set(self_, val_) self_->setHDR(val_) @@ -122,6 +130,18 @@ using namespace cc; #define cc_pipeline_PipelineSceneData_lightProbes_get(self_) self_->getLightProbes() +#define cc_pipeline_RenderStage__name_get(self_) self_->getName() +#define cc_pipeline_RenderStage__name_set(self_, val_) self_->setName(val_) + + +#define cc_pipeline_RenderStage__priority_get(self_) self_->getPriority() +#define cc_pipeline_RenderStage__priority_set(self_, val_) self_->setPriority(val_) + + +#define cc_pipeline_RenderStage__tag_get(self_) self_->getTag() +#define cc_pipeline_RenderStage__tag_set(self_, val_) self_->setTag(val_) + + #define cc_pipeline_BloomStage_threshold_get(self_) self_->getThreshold() #define cc_pipeline_BloomStage_threshold_set(self_, val_) self_->setThreshold(val_) @@ -134,6 +154,22 @@ using namespace cc; #define cc_pipeline_BloomStage_iterations_set(self_, val_) self_->setIterations(val_) +#define cc_pipeline_RenderFlow__name_get(self_) self_->getName() +#define cc_pipeline_RenderFlow__name_set(self_, val_) self_->setName(val_) + + +#define cc_pipeline_RenderFlow__priority_get(self_) self_->getPriority() +#define cc_pipeline_RenderFlow__priority_set(self_, val_) self_->setPriority(val_) + + +#define cc_pipeline_RenderFlow__tag_get(self_) self_->getTag() +#define cc_pipeline_RenderFlow__tag_set(self_, val_) self_->setTag(val_) + + +#define cc_pipeline_RenderFlow__stages_get(self_) self_->getStages() +#define cc_pipeline_RenderFlow__stages_set(self_, val_) self_->setStages(val_) + + se::Class* __jsb_cc_pipeline_SkinningJointCapacity_class = nullptr; se::Object* __jsb_cc_pipeline_SkinningJointCapacity_proto = nullptr; @@ -2288,6 +2324,74 @@ se::Class* __jsb_cc_pipeline_RenderQueueDesc_class = nullptr; se::Object* __jsb_cc_pipeline_RenderQueueDesc_proto = nullptr; SE_DECLARE_FINALIZE_FUNC(js_delete_cc_pipeline_RenderQueueDesc) +static bool js_new_cc_pipeline_RenderQueueDesc__SWIG_0(se::State& s) // NOLINT(readability-identifier-naming) +{ + const auto& args = s.args(); + CC_UNUSED bool ok = true; + cc::pipeline::RenderQueueDesc *result; + result = (cc::pipeline::RenderQueueDesc *)new cc::pipeline::RenderQueueDesc(); + + + auto *ptr = JSB_MAKE_PRIVATE_OBJECT_WITH_INSTANCE(result); + s.thisObject()->setPrivateObject(ptr); + return true; +} + + +static bool js_new_cc_pipeline_RenderQueueDesc__SWIG_1(se::State& s) // NOLINT(readability-identifier-naming) +{ + const auto& args = s.args(); + CC_UNUSED bool ok = true; + bool arg1 ; + cc::pipeline::RenderQueueSortMode arg2 ; + ccstd::vector< ccstd::string > *arg3 = 0 ; + ccstd::vector< ccstd::string > temp3 ; + cc::pipeline::RenderQueueDesc *result; + + ok &= sevalue_to_native(args[0], &arg1); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + + ok &= sevalue_to_native(args[1], &arg2, s.thisObject()); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + + + ok &= sevalue_to_native(args[2], &temp3, s.thisObject()); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + arg3 = &temp3; + + result = (cc::pipeline::RenderQueueDesc *)new cc::pipeline::RenderQueueDesc(arg1,arg2,(ccstd::vector< ccstd::string > const &)*arg3); + + + auto *ptr = JSB_MAKE_PRIVATE_OBJECT_WITH_INSTANCE(result); + s.thisObject()->setPrivateObject(ptr); + return true; +} + + +static bool js_new_RenderQueueDesc(se::State& s) // NOLINT(readability-identifier-naming) +{ + size_t argc = s.args().size(); + bool ret = false; + + if(argc == 0) { + ret = js_new_cc_pipeline_RenderQueueDesc__SWIG_0(s); + if (ret) { + return ret; + } /* reset exception and return */ + } + + if(argc == 3) { + ret = js_new_cc_pipeline_RenderQueueDesc__SWIG_1(s); + if (ret) { + return ret; + } /* reset exception and return */ + } + + SE_REPORT_ERROR("Illegal arguments for construction of RenderQueueDesc"); + return false; +} +SE_BIND_CTOR(js_new_RenderQueueDesc, __jsb_cc_pipeline_RenderQueueDesc_class, js_delete_cc_pipeline_RenderQueueDesc) + static bool js_cc_pipeline_RenderQueueDesc_isTransparent_set(se::State& s) { CC_UNUSED bool ok = true; @@ -2395,65 +2499,14 @@ static bool js_cc_pipeline_RenderQueueDesc_stages_get(se::State& s) } SE_BIND_PROP_GET(js_cc_pipeline_RenderQueueDesc_stages_get) -static bool js_new_cc_pipeline_RenderQueueDesc(se::State& s) // NOLINT(readability-identifier-naming) -{ - CC_UNUSED bool ok = true; - const auto& args = s.args(); - size_t argc = args.size(); - - cc::pipeline::RenderQueueDesc *result; - result = (cc::pipeline::RenderQueueDesc *)new cc::pipeline::RenderQueueDesc(); - - - auto *ptr = JSB_MAKE_PRIVATE_OBJECT_WITH_INSTANCE(result); - s.thisObject()->setPrivateObject(ptr); - return true; -} -SE_BIND_CTOR(js_new_cc_pipeline_RenderQueueDesc, __jsb_cc_pipeline_RenderQueueDesc_class, js_delete_cc_pipeline_RenderQueueDesc) - static bool js_delete_cc_pipeline_RenderQueueDesc(se::State& s) { return true; } SE_BIND_FINALIZE_FUNC(js_delete_cc_pipeline_RenderQueueDesc) -template<> -bool sevalue_to_native(const se::Value &from, cc::pipeline::RenderQueueDesc * to, se::Object *ctx) -{ - assert(from.isObject()); - se::Object *json = from.toObject(); - auto* data = reinterpret_cast(json->getPrivateData()); - if (data) { - *to = *data; - return true; - } - se::Value field; - bool ok = true; - - json->getProperty("isTransparent", &field, true); - if (!field.isNullOrUndefined()) { - ok &= sevalue_to_native(field, &(to->isTransparent), ctx); - } - - - json->getProperty("sortMode", &field, true); - if (!field.isNullOrUndefined()) { - ok &= sevalue_to_native(field, &(to->sortMode), ctx); - } - - - json->getProperty("stages", &field, true); - if (!field.isNullOrUndefined()) { - ok &= sevalue_to_native(field, &(to->stages), ctx); - } - - - return ok; -} - - bool js_register_cc_pipeline_RenderQueueDesc(se::Object* obj) { - auto* cls = se::Class::create("RenderQueueDesc", obj, nullptr, _SE(js_new_cc_pipeline_RenderQueueDesc)); + auto* cls = se::Class::create("RenderQueueDesc", obj, nullptr, _SE(js_new_RenderQueueDesc)); cls->defineStaticProperty("__isJSB", se::Value(true), se::PropertyAttribute::READ_ONLY | se::PropertyAttribute::DONT_ENUM | se::PropertyAttribute::DONT_DELETE); cls->defineProperty("isTransparent", _SE(js_cc_pipeline_RenderQueueDesc_isTransparent_get), _SE(js_cc_pipeline_RenderQueueDesc_isTransparent_set)); @@ -7352,54 +7405,6 @@ static bool js_cc_pipeline_RenderPipeline_onGlobalPipelineStateChanged(se::State } SE_BIND_FUNC(js_cc_pipeline_RenderPipeline_onGlobalPipelineStateChanged) -static bool js_cc_pipeline_RenderPipeline_getFlows(se::State& s) -{ - CC_UNUSED bool ok = true; - const auto& args = s.args(); - size_t argc = args.size(); - cc::pipeline::RenderPipeline *arg1 = (cc::pipeline::RenderPipeline *) NULL ; - cc::pipeline::RenderFlowList *result = 0 ; - - if(argc != 0) { - SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); - return false; - } - arg1 = SE_THIS_OBJECT(s); - if (nullptr == arg1) return true; - result = (cc::pipeline::RenderFlowList *) &((cc::pipeline::RenderPipeline const *)arg1)->getFlows(); - - ok &= nativevalue_to_se(*result, s.rval(), s.thisObject()); - SE_PRECONDITION2(ok, false, "Error processing arguments"); - SE_HOLD_RETURN_VALUE(*result, s.thisObject(), s.rval()); - - - return true; -} -SE_BIND_FUNC(js_cc_pipeline_RenderPipeline_getFlows) - -static bool js_cc_pipeline_RenderPipeline_getTag(se::State& s) -{ - CC_UNUSED bool ok = true; - const auto& args = s.args(); - size_t argc = args.size(); - cc::pipeline::RenderPipeline *arg1 = (cc::pipeline::RenderPipeline *) NULL ; - uint32_t result; - - if(argc != 0) { - SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); - return false; - } - arg1 = SE_THIS_OBJECT(s); - if (nullptr == arg1) return true; - result = ((cc::pipeline::RenderPipeline const *)arg1)->getTag(); - - ok &= nativevalue_to_se(result, s.rval(), s.thisObject()); - - - return true; -} -SE_BIND_FUNC(js_cc_pipeline_RenderPipeline_getTag) - static bool js_cc_pipeline_RenderPipeline_getGlobalBindings(se::State& s) { CC_UNUSED bool ok = true; @@ -8397,8 +8402,87 @@ static bool js_cc_pipeline_RenderPipeline_shadingScale_get(se::State& s) } SE_BIND_PROP_GET(js_cc_pipeline_RenderPipeline_shadingScale_get) +static bool js_cc_pipeline_RenderPipeline__tag_set(se::State& s) +{ + CC_UNUSED bool ok = true; + const auto& args = s.args(); + size_t argc = args.size(); + cc::pipeline::RenderPipeline *arg1 = (cc::pipeline::RenderPipeline *) NULL ; + uint32_t arg2 ; + + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + + ok &= sevalue_to_native(args[0], &arg2, s.thisObject()); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + + cc_pipeline_RenderPipeline__tag_set(arg1,SWIG_STD_MOVE(arg2)); + + + return true; +} +SE_BIND_PROP_SET(js_cc_pipeline_RenderPipeline__tag_set) + +static bool js_cc_pipeline_RenderPipeline__tag_get(se::State& s) +{ + CC_UNUSED bool ok = true; + cc::pipeline::RenderPipeline *arg1 = (cc::pipeline::RenderPipeline *) NULL ; + uint32_t result; + + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + result = cc_pipeline_RenderPipeline__tag_get(arg1); + + ok &= nativevalue_to_se(result, s.rval(), s.thisObject()); + + + return true; +} +SE_BIND_PROP_GET(js_cc_pipeline_RenderPipeline__tag_get) + +static bool js_cc_pipeline_RenderPipeline__flows_set(se::State& s) +{ + CC_UNUSED bool ok = true; + const auto& args = s.args(); + size_t argc = args.size(); + cc::pipeline::RenderPipeline *arg1 = (cc::pipeline::RenderPipeline *) NULL ; + cc::pipeline::RenderFlowList arg2 ; + + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + + ok &= sevalue_to_native(args[0], &arg2, s.thisObject()); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + + cc_pipeline_RenderPipeline__flows_set(arg1,SWIG_STD_MOVE(arg2)); + + + return true; +} +SE_BIND_PROP_SET(js_cc_pipeline_RenderPipeline__flows_set) + +static bool js_cc_pipeline_RenderPipeline__flows_get(se::State& s) +{ + CC_UNUSED bool ok = true; + cc::pipeline::RenderPipeline *arg1 = (cc::pipeline::RenderPipeline *) NULL ; + cc::pipeline::RenderFlowList result; + + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + result = cc_pipeline_RenderPipeline__flows_get(arg1); + + ok &= nativevalue_to_se(result, s.rval(), s.thisObject() /*ctx*/); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); + + + + return true; +} +SE_BIND_PROP_GET(js_cc_pipeline_RenderPipeline__flows_get) + bool js_register_cc_pipeline_RenderPipeline(se::Object* obj) { - auto* cls = se::Class::create("RenderPipeline", obj, nullptr, _SE(js_new_cc_pipeline_RenderPipeline)); + auto* cls = se::Class::create("RenderPipeline", obj, __jsb_cc_Asset_proto, _SE(js_new_cc_pipeline_RenderPipeline)); cls->defineStaticProperty("__isJSB", se::Value(true), se::PropertyAttribute::READ_ONLY | se::PropertyAttribute::DONT_ENUM | se::PropertyAttribute::DONT_DELETE); cls->defineProperty("globalDSManager", _SE(js_cc_pipeline_RenderPipeline_globalDSManager_get), nullptr); @@ -8411,14 +8495,14 @@ bool js_register_cc_pipeline_RenderPipeline(se::Object* obj) { cls->defineProperty("geometryRenderer", _SE(js_cc_pipeline_RenderPipeline_geometryRenderer_get), nullptr); cls->defineProperty("profiler", _SE(js_cc_pipeline_RenderPipeline_profiler_get), _SE(js_cc_pipeline_RenderPipeline_profiler_set)); cls->defineProperty("shadingScale", _SE(js_cc_pipeline_RenderPipeline_shadingScale_get), _SE(js_cc_pipeline_RenderPipeline_shadingScale_set)); + cls->defineProperty("_tag", _SE(js_cc_pipeline_RenderPipeline__tag_get), _SE(js_cc_pipeline_RenderPipeline__tag_set)); + cls->defineProperty("_flows", _SE(js_cc_pipeline_RenderPipeline__flows_get), _SE(js_cc_pipeline_RenderPipeline__flows_set)); cls->defineFunction("activate", _SE(js_cc_pipeline_RenderPipeline_activate)); cls->defineFunction("destroy", _SE(js_cc_pipeline_RenderPipeline_destroy)); cls->defineFunction("initialize", _SE(js_cc_pipeline_RenderPipeline_initialize)); cls->defineFunction("render", _SE(js_cc_pipeline_RenderPipeline_render)); cls->defineFunction("onGlobalPipelineStateChanged", _SE(js_cc_pipeline_RenderPipeline_onGlobalPipelineStateChanged)); - cls->defineFunction("getFlows", _SE(js_cc_pipeline_RenderPipeline_getFlows)); - cls->defineFunction("getTag", _SE(js_cc_pipeline_RenderPipeline_getTag)); cls->defineFunction("getGlobalBindings", _SE(js_cc_pipeline_RenderPipeline_getGlobalBindings)); cls->defineFunction("getMacros", _SE(js_cc_pipeline_RenderPipeline_getMacros)); cls->defineFunction("setValue", _SE(js_cc_pipeline_RenderPipeline_setValue)); @@ -8821,77 +8905,6 @@ static bool js_cc_pipeline_RenderFlow_destroy(se::State& s) } SE_BIND_FUNC(js_cc_pipeline_RenderFlow_destroy) -static bool js_cc_pipeline_RenderFlow_getName(se::State& s) -{ - CC_UNUSED bool ok = true; - const auto& args = s.args(); - size_t argc = args.size(); - cc::pipeline::RenderFlow *arg1 = (cc::pipeline::RenderFlow *) NULL ; - ccstd::string *result = 0 ; - - if(argc != 0) { - SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); - return false; - } - arg1 = SE_THIS_OBJECT(s); - if (nullptr == arg1) return true; - result = (ccstd::string *) &((cc::pipeline::RenderFlow const *)arg1)->getName(); - - ok &= nativevalue_to_se(*result, s.rval(), s.thisObject()); - SE_PRECONDITION2(ok, false, "Error processing arguments"); - SE_HOLD_RETURN_VALUE(*result, s.thisObject(), s.rval()); - - - return true; -} -SE_BIND_FUNC(js_cc_pipeline_RenderFlow_getName) - -static bool js_cc_pipeline_RenderFlow_getPriority(se::State& s) -{ - CC_UNUSED bool ok = true; - const auto& args = s.args(); - size_t argc = args.size(); - cc::pipeline::RenderFlow *arg1 = (cc::pipeline::RenderFlow *) NULL ; - uint32_t result; - - if(argc != 0) { - SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); - return false; - } - arg1 = SE_THIS_OBJECT(s); - if (nullptr == arg1) return true; - result = ((cc::pipeline::RenderFlow const *)arg1)->getPriority(); - - ok &= nativevalue_to_se(result, s.rval(), s.thisObject()); - - - return true; -} -SE_BIND_FUNC(js_cc_pipeline_RenderFlow_getPriority) - -static bool js_cc_pipeline_RenderFlow_getTag(se::State& s) -{ - CC_UNUSED bool ok = true; - const auto& args = s.args(); - size_t argc = args.size(); - cc::pipeline::RenderFlow *arg1 = (cc::pipeline::RenderFlow *) NULL ; - uint32_t result; - - if(argc != 0) { - SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); - return false; - } - arg1 = SE_THIS_OBJECT(s); - if (nullptr == arg1) return true; - result = ((cc::pipeline::RenderFlow const *)arg1)->getTag(); - - ok &= nativevalue_to_se(result, s.rval(), s.thisObject()); - - - return true; -} -SE_BIND_FUNC(js_cc_pipeline_RenderFlow_getTag) - static bool js_cc_pipeline_RenderFlow_getRenderstageByName(se::State& s) { CC_UNUSED bool ok = true; @@ -8924,18 +8937,178 @@ static bool js_cc_pipeline_RenderFlow_getRenderstageByName(se::State& s) } SE_BIND_FUNC(js_cc_pipeline_RenderFlow_getRenderstageByName) +static bool js_cc_pipeline_RenderFlow__name_set(se::State& s) +{ + CC_UNUSED bool ok = true; + const auto& args = s.args(); + size_t argc = args.size(); + cc::pipeline::RenderFlow *arg1 = (cc::pipeline::RenderFlow *) NULL ; + ccstd::string *arg2 = 0 ; + ccstd::string temp2 ; + + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + + ok &= sevalue_to_native(args[0], &temp2, s.thisObject()); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + arg2 = &temp2; + + cc_pipeline_RenderFlow__name_set(arg1,*arg2); + + + return true; +} +SE_BIND_PROP_SET(js_cc_pipeline_RenderFlow__name_set) + +static bool js_cc_pipeline_RenderFlow__name_get(se::State& s) +{ + CC_UNUSED bool ok = true; + cc::pipeline::RenderFlow *arg1 = (cc::pipeline::RenderFlow *) NULL ; + ccstd::string *result = 0 ; + + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + result = (ccstd::string *) &cc_pipeline_RenderFlow__name_get(arg1); + + ok &= nativevalue_to_se(*result, s.rval(), s.thisObject()); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + SE_HOLD_RETURN_VALUE(*result, s.thisObject(), s.rval()); + + + return true; +} +SE_BIND_PROP_GET(js_cc_pipeline_RenderFlow__name_get) + +static bool js_cc_pipeline_RenderFlow__priority_set(se::State& s) +{ + CC_UNUSED bool ok = true; + const auto& args = s.args(); + size_t argc = args.size(); + cc::pipeline::RenderFlow *arg1 = (cc::pipeline::RenderFlow *) NULL ; + uint32_t arg2 ; + + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + + ok &= sevalue_to_native(args[0], &arg2, s.thisObject()); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + + cc_pipeline_RenderFlow__priority_set(arg1,SWIG_STD_MOVE(arg2)); + + + return true; +} +SE_BIND_PROP_SET(js_cc_pipeline_RenderFlow__priority_set) + +static bool js_cc_pipeline_RenderFlow__priority_get(se::State& s) +{ + CC_UNUSED bool ok = true; + cc::pipeline::RenderFlow *arg1 = (cc::pipeline::RenderFlow *) NULL ; + uint32_t result; + + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + result = cc_pipeline_RenderFlow__priority_get(arg1); + + ok &= nativevalue_to_se(result, s.rval(), s.thisObject()); + + + return true; +} +SE_BIND_PROP_GET(js_cc_pipeline_RenderFlow__priority_get) + +static bool js_cc_pipeline_RenderFlow__tag_set(se::State& s) +{ + CC_UNUSED bool ok = true; + const auto& args = s.args(); + size_t argc = args.size(); + cc::pipeline::RenderFlow *arg1 = (cc::pipeline::RenderFlow *) NULL ; + uint32_t arg2 ; + + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + + ok &= sevalue_to_native(args[0], &arg2, s.thisObject()); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + + cc_pipeline_RenderFlow__tag_set(arg1,SWIG_STD_MOVE(arg2)); + + + return true; +} +SE_BIND_PROP_SET(js_cc_pipeline_RenderFlow__tag_set) + +static bool js_cc_pipeline_RenderFlow__tag_get(se::State& s) +{ + CC_UNUSED bool ok = true; + cc::pipeline::RenderFlow *arg1 = (cc::pipeline::RenderFlow *) NULL ; + uint32_t result; + + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + result = cc_pipeline_RenderFlow__tag_get(arg1); + + ok &= nativevalue_to_se(result, s.rval(), s.thisObject()); + + + return true; +} +SE_BIND_PROP_GET(js_cc_pipeline_RenderFlow__tag_get) + +static bool js_cc_pipeline_RenderFlow__stages_set(se::State& s) +{ + CC_UNUSED bool ok = true; + const auto& args = s.args(); + size_t argc = args.size(); + cc::pipeline::RenderFlow *arg1 = (cc::pipeline::RenderFlow *) NULL ; + cc::pipeline::RenderStageList arg2 ; + + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + + ok &= sevalue_to_native(args[0], &arg2, s.thisObject()); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + + cc_pipeline_RenderFlow__stages_set(arg1,SWIG_STD_MOVE(arg2)); + + + return true; +} +SE_BIND_PROP_SET(js_cc_pipeline_RenderFlow__stages_set) + +static bool js_cc_pipeline_RenderFlow__stages_get(se::State& s) +{ + CC_UNUSED bool ok = true; + cc::pipeline::RenderFlow *arg1 = (cc::pipeline::RenderFlow *) NULL ; + cc::pipeline::RenderStageList result; + + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + result = cc_pipeline_RenderFlow__stages_get(arg1); + + ok &= nativevalue_to_se(result, s.rval(), s.thisObject() /*ctx*/); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); + + + + return true; +} +SE_BIND_PROP_GET(js_cc_pipeline_RenderFlow__stages_get) + bool js_register_cc_pipeline_RenderFlow(se::Object* obj) { auto* cls = se::Class::create("RenderFlow", obj, nullptr, _SE(js_new_cc_pipeline_RenderFlow)); cls->defineStaticProperty("__isJSB", se::Value(true), se::PropertyAttribute::READ_ONLY | se::PropertyAttribute::DONT_ENUM | se::PropertyAttribute::DONT_DELETE); + cls->defineProperty("_name", _SE(js_cc_pipeline_RenderFlow__name_get), _SE(js_cc_pipeline_RenderFlow__name_set)); + cls->defineProperty("_priority", _SE(js_cc_pipeline_RenderFlow__priority_get), _SE(js_cc_pipeline_RenderFlow__priority_set)); + cls->defineProperty("_tag", _SE(js_cc_pipeline_RenderFlow__tag_get), _SE(js_cc_pipeline_RenderFlow__tag_set)); + cls->defineProperty("_stages", _SE(js_cc_pipeline_RenderFlow__stages_get), _SE(js_cc_pipeline_RenderFlow__stages_set)); cls->defineFunction("initialize", _SE(js_cc_pipeline_RenderFlow_initialize)); cls->defineFunction("activate", _SE(js_cc_pipeline_RenderFlow_activate)); cls->defineFunction("render", _SE(js_cc_pipeline_RenderFlow_render)); cls->defineFunction("destroy", _SE(js_cc_pipeline_RenderFlow_destroy)); - cls->defineFunction("getName", _SE(js_cc_pipeline_RenderFlow_getName)); - cls->defineFunction("getPriority", _SE(js_cc_pipeline_RenderFlow_getPriority)); - cls->defineFunction("getTag", _SE(js_cc_pipeline_RenderFlow_getTag)); cls->defineFunction("getRenderstageByName", _SE(js_cc_pipeline_RenderFlow_getRenderstageByName)); @@ -9193,6 +9366,22 @@ se::Class* __jsb_cc_pipeline_RenderStage_class = nullptr; se::Object* __jsb_cc_pipeline_RenderStage_proto = nullptr; SE_DECLARE_FINALIZE_FUNC(js_delete_cc_pipeline_RenderStage) +static bool js_new_cc_pipeline_RenderStage(se::State& s) // NOLINT(readability-identifier-naming) +{ + CC_UNUSED bool ok = true; + const auto& args = s.args(); + size_t argc = args.size(); + + cc::pipeline::RenderStage *result; + result = (cc::pipeline::RenderStage *)new cc::pipeline::RenderStage(); + + + auto *ptr = JSB_MAKE_PRIVATE_OBJECT_WITH_INSTANCE(result); + s.thisObject()->setPrivateObject(ptr); + return true; +} +SE_BIND_CTOR(js_new_cc_pipeline_RenderStage, __jsb_cc_pipeline_RenderStage_class, js_delete_cc_pipeline_RenderStage) + static bool js_delete_cc_pipeline_RenderStage(se::State& s) { return true; @@ -9301,77 +9490,6 @@ static bool js_cc_pipeline_RenderStage_render(se::State& s) } SE_BIND_FUNC(js_cc_pipeline_RenderStage_render) -static bool js_cc_pipeline_RenderStage_getName(se::State& s) -{ - CC_UNUSED bool ok = true; - const auto& args = s.args(); - size_t argc = args.size(); - cc::pipeline::RenderStage *arg1 = (cc::pipeline::RenderStage *) NULL ; - ccstd::string *result = 0 ; - - if(argc != 0) { - SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); - return false; - } - arg1 = SE_THIS_OBJECT(s); - if (nullptr == arg1) return true; - result = (ccstd::string *) &((cc::pipeline::RenderStage const *)arg1)->getName(); - - ok &= nativevalue_to_se(*result, s.rval(), s.thisObject()); - SE_PRECONDITION2(ok, false, "Error processing arguments"); - SE_HOLD_RETURN_VALUE(*result, s.thisObject(), s.rval()); - - - return true; -} -SE_BIND_FUNC(js_cc_pipeline_RenderStage_getName) - -static bool js_cc_pipeline_RenderStage_getPriority(se::State& s) -{ - CC_UNUSED bool ok = true; - const auto& args = s.args(); - size_t argc = args.size(); - cc::pipeline::RenderStage *arg1 = (cc::pipeline::RenderStage *) NULL ; - uint32_t result; - - if(argc != 0) { - SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); - return false; - } - arg1 = SE_THIS_OBJECT(s); - if (nullptr == arg1) return true; - result = ((cc::pipeline::RenderStage const *)arg1)->getPriority(); - - ok &= nativevalue_to_se(result, s.rval(), s.thisObject()); - - - return true; -} -SE_BIND_FUNC(js_cc_pipeline_RenderStage_getPriority) - -static bool js_cc_pipeline_RenderStage_getTag(se::State& s) -{ - CC_UNUSED bool ok = true; - const auto& args = s.args(); - size_t argc = args.size(); - cc::pipeline::RenderStage *arg1 = (cc::pipeline::RenderStage *) NULL ; - uint32_t result; - - if(argc != 0) { - SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); - return false; - } - arg1 = SE_THIS_OBJECT(s); - if (nullptr == arg1) return true; - result = ((cc::pipeline::RenderStage const *)arg1)->getTag(); - - ok &= nativevalue_to_se(result, s.rval(), s.thisObject()); - - - return true; -} -SE_BIND_FUNC(js_cc_pipeline_RenderStage_getTag) - static bool js_cc_pipeline_RenderStage_getFlow(se::State& s) { CC_UNUSED bool ok = true; @@ -9397,18 +9515,136 @@ static bool js_cc_pipeline_RenderStage_getFlow(se::State& s) } SE_BIND_FUNC(js_cc_pipeline_RenderStage_getFlow) +static bool js_cc_pipeline_RenderStage__name_set(se::State& s) +{ + CC_UNUSED bool ok = true; + const auto& args = s.args(); + size_t argc = args.size(); + cc::pipeline::RenderStage *arg1 = (cc::pipeline::RenderStage *) NULL ; + ccstd::string *arg2 = 0 ; + ccstd::string temp2 ; + + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + + ok &= sevalue_to_native(args[0], &temp2, s.thisObject()); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + arg2 = &temp2; + + cc_pipeline_RenderStage__name_set(arg1,*arg2); + + + return true; +} +SE_BIND_PROP_SET(js_cc_pipeline_RenderStage__name_set) + +static bool js_cc_pipeline_RenderStage__name_get(se::State& s) +{ + CC_UNUSED bool ok = true; + cc::pipeline::RenderStage *arg1 = (cc::pipeline::RenderStage *) NULL ; + ccstd::string *result = 0 ; + + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + result = (ccstd::string *) &cc_pipeline_RenderStage__name_get(arg1); + + ok &= nativevalue_to_se(*result, s.rval(), s.thisObject()); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + SE_HOLD_RETURN_VALUE(*result, s.thisObject(), s.rval()); + + + return true; +} +SE_BIND_PROP_GET(js_cc_pipeline_RenderStage__name_get) + +static bool js_cc_pipeline_RenderStage__priority_set(se::State& s) +{ + CC_UNUSED bool ok = true; + const auto& args = s.args(); + size_t argc = args.size(); + cc::pipeline::RenderStage *arg1 = (cc::pipeline::RenderStage *) NULL ; + uint32_t arg2 ; + + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + + ok &= sevalue_to_native(args[0], &arg2, s.thisObject()); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + + cc_pipeline_RenderStage__priority_set(arg1,SWIG_STD_MOVE(arg2)); + + + return true; +} +SE_BIND_PROP_SET(js_cc_pipeline_RenderStage__priority_set) + +static bool js_cc_pipeline_RenderStage__priority_get(se::State& s) +{ + CC_UNUSED bool ok = true; + cc::pipeline::RenderStage *arg1 = (cc::pipeline::RenderStage *) NULL ; + uint32_t result; + + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + result = cc_pipeline_RenderStage__priority_get(arg1); + + ok &= nativevalue_to_se(result, s.rval(), s.thisObject()); + + + return true; +} +SE_BIND_PROP_GET(js_cc_pipeline_RenderStage__priority_get) + +static bool js_cc_pipeline_RenderStage__tag_set(se::State& s) +{ + CC_UNUSED bool ok = true; + const auto& args = s.args(); + size_t argc = args.size(); + cc::pipeline::RenderStage *arg1 = (cc::pipeline::RenderStage *) NULL ; + uint32_t arg2 ; + + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + + ok &= sevalue_to_native(args[0], &arg2, s.thisObject()); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + + cc_pipeline_RenderStage__tag_set(arg1,SWIG_STD_MOVE(arg2)); + + + return true; +} +SE_BIND_PROP_SET(js_cc_pipeline_RenderStage__tag_set) + +static bool js_cc_pipeline_RenderStage__tag_get(se::State& s) +{ + CC_UNUSED bool ok = true; + cc::pipeline::RenderStage *arg1 = (cc::pipeline::RenderStage *) NULL ; + uint32_t result; + + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + result = cc_pipeline_RenderStage__tag_get(arg1); + + ok &= nativevalue_to_se(result, s.rval(), s.thisObject()); + + + return true; +} +SE_BIND_PROP_GET(js_cc_pipeline_RenderStage__tag_get) + bool js_register_cc_pipeline_RenderStage(se::Object* obj) { - auto* cls = se::Class::create("RenderStage", obj, nullptr, nullptr); + auto* cls = se::Class::create("RenderStage", obj, nullptr, _SE(js_new_cc_pipeline_RenderStage)); cls->defineStaticProperty("__isJSB", se::Value(true), se::PropertyAttribute::READ_ONLY | se::PropertyAttribute::DONT_ENUM | se::PropertyAttribute::DONT_DELETE); + cls->defineProperty("_name", _SE(js_cc_pipeline_RenderStage__name_get), _SE(js_cc_pipeline_RenderStage__name_set)); + cls->defineProperty("_priority", _SE(js_cc_pipeline_RenderStage__priority_get), _SE(js_cc_pipeline_RenderStage__priority_set)); + cls->defineProperty("_tag", _SE(js_cc_pipeline_RenderStage__tag_get), _SE(js_cc_pipeline_RenderStage__tag_set)); cls->defineFunction("activate", _SE(js_cc_pipeline_RenderStage_activate)); cls->defineFunction("initialize", _SE(js_cc_pipeline_RenderStage_initialize)); cls->defineFunction("destroy", _SE(js_cc_pipeline_RenderStage_destroy)); cls->defineFunction("render", _SE(js_cc_pipeline_RenderStage_render)); - cls->defineFunction("getName", _SE(js_cc_pipeline_RenderStage_getName)); - cls->defineFunction("getPriority", _SE(js_cc_pipeline_RenderStage_getPriority)); - cls->defineFunction("getTag", _SE(js_cc_pipeline_RenderStage_getTag)); cls->defineFunction("getFlow", _SE(js_cc_pipeline_RenderStage_getFlow)); @@ -20908,6 +21144,202 @@ bool js_register_cc_pipeline_GeometryRenderer(se::Object* obj) { #endif // CC_USE_GEOMETRY_RENDERER +se::Class* __jsb_cc_pipeline_ReflectionProbeFlow_class = nullptr; +se::Object* __jsb_cc_pipeline_ReflectionProbeFlow_proto = nullptr; +SE_DECLARE_FINALIZE_FUNC(js_delete_cc_pipeline_ReflectionProbeFlow) + +static bool js_new_cc_pipeline_ReflectionProbeFlow(se::State& s) // NOLINT(readability-identifier-naming) +{ + CC_UNUSED bool ok = true; + const auto& args = s.args(); + size_t argc = args.size(); + + cc::pipeline::ReflectionProbeFlow *result; + result = (cc::pipeline::ReflectionProbeFlow *)new cc::pipeline::ReflectionProbeFlow(); + + + auto *ptr = JSB_MAKE_PRIVATE_OBJECT_WITH_INSTANCE(result); + s.thisObject()->setPrivateObject(ptr); + return true; +} +SE_BIND_CTOR(js_new_cc_pipeline_ReflectionProbeFlow, __jsb_cc_pipeline_ReflectionProbeFlow_class, js_delete_cc_pipeline_ReflectionProbeFlow) + +static bool js_delete_cc_pipeline_ReflectionProbeFlow(se::State& s) +{ + return true; +} +SE_BIND_FINALIZE_FUNC(js_delete_cc_pipeline_ReflectionProbeFlow) + +static bool js_cc_pipeline_ReflectionProbeFlow_getInitializeInfo_static(se::State& s) +{ + CC_UNUSED bool ok = true; + const auto& args = s.args(); + size_t argc = args.size(); + cc::pipeline::RenderFlowInfo *result = 0 ; + + if(argc != 0) { + SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); + return false; + } + result = (cc::pipeline::RenderFlowInfo *) &cc::pipeline::ReflectionProbeFlow::getInitializeInfo(); + + ok &= nativevalue_to_se(*result, s.rval(), s.thisObject()); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + SE_HOLD_RETURN_VALUE(*result, s.thisObject(), s.rval()); + + + return true; +} +SE_BIND_FUNC(js_cc_pipeline_ReflectionProbeFlow_getInitializeInfo_static) + +bool js_register_cc_pipeline_ReflectionProbeFlow(se::Object* obj) { + auto* cls = se::Class::create("ReflectionProbeFlow", obj, __jsb_cc_pipeline_RenderFlow_proto, _SE(js_new_cc_pipeline_ReflectionProbeFlow)); + + cls->defineStaticProperty("__isJSB", se::Value(true), se::PropertyAttribute::READ_ONLY | se::PropertyAttribute::DONT_ENUM | se::PropertyAttribute::DONT_DELETE); + + + + cls->defineStaticFunction("getInitializeInfo", _SE(js_cc_pipeline_ReflectionProbeFlow_getInitializeInfo_static)); + + + cls->defineFinalizeFunction(_SE(js_delete_cc_pipeline_ReflectionProbeFlow)); + + + cls->install(); + JSBClassType::registerClass(cls); + + __jsb_cc_pipeline_ReflectionProbeFlow_proto = cls->getProto(); + __jsb_cc_pipeline_ReflectionProbeFlow_class = cls; + se::ScriptEngine::getInstance()->clearException(); + return true; +} + + +se::Class* __jsb_cc_pipeline_ReflectionProbeStage_class = nullptr; +se::Object* __jsb_cc_pipeline_ReflectionProbeStage_proto = nullptr; +SE_DECLARE_FINALIZE_FUNC(js_delete_cc_pipeline_ReflectionProbeStage) + +static bool js_new_cc_pipeline_ReflectionProbeStage(se::State& s) // NOLINT(readability-identifier-naming) +{ + CC_UNUSED bool ok = true; + const auto& args = s.args(); + size_t argc = args.size(); + + cc::pipeline::ReflectionProbeStage *result; + result = (cc::pipeline::ReflectionProbeStage *)new cc::pipeline::ReflectionProbeStage(); + + + auto *ptr = JSB_MAKE_PRIVATE_OBJECT_WITH_INSTANCE(result); + s.thisObject()->setPrivateObject(ptr); + return true; +} +SE_BIND_CTOR(js_new_cc_pipeline_ReflectionProbeStage, __jsb_cc_pipeline_ReflectionProbeStage_class, js_delete_cc_pipeline_ReflectionProbeStage) + +static bool js_delete_cc_pipeline_ReflectionProbeStage(se::State& s) +{ + return true; +} +SE_BIND_FINALIZE_FUNC(js_delete_cc_pipeline_ReflectionProbeStage) + +static bool js_cc_pipeline_ReflectionProbeStage_getInitializeInfo_static(se::State& s) +{ + CC_UNUSED bool ok = true; + const auto& args = s.args(); + size_t argc = args.size(); + cc::pipeline::RenderStageInfo *result = 0 ; + + if(argc != 0) { + SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); + return false; + } + result = (cc::pipeline::RenderStageInfo *) &cc::pipeline::ReflectionProbeStage::getInitializeInfo(); + + ok &= nativevalue_to_se(*result, s.rval(), s.thisObject()); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + SE_HOLD_RETURN_VALUE(*result, s.thisObject(), s.rval()); + + + return true; +} +SE_BIND_FUNC(js_cc_pipeline_ReflectionProbeStage_getInitializeInfo_static) + +static bool js_cc_pipeline_ReflectionProbeStage_setFramebuffer(se::State& s) +{ + CC_UNUSED bool ok = true; + const auto& args = s.args(); + size_t argc = args.size(); + cc::pipeline::ReflectionProbeStage *arg1 = (cc::pipeline::ReflectionProbeStage *) NULL ; + cc::gfx::Framebuffer *arg2 = (cc::gfx::Framebuffer *) NULL ; + + if(argc != 1) { + SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1); + return false; + } + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + + ok &= sevalue_to_native(args[0], &arg2, s.thisObject()); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + (arg1)->setFramebuffer(arg2); + + + return true; +} +SE_BIND_FUNC(js_cc_pipeline_ReflectionProbeStage_setFramebuffer) + +static bool js_cc_pipeline_ReflectionProbeStage_setUsage(se::State& s) +{ + CC_UNUSED bool ok = true; + const auto& args = s.args(); + size_t argc = args.size(); + cc::pipeline::ReflectionProbeStage *arg1 = (cc::pipeline::ReflectionProbeStage *) NULL ; + cc::gfx::Framebuffer *arg2 = (cc::gfx::Framebuffer *) NULL ; + cc::scene::ReflectionProbe *arg3 = (cc::scene::ReflectionProbe *) NULL ; + + if(argc != 2) { + SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 2); + return false; + } + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + + ok &= sevalue_to_native(args[0], &arg2, s.thisObject()); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + + ok &= sevalue_to_native(args[1], &arg3, s.thisObject()); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + (arg1)->setUsage(arg2,arg3); + + + return true; +} +SE_BIND_FUNC(js_cc_pipeline_ReflectionProbeStage_setUsage) + +bool js_register_cc_pipeline_ReflectionProbeStage(se::Object* obj) { + auto* cls = se::Class::create("ReflectionProbeStage", obj, __jsb_cc_pipeline_RenderStage_proto, _SE(js_new_cc_pipeline_ReflectionProbeStage)); + + cls->defineStaticProperty("__isJSB", se::Value(true), se::PropertyAttribute::READ_ONLY | se::PropertyAttribute::DONT_ENUM | se::PropertyAttribute::DONT_DELETE); + + cls->defineFunction("setFramebuffer", _SE(js_cc_pipeline_ReflectionProbeStage_setFramebuffer)); + cls->defineFunction("setUsage", _SE(js_cc_pipeline_ReflectionProbeStage_setUsage)); + + + cls->defineStaticFunction("getInitializeInfo", _SE(js_cc_pipeline_ReflectionProbeStage_getInitializeInfo_static)); + + + cls->defineFinalizeFunction(_SE(js_delete_cc_pipeline_ReflectionProbeStage)); + + + cls->install(); + JSBClassType::registerClass(cls); + + __jsb_cc_pipeline_ReflectionProbeStage_proto = cls->getProto(); + __jsb_cc_pipeline_ReflectionProbeStage_class = cls; + se::ScriptEngine::getInstance()->clearException(); + return true; +} + + bool register_all_pipeline(se::Object* obj) { @@ -20993,6 +21425,8 @@ bool register_all_pipeline(se::Object* obj) { #if CC_USE_GEOMETRY_RENDERER js_register_cc_pipeline_GeometryRenderer(ns); #endif // CC_USE_GEOMETRY_RENDERER + js_register_cc_pipeline_ReflectionProbeFlow(ns); + js_register_cc_pipeline_ReflectionProbeStage(ns); /* Register global variables & global functions */ diff --git a/native/cocos/bindings/auto/jsb_pipeline_auto.h b/native/cocos/bindings/auto/jsb_pipeline_auto.h index 463b4d8d3e..ec79ed056c 100644 --- a/native/cocos/bindings/auto/jsb_pipeline_auto.h +++ b/native/cocos/bindings/auto/jsb_pipeline_auto.h @@ -9,20 +9,19 @@ * ----------------------------------------------------------------------------- */ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -53,6 +52,8 @@ #include "renderer/pipeline/PipelineSceneData.h" #include "renderer/pipeline/BatchedBuffer.h" #include "renderer/pipeline/GeometryRenderer.h" +#include "renderer/pipeline/reflection-probe/ReflectionProbeFlow.h" +#include "renderer/pipeline/reflection-probe/ReflectionProbeStage.h" @@ -150,10 +151,6 @@ extern se::Object *__jsb_cc_pipeline_RenderQueueDesc_proto; // NOLINT extern se::Class * __jsb_cc_pipeline_RenderQueueDesc_class; // NOLINT -template<> -bool sevalue_to_native(const se::Value &from, cc::pipeline::RenderQueueDesc * to, se::Object *ctx); - - JSB_REGISTER_OBJECT_TYPE(cc::pipeline::UBOLocalBatched); extern se::Object *__jsb_cc_pipeline_UBOLocalBatched_proto; // NOLINT extern se::Class * __jsb_cc_pipeline_UBOLocalBatched_class; // NOLINT @@ -598,4 +595,14 @@ extern se::Object *__jsb_cc_pipeline_GeometryRenderer_proto; // NOLINT extern se::Class * __jsb_cc_pipeline_GeometryRenderer_class; // NOLINT #endif // CC_USE_GEOMETRY_RENDERER + +JSB_REGISTER_OBJECT_TYPE(cc::pipeline::ReflectionProbeFlow); +extern se::Object *__jsb_cc_pipeline_ReflectionProbeFlow_proto; // NOLINT +extern se::Class * __jsb_cc_pipeline_ReflectionProbeFlow_class; // NOLINT + + +JSB_REGISTER_OBJECT_TYPE(cc::pipeline::ReflectionProbeStage); +extern se::Object *__jsb_cc_pipeline_ReflectionProbeStage_proto; // NOLINT +extern se::Class * __jsb_cc_pipeline_ReflectionProbeStage_class; // NOLINT + // clang-format on diff --git a/native/cocos/bindings/auto/jsb_render_auto.cpp b/native/cocos/bindings/auto/jsb_render_auto.cpp index 70477cb2f0..e8a1d0cd2b 100644 --- a/native/cocos/bindings/auto/jsb_render_auto.cpp +++ b/native/cocos/bindings/auto/jsb_render_auto.cpp @@ -9,20 +9,19 @@ * ----------------------------------------------------------------------------- */ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -3782,10 +3781,163 @@ bool js_register_cc_render_PipelineBuilder(se::Object* obj) { } +se::Class* __jsb_cc_render_RenderingModule_class = nullptr; +se::Object* __jsb_cc_render_RenderingModule_proto = nullptr; +SE_DECLARE_FINALIZE_FUNC(js_delete_cc_render_RenderingModule) + +static bool js_delete_cc_render_RenderingModule(se::State& s) +{ + return true; +} +SE_BIND_FINALIZE_FUNC(js_delete_cc_render_RenderingModule) + +static bool js_cc_render_RenderingModule_getPassID(se::State& s) +{ + CC_UNUSED bool ok = true; + const auto& args = s.args(); + size_t argc = args.size(); + cc::render::RenderingModule *arg1 = (cc::render::RenderingModule *) NULL ; + ccstd::string *arg2 = 0 ; + ccstd::string temp2 ; + uint32_t result; + + if(argc != 1) { + SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1); + return false; + } + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + + ok &= sevalue_to_native(args[0], &temp2, s.thisObject()); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + arg2 = &temp2; + + result = ((cc::render::RenderingModule const *)arg1)->getPassID((ccstd::string const &)*arg2); + + ok &= nativevalue_to_se(result, s.rval(), s.thisObject()); + + + return true; +} +SE_BIND_FUNC(js_cc_render_RenderingModule_getPassID) + +static bool js_cc_render_RenderingModule_getPhaseID(se::State& s) +{ + CC_UNUSED bool ok = true; + const auto& args = s.args(); + size_t argc = args.size(); + cc::render::RenderingModule *arg1 = (cc::render::RenderingModule *) NULL ; + uint32_t arg2 ; + ccstd::string *arg3 = 0 ; + ccstd::string temp3 ; + uint32_t result; + + if(argc != 2) { + SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 2); + return false; + } + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + + ok &= sevalue_to_native(args[0], &arg2, s.thisObject()); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + + + ok &= sevalue_to_native(args[1], &temp3, s.thisObject()); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + arg3 = &temp3; + + result = ((cc::render::RenderingModule const *)arg1)->getPhaseID(arg2,(ccstd::string const &)*arg3); + + ok &= nativevalue_to_se(result, s.rval(), s.thisObject()); + + + return true; +} +SE_BIND_FUNC(js_cc_render_RenderingModule_getPhaseID) + +bool js_register_cc_render_RenderingModule(se::Object* obj) { + auto* cls = se::Class::create("RenderingModule", obj, nullptr, nullptr); + + cls->defineStaticProperty("__isJSB", se::Value(true), se::PropertyAttribute::READ_ONLY | se::PropertyAttribute::DONT_ENUM | se::PropertyAttribute::DONT_DELETE); + + cls->defineFunction("getPassID", _SE(js_cc_render_RenderingModule_getPassID)); + cls->defineFunction("getPhaseID", _SE(js_cc_render_RenderingModule_getPhaseID)); + + + + + cls->defineFinalizeFunction(_SE(js_delete_cc_render_RenderingModule)); + + + cls->install(); + JSBClassType::registerClass(cls); + + __jsb_cc_render_RenderingModule_proto = cls->getProto(); + __jsb_cc_render_RenderingModule_class = cls; + se::ScriptEngine::getInstance()->clearException(); + return true; +} + + se::Class* __jsb_cc_render_Factory_class = nullptr; se::Object* __jsb_cc_render_Factory_proto = nullptr; SE_DECLARE_FINALIZE_FUNC(js_delete_cc_render_Factory) +static bool js_cc_render_Factory_init_static(se::State& s) +{ + CC_UNUSED bool ok = true; + const auto& args = s.args(); + size_t argc = args.size(); + gfx::Device *arg1 = (gfx::Device *) NULL ; + ccstd::vector< unsigned char > *arg2 = 0 ; + ccstd::vector< unsigned char > temp2 ; + cc::render::RenderingModule *result = 0 ; + + if(argc != 2) { + SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 2); + return false; + } + + ok &= sevalue_to_native(args[0], &arg1, s.thisObject()); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + + ok &= sevalue_to_native(args[1], &temp2, s.thisObject()); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + arg2 = &temp2; + + result = (cc::render::RenderingModule *)cc::render::Factory::init(arg1,(ccstd::vector< unsigned char > const &)*arg2); + + ok &= nativevalue_to_se(result, s.rval(), s.thisObject()); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); + + + return true; +} +SE_BIND_FUNC(js_cc_render_Factory_init_static) + +static bool js_cc_render_Factory_destroy_static(se::State& s) +{ + CC_UNUSED bool ok = true; + const auto& args = s.args(); + size_t argc = args.size(); + cc::render::RenderingModule *arg1 = (cc::render::RenderingModule *) NULL ; + + if(argc != 1) { + SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1); + return false; + } + + ok &= sevalue_to_native(args[0], &arg1, s.thisObject()); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + cc::render::Factory::destroy(arg1); + + + return true; +} +SE_BIND_FUNC(js_cc_render_Factory_destroy_static) + static bool js_cc_render_Factory_createPipeline_static(se::State& s) { CC_UNUSED bool ok = true; @@ -3837,6 +3989,8 @@ bool js_register_cc_render_Factory(se::Object* obj) { + cls->defineStaticFunction("init", _SE(js_cc_render_Factory_init_static)); + cls->defineStaticFunction("destroy", _SE(js_cc_render_Factory_destroy_static)); cls->defineStaticFunction("createPipeline", _SE(js_cc_render_Factory_createPipeline_static)); @@ -3881,6 +4035,7 @@ bool register_all_render(se::Object* obj) { js_register_cc_render_LayoutGraphBuilder(ns); js_register_cc_render_Pipeline(ns); js_register_cc_render_PipelineBuilder(ns); + js_register_cc_render_RenderingModule(ns); js_register_cc_render_Factory(ns); /* Register global variables & global functions */ diff --git a/native/cocos/bindings/auto/jsb_render_auto.h b/native/cocos/bindings/auto/jsb_render_auto.h index 4354fd19d2..2db9143975 100644 --- a/native/cocos/bindings/auto/jsb_render_auto.h +++ b/native/cocos/bindings/auto/jsb_render_auto.h @@ -9,20 +9,19 @@ * ----------------------------------------------------------------------------- */ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -119,6 +118,11 @@ extern se::Object *__jsb_cc_render_PipelineBuilder_proto; // NOLINT extern se::Class * __jsb_cc_render_PipelineBuilder_class; // NOLINT +JSB_REGISTER_OBJECT_TYPE(cc::render::RenderingModule); +extern se::Object *__jsb_cc_render_RenderingModule_proto; // NOLINT +extern se::Class * __jsb_cc_render_RenderingModule_class; // NOLINT + + JSB_REGISTER_OBJECT_TYPE(cc::render::Factory); extern se::Object *__jsb_cc_render_Factory_proto; // NOLINT extern se::Class * __jsb_cc_render_Factory_class; // NOLINT diff --git a/native/cocos/bindings/auto/jsb_scene_auto.cpp b/native/cocos/bindings/auto/jsb_scene_auto.cpp index 32ad7ac682..a767ecd508 100644 --- a/native/cocos/bindings/auto/jsb_scene_auto.cpp +++ b/native/cocos/bindings/auto/jsb_scene_auto.cpp @@ -9,20 +9,19 @@ * ----------------------------------------------------------------------------- */ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -1111,6 +1110,19 @@ using namespace cc; #define cc_scene_ReflectionProbe_previewPlane_set(self_, val_) self_->setPreviewPlane(val_) +#define cc_scene_ReflectionProbe_bakedCubeTextures_get(self_) self_->getBakedCubeTextures() + + +#define cc_scene_ReflectionProbe_cubemap_get(self_) self_->getCubeMap() +#define cc_scene_ReflectionProbe_cubemap_set(self_, val_) self_->setCubeMap(val_) + + +#define cc_scene_ReflectionProbe_node_get(self_) self_->getNode() + + +#define cc_scene_ReflectionProbe_realtimePlanarTexture_get(self_) self_->getRealtimePlanarTexture() + + #define cc_SceneGlobals_bakedWithStationaryMainLight_get(self_) self_->getBakedWithStationaryMainLight() #define cc_SceneGlobals_bakedWithStationaryMainLight_set(self_, val_) self_->setBakedWithStationaryMainLight(val_) @@ -7272,6 +7284,49 @@ static bool js_cc_scene_LODGroup_lockLODLevels(se::State& s) } SE_BIND_FUNC(js_cc_scene_LODGroup_lockLODLevels) +static bool js_cc_scene_LODGroup_isLockLevelChanged(se::State& s) +{ + CC_UNUSED bool ok = true; + const auto& args = s.args(); + size_t argc = args.size(); + cc::scene::LODGroup *arg1 = (cc::scene::LODGroup *) NULL ; + bool result; + + if(argc != 0) { + SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); + return false; + } + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + result = (bool)((cc::scene::LODGroup const *)arg1)->isLockLevelChanged(); + + ok &= nativevalue_to_se(result, s.rval(), s.thisObject()); + + + return true; +} +SE_BIND_FUNC(js_cc_scene_LODGroup_isLockLevelChanged) + +static bool js_cc_scene_LODGroup_resetLockChangeFlag(se::State& s) +{ + CC_UNUSED bool ok = true; + const auto& args = s.args(); + size_t argc = args.size(); + cc::scene::LODGroup *arg1 = (cc::scene::LODGroup *) NULL ; + + if(argc != 0) { + SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); + return false; + } + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + (arg1)->resetLockChangeFlag(); + + + return true; +} +SE_BIND_FUNC(js_cc_scene_LODGroup_resetLockChangeFlag) + static bool js_cc_scene_LODGroup_clearLODs(se::State& s) { CC_UNUSED bool ok = true; @@ -7602,6 +7657,8 @@ bool js_register_cc_scene_LODGroup(se::Object* obj) { cls->defineFunction("getVisibleLODLevel", _SE(js_cc_scene_LODGroup_getVisibleLODLevel)); cls->defineFunction("getLockedLODLevels", _SE(js_cc_scene_LODGroup_getLockedLODLevels)); cls->defineFunction("lockLODLevels", _SE(js_cc_scene_LODGroup_lockLODLevels)); + cls->defineFunction("isLockLevelChanged", _SE(js_cc_scene_LODGroup_isLockLevelChanged)); + cls->defineFunction("resetLockChangeFlag", _SE(js_cc_scene_LODGroup_resetLockChangeFlag)); cls->defineFunction("clearLODs", _SE(js_cc_scene_LODGroup_clearLODs)); cls->defineFunction("insertLOD", _SE(js_cc_scene_LODGroup_insertLOD)); cls->defineFunction("updateLOD", _SE(js_cc_scene_LODGroup_updateLOD)); @@ -10382,6 +10439,7 @@ static bool js_cc_scene_SkyboxInfo__envmapHDR_set(se::State& s) SE_PRECONDITION2(ok, false, "Error processing arguments"); + return true; } SE_BIND_PROP_SET(js_cc_scene_SkyboxInfo__envmapHDR_set) @@ -10394,9 +10452,10 @@ static bool js_cc_scene_SkyboxInfo__envmapHDR_get(se::State& s) arg1 = SE_THIS_OBJECT(s); if (nullptr == arg1) return true; - ok &= nativevalue_to_se(arg1->_envmapHDR, s.rval(), s.thisObject()); + ok &= nativevalue_to_se(arg1->_envmapHDR, s.rval(), s.thisObject() /*ctx*/); SE_PRECONDITION2(ok, false, "Error processing arguments"); - SE_HOLD_RETURN_VALUE(arg1->_envmapHDR, s.thisObject(), s.rval()); + SE_HOLD_RETURN_VALUE(arg1->_envmapHDR, s.thisObject(), s.rval()); + return true; @@ -10417,6 +10476,7 @@ static bool js_cc_scene_SkyboxInfo__envmapLDR_set(se::State& s) SE_PRECONDITION2(ok, false, "Error processing arguments"); + return true; } SE_BIND_PROP_SET(js_cc_scene_SkyboxInfo__envmapLDR_set) @@ -10429,9 +10489,10 @@ static bool js_cc_scene_SkyboxInfo__envmapLDR_get(se::State& s) arg1 = SE_THIS_OBJECT(s); if (nullptr == arg1) return true; - ok &= nativevalue_to_se(arg1->_envmapLDR, s.rval(), s.thisObject()); + ok &= nativevalue_to_se(arg1->_envmapLDR, s.rval(), s.thisObject() /*ctx*/); SE_PRECONDITION2(ok, false, "Error processing arguments"); - SE_HOLD_RETURN_VALUE(arg1->_envmapLDR, s.thisObject(), s.rval()); + SE_HOLD_RETURN_VALUE(arg1->_envmapLDR, s.thisObject(), s.rval()); + return true; @@ -10452,6 +10513,7 @@ static bool js_cc_scene_SkyboxInfo__diffuseMapHDR_set(se::State& s) SE_PRECONDITION2(ok, false, "Error processing arguments"); + return true; } SE_BIND_PROP_SET(js_cc_scene_SkyboxInfo__diffuseMapHDR_set) @@ -10464,9 +10526,10 @@ static bool js_cc_scene_SkyboxInfo__diffuseMapHDR_get(se::State& s) arg1 = SE_THIS_OBJECT(s); if (nullptr == arg1) return true; - ok &= nativevalue_to_se(arg1->_diffuseMapHDR, s.rval(), s.thisObject()); + ok &= nativevalue_to_se(arg1->_diffuseMapHDR, s.rval(), s.thisObject() /*ctx*/); SE_PRECONDITION2(ok, false, "Error processing arguments"); - SE_HOLD_RETURN_VALUE(arg1->_diffuseMapHDR, s.thisObject(), s.rval()); + SE_HOLD_RETURN_VALUE(arg1->_diffuseMapHDR, s.thisObject(), s.rval()); + return true; @@ -10487,6 +10550,7 @@ static bool js_cc_scene_SkyboxInfo__diffuseMapLDR_set(se::State& s) SE_PRECONDITION2(ok, false, "Error processing arguments"); + return true; } SE_BIND_PROP_SET(js_cc_scene_SkyboxInfo__diffuseMapLDR_set) @@ -10499,9 +10563,10 @@ static bool js_cc_scene_SkyboxInfo__diffuseMapLDR_get(se::State& s) arg1 = SE_THIS_OBJECT(s); if (nullptr == arg1) return true; - ok &= nativevalue_to_se(arg1->_diffuseMapLDR, s.rval(), s.thisObject()); + ok &= nativevalue_to_se(arg1->_diffuseMapLDR, s.rval(), s.thisObject() /*ctx*/); SE_PRECONDITION2(ok, false, "Error processing arguments"); - SE_HOLD_RETURN_VALUE(arg1->_diffuseMapLDR, s.thisObject(), s.rval()); + SE_HOLD_RETURN_VALUE(arg1->_diffuseMapLDR, s.thisObject(), s.rval()); + return true; @@ -10522,6 +10587,7 @@ static bool js_cc_scene_SkyboxInfo__reflectionHDR_set(se::State& s) SE_PRECONDITION2(ok, false, "Error processing arguments"); + return true; } SE_BIND_PROP_SET(js_cc_scene_SkyboxInfo__reflectionHDR_set) @@ -10534,9 +10600,10 @@ static bool js_cc_scene_SkyboxInfo__reflectionHDR_get(se::State& s) arg1 = SE_THIS_OBJECT(s); if (nullptr == arg1) return true; - ok &= nativevalue_to_se(arg1->_reflectionHDR, s.rval(), s.thisObject()); + ok &= nativevalue_to_se(arg1->_reflectionHDR, s.rval(), s.thisObject() /*ctx*/); SE_PRECONDITION2(ok, false, "Error processing arguments"); - SE_HOLD_RETURN_VALUE(arg1->_reflectionHDR, s.thisObject(), s.rval()); + SE_HOLD_RETURN_VALUE(arg1->_reflectionHDR, s.thisObject(), s.rval()); + return true; @@ -10557,6 +10624,7 @@ static bool js_cc_scene_SkyboxInfo__reflectionLDR_set(se::State& s) SE_PRECONDITION2(ok, false, "Error processing arguments"); + return true; } SE_BIND_PROP_SET(js_cc_scene_SkyboxInfo__reflectionLDR_set) @@ -10569,9 +10637,10 @@ static bool js_cc_scene_SkyboxInfo__reflectionLDR_get(se::State& s) arg1 = SE_THIS_OBJECT(s); if (nullptr == arg1) return true; - ok &= nativevalue_to_se(arg1->_reflectionLDR, s.rval(), s.thisObject()); + ok &= nativevalue_to_se(arg1->_reflectionLDR, s.rval(), s.thisObject() /*ctx*/); SE_PRECONDITION2(ok, false, "Error processing arguments"); - SE_HOLD_RETURN_VALUE(arg1->_reflectionLDR, s.thisObject(), s.rval()); + SE_HOLD_RETURN_VALUE(arg1->_reflectionLDR, s.thisObject(), s.rval()); + return true; @@ -14315,7 +14384,7 @@ static bool js_cc_scene_Model_updateLocalShadowBias(se::State& s) } SE_BIND_FUNC(js_cc_scene_Model_updateLocalShadowBias) -static bool js_cc_scene_Model_updateReflctionProbeCubemap(se::State& s) +static bool js_cc_scene_Model_updateReflectionProbeCubemap(se::State& s) { CC_UNUSED bool ok = true; const auto& args = s.args(); @@ -14332,14 +14401,14 @@ static bool js_cc_scene_Model_updateReflctionProbeCubemap(se::State& s) ok &= sevalue_to_native(args[0], &arg2, s.thisObject()); SE_PRECONDITION2(ok, false, "Error processing arguments"); - (arg1)->updateReflctionProbeCubemap(arg2); + (arg1)->updateReflectionProbeCubemap(arg2); return true; } -SE_BIND_FUNC(js_cc_scene_Model_updateReflctionProbeCubemap) +SE_BIND_FUNC(js_cc_scene_Model_updateReflectionProbeCubemap) -static bool js_cc_scene_Model_updateReflctionProbePlanarMap(se::State& s) +static bool js_cc_scene_Model_updateReflectionProbePlanarMap(se::State& s) { CC_UNUSED bool ok = true; const auto& args = s.args(); @@ -14356,12 +14425,12 @@ static bool js_cc_scene_Model_updateReflctionProbePlanarMap(se::State& s) ok &= sevalue_to_native(args[0], &arg2, s.thisObject()); SE_PRECONDITION2(ok, false, "Error processing arguments"); - (arg1)->updateReflctionProbePlanarMap(arg2); + (arg1)->updateReflectionProbePlanarMap(arg2); return true; } -SE_BIND_FUNC(js_cc_scene_Model_updateReflctionProbePlanarMap) +SE_BIND_FUNC(js_cc_scene_Model_updateReflectionProbePlanarMap) static bool js_cc_scene_Model_attachToScene(se::State& s) { @@ -15588,8 +15657,8 @@ bool js_register_cc_scene_Model(se::Object* obj) { cls->defineFunction("updateSHUBOs", _SE(js_cc_scene_Model_updateSHUBOs)); cls->defineFunction("updateWorldBoundUBOs", _SE(js_cc_scene_Model_updateWorldBoundUBOs)); cls->defineFunction("updateLocalShadowBias", _SE(js_cc_scene_Model_updateLocalShadowBias)); - cls->defineFunction("updateReflctionProbeCubemap", _SE(js_cc_scene_Model_updateReflctionProbeCubemap)); - cls->defineFunction("updateReflctionProbePlanarMap", _SE(js_cc_scene_Model_updateReflctionProbePlanarMap)); + cls->defineFunction("updateReflectionProbeCubemap", _SE(js_cc_scene_Model_updateReflectionProbeCubemap)); + cls->defineFunction("updateReflectionProbePlanarMap", _SE(js_cc_scene_Model_updateReflectionProbePlanarMap)); cls->defineFunction("attachToScene", _SE(js_cc_scene_Model_attachToScene)); cls->defineFunction("detachFromScene", _SE(js_cc_scene_Model_detachFromScene)); cls->defineFunction("setLocalSHBuffer", _SE(js_cc_scene_Model_setLocalSHBuffer)); @@ -19319,6 +19388,37 @@ static bool js_cc_scene_RenderScene_removeLODGroup(se::State& s) } SE_BIND_FUNC(js_cc_scene_RenderScene_removeLODGroup) +static bool js_cc_scene_RenderScene_isCulledByLod(se::State& s) +{ + CC_UNUSED bool ok = true; + const auto& args = s.args(); + size_t argc = args.size(); + cc::scene::RenderScene *arg1 = (cc::scene::RenderScene *) NULL ; + cc::scene::Camera *arg2 = (cc::scene::Camera *) NULL ; + cc::scene::Model *arg3 = (cc::scene::Model *) NULL ; + bool result; + + if(argc != 2) { + SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 2); + return false; + } + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + + ok &= sevalue_to_native(args[0], &arg2, s.thisObject()); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + + ok &= sevalue_to_native(args[1], &arg3, s.thisObject()); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + result = (bool)((cc::scene::RenderScene const *)arg1)->isCulledByLod((cc::scene::Camera const *)arg2,(cc::scene::Model const *)arg3); + + ok &= nativevalue_to_se(result, s.rval(), s.thisObject()); + + + return true; +} +SE_BIND_FUNC(js_cc_scene_RenderScene_isCulledByLod) + static bool js_cc_scene_RenderScene_unsetMainLight(se::State& s) { CC_UNUSED bool ok = true; @@ -19870,6 +19970,7 @@ bool js_register_cc_scene_RenderScene(se::Object* obj) { cls->defineFunction("removeCameras", _SE(js_cc_scene_RenderScene_removeCameras)); cls->defineFunction("addLODGroup", _SE(js_cc_scene_RenderScene_addLODGroup)); cls->defineFunction("removeLODGroup", _SE(js_cc_scene_RenderScene_removeLODGroup)); + cls->defineFunction("isCulledByLod", _SE(js_cc_scene_RenderScene_isCulledByLod)); cls->defineFunction("unsetMainLight", _SE(js_cc_scene_RenderScene_unsetMainLight)); cls->defineFunction("addDirectionalLight", _SE(js_cc_scene_RenderScene_addDirectionalLight)); cls->defineFunction("removeDirectionalLight", _SE(js_cc_scene_RenderScene_removeDirectionalLight)); @@ -23977,31 +24078,6 @@ static bool js_cc_scene_ReflectionProbe_getProbeId(se::State& s) } SE_BIND_FUNC(js_cc_scene_ReflectionProbe_getProbeId) -static bool js_cc_scene_ReflectionProbe_getNode(se::State& s) -{ - CC_UNUSED bool ok = true; - const auto& args = s.args(); - size_t argc = args.size(); - cc::scene::ReflectionProbe *arg1 = (cc::scene::ReflectionProbe *) NULL ; - cc::Node *result = 0 ; - - if(argc != 0) { - SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); - return false; - } - arg1 = SE_THIS_OBJECT(s); - if (nullptr == arg1) return true; - result = (cc::Node *)(arg1)->getNode(); - - ok &= nativevalue_to_se(result, s.rval(), s.thisObject()); - SE_PRECONDITION2(ok, false, "Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); - - - return true; -} -SE_BIND_FUNC(js_cc_scene_ReflectionProbe_getNode) - static bool js_cc_scene_ReflectionProbe_getCamera(se::State& s) { CC_UNUSED bool ok = true; @@ -24050,6 +24126,30 @@ static bool js_cc_scene_ReflectionProbe_needRender(se::State& s) } SE_BIND_FUNC(js_cc_scene_ReflectionProbe_needRender) +static bool js_cc_scene_ReflectionProbe_setNeedRender(se::State& s) +{ + CC_UNUSED bool ok = true; + const auto& args = s.args(); + size_t argc = args.size(); + cc::scene::ReflectionProbe *arg1 = (cc::scene::ReflectionProbe *) NULL ; + bool arg2 ; + + if(argc != 1) { + SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1); + return false; + } + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + + ok &= sevalue_to_native(args[0], &arg2); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + (arg1)->setNeedRender(arg2); + + + return true; +} +SE_BIND_FUNC(js_cc_scene_ReflectionProbe_setNeedRender) + static bool js_cc_scene_ReflectionProbe_setCameraNode(se::State& s) { CC_UNUSED bool ok = true; @@ -24099,31 +24199,6 @@ static bool js_cc_scene_ReflectionProbe_getCameraNode(se::State& s) } SE_BIND_FUNC(js_cc_scene_ReflectionProbe_getCameraNode) -static bool js_cc_scene_ReflectionProbe_getRealtimePlanarTexture(se::State& s) -{ - CC_UNUSED bool ok = true; - const auto& args = s.args(); - size_t argc = args.size(); - cc::scene::ReflectionProbe *arg1 = (cc::scene::ReflectionProbe *) NULL ; - cc::RenderTexture *result = 0 ; - - if(argc != 0) { - SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); - return false; - } - arg1 = SE_THIS_OBJECT(s); - if (nullptr == arg1) return true; - result = (cc::RenderTexture *)((cc::scene::ReflectionProbe const *)arg1)->getRealtimePlanarTexture(); - - ok &= nativevalue_to_se(result, s.rval(), s.thisObject()); - SE_PRECONDITION2(ok, false, "Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); - - - return true; -} -SE_BIND_FUNC(js_cc_scene_ReflectionProbe_getRealtimePlanarTexture) - static bool js_cc_scene_ReflectionProbe_updateBoundingBox(se::State& s) { CC_UNUSED bool ok = true; @@ -24331,6 +24406,46 @@ static bool js_cc_scene_ReflectionProbe_destroy(se::State& s) } SE_BIND_FUNC(js_cc_scene_ReflectionProbe_destroy) +static bool js_cc_scene_ReflectionProbe_enable(se::State& s) +{ + CC_UNUSED bool ok = true; + const auto& args = s.args(); + size_t argc = args.size(); + cc::scene::ReflectionProbe *arg1 = (cc::scene::ReflectionProbe *) NULL ; + + if(argc != 0) { + SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); + return false; + } + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + (arg1)->enable(); + + + return true; +} +SE_BIND_FUNC(js_cc_scene_ReflectionProbe_enable) + +static bool js_cc_scene_ReflectionProbe_disable(se::State& s) +{ + CC_UNUSED bool ok = true; + const auto& args = s.args(); + size_t argc = args.size(); + cc::scene::ReflectionProbe *arg1 = (cc::scene::ReflectionProbe *) NULL ; + + if(argc != 0) { + SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); + return false; + } + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + (arg1)->disable(); + + + return true; +} +SE_BIND_FUNC(js_cc_scene_ReflectionProbe_disable) + static bool js_cc_scene_ReflectionProbe_validate(se::State& s) { CC_UNUSED bool ok = true; @@ -24354,6 +24469,138 @@ static bool js_cc_scene_ReflectionProbe_validate(se::State& s) } SE_BIND_FUNC(js_cc_scene_ReflectionProbe_validate) +static bool js_cc_scene_ReflectionProbe_initBakedTextures(se::State& s) +{ + CC_UNUSED bool ok = true; + const auto& args = s.args(); + size_t argc = args.size(); + cc::scene::ReflectionProbe *arg1 = (cc::scene::ReflectionProbe *) NULL ; + + if(argc != 0) { + SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); + return false; + } + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + (arg1)->initBakedTextures(); + + + return true; +} +SE_BIND_FUNC(js_cc_scene_ReflectionProbe_initBakedTextures) + +static bool js_cc_scene_ReflectionProbe_captureCubemap(se::State& s) +{ + CC_UNUSED bool ok = true; + const auto& args = s.args(); + size_t argc = args.size(); + cc::scene::ReflectionProbe *arg1 = (cc::scene::ReflectionProbe *) NULL ; + + if(argc != 0) { + SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); + return false; + } + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + (arg1)->captureCubemap(); + + + return true; +} +SE_BIND_FUNC(js_cc_scene_ReflectionProbe_captureCubemap) + +static bool js_cc_scene_ReflectionProbe_resetCameraParams(se::State& s) +{ + CC_UNUSED bool ok = true; + const auto& args = s.args(); + size_t argc = args.size(); + cc::scene::ReflectionProbe *arg1 = (cc::scene::ReflectionProbe *) NULL ; + + if(argc != 0) { + SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); + return false; + } + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + (arg1)->resetCameraParams(); + + + return true; +} +SE_BIND_FUNC(js_cc_scene_ReflectionProbe_resetCameraParams) + +static bool js_cc_scene_ReflectionProbe_updateCameraDir(se::State& s) +{ + CC_UNUSED bool ok = true; + const auto& args = s.args(); + size_t argc = args.size(); + cc::scene::ReflectionProbe *arg1 = (cc::scene::ReflectionProbe *) NULL ; + int32_t arg2 ; + + if(argc != 1) { + SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1); + return false; + } + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + + ok &= sevalue_to_native(args[0], &arg2, s.thisObject()); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + (arg1)->updateCameraDir(arg2); + + + return true; +} +SE_BIND_FUNC(js_cc_scene_ReflectionProbe_updateCameraDir) + +static bool js_cc_scene_ReflectionProbe_getRenderArea(se::State& s) +{ + CC_UNUSED bool ok = true; + const auto& args = s.args(); + size_t argc = args.size(); + cc::scene::ReflectionProbe *arg1 = (cc::scene::ReflectionProbe *) NULL ; + cc::Vec2 result; + cc::Vec2 *temp ; + + if(argc != 0) { + SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); + return false; + } + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + result = ((cc::scene::ReflectionProbe const *)arg1)->getRenderArea(); + + temp = ccnew cc::Vec2(result); + ok &= nativevalue_to_se(temp, s.rval(), s.thisObject()); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + s.rval().toObject()->getPrivateObject()->tryAllowDestroyInGC(); + + + + return true; +} +SE_BIND_FUNC(js_cc_scene_ReflectionProbe_getRenderArea) + +static bool js_cc_scene_ReflectionProbe_packBackgroundColor(se::State& s) +{ + CC_UNUSED bool ok = true; + const auto& args = s.args(); + size_t argc = args.size(); + cc::scene::ReflectionProbe *arg1 = (cc::scene::ReflectionProbe *) NULL ; + + if(argc != 0) { + SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); + return false; + } + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + (arg1)->packBackgroundColor(); + + + return true; +} +SE_BIND_FUNC(js_cc_scene_ReflectionProbe_packBackgroundColor) + static bool js_cc_scene_ReflectionProbe_probeType_set(se::State& s) { CC_UNUSED bool ok = true; @@ -24693,6 +24940,102 @@ static bool js_cc_scene_ReflectionProbe_previewPlane_get(se::State& s) } SE_BIND_PROP_GET(js_cc_scene_ReflectionProbe_previewPlane_get) +static bool js_cc_scene_ReflectionProbe_bakedCubeTextures_get(se::State& s) +{ + CC_UNUSED bool ok = true; + cc::scene::ReflectionProbe *arg1 = (cc::scene::ReflectionProbe *) NULL ; + ccstd::vector< cc::IntrusivePtr< cc::RenderTexture > > *result = 0 ; + + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + result = (ccstd::vector< cc::IntrusivePtr< cc::RenderTexture > > *) &cc_scene_ReflectionProbe_bakedCubeTextures_get(arg1); + + ok &= nativevalue_to_se(*result, s.rval(), s.thisObject()); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + SE_HOLD_RETURN_VALUE(*result, s.thisObject(), s.rval()); + + + return true; +} +SE_BIND_PROP_GET(js_cc_scene_ReflectionProbe_bakedCubeTextures_get) + +static bool js_cc_scene_ReflectionProbe_cubemap_set(se::State& s) +{ + CC_UNUSED bool ok = true; + const auto& args = s.args(); + size_t argc = args.size(); + cc::scene::ReflectionProbe *arg1 = (cc::scene::ReflectionProbe *) NULL ; + cc::TextureCube *arg2 = (cc::TextureCube *) NULL ; + + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + + ok &= sevalue_to_native(args[0], &arg2, s.thisObject()); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + cc_scene_ReflectionProbe_cubemap_set(arg1,arg2); + + + return true; +} +SE_BIND_PROP_SET(js_cc_scene_ReflectionProbe_cubemap_set) + +static bool js_cc_scene_ReflectionProbe_cubemap_get(se::State& s) +{ + CC_UNUSED bool ok = true; + cc::scene::ReflectionProbe *arg1 = (cc::scene::ReflectionProbe *) NULL ; + cc::TextureCube *result = 0 ; + + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + result = (cc::TextureCube *)cc_scene_ReflectionProbe_cubemap_get(arg1); + + ok &= nativevalue_to_se(result, s.rval(), s.thisObject()); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); + + + return true; +} +SE_BIND_PROP_GET(js_cc_scene_ReflectionProbe_cubemap_get) + +static bool js_cc_scene_ReflectionProbe_node_get(se::State& s) +{ + CC_UNUSED bool ok = true; + cc::scene::ReflectionProbe *arg1 = (cc::scene::ReflectionProbe *) NULL ; + cc::Node *result = 0 ; + + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + result = (cc::Node *)cc_scene_ReflectionProbe_node_get(arg1); + + ok &= nativevalue_to_se(result, s.rval(), s.thisObject()); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); + + + return true; +} +SE_BIND_PROP_GET(js_cc_scene_ReflectionProbe_node_get) + +static bool js_cc_scene_ReflectionProbe_realtimePlanarTexture_get(se::State& s) +{ + CC_UNUSED bool ok = true; + cc::scene::ReflectionProbe *arg1 = (cc::scene::ReflectionProbe *) NULL ; + cc::RenderTexture *result = 0 ; + + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + result = (cc::RenderTexture *)cc_scene_ReflectionProbe_realtimePlanarTexture_get(arg1); + + ok &= nativevalue_to_se(result, s.rval(), s.thisObject()); + SE_PRECONDITION2(ok, false, "Error processing arguments"); + SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); + + + return true; +} +SE_BIND_PROP_GET(js_cc_scene_ReflectionProbe_realtimePlanarTexture_get) + bool js_register_cc_scene_ReflectionProbe(se::Object* obj) { auto* cls = se::Class::create("ReflectionProbe", obj, nullptr, _SE(js_new_cc_scene_ReflectionProbe)); @@ -24706,15 +25049,18 @@ bool js_register_cc_scene_ReflectionProbe(se::Object* obj) { cls->defineProperty("boundingBox", _SE(js_cc_scene_ReflectionProbe_boundingBox_get), nullptr); cls->defineProperty("previewSphere", _SE(js_cc_scene_ReflectionProbe_previewSphere_get), _SE(js_cc_scene_ReflectionProbe_previewSphere_set)); cls->defineProperty("previewPlane", _SE(js_cc_scene_ReflectionProbe_previewPlane_get), _SE(js_cc_scene_ReflectionProbe_previewPlane_set)); + cls->defineProperty("bakedCubeTextures", _SE(js_cc_scene_ReflectionProbe_bakedCubeTextures_get), nullptr); + cls->defineProperty("cubemap", _SE(js_cc_scene_ReflectionProbe_cubemap_get), _SE(js_cc_scene_ReflectionProbe_cubemap_set)); + cls->defineProperty("node", _SE(js_cc_scene_ReflectionProbe_node_get), nullptr); + cls->defineProperty("realtimePlanarTexture", _SE(js_cc_scene_ReflectionProbe_realtimePlanarTexture_get), nullptr); cls->defineFunction("initialize", _SE(js_cc_scene_ReflectionProbe_initialize)); cls->defineFunction("getProbeId", _SE(js_cc_scene_ReflectionProbe_getProbeId)); - cls->defineFunction("getNode", _SE(js_cc_scene_ReflectionProbe_getNode)); cls->defineFunction("getCamera", _SE(js_cc_scene_ReflectionProbe_getCamera)); cls->defineFunction("needRender", _SE(js_cc_scene_ReflectionProbe_needRender)); + cls->defineFunction("setNeedRender", _SE(js_cc_scene_ReflectionProbe_setNeedRender)); cls->defineFunction("setCameraNode", _SE(js_cc_scene_ReflectionProbe_setCameraNode)); cls->defineFunction("getCameraNode", _SE(js_cc_scene_ReflectionProbe_getCameraNode)); - cls->defineFunction("getRealtimePlanarTexture", _SE(js_cc_scene_ReflectionProbe_getRealtimePlanarTexture)); cls->defineFunction("updateBoundingBox", _SE(js_cc_scene_ReflectionProbe_updateBoundingBox)); cls->defineFunction("syncCameraParams", _SE(js_cc_scene_ReflectionProbe_syncCameraParams)); cls->defineFunction("transformReflectionCamera", _SE(js_cc_scene_ReflectionProbe_transformReflectionCamera)); @@ -24722,7 +25068,15 @@ bool js_register_cc_scene_ReflectionProbe(se::Object* obj) { cls->defineFunction("switchProbeType", _SE(js_cc_scene_ReflectionProbe_switchProbeType)); cls->defineFunction("updatePlanarTexture", _SE(js_cc_scene_ReflectionProbe_updatePlanarTexture)); cls->defineFunction("destroy", _SE(js_cc_scene_ReflectionProbe_destroy)); + cls->defineFunction("enable", _SE(js_cc_scene_ReflectionProbe_enable)); + cls->defineFunction("disable", _SE(js_cc_scene_ReflectionProbe_disable)); cls->defineFunction("validate", _SE(js_cc_scene_ReflectionProbe_validate)); + cls->defineFunction("initBakedTextures", _SE(js_cc_scene_ReflectionProbe_initBakedTextures)); + cls->defineFunction("captureCubemap", _SE(js_cc_scene_ReflectionProbe_captureCubemap)); + cls->defineFunction("resetCameraParams", _SE(js_cc_scene_ReflectionProbe_resetCameraParams)); + cls->defineFunction("updateCameraDir", _SE(js_cc_scene_ReflectionProbe_updateCameraDir)); + cls->defineFunction("getRenderArea", _SE(js_cc_scene_ReflectionProbe_getRenderArea)); + cls->defineFunction("packBackgroundColor", _SE(js_cc_scene_ReflectionProbe_packBackgroundColor)); cls->defineStaticFunction("reflect", _SE(js_cc_scene_ReflectionProbe_reflect_static)); diff --git a/native/cocos/bindings/auto/jsb_scene_auto.h b/native/cocos/bindings/auto/jsb_scene_auto.h index de564a6db4..4e03c2857e 100644 --- a/native/cocos/bindings/auto/jsb_scene_auto.h +++ b/native/cocos/bindings/auto/jsb_scene_auto.h @@ -9,20 +9,19 @@ * ----------------------------------------------------------------------------- */ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/auto/jsb_spine_auto.cpp b/native/cocos/bindings/auto/jsb_spine_auto.cpp index c268c4c280..8d99a7cf62 100644 --- a/native/cocos/bindings/auto/jsb_spine_auto.cpp +++ b/native/cocos/bindings/auto/jsb_spine_auto.cpp @@ -9,20 +9,19 @@ * ----------------------------------------------------------------------------- */ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/auto/jsb_spine_auto.h b/native/cocos/bindings/auto/jsb_spine_auto.h index 9fc7c1865f..5257db6bbe 100644 --- a/native/cocos/bindings/auto/jsb_spine_auto.h +++ b/native/cocos/bindings/auto/jsb_spine_auto.h @@ -9,20 +9,19 @@ * ----------------------------------------------------------------------------- */ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/auto/jsb_video_auto.cpp b/native/cocos/bindings/auto/jsb_video_auto.cpp index 6b8d85efc6..60ff667394 100644 --- a/native/cocos/bindings/auto/jsb_video_auto.cpp +++ b/native/cocos/bindings/auto/jsb_video_auto.cpp @@ -9,20 +9,19 @@ * ----------------------------------------------------------------------------- */ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/auto/jsb_video_auto.h b/native/cocos/bindings/auto/jsb_video_auto.h index c1ca06794e..ff860abc0f 100644 --- a/native/cocos/bindings/auto/jsb_video_auto.h +++ b/native/cocos/bindings/auto/jsb_video_auto.h @@ -9,20 +9,19 @@ * ----------------------------------------------------------------------------- */ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/auto/jsb_webview_auto.cpp b/native/cocos/bindings/auto/jsb_webview_auto.cpp index 3556e5f118..dd96a26207 100644 --- a/native/cocos/bindings/auto/jsb_webview_auto.cpp +++ b/native/cocos/bindings/auto/jsb_webview_auto.cpp @@ -9,20 +9,19 @@ * ----------------------------------------------------------------------------- */ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/auto/jsb_webview_auto.h b/native/cocos/bindings/auto/jsb_webview_auto.h index 3c5b306632..c77d4e1699 100644 --- a/native/cocos/bindings/auto/jsb_webview_auto.h +++ b/native/cocos/bindings/auto/jsb_webview_auto.h @@ -9,20 +9,19 @@ * ----------------------------------------------------------------------------- */ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/auto/jsb_xr_auto.cpp b/native/cocos/bindings/auto/jsb_xr_auto.cpp index 4b6011289f..e254e8eb14 100644 --- a/native/cocos/bindings/auto/jsb_xr_auto.cpp +++ b/native/cocos/bindings/auto/jsb_xr_auto.cpp @@ -9,20 +9,19 @@ * ----------------------------------------------------------------------------- */ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/auto/jsb_xr_auto.h b/native/cocos/bindings/auto/jsb_xr_auto.h index cc94ec429b..81b733d9d0 100644 --- a/native/cocos/bindings/auto/jsb_xr_auto.h +++ b/native/cocos/bindings/auto/jsb_xr_auto.h @@ -9,20 +9,19 @@ * ----------------------------------------------------------------------------- */ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/dop/BufferAllocator.cpp b/native/cocos/bindings/dop/BufferAllocator.cpp index 1716ee31f4..b2b10863b4 100644 --- a/native/cocos/bindings/dop/BufferAllocator.cpp +++ b/native/cocos/bindings/dop/BufferAllocator.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/dop/BufferAllocator.h b/native/cocos/bindings/dop/BufferAllocator.h index 9beed2cf4b..bf2f1b25c6 100644 --- a/native/cocos/bindings/dop/BufferAllocator.h +++ b/native/cocos/bindings/dop/BufferAllocator.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/dop/BufferPool.cpp b/native/cocos/bindings/dop/BufferPool.cpp index 0e078823bc..0333d9b177 100644 --- a/native/cocos/bindings/dop/BufferPool.cpp +++ b/native/cocos/bindings/dop/BufferPool.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/dop/BufferPool.h b/native/cocos/bindings/dop/BufferPool.h index bd6b00221c..fbc56028ad 100644 --- a/native/cocos/bindings/dop/BufferPool.h +++ b/native/cocos/bindings/dop/BufferPool.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/dop/PoolType.h b/native/cocos/bindings/dop/PoolType.h index 7b82701dc1..d0a2f632d8 100644 --- a/native/cocos/bindings/dop/PoolType.h +++ b/native/cocos/bindings/dop/PoolType.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/dop/jsb_dop.cpp b/native/cocos/bindings/dop/jsb_dop.cpp index eff6c1ef5c..830444608e 100644 --- a/native/cocos/bindings/dop/jsb_dop.cpp +++ b/native/cocos/bindings/dop/jsb_dop.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/dop/jsb_dop.h b/native/cocos/bindings/dop/jsb_dop.h index 27e6a651d3..f8f16fe338 100644 --- a/native/cocos/bindings/dop/jsb_dop.h +++ b/native/cocos/bindings/dop/jsb_dop.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/event/EventDispatcher.cpp b/native/cocos/bindings/event/EventDispatcher.cpp index ac75913026..5291565f05 100644 --- a/native/cocos/bindings/event/EventDispatcher.cpp +++ b/native/cocos/bindings/event/EventDispatcher.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2018-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2018-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/event/EventDispatcher.h b/native/cocos/bindings/event/EventDispatcher.h index f3d8899f1d..3370285c7c 100644 --- a/native/cocos/bindings/event/EventDispatcher.h +++ b/native/cocos/bindings/event/EventDispatcher.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2018-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2018-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/jswrapper/Define.h b/native/cocos/bindings/jswrapper/Define.h index 36d3bf8882..98222de8d9 100644 --- a/native/cocos/bindings/jswrapper/Define.h +++ b/native/cocos/bindings/jswrapper/Define.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -34,15 +33,15 @@ namespace se { * @note Use the same value as which defined in v8, we convert it to v8::PropertyAttribute directly, so don't change the enum value. */ enum class PropertyAttribute : uint8_t { - /** NONE. **/ - NONE = 0, - /** READ_ONLY, i.e., not writable. **/ - READ_ONLY = 1 << 0, - /** DONT_ENUM, i.e., not enumerable. **/ - DONT_ENUM = 1 << 1, - /** DONT_DELETE, i.e., not configurable. **/ - DONT_DELETE = 1 << 2 + /** NONE. **/ + NONE = 0, + /** READ_ONLY, i.e., not writable. **/ + READ_ONLY = 1 << 0, + /** DONT_ENUM, i.e., not enumerable. **/ + DONT_ENUM = 1 << 1, + /** DONT_DELETE, i.e., not configurable. **/ + DONT_DELETE = 1 << 2 }; CC_ENUM_BITWISE_OPERATORS(PropertyAttribute); -} +} // namespace se diff --git a/native/cocos/bindings/jswrapper/HandleObject.cpp b/native/cocos/bindings/jswrapper/HandleObject.cpp index 62dfb2ef26..73739aa65a 100644 --- a/native/cocos/bindings/jswrapper/HandleObject.cpp +++ b/native/cocos/bindings/jswrapper/HandleObject.cpp @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/jswrapper/HandleObject.h b/native/cocos/bindings/jswrapper/HandleObject.h index a2dbfc903b..85dd2c259e 100644 --- a/native/cocos/bindings/jswrapper/HandleObject.h +++ b/native/cocos/bindings/jswrapper/HandleObject.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/jswrapper/MappingUtils.cpp b/native/cocos/bindings/jswrapper/MappingUtils.cpp index c2515e2489..d871bd05bc 100644 --- a/native/cocos/bindings/jswrapper/MappingUtils.cpp +++ b/native/cocos/bindings/jswrapper/MappingUtils.cpp @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -53,15 +52,18 @@ bool NativePtrToObjectMap::isValid() { return __isValid; } -CC_DEPRECATED(3.7) NativePtrToObjectMap::Map::iterator NativePtrToObjectMap::find(void *v) { +CC_DEPRECATED(3.7) +NativePtrToObjectMap::Map::iterator NativePtrToObjectMap::find(void *v) { return __nativePtrToObjectMap->find(v); } -CC_DEPRECATED(3.7) NativePtrToObjectMap::Map::iterator NativePtrToObjectMap::begin() { +CC_DEPRECATED(3.7) +NativePtrToObjectMap::Map::iterator NativePtrToObjectMap::begin() { return __nativePtrToObjectMap->begin(); } -CC_DEPRECATED(3.7) NativePtrToObjectMap::Map::iterator NativePtrToObjectMap::end() { +CC_DEPRECATED(3.7) +NativePtrToObjectMap::Map::iterator NativePtrToObjectMap::end() { return __nativePtrToObjectMap->end(); } diff --git a/native/cocos/bindings/jswrapper/MappingUtils.h b/native/cocos/bindings/jswrapper/MappingUtils.h index 12c25873c1..0c954bae5a 100644 --- a/native/cocos/bindings/jswrapper/MappingUtils.h +++ b/native/cocos/bindings/jswrapper/MappingUtils.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/jswrapper/Object.h b/native/cocos/bindings/jswrapper/Object.h index 997e56a330..632bb87f18 100644 --- a/native/cocos/bindings/jswrapper/Object.h +++ b/native/cocos/bindings/jswrapper/Object.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/jswrapper/PrivateObject.h b/native/cocos/bindings/jswrapper/PrivateObject.h index 59169f635d..27319d996d 100644 --- a/native/cocos/bindings/jswrapper/PrivateObject.h +++ b/native/cocos/bindings/jswrapper/PrivateObject.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/jswrapper/RefCounter.cpp b/native/cocos/bindings/jswrapper/RefCounter.cpp index 6f6f105b9f..b5cd282dec 100644 --- a/native/cocos/bindings/jswrapper/RefCounter.cpp +++ b/native/cocos/bindings/jswrapper/RefCounter.cpp @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/jswrapper/RefCounter.h b/native/cocos/bindings/jswrapper/RefCounter.h index 0935087fbe..6771b1a17f 100644 --- a/native/cocos/bindings/jswrapper/RefCounter.h +++ b/native/cocos/bindings/jswrapper/RefCounter.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/jswrapper/SeApi.h b/native/cocos/bindings/jswrapper/SeApi.h index aa4736835e..e84cfa3ff9 100644 --- a/native/cocos/bindings/jswrapper/SeApi.h +++ b/native/cocos/bindings/jswrapper/SeApi.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/jswrapper/State.cpp b/native/cocos/bindings/jswrapper/State.cpp index 47a7d8c1a9..ead583c19f 100644 --- a/native/cocos/bindings/jswrapper/State.cpp +++ b/native/cocos/bindings/jswrapper/State.cpp @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/jswrapper/State.h b/native/cocos/bindings/jswrapper/State.h index 7a2ce1bec9..258042818a 100644 --- a/native/cocos/bindings/jswrapper/State.h +++ b/native/cocos/bindings/jswrapper/State.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -30,7 +29,6 @@ #include "PrivateObject.h" #include "Value.h" - namespace se { class Object; diff --git a/native/cocos/bindings/jswrapper/Value.cpp b/native/cocos/bindings/jswrapper/Value.cpp index 445f0822f7..8a1c010c0f 100644 --- a/native/cocos/bindings/jswrapper/Value.cpp +++ b/native/cocos/bindings/jswrapper/Value.cpp @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/jswrapper/Value.h b/native/cocos/bindings/jswrapper/Value.h index 904bc95c08..553a8fbc5f 100644 --- a/native/cocos/bindings/jswrapper/Value.h +++ b/native/cocos/bindings/jswrapper/Value.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/jswrapper/ValueArrayPool.cpp b/native/cocos/bindings/jswrapper/ValueArrayPool.cpp index 81377021f6..ee2b7f0099 100644 --- a/native/cocos/bindings/jswrapper/ValueArrayPool.cpp +++ b/native/cocos/bindings/jswrapper/ValueArrayPool.cpp @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/jswrapper/ValueArrayPool.h b/native/cocos/bindings/jswrapper/ValueArrayPool.h index 82c66090d6..5ace439317 100644 --- a/native/cocos/bindings/jswrapper/ValueArrayPool.h +++ b/native/cocos/bindings/jswrapper/ValueArrayPool.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/jswrapper/config.cpp b/native/cocos/bindings/jswrapper/config.cpp index aab1fcb2a2..0210774ab1 100644 --- a/native/cocos/bindings/jswrapper/config.cpp +++ b/native/cocos/bindings/jswrapper/config.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/jswrapper/config.h b/native/cocos/bindings/jswrapper/config.h index 1649c1485a..00a8c90803 100644 --- a/native/cocos/bindings/jswrapper/config.h +++ b/native/cocos/bindings/jswrapper/config.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/jswrapper/sm/Base.h b/native/cocos/bindings/jswrapper/sm/Base.h index 8b96bbbadf..09abcfe7d2 100644 --- a/native/cocos/bindings/jswrapper/sm/Base.h +++ b/native/cocos/bindings/jswrapper/sm/Base.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/jswrapper/sm/Class.cpp b/native/cocos/bindings/jswrapper/sm/Class.cpp index 6b7da1d110..793813587a 100644 --- a/native/cocos/bindings/jswrapper/sm/Class.cpp +++ b/native/cocos/bindings/jswrapper/sm/Class.cpp @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/jswrapper/sm/Class.h b/native/cocos/bindings/jswrapper/sm/Class.h index 109e180df5..c013458535 100644 --- a/native/cocos/bindings/jswrapper/sm/Class.h +++ b/native/cocos/bindings/jswrapper/sm/Class.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/jswrapper/sm/HelperMacros.cpp b/native/cocos/bindings/jswrapper/sm/HelperMacros.cpp index e10dc43248..b0659ee2a3 100644 --- a/native/cocos/bindings/jswrapper/sm/HelperMacros.cpp +++ b/native/cocos/bindings/jswrapper/sm/HelperMacros.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/jswrapper/sm/HelperMacros.h b/native/cocos/bindings/jswrapper/sm/HelperMacros.h index ad6f356bc0..c9645a5894 100644 --- a/native/cocos/bindings/jswrapper/sm/HelperMacros.h +++ b/native/cocos/bindings/jswrapper/sm/HelperMacros.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/jswrapper/sm/Object.cpp b/native/cocos/bindings/jswrapper/sm/Object.cpp index 9604ed03ba..ecdfce3e22 100644 --- a/native/cocos/bindings/jswrapper/sm/Object.cpp +++ b/native/cocos/bindings/jswrapper/sm/Object.cpp @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/jswrapper/sm/Object.h b/native/cocos/bindings/jswrapper/sm/Object.h index 69fe58902c..56e7b13e8f 100644 --- a/native/cocos/bindings/jswrapper/sm/Object.h +++ b/native/cocos/bindings/jswrapper/sm/Object.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/jswrapper/sm/ScriptEngine.cpp b/native/cocos/bindings/jswrapper/sm/ScriptEngine.cpp index 0dde4221cd..5e3cb63624 100644 --- a/native/cocos/bindings/jswrapper/sm/ScriptEngine.cpp +++ b/native/cocos/bindings/jswrapper/sm/ScriptEngine.cpp @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/jswrapper/sm/ScriptEngine.h b/native/cocos/bindings/jswrapper/sm/ScriptEngine.h index 49a43c71df..a02eae9205 100644 --- a/native/cocos/bindings/jswrapper/sm/ScriptEngine.h +++ b/native/cocos/bindings/jswrapper/sm/ScriptEngine.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/jswrapper/sm/SeApi.h b/native/cocos/bindings/jswrapper/sm/SeApi.h index 3d7d769f6d..37202193bd 100644 --- a/native/cocos/bindings/jswrapper/sm/SeApi.h +++ b/native/cocos/bindings/jswrapper/sm/SeApi.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/jswrapper/sm/Utils.cpp b/native/cocos/bindings/jswrapper/sm/Utils.cpp index 5d00a5c2ee..36cdca602a 100644 --- a/native/cocos/bindings/jswrapper/sm/Utils.cpp +++ b/native/cocos/bindings/jswrapper/sm/Utils.cpp @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/jswrapper/sm/Utils.h b/native/cocos/bindings/jswrapper/sm/Utils.h index 876f6006c1..ac4f1500d7 100644 --- a/native/cocos/bindings/jswrapper/sm/Utils.h +++ b/native/cocos/bindings/jswrapper/sm/Utils.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/jswrapper/v8/Base.h b/native/cocos/bindings/jswrapper/v8/Base.h index fcf06f4c19..c9853c00a5 100644 --- a/native/cocos/bindings/jswrapper/v8/Base.h +++ b/native/cocos/bindings/jswrapper/v8/Base.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/jswrapper/v8/Class.cpp b/native/cocos/bindings/jswrapper/v8/Class.cpp index 8bbb8fb79c..ff2432e8d9 100644 --- a/native/cocos/bindings/jswrapper/v8/Class.cpp +++ b/native/cocos/bindings/jswrapper/v8/Class.cpp @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -241,7 +240,7 @@ bool Class::defineStaticProperty(const char *name, v8::FunctionCallback getter, return true; } -bool Class::defineStaticProperty(const char *name, const Value &value, PropertyAttribute attribute/* = PropertyAttribute::NONE */) { +bool Class::defineStaticProperty(const char *name, const Value &value, PropertyAttribute attribute /* = PropertyAttribute::NONE */) { v8::MaybeLocal jsName = v8::String::NewFromUtf8(__isolate, name, v8::NewStringType::kNormal); if (jsName.IsEmpty()) { return false; diff --git a/native/cocos/bindings/jswrapper/v8/Class.h b/native/cocos/bindings/jswrapper/v8/Class.h index 2035404190..988487c011 100644 --- a/native/cocos/bindings/jswrapper/v8/Class.h +++ b/native/cocos/bindings/jswrapper/v8/Class.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -30,9 +29,9 @@ #if SCRIPT_ENGINE_TYPE == SCRIPT_ENGINE_V8 - #include "Base.h" - #include "../Value.h" #include "../Define.h" + #include "../Value.h" + #include "Base.h" namespace se { @@ -106,7 +105,6 @@ public: */ bool defineStaticProperty(const char *name, const Value &value, PropertyAttribute attribute = PropertyAttribute::NONE); - /** * @brief Defines the finalize function with a callback. * @param[in] func The callback to invoke when a JavaScript object is garbage collected. diff --git a/native/cocos/bindings/jswrapper/v8/HelperMacros.cpp b/native/cocos/bindings/jswrapper/v8/HelperMacros.cpp index fbeeffc444..03e7abbeac 100644 --- a/native/cocos/bindings/jswrapper/v8/HelperMacros.cpp +++ b/native/cocos/bindings/jswrapper/v8/HelperMacros.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -25,10 +24,10 @@ #include "HelperMacros.h" #include "../State.h" +#include "../ValueArrayPool.h" +#include "Object.h" #include "ScriptEngine.h" #include "Utils.h" -#include "Object.h" -#include "../ValueArrayPool.h" #if defined(RECORD_JSB_INVOKING) diff --git a/native/cocos/bindings/jswrapper/v8/HelperMacros.h b/native/cocos/bindings/jswrapper/v8/HelperMacros.h index 74f5d7f232..213855e6d2 100644 --- a/native/cocos/bindings/jswrapper/v8/HelperMacros.h +++ b/native/cocos/bindings/jswrapper/v8/HelperMacros.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -106,19 +105,19 @@ void jsbConstructorWrapper(const v8::FunctionCallbackInfo &, se_finalize_ptr finalizeCb, se::Class *, const char *); -void jsbGetterWrapper(const v8::FunctionCallbackInfo&, +void jsbGetterWrapper(const v8::FunctionCallbackInfo &, se_function_ptr, const char *); -void jsbSetterWrapper(const v8::FunctionCallbackInfo&, +void jsbSetterWrapper(const v8::FunctionCallbackInfo &, se_function_ptr, const char *); #ifdef __GNUC__ #define SE_UNUSED __attribute__((unused)) - #define SE_HOT __attribute__((hot)) + #define SE_HOT __attribute__((hot)) #else #define SE_UNUSED - #define SE_HOT + #define SE_HOT #endif #define SAFE_INC_REF(obj) \ @@ -159,25 +158,25 @@ void jsbSetterWrapper(const v8::FunctionCallbackInfo&, void funcName##Registry(se::Object *thisObject); // v8 doesn't need to create a new JSObject in SE_BIND_CTOR while SpiderMonkey needs. - #define SE_BIND_CTOR(funcName, cls, finalizeCb) \ - void funcName##Registry(const v8::FunctionCallbackInfo &_v8args) { \ - JsbInvokeScope(#funcName); \ + #define SE_BIND_CTOR(funcName, cls, finalizeCb) \ + void funcName##Registry(const v8::FunctionCallbackInfo &_v8args) { \ + JsbInvokeScope(#funcName); \ jsbConstructorWrapper(_v8args, funcName, _SE(finalizeCb), cls, #funcName); \ } - #define SE_BIND_PROP_GET_IMPL(funcName, postFix) \ - void funcName##postFix##Registry(const v8::FunctionCallbackInfo& _v8args) { \ - JsbInvokeScope(#funcName); \ - jsbGetterWrapper(_v8args, funcName, #funcName); \ + #define SE_BIND_PROP_GET_IMPL(funcName, postFix) \ + void funcName##postFix##Registry(const v8::FunctionCallbackInfo &_v8args) { \ + JsbInvokeScope(#funcName); \ + jsbGetterWrapper(_v8args, funcName, #funcName); \ } #define SE_BIND_PROP_GET(funcName) SE_BIND_PROP_GET_IMPL(funcName, ) #define SE_BIND_FUNC_AS_PROP_GET(funcName) SE_BIND_PROP_GET_IMPL(funcName, _asGetter) - #define SE_BIND_PROP_SET_IMPL(funcName, postFix) \ - void funcName##postFix##Registry(const v8::FunctionCallbackInfo& _v8args) { \ - JsbInvokeScope(#funcName); \ - jsbSetterWrapper(_v8args, funcName, #funcName); \ + #define SE_BIND_PROP_SET_IMPL(funcName, postFix) \ + void funcName##postFix##Registry(const v8::FunctionCallbackInfo &_v8args) { \ + JsbInvokeScope(#funcName); \ + jsbSetterWrapper(_v8args, funcName, #funcName); \ } #define SE_BIND_PROP_SET(funcName) SE_BIND_PROP_SET_IMPL(funcName, ) @@ -198,7 +197,7 @@ void jsbSetterWrapper(const v8::FunctionCallbackInfo&, do { \ if (!(cond)) { \ selogMessage(cc::LogLevel::ERR, "[SE_ASSERT]", (" (%s, %d): " fmt), __FILE__, __LINE__, ##__VA_ARGS__); \ - CC_ABORT(); \ + CC_ABORT(); \ } \ } while (false) diff --git a/native/cocos/bindings/jswrapper/v8/MissingSymbols.cpp b/native/cocos/bindings/jswrapper/v8/MissingSymbols.cpp index 3c8fb7187b..7fec12a1bf 100644 --- a/native/cocos/bindings/jswrapper/v8/MissingSymbols.cpp +++ b/native/cocos/bindings/jswrapper/v8/MissingSymbols.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/jswrapper/v8/MissingSymbols.h b/native/cocos/bindings/jswrapper/v8/MissingSymbols.h index 2da7b4eedf..3c597956af 100644 --- a/native/cocos/bindings/jswrapper/v8/MissingSymbols.h +++ b/native/cocos/bindings/jswrapper/v8/MissingSymbols.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/jswrapper/v8/Object.cpp b/native/cocos/bindings/jswrapper/v8/Object.cpp index c4e7f65f44..7cc1bbbd57 100644 --- a/native/cocos/bindings/jswrapper/v8/Object.cpp +++ b/native/cocos/bindings/jswrapper/v8/Object.cpp @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -244,9 +243,9 @@ Object *Object::createExternalArrayBufferObject(void *contents, size_t byteLengt Object *obj = nullptr; #if CC_EDITOR && CC_PLATFORM == CC_PLATFORM_WINDOWS auto nodeBuffer = node::Buffer::New( - __isolate, (char *)contents, byteLength, [](char *data, void *hint) {}, nullptr) - .ToLocalChecked() - .As(); + __isolate, (char *)contents, byteLength, [](char *data, void *hint) {}, nullptr) + .ToLocalChecked() + .As(); v8::Local jsobj = nodeBuffer.As()->Buffer(); #else std::shared_ptr backingStore = v8::ArrayBuffer::NewBackingStore(contents, byteLength, freeFunc, freeUserData); diff --git a/native/cocos/bindings/jswrapper/v8/Object.h b/native/cocos/bindings/jswrapper/v8/Object.h index b72f922ff6..0ec3119a40 100644 --- a/native/cocos/bindings/jswrapper/v8/Object.h +++ b/native/cocos/bindings/jswrapper/v8/Object.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -185,7 +184,8 @@ public: * @note The return value (non-null) has to be released manually. * @deprecated Use NativePtrToObjectMap to query the native object. */ - CC_DEPRECATED(3.7) static Object *getObjectWithPtr(void *ptr); + CC_DEPRECATED(3.7) + static Object *getObjectWithPtr(void *ptr); /** * @brief Gets a property from an object. diff --git a/native/cocos/bindings/jswrapper/v8/ObjectWrap.cpp b/native/cocos/bindings/jswrapper/v8/ObjectWrap.cpp index 3f9c0afaa4..75a2863106 100644 --- a/native/cocos/bindings/jswrapper/v8/ObjectWrap.cpp +++ b/native/cocos/bindings/jswrapper/v8/ObjectWrap.cpp @@ -1,18 +1,18 @@ /**************************************************************************** + Copyright Joyent, Inc. and other Node contributors. Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -23,26 +23,6 @@ THE SOFTWARE. ****************************************************************************/ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. #include "ObjectWrap.h" #include "Object.h" diff --git a/native/cocos/bindings/jswrapper/v8/ObjectWrap.h b/native/cocos/bindings/jswrapper/v8/ObjectWrap.h index aa5a50d051..485cb82941 100644 --- a/native/cocos/bindings/jswrapper/v8/ObjectWrap.h +++ b/native/cocos/bindings/jswrapper/v8/ObjectWrap.h @@ -1,18 +1,18 @@ /**************************************************************************** + Copyright Joyent, Inc. and other Node contributors. Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -23,27 +23,6 @@ THE SOFTWARE. ****************************************************************************/ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - #pragma once #include "../config.h" diff --git a/native/cocos/bindings/jswrapper/v8/ScriptEngine.cpp b/native/cocos/bindings/jswrapper/v8/ScriptEngine.cpp index 3d338997e1..be97dbeb06 100644 --- a/native/cocos/bindings/jswrapper/v8/ScriptEngine.cpp +++ b/native/cocos/bindings/jswrapper/v8/ScriptEngine.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -24,6 +23,7 @@ ****************************************************************************/ #include "ScriptEngine.h" +#include "engine/EngineEvents.h" #if SCRIPT_ENGINE_TYPE == SCRIPT_ENGINE_V8 @@ -575,8 +575,11 @@ bool ScriptEngine::postInit() { _isValid = true; + // @deprecated since 3.7.0 cc::plugin::send(cc::plugin::BusType::SCRIPT_ENGINE, cc::plugin::ScriptEngineEvent::POST_INIT); + cc::events::ScriptEngine::broadcast(cc::ScriptEngineEvent::AFTER_INIT); + for (const auto &hook : _afterInitHookArray) { hook(); } @@ -596,6 +599,8 @@ bool ScriptEngine::init(v8::Isolate *isolate) { _engineThreadId = std::this_thread::get_id(); + cc::events::ScriptEngine::broadcast(cc::ScriptEngineEvent::BEFORE_INIT); + for (const auto &hook : _beforeInitHookArray) { hook(); } @@ -629,6 +634,8 @@ void ScriptEngine::cleanup() { SE_LOGD("ScriptEngine::cleanup begin ...\n"); _isInCleanup = true; + cc::events::ScriptEngine::broadcast(cc::ScriptEngineEvent::BEFORE_CLEANUP); + { AutoHandleScope hs; for (const auto &hook : _beforeCleanupHookArray) { @@ -696,6 +703,7 @@ void ScriptEngine::cleanup() { NativePtrToObjectMap::destroy(); _gcFuncValue.setUndefined(); _gcFunc = nullptr; + cc::events::ScriptEngine::broadcast(cc::ScriptEngineEvent::AFTER_CLEANUP); SE_LOGD("ScriptEngine::cleanup end ...\n"); } diff --git a/native/cocos/bindings/jswrapper/v8/ScriptEngine.h b/native/cocos/bindings/jswrapper/v8/ScriptEngine.h index 041ae63b31..59940b6522 100644 --- a/native/cocos/bindings/jswrapper/v8/ScriptEngine.h +++ b/native/cocos/bindings/jswrapper/v8/ScriptEngine.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/jswrapper/v8/SeApi.h b/native/cocos/bindings/jswrapper/v8/SeApi.h index e66ccb97b5..f7fc9f626d 100644 --- a/native/cocos/bindings/jswrapper/v8/SeApi.h +++ b/native/cocos/bindings/jswrapper/v8/SeApi.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/jswrapper/v8/Utils.cpp b/native/cocos/bindings/jswrapper/v8/Utils.cpp index 474999f17d..3bb6d09e94 100644 --- a/native/cocos/bindings/jswrapper/v8/Utils.cpp +++ b/native/cocos/bindings/jswrapper/v8/Utils.cpp @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/jswrapper/v8/Utils.h b/native/cocos/bindings/jswrapper/v8/Utils.h index 06528c9f59..dcd7591558 100644 --- a/native/cocos/bindings/jswrapper/v8/Utils.h +++ b/native/cocos/bindings/jswrapper/v8/Utils.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2016 Chukong Technologies Inc. - Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/manual/JavaScriptJavaBridge.cpp b/native/cocos/bindings/manual/JavaScriptJavaBridge.cpp index afcb252464..f2779af55a 100644 --- a/native/cocos/bindings/manual/JavaScriptJavaBridge.cpp +++ b/native/cocos/bindings/manual/JavaScriptJavaBridge.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2018-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2018-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/manual/JavaScriptJavaBridge.h b/native/cocos/bindings/manual/JavaScriptJavaBridge.h index c2334d4792..6cf2c8609d 100644 --- a/native/cocos/bindings/manual/JavaScriptJavaBridge.h +++ b/native/cocos/bindings/manual/JavaScriptJavaBridge.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2018-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2018-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/manual/JavaScriptObjCBridge.h b/native/cocos/bindings/manual/JavaScriptObjCBridge.h index d3ae71f678..2f0674d7db 100644 --- a/native/cocos/bindings/manual/JavaScriptObjCBridge.h +++ b/native/cocos/bindings/manual/JavaScriptObjCBridge.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2018-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2018-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/manual/jsb_ar_manual.cpp b/native/cocos/bindings/manual/jsb_ar_manual.cpp index fb38a4182a..6f3d336b29 100644 --- a/native/cocos/bindings/manual/jsb_ar_manual.cpp +++ b/native/cocos/bindings/manual/jsb_ar_manual.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -25,11 +24,10 @@ #include "jsb_ar_manual.h" -#include "bindings/manual/jsb_global.h" #include "bindings/auto/jsb_ar_auto.h" +#include "bindings/manual/jsb_global.h" -static bool js_ar_ARModule_getAddedPlanesInfo(se::State& s) -{ +static bool js_ar_ARModule_getAddedPlanesInfo(se::State& s) { cc::ar::ARModule* cobj = (cc::ar::ARModule*)s.nativeThisObject(); if (nullptr == cobj) return true; const auto& args = s.args(); @@ -50,8 +48,7 @@ static bool js_ar_ARModule_getAddedPlanesInfo(se::State& s) SE_BIND_FUNC(js_ar_ARModule_getAddedPlanesInfo) -static bool js_ar_ARModule_getUpdatedPlanesInfo(se::State& s) -{ +static bool js_ar_ARModule_getUpdatedPlanesInfo(se::State& s) { cc::ar::ARModule* cobj = (cc::ar::ARModule*)s.nativeThisObject(); if (nullptr == cobj) return true; const auto& args = s.args(); @@ -70,8 +67,7 @@ static bool js_ar_ARModule_getUpdatedPlanesInfo(se::State& s) } SE_BIND_FUNC(js_ar_ARModule_getUpdatedPlanesInfo) -static bool js_ar_ARModule_getRemovedPlanesInfo(se::State& s) -{ +static bool js_ar_ARModule_getRemovedPlanesInfo(se::State& s) { auto* cobj = SE_THIS_OBJECT(s); if (nullptr == cobj) return true; const auto& args = s.args(); @@ -90,8 +86,7 @@ static bool js_ar_ARModule_getRemovedPlanesInfo(se::State& s) } SE_BIND_FUNC(js_ar_ARModule_getRemovedPlanesInfo) -static bool js_ar_ARModule_getPlanePolygon(se::State& s) -{ +static bool js_ar_ARModule_getPlanePolygon(se::State& s) { cc::ar::ARModule* cobj = (cc::ar::ARModule*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_ar_ARModule_getPlanePolygon : Invalid Native Object"); @@ -115,8 +110,7 @@ static bool js_ar_ARModule_getPlanePolygon(se::State& s) } SE_BIND_FUNC(js_ar_ARModule_getPlanePolygon) -static bool js_ar_ARModule_getAddedSceneMesh(se::State& s) -{ +static bool js_ar_ARModule_getAddedSceneMesh(se::State& s) { cc::ar::ARModule* cobj = (cc::ar::ARModule*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_ar_ARModule_getAddedSceneMesh : Invalid Native Object"); @@ -135,8 +129,7 @@ static bool js_ar_ARModule_getAddedSceneMesh(se::State& s) } SE_BIND_FUNC(js_ar_ARModule_getAddedSceneMesh) -static bool js_ar_ARModule_getUpdatedSceneMesh(se::State& s) -{ +static bool js_ar_ARModule_getUpdatedSceneMesh(se::State& s) { cc::ar::ARModule* cobj = (cc::ar::ARModule*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_ar_ARModule_getUpdatedSceneMesh : Invalid Native Object"); @@ -155,17 +148,16 @@ static bool js_ar_ARModule_getUpdatedSceneMesh(se::State& s) } SE_BIND_FUNC(js_ar_ARModule_getUpdatedSceneMesh) -static bool js_ar_ARModule_getRemovedSceneMesh(se::State& s) -{ +static bool js_ar_ARModule_getRemovedSceneMesh(se::State& s) { cc::ar::ARModule* cobj = (cc::ar::ARModule*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_ar_ARModule_getRemovedSceneMesh : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); if (argc == 0) { - int* buffer = cobj->getRemovedSceneMesh(); + float* buffer = cobj->getRemovedSceneMesh(); int len = cobj->getInfoLength(); - se::HandleObject meshesInfo{se::Object::createTypedArray(se::Object::TypedArrayType::UINT32, buffer, sizeof(float) * len)}; + se::HandleObject meshesInfo{se::Object::createTypedArray(se::Object::TypedArrayType::FLOAT32, buffer, sizeof(float) * len)}; s.rval().setObject(meshesInfo); return true; } @@ -175,8 +167,7 @@ static bool js_ar_ARModule_getRemovedSceneMesh(se::State& s) } SE_BIND_FUNC(js_ar_ARModule_getRemovedSceneMesh) -static bool js_ar_ARModule_requireSceneMesh(se::State& s) -{ +static bool js_ar_ARModule_requireSceneMesh(se::State& s) { cc::ar::ARModule* cobj = (cc::ar::ARModule*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_ar_ARModule_requireSceneMesh : Invalid Native Object"); @@ -195,8 +186,7 @@ static bool js_ar_ARModule_requireSceneMesh(se::State& s) } SE_BIND_FUNC(js_ar_ARModule_requireSceneMesh) -static bool js_ar_ARModule_getSceneMeshVertices(se::State& s) -{ +static bool js_ar_ARModule_getSceneMeshVertices(se::State& s) { cc::ar::ARModule* cobj = (cc::ar::ARModule*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_ar_ARModule_getSceneMeshVertices : Invalid Native Object"); @@ -220,8 +210,7 @@ static bool js_ar_ARModule_getSceneMeshVertices(se::State& s) } SE_BIND_FUNC(js_ar_ARModule_getSceneMeshVertices) -static bool js_ar_ARModule_getSceneMeshTriangleIndices(se::State& s) -{ +static bool js_ar_ARModule_getSceneMeshTriangleIndices(se::State& s) { cc::ar::ARModule* cobj = (cc::ar::ARModule*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_ar_ARModule_getSceneMeshTriangleIndices : Invalid Native Object"); @@ -245,8 +234,7 @@ static bool js_ar_ARModule_getSceneMeshTriangleIndices(se::State& s) } SE_BIND_FUNC(js_ar_ARModule_getSceneMeshTriangleIndices) -static bool js_ar_ARModule_getAddedImagesInfo(se::State& s) -{ +static bool js_ar_ARModule_getAddedImagesInfo(se::State& s) { cc::ar::ARModule* cobj = (cc::ar::ARModule*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_ar_ARModule_getAddedImagesInfo : Invalid Native Object"); @@ -265,8 +253,7 @@ static bool js_ar_ARModule_getAddedImagesInfo(se::State& s) } SE_BIND_FUNC(js_ar_ARModule_getAddedImagesInfo) -static bool js_ar_ARModule_getUpdatedImagesInfo(se::State& s) -{ +static bool js_ar_ARModule_getUpdatedImagesInfo(se::State& s) { cc::ar::ARModule* cobj = (cc::ar::ARModule*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_ar_ARModule_getUpdatedImagesInfo : Invalid Native Object"); @@ -285,8 +272,7 @@ static bool js_ar_ARModule_getUpdatedImagesInfo(se::State& s) } SE_BIND_FUNC(js_ar_ARModule_getUpdatedImagesInfo) -static bool js_ar_ARModule_getRemovedImagesInfo(se::State& s) -{ +static bool js_ar_ARModule_getRemovedImagesInfo(se::State& s) { cc::ar::ARModule* cobj = (cc::ar::ARModule*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_ar_ARModule_getRemovedImagesInfo : Invalid Native Object"); @@ -305,8 +291,7 @@ static bool js_ar_ARModule_getRemovedImagesInfo(se::State& s) } SE_BIND_FUNC(js_ar_ARModule_getRemovedImagesInfo) -static bool js_ar_ARModule_getAddedObjectsInfo(se::State& s) -{ +static bool js_ar_ARModule_getAddedObjectsInfo(se::State& s) { cc::ar::ARModule* cobj = (cc::ar::ARModule*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_ar_ARModule_getAddedObjectsInfo : Invalid Native Object"); @@ -325,8 +310,7 @@ static bool js_ar_ARModule_getAddedObjectsInfo(se::State& s) } SE_BIND_FUNC(js_ar_ARModule_getAddedObjectsInfo) -static bool js_ar_ARModule_getUpdatedObjectsInfo(se::State& s) -{ +static bool js_ar_ARModule_getUpdatedObjectsInfo(se::State& s) { cc::ar::ARModule* cobj = (cc::ar::ARModule*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_ar_ARModule_getUpdatedObjectsInfo : Invalid Native Object"); @@ -345,8 +329,7 @@ static bool js_ar_ARModule_getUpdatedObjectsInfo(se::State& s) } SE_BIND_FUNC(js_ar_ARModule_getUpdatedObjectsInfo) -static bool js_ar_ARModule_getRemovedObjectsInfo(se::State& s) -{ +static bool js_ar_ARModule_getRemovedObjectsInfo(se::State& s) { cc::ar::ARModule* cobj = (cc::ar::ARModule*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_ar_ARModule_getRemovedObjectsInfo : Invalid Native Object"); @@ -365,8 +348,7 @@ static bool js_ar_ARModule_getRemovedObjectsInfo(se::State& s) } SE_BIND_FUNC(js_ar_ARModule_getRemovedObjectsInfo) -static bool js_ar_ARModule_getAddedFacesInfo(se::State& s) -{ +static bool js_ar_ARModule_getAddedFacesInfo(se::State& s) { auto* cobj = static_cast(s.nativeThisObject()); SE_PRECONDITION2(cobj, false, "js_ar_ARModule_getAddedFacesInfo : Invalid Native Object"); @@ -385,8 +367,7 @@ static bool js_ar_ARModule_getAddedFacesInfo(se::State& s) } SE_BIND_FUNC(js_ar_ARModule_getAddedFacesInfo) -static bool js_ar_ARModule_getUpdatedFacesInfo(se::State& s) -{ +static bool js_ar_ARModule_getUpdatedFacesInfo(se::State& s) { cc::ar::ARModule* cobj = (cc::ar::ARModule*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_ar_ARModule_getUpdatedFacesInfo : Invalid Native Object"); @@ -405,8 +386,7 @@ static bool js_ar_ARModule_getUpdatedFacesInfo(se::State& s) } SE_BIND_FUNC(js_ar_ARModule_getUpdatedFacesInfo) -static bool js_ar_ARModule_getRemovedFacesInfo(se::State& s) -{ +static bool js_ar_ARModule_getRemovedFacesInfo(se::State& s) { cc::ar::ARModule* cobj = (cc::ar::ARModule*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_ar_ARModule_getRemovedFacesInfo : Invalid Native Object"); @@ -425,8 +405,7 @@ static bool js_ar_ARModule_getRemovedFacesInfo(se::State& s) } SE_BIND_FUNC(js_ar_ARModule_getRemovedFacesInfo) -static bool js_ar_ARModule_getFaceBlendShapes(se::State& s) -{ +static bool js_ar_ARModule_getFaceBlendShapes(se::State& s) { cc::ar::ARModule* cobj = (cc::ar::ARModule*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_ar_ARModule_getFaceBlendShapes : Invalid Native Object"); @@ -450,7 +429,7 @@ static bool js_ar_ARModule_getFaceBlendShapes(se::State& s) } SE_BIND_FUNC(js_ar_ARModule_getFaceBlendShapes) -bool register_all_ar_manual(se::Object *obj) { +bool register_all_ar_manual(se::Object* obj) { __jsb_cc_ar_ARModule_proto->defineFunction("getAddedPlanesInfo", _SE(js_ar_ARModule_getAddedPlanesInfo)); __jsb_cc_ar_ARModule_proto->defineFunction("getUpdatedPlanesInfo", _SE(js_ar_ARModule_getUpdatedPlanesInfo)); __jsb_cc_ar_ARModule_proto->defineFunction("getRemovedPlanesInfo", _SE(js_ar_ARModule_getRemovedPlanesInfo)); diff --git a/native/cocos/bindings/manual/jsb_ar_manual.h b/native/cocos/bindings/manual/jsb_ar_manual.h index 53fefed44b..cf8e0350a9 100644 --- a/native/cocos/bindings/manual/jsb_ar_manual.h +++ b/native/cocos/bindings/manual/jsb_ar_manual.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/manual/jsb_assets_manual.cpp b/native/cocos/bindings/manual/jsb_assets_manual.cpp index 8f5bf9d229..41db6397a6 100644 --- a/native/cocos/bindings/manual/jsb_assets_manual.cpp +++ b/native/cocos/bindings/manual/jsb_assets_manual.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #include "bindings/auto/jsb_assets_auto.h" #include "core/assets/Material.h" @@ -57,7 +56,7 @@ static bool js_assets_ImageAsset_setData(se::State &s) // NOLINT(readability-ide data = dataHolder->getData(); } } else { - CC_ABORT(); + CC_ABORTF("setData with '%s'", args[0].toStringForce().c_str()); } cobj->setData(data); return true; @@ -112,7 +111,7 @@ static bool js_assets_Material_registerPassesUpdatedListener(se::State &s) // NO auto *cobj = SE_THIS_OBJECT(s); SE_PRECONDITION2(cobj, false, "Invalid Native Object"); auto *thisObj = s.thisObject(); - cobj->on([thisObj](cc::Material * /*emitter*/ ){ + cobj->on([thisObj](cc::Material * /*emitter*/) { se::AutoHandleScope hs; se::ScriptEngine::getInstance()->callFunction(thisObj, "_onPassesUpdated", 0, nullptr); }); diff --git a/native/cocos/bindings/manual/jsb_assets_manual.h b/native/cocos/bindings/manual/jsb_assets_manual.h index 9780396556..d4ced57a8b 100644 --- a/native/cocos/bindings/manual/jsb_assets_manual.h +++ b/native/cocos/bindings/manual/jsb_assets_manual.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once diff --git a/native/cocos/bindings/manual/jsb_audio_manual.cpp b/native/cocos/bindings/manual/jsb_audio_manual.cpp index 0d7701e52c..59145b430f 100644 --- a/native/cocos/bindings/manual/jsb_audio_manual.cpp +++ b/native/cocos/bindings/manual/jsb_audio_manual.cpp @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #include "jsb_audio_manual.h" #include #include "State.h" diff --git a/native/cocos/bindings/manual/jsb_audio_manual.h b/native/cocos/bindings/manual/jsb_audio_manual.h index eaa7abae23..d8738772f2 100644 --- a/native/cocos/bindings/manual/jsb_audio_manual.h +++ b/native/cocos/bindings/manual/jsb_audio_manual.h @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + // clang-format off #pragma once diff --git a/native/cocos/bindings/manual/jsb_classtype.cpp b/native/cocos/bindings/manual/jsb_classtype.cpp index 2517dbe8d9..00fcf263aa 100644 --- a/native/cocos/bindings/manual/jsb_classtype.cpp +++ b/native/cocos/bindings/manual/jsb_classtype.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/manual/jsb_classtype.h b/native/cocos/bindings/manual/jsb_classtype.h index 388fc4dbd7..81c576203e 100644 --- a/native/cocos/bindings/manual/jsb_classtype.h +++ b/native/cocos/bindings/manual/jsb_classtype.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/manual/jsb_cocos_manual.cpp b/native/cocos/bindings/manual/jsb_cocos_manual.cpp index b8c3f3dde6..30ba3d6608 100644 --- a/native/cocos/bindings/manual/jsb_cocos_manual.cpp +++ b/native/cocos/bindings/manual/jsb_cocos_manual.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -752,7 +751,7 @@ static bool register_platform(se::Object * /*obj*/) { // NOLINT(readability-iden } template -static bool bindAsExternalBuffer(se::State &s) { // NOLINT +static bool bindAsExternalBuffer(se::State &s) { // NOLINT auto *self = SE_THIS_OBJECT(s); if (!self) { return false; @@ -793,7 +792,6 @@ static bool js_cc_Quaternion_underlyingData(se::State &s) { // NOLINT } SE_BIND_FUNC(js_cc_Quaternion_underlyingData) - bool register_all_cocos_manual(se::Object *obj) { // NOLINT(readability-identifier-naming) __jsb_cc_Vec2_proto->defineFunction("underlyingData", _SE(js_cc_Vec2_underlyingData)); diff --git a/native/cocos/bindings/manual/jsb_cocos_manual.h b/native/cocos/bindings/manual/jsb_cocos_manual.h index 938d515b0a..bfb4fb07e0 100644 --- a/native/cocos/bindings/manual/jsb_cocos_manual.h +++ b/native/cocos/bindings/manual/jsb_cocos_manual.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/manual/jsb_conversions.h b/native/cocos/bindings/manual/jsb_conversions.h index 1a990249d9..85afa4163e 100644 --- a/native/cocos/bindings/manual/jsb_conversions.h +++ b/native/cocos/bindings/manual/jsb_conversions.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -629,18 +628,22 @@ bool sevalue_to_native(const se::Value &from, ccstd::array *to, se } template -bool sevalue_to_native(const se::Value &from, ccstd::variant> *to, se::Object *ctx) { // NOLINT - se::Object *array = from.toObject(); - if (array->isArray()) { +bool sevalue_to_native(const se::Value &from, ccstd::variant> *to, se::Object *ctx) { // NOLINT + bool ok = false; + if (from.isObject() && from.toObject()->isArray()) { ccstd::vector result; - sevalue_to_native(from, &result, ctx); - *to = std::move(result); + ok = sevalue_to_native(from, &result, ctx); + if (ok) { + *to = std::move(result); + } } else { - T result; - sevalue_to_native(from, &result, ctx); - *to = result; + T result{}; + ok = sevalue_to_native(from, &result, ctx); + if (ok) { + *to = std::move(result); + } } - return true; + return ok; } ////////////////// TypedArray diff --git a/native/cocos/bindings/manual/jsb_conversions_deprecated.h b/native/cocos/bindings/manual/jsb_conversions_deprecated.h index 7c4d5cb69f..1cfb8d0e22 100644 --- a/native/cocos/bindings/manual/jsb_conversions_deprecated.h +++ b/native/cocos/bindings/manual/jsb_conversions_deprecated.h @@ -1,15 +1,16 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE diff --git a/native/cocos/bindings/manual/jsb_conversions_spec.cpp b/native/cocos/bindings/manual/jsb_conversions_spec.cpp index efb1be9a93..d8b1f78dec 100644 --- a/native/cocos/bindings/manual/jsb_conversions_spec.cpp +++ b/native/cocos/bindings/manual/jsb_conversions_spec.cpp @@ -1,15 +1,16 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -20,8 +21,9 @@ ****************************************************************************/ #include +#include "base/DeferredReleasePool.h" +#include "base/TemplateUtils.h" #include "base/Value.h" -#include "cocos/base/DeferredReleasePool.h" #include "cocos/base/RefMap.h" #include "cocos/base/RefVector.h" #include "cocos/core/TypedArray.h" @@ -56,29 +58,6 @@ return true; \ } -template -struct overloaded; - -template -struct overloaded : F0, overloaded { - overloaded(F0 f0, Fs... rest) : F0(f0), overloaded(rest...) {} // NOLINT(google-explicit-constructor) - - using F0::operator(); - using overloaded::operator(); -}; - -template -struct overloaded : F0 { - overloaded(F0 f0) : F0(f0) {} // NOLINT(google-explicit-constructor) - - using F0::operator(); -}; - -template -auto make_overloaded(Fs... fs) { // NOLINT(readability-identifier-naming) - return overloaded(fs...); -} - template typename std::enable_if::value, bool>::type set_member_field(se::Object *obj, T *to, const ccstd::string &property, F f, se::Value &tmp) { // NOLINT @@ -714,18 +693,20 @@ bool sevalue_to_native(const se::Value &from, cc::scene::SkyboxInfo *to, se::Obj return true; } -// ccstd::variant; // NOLINTNEXTLINE(readability-identifier-naming) bool sevalue_to_native(const se::Value &from, cc::MacroValue *to, se::Object * /*ctx*/) { + bool ret = true; if (from.isBoolean()) { *to = from.toBoolean(); } else if (from.isNumber()) { *to = from.toInt32(); // NOTE: We only support macro with int32_t type now. } else if (from.isString()) { *to = from.toString(); + } else { + ret = false; } - return true; + return ret; } // NOLINTNEXTLINE(readability-identifier-naming) @@ -930,27 +911,23 @@ bool sevalue_to_native(const se::Value &from, cc::IPropertyEditorValueType *to, ccstd::string str; ret = sevalue_to_native(from, &str, ctx); *to = std::move(str); - } - break; + } break; case se::Value::Type::Boolean: { bool v{false}; ret = sevalue_to_native(from, &v, ctx); *to = v; - } - break; + } break; case se::Value::Type::Number: { float v{0.F}; ret = sevalue_to_native(from, &v, ctx); *to = v; - } - break; + } break; case se::Value::Type::Object: { CC_ASSERT_TRUE(from.toObject()->isArray()); ccstd::vector v; ret = sevalue_to_native(from, &v, ctx); *to = std::move(v); - } - break; + } break; default: *to = {}; break; @@ -960,7 +937,7 @@ bool sevalue_to_native(const se::Value &from, cc::IPropertyEditorValueType *to, } // NOLINTNEXTLINE(readability-identifier-naming) -bool sevalue_to_native(const se::Value &from, ccstd::variant, ccstd::string> *to, se::Object * /*ctx*/) { +bool sevalue_to_native(const se::Value &from, cc::IPropertyValue *to, se::Object * /*ctx*/) { if (from.isObject() && from.toObject()->isArray()) { uint32_t len = 0; bool ok = from.toObject()->getArrayLength(&len); @@ -984,26 +961,6 @@ bool sevalue_to_native(const se::Value &from, ccstd::variant *to, se::Object *ctx) { - bool ok = false; - if (from.isObject() && from.toObject()->isArray()) { - cc::MaterialPropertyList propertyList{}; - ok = sevalue_to_native(from, &propertyList, ctx); - if (ok) { - *to = std::move(propertyList); - } - } else { - cc::MaterialProperty property; - ok = sevalue_to_native(from, &property, ctx); - if (ok) { - *to = std::move(property); - } - } - - return true; -} - // NOLINTNEXTLINE(readability-identifier-naming) bool sevalue_to_native(const se::Value &from, cc::ArrayBuffer *to, se::Object * /*ctx*/) { CC_ASSERT(from.isObject()); @@ -1134,20 +1091,22 @@ bool sevalue_to_native(const se::Value &from, cc::TypedArray *to, se::Object * / } } - ccstd::visit(make_overloaded( + ccstd::visit(cc::overloaded{ [&](auto &typedArray) { typedArray.setJSTypedArray(from.toObject()); }, - [](ccstd::monostate /*unused*/) {}), + [](ccstd::monostate & /*unused*/) {}}, *to); return true; } // NOLINTNEXTLINE(readability-identifier-naming) bool sevalue_to_native(const se::Value &from, cc::IBArray *to, se::Object * /*ctx*/) { - ccstd::visit([&](auto &typedArray) { - typedArray.setJSTypedArray(from.toObject()); - }, + ccstd::visit(cc::overloaded{ + [&](auto &typedArray) { + typedArray.setJSTypedArray(from.toObject()); + }, + [](ccstd::monostate & /*unused*/) {}}, *to); return true; diff --git a/native/cocos/bindings/manual/jsb_conversions_spec.h b/native/cocos/bindings/manual/jsb_conversions_spec.h index c49c390974..f288f86248 100644 --- a/native/cocos/bindings/manual/jsb_conversions_spec.h +++ b/native/cocos/bindings/manual/jsb_conversions_spec.h @@ -1,15 +1,16 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -162,7 +163,7 @@ bool sevalue_to_native(const se::Value &from, cc::IPreCompileInfoValueType *to, bool sevalue_to_native(const se::Value &from, cc::IPropertyEditorValueType *to, se::Object * /*ctx*/); // NOLINT(readability-identifier-naming) // ccstd::any -bool sevalue_to_native(const se::Value &from, ccstd::any *to, se::Object *ctx); //NOLINT(readability-identifier-naming) +bool sevalue_to_native(const se::Value &from, ccstd::any *to, se::Object *ctx); // NOLINT(readability-identifier-naming) ////////////////// ArrayBuffer bool sevalue_to_native(const se::Value &from, cc::ArrayBuffer *to, se::Object * /*ctx*/); // NOLINT(readability-identifier-naming) bool sevalue_to_native(const se::Value &from, cc::ArrayBuffer **to, se::Object * /*ctx*/); // NOLINT(readability-identifier-naming) @@ -172,12 +173,21 @@ bool sevalue_to_native(const se::Value &from, ccstd::vector *to bool sevalue_to_native(const se::Value &from, cc::MaterialProperty *to, se::Object * /*ctx*/); // NOLINT(readability-identifier-naming) inline bool sevalue_to_native(const se::Value &from, ccstd::string *to, se::Object * /*ctx*/) { // NOLINT(readability-identifier-naming) - if (!from.isNullOrUndefined()) { + if (from.isString()) { *to = from.toString(); - } else { - to->clear(); + return true; } - return true; + if (from.isNumber()) { + *to = from.toStringForce(); + return true; + } + if (from.isNullOrUndefined()) { + to->clear(); + return true; + } + CC_ABORTF("parmater '%s' is not a string nor number", from.toStringForce().c_str()); + to->clear(); + return false; } inline bool seval_to_std_string(const se::Value &from, ccstd::string *ret) { // NOLINT(readability-identifier-naming) @@ -260,10 +270,10 @@ inline bool sevalue_to_native(const se::Value &from, double *to, se::Object * /* return true; } -//inline bool sevalue_to_native(const se::Value & /*from*/, void * /*to*/, se::Object * /*ctx*/) { // NOLINT(readability-identifier-naming) -// CC_ABORT(); // void not supported -// return false; -//} +// inline bool sevalue_to_native(const se::Value & /*from*/, void * /*to*/, se::Object * /*ctx*/) { // NOLINT(readability-identifier-naming) +// CC_ABORT(); // void not supported +// return false; +// } bool sevalue_to_native(const se::Value &from, cc::Data *to, se::Object * /*ctx*/); // NOLINT(readability-identifier-naming) @@ -332,11 +342,11 @@ bool sevalue_to_native(const se::Value &from, cc::TypedArray *to, se::Object * / bool sevalue_to_native(const se::Value &from, cc::IBArray *to, se::Object * /*ctx*/); // NOLINT(readability-identifier-naming) -//bool sevalue_to_native(const se::Value &from, cc::gfx::Context **to, se::Object*) {// NOLINT(readability-identifier-naming) -// CC_ASSERT(from.isObject()); -// *to = (cc::gfx::Context*)from.toObject()->getPrivateData(); -// return true; -//} +// bool sevalue_to_native(const se::Value &from, cc::gfx::Context **to, se::Object*) {// NOLINT(readability-identifier-naming) +// CC_ASSERT(from.isObject()); +// *to = (cc::gfx::Context*)from.toObject()->getPrivateData(); +// return true; +// } inline bool sevalue_to_native(const se::Value &from, void **to, se::Object * /*ctx*/) { // NOLINT(readability-identifier-naming) CC_ASSERT_NOT_NULL(to); @@ -364,13 +374,12 @@ bool sevalue_to_native(const se::Value &from, cc::ValueMap *to, se::Object * /*c bool sevalue_to_native(const se::Value &from, ccstd::vector *to, se::Object * /*ctx*/); // NOLINT(readability-identifier-naming) -bool sevalue_to_native(const se::Value &from, ccstd::vector *to, se::Object * /*ctx*/); // NOLINT(readability-identifier-naming) -bool sevalue_to_native(const se::Value &from, ccstd::variant, ccstd::string> *to, se::Object *ctx); // NOLINT(readability-identifier-naming) -inline bool sevalue_to_native(const se::Value & /*from*/, ccstd::monostate * /*to*/, se::Object * /*ctx*/) { // NOLINT(readability-identifier-naming) +bool sevalue_to_native(const se::Value &from, ccstd::vector *to, se::Object * /*ctx*/); // NOLINT(readability-identifier-naming) +bool sevalue_to_native(const se::Value &from, cc::IPropertyValue *to, se::Object *ctx); // NOLINT(readability-identifier-naming) +inline bool sevalue_to_native(const se::Value & /*from*/, ccstd::monostate * /*to*/, se::Object * /*ctx*/) { // NOLINT(readability-identifier-naming) // nothing todo return false; } -bool sevalue_to_native(const se::Value &from, ccstd::variant *to, se::Object *ctx); // NOLINT(readability-identifier-naming) //////////////////////// scene info bool sevalue_to_native(const se::Value &from, cc::scene::FogInfo *, se::Object * /*ctx*/); // NOLINT(readability-identifier-naming) @@ -424,7 +433,7 @@ bool Size_to_seval(const cc::Size &v, se::Value *ret); // NOLINT(readability-ide CC_DEPRECATED(3.6, "use native_to_se instead") bool Rect_to_seval(const cc::Rect &v, se::Value *ret); // NOLINT(readability-identifier-naming) -//bool nativevalue_to_se(const cc::TypedArray &typedArray, se::Value &to, se::Object * /*ctx*/); // NOLINT(readability-identifier-naming) // NOLINT +// bool nativevalue_to_se(const cc::TypedArray &typedArray, se::Value &to, se::Object * /*ctx*/); // NOLINT(readability-identifier-naming) // NOLINT /** * WARN: call nativevalue_to_se instead and it converts cc::Data to ArrayBuffer @@ -555,7 +564,7 @@ bool nativevalue_to_se(const cc::Rect &from, se::Value &to, se::Object *ctx); // bool nativevalue_to_se(const cc::gfx::Rect &from, se::Value &to, se::Object *ctx); // NOLINT(readability-identifier-naming) bool nativevalue_to_se(const cc::gfx::FormatInfo *from, se::Value &to, se::Object *ctx); // NOLINT(readability-identifier-naming - + bool nativevalue_to_se(const cc::network::DownloadTask &from, se::Value &to, se::Object * /*ctx*/); // NOLINT(readability-identifier-naming) inline bool nativevalue_to_se(const ccstd::monostate & /*from*/, se::Value &to, se::Object * /*ctx*/) { // NOLINT(readability-identifier-naming) @@ -563,7 +572,7 @@ inline bool nativevalue_to_se(const ccstd::monostate & /*from*/, se::Value &to, return true; } -inline bool nativevalue_to_se(const ccstd::any &from, se::Value &to, se::Object *ctx) { //NOLINT +inline bool nativevalue_to_se(const ccstd::any &from, se::Value &to, se::Object *ctx) { // NOLINT CC_ABORT(); SE_LOGE("should not convert ccstd::any"); return true; @@ -605,7 +614,7 @@ inline bool nativevalue_to_se(se::Object *from, se::Value &to, se::Object * /*ct #if CC_USE_MIDDLEWARE bool seval_to_Map_string_key(const se::Value &v, cc::RefMap *ret); // NOLINT(readability-identifier-naming) -#endif //CC_USE_MIDDLEWARE +#endif // CC_USE_MIDDLEWARE #if CC_USE_PHYSICS_PHYSX @@ -619,4 +628,4 @@ bool sevalue_to_native(const se::Value &from, cc::physics::TrimeshDesc *to, se:: bool sevalue_to_native(const se::Value &from, cc::physics::HeightFieldDesc *to, se::Object *ctx); bool sevalue_to_native(const se::Value &from, cc::physics::RaycastOptions *to, se::Object *ctx); -#endif //USE_PHYSICS_PHYSX +#endif // USE_PHYSICS_PHYSX diff --git a/native/cocos/bindings/manual/jsb_dragonbones_manual.cpp b/native/cocos/bindings/manual/jsb_dragonbones_manual.cpp index 1a47aa4daa..94da7a7c4c 100644 --- a/native/cocos/bindings/manual/jsb_dragonbones_manual.cpp +++ b/native/cocos/bindings/manual/jsb_dragonbones_manual.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -434,7 +433,7 @@ bool register_all_dragonbones_manual(se::Object *obj) { if (!se::NativePtrToObjectMap::isValid()) { return; } - se::NativePtrToObjectMap::forEach(obj, [](se::Object *seObj){ + se::NativePtrToObjectMap::forEach(obj, [](se::Object *seObj) { seObj->setClearMappingInFinalizer(false); // Unmap native and js object since native object was destroyed. // Otherwise, it may trigger 'assertion' in se::Object::setPrivateData later diff --git a/native/cocos/bindings/manual/jsb_dragonbones_manual.h b/native/cocos/bindings/manual/jsb_dragonbones_manual.h index d6178eb503..cfcd9941f2 100644 --- a/native/cocos/bindings/manual/jsb_dragonbones_manual.h +++ b/native/cocos/bindings/manual/jsb_dragonbones_manual.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/manual/jsb_geometry_manual.cpp b/native/cocos/bindings/manual/jsb_geometry_manual.cpp index bf935fb5b4..51174b05dd 100644 --- a/native/cocos/bindings/manual/jsb_geometry_manual.cpp +++ b/native/cocos/bindings/manual/jsb_geometry_manual.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/manual/jsb_geometry_manual.h b/native/cocos/bindings/manual/jsb_geometry_manual.h index 149d9368e0..85a3515de2 100644 --- a/native/cocos/bindings/manual/jsb_geometry_manual.h +++ b/native/cocos/bindings/manual/jsb_geometry_manual.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/manual/jsb_gfx_manual.cpp b/native/cocos/bindings/manual/jsb_gfx_manual.cpp index 80fbc18baf..460f77133d 100644 --- a/native/cocos/bindings/manual/jsb_gfx_manual.cpp +++ b/native/cocos/bindings/manual/jsb_gfx_manual.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/manual/jsb_gfx_manual.h b/native/cocos/bindings/manual/jsb_gfx_manual.h index f382768953..8e0818918c 100644 --- a/native/cocos/bindings/manual/jsb_gfx_manual.h +++ b/native/cocos/bindings/manual/jsb_gfx_manual.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/manual/jsb_global.cpp b/native/cocos/bindings/manual/jsb_global.cpp index 6608b1f1b6..e92d0b4f08 100644 --- a/native/cocos/bindings/manual/jsb_global.cpp +++ b/native/cocos/bindings/manual/jsb_global.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -600,7 +599,7 @@ bool jsb_global_load_image(const ccstd::string &path, const se::Value &callbackV retObj->setProperty("data", se::Value(obj)); retObj->setProperty("width", se::Value(imgInfo->width)); retObj->setProperty("height", se::Value(imgInfo->height)); - + se::Value mipmapLevelDataSizeArr; nativevalue_to_se(imgInfo->mipmapLevelDataSize, mipmapLevelDataSizeArr, nullptr); retObj->setProperty("mipmapLevelDataSize", mipmapLevelDataSizeArr); @@ -1379,7 +1378,11 @@ SE_BIND_PROP_GET(JSB_process_get_argv) bool jsb_register_global_variables(se::Object *global) { // NOLINT gThreadPool = LegacyThreadPool::newFixedThreadPool(3); +#if CC_EDITOR + global->defineFunction("__require", _SE(require)); +#else global->defineFunction("require", _SE(require)); +#endif global->defineFunction("requireModule", _SE(moduleRequire)); getOrCreatePlainObject_r("jsb", global, &__jsbObj); diff --git a/native/cocos/bindings/manual/jsb_global.h b/native/cocos/bindings/manual/jsb_global.h index 5931f06e19..64248a0c73 100644 --- a/native/cocos/bindings/manual/jsb_global.h +++ b/native/cocos/bindings/manual/jsb_global.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/manual/jsb_global_init.cpp b/native/cocos/bindings/manual/jsb_global_init.cpp index d8eed8af99..231f46270b 100644 --- a/native/cocos/bindings/manual/jsb_global_init.cpp +++ b/native/cocos/bindings/manual/jsb_global_init.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/manual/jsb_global_init.h b/native/cocos/bindings/manual/jsb_global_init.h index 9aa74044af..a6fcff2e33 100644 --- a/native/cocos/bindings/manual/jsb_global_init.h +++ b/native/cocos/bindings/manual/jsb_global_init.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/manual/jsb_helper.cpp b/native/cocos/bindings/manual/jsb_helper.cpp index c35efb2fd9..7221dd15c0 100644 --- a/native/cocos/bindings/manual/jsb_helper.cpp +++ b/native/cocos/bindings/manual/jsb_helper.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/manual/jsb_helper.h b/native/cocos/bindings/manual/jsb_helper.h index 0f0e5334bf..2a24f1f309 100644 --- a/native/cocos/bindings/manual/jsb_helper.h +++ b/native/cocos/bindings/manual/jsb_helper.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/manual/jsb_module_register.cpp b/native/cocos/bindings/manual/jsb_module_register.cpp index 2afc4eee09..4d5fcb5512 100644 --- a/native/cocos/bindings/manual/jsb_module_register.cpp +++ b/native/cocos/bindings/manual/jsb_module_register.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -40,8 +39,8 @@ #include "cocos/bindings/jswrapper/SeApi.h" #include "cocos/bindings/manual/jsb_assets_manual.h" #include "cocos/bindings/manual/jsb_cocos_manual.h" -#include "cocos/bindings/manual/jsb_geometry_manual.h" #include "cocos/bindings/manual/jsb_conversions.h" +#include "cocos/bindings/manual/jsb_geometry_manual.h" #include "cocos/bindings/manual/jsb_gfx_manual.h" #include "cocos/bindings/manual/jsb_global.h" #include "cocos/bindings/manual/jsb_network_manual.h" diff --git a/native/cocos/bindings/manual/jsb_module_register.h b/native/cocos/bindings/manual/jsb_module_register.h index 5b7be33b77..9766c3fcfe 100644 --- a/native/cocos/bindings/manual/jsb_module_register.h +++ b/native/cocos/bindings/manual/jsb_module_register.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/manual/jsb_network_manual.cpp b/native/cocos/bindings/manual/jsb_network_manual.cpp index d5b5704c6c..33607991a8 100644 --- a/native/cocos/bindings/manual/jsb_network_manual.cpp +++ b/native/cocos/bindings/manual/jsb_network_manual.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/manual/jsb_network_manual.h b/native/cocos/bindings/manual/jsb_network_manual.h index e859f064d6..1afcdda010 100644 --- a/native/cocos/bindings/manual/jsb_network_manual.h +++ b/native/cocos/bindings/manual/jsb_network_manual.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/manual/jsb_pipeline_manual.cpp b/native/cocos/bindings/manual/jsb_pipeline_manual.cpp index f154a09894..21aa770d8c 100644 --- a/native/cocos/bindings/manual/jsb_pipeline_manual.cpp +++ b/native/cocos/bindings/manual/jsb_pipeline_manual.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/manual/jsb_pipeline_manual.h b/native/cocos/bindings/manual/jsb_pipeline_manual.h index 08a247524d..cd6061c058 100644 --- a/native/cocos/bindings/manual/jsb_pipeline_manual.h +++ b/native/cocos/bindings/manual/jsb_pipeline_manual.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/manual/jsb_platform.h b/native/cocos/bindings/manual/jsb_platform.h index 4181a9ae03..189b1218a6 100644 --- a/native/cocos/bindings/manual/jsb_platform.h +++ b/native/cocos/bindings/manual/jsb_platform.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/manual/jsb_platform_android.cpp b/native/cocos/bindings/manual/jsb_platform_android.cpp index 6ab5968c0e..ff92ab8106 100644 --- a/native/cocos/bindings/manual/jsb_platform_android.cpp +++ b/native/cocos/bindings/manual/jsb_platform_android.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/manual/jsb_platform_linux.cpp b/native/cocos/bindings/manual/jsb_platform_linux.cpp index bdeb0063ed..9558af90d5 100644 --- a/native/cocos/bindings/manual/jsb_platform_linux.cpp +++ b/native/cocos/bindings/manual/jsb_platform_linux.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/manual/jsb_platform_ohos.cpp b/native/cocos/bindings/manual/jsb_platform_ohos.cpp index 18a888fb8c..6f7c6fede8 100644 --- a/native/cocos/bindings/manual/jsb_platform_ohos.cpp +++ b/native/cocos/bindings/manual/jsb_platform_ohos.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/manual/jsb_platform_win32.cpp b/native/cocos/bindings/manual/jsb_platform_win32.cpp index 176f2d656c..851ffe6eaf 100644 --- a/native/cocos/bindings/manual/jsb_platform_win32.cpp +++ b/native/cocos/bindings/manual/jsb_platform_win32.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/manual/jsb_scene_manual.cpp b/native/cocos/bindings/manual/jsb_scene_manual.cpp index 5302f169d7..d01f04d57a 100644 --- a/native/cocos/bindings/manual/jsb_scene_manual.cpp +++ b/native/cocos/bindings/manual/jsb_scene_manual.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -24,8 +23,8 @@ ****************************************************************************/ #include "jsb_scene_manual.h" -#include "bindings/auto/jsb_scene_auto.h" #include "bindings/auto/jsb_gfx_auto.h" +#include "bindings/auto/jsb_scene_auto.h" #include "core/Root.h" #include "core/scene-graph/Node.h" #include "scene/Model.h" @@ -123,6 +122,7 @@ static bool js_root_registerListeners(se::State &s) // NOLINT(readability-identi DISPATCH_EVENT_TO_JS_ARGS_0(cc::Root::BeforeCommit, _onDirectorBeforeCommit); DISPATCH_EVENT_TO_JS_ARGS_0(cc::Root::BeforeRender, _onDirectorBeforeRender); DISPATCH_EVENT_TO_JS_ARGS_0(cc::Root::AfterRender, _onDirectorAfterRender); + DISPATCH_EVENT_TO_JS_ARGS_0(cc::Root::PipelineChanged, _onDirectorPipelineChanged); return true; } @@ -138,16 +138,6 @@ static void registerOnTransformChanged(cc::Node *node, se::Object *jsObject) { }); } -static void registerOnAncestorTransformChanged(cc::Node *node, se::Object *jsObject) { - node->on( - [jsObject](cc::Node * /* emitter*/, cc::TransformBit transformBit) { - se::AutoHandleScope hs; - se::Value arg0; - nativevalue_to_se(transformBit, arg0); - se::ScriptEngine::getInstance()->callFunction(jsObject, "_onAncestorTransformChanged", 1, &arg0); - }); -} - static void registerOnParentChanged(cc::Node *node, se::Object *jsObject) { node->on( [jsObject](cc::Node * /*emitter*/, cc::Node *oldParent) { @@ -344,18 +334,6 @@ static bool js_scene_Node_registerOnTransformChanged(se::State &s) // NOLINT(rea } SE_BIND_FUNC(js_scene_Node_registerOnTransformChanged) // NOLINT(readability-identifier-naming) -static bool js_scene_Node_registerOnAncestorTransformChanged(se::State &s) // NOLINT(readability-identifier-naming) -{ - auto *cobj = SE_THIS_OBJECT(s); - SE_PRECONDITION2(cobj, false, "Invalid Native Object"); - - auto *jsObject = s.thisObject(); - - registerOnAncestorTransformChanged(cobj, jsObject); - return true; -} -SE_BIND_FUNC(js_scene_Node_registerOnAncestorTransformChanged) // NOLINT(readability-identifier-naming) - static bool js_scene_Node_registerOnParentChanged(se::State &s) // NOLINT(readability-identifier-naming) { auto *cobj = SE_THIS_OBJECT(s); @@ -705,7 +683,7 @@ static bool js_Model_setInstancedAttribute(se::State &s) // NOLINT(readability-i default: // FIXME: - CC_ABORT(); + CC_ABORT(); break; } return true; @@ -750,7 +728,7 @@ static bool js_Model_registerListeners(se::State &s) // NOLINT(readability-ident se::ScriptEngine::getInstance()->callFunction(thiz, "_updateLocalDescriptors", static_cast(args.size()), args.data()); }); - cobj->on([=](cc::scene::Model * /*emitter*/,index_t subModelIndex, cc::gfx::DescriptorSet *descriptorSet) { + cobj->on([=](cc::scene::Model * /*emitter*/, index_t subModelIndex, cc::gfx::DescriptorSet *descriptorSet) { cobj->setCalledFromJS(true); se::AutoHandleScope hs; @@ -760,7 +738,7 @@ static bool js_Model_registerListeners(se::State &s) // NOLINT(readability-ident se::ScriptEngine::getInstance()->callFunction(thiz, "_updateLocalSHDescriptors", static_cast(args.size()), args.data()); }); - cobj->on([=](cc::scene::Model * /*emitter*/,index_t subModelIndex, cc::gfx::DescriptorSet *descriptorSet) { + cobj->on([=](cc::scene::Model * /*emitter*/, index_t subModelIndex, cc::gfx::DescriptorSet *descriptorSet) { cobj->setCalledFromJS(true); se::AutoHandleScope hs; @@ -770,7 +748,7 @@ static bool js_Model_registerListeners(se::State &s) // NOLINT(readability-ident se::ScriptEngine::getInstance()->callFunction(thiz, "_updateWorldBoundDescriptors", static_cast(args.size()), args.data()); }); - cobj->on([=](cc::scene::Model * /*emitter*/,const ccstd::vector &attributes, cc::scene::SubModel *subModel) { + cobj->on([=](cc::scene::Model * /*emitter*/, const ccstd::vector &attributes, cc::scene::SubModel *subModel) { cobj->setCalledFromJS(true); se::AutoHandleScope hs; @@ -844,7 +822,6 @@ bool register_all_scene_manual(se::Object *obj) // NOLINT(readability-identifier __jsb_cc_Node_proto->defineFunction("_registerListeners", _SE(js_scene_Node_registerListeners)); __jsb_cc_Node_proto->defineFunction("_registerOnTransformChanged", _SE(js_scene_Node_registerOnTransformChanged)); - __jsb_cc_Node_proto->defineFunction("_registerOnAncestorTransformChanged", _SE(js_scene_Node_registerOnAncestorTransformChanged)); __jsb_cc_Node_proto->defineFunction("_registerOnParentChanged", _SE(js_scene_Node_registerOnParentChanged)); __jsb_cc_Node_proto->defineFunction("_registerOnMobilityChanged", _SE(js_scene_Node_registerOnMobilityChanged)); __jsb_cc_Node_proto->defineFunction("_registerOnLayerChanged", _SE(js_scene_Node_registerOnLayerChanged)); diff --git a/native/cocos/bindings/manual/jsb_scene_manual.h b/native/cocos/bindings/manual/jsb_scene_manual.h index 7e92175a03..cabc7f17a9 100644 --- a/native/cocos/bindings/manual/jsb_scene_manual.h +++ b/native/cocos/bindings/manual/jsb_scene_manual.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/manual/jsb_socketio.cpp b/native/cocos/bindings/manual/jsb_socketio.cpp index 04b307e2bf..2b18a66362 100644 --- a/native/cocos/bindings/manual/jsb_socketio.cpp +++ b/native/cocos/bindings/manual/jsb_socketio.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -88,7 +87,7 @@ public: return; } - if(!se::NativePtrToObjectMap::contains(client)) {// IDEA: client probably be a new value with the same address as the old one, it may cause undefined result. + if (!se::NativePtrToObjectMap::contains(client)) { // IDEA: client probably be a new value with the same address as the old one, it may cause undefined result. return; } @@ -320,8 +319,15 @@ static bool SocketIO_close(se::State &s) { // NOLINT(readability-identifier-nami } SE_BIND_FUNC(SocketIO_close) // NOLINT(readability-identifier-naming) -bool register_all_socketio(se::Object *obj) { - se::Class *cls = se::Class::create("SocketIO", obj, nullptr, nullptr); +bool register_all_socketio(se::Object *global) { + se::Value nsVal; + if (!global->getProperty("jsb", &nsVal, true)) { + se::HandleObject jsobj(se::Object::createPlainObject()); + nsVal.setObject(jsobj); + global->setProperty("jsb", nsVal); + } + se::Object *ns = nsVal.toObject(); + se::Class *cls = se::Class::create("SocketIO", ns, nullptr, nullptr); cls->defineFinalizeFunction(_SE(SocketIO_finalize)); cls->defineProperty("tag", _SE(SocketIO_prop_getTag), _SE(SocketIO_prop_setTag)); @@ -336,7 +342,7 @@ bool register_all_socketio(se::Object *obj) { JSBClassType::registerClass(cls); se::Value ctorVal; - obj->getProperty("SocketIO", &ctorVal); + ns->getProperty("SocketIO", &ctorVal); ctorVal.toObject()->defineFunction("connect", _SE(SocketIO_connect)); ctorVal.toObject()->defineFunction("close", _SE(SocketIO_close)); diff --git a/native/cocos/bindings/manual/jsb_socketio.h b/native/cocos/bindings/manual/jsb_socketio.h index 687608684b..bcad0a9364 100644 --- a/native/cocos/bindings/manual/jsb_socketio.h +++ b/native/cocos/bindings/manual/jsb_socketio.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/manual/jsb_spine_manual.cpp b/native/cocos/bindings/manual/jsb_spine_manual.cpp index 4b8010881a..5eef226692 100644 --- a/native/cocos/bindings/manual/jsb_spine_manual.cpp +++ b/native/cocos/bindings/manual/jsb_spine_manual.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -234,7 +233,7 @@ bool register_all_spine_manual(se::Object *obj) { return; } // Support Native Spine fo Creator V3.0 - se::NativePtrToObjectMap::forEach(spineObj, [](se::Object *seObj){ + se::NativePtrToObjectMap::forEach(spineObj, [](se::Object *seObj) { // Unmap native and js object since native object was destroyed. // Otherwise, it may trigger 'assertion' in se::Object::setPrivateData later // since native obj is already released and the new native object may be assigned with diff --git a/native/cocos/bindings/manual/jsb_spine_manual.h b/native/cocos/bindings/manual/jsb_spine_manual.h index c0d322fa78..a13bf53dd5 100644 --- a/native/cocos/bindings/manual/jsb_spine_manual.h +++ b/native/cocos/bindings/manual/jsb_spine_manual.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/manual/jsb_websocket.cpp b/native/cocos/bindings/manual/jsb_websocket.cpp index 611783d1d1..b20a0c0eaf 100644 --- a/native/cocos/bindings/manual/jsb_websocket.cpp +++ b/native/cocos/bindings/manual/jsb_websocket.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -511,8 +510,15 @@ WEBSOCKET_DEFINE_READONLY_INT_FIELD(Websocket_OPEN, static_cast(cc::network WEBSOCKET_DEFINE_READONLY_INT_FIELD(Websocket_CLOSING, static_cast(cc::network::WebSocket::State::CLOSING)) WEBSOCKET_DEFINE_READONLY_INT_FIELD(Websocket_CLOSED, static_cast(cc::network::WebSocket::State::CLOSED)) -bool register_all_websocket(se::Object *obj) { // NOLINT (readability-identifier-naming) - se::Class *cls = se::Class::create("WebSocket", obj, nullptr, _SE(webSocketConstructor)); +bool register_all_websocket(se::Object *global) { // NOLINT (readability-identifier-naming) + se::Value nsVal; + if (!global->getProperty("jsb", &nsVal, true)) { + se::HandleObject jsobj(se::Object::createPlainObject()); + nsVal.setObject(jsobj); + global->setProperty("jsb", nsVal); + } + se::Object *ns = nsVal.toObject(); + se::Class *cls = se::Class::create("WebSocket", ns, nullptr, _SE(webSocketConstructor)); cls->defineFinalizeFunction(_SE(webSocketFinalize)); cls->defineFunction("send", _SE(webSocketSend)); @@ -528,7 +534,7 @@ bool register_all_websocket(se::Object *obj) { // NOLINT (readability-identifier cls->install(); se::Value tmp; - obj->getProperty("WebSocket", &tmp); + ns->getProperty("WebSocket", &tmp); tmp.toObject()->defineProperty("CONNECTING", _SE(Websocket_CONNECTING), nullptr); tmp.toObject()->defineProperty("CLOSING", _SE(Websocket_CLOSING), nullptr); tmp.toObject()->defineProperty("OPEN", _SE(Websocket_OPEN), nullptr); diff --git a/native/cocos/bindings/manual/jsb_websocket.h b/native/cocos/bindings/manual/jsb_websocket.h index 6804fb9e99..ae02dd26f4 100644 --- a/native/cocos/bindings/manual/jsb_websocket.h +++ b/native/cocos/bindings/manual/jsb_websocket.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/manual/jsb_websocket_server.cpp b/native/cocos/bindings/manual/jsb_websocket_server.cpp index 79f2f32b80..90692bdad9 100644 --- a/native/cocos/bindings/manual/jsb_websocket_server.cpp +++ b/native/cocos/bindings/manual/jsb_websocket_server.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/manual/jsb_websocket_server.h b/native/cocos/bindings/manual/jsb_websocket_server.h index 33fc4f8b44..a286011968 100644 --- a/native/cocos/bindings/manual/jsb_websocket_server.h +++ b/native/cocos/bindings/manual/jsb_websocket_server.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/manual/jsb_xmlhttprequest.cpp b/native/cocos/bindings/manual/jsb_xmlhttprequest.cpp index 45dcd6da79..dd37ca74f4 100644 --- a/native/cocos/bindings/manual/jsb_xmlhttprequest.cpp +++ b/native/cocos/bindings/manual/jsb_xmlhttprequest.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -959,7 +958,14 @@ static bool XMLHttpRequest_getWithCredentials(se::State & /*s*/) { //NOLINT(read SE_BIND_PROP_GET(XMLHttpRequest_getWithCredentials) bool register_all_xmlhttprequest(se::Object *global) { //NOLINT(readability-identifier-naming) - se::Class *cls = se::Class::create("XMLHttpRequest", global, nullptr, _SE(XMLHttpRequest_constructor)); + se::Value nsVal; + if (!global->getProperty("jsb", &nsVal, true)) { + se::HandleObject jsobj(se::Object::createPlainObject()); + nsVal.setObject(jsobj); + global->setProperty("jsb", nsVal); + } + se::Object *ns = nsVal.toObject(); + se::Class *cls = se::Class::create("XMLHttpRequest", ns, nullptr, _SE(XMLHttpRequest_constructor)); cls->defineFinalizeFunction(_SE(XMLHttpRequest_finalize)); cls->defineFunction("open", _SE(XMLHttpRequest_open)); diff --git a/native/cocos/bindings/manual/jsb_xmlhttprequest.h b/native/cocos/bindings/manual/jsb_xmlhttprequest.h index 97aea39b81..d9d7518c93 100644 --- a/native/cocos/bindings/manual/jsb_xmlhttprequest.h +++ b/native/cocos/bindings/manual/jsb_xmlhttprequest.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/sebind/class_v8.cpp b/native/cocos/bindings/sebind/class_v8.cpp index ad79f3827e..34f04c4f75 100644 --- a/native/cocos/bindings/sebind/class_v8.cpp +++ b/native/cocos/bindings/sebind/class_v8.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/sebind/class_v8.h b/native/cocos/bindings/sebind/class_v8.h index c658839bd0..b759dfec2a 100644 --- a/native/cocos/bindings/sebind/class_v8.h +++ b/native/cocos/bindings/sebind/class_v8.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/sebind/intl/common.cpp b/native/cocos/bindings/sebind/intl/common.cpp index dd79c9dd24..0d700ea596 100644 --- a/native/cocos/bindings/sebind/intl/common.cpp +++ b/native/cocos/bindings/sebind/intl/common.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/sebind/intl/common.h b/native/cocos/bindings/sebind/intl/common.h index 719bad4a73..82e48acae6 100644 --- a/native/cocos/bindings/sebind/intl/common.h +++ b/native/cocos/bindings/sebind/intl/common.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/sebind/sebind.h b/native/cocos/bindings/sebind/sebind.h index 1700e61c36..c6aaf00752 100644 --- a/native/cocos/bindings/sebind/sebind.h +++ b/native/cocos/bindings/sebind/sebind.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/utils/BindingUtils.cpp b/native/cocos/bindings/utils/BindingUtils.cpp index 477f6c6a34..28fa19e0c5 100644 --- a/native/cocos/bindings/utils/BindingUtils.cpp +++ b/native/cocos/bindings/utils/BindingUtils.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/bindings/utils/BindingUtils.h b/native/cocos/bindings/utils/BindingUtils.h index c9a836a154..5b8e9378bd 100644 --- a/native/cocos/bindings/utils/BindingUtils.h +++ b/native/cocos/bindings/utils/BindingUtils.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/cocos-version.h b/native/cocos/cocos-version.h index fc61b209be..91a8e87d68 100644 --- a/native/cocos/cocos-version.h +++ b/native/cocos/cocos-version.h @@ -1,26 +1,25 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. +Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. - http://www.cocos.com +http://www.cocos.com - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. ****************************************************************************/ #pragma once diff --git a/native/cocos/cocos.h b/native/cocos/cocos.h index 597dce455d..395f990120 100644 --- a/native/cocos/cocos.h +++ b/native/cocos/cocos.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -27,7 +26,6 @@ // public headers for user application -#include "cocos-version.h" #include "application/ApplicationManager.h" #include "application/BaseGame.h" #include "bindings/event/EventDispatcher.h" @@ -35,4 +33,5 @@ #include "bindings/manual/jsb_classtype.h" #include "bindings/manual/jsb_global.h" #include "bindings/manual/jsb_module_register.h" +#include "cocos-version.h" #include "core/event/Event.h" \ No newline at end of file diff --git a/native/cocos/core/Any.h b/native/cocos/core/Any.h index 4b0afa2842..93635a9664 100644 --- a/native/cocos/core/Any.h +++ b/native/cocos/core/Any.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/ArrayBuffer.h b/native/cocos/core/ArrayBuffer.h index db97a0efac..ffe8a2380b 100644 --- a/native/cocos/core/ArrayBuffer.h +++ b/native/cocos/core/ArrayBuffer.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/DataView.cpp b/native/cocos/core/DataView.cpp index 13185daf48..6a6057f5c8 100644 --- a/native/cocos/core/DataView.cpp +++ b/native/cocos/core/DataView.cpp @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,9 +20,10 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #include "core/DataView.h" +#include "base/TemplateUtils.h" namespace cc { @@ -49,9 +49,11 @@ ccstd::unordered_map DataView::intWritterMa }; int32_t DataView::readInt(ReaderVariant &readerVariant, uint32_t offset) { - return ccstd::visit([offset, this](auto &reader) { - return static_cast((this->*reader)(offset)); - }, + return ccstd::visit(overloaded{ + [offset, this](auto &reader) { + return static_cast((this->*reader)(offset)); + }, + [](ccstd::monostate & /*unused*/) { return 0; }}, readerVariant); } diff --git a/native/cocos/core/DataView.h b/native/cocos/core/DataView.h index e32c68b726..1b3414bcc6 100644 --- a/native/cocos/core/DataView.h +++ b/native/cocos/core/DataView.h @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once @@ -72,7 +71,7 @@ public: using UInt16Reader = uint16_t (DataView::*)(uint32_t) const; using Int8Reader = int8_t (DataView::*)(uint32_t) const; using UInt8Reader = uint8_t (DataView::*)(uint32_t) const; - using ReaderVariant = ccstd::variant; + using ReaderVariant = ccstd::variant; static ccstd::unordered_map intReaderMap; int32_t readInt(ReaderVariant &readerVariant, uint32_t offset); diff --git a/native/cocos/core/Root.cpp b/native/cocos/core/Root.cpp index 7d2b6a775f..9edc74cb48 100644 --- a/native/cocos/core/Root.cpp +++ b/native/cocos/core/Root.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #include "core/Root.h" #include "2d/renderer/Batcher2d.h" @@ -34,6 +33,7 @@ #if CC_USE_DEBUG_RENDERER #include "profiler/DebugRenderer.h" #endif +#include "engine/EngineEvents.h" #include "profiler/Profiler.h" #include "renderer/gfx-base/GFXDevice.h" #include "renderer/gfx-base/GFXSwapchain.h" @@ -47,7 +47,6 @@ #include "scene/Camera.h" #include "scene/DirectionalLight.h" #include "scene/SpotLight.h" -#include "engine/EngineEvents.h" namespace cc { @@ -111,7 +110,7 @@ scene::RenderWindow *Root::createRenderWindowFromSystemWindow(ISystemWindow *win gfx::SwapchainInfo info; info.width = static_cast(size.width); info.height = static_cast(size.height); - info.windowHandle = reinterpret_cast(handle); + info.windowHandle = reinterpret_cast(handle); // NOLINT info.windowId = window->getWindowId(); gfx::Swapchain *swapchain = gfx::Device::getInstance()->createSwapchain(info); @@ -166,7 +165,7 @@ void Root::destroy() { // this.dataPoolManager.clear(); } -void Root::resize(uint32_t width, uint32_t height, uint32_t windowId) { +void Root::resize(uint32_t width, uint32_t height, uint32_t windowId) { // NOLINT for (const auto &window : _renderWindows) { auto *swapchain = window->getSwapchain(); if (swapchain && (swapchain->getWindowId() == windowId)) { @@ -332,6 +331,10 @@ bool Root::setRenderPipeline(pipeline::RenderPipeline *rppl /* = nullptr*/) { // scene->getSceneGlobals()->activate(); // } +#if CC_EDITOR + emit(); +#endif + onGlobalPipelineStateChanged(); if (_batcher == nullptr) { @@ -430,7 +433,7 @@ void Root::frameMoveEnd() { } } -void Root::frameMove(float deltaTime, int32_t totalFrames) { +void Root::frameMove(float deltaTime, int32_t totalFrames) { // NOLINT CCObject::deferredDestroy(); _frameTime = deltaTime; @@ -565,9 +568,9 @@ void Root::doXRFrameMove(int32_t totalFrames) { } frameMoveBegin(); - //condition1: mainwindow has left camera && right camera, - //but we only need left/right camera when in left/right eye loop - //condition2: main camera draw twice + // condition1: mainwindow has left camera && right camera, + // but we only need left/right camera when in left/right eye loop + // condition2: main camera draw twice for (const auto &window : _renderWindows) { if (window->getSwapchain()) { // not rt diff --git a/native/cocos/core/Root.h b/native/cocos/core/Root.h index 61e0a983ce..306f2a40ad 100644 --- a/native/cocos/core/Root.h +++ b/native/cocos/core/Root.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once #include @@ -70,6 +69,7 @@ class Root final { TARGET_EVENT_ARG0(BeforeCommit) TARGET_EVENT_ARG0(BeforeRender) TARGET_EVENT_ARG0(AfterRender) + TARGET_EVENT_ARG0(PipelineChanged) DECLARE_TARGET_EVENT_END() public: static Root *getInstance(); // cjh todo: put Root Managerment to Director class. diff --git a/native/cocos/core/System.h b/native/cocos/core/System.h index 95ec1ac21e..ce56fd76ce 100644 --- a/native/cocos/core/System.h +++ b/native/cocos/core/System.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/TypedArray.cpp b/native/cocos/core/TypedArray.cpp index 3ddc8605a4..4cf764919a 100644 --- a/native/cocos/core/TypedArray.cpp +++ b/native/cocos/core/TypedArray.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #include "core/TypedArray.h" diff --git a/native/cocos/core/TypedArray.h b/native/cocos/core/TypedArray.h index 434eb78bdb..a6593d7c9b 100644 --- a/native/cocos/core/TypedArray.h +++ b/native/cocos/core/TypedArray.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once diff --git a/native/cocos/core/Types.cpp b/native/cocos/core/Types.cpp index 1c19e79558..57ffcd6591 100644 --- a/native/cocos/core/Types.cpp +++ b/native/cocos/core/Types.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/Types.h b/native/cocos/core/Types.h index 2cf7f4c716..8d2b05f56a 100644 --- a/native/cocos/core/Types.h +++ b/native/cocos/core/Types.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/animation/SkeletalAnimationUtils.cpp b/native/cocos/core/animation/SkeletalAnimationUtils.cpp index 5325ed3b36..e0206e24e5 100644 --- a/native/cocos/core/animation/SkeletalAnimationUtils.cpp +++ b/native/cocos/core/animation/SkeletalAnimationUtils.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/animation/SkeletalAnimationUtils.h b/native/cocos/core/animation/SkeletalAnimationUtils.h index 8c0f1db6d4..439b760a2b 100644 --- a/native/cocos/core/animation/SkeletalAnimationUtils.h +++ b/native/cocos/core/animation/SkeletalAnimationUtils.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/assets/Asset.cpp b/native/cocos/core/assets/Asset.cpp index ec0ca25cc5..07bdfc784f 100644 --- a/native/cocos/core/assets/Asset.cpp +++ b/native/cocos/core/assets/Asset.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -101,4 +100,10 @@ bool Asset::destroy() { return Super::destroy(); } +void Asset::destruct() { + CCObject::destruct(); + _native.clear(); + _nativeUrl.clear(); +} + } // namespace cc diff --git a/native/cocos/core/assets/Asset.h b/native/cocos/core/assets/Asset.h index e8d123546f..df6c9aa910 100644 --- a/native/cocos/core/assets/Asset.h +++ b/native/cocos/core/assets/Asset.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -109,6 +108,8 @@ public: bool destroy() override; + void destruct() override; + // SERIALIZATION /** diff --git a/native/cocos/core/assets/AssetEnum.cpp b/native/cocos/core/assets/AssetEnum.cpp index a6e370d3e9..f975602e41 100644 --- a/native/cocos/core/assets/AssetEnum.cpp +++ b/native/cocos/core/assets/AssetEnum.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/assets/AssetEnum.h b/native/cocos/core/assets/AssetEnum.h index f9939f4d04..300daa0c25 100644 --- a/native/cocos/core/assets/AssetEnum.h +++ b/native/cocos/core/assets/AssetEnum.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/assets/AssetsModuleHeader.h b/native/cocos/core/assets/AssetsModuleHeader.h index e64a89466f..9ec4c3e091 100644 --- a/native/cocos/core/assets/AssetsModuleHeader.h +++ b/native/cocos/core/assets/AssetsModuleHeader.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/assets/BitmapFont.cpp b/native/cocos/core/assets/BitmapFont.cpp index 4c7af37cd1..b161968a8a 100644 --- a/native/cocos/core/assets/BitmapFont.cpp +++ b/native/cocos/core/assets/BitmapFont.cpp @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #include "BitmapFont.h" #include "base/Log.h" diff --git a/native/cocos/core/assets/BitmapFont.h b/native/cocos/core/assets/BitmapFont.h index fa58e8d255..bbe32c2723 100644 --- a/native/cocos/core/assets/BitmapFont.h +++ b/native/cocos/core/assets/BitmapFont.h @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once #include "Font.h" diff --git a/native/cocos/core/assets/BufferAsset.cpp b/native/cocos/core/assets/BufferAsset.cpp index de3c6c4165..86eefe15dc 100644 --- a/native/cocos/core/assets/BufferAsset.cpp +++ b/native/cocos/core/assets/BufferAsset.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/assets/BufferAsset.h b/native/cocos/core/assets/BufferAsset.h index 433a4da525..4bd4fdef2e 100644 --- a/native/cocos/core/assets/BufferAsset.h +++ b/native/cocos/core/assets/BufferAsset.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/assets/EffectAsset.cpp b/native/cocos/core/assets/EffectAsset.cpp index beae92f495..4d5070360d 100644 --- a/native/cocos/core/assets/EffectAsset.cpp +++ b/native/cocos/core/assets/EffectAsset.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/assets/EffectAsset.h b/native/cocos/core/assets/EffectAsset.h index 361ba4e303..cb535a94f2 100644 --- a/native/cocos/core/assets/EffectAsset.h +++ b/native/cocos/core/assets/EffectAsset.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -38,12 +37,11 @@ #include "renderer/gfx-base/GFXDef.h" #include "renderer/pipeline/Define.h" - namespace cc { using IPropertyHandleInfo = std::tuple; -using IPropertyValue = ccstd::optional, ccstd::string>>; +using IPropertyValue = ccstd::variant, ccstd::string>; using IPropertyEditorValueType = ccstd::variant>; using IPropertyEditorInfo = ccstd::unordered_map; @@ -52,9 +50,9 @@ struct IPropertyInfo { int32_t type{0}; // auto-extracted from shader ccstd::optional handleInfo; // auto-generated from 'target' ccstd::optional samplerHash; // auto-generated from 'sampler' - IPropertyValue value; // default value + ccstd::optional value; // default value ccstd::optional linear; // whether to convert the input to linear space first before applying - IPropertyEditorInfo editor; // NOTE: used only by editor. + IPropertyEditorInfo editor; // NOTE: used only by editor. }; struct IPassInfoFull; @@ -365,6 +363,7 @@ struct IPassInfoFull final { // cjh } : public IPassInfo { ccstd::optional blendState; ccstd::optional dynamicStates; ccstd::optional phase; + ccstd::optional pass; // IPassInfo ccstd::string program; // auto-generated from 'vert' and 'frag' ccstd::optional embeddedMacros; @@ -479,7 +478,7 @@ struct IDefineInfo { ccstd::optional> range; // cjh number is float? ?: number[]; ccstd::optional> options; ccstd::optional defaultVal; - ccstd::optional> defines; // NOTE: it's only used in Editor + ccstd::optional> defines; // NOTE: it's only used in Editor ccstd::optional> editor; // NOTE: it's only used in Editor }; @@ -535,7 +534,7 @@ struct IShaderInfo { ccstd::vector buffers; ccstd::vector images; ccstd::vector subpassInputs; - // ccstd::vector descriptors; + ccstd::vector descriptors; const IShaderSource *getSource(const ccstd::string &version) const { if (version == "glsl1") return &glsl1; @@ -545,7 +544,7 @@ struct IShaderInfo { } }; -using IPreCompileInfoValueType = ccstd::variant, ccstd::vector, ccstd::vector>; +using IPreCompileInfoValueType = ccstd::variant, ccstd::vector, ccstd::vector>; using IPreCompileInfo = ccstd::unordered_map; class EffectAsset final : public Asset { diff --git a/native/cocos/core/assets/Font.cpp b/native/cocos/core/assets/Font.cpp index 9873c2d261..4e7c46ded7 100644 --- a/native/cocos/core/assets/Font.cpp +++ b/native/cocos/core/assets/Font.cpp @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #include "Font.h" #include diff --git a/native/cocos/core/assets/Font.h b/native/cocos/core/assets/Font.h index c170c78c88..c9c6762c95 100644 --- a/native/cocos/core/assets/Font.h +++ b/native/cocos/core/assets/Font.h @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once #include "base/std/container/unordered_map.h" diff --git a/native/cocos/core/assets/FreeTypeFont.cpp b/native/cocos/core/assets/FreeTypeFont.cpp index 01f262c9ab..dafeaa5aa8 100644 --- a/native/cocos/core/assets/FreeTypeFont.cpp +++ b/native/cocos/core/assets/FreeTypeFont.cpp @@ -1,5 +1,5 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. Portions of this software are copyright ? <2022> The FreeType Project (www.freetype.org). All rights reserved. @@ -7,15 +7,14 @@ http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/assets/FreeTypeFont.h b/native/cocos/core/assets/FreeTypeFont.h index c847376a7f..fb6c4ba374 100644 --- a/native/cocos/core/assets/FreeTypeFont.h +++ b/native/cocos/core/assets/FreeTypeFont.h @@ -1,5 +1,5 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. Portions of this software are copyright ? <2022> The FreeType Project (www.freetype.org). All rights reserved. @@ -7,15 +7,14 @@ http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/assets/ImageAsset.cpp b/native/cocos/core/assets/ImageAsset.cpp index 9d8d062aa7..d436672c9d 100644 --- a/native/cocos/core/assets/ImageAsset.cpp +++ b/native/cocos/core/assets/ImageAsset.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/assets/ImageAsset.h b/native/cocos/core/assets/ImageAsset.h index cc68d1575f..7026dac26b 100644 --- a/native/cocos/core/assets/ImageAsset.h +++ b/native/cocos/core/assets/ImageAsset.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -121,7 +120,7 @@ private: uint32_t _width{0}; uint32_t _height{0}; - bool _needFreeData{false}; // Should free data if the data is assigned in C++. + bool _needFreeData{false}; // Should free data if the data is assigned in C++. ArrayBuffer::Ptr _arrayBuffer; //minggo: hold the data from ImageSource. diff --git a/native/cocos/core/assets/Material.cpp b/native/cocos/core/assets/Material.cpp index b6024ee794..d757081585 100644 --- a/native/cocos/core/assets/Material.cpp +++ b/native/cocos/core/assets/Material.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/assets/Material.h b/native/cocos/core/assets/Material.h index f18ee8e675..d32f1e03a9 100644 --- a/native/cocos/core/assets/Material.h +++ b/native/cocos/core/assets/Material.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -67,7 +66,7 @@ struct IMaterialInfo { */ ccstd::optional technique; - using DefinesType = ccstd::variant>; + using DefinesType = ccstd::variant>; /** * @en * The shader macro definitions. Default to 0 or the specified value in [[EffectAsset]]. @@ -76,7 +75,7 @@ struct IMaterialInfo { */ ccstd::optional defines; - using PassOverridesType = ccstd::variant>; + using PassOverridesType = ccstd::variant>; /** * @en * The override values on top of the pipeline states specified in [[EffectAsset]]. diff --git a/native/cocos/core/assets/RenderTexture.cpp b/native/cocos/core/assets/RenderTexture.cpp index 1f62648678..ef61ffa3b2 100644 --- a/native/cocos/core/assets/RenderTexture.cpp +++ b/native/cocos/core/assets/RenderTexture.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/assets/RenderTexture.h b/native/cocos/core/assets/RenderTexture.h index d9afc37f5b..743f064301 100644 --- a/native/cocos/core/assets/RenderTexture.h +++ b/native/cocos/core/assets/RenderTexture.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/assets/RenderingSubMesh.cpp b/native/cocos/core/assets/RenderingSubMesh.cpp index 1742fccba6..e031c50ca8 100644 --- a/native/cocos/core/assets/RenderingSubMesh.cpp +++ b/native/cocos/core/assets/RenderingSubMesh.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -270,9 +269,11 @@ const gfx::BufferList &RenderingSubMesh::getJointMappedBuffers() { mapBuffer( dataView, [&](const DataVariant &cur, uint32_t /*idx*/, const DataView & /*view*/) -> DataVariant { - auto iter = std::find(idxMap.begin(), idxMap.end(), ccstd::get<0>(cur)); - if (iter != idxMap.end()) { - return static_cast(iter - idxMap.begin()); + if (ccstd::holds_alternative(cur)) { + auto iter = std::find(idxMap.begin(), idxMap.end(), ccstd::get(cur)); + if (iter != idxMap.end()) { + return static_cast(iter - idxMap.begin()); + } } CC_ABORT(); return -1; diff --git a/native/cocos/core/assets/RenderingSubMesh.h b/native/cocos/core/assets/RenderingSubMesh.h index 89ace9223b..ea8bfe0afa 100644 --- a/native/cocos/core/assets/RenderingSubMesh.h +++ b/native/cocos/core/assets/RenderingSubMesh.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/assets/SceneAsset.cpp b/native/cocos/core/assets/SceneAsset.cpp index fc1e32b673..dd3e54ebc1 100644 --- a/native/cocos/core/assets/SceneAsset.cpp +++ b/native/cocos/core/assets/SceneAsset.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -24,8 +23,8 @@ ****************************************************************************/ #include "core/assets/SceneAsset.h" -#include "core/scene-graph/Scene.h" #include "base/memory/Memory.h" +#include "core/scene-graph/Scene.h" namespace cc { diff --git a/native/cocos/core/assets/SceneAsset.h b/native/cocos/core/assets/SceneAsset.h index e7d5c52f6d..5814e68fec 100644 --- a/native/cocos/core/assets/SceneAsset.h +++ b/native/cocos/core/assets/SceneAsset.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/assets/SimpleTexture.cpp b/native/cocos/core/assets/SimpleTexture.cpp index 5b92e8cd6c..145aae3012 100644 --- a/native/cocos/core/assets/SimpleTexture.cpp +++ b/native/cocos/core/assets/SimpleTexture.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/assets/SimpleTexture.h b/native/cocos/core/assets/SimpleTexture.h index 7ed8452e26..facfaa5ffc 100644 --- a/native/cocos/core/assets/SimpleTexture.h +++ b/native/cocos/core/assets/SimpleTexture.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/assets/TextAsset.cpp b/native/cocos/core/assets/TextAsset.cpp index b0309363e9..211af47b03 100644 --- a/native/cocos/core/assets/TextAsset.cpp +++ b/native/cocos/core/assets/TextAsset.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/assets/TextAsset.h b/native/cocos/core/assets/TextAsset.h index 46b828f213..fbb596af73 100644 --- a/native/cocos/core/assets/TextAsset.h +++ b/native/cocos/core/assets/TextAsset.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/assets/Texture2D.cpp b/native/cocos/core/assets/Texture2D.cpp index d8e29194df..28b7c24d85 100644 --- a/native/cocos/core/assets/Texture2D.cpp +++ b/native/cocos/core/assets/Texture2D.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -67,7 +66,7 @@ void Texture2D::setMipmaps(const ccstd::vector> &value) } } -void Texture2D::setMipmapParams(const ccstd::vector>& value) { +void Texture2D::setMipmapParams(const ccstd::vector> &value) { _mipmaps = value; setMipmapLevel(static_cast(_mipmaps.size())); if (!_mipmaps.empty()) { diff --git a/native/cocos/core/assets/Texture2D.h b/native/cocos/core/assets/Texture2D.h index 4d343fdb7d..6d87bf7410 100644 --- a/native/cocos/core/assets/Texture2D.h +++ b/native/cocos/core/assets/Texture2D.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/assets/TextureBase.cpp b/native/cocos/core/assets/TextureBase.cpp index cbfc0ddf49..696e0bc16c 100644 --- a/native/cocos/core/assets/TextureBase.cpp +++ b/native/cocos/core/assets/TextureBase.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/assets/TextureBase.h b/native/cocos/core/assets/TextureBase.h index 1f88ce1b18..b0592f00ef 100644 --- a/native/cocos/core/assets/TextureBase.h +++ b/native/cocos/core/assets/TextureBase.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/assets/TextureCube.cpp b/native/cocos/core/assets/TextureCube.cpp index f7ffe2ce82..41e8028706 100644 --- a/native/cocos/core/assets/TextureCube.cpp +++ b/native/cocos/core/assets/TextureCube.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/assets/TextureCube.h b/native/cocos/core/assets/TextureCube.h index e0525962da..780b8a704d 100644 --- a/native/cocos/core/assets/TextureCube.h +++ b/native/cocos/core/assets/TextureCube.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/builtin/BuiltinResMgr.cpp b/native/cocos/core/builtin/BuiltinResMgr.cpp index 97a517be9b..12b188f8b9 100644 --- a/native/cocos/core/builtin/BuiltinResMgr.cpp +++ b/native/cocos/core/builtin/BuiltinResMgr.cpp @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #include "core/builtin/BuiltinResMgr.h" #include "core/assets/EffectAsset.h" #include "core/assets/ImageAsset.h" diff --git a/native/cocos/core/builtin/BuiltinResMgr.h b/native/cocos/core/builtin/BuiltinResMgr.h index 8420188a4c..1b0e841b8a 100644 --- a/native/cocos/core/builtin/BuiltinResMgr.h +++ b/native/cocos/core/builtin/BuiltinResMgr.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/builtin/DebugInfos.cpp b/native/cocos/core/builtin/DebugInfos.cpp index ca3bdaab8f..097b9a147b 100644 --- a/native/cocos/core/builtin/DebugInfos.cpp +++ b/native/cocos/core/builtin/DebugInfos.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/builtin/DebugInfos.cpp.in b/native/cocos/core/builtin/DebugInfos.cpp.in index 5143749c0a..a7a99ac15e 100644 --- a/native/cocos/core/builtin/DebugInfos.cpp.in +++ b/native/cocos/core/builtin/DebugInfos.cpp.in @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/builtin/DebugInfos.h b/native/cocos/core/builtin/DebugInfos.h index c4d7ebb090..3b59ab0624 100644 --- a/native/cocos/core/builtin/DebugInfos.h +++ b/native/cocos/core/builtin/DebugInfos.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/data/JSBNativeDataHolder.h b/native/cocos/core/data/JSBNativeDataHolder.h index 4e9975fe37..60af291a36 100644 --- a/native/cocos/core/data/JSBNativeDataHolder.h +++ b/native/cocos/core/data/JSBNativeDataHolder.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/data/Object.cpp b/native/cocos/core/data/Object.cpp index d4278aaddd..50f5734251 100644 --- a/native/cocos/core/data/Object.cpp +++ b/native/cocos/core/data/Object.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -59,6 +58,10 @@ CCObject::CCObject(ccstd::string name /* = ""*/) CCObject::~CCObject() = default; +void CCObject::destruct() { + _name.clear(); +} + bool CCObject::destroy() { //NOTE: _objFlags will be set to TO_DESTROY when destroy method in TS is triggered. // CCObject::destroy method will be invoked at the end. Refer to cocos/core/data/object.ts diff --git a/native/cocos/core/data/Object.h b/native/cocos/core/data/Object.h index 8c948f9696..9f2e1f3bf5 100644 --- a/native/cocos/core/data/Object.h +++ b/native/cocos/core/data/Object.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -177,6 +176,8 @@ public: */ inline bool isValid() const; + virtual void destruct(); + /** * @en * Destroy this Object, and release all its own references to other objects.
diff --git a/native/cocos/core/event/Event.h b/native/cocos/core/event/Event.h index b172f7cceb..3a7ed56f90 100644 --- a/native/cocos/core/event/Event.h +++ b/native/cocos/core/event/Event.h @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once #ifdef SWIGCOCOS #define IMPL_EVENT_TARGET_WITH_PARENT(...) diff --git a/native/cocos/core/event/EventBus.cpp b/native/cocos/core/event/EventBus.cpp index e0f9c5a406..979dc17640 100644 --- a/native/cocos/core/event/EventBus.cpp +++ b/native/cocos/core/event/EventBus.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #include "EventBus.h" #include #include "intl/List.h" diff --git a/native/cocos/core/event/EventBus.h b/native/cocos/core/event/EventBus.h index 32944a5f2f..359bac28f9 100644 --- a/native/cocos/core/event/EventBus.h +++ b/native/cocos/core/event/EventBus.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once #include @@ -29,8 +28,8 @@ #include #include -#include "base/std/container/vector.h" #include "base/Log.h" +#include "base/std/container/vector.h" #include "core/memop/Pool.h" #include "intl/EventIntl.h" #include "intl/List.h" diff --git a/native/cocos/core/event/EventTarget.h b/native/cocos/core/event/EventTarget.h index 2d8583755b..12dda075e8 100644 --- a/native/cocos/core/event/EventTarget.h +++ b/native/cocos/core/event/EventTarget.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once #include @@ -29,6 +28,7 @@ #include #include "base/Log.h" #include "base/Macros.h" +#include "base/memory/Memory.h" #include "intl/EventIntl.h" #include "intl/List.h" @@ -48,11 +48,14 @@ struct TgtEventInfo { EventPhaseType eventPhase{EventPhaseType::UNKNOWN}; bool bubbles{true}; bool cancelable{true}; + void stopPropagation() { propagationStopped = true; } + void preventDefault() { /* TODO: */ } + bool propagationStopped{false}; }; @@ -74,6 +77,7 @@ struct Event final : TgtEventInfo { auto get() const { return std::get(args); } + template auto get() { return std::get(args); @@ -83,6 +87,7 @@ struct Event final : TgtEventInfo { void set(A &&value) { std::get(args) = value; } + void initEvent(bool canBubbleArg, bool cancelableArg) { // TODO() } @@ -105,7 +110,9 @@ public: class TgtMemberFnCmp { public: virtual ~TgtMemberFnCmp() = default; + virtual void *getContext() = 0; + virtual bool equals(TgtMemberFnCmp *) const = 0; }; @@ -114,10 +121,12 @@ class TgtMemberHandleFn final : public TgtMemberFnCmp { public: ~TgtMemberHandleFn() override = default; void *getContext() override { return context; } + bool equals(TgtMemberFnCmp *other) const override { auto *fake = reinterpret_cast(other); return context == fake->context && func == fake->func; } + Fn func; void *context; }; @@ -129,12 +138,17 @@ public: PENDING_ONCE, ONCE_DONE, }; + virtual ~TargetEventListenerBase() = default; + virtual void *getContext() const = 0; + virtual const char *getEventName() const { return nullptr; } bool isEnabled() const { return _enabled; } + void setOnce() { _state = RunState::PENDING_ONCE; } + inline size_t getEventTypeID() const { return _eventTypeID; } int32_t id{-1}; @@ -154,6 +168,7 @@ public: using _emitter_type = typename TgtEvent::_emitter_type; using EventType = typename TgtEvent::EventType; using _persist_function_type = typename TgtEvent::_persist_function_type; + explicit TargetEventListener(_persist_function_type func) : _func(func) { _eventTypeID = TgtEvent::TYPE_ID; } @@ -204,13 +219,17 @@ class TargetEventID final { public: using HandleType = TgtEvent; using IdType = TargetEventIdType; + TargetEventID() = default; + TargetEventID(IdType eventId) : _eventId(eventId) {} // NOLINT TargetEventID(const TargetEventID &) = default; + TargetEventID(TargetEventID &&) noexcept = default; TargetEventID &operator=(const TargetEventID &) = default; + TargetEventID &operator=(TargetEventID &&) noexcept = default; IdType value() { return _eventId; } @@ -222,7 +241,9 @@ private: template struct TargetListenerContainer final { std::array data{nullptr}; + inline TargetEventListenerBase *&operator[](size_t index) { return data[index]; } + void clear() { for (size_t i = 0; i < N; i++) { auto &handlers = data[i]; @@ -232,6 +253,7 @@ struct TargetListenerContainer final { data[i] = nullptr; } } + ~TargetListenerContainer() { clear(); } @@ -299,15 +321,18 @@ public: TargetEventID once(Fn &&func, O *ctx) { return this->template addEventListener(std::forward(func), ctx, true); } + template TargetEventID on(Fn &&func, bool useCapture = false) { static_assert(std::is_base_of::value, "mismatch target type"); return this->template addEventListener(std::forward(func), useCapture, false); } + template TargetEventID on(Fn &&func, O *ctx, bool useCapture = false) { return this->template addEventListener(std::forward(func), ctx, useCapture, false); } + template bool off(TargetEventID eventId) { CC_ASSERT(!_emittingEvent[TgtEvent::TYPE_ID]); @@ -379,6 +404,7 @@ public: emitEvtObj(self, &eventObj); } + template void emitEvtObj(Self *self, EvtObj *eventObj) { using EventType = typename TgtEvent::EventType; @@ -418,6 +444,7 @@ public: } _emittingEvent[TgtEvent::TYPE_ID]--; } + template std::enable_if_t>, void> dispatchEvent(Self *self, EvtType &eventObj) { @@ -546,6 +573,29 @@ protected: TargetEventIdType _handlerId{1}; std::array _emittingEvent{0}; }; + +template +class HeapObject final { +public: + HeapObject() { + _data = ccnew T; + } + + ~HeapObject() { + delete _data; + } + + inline T &get() { + return *_data; + } + +private: + T *_data{nullptr}; +}; + +template +using EventTargetGuard = HeapObject>; + } // namespace event } // namespace cc @@ -585,40 +635,40 @@ protected: public: \ template \ cc::event::TargetEventID once(Fn &&func, bool useCapture) { \ - return _eventTargetImpl.once(std::forward(func), useCapture); \ + return _eventTargetImpl.get().once(std::forward(func), useCapture); \ } \ \ template \ cc::event::TargetEventID once(Fn &&func, O *ctx) { \ - return _eventTargetImpl.once(std::forward(func), ctx); \ + return _eventTargetImpl.get().once(std::forward(func), ctx); \ } \ template \ cc::event::TargetEventID on(Fn &&func, bool useCapture = false) { \ static_assert(std::is_base_of::value, "mismatch target type"); \ - return _eventTargetImpl.on(std::forward(func), useCapture); \ + return _eventTargetImpl.get().on(std::forward(func), useCapture); \ } \ template \ cc::event::TargetEventID on(Fn &&func, O *ctx, bool useCapture = false) { \ - return _eventTargetImpl.on(std::forward(func), ctx, useCapture); \ + return _eventTargetImpl.get().on(std::forward(func), ctx, useCapture); \ } \ template \ bool off(cc::event::TargetEventID eventId) { \ - return _eventTargetImpl.off(eventId); \ + return _eventTargetImpl.get().off(eventId); \ } \ void offAll() { \ - _eventTargetImpl.offAll(); \ + _eventTargetImpl.get().offAll(); \ } \ template \ void off() { \ - _eventTargetImpl.off(); \ + _eventTargetImpl.get().off(); \ } \ template \ void emit(ARGS &&...args) { \ - _eventTargetImpl.emit(this, std::forward(args)...); \ + _eventTargetImpl.get().emit(this, std::forward(args)...); \ } \ template \ void dispatchEvent(ARGS &&...args) { \ - _eventTargetImpl.dispatchEvent(this, std::forward(args)...); \ + _eventTargetImpl.get().dispatchEvent(this, std::forward(args)...); \ } #define IMPL_EVENT_TARGET(TargetClass) \ @@ -648,18 +698,18 @@ public: constexpr static int __counter_offset__ = 0; \ _DECLARE_TARGET_EVENT_BEGIN(TargetClass) -#define DECLARE_TARGET_EVENT_BEGIN_WITH_PARENTS(TargetClass, ...) \ - constexpr static int __counter_offset__ = cc::event::intl::TotalEvents<__VA_ARGS__>; \ +#define DECLARE_TARGET_EVENT_BEGIN_WITH_PARENTS(TargetClass, ...) \ + constexpr static int __counter_offset__ = cc::event::intl::TotalEvents<__VA_ARGS__>; \ _DECLARE_TARGET_EVENT_BEGIN(TargetClass) #define DECLARE_TARGET_EVENT_END() \ private: \ constexpr static int __counter_stop__ = __COUNTER__; \ constexpr static int __event_count__ = __counter_stop__ - __counter_start__ + __counter_offset__; \ - cc::event::EventTargetImpl _eventTargetImpl; \ + cc::event::EventTargetGuard _eventTargetImpl; \ \ public: \ constexpr static int getEventCount() { return __event_count__; } \ - auto &getEventTarget() { return _eventTargetImpl; } + auto &getEventTarget() { return _eventTargetImpl.get(); } #include "intl/EventTargetMacros.h" diff --git a/native/cocos/core/event/intl/EventIntl.h b/native/cocos/core/event/intl/EventIntl.h index 369b7b1b46..ee3fe45111 100644 --- a/native/cocos/core/event/intl/EventIntl.h +++ b/native/cocos/core/event/intl/EventIntl.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once #include diff --git a/native/cocos/core/event/intl/List.h b/native/cocos/core/event/intl/List.h index 3a6c081097..459b9e67cd 100644 --- a/native/cocos/core/event/intl/List.h +++ b/native/cocos/core/event/intl/List.h @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,8 +20,8 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ - #pragma once +****************************************************************************/ +#pragma once #include "base/Macros.h" namespace cc { @@ -57,7 +56,7 @@ bool detachFromList(ListNode **head, ListNode *node) { return false; } if (node->prev == node && node->next == node) { // the only node - CC_ASSERT(node == *head); // should be the first + CC_ASSERT(node == *head); // should be the first *head = nullptr; } else { auto *nextNode = node->next; diff --git a/native/cocos/core/geometry/AABB.cpp b/native/cocos/core/geometry/AABB.cpp index e7cbaddef7..898b051d0b 100644 --- a/native/cocos/core/geometry/AABB.cpp +++ b/native/cocos/core/geometry/AABB.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -173,8 +172,7 @@ void AABB::transformExtentM4(Vec3 *out, const Vec3 &extent, const Mat4 &m4) { out->transformMat3(extent, m3Tmp); } - -AABB::AABB(float px, float py, float pz, float hw, float hh, float hl):AABB() { +AABB::AABB(float px, float py, float pz, float hw, float hh, float hl) : AABB() { setCenter(px, py, pz); setHalfExtents(hw, hh, hl); } diff --git a/native/cocos/core/geometry/AABB.h b/native/cocos/core/geometry/AABB.h index 7c47745854..27908df681 100644 --- a/native/cocos/core/geometry/AABB.h +++ b/native/cocos/core/geometry/AABB.h @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once @@ -111,7 +110,7 @@ public: static void transformExtentM4(Vec3 *out, const Vec3 &extent, const Mat4 &m4); AABB(float px, float py, float pz, float hw, float hh, float hl); - AABB() : ShapeBase(ShapeEnum::SHAPE_AABB){} + AABB() : ShapeBase(ShapeEnum::SHAPE_AABB) {} ~AABB() override = default; /** diff --git a/native/cocos/core/geometry/Capsule.cpp b/native/cocos/core/geometry/Capsule.cpp index 6cf03c98b2..99117766f6 100644 --- a/native/cocos/core/geometry/Capsule.cpp +++ b/native/cocos/core/geometry/Capsule.cpp @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #include "cocos/core/geometry/Capsule.h" #include "cocos/math/Vec3.h" namespace cc { diff --git a/native/cocos/core/geometry/Capsule.h b/native/cocos/core/geometry/Capsule.h index 66e60522da..20ddbf3572 100644 --- a/native/cocos/core/geometry/Capsule.h +++ b/native/cocos/core/geometry/Capsule.h @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #pragma once #include "core/geometry/Enums.h" @@ -73,7 +97,7 @@ public: Vec3 ellipseCenter0; Vec3 ellipseCenter1; - explicit Capsule(float radius = 0.5, float halfHeight = 0.5, CenterEnum axis = CenterEnum::Y): ShapeBase(ShapeEnum::SHAPE_CAPSULE) { + explicit Capsule(float radius = 0.5, float halfHeight = 0.5, CenterEnum axis = CenterEnum::Y) : ShapeBase(ShapeEnum::SHAPE_CAPSULE) { this->radius = radius; this->halfHeight = halfHeight; this->axis = axis; diff --git a/native/cocos/core/geometry/Curve.cpp b/native/cocos/core/geometry/Curve.cpp index 6ccc308c77..5bf3c3034b 100644 --- a/native/cocos/core/geometry/Curve.cpp +++ b/native/cocos/core/geometry/Curve.cpp @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #include "cocos/core/geometry/Curve.h" namespace cc { namespace geometry { diff --git a/native/cocos/core/geometry/Curve.h b/native/cocos/core/geometry/Curve.h index 1790343ef7..15b7c04e42 100644 --- a/native/cocos/core/geometry/Curve.h +++ b/native/cocos/core/geometry/Curve.h @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #pragma once namespace cc { diff --git a/native/cocos/core/geometry/Distance.cpp b/native/cocos/core/geometry/Distance.cpp index ef8c95d7a8..041debc81a 100644 --- a/native/cocos/core/geometry/Distance.cpp +++ b/native/cocos/core/geometry/Distance.cpp @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #include "cocos/core/geometry/Distance.h" #include "cocos/core/geometry/AABB.h" diff --git a/native/cocos/core/geometry/Distance.h b/native/cocos/core/geometry/Distance.h index 13a43887a9..4ab1414d63 100644 --- a/native/cocos/core/geometry/Distance.h +++ b/native/cocos/core/geometry/Distance.h @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #pragma once namespace cc { diff --git a/native/cocos/core/geometry/Enums.h b/native/cocos/core/geometry/Enums.h index 069e208c72..e6a97c411d 100644 --- a/native/cocos/core/geometry/Enums.h +++ b/native/cocos/core/geometry/Enums.h @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #pragma once #include "base/Macros.h" @@ -23,7 +47,6 @@ enum class ShapeEnum { class ShapeBase : public RefCounted { public: - ShapeBase(ShapeEnum type) : _type(type) {} /** diff --git a/native/cocos/core/geometry/Frustum.cpp b/native/cocos/core/geometry/Frustum.cpp index bb29b3effe..c316084673 100644 --- a/native/cocos/core/geometry/Frustum.cpp +++ b/native/cocos/core/geometry/Frustum.cpp @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #include "core/geometry/Frustum.h" #include @@ -177,7 +176,7 @@ void Frustum::updatePlanes() { planes[5]->define(vertices[7], vertices[5], vertices[6]); } -Frustum::Frustum():ShapeBase(ShapeEnum::SHAPE_FRUSTUM) { +Frustum::Frustum() : ShapeBase(ShapeEnum::SHAPE_FRUSTUM) { init(); } diff --git a/native/cocos/core/geometry/Frustum.h b/native/cocos/core/geometry/Frustum.h index 0ea9b2ec9c..d6077d7765 100644 --- a/native/cocos/core/geometry/Frustum.h +++ b/native/cocos/core/geometry/Frustum.h @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once diff --git a/native/cocos/core/geometry/Geometry.h b/native/cocos/core/geometry/Geometry.h index da6f2a682a..5e4bd4987d 100644 --- a/native/cocos/core/geometry/Geometry.h +++ b/native/cocos/core/geometry/Geometry.h @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #pragma once #include "AABB.h" diff --git a/native/cocos/core/geometry/Intersect.cpp b/native/cocos/core/geometry/Intersect.cpp index b286acc0a8..e8f25a170e 100644 --- a/native/cocos/core/geometry/Intersect.cpp +++ b/native/cocos/core/geometry/Intersect.cpp @@ -1,8 +1,33 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #include "core/geometry/Intersect.h" #include #include #include "3d/assets/Mesh.h" +#include "base/TemplateUtils.h" #include "base/std/container/array.h" #include "core/TypedArray.h" #include "core/geometry/AABB.h" @@ -234,55 +259,64 @@ void fillResult(float *minDis, ERaycastMode m, float d, float i0, float i1, floa float narrowphase(float *minDis, const Float32Array &vb, const IBArray &ib, gfx::PrimitiveMode pm, const Ray &ray, IRaySubMeshOptions *opt) { Triangle tri; - auto ibSize = ccstd::visit([](auto &arr) { return arr.length(); }, ib); - return ccstd::visit([&](auto &ib) { - if (pm == gfx::PrimitiveMode::TRIANGLE_LIST) { - auto cnt = ibSize; - for (auto j = 0; j < cnt; j += 3) { - auto i0 = ib[j] * 3; - auto i1 = ib[j + 1] * 3; - auto i2 = ib[j + 2] * 3; - tri.a = {vb[i0], vb[i0 + 1], vb[i0 + 2]}; - tri.b = {vb[i1], vb[i1 + 1], vb[i1 + 2]}; - tri.c = {vb[i2], vb[i2 + 1], vb[i2 + 2]}; - auto dist = rayTriangle(ray, tri, opt->doubleSided); - if (dist == 0.0F || dist > opt->distance) continue; - fillResult(minDis, opt->mode, dist, static_cast(i0), static_cast(i1), static_cast(i2), opt->result); - if (opt->mode == ERaycastMode::ANY) return dist; - } - } else if (pm == gfx::PrimitiveMode::TRIANGLE_STRIP) { - auto cnt = ibSize - 2; - int32_t rev = 0; - for (auto j = 0; j < cnt; j += 1) { - auto i0 = ib[j - rev] * 3; - auto i1 = ib[j + rev + 1] * 3; - auto i2 = ib[j + 2] * 3; - tri.a = {vb[i0], vb[i0 + 1], vb[i0 + 2]}; - tri.b = {vb[i1], vb[i1 + 1], vb[i1 + 2]}; - tri.c = {vb[i2], vb[i2 + 1], vb[i2 + 2]}; - rev = ~rev; - auto dist = rayTriangle(ray, tri, opt->doubleSided); - if (dist == 0.0F || dist > opt->distance) continue; - fillResult(minDis, opt->mode, dist, static_cast(i0), static_cast(i1), static_cast(i2), opt->result); - if (opt->mode == ERaycastMode::ANY) return dist; - } - } else if (pm == gfx::PrimitiveMode::TRIANGLE_FAN) { - auto cnt = ibSize - 1; - auto i0 = ib[0] * 3; - tri.a = {vb[i0], vb[i0 + 1], vb[i0 + 2]}; - for (auto j = 1; j < cnt; j += 1) { - auto i1 = ib[j] * 3; - auto i2 = ib[j + 1] * 3; - tri.b = {vb[i1], vb[i1 + 1], vb[i1 + 2]}; - tri.c = {vb[i2], vb[i2 + 1], vb[i2 + 2]}; - auto dist = rayTriangle(ray, tri, opt->doubleSided); - if (dist == 0.0 || dist > opt->distance) continue; - fillResult(minDis, opt->mode, dist, static_cast(i0), static_cast(i1), static_cast(i2), opt->result); - if (opt->mode == ERaycastMode::ANY) return dist; - } - } - return *minDis; - }, + auto ibSize = ccstd::visit(overloaded{ + [](const auto &arr) { + return arr.length(); + }, + [](const ccstd::monostate & /*unused*/) { + return static_cast(0); + }}, + ib); + + return ccstd::visit(overloaded{[&](const auto &ib) { + if (pm == gfx::PrimitiveMode::TRIANGLE_LIST) { + auto cnt = ibSize; + for (auto j = 0; j < cnt; j += 3) { + auto i0 = ib[j] * 3; + auto i1 = ib[j + 1] * 3; + auto i2 = ib[j + 2] * 3; + tri.a = {vb[i0], vb[i0 + 1], vb[i0 + 2]}; + tri.b = {vb[i1], vb[i1 + 1], vb[i1 + 2]}; + tri.c = {vb[i2], vb[i2 + 1], vb[i2 + 2]}; + auto dist = rayTriangle(ray, tri, opt->doubleSided); + if (dist == 0.0F || dist > opt->distance) continue; + fillResult(minDis, opt->mode, dist, static_cast(i0), static_cast(i1), static_cast(i2), opt->result); + if (opt->mode == ERaycastMode::ANY) return dist; + } + } else if (pm == gfx::PrimitiveMode::TRIANGLE_STRIP) { + auto cnt = ibSize - 2; + int32_t rev = 0; + for (auto j = 0; j < cnt; j += 1) { + auto i0 = ib[j - rev] * 3; + auto i1 = ib[j + rev + 1] * 3; + auto i2 = ib[j + 2] * 3; + tri.a = {vb[i0], vb[i0 + 1], vb[i0 + 2]}; + tri.b = {vb[i1], vb[i1 + 1], vb[i1 + 2]}; + tri.c = {vb[i2], vb[i2 + 1], vb[i2 + 2]}; + rev = ~rev; + auto dist = rayTriangle(ray, tri, opt->doubleSided); + if (dist == 0.0F || dist > opt->distance) continue; + fillResult(minDis, opt->mode, dist, static_cast(i0), static_cast(i1), static_cast(i2), opt->result); + if (opt->mode == ERaycastMode::ANY) return dist; + } + } else if (pm == gfx::PrimitiveMode::TRIANGLE_FAN) { + auto cnt = ibSize - 1; + auto i0 = ib[0] * 3; + tri.a = {vb[i0], vb[i0 + 1], vb[i0 + 2]}; + for (auto j = 1; j < cnt; j += 1) { + auto i1 = ib[j] * 3; + auto i2 = ib[j + 1] * 3; + tri.b = {vb[i1], vb[i1 + 1], vb[i1 + 2]}; + tri.c = {vb[i2], vb[i2 + 1], vb[i2 + 2]}; + auto dist = rayTriangle(ray, tri, opt->doubleSided); + if (dist == 0.0 || dist > opt->distance) continue; + fillResult(minDis, opt->mode, dist, static_cast(i0), static_cast(i1), static_cast(i2), opt->result); + if (opt->mode == ERaycastMode::ANY) return dist; + } + } + return *minDis; + }, + [](const ccstd::monostate & /*unused*/) { return 0.F; }}, ib); } } // namespace diff --git a/native/cocos/core/geometry/Intersect.h b/native/cocos/core/geometry/Intersect.h index 4930a12dd7..310979086d 100644 --- a/native/cocos/core/geometry/Intersect.h +++ b/native/cocos/core/geometry/Intersect.h @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #pragma once #include "base/Macros.h" diff --git a/native/cocos/core/geometry/Line.cpp b/native/cocos/core/geometry/Line.cpp index e155d7c288..dfed81ebc1 100644 --- a/native/cocos/core/geometry/Line.cpp +++ b/native/cocos/core/geometry/Line.cpp @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #include "core/geometry/Line.h" #include "base/memory/Memory.h" diff --git a/native/cocos/core/geometry/Line.h b/native/cocos/core/geometry/Line.h index 3b232e9be6..2738a796b8 100644 --- a/native/cocos/core/geometry/Line.h +++ b/native/cocos/core/geometry/Line.h @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #pragma once #include "core/geometry/Enums.h" diff --git a/native/cocos/core/geometry/Obb.cpp b/native/cocos/core/geometry/Obb.cpp index d79976c001..33b06cf7de 100644 --- a/native/cocos/core/geometry/Obb.cpp +++ b/native/cocos/core/geometry/Obb.cpp @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #include "cocos/core/geometry/Obb.h" #include "base/memory/Memory.h" diff --git a/native/cocos/core/geometry/Obb.h b/native/cocos/core/geometry/Obb.h index d0d8660dd5..83ba0bf86b 100644 --- a/native/cocos/core/geometry/Obb.h +++ b/native/cocos/core/geometry/Obb.h @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #pragma once #include "cocos/core/geometry/Enums.h" diff --git a/native/cocos/core/geometry/Plane.cpp b/native/cocos/core/geometry/Plane.cpp index 612f1efeee..37d75b4193 100644 --- a/native/cocos/core/geometry/Plane.cpp +++ b/native/cocos/core/geometry/Plane.cpp @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #include "cocos/core/geometry/Plane.h" #include "base/memory/Memory.h" @@ -48,7 +72,7 @@ Plane *Plane::set(Plane *out, float nx, float ny, float nz, float d) { return out; } -Plane::Plane(float nx, float ny, float nz, float d):Plane() { +Plane::Plane(float nx, float ny, float nz, float d) : Plane() { n = {nx, ny, nz}; this->d = d; } diff --git a/native/cocos/core/geometry/Plane.h b/native/cocos/core/geometry/Plane.h index 93c3311047..bff719d9bc 100644 --- a/native/cocos/core/geometry/Plane.h +++ b/native/cocos/core/geometry/Plane.h @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #pragma once #include "cocos/core/geometry/Enums.h" diff --git a/native/cocos/core/geometry/Ray.cpp b/native/cocos/core/geometry/Ray.cpp index 67a4946bf3..086d2c4eab 100644 --- a/native/cocos/core/geometry/Ray.cpp +++ b/native/cocos/core/geometry/Ray.cpp @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #include "core/geometry/Ray.h" #include "base/memory/Memory.h" diff --git a/native/cocos/core/geometry/Ray.h b/native/cocos/core/geometry/Ray.h index 14dbbcebe9..ce5ee67bd0 100644 --- a/native/cocos/core/geometry/Ray.h +++ b/native/cocos/core/geometry/Ray.h @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #pragma once #include "core/geometry/Enums.h" diff --git a/native/cocos/core/geometry/Spec.cpp b/native/cocos/core/geometry/Spec.cpp index e69de29bb2..d3f25096ee 100644 --- a/native/cocos/core/geometry/Spec.cpp +++ b/native/cocos/core/geometry/Spec.cpp @@ -0,0 +1,23 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ diff --git a/native/cocos/core/geometry/Spec.h b/native/cocos/core/geometry/Spec.h index d50120ba50..eca7f8190d 100644 --- a/native/cocos/core/geometry/Spec.h +++ b/native/cocos/core/geometry/Spec.h @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #pragma once #include diff --git a/native/cocos/core/geometry/Sphere.cpp b/native/cocos/core/geometry/Sphere.cpp index 4f4074de0a..c5bdf72df4 100644 --- a/native/cocos/core/geometry/Sphere.cpp +++ b/native/cocos/core/geometry/Sphere.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -97,7 +96,7 @@ Sphere *Sphere::mergeAABB(Sphere *out, const Sphere &s, const AABB &a) { return out; } -Sphere::Sphere(float cx, float cy, float cz, float radius):ShapeBase(ShapeEnum::SHAPE_SPHERE) { +Sphere::Sphere(float cx, float cy, float cz, float radius) : ShapeBase(ShapeEnum::SHAPE_SPHERE) { _center = {cx, cy, cz}; _radius = radius; } diff --git a/native/cocos/core/geometry/Sphere.h b/native/cocos/core/geometry/Sphere.h index f363fce12e..e9e523753c 100644 --- a/native/cocos/core/geometry/Sphere.h +++ b/native/cocos/core/geometry/Sphere.h @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once @@ -193,7 +192,7 @@ public: out->_radius = _radius * mathutils::maxComponent(scale); } -// private: // make public for js bindings + // private: // make public for js bindings float _radius{-1.0}; Vec3 _center; }; diff --git a/native/cocos/core/geometry/Spline.cpp b/native/cocos/core/geometry/Spline.cpp index d297dcafa5..2305c7b158 100644 --- a/native/cocos/core/geometry/Spline.cpp +++ b/native/cocos/core/geometry/Spline.cpp @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #include "core/geometry/Spline.h" #include diff --git a/native/cocos/core/geometry/Spline.h b/native/cocos/core/geometry/Spline.h index a90ef7dc21..57a5e3baa3 100644 --- a/native/cocos/core/geometry/Spline.h +++ b/native/cocos/core/geometry/Spline.h @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once diff --git a/native/cocos/core/geometry/Triangle.cpp b/native/cocos/core/geometry/Triangle.cpp index ab7094f9aa..07c174cf23 100644 --- a/native/cocos/core/geometry/Triangle.cpp +++ b/native/cocos/core/geometry/Triangle.cpp @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #include "core/geometry/Triangle.h" #include "base/memory/Memory.h" @@ -54,7 +78,7 @@ Triangle *Triangle::set(Triangle *out, Triangle::Triangle(float ax, float ay, float az, float bx, float by, float bz, - float cx, float cy, float cz): ShapeBase(ShapeEnum::SHAPE_TRIANGLE){ + float cx, float cy, float cz) : ShapeBase(ShapeEnum::SHAPE_TRIANGLE) { a = {ax, ay, az}; b = {bx, by, bz}; c = {cx, cy, cz}; diff --git a/native/cocos/core/geometry/Triangle.h b/native/cocos/core/geometry/Triangle.h index f4fd9a832b..8ea3117e9b 100644 --- a/native/cocos/core/geometry/Triangle.h +++ b/native/cocos/core/geometry/Triangle.h @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #pragma once #include "core/geometry/Enums.h" diff --git a/native/cocos/core/memop/CachedArray.h b/native/cocos/core/memop/CachedArray.h index e973731ed5..56f667d92b 100644 --- a/native/cocos/core/memop/CachedArray.h +++ b/native/cocos/core/memop/CachedArray.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/memop/Pool.cpp b/native/cocos/core/memop/Pool.cpp index 625ae34eaf..e3d5f59baf 100644 --- a/native/cocos/core/memop/Pool.cpp +++ b/native/cocos/core/memop/Pool.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/memop/Pool.h b/native/cocos/core/memop/Pool.h index b39d6a2d1e..e836d7452e 100644 --- a/native/cocos/core/memop/Pool.h +++ b/native/cocos/core/memop/Pool.h @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once diff --git a/native/cocos/core/memop/RecyclePool.cpp b/native/cocos/core/memop/RecyclePool.cpp index ad811bcd6a..fef1e452d3 100644 --- a/native/cocos/core/memop/RecyclePool.cpp +++ b/native/cocos/core/memop/RecyclePool.cpp @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #include "core/memop/RecyclePool.h" diff --git a/native/cocos/core/memop/RecyclePool.h b/native/cocos/core/memop/RecyclePool.h index fe3e2411a3..c134b99347 100644 --- a/native/cocos/core/memop/RecyclePool.h +++ b/native/cocos/core/memop/RecyclePool.h @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once diff --git a/native/cocos/core/platform/Debug.cpp b/native/cocos/core/platform/Debug.cpp index b577f1ff01..0482e9bf6d 100644 --- a/native/cocos/core/platform/Debug.cpp +++ b/native/cocos/core/platform/Debug.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http =//www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -20,7 +19,7 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE. ****************************************************************************/ #include "Debug.h" diff --git a/native/cocos/core/platform/Debug.h b/native/cocos/core/platform/Debug.h index 41f3765668..afaa4605b9 100644 --- a/native/cocos/core/platform/Debug.h +++ b/native/cocos/core/platform/Debug.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http =//www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -20,7 +19,7 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE. ****************************************************************************/ #pragma once diff --git a/native/cocos/core/platform/Macro.cpp b/native/cocos/core/platform/Macro.cpp index 16b960c014..b345947185 100644 --- a/native/cocos/core/platform/Macro.cpp +++ b/native/cocos/core/platform/Macro.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http =//www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/platform/Macro.h b/native/cocos/core/platform/Macro.h index 32f6f18356..84ff741e7e 100644 --- a/native/cocos/core/platform/Macro.h +++ b/native/cocos/core/platform/Macro.h @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once diff --git a/native/cocos/core/scene-graph/Layers.cpp b/native/cocos/core/scene-graph/Layers.cpp index e69de29bb2..d3f25096ee 100644 --- a/native/cocos/core/scene-graph/Layers.cpp +++ b/native/cocos/core/scene-graph/Layers.cpp @@ -0,0 +1,23 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ diff --git a/native/cocos/core/scene-graph/Layers.h b/native/cocos/core/scene-graph/Layers.h index 4921820f8f..2589f3bed6 100644 --- a/native/cocos/core/scene-graph/Layers.h +++ b/native/cocos/core/scene-graph/Layers.h @@ -1,18 +1,17 @@ -/* - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. +/**************************************************************************** + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ +****************************************************************************/ #pragma once diff --git a/native/cocos/core/scene-graph/Node.cpp b/native/cocos/core/scene-graph/Node.cpp index 869e5d7cfe..3ad11361c3 100644 --- a/native/cocos/core/scene-graph/Node.cpp +++ b/native/cocos/core/scene-graph/Node.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #include "core/scene-graph/Node.h" #include "base/StringUtil.h" @@ -525,7 +524,6 @@ void Node::invalidateChildren(TransformBit dirtyBit) { // NOLINT(misc-no-recursi if (isValid() && (dirtyFlags & hasChangedFlags & curDirtyBit) != curDirtyBit) { setDirtyFlag(dirtyFlags | curDirtyBit); setChangedFlags(hasChangedFlags | curDirtyBit); - emit(dirtyBit); for (Node *child : getChildren()) { child->invalidateChildren(dirtyBit | TransformBit::POSITION); @@ -877,6 +875,13 @@ void Node::_setChildren(ccstd::vector> &&children) { _children = std::move(children); } +void Node::destruct() { + CCObject::destruct(); + _children.clear(); + _scene = nullptr; + _userData = nullptr; +} + // } // namespace cc diff --git a/native/cocos/core/scene-graph/Node.h b/native/cocos/core/scene-graph/Node.h index af83f98112..e0d3f52eba 100644 --- a/native/cocos/core/scene-graph/Node.h +++ b/native/cocos/core/scene-graph/Node.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once @@ -80,7 +79,6 @@ class Node : public CCObject { TARGET_EVENT_ARG1(LayerChanged, uint32_t) TARGET_EVENT_ARG0(SiblingOrderChanged) TARGET_EVENT_ARG0(ActiveInHierarchyChanged) - TARGET_EVENT_ARG1(AncestorTransformChanged, TransformBit) TARGET_EVENT_ARG0(Reattach) TARGET_EVENT_ARG0(RemovePersistRootNode) TARGET_EVENT_ARG0(DestroyComponents) @@ -154,6 +152,8 @@ public: return false; } + void destruct() override; + inline void destroyAllChildren() { for (const auto &child : _children) { child->destroy(); diff --git a/native/cocos/core/scene-graph/NodeEnum.cpp b/native/cocos/core/scene-graph/NodeEnum.cpp index a22483538b..b628b4986e 100644 --- a/native/cocos/core/scene-graph/NodeEnum.cpp +++ b/native/cocos/core/scene-graph/NodeEnum.cpp @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,4 +20,4 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ diff --git a/native/cocos/core/scene-graph/NodeEnum.h b/native/cocos/core/scene-graph/NodeEnum.h index eb36724f27..9d4d7cf714 100644 --- a/native/cocos/core/scene-graph/NodeEnum.h +++ b/native/cocos/core/scene-graph/NodeEnum.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/scene-graph/Scene.cpp b/native/cocos/core/scene-graph/Scene.cpp index 8a5385fe79..8239c372d8 100644 --- a/native/cocos/core/scene-graph/Scene.cpp +++ b/native/cocos/core/scene-graph/Scene.cpp @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #include "core/scene-graph/Scene.h" #include "core/scene-graph/SceneGlobals.h" diff --git a/native/cocos/core/scene-graph/Scene.h b/native/cocos/core/scene-graph/Scene.h index 9ec419671e..b6b51a3b41 100644 --- a/native/cocos/core/scene-graph/Scene.h +++ b/native/cocos/core/scene-graph/Scene.h @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once diff --git a/native/cocos/core/scene-graph/SceneGlobals.cpp b/native/cocos/core/scene-graph/SceneGlobals.cpp index 67f9d93f7b..c8ff40fa74 100644 --- a/native/cocos/core/scene-graph/SceneGlobals.cpp +++ b/native/cocos/core/scene-graph/SceneGlobals.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #include "core/scene-graph/SceneGlobals.h" #include "core/Root.h" @@ -46,7 +45,7 @@ SceneGlobals::SceneGlobals() { _bakedWithStationaryMainLight = false; } -void SceneGlobals::activate(Scene* scene) { +void SceneGlobals::activate(Scene *scene) { auto *sceneData = Root::getInstance()->getPipeline()->getPipelineSceneData(); if (_ambientInfo != nullptr) { _ambientInfo->activate(sceneData->getAmbient()); diff --git a/native/cocos/core/scene-graph/SceneGlobals.h b/native/cocos/core/scene-graph/SceneGlobals.h index 0a0e72bdc5..59e59a369a 100644 --- a/native/cocos/core/scene-graph/SceneGlobals.h +++ b/native/cocos/core/scene-graph/SceneGlobals.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once diff --git a/native/cocos/core/scene-graph/SceneGraphModuleHeader.h b/native/cocos/core/scene-graph/SceneGraphModuleHeader.h index 08b0770e70..338ed226db 100644 --- a/native/cocos/core/scene-graph/SceneGraphModuleHeader.h +++ b/native/cocos/core/scene-graph/SceneGraphModuleHeader.h @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once diff --git a/native/cocos/core/utils/IDGenerator.cpp b/native/cocos/core/utils/IDGenerator.cpp index cf0abff656..651cf8d4df 100644 --- a/native/cocos/core/utils/IDGenerator.cpp +++ b/native/cocos/core/utils/IDGenerator.cpp @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #include "core/utils/IDGenerator.h" #include "base/Random.h" #include "boost/uuid/uuid.hpp" diff --git a/native/cocos/core/utils/IDGenerator.h b/native/cocos/core/utils/IDGenerator.h index 6875e2a782..7af146bba2 100644 --- a/native/cocos/core/utils/IDGenerator.h +++ b/native/cocos/core/utils/IDGenerator.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/utils/ImageUtils.cpp b/native/cocos/core/utils/ImageUtils.cpp index 51ff964ed5..7359536084 100644 --- a/native/cocos/core/utils/ImageUtils.cpp +++ b/native/cocos/core/utils/ImageUtils.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/utils/ImageUtils.h b/native/cocos/core/utils/ImageUtils.h index 0e35c09cb5..034781fdae 100644 --- a/native/cocos/core/utils/ImageUtils.h +++ b/native/cocos/core/utils/ImageUtils.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/utils/MutableForwardIterator.cpp b/native/cocos/core/utils/MutableForwardIterator.cpp index f0e9e4c248..748fe689c2 100644 --- a/native/cocos/core/utils/MutableForwardIterator.cpp +++ b/native/cocos/core/utils/MutableForwardIterator.cpp @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #include "core/utils/MutableForwardIterator.h" namespace cc { diff --git a/native/cocos/core/utils/MutableForwardIterator.h b/native/cocos/core/utils/MutableForwardIterator.h index 8a7430766b..e692e0bf40 100644 --- a/native/cocos/core/utils/MutableForwardIterator.h +++ b/native/cocos/core/utils/MutableForwardIterator.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/utils/Path.cpp b/native/cocos/core/utils/Path.cpp index 428facbc13..bfeebcd82d 100644 --- a/native/cocos/core/utils/Path.cpp +++ b/native/cocos/core/utils/Path.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/utils/Path.h b/native/cocos/core/utils/Path.h index 6708415b6d..450bb78a09 100644 --- a/native/cocos/core/utils/Path.h +++ b/native/cocos/core/utils/Path.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/core/utils/Pool.h b/native/cocos/core/utils/Pool.h index 928a489f88..119871f39e 100644 --- a/native/cocos/core/utils/Pool.h +++ b/native/cocos/core/utils/Pool.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/editor-support/IOBuffer.cpp b/native/cocos/editor-support/IOBuffer.cpp index 247d594e58..ca713618d9 100644 --- a/native/cocos/editor-support/IOBuffer.cpp +++ b/native/cocos/editor-support/IOBuffer.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/editor-support/IOBuffer.h b/native/cocos/editor-support/IOBuffer.h index 7b7253f00b..f30320cbd0 100644 --- a/native/cocos/editor-support/IOBuffer.h +++ b/native/cocos/editor-support/IOBuffer.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/editor-support/IOTypedArray.cpp b/native/cocos/editor-support/IOTypedArray.cpp index 5e7fecb941..0cef50a0a7 100644 --- a/native/cocos/editor-support/IOTypedArray.cpp +++ b/native/cocos/editor-support/IOTypedArray.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/editor-support/IOTypedArray.h b/native/cocos/editor-support/IOTypedArray.h index 600270dbb1..9566ce3315 100644 --- a/native/cocos/editor-support/IOTypedArray.h +++ b/native/cocos/editor-support/IOTypedArray.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/editor-support/MeshBuffer.cpp b/native/cocos/editor-support/MeshBuffer.cpp index a8aa8e91d4..c931d67197 100644 --- a/native/cocos/editor-support/MeshBuffer.cpp +++ b/native/cocos/editor-support/MeshBuffer.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -135,7 +134,7 @@ void MeshBuffer::reset() { } void MeshBuffer::addUIMeshBuffer() { - UIMeshBuffer* uiMeshBuffer = new UIMeshBuffer(); + UIMeshBuffer *uiMeshBuffer = new UIMeshBuffer(); ccstd::vector attrs; if (_vertexFormat == VF_XYZUVC) { attrs = ATTRIBUTES_V3F_T2F_C4B; @@ -147,7 +146,7 @@ void MeshBuffer::addUIMeshBuffer() { } void MeshBuffer::cleanUIMeshBuffer() { - for(auto *buf : _uiMeshBufferArr) { + for (auto *buf : _uiMeshBufferArr) { delete buf; } _uiMeshBufferArr.clear(); @@ -157,7 +156,7 @@ cc::UIMeshBuffer *MeshBuffer::getUIMeshBuffer() const { return _uiMeshBufferArr[_bufferPos]; } -const ccstd::vector& MeshBuffer::uiMeshBuffers() const { +const ccstd::vector &MeshBuffer::uiMeshBuffers() const { return _uiMeshBufferArr; } diff --git a/native/cocos/editor-support/MeshBuffer.h b/native/cocos/editor-support/MeshBuffer.h index 2dcc5c3a69..a49eea5ee2 100644 --- a/native/cocos/editor-support/MeshBuffer.h +++ b/native/cocos/editor-support/MeshBuffer.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -30,7 +29,7 @@ #include "base/std/container/vector.h" namespace cc { - class UIMeshBuffer; +class UIMeshBuffer; }; MIDDLEWARE_BEGIN diff --git a/native/cocos/editor-support/MiddlewareMacro.h b/native/cocos/editor-support/MiddlewareMacro.h index 33f7db7e10..d9b6ed15b2 100644 --- a/native/cocos/editor-support/MiddlewareMacro.h +++ b/native/cocos/editor-support/MiddlewareMacro.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/editor-support/MiddlewareManager.cpp b/native/cocos/editor-support/MiddlewareManager.cpp index 4de5f4b446..cad1376e50 100644 --- a/native/cocos/editor-support/MiddlewareManager.cpp +++ b/native/cocos/editor-support/MiddlewareManager.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -25,8 +24,8 @@ #include "MiddlewareManager.h" #include -#include "SeApi.h" #include "2d/renderer/Batcher2d.h" +#include "SeApi.h" #include "core/Root.h" MIDDLEWARE_BEGIN @@ -122,7 +121,7 @@ void MiddlewareManager::render(float dt) { } uint16_t accID = 65534; - auto* batch2d = Root::getInstance()->getBatcher2D(); + auto *batch2d = Root::getInstance()->getBatcher2D(); if (it.first == VF_XYZUVCC) { accID = 65535; } diff --git a/native/cocos/editor-support/MiddlewareManager.h b/native/cocos/editor-support/MiddlewareManager.h index 6b0ca79d24..9c326dbb30 100644 --- a/native/cocos/editor-support/MiddlewareManager.h +++ b/native/cocos/editor-support/MiddlewareManager.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/editor-support/SharedBufferManager.cpp b/native/cocos/editor-support/SharedBufferManager.cpp index 94c29d001e..b80f74565a 100644 --- a/native/cocos/editor-support/SharedBufferManager.cpp +++ b/native/cocos/editor-support/SharedBufferManager.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/editor-support/SharedBufferManager.h b/native/cocos/editor-support/SharedBufferManager.h index c189b08da6..931a3e014c 100644 --- a/native/cocos/editor-support/SharedBufferManager.h +++ b/native/cocos/editor-support/SharedBufferManager.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/editor-support/TypedArrayPool.cpp b/native/cocos/editor-support/TypedArrayPool.cpp index 6377779a76..94c75d563e 100644 --- a/native/cocos/editor-support/TypedArrayPool.cpp +++ b/native/cocos/editor-support/TypedArrayPool.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/editor-support/TypedArrayPool.h b/native/cocos/editor-support/TypedArrayPool.h index f9dc1f8522..903853c2ab 100644 --- a/native/cocos/editor-support/TypedArrayPool.h +++ b/native/cocos/editor-support/TypedArrayPool.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/editor-support/dragonbones-creator-support/CCArmatureCacheDisplay.cpp b/native/cocos/editor-support/dragonbones-creator-support/CCArmatureCacheDisplay.cpp index 225898feba..70367fede1 100644 --- a/native/cocos/editor-support/dragonbones-creator-support/CCArmatureCacheDisplay.cpp +++ b/native/cocos/editor-support/dragonbones-creator-support/CCArmatureCacheDisplay.cpp @@ -1,25 +1,27 @@ -/** - * The MIT License (MIT) - * - * Copyright (c) 2012-2020 DragonBones team and other contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +/**************************************************************************** + Copyright (c) 2012-2020 DragonBones team and other contributors + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ #include "CCArmatureCacheDisplay.h" #include "2d/renderer/RenderDrawInfo.h" diff --git a/native/cocos/editor-support/dragonbones-creator-support/CCArmatureCacheDisplay.h b/native/cocos/editor-support/dragonbones-creator-support/CCArmatureCacheDisplay.h index 45470bd680..ac02507352 100644 --- a/native/cocos/editor-support/dragonbones-creator-support/CCArmatureCacheDisplay.h +++ b/native/cocos/editor-support/dragonbones-creator-support/CCArmatureCacheDisplay.h @@ -1,25 +1,27 @@ -/** - * The MIT License (MIT) - * - * Copyright (c) 2012-2020 DragonBones team and other contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +/**************************************************************************** + Copyright (c) 2012-2020 DragonBones team and other contributors + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ #pragma once @@ -34,7 +36,7 @@ namespace cc { class RenderEntity; class RenderDrawInfo; class Material; -}; +}; // namespace cc DRAGONBONES_NAMESPACE_BEGIN @@ -92,7 +94,7 @@ public: cc::RenderDrawInfo *requestDrawInfo(int idx); cc::Material *requestMaterial(uint16_t blendSrc, uint16_t blendDst); void setMaterial(cc::Material *material); - void setRenderEntity(cc::RenderEntity* entity); + void setRenderEntity(cc::RenderEntity *entity); private: float _timeScale = 1; @@ -121,7 +123,7 @@ private: cc::RenderEntity *_entity = nullptr; cc::Material *_material = nullptr; ccstd::vector _drawInfoArray; - ccstd::unordered_map _materialCaches; + ccstd::unordered_map _materialCaches; }; DRAGONBONES_NAMESPACE_END diff --git a/native/cocos/editor-support/dragonbones-creator-support/CCArmatureDisplay.cpp b/native/cocos/editor-support/dragonbones-creator-support/CCArmatureDisplay.cpp index 176c05c65f..d5478ed2ef 100644 --- a/native/cocos/editor-support/dragonbones-creator-support/CCArmatureDisplay.cpp +++ b/native/cocos/editor-support/dragonbones-creator-support/CCArmatureDisplay.cpp @@ -1,25 +1,27 @@ -/** - * The MIT License (MIT) - * - * Copyright (c) 2012-2020 DragonBones team and other contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +/**************************************************************************** + Copyright (c) 2012-2020 DragonBones team and other contributors + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ #include "dragonbones-creator-support/CCArmatureDisplay.h" #include "2d/renderer/RenderDrawInfo.h" diff --git a/native/cocos/editor-support/dragonbones-creator-support/CCArmatureDisplay.h b/native/cocos/editor-support/dragonbones-creator-support/CCArmatureDisplay.h index ab10e0cd12..4e0e8764c0 100644 --- a/native/cocos/editor-support/dragonbones-creator-support/CCArmatureDisplay.h +++ b/native/cocos/editor-support/dragonbones-creator-support/CCArmatureDisplay.h @@ -1,25 +1,27 @@ -/** - * The MIT License (MIT) - * - * Copyright (c) 2012-2020 DragonBones team and other contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +/**************************************************************************** + Copyright (c) 2012-2020 DragonBones team and other contributors + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ #ifndef DRAGONBONES_CC_ARMATURE_DISPLAY_CONTAINER_H #define DRAGONBONES_CC_ARMATURE_DISPLAY_CONTAINER_H @@ -41,7 +43,7 @@ class RenderEntity; class RenderDrawInfo; class Material; class Texture2D; -}; +}; // namespace cc DRAGONBONES_NAMESPACE_BEGIN @@ -167,7 +169,8 @@ public: cc::RenderDrawInfo *requestDrawInfo(int idx); cc::Material *requestMaterial(uint16_t blendSrc, uint16_t blendDst); void setMaterial(cc::Material *material); - void setRenderEntity(cc::RenderEntity* entity); + void setRenderEntity(cc::RenderEntity *entity); + private: std::map _listenerIDMap; int _preBlendMode = -1; @@ -200,7 +203,7 @@ private: cc::RenderEntity *_entity = nullptr; cc::Material *_material = nullptr; ccstd::vector _drawInfoArray; - ccstd::unordered_map _materialCaches; + ccstd::unordered_map _materialCaches; }; DRAGONBONES_NAMESPACE_END diff --git a/native/cocos/editor-support/dragonbones-creator-support/CCDragonBonesHeaders.h b/native/cocos/editor-support/dragonbones-creator-support/CCDragonBonesHeaders.h index 6a08a64af8..b877468f8c 100644 --- a/native/cocos/editor-support/dragonbones-creator-support/CCDragonBonesHeaders.h +++ b/native/cocos/editor-support/dragonbones-creator-support/CCDragonBonesHeaders.h @@ -1,25 +1,27 @@ -/** - * The MIT License (MIT) - * - * Copyright (c) 2012-2020 DragonBones team and other contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +/**************************************************************************** + Copyright (c) 2012-2020 DragonBones team and other contributors + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ #ifndef DRAGONBONES_CC_HEADERS_H #define DRAGONBONES_CC_HEADERS_H diff --git a/native/cocos/editor-support/dragonbones-creator-support/CCFactory.cpp b/native/cocos/editor-support/dragonbones-creator-support/CCFactory.cpp index bc1b3c4e65..6af3c7ee6c 100644 --- a/native/cocos/editor-support/dragonbones-creator-support/CCFactory.cpp +++ b/native/cocos/editor-support/dragonbones-creator-support/CCFactory.cpp @@ -1,25 +1,27 @@ -/** - * The MIT License (MIT) - * - * Copyright (c) 2012-2020 DragonBones team and other contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +/**************************************************************************** + Copyright (c) 2012-2020 DragonBones team and other contributors + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ #include "dragonbones-creator-support/CCFactory.h" #include "dragonbones-creator-support/CCArmatureDisplay.h" diff --git a/native/cocos/editor-support/dragonbones-creator-support/CCFactory.h b/native/cocos/editor-support/dragonbones-creator-support/CCFactory.h index 5933b9fdd6..6c319bf806 100644 --- a/native/cocos/editor-support/dragonbones-creator-support/CCFactory.h +++ b/native/cocos/editor-support/dragonbones-creator-support/CCFactory.h @@ -1,25 +1,27 @@ -/** - * The MIT License (MIT) - * - * Copyright (c) 2012-2020 DragonBones team and other contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +/**************************************************************************** + Copyright (c) 2012-2020 DragonBones team and other contributors + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ #ifndef DRAGONBONES_CC_FACTORY_H #define DRAGONBONES_CC_FACTORY_H diff --git a/native/cocos/editor-support/dragonbones-creator-support/CCSlot.cpp b/native/cocos/editor-support/dragonbones-creator-support/CCSlot.cpp index 6b5a9aa770..b902db3418 100644 --- a/native/cocos/editor-support/dragonbones-creator-support/CCSlot.cpp +++ b/native/cocos/editor-support/dragonbones-creator-support/CCSlot.cpp @@ -1,25 +1,27 @@ -/** - * The MIT License (MIT) - * - * Copyright (c) 2012-2020 DragonBones team and other contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +/**************************************************************************** + Copyright (c) 2012-2020 DragonBones team and other contributors + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ #include "dragonbones-creator-support/CCSlot.h" #include "dragonbones-creator-support/CCArmatureDisplay.h" diff --git a/native/cocos/editor-support/dragonbones-creator-support/CCSlot.h b/native/cocos/editor-support/dragonbones-creator-support/CCSlot.h index 50a6f111cd..9cdaaffb97 100644 --- a/native/cocos/editor-support/dragonbones-creator-support/CCSlot.h +++ b/native/cocos/editor-support/dragonbones-creator-support/CCSlot.h @@ -1,25 +1,27 @@ -/** - * The MIT License (MIT) - * - * Copyright (c) 2012-2020 DragonBones team and other contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +/**************************************************************************** + Copyright (c) 2012-2020 DragonBones team and other contributors + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ #ifndef DRAGONBONES_CC_SLOT_H #define DRAGONBONES_CC_SLOT_H diff --git a/native/cocos/editor-support/dragonbones-creator-support/CCTextureAtlasData.cpp b/native/cocos/editor-support/dragonbones-creator-support/CCTextureAtlasData.cpp index 35c1aa913b..ec9341a571 100644 --- a/native/cocos/editor-support/dragonbones-creator-support/CCTextureAtlasData.cpp +++ b/native/cocos/editor-support/dragonbones-creator-support/CCTextureAtlasData.cpp @@ -1,25 +1,27 @@ -/** - * The MIT License (MIT) - * - * Copyright (c) 2012-2020 DragonBones team and other contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +/**************************************************************************** + Copyright (c) 2012-2020 DragonBones team and other contributors + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ #include "dragonbones-creator-support/CCTextureAtlasData.h" diff --git a/native/cocos/editor-support/dragonbones-creator-support/CCTextureAtlasData.h b/native/cocos/editor-support/dragonbones-creator-support/CCTextureAtlasData.h index 79e5203b91..2643ec5482 100644 --- a/native/cocos/editor-support/dragonbones-creator-support/CCTextureAtlasData.h +++ b/native/cocos/editor-support/dragonbones-creator-support/CCTextureAtlasData.h @@ -1,25 +1,27 @@ -/** - * The MIT License (MIT) - * - * Copyright (c) 2012-2020 DragonBones team and other contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +/**************************************************************************** + Copyright (c) 2012-2020 DragonBones team and other contributors + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ #ifndef DRAGONBONES_CC_TEXTUREATLAS_DATA_H #define DRAGONBONES_CC_TEXTUREATLAS_DATA_H diff --git a/native/cocos/editor-support/middleware-adapter.cpp b/native/cocos/editor-support/middleware-adapter.cpp index 82345f239c..3665028ec8 100644 --- a/native/cocos/editor-support/middleware-adapter.cpp +++ b/native/cocos/editor-support/middleware-adapter.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -106,7 +105,7 @@ void Texture2D::setTexParameters(const TexParams &texParams) { } } -void Texture2D::setRealTexture(void* texturePtr) { +void Texture2D::setRealTexture(void *texturePtr) { _texturePtr = texturePtr; } diff --git a/native/cocos/editor-support/middleware-adapter.h b/native/cocos/editor-support/middleware-adapter.h index 3c1a2bc6c7..c9ae620f6a 100644 --- a/native/cocos/editor-support/middleware-adapter.h +++ b/native/cocos/editor-support/middleware-adapter.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -181,8 +180,9 @@ public: /** Sets texture param callback*/ void setTexParamCallback(const texParamCallback &callback); - void setRealTexture(void* texturePtr); + void setRealTexture(void *texturePtr); void *getRealTexture() const; + private: /** width in pixels */ int _pixelsWide = 0; @@ -194,7 +194,7 @@ private: int _realTextureIndex = 0; texParamCallback _texParamCallback = nullptr; - void* _texturePtr = nullptr; + void *_texturePtr = nullptr; }; /////////////////////////////////////////////////////////////////////// diff --git a/native/cocos/editor-support/spine-creator-support/SkeletonCache.cpp b/native/cocos/editor-support/spine-creator-support/SkeletonCache.cpp index 1ab753392e..b8ce41d377 100644 --- a/native/cocos/editor-support/spine-creator-support/SkeletonCache.cpp +++ b/native/cocos/editor-support/spine-creator-support/SkeletonCache.cpp @@ -319,7 +319,7 @@ void SkeletonCache::renderAnimationFrame(AnimationData *animationData) { _clipper->clipEnd(*slot); continue; } - const spine::Color& slotColor = slot->getColor(); + const spine::Color &slotColor = slot->getColor(); // Early exit if slot is invisible if (slotColor.a == 0) { _clipper->clipEnd(*slot); diff --git a/native/cocos/editor-support/spine-creator-support/SkeletonCache.h b/native/cocos/editor-support/spine-creator-support/SkeletonCache.h index e3a2b33fa7..424e8cfa9e 100644 --- a/native/cocos/editor-support/spine-creator-support/SkeletonCache.h +++ b/native/cocos/editor-support/spine-creator-support/SkeletonCache.h @@ -29,10 +29,10 @@ #pragma once +#include #include "IOBuffer.h" #include "SkeletonAnimation.h" #include "middleware-adapter.h" -#include namespace spine { class SkeletonCache : public SkeletonAnimation { diff --git a/native/cocos/engine/BaseEngine.cpp b/native/cocos/engine/BaseEngine.cpp index 7f4d356017..ba0e3290a6 100644 --- a/native/cocos/engine/BaseEngine.cpp +++ b/native/cocos/engine/BaseEngine.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/engine/BaseEngine.h b/native/cocos/engine/BaseEngine.h index d5b70c8dd1..9a7bc95ac5 100644 --- a/native/cocos/engine/BaseEngine.h +++ b/native/cocos/engine/BaseEngine.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/engine/Engine.cpp b/native/cocos/engine/Engine.cpp index 602e698563..4ff716cc21 100644 --- a/native/cocos/engine/Engine.cpp +++ b/native/cocos/engine/Engine.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -82,9 +81,11 @@ bool setCanvasCallback(se::Object * /*global*/) { std::stringstream ss; { - ss << "window.innerWidth = " << static_cast(viewSize.width / dpr) << ";"; - ss << "window.innerHeight = " << static_cast(viewSize.height / dpr) << ";"; - ss << "window.windowHandler = "; + ss << "globalThis.jsb = globalThis.jsb || {}; " << std::endl; + ss << "jsb.window = jsb.window || {}; " << std::endl; + ss << "jsb.window.innerWidth = " << static_cast(viewSize.width / dpr) << ";" << std::endl; + ss << "jsb.window.innerHeight = " << static_cast(viewSize.height / dpr) << ";" << std::endl; + ss << "jsb.window.windowHandler = "; if (sizeof(handler) == 8) { // use bigint ss << static_cast(handler) << "n;"; } @@ -168,7 +169,7 @@ void Engine::destroy() { delete _debugRenderer; #endif - //TODO(): Delete some global objects. + // TODO(): Delete some global objects. #if CC_USE_DEBUG_RENDERER // FreeTypeFontFace is only used in DebugRenderer now, so use CC_USE_DEBUG_RENDERER macro temporarily FreeTypeFontFace::destroyFreeType(); @@ -243,7 +244,7 @@ void Engine::setPreferredFramesPerSecond(int fps) { } BasePlatform *platform = BasePlatform::getPlatform(); platform->setFps(fps); - _prefererredNanosecondsPerFrame = static_cast(1.0 / fps * NANOSECONDS_PER_SECOND); //NOLINT(google-runtime-int) + _prefererredNanosecondsPerFrame = static_cast(1.0 / fps * NANOSECONDS_PER_SECOND); // NOLINT(google-runtime-int) } void Engine::tick() { @@ -264,7 +265,8 @@ void Engine::tick() { ++_totalFrames; // iOS/macOS use its own fps limitation algorithm. -#if (CC_PLATFORM == CC_PLATFORM_ANDROID || CC_PLATFORM == CC_PLATFORM_WINDOWS || CC_PLATFORM == CC_PLATFORM_OHOS) || (defined(CC_SERVER_MODE) && (CC_PLATFORM == CC_PLATFORM_MAC_OSX)) + // Windows for Editor should not sleep,because Editor call tick function synchronously +#if (CC_PLATFORM == CC_PLATFORM_ANDROID || (CC_PLATFORM == CC_PLATFORM_WINDOWS && !defined(CC_EDITOR)) || CC_PLATFORM == CC_PLATFORM_OHOS) || (defined(CC_SERVER_MODE) && (CC_PLATFORM == CC_PLATFORM_MAC_OSX)) if (dtNS < static_cast(_prefererredNanosecondsPerFrame)) { CC_PROFILE(EngineSleep); std::this_thread::sleep_for( @@ -329,6 +331,7 @@ bool Engine::redirectWindowEvent(const WindowEvent &ev) { isHandled = true; } else if (ev.type == WindowEvent::Type::CLOSE) { emit(ON_CLOSE); + events::Close::broadcast(); isHandled = true; } else if (ev.type == WindowEvent::Type::QUIT) { // There is no need to process the quit message, diff --git a/native/cocos/engine/Engine.h b/native/cocos/engine/Engine.h index 9cb02bbaba..f0fd7b26ff 100644 --- a/native/cocos/engine/Engine.h +++ b/native/cocos/engine/Engine.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/engine/EngineEvents.h b/native/cocos/engine/EngineEvents.h index fb6deef235..b9f62dee06 100644 --- a/native/cocos/engine/EngineEvents.h +++ b/native/cocos/engine/EngineEvents.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -293,6 +292,13 @@ public: Type type{Type::UNKNOWN}; // NOLINT(modernize-use-nullptr) }; +enum class ScriptEngineEvent { + BEFORE_INIT, + AFTER_INIT, + BEFORE_CLEANUP, + AFTER_CLEANUP, +}; + namespace events { DECLARE_EVENT_BUS(Engine) @@ -313,5 +319,6 @@ DECLARE_BUS_EVENT_ARG1(Orientation, Engine, int) DECLARE_BUS_EVENT_ARG0(RestartVM, Engine) DECLARE_BUS_EVENT_ARG0(Close, Engine) DECLARE_BUS_EVENT_ARG0(SceneLoad, Engine) +DECLARE_BUS_EVENT_ARG1(ScriptEngine, Engine, ScriptEngineEvent) } // namespace events } // namespace cc diff --git a/native/cocos/gi/light-probe/AutoPlacement.cpp b/native/cocos/gi/light-probe/AutoPlacement.cpp index f686407f40..d124145d13 100644 --- a/native/cocos/gi/light-probe/AutoPlacement.cpp +++ b/native/cocos/gi/light-probe/AutoPlacement.cpp @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/gi/light-probe/AutoPlacement.h b/native/cocos/gi/light-probe/AutoPlacement.h index 5baeada805..abf4560d54 100644 --- a/native/cocos/gi/light-probe/AutoPlacement.h +++ b/native/cocos/gi/light-probe/AutoPlacement.h @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/gi/light-probe/Delaunay.cpp b/native/cocos/gi/light-probe/Delaunay.cpp index cc898b87f1..e0ccad0b2e 100644 --- a/native/cocos/gi/light-probe/Delaunay.cpp +++ b/native/cocos/gi/light-probe/Delaunay.cpp @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -48,7 +47,7 @@ void CircumSphere::init(const Vec3 &p0, const Vec3 &p1, const Vec3 &p2, const Ve #else Mat3 mat(p1.x - p0.x, p2.x - p0.x, p3.x - p0.x, p1.y - p0.y, p2.y - p0.y, p3.y - p0.y, - p1.z - p0.z, p2.z - p0.z, p3.z - p0.z);; + p1.z - p0.z, p2.z - p0.z, p3.z - p0.z); #endif mat.inverse(); mat.transpose(); diff --git a/native/cocos/gi/light-probe/Delaunay.h b/native/cocos/gi/light-probe/Delaunay.h index 037a0d8a83..004e6cdfdc 100644 --- a/native/cocos/gi/light-probe/Delaunay.h +++ b/native/cocos/gi/light-probe/Delaunay.h @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/gi/light-probe/LightProbe.cpp b/native/cocos/gi/light-probe/LightProbe.cpp index 06463a253b..85193c0fea 100644 --- a/native/cocos/gi/light-probe/LightProbe.cpp +++ b/native/cocos/gi/light-probe/LightProbe.cpp @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/gi/light-probe/LightProbe.h b/native/cocos/gi/light-probe/LightProbe.h index f62702bf99..bfb76e3dd9 100644 --- a/native/cocos/gi/light-probe/LightProbe.h +++ b/native/cocos/gi/light-probe/LightProbe.h @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/gi/light-probe/PolynomialSolver.cpp b/native/cocos/gi/light-probe/PolynomialSolver.cpp index 63daa7de38..c1797e7ee9 100644 --- a/native/cocos/gi/light-probe/PolynomialSolver.cpp +++ b/native/cocos/gi/light-probe/PolynomialSolver.cpp @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/gi/light-probe/PolynomialSolver.h b/native/cocos/gi/light-probe/PolynomialSolver.h index f165856a2b..16e2a0ba61 100644 --- a/native/cocos/gi/light-probe/PolynomialSolver.h +++ b/native/cocos/gi/light-probe/PolynomialSolver.h @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/gi/light-probe/SH.cpp b/native/cocos/gi/light-probe/SH.cpp index 5308503dfa..e3c7f47842 100644 --- a/native/cocos/gi/light-probe/SH.cpp +++ b/native/cocos/gi/light-probe/SH.cpp @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/gi/light-probe/SH.h b/native/cocos/gi/light-probe/SH.h index a902f71483..eeebf4e29d 100644 --- a/native/cocos/gi/light-probe/SH.h +++ b/native/cocos/gi/light-probe/SH.h @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/main/EmptyMain.cpp b/native/cocos/main/EmptyMain.cpp index b3816b1a9c..433b779fb5 100644 --- a/native/cocos/main/EmptyMain.cpp +++ b/native/cocos/main/EmptyMain.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/math/Color.cpp b/native/cocos/math/Color.cpp index 5cc6466990..6d97d68fe8 100644 --- a/native/cocos/math/Color.cpp +++ b/native/cocos/math/Color.cpp @@ -1,27 +1,27 @@ /**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. -Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd. +Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #include "Color.h" diff --git a/native/cocos/math/Color.h b/native/cocos/math/Color.h index f09863154d..2a1f5ec2ff 100644 --- a/native/cocos/math/Color.h +++ b/native/cocos/math/Color.h @@ -1,27 +1,27 @@ /**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. -Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd. +Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #pragma once diff --git a/native/cocos/math/Geometry.cpp b/native/cocos/math/Geometry.cpp index 0d108c2a50..972f79d42a 100644 --- a/native/cocos/math/Geometry.cpp +++ b/native/cocos/math/Geometry.cpp @@ -1,27 +1,27 @@ /**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. +Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #include "math/Geometry.h" diff --git a/native/cocos/math/Geometry.h b/native/cocos/math/Geometry.h index 1857354703..3fde8a3453 100644 --- a/native/cocos/math/Geometry.h +++ b/native/cocos/math/Geometry.h @@ -1,27 +1,27 @@ /**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. +Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #pragma once diff --git a/native/cocos/math/Mat3.cpp b/native/cocos/math/Mat3.cpp index 6115c5c1d0..8d57001e13 100644 --- a/native/cocos/math/Mat3.cpp +++ b/native/cocos/math/Mat3.cpp @@ -1,18 +1,18 @@ /**************************************************************************** - Copyright (c) 2018-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2018-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -20,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #include "math/Mat3.h" diff --git a/native/cocos/math/Mat3.h b/native/cocos/math/Mat3.h index ce1763175a..96a7dab16a 100644 --- a/native/cocos/math/Mat3.h +++ b/native/cocos/math/Mat3.h @@ -1,18 +1,18 @@ /**************************************************************************** - Copyright (c) 2018-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2018-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -20,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once diff --git a/native/cocos/math/Mat4.cpp b/native/cocos/math/Mat4.cpp index 92831bddf0..f31cbd4d88 100644 --- a/native/cocos/math/Mat4.cpp +++ b/native/cocos/math/Mat4.cpp @@ -1,7 +1,7 @@ /** Copyright 2013 BlackBerry Inc. Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/native/cocos/math/Mat4.h b/native/cocos/math/Mat4.h index f5e609c27c..32566de60b 100644 --- a/native/cocos/math/Mat4.h +++ b/native/cocos/math/Mat4.h @@ -1,7 +1,7 @@ /** Copyright 2013 BlackBerry Inc. Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/native/cocos/math/Mat4.inl b/native/cocos/math/Mat4.inl index edfb8e18d6..438d90b055 100644 --- a/native/cocos/math/Mat4.inl +++ b/native/cocos/math/Mat4.inl @@ -1,5 +1,7 @@ /** Copyright 2013 BlackBerry Inc. + Copyright (c) 2014-2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/native/cocos/math/Math.cpp b/native/cocos/math/Math.cpp index 71fdc386bd..c5dc2d9a6f 100644 --- a/native/cocos/math/Math.cpp +++ b/native/cocos/math/Math.cpp @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #include "math/Math.h" #include #include diff --git a/native/cocos/math/Math.h b/native/cocos/math/Math.h index 7d03d620cf..00b285bb6b 100644 --- a/native/cocos/math/Math.h +++ b/native/cocos/math/Math.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once #include diff --git a/native/cocos/math/MathBase.h b/native/cocos/math/MathBase.h index 081e0973f2..3e5a48e807 100644 --- a/native/cocos/math/MathBase.h +++ b/native/cocos/math/MathBase.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #ifndef __CCMATHBASE_H__ #define __CCMATHBASE_H__ diff --git a/native/cocos/math/MathUtil.cpp b/native/cocos/math/MathUtil.cpp index 110d5618c8..b5d976bac4 100644 --- a/native/cocos/math/MathUtil.cpp +++ b/native/cocos/math/MathUtil.cpp @@ -1,7 +1,7 @@ /** Copyright 2013 BlackBerry Inc. Copyright (c) 2013-2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. +Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/native/cocos/math/MathUtil.h b/native/cocos/math/MathUtil.h index 8501319147..0bdb3a3371 100644 --- a/native/cocos/math/MathUtil.h +++ b/native/cocos/math/MathUtil.h @@ -1,7 +1,7 @@ /** Copyright 2013 BlackBerry Inc. Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/native/cocos/math/MathUtil.inl b/native/cocos/math/MathUtil.inl index 5148fa13d8..034f31b2c3 100644 --- a/native/cocos/math/MathUtil.inl +++ b/native/cocos/math/MathUtil.inl @@ -1,5 +1,7 @@ /** Copyright 2013 BlackBerry Inc. + Copyright (c) 2014-2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/native/cocos/math/MathUtilNeon.inl b/native/cocos/math/MathUtilNeon.inl index bf41e6c704..2b7b757bdb 100644 --- a/native/cocos/math/MathUtilNeon.inl +++ b/native/cocos/math/MathUtilNeon.inl @@ -1,5 +1,7 @@ /** Copyright 2013 BlackBerry Inc. + Copyright (c) 2014-2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/native/cocos/math/MathUtilNeon64.inl b/native/cocos/math/MathUtilNeon64.inl index 66f7587657..e58929c672 100644 --- a/native/cocos/math/MathUtilNeon64.inl +++ b/native/cocos/math/MathUtilNeon64.inl @@ -1,5 +1,7 @@ /** Copyright 2013 BlackBerry Inc. + Copyright (c) 2014-2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/native/cocos/math/MathUtilSSE.inl b/native/cocos/math/MathUtilSSE.inl index 3a6d5c1de0..89af5ec431 100644 --- a/native/cocos/math/MathUtilSSE.inl +++ b/native/cocos/math/MathUtilSSE.inl @@ -1,3 +1,25 @@ +/** + Copyright 2013 BlackBerry Inc. + Copyright (c) 2014-2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Original file from GamePlay3D: http://gameplay3d.org + + This file was modified to fit the cocos2d-x project + */ + NS_CC_MATH_BEGIN #ifdef __SSE__ diff --git a/native/cocos/math/Quaternion.cpp b/native/cocos/math/Quaternion.cpp index 9ddf869036..8a1da0fc30 100644 --- a/native/cocos/math/Quaternion.cpp +++ b/native/cocos/math/Quaternion.cpp @@ -1,7 +1,7 @@ /** Copyright 2013 BlackBerry Inc. Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/native/cocos/math/Quaternion.h b/native/cocos/math/Quaternion.h index b8908c9178..bced4875ee 100644 --- a/native/cocos/math/Quaternion.h +++ b/native/cocos/math/Quaternion.h @@ -1,7 +1,7 @@ /** Copyright 2013 BlackBerry Inc. Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/native/cocos/math/Quaternion.inl b/native/cocos/math/Quaternion.inl index f6ad8fec8f..e23707fcd7 100644 --- a/native/cocos/math/Quaternion.inl +++ b/native/cocos/math/Quaternion.inl @@ -1,5 +1,7 @@ /** Copyright 2013 BlackBerry Inc. + Copyright (c) 2014-2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/native/cocos/math/Utils.cpp b/native/cocos/math/Utils.cpp index dede0bcffe..5401e893ea 100644 --- a/native/cocos/math/Utils.cpp +++ b/native/cocos/math/Utils.cpp @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #include "cocos/math/Utils.h" #include diff --git a/native/cocos/math/Utils.h b/native/cocos/math/Utils.h index 1dfa9a06ca..56a1a1561b 100644 --- a/native/cocos/math/Utils.h +++ b/native/cocos/math/Utils.h @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #pragma once #include diff --git a/native/cocos/math/Vec2.cpp b/native/cocos/math/Vec2.cpp index 8ac8e99fde..9a14ad325c 100644 --- a/native/cocos/math/Vec2.cpp +++ b/native/cocos/math/Vec2.cpp @@ -1,7 +1,7 @@ /** Copyright 2013 BlackBerry Inc. Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/native/cocos/math/Vec2.h b/native/cocos/math/Vec2.h index 65f3771c4a..fd3b4a0c63 100644 --- a/native/cocos/math/Vec2.h +++ b/native/cocos/math/Vec2.h @@ -1,7 +1,7 @@ /** Copyright 2013 BlackBerry Inc. Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/native/cocos/math/Vec2.inl b/native/cocos/math/Vec2.inl index d6e71fc4b2..da1fab2f2d 100644 --- a/native/cocos/math/Vec2.inl +++ b/native/cocos/math/Vec2.inl @@ -1,5 +1,7 @@ /** Copyright 2013 BlackBerry Inc. + Copyright (c) 2014-2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/native/cocos/math/Vec3.cpp b/native/cocos/math/Vec3.cpp index 4deee0d715..14e2067b8c 100644 --- a/native/cocos/math/Vec3.cpp +++ b/native/cocos/math/Vec3.cpp @@ -1,7 +1,7 @@ /** Copyright 2013 BlackBerry Inc. Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/native/cocos/math/Vec3.h b/native/cocos/math/Vec3.h index f0e935db2e..4eb3159eb0 100644 --- a/native/cocos/math/Vec3.h +++ b/native/cocos/math/Vec3.h @@ -1,7 +1,7 @@ /** Copyright 2013 BlackBerry Inc. Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/native/cocos/math/Vec3.inl b/native/cocos/math/Vec3.inl index 9beceee4ec..9fe9f65c1d 100644 --- a/native/cocos/math/Vec3.inl +++ b/native/cocos/math/Vec3.inl @@ -1,5 +1,7 @@ /** Copyright 2013 BlackBerry Inc. + Copyright (c) 2014-2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/native/cocos/math/Vec4.cpp b/native/cocos/math/Vec4.cpp index 323d8e871f..888207e149 100644 --- a/native/cocos/math/Vec4.cpp +++ b/native/cocos/math/Vec4.cpp @@ -1,7 +1,7 @@ /** Copyright 2013 BlackBerry Inc. Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/native/cocos/math/Vec4.h b/native/cocos/math/Vec4.h index 5c0576a88d..4327691a42 100644 --- a/native/cocos/math/Vec4.h +++ b/native/cocos/math/Vec4.h @@ -1,7 +1,7 @@ /** Copyright 2013 BlackBerry Inc. Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/native/cocos/math/Vec4.inl b/native/cocos/math/Vec4.inl index d69aee16f1..0b95021f8e 100644 --- a/native/cocos/math/Vec4.inl +++ b/native/cocos/math/Vec4.inl @@ -1,5 +1,7 @@ /** Copyright 2013 BlackBerry Inc. + Copyright (c) 2014-2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/native/cocos/math/Vertex.cpp b/native/cocos/math/Vertex.cpp index 567430dff7..456f4eea34 100644 --- a/native/cocos/math/Vertex.cpp +++ b/native/cocos/math/Vertex.cpp @@ -2,16 +2,16 @@ Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2011 ForzeField Studios S.L Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +23,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #include "math/Vertex.h" #include "base/Macros.h" diff --git a/native/cocos/math/Vertex.h b/native/cocos/math/Vertex.h index 8227d5d699..09645444e1 100644 --- a/native/cocos/math/Vertex.h +++ b/native/cocos/math/Vertex.h @@ -2,16 +2,16 @@ Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2011 ForzeField Studios S.L Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +23,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #ifndef __CCVERTEX_H__ #define __CCVERTEX_H__ diff --git a/native/cocos/network/Downloader-curl.cpp b/native/cocos/network/Downloader-curl.cpp index 9e5e6016a9..e120843a62 100644 --- a/native/cocos/network/Downloader-curl.cpp +++ b/native/cocos/network/Downloader-curl.cpp @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2015-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -37,8 +36,8 @@ #include "base/std/container/deque.h" #include "base/std/container/set.h" #include "base/std/container/vector.h" -#include "platform/FileUtils.h" #include "network/Downloader.h" +#include "platform/FileUtils.h" // **NOTE** // In the file: diff --git a/native/cocos/network/Downloader-curl.h b/native/cocos/network/Downloader-curl.h index 6597c04904..19de775076 100644 --- a/native/cocos/network/Downloader-curl.h +++ b/native/cocos/network/Downloader-curl.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2015-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/network/Downloader-java.cpp b/native/cocos/network/Downloader-java.cpp index 076e373240..c67075be2b 100644 --- a/native/cocos/network/Downloader-java.cpp +++ b/native/cocos/network/Downloader-java.cpp @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2015-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -28,11 +27,11 @@ #include #include "application/ApplicationManager.h" +#include "base/StringUtil.h" #include "base/memory/Memory.h" #include "network/Downloader.h" #include "platform/java/jni/JniHelper.h" #include "platform/java/jni/JniImp.h" -#include "base/StringUtil.h" #ifndef JCLS_DOWNLOADER #define JCLS_DOWNLOADER "com/cocos/lib/CocosDownloader" diff --git a/native/cocos/network/Downloader-java.h b/native/cocos/network/Downloader-java.h index cbfb8fa6e8..6d36b2552d 100644 --- a/native/cocos/network/Downloader-java.h +++ b/native/cocos/network/Downloader-java.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2015-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/network/Downloader.cpp b/native/cocos/network/Downloader.cpp index bfd46cb551..226907cc36 100644 --- a/native/cocos/network/Downloader.cpp +++ b/native/cocos/network/Downloader.cpp @@ -1,20 +1,19 @@ /**************************************************************************** Copyright (c) 2015-2016 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/network/Downloader.h b/native/cocos/network/Downloader.h index 083e9bf4c9..dcafff0f42 100644 --- a/native/cocos/network/Downloader.h +++ b/native/cocos/network/Downloader.h @@ -1,20 +1,19 @@ /**************************************************************************** Copyright (c) 2015-2016 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/network/DownloaderImpl-apple.h b/native/cocos/network/DownloaderImpl-apple.h index f3030076a4..acc9a71fa4 100644 --- a/native/cocos/network/DownloaderImpl-apple.h +++ b/native/cocos/network/DownloaderImpl-apple.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2015-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/network/DownloaderImpl.h b/native/cocos/network/DownloaderImpl.h index 38069ff7ec..731e1443ee 100644 --- a/native/cocos/network/DownloaderImpl.h +++ b/native/cocos/network/DownloaderImpl.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2015-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/network/HttpAsynConnection-apple.h b/native/cocos/network/HttpAsynConnection-apple.h index 0a27f6a108..f3fa046c23 100644 --- a/native/cocos/network/HttpAsynConnection-apple.h +++ b/native/cocos/network/HttpAsynConnection-apple.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/network/HttpClient-java.cpp b/native/cocos/network/HttpClient-java.cpp index 46bb4eba71..0e1ec005a3 100644 --- a/native/cocos/network/HttpClient-java.cpp +++ b/native/cocos/network/HttpClient-java.cpp @@ -2,20 +2,19 @@ Copyright (c) 2012 greathqy Copyright (c) 2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/network/HttpClient.cpp b/native/cocos/network/HttpClient.cpp index d759a702a7..301a971273 100644 --- a/native/cocos/network/HttpClient.cpp +++ b/native/cocos/network/HttpClient.cpp @@ -2,20 +2,19 @@ Copyright (c) 2012 greathqy Copyright (c) 2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/network/HttpClient.h b/native/cocos/network/HttpClient.h index ff082afbbc..26ecb9ec6a 100644 --- a/native/cocos/network/HttpClient.h +++ b/native/cocos/network/HttpClient.h @@ -2,20 +2,19 @@ Copyright (c) 2012 greathqy Copyright (c) 2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/network/HttpCookie.cpp b/native/cocos/network/HttpCookie.cpp index a72ff5b209..ef83af0380 100644 --- a/native/cocos/network/HttpCookie.cpp +++ b/native/cocos/network/HttpCookie.cpp @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/network/HttpCookie.h b/native/cocos/network/HttpCookie.h index 5be98e4e47..f9837b1118 100644 --- a/native/cocos/network/HttpCookie.h +++ b/native/cocos/network/HttpCookie.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/network/HttpRequest.h b/native/cocos/network/HttpRequest.h index 8180cb7d56..31d01f04b6 100644 --- a/native/cocos/network/HttpRequest.h +++ b/native/cocos/network/HttpRequest.h @@ -1,20 +1,19 @@ /**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/network/HttpResponse.h b/native/cocos/network/HttpResponse.h index 33fe5d2693..974fac5d44 100644 --- a/native/cocos/network/HttpResponse.h +++ b/native/cocos/network/HttpResponse.h @@ -1,20 +1,19 @@ /**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/network/SocketIO.cpp b/native/cocos/network/SocketIO.cpp index abb9d10174..baa5c722fd 100644 --- a/native/cocos/network/SocketIO.cpp +++ b/native/cocos/network/SocketIO.cpp @@ -1,20 +1,19 @@ /**************************************************************************** Copyright (c) 2015 Chris Hannon http://www.channon.us Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/network/SocketIO.h b/native/cocos/network/SocketIO.h index d19eb2b7d3..118e69cbc4 100644 --- a/native/cocos/network/SocketIO.h +++ b/native/cocos/network/SocketIO.h @@ -1,20 +1,19 @@ /**************************************************************************** Copyright (c) 2015 Chris Hannon http://www.channon.us Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/network/WebSocket-libwebsockets.cpp b/native/cocos/network/WebSocket-libwebsockets.cpp index bbe28da48c..d31b7ae8d1 100644 --- a/native/cocos/network/WebSocket-libwebsockets.cpp +++ b/native/cocos/network/WebSocket-libwebsockets.cpp @@ -1,20 +1,19 @@ /**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/network/WebSocket-okhttp.cpp b/native/cocos/network/WebSocket-okhttp.cpp index e7484bfce0..6cdfc93547 100644 --- a/native/cocos/network/WebSocket-okhttp.cpp +++ b/native/cocos/network/WebSocket-okhttp.cpp @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #include #include "WebSocket.h" #include "application/ApplicationManager.h" diff --git a/native/cocos/network/WebSocket.h b/native/cocos/network/WebSocket.h index 4e7ed1a04f..e3b3469c9f 100644 --- a/native/cocos/network/WebSocket.h +++ b/native/cocos/network/WebSocket.h @@ -1,20 +1,19 @@ /**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/network/WebSocketServer.cpp b/native/cocos/network/WebSocketServer.cpp index 9e391438de..3e742f9aeb 100644 --- a/native/cocos/network/WebSocketServer.cpp +++ b/native/cocos/network/WebSocketServer.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -591,7 +590,7 @@ ccstd::unordered_map WebSocketServerConnection::ge } int WebSocketServer::websocketServerCallback(struct lws *wsi, enum lws_callback_reasons reason, - void * /*user*/, void *in, size_t len) { + void * /*user*/, void *in, size_t len) { int ret = 0; WebSocketServer *server = nullptr; lws_context *ctx = nullptr; diff --git a/native/cocos/network/WebSocketServer.h b/native/cocos/network/WebSocketServer.h index 464a2b2efd..8bb6a8db3f 100644 --- a/native/cocos/network/WebSocketServer.h +++ b/native/cocos/network/WebSocketServer.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -292,7 +291,7 @@ private: public: static int websocketServerCallback(struct lws *wsi, enum lws_callback_reasons reason, - void *user, void *in, size_t len); + void *user, void *in, size_t len); }; } // namespace network } // namespace cc diff --git a/native/cocos/physics/PhysicsSDK.h b/native/cocos/physics/PhysicsSDK.h index 9b27a61542..b3e5449195 100644 --- a/native/cocos/physics/PhysicsSDK.h +++ b/native/cocos/physics/PhysicsSDK.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/PhysicsSelector.h b/native/cocos/physics/PhysicsSelector.h index 27c2259326..290077e249 100644 --- a/native/cocos/physics/PhysicsSelector.h +++ b/native/cocos/physics/PhysicsSelector.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/physx/PhysX.h b/native/cocos/physics/physx/PhysX.h index 9236f0cb5b..31b87c06d0 100644 --- a/native/cocos/physics/physx/PhysX.h +++ b/native/cocos/physics/physx/PhysX.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -38,6 +37,6 @@ #include "physics/physx/shapes/PhysXTerrain.h" #include "physics/physx/shapes/PhysXTrimesh.h" -#include "physics/physx/joints/PhysXSpherical.h" -#include "physics/physx/joints/PhysXRevolute.h" #include "physics/physx/joints/PhysXFixedJoint.h" +#include "physics/physx/joints/PhysXRevolute.h" +#include "physics/physx/joints/PhysXSpherical.h" diff --git a/native/cocos/physics/physx/PhysXEventManager.cpp b/native/cocos/physics/physx/PhysXEventManager.cpp index 5d254f32a3..02bbec717b 100644 --- a/native/cocos/physics/physx/PhysXEventManager.cpp +++ b/native/cocos/physics/physx/PhysXEventManager.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/physx/PhysXEventManager.h b/native/cocos/physics/physx/PhysXEventManager.h index d17f05f3d0..a7619ad1f0 100644 --- a/native/cocos/physics/physx/PhysXEventManager.h +++ b/native/cocos/physics/physx/PhysXEventManager.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/physx/PhysXFilterShader.cpp b/native/cocos/physics/physx/PhysXFilterShader.cpp index aec948060d..b0e0bac417 100644 --- a/native/cocos/physics/physx/PhysXFilterShader.cpp +++ b/native/cocos/physics/physx/PhysXFilterShader.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/physx/PhysXFilterShader.h b/native/cocos/physics/physx/PhysXFilterShader.h index a2d0373409..187f777b0e 100644 --- a/native/cocos/physics/physx/PhysXFilterShader.h +++ b/native/cocos/physics/physx/PhysXFilterShader.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/physx/PhysXInc.h b/native/cocos/physics/physx/PhysXInc.h index 805d42d33a..8bab6d90c0 100644 --- a/native/cocos/physics/physx/PhysXInc.h +++ b/native/cocos/physics/physx/PhysXInc.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/physx/PhysXRigidBody.cpp b/native/cocos/physics/physx/PhysXRigidBody.cpp index 856da7c02c..90e6725213 100644 --- a/native/cocos/physics/physx/PhysXRigidBody.cpp +++ b/native/cocos/physics/physx/PhysXRigidBody.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/physx/PhysXRigidBody.h b/native/cocos/physics/physx/PhysXRigidBody.h index 3d7afaea64..1acd34d6a7 100644 --- a/native/cocos/physics/physx/PhysXRigidBody.h +++ b/native/cocos/physics/physx/PhysXRigidBody.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/physx/PhysXSharedBody.cpp b/native/cocos/physics/physx/PhysXSharedBody.cpp index 87c0c1c468..a09e53d49e 100644 --- a/native/cocos/physics/physx/PhysXSharedBody.cpp +++ b/native/cocos/physics/physx/PhysXSharedBody.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/physx/PhysXSharedBody.h b/native/cocos/physics/physx/PhysXSharedBody.h index 13fe99a814..c406f84e14 100644 --- a/native/cocos/physics/physx/PhysXSharedBody.h +++ b/native/cocos/physics/physx/PhysXSharedBody.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/physx/PhysXUtils.cpp b/native/cocos/physics/physx/PhysXUtils.cpp index f489f9c9ea..a1829365bc 100644 --- a/native/cocos/physics/physx/PhysXUtils.cpp +++ b/native/cocos/physics/physx/PhysXUtils.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/physx/PhysXUtils.h b/native/cocos/physics/physx/PhysXUtils.h index 2ea6de24bc..2d61e9cee4 100644 --- a/native/cocos/physics/physx/PhysXUtils.h +++ b/native/cocos/physics/physx/PhysXUtils.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/physx/PhysXWorld.cpp b/native/cocos/physics/physx/PhysXWorld.cpp index fb96001b68..34b41f979e 100644 --- a/native/cocos/physics/physx/PhysXWorld.cpp +++ b/native/cocos/physics/physx/PhysXWorld.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/physx/PhysXWorld.h b/native/cocos/physics/physx/PhysXWorld.h index 363579fd1a..c116208a57 100644 --- a/native/cocos/physics/physx/PhysXWorld.h +++ b/native/cocos/physics/physx/PhysXWorld.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/physx/joints/PhysXFixedJoint.cpp b/native/cocos/physics/physx/joints/PhysXFixedJoint.cpp index 1de7077096..c44b5f2e39 100644 --- a/native/cocos/physics/physx/joints/PhysXFixedJoint.cpp +++ b/native/cocos/physics/physx/joints/PhysXFixedJoint.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/physx/joints/PhysXFixedJoint.h b/native/cocos/physics/physx/joints/PhysXFixedJoint.h index 1e02cbbf2a..d04201808e 100644 --- a/native/cocos/physics/physx/joints/PhysXFixedJoint.h +++ b/native/cocos/physics/physx/joints/PhysXFixedJoint.h @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/physx/joints/PhysXJoint.cpp b/native/cocos/physics/physx/joints/PhysXJoint.cpp index 53f314152a..460d4bfd17 100644 --- a/native/cocos/physics/physx/joints/PhysXJoint.cpp +++ b/native/cocos/physics/physx/joints/PhysXJoint.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/physx/joints/PhysXJoint.h b/native/cocos/physics/physx/joints/PhysXJoint.h index fceb3c520f..f7f02836b8 100644 --- a/native/cocos/physics/physx/joints/PhysXJoint.h +++ b/native/cocos/physics/physx/joints/PhysXJoint.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/physx/joints/PhysXRevolute.cpp b/native/cocos/physics/physx/joints/PhysXRevolute.cpp index d2ce2befa9..32fa2e724d 100644 --- a/native/cocos/physics/physx/joints/PhysXRevolute.cpp +++ b/native/cocos/physics/physx/joints/PhysXRevolute.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/physx/joints/PhysXRevolute.h b/native/cocos/physics/physx/joints/PhysXRevolute.h index d3ed75938a..f0b5e51d56 100644 --- a/native/cocos/physics/physx/joints/PhysXRevolute.h +++ b/native/cocos/physics/physx/joints/PhysXRevolute.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/physx/joints/PhysXSpherical.cpp b/native/cocos/physics/physx/joints/PhysXSpherical.cpp index a9bdd270b9..bb664c46f7 100644 --- a/native/cocos/physics/physx/joints/PhysXSpherical.cpp +++ b/native/cocos/physics/physx/joints/PhysXSpherical.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/physx/joints/PhysXSpherical.h b/native/cocos/physics/physx/joints/PhysXSpherical.h index 863ae784a6..67a9b0aaf2 100644 --- a/native/cocos/physics/physx/joints/PhysXSpherical.h +++ b/native/cocos/physics/physx/joints/PhysXSpherical.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -33,7 +32,7 @@ namespace physics { class PhysXSpherical final : public PhysXJoint, public IDistanceJoint { public: PhysXSpherical() : _mPivotA(physx::PxZero), - _mPivotB(physx::PxZero){}; + _mPivotB(physx::PxZero){}; ~PhysXSpherical() override = default; void setPivotA(float x, float y, float z) override; diff --git a/native/cocos/physics/physx/shapes/PhysXBox.cpp b/native/cocos/physics/physx/shapes/PhysXBox.cpp index e57c926eec..755f75f084 100644 --- a/native/cocos/physics/physx/shapes/PhysXBox.cpp +++ b/native/cocos/physics/physx/shapes/PhysXBox.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/physx/shapes/PhysXBox.h b/native/cocos/physics/physx/shapes/PhysXBox.h index b897ddb56e..1e0b4e1a0a 100644 --- a/native/cocos/physics/physx/shapes/PhysXBox.h +++ b/native/cocos/physics/physx/shapes/PhysXBox.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/physx/shapes/PhysXCapsule.cpp b/native/cocos/physics/physx/shapes/PhysXCapsule.cpp index 50764b979c..bfda4c1738 100644 --- a/native/cocos/physics/physx/shapes/PhysXCapsule.cpp +++ b/native/cocos/physics/physx/shapes/PhysXCapsule.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/physx/shapes/PhysXCapsule.h b/native/cocos/physics/physx/shapes/PhysXCapsule.h index aaadf2b011..eebf3a5b2b 100644 --- a/native/cocos/physics/physx/shapes/PhysXCapsule.h +++ b/native/cocos/physics/physx/shapes/PhysXCapsule.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/physx/shapes/PhysXCone.cpp b/native/cocos/physics/physx/shapes/PhysXCone.cpp index 76d57b5182..268f9d1367 100644 --- a/native/cocos/physics/physx/shapes/PhysXCone.cpp +++ b/native/cocos/physics/physx/shapes/PhysXCone.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/physx/shapes/PhysXCone.h b/native/cocos/physics/physx/shapes/PhysXCone.h index 4753086fd8..273ce616f2 100644 --- a/native/cocos/physics/physx/shapes/PhysXCone.h +++ b/native/cocos/physics/physx/shapes/PhysXCone.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/physx/shapes/PhysXCylinder.cpp b/native/cocos/physics/physx/shapes/PhysXCylinder.cpp index 1cab3e8849..3343ac048e 100644 --- a/native/cocos/physics/physx/shapes/PhysXCylinder.cpp +++ b/native/cocos/physics/physx/shapes/PhysXCylinder.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/physx/shapes/PhysXCylinder.h b/native/cocos/physics/physx/shapes/PhysXCylinder.h index 0b94cb6b23..12b19ac8f7 100644 --- a/native/cocos/physics/physx/shapes/PhysXCylinder.h +++ b/native/cocos/physics/physx/shapes/PhysXCylinder.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/physx/shapes/PhysXPlane.cpp b/native/cocos/physics/physx/shapes/PhysXPlane.cpp index 112418bc47..00f47a4738 100644 --- a/native/cocos/physics/physx/shapes/PhysXPlane.cpp +++ b/native/cocos/physics/physx/shapes/PhysXPlane.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/physx/shapes/PhysXPlane.h b/native/cocos/physics/physx/shapes/PhysXPlane.h index 34a6c3647e..12680c9e09 100644 --- a/native/cocos/physics/physx/shapes/PhysXPlane.h +++ b/native/cocos/physics/physx/shapes/PhysXPlane.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/physx/shapes/PhysXShape.cpp b/native/cocos/physics/physx/shapes/PhysXShape.cpp index 2797960228..829a544a16 100644 --- a/native/cocos/physics/physx/shapes/PhysXShape.cpp +++ b/native/cocos/physics/physx/shapes/PhysXShape.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/physx/shapes/PhysXShape.h b/native/cocos/physics/physx/shapes/PhysXShape.h index de714aca1a..bcff8efe95 100644 --- a/native/cocos/physics/physx/shapes/PhysXShape.h +++ b/native/cocos/physics/physx/shapes/PhysXShape.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/physx/shapes/PhysXSphere.cpp b/native/cocos/physics/physx/shapes/PhysXSphere.cpp index d5dffdc55d..daed28a257 100644 --- a/native/cocos/physics/physx/shapes/PhysXSphere.cpp +++ b/native/cocos/physics/physx/shapes/PhysXSphere.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/physx/shapes/PhysXSphere.h b/native/cocos/physics/physx/shapes/PhysXSphere.h index 8a49051228..602e25459d 100644 --- a/native/cocos/physics/physx/shapes/PhysXSphere.h +++ b/native/cocos/physics/physx/shapes/PhysXSphere.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/physx/shapes/PhysXTerrain.cpp b/native/cocos/physics/physx/shapes/PhysXTerrain.cpp index e20310dc69..36e40e2ebc 100644 --- a/native/cocos/physics/physx/shapes/PhysXTerrain.cpp +++ b/native/cocos/physics/physx/shapes/PhysXTerrain.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/physx/shapes/PhysXTerrain.h b/native/cocos/physics/physx/shapes/PhysXTerrain.h index 32cef9f261..7bf77f66e0 100644 --- a/native/cocos/physics/physx/shapes/PhysXTerrain.h +++ b/native/cocos/physics/physx/shapes/PhysXTerrain.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/physx/shapes/PhysXTrimesh.cpp b/native/cocos/physics/physx/shapes/PhysXTrimesh.cpp index 6a81215701..f4b0506044 100644 --- a/native/cocos/physics/physx/shapes/PhysXTrimesh.cpp +++ b/native/cocos/physics/physx/shapes/PhysXTrimesh.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/physx/shapes/PhysXTrimesh.h b/native/cocos/physics/physx/shapes/PhysXTrimesh.h index e47ac30db5..54a04ce2e1 100644 --- a/native/cocos/physics/physx/shapes/PhysXTrimesh.h +++ b/native/cocos/physics/physx/shapes/PhysXTrimesh.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/sdk/Joint.cpp b/native/cocos/physics/sdk/Joint.cpp index 56444534b8..4e3298fad9 100644 --- a/native/cocos/physics/sdk/Joint.cpp +++ b/native/cocos/physics/sdk/Joint.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/sdk/Joint.h b/native/cocos/physics/sdk/Joint.h index ffc2578db9..b093668cc0 100644 --- a/native/cocos/physics/sdk/Joint.h +++ b/native/cocos/physics/sdk/Joint.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -63,7 +62,8 @@ void setPivotB(float x, float y, float z) override; CC_PHYSICS_JOINT_CLASS(FixedJoint) void setBreakForce(float force) override; void setBreakTorque(float torque) override; -}; // FixedJoint +} +; // FixedJoint } // namespace physics } // namespace cc diff --git a/native/cocos/physics/sdk/RigidBody.cpp b/native/cocos/physics/sdk/RigidBody.cpp index 6eb218c2e8..6f7b55759d 100644 --- a/native/cocos/physics/sdk/RigidBody.cpp +++ b/native/cocos/physics/sdk/RigidBody.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/sdk/RigidBody.h b/native/cocos/physics/sdk/RigidBody.h index 9b67d9c423..acc35e1704 100644 --- a/native/cocos/physics/sdk/RigidBody.h +++ b/native/cocos/physics/sdk/RigidBody.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/sdk/Shape.cpp b/native/cocos/physics/sdk/Shape.cpp index b36969749d..ff77b25f72 100644 --- a/native/cocos/physics/sdk/Shape.cpp +++ b/native/cocos/physics/sdk/Shape.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/sdk/Shape.h b/native/cocos/physics/sdk/Shape.h index 09265f1a54..735b68168f 100644 --- a/native/cocos/physics/sdk/Shape.h +++ b/native/cocos/physics/sdk/Shape.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/sdk/World.cpp b/native/cocos/physics/sdk/World.cpp index 76ec9d6d85..9f2b30159d 100644 --- a/native/cocos/physics/sdk/World.cpp +++ b/native/cocos/physics/sdk/World.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/sdk/World.h b/native/cocos/physics/sdk/World.h index 083a1e2e99..631d78f0be 100644 --- a/native/cocos/physics/sdk/World.h +++ b/native/cocos/physics/sdk/World.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/spec/IBody.h b/native/cocos/physics/spec/IBody.h index 529c430c31..6e791615f0 100644 --- a/native/cocos/physics/spec/IBody.h +++ b/native/cocos/physics/spec/IBody.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/spec/IJoint.h b/native/cocos/physics/spec/IJoint.h index 0fba9d622a..788388ad82 100644 --- a/native/cocos/physics/spec/IJoint.h +++ b/native/cocos/physics/spec/IJoint.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/spec/ILifecycle.h b/native/cocos/physics/spec/ILifecycle.h index 331c6b3680..525226485f 100644 --- a/native/cocos/physics/spec/ILifecycle.h +++ b/native/cocos/physics/spec/ILifecycle.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/spec/IShape.h b/native/cocos/physics/spec/IShape.h index 3274974d73..b948a9675b 100644 --- a/native/cocos/physics/spec/IShape.h +++ b/native/cocos/physics/spec/IShape.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/physics/spec/IWorld.h b/native/cocos/physics/spec/IWorld.h index 69b718a6c1..817329560f 100644 --- a/native/cocos/physics/spec/IWorld.h +++ b/native/cocos/physics/spec/IWorld.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/BasePlatform.cpp b/native/cocos/platform/BasePlatform.cpp index ffc79f65f6..fc56a779c8 100644 --- a/native/cocos/platform/BasePlatform.cpp +++ b/native/cocos/platform/BasePlatform.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/BasePlatform.h b/native/cocos/platform/BasePlatform.h index 17dab21025..27a79907ae 100644 --- a/native/cocos/platform/BasePlatform.h +++ b/native/cocos/platform/BasePlatform.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/FileUtils.cpp b/native/cocos/platform/FileUtils.cpp index e48cce1773..4f2d0844ac 100644 --- a/native/cocos/platform/FileUtils.cpp +++ b/native/cocos/platform/FileUtils.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/FileUtils.h b/native/cocos/platform/FileUtils.h index aba24b305d..3aec2fe4f0 100644 --- a/native/cocos/platform/FileUtils.h +++ b/native/cocos/platform/FileUtils.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/Image.cpp b/native/cocos/platform/Image.cpp index 92ab0d5937..5a195002a5 100644 --- a/native/cocos/platform/Image.cpp +++ b/native/cocos/platform/Image.cpp @@ -1,20 +1,19 @@ /**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2016-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2016-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -54,8 +53,8 @@ extern "C" { #include "base/etc2.h" } -#include "base/astc.h" #include "base/Compressed.h" +#include "base/astc.h" #if CC_USE_WEBP #include "webp/decode.h" @@ -288,7 +287,7 @@ bool Image::initWithImageFile(const ccstd::string &path) { return ret; } -bool Image::initWithImageData(const unsigned char *data, uint32_t dataLen) { //NOLINT(misc-no-recursion) +bool Image::initWithImageData(const unsigned char *data, uint32_t dataLen) { //NOLINT(misc-no-recursion) bool ret = false; do { CC_BREAK_IF(!data || dataLen <= 0); @@ -884,7 +883,7 @@ bool Image::initWithASTCData(const unsigned char *data, uint32_t dataLen) { return true; } -bool Image::initWithCompressedMipsData(const unsigned char *data, uint32_t /*dataLen*/) { //NOLINT(misc-no-recursion) +bool Image::initWithCompressedMipsData(const unsigned char *data, uint32_t /*dataLen*/) { //NOLINT(misc-no-recursion) //check the data if (!compressedIsValid(data)) { return false; diff --git a/native/cocos/platform/Image.h b/native/cocos/platform/Image.h index 4206bfd0b5..17ae7e9334 100644 --- a/native/cocos/platform/Image.h +++ b/native/cocos/platform/Image.h @@ -1,20 +1,19 @@ /**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2016-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2016-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/SAXParser.cpp b/native/cocos/platform/SAXParser.cpp index 2a8f1a5982..57bf7d609c 100644 --- a/native/cocos/platform/SAXParser.cpp +++ b/native/cocos/platform/SAXParser.cpp @@ -3,20 +3,19 @@ Copyright (c) 2010 cocos2d-x.org Copyright (c) 2013 Martell Malone Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/SAXParser.h b/native/cocos/platform/SAXParser.h index 3c57cb2e9b..d22734a5f1 100644 --- a/native/cocos/platform/SAXParser.h +++ b/native/cocos/platform/SAXParser.h @@ -2,20 +2,19 @@ Copyright (c) 2010 cocos2d-x.org Copyright (c) 2010 Максим Аксенов Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/SDLHelper.cpp b/native/cocos/platform/SDLHelper.cpp index 05fa1db0f4..02fdeea4e9 100644 --- a/native/cocos/platform/SDLHelper.cpp +++ b/native/cocos/platform/SDLHelper.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/SDLHelper.h b/native/cocos/platform/SDLHelper.h index 062d5dd051..8089d74be3 100644 --- a/native/cocos/platform/SDLHelper.h +++ b/native/cocos/platform/SDLHelper.h @@ -1,26 +1,25 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #pragma once @@ -55,7 +54,7 @@ public: static void setCursorEnabled(bool value); private: - static void dispatchSDLEvent( uint32_t windowId, const SDL_Event& sdlEvent, bool* quit); + static void dispatchSDLEvent(uint32_t windowId, const SDL_Event& sdlEvent, bool* quit); static void dispatchWindowEvent(uint32_t windowId, const SDL_WindowEvent& wevent); }; } // namespace cc diff --git a/native/cocos/platform/UniversalPlatform.cpp b/native/cocos/platform/UniversalPlatform.cpp index 8138806b1f..578cfe60ad 100644 --- a/native/cocos/platform/UniversalPlatform.cpp +++ b/native/cocos/platform/UniversalPlatform.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/UniversalPlatform.h b/native/cocos/platform/UniversalPlatform.h index d5d8375191..1c022ce8f7 100644 --- a/native/cocos/platform/UniversalPlatform.h +++ b/native/cocos/platform/UniversalPlatform.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/android/AndroidPlatform.cpp b/native/cocos/platform/android/AndroidPlatform.cpp index 97a9b1bbab..303c2cfffb 100644 --- a/native/cocos/platform/android/AndroidPlatform.cpp +++ b/native/cocos/platform/android/AndroidPlatform.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/android/AndroidPlatform.h b/native/cocos/platform/android/AndroidPlatform.h index e203f3f75e..33af278111 100644 --- a/native/cocos/platform/android/AndroidPlatform.h +++ b/native/cocos/platform/android/AndroidPlatform.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/android/FileUtils-android.cpp b/native/cocos/platform/android/FileUtils-android.cpp index 18e915172c..9e36f7d8a4 100644 --- a/native/cocos/platform/android/FileUtils-android.cpp +++ b/native/cocos/platform/android/FileUtils-android.cpp @@ -1,20 +1,19 @@ /**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/android/FileUtils-android.h b/native/cocos/platform/android/FileUtils-android.h index 76c8ce146a..2b8db4e36f 100644 --- a/native/cocos/platform/android/FileUtils-android.h +++ b/native/cocos/platform/android/FileUtils-android.h @@ -1,20 +1,19 @@ /**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/android/jni/JniCocosEntry.cpp b/native/cocos/platform/android/jni/JniCocosEntry.cpp index 8d588c7a35..9334f01c26 100644 --- a/native/cocos/platform/android/jni/JniCocosEntry.cpp +++ b/native/cocos/platform/android/jni/JniCocosEntry.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/android/jni/JniCocosSurfaceView.cpp b/native/cocos/platform/android/jni/JniCocosSurfaceView.cpp index 2bccc4676a..16e2e80c26 100644 --- a/native/cocos/platform/android/jni/JniCocosSurfaceView.cpp +++ b/native/cocos/platform/android/jni/JniCocosSurfaceView.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/android/libcocosxr/src/com/cocos/lib/xr/CocosXRVideoManager.java b/native/cocos/platform/android/libcocosxr/src/com/cocos/lib/xr/CocosXRVideoManager.java index f5c7fc5f56..6610cde6d7 100644 --- a/native/cocos/platform/android/libcocosxr/src/com/cocos/lib/xr/CocosXRVideoManager.java +++ b/native/cocos/platform/android/libcocosxr/src/com/cocos/lib/xr/CocosXRVideoManager.java @@ -218,12 +218,15 @@ public class CocosXRVideoManager { private void processVideoEvent(String eventData) { VideoEventData videoEventData = new VideoEventData(eventData); if (videoEventData.eventId == VIDEO_EVENT_PREPARE) { - if (!xrVideoPlayerHashMap.containsKey(videoEventData.videoPlayerHandleKey)) { - CocosXRVideoPlayer videoPlayer = new CocosXRVideoPlayer(activityWeakReference, videoEventData.videoPlayerHandleKey, videoEventData.eventName); + CocosXRVideoPlayer videoPlayer = xrVideoPlayerHashMap.get(videoEventData.videoPlayerHandleKey); + if (videoPlayer == null) { + videoPlayer = new CocosXRVideoPlayer(activityWeakReference, videoEventData.videoPlayerHandleKey, videoEventData.eventName); + videoPlayer.prepare(videoEventData); xrVideoPlayerHashMap.put(videoEventData.videoPlayerHandleKey, videoPlayer); + } else { + videoPlayer.prepare(videoEventData); } - xrVideoPlayerHashMap.get(videoEventData.videoPlayerHandleKey).prepare(videoEventData); if (videoGLThread == null) { videoGLThread = new CocosXRVideoGLThread(); videoGLThread.start(); diff --git a/native/cocos/platform/android/libcocosxr/src/com/cocos/lib/xr/CocosXRVideoPlayer.java b/native/cocos/platform/android/libcocosxr/src/com/cocos/lib/xr/CocosXRVideoPlayer.java index 3fb490be96..e41c65c9d4 100644 --- a/native/cocos/platform/android/libcocosxr/src/com/cocos/lib/xr/CocosXRVideoPlayer.java +++ b/native/cocos/platform/android/libcocosxr/src/com/cocos/lib/xr/CocosXRVideoPlayer.java @@ -39,6 +39,7 @@ public class CocosXRVideoPlayer { enum MediaPlayerState { IDLE, INITIALIZED, + READY_PREPARE, PREPARING, PREPARED, STARTED, @@ -174,12 +175,15 @@ public class CocosXRVideoPlayer { Log.e(TAG, "prepare:" + e.getLocalizedMessage()); } } + mediaPlayerState = MediaPlayerState.READY_PREPARE; if (isGLInitialized) { runOnUIThread(new Runnable() { @Override public void run() { - mediaPlayerState = MediaPlayerState.PREPARING; - mediaPlayer.prepareAsync(); + if(mediaPlayerState == MediaPlayerState.READY_PREPARE) { + mediaPlayerState = MediaPlayerState.PREPARING; + mediaPlayer.prepareAsync(); + } } }); } @@ -222,12 +226,17 @@ public class CocosXRVideoPlayer { mediaPlayer.setSurface(surface); surface.release(); isGLInitialized = true; - runOnUIThread(new Runnable() { - @Override - public void run() { - mediaPlayer.prepareAsync(); - } - }); + if(mediaPlayerState == MediaPlayerState.READY_PREPARE) { + runOnUIThread(new Runnable() { + @Override + public void run() { + if(mediaPlayerState == MediaPlayerState.READY_PREPARE) { + mediaPlayerState = MediaPlayerState.PREPARING; + mediaPlayer.prepareAsync(); + } + } + }); + } } public void onBeforeGLDrawFrame() { diff --git a/native/cocos/platform/android/modules/Screen.cpp b/native/cocos/platform/android/modules/Screen.cpp index 5d8cd5d4fb..41e67501af 100644 --- a/native/cocos/platform/android/modules/Screen.cpp +++ b/native/cocos/platform/android/modules/Screen.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/android/modules/Screen.h b/native/cocos/platform/android/modules/Screen.h index 7d2b92b875..d359c453f5 100644 --- a/native/cocos/platform/android/modules/Screen.h +++ b/native/cocos/platform/android/modules/Screen.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/android/modules/System.cpp b/native/cocos/platform/android/modules/System.cpp index 9032437d8d..97ea8ef5ef 100644 --- a/native/cocos/platform/android/modules/System.cpp +++ b/native/cocos/platform/android/modules/System.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/android/modules/System.h b/native/cocos/platform/android/modules/System.h index 6752de516d..ba23e578fc 100644 --- a/native/cocos/platform/android/modules/System.h +++ b/native/cocos/platform/android/modules/System.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/apple/FileUtils-apple.h b/native/cocos/platform/apple/FileUtils-apple.h index 17c9c54d08..49be63d222 100644 --- a/native/cocos/platform/apple/FileUtils-apple.h +++ b/native/cocos/platform/apple/FileUtils-apple.h @@ -2,20 +2,19 @@ Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2011 Zynga Inc. Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/apple/JsbBridge.h b/native/cocos/platform/apple/JsbBridge.h index 998f09e7d5..ec0e4c93ad 100644 --- a/native/cocos/platform/apple/JsbBridge.h +++ b/native/cocos/platform/apple/JsbBridge.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2018-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2018-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/apple/JsbBridgeWrapper.h b/native/cocos/platform/apple/JsbBridgeWrapper.h index 8ceb45251f..ad887aea9f 100644 --- a/native/cocos/platform/apple/JsbBridgeWrapper.h +++ b/native/cocos/platform/apple/JsbBridgeWrapper.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2018-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2018-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/apple/Reachability.cpp b/native/cocos/platform/apple/Reachability.cpp index a7d7364032..fc4ea45426 100644 --- a/native/cocos/platform/apple/Reachability.cpp +++ b/native/cocos/platform/apple/Reachability.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/apple/Reachability.h b/native/cocos/platform/apple/Reachability.h index 07f5a83153..64b93f1f43 100644 --- a/native/cocos/platform/apple/Reachability.h +++ b/native/cocos/platform/apple/Reachability.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/apple/modules/CanvasRenderingContext2DDelegate.h b/native/cocos/platform/apple/modules/CanvasRenderingContext2DDelegate.h index 703baafdc6..e3fea7cf6d 100644 --- a/native/cocos/platform/apple/modules/CanvasRenderingContext2DDelegate.h +++ b/native/cocos/platform/apple/modules/CanvasRenderingContext2DDelegate.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2018-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2018-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/empty/EmptyPlatform.cpp b/native/cocos/platform/empty/EmptyPlatform.cpp index b391284afe..7b247e8c87 100644 --- a/native/cocos/platform/empty/EmptyPlatform.cpp +++ b/native/cocos/platform/empty/EmptyPlatform.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -24,7 +23,6 @@ ****************************************************************************/ #include "platform/empty/EmptyPlatform.h" -#include "platform/interfaces/OSInterface.h" #include "modules/Accelerometer.h" #include "modules/Battery.h" #include "modules/Network.h" @@ -32,6 +30,7 @@ #include "modules/System.h" #include "modules/SystemWindow.h" #include "modules/Vibrator.h" +#include "platform/interfaces/OSInterface.h" #include #include diff --git a/native/cocos/platform/empty/EmptyPlatform.h b/native/cocos/platform/empty/EmptyPlatform.h index ed05654dae..15fbe2536d 100644 --- a/native/cocos/platform/empty/EmptyPlatform.h +++ b/native/cocos/platform/empty/EmptyPlatform.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/empty/modules/Accelerometer.cpp b/native/cocos/platform/empty/modules/Accelerometer.cpp index 96bed8de1b..611ccd6db7 100644 --- a/native/cocos/platform/empty/modules/Accelerometer.cpp +++ b/native/cocos/platform/empty/modules/Accelerometer.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/empty/modules/Accelerometer.h b/native/cocos/platform/empty/modules/Accelerometer.h index 0da82d3c95..8a577f416e 100644 --- a/native/cocos/platform/empty/modules/Accelerometer.h +++ b/native/cocos/platform/empty/modules/Accelerometer.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/empty/modules/Battery.cpp b/native/cocos/platform/empty/modules/Battery.cpp index 814ab41fda..a99b1a6a78 100644 --- a/native/cocos/platform/empty/modules/Battery.cpp +++ b/native/cocos/platform/empty/modules/Battery.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/empty/modules/Battery.h b/native/cocos/platform/empty/modules/Battery.h index 7b7fc1fbe7..31a428a8d6 100644 --- a/native/cocos/platform/empty/modules/Battery.h +++ b/native/cocos/platform/empty/modules/Battery.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/empty/modules/CanvasRenderingContext2DDelegate.cpp b/native/cocos/platform/empty/modules/CanvasRenderingContext2DDelegate.cpp index 95a5e2726e..d648e1a032 100644 --- a/native/cocos/platform/empty/modules/CanvasRenderingContext2DDelegate.cpp +++ b/native/cocos/platform/empty/modules/CanvasRenderingContext2DDelegate.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -20,8 +19,8 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. \ - ****************************************************************************/ + THE SOFTWARE. +****************************************************************************/ #include "platform/empty/modules/CanvasRenderingContext2DDelegate.h" #include "platform/empty/EmptyPlatform.h" diff --git a/native/cocos/platform/empty/modules/CanvasRenderingContext2DDelegate.h b/native/cocos/platform/empty/modules/CanvasRenderingContext2DDelegate.h index ccdaa2edc6..b69a59550d 100644 --- a/native/cocos/platform/empty/modules/CanvasRenderingContext2DDelegate.h +++ b/native/cocos/platform/empty/modules/CanvasRenderingContext2DDelegate.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/empty/modules/Network.cpp b/native/cocos/platform/empty/modules/Network.cpp index 4e64245d44..790bda9b56 100644 --- a/native/cocos/platform/empty/modules/Network.cpp +++ b/native/cocos/platform/empty/modules/Network.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/empty/modules/Network.h b/native/cocos/platform/empty/modules/Network.h index 7a9ebae20d..27b36dd205 100644 --- a/native/cocos/platform/empty/modules/Network.h +++ b/native/cocos/platform/empty/modules/Network.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/empty/modules/Screen.cpp b/native/cocos/platform/empty/modules/Screen.cpp index 3f63d0f7a0..8772bc37fb 100644 --- a/native/cocos/platform/empty/modules/Screen.cpp +++ b/native/cocos/platform/empty/modules/Screen.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/empty/modules/Screen.h b/native/cocos/platform/empty/modules/Screen.h index 0180869a4b..40628aa134 100644 --- a/native/cocos/platform/empty/modules/Screen.h +++ b/native/cocos/platform/empty/modules/Screen.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/empty/modules/System.cpp b/native/cocos/platform/empty/modules/System.cpp index 499b5bc3e7..baf862eeef 100644 --- a/native/cocos/platform/empty/modules/System.cpp +++ b/native/cocos/platform/empty/modules/System.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/empty/modules/System.h b/native/cocos/platform/empty/modules/System.h index ecab3e7638..1dd6fba91c 100644 --- a/native/cocos/platform/empty/modules/System.h +++ b/native/cocos/platform/empty/modules/System.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/empty/modules/SystemWindow.cpp b/native/cocos/platform/empty/modules/SystemWindow.cpp index 3ac2003c46..4a4eae0b6e 100644 --- a/native/cocos/platform/empty/modules/SystemWindow.cpp +++ b/native/cocos/platform/empty/modules/SystemWindow.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/empty/modules/SystemWindow.h b/native/cocos/platform/empty/modules/SystemWindow.h index c1fb4ee3ce..ffb390fd9c 100644 --- a/native/cocos/platform/empty/modules/SystemWindow.h +++ b/native/cocos/platform/empty/modules/SystemWindow.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/empty/modules/SystemWindowManager.cpp b/native/cocos/platform/empty/modules/SystemWindowManager.cpp index e0b3ebf9b7..e8a09cb61d 100644 --- a/native/cocos/platform/empty/modules/SystemWindowManager.cpp +++ b/native/cocos/platform/empty/modules/SystemWindowManager.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,12 +20,12 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #include "SystemWindowManager.h" #include "platform/BasePlatform.h" -#include "platform/interfaces/modules/ISystemWindowManager.h" #include "platform/empty/modules/SystemWindow.h" +#include "platform/interfaces/modules/ISystemWindowManager.h" namespace cc { @@ -34,8 +33,7 @@ int SystemWindowManager::init() { return 0; } -void SystemWindowManager::processEvent(bool* quit) { - +void SystemWindowManager::processEvent(bool *quit) { } ISystemWindow *SystemWindowManager::getWindow(uint32_t windowId) const { diff --git a/native/cocos/platform/empty/modules/SystemWindowManager.h b/native/cocos/platform/empty/modules/SystemWindowManager.h index 22b6c22d4c..30394b95db 100644 --- a/native/cocos/platform/empty/modules/SystemWindowManager.h +++ b/native/cocos/platform/empty/modules/SystemWindowManager.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -28,7 +27,6 @@ #include "base/std/container/unordered_map.h" #include "platform/interfaces/modules/ISystemWindowManager.h" - namespace cc { class ISystemWindow; @@ -38,7 +36,7 @@ public: explicit SystemWindowManager() = default; int init() override; - void processEvent(bool* quit) override; + void processEvent(bool *quit) override; ISystemWindow *createWindow(const ISystemWindowInfo &info) override; ISystemWindow *getWindow(uint32_t windowId) const override; diff --git a/native/cocos/platform/empty/modules/Vibrator.cpp b/native/cocos/platform/empty/modules/Vibrator.cpp index 9bbbd86938..77c28070af 100644 --- a/native/cocos/platform/empty/modules/Vibrator.cpp +++ b/native/cocos/platform/empty/modules/Vibrator.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/empty/modules/Vibrator.h b/native/cocos/platform/empty/modules/Vibrator.h index d455219217..08f1449442 100644 --- a/native/cocos/platform/empty/modules/Vibrator.h +++ b/native/cocos/platform/empty/modules/Vibrator.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/interfaces/OSInterface.cpp b/native/cocos/platform/interfaces/OSInterface.cpp index 976e8f64cd..0d923c16dc 100644 --- a/native/cocos/platform/interfaces/OSInterface.cpp +++ b/native/cocos/platform/interfaces/OSInterface.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/interfaces/OSInterface.h b/native/cocos/platform/interfaces/OSInterface.h index b0880e3fe2..c62b596222 100644 --- a/native/cocos/platform/interfaces/OSInterface.h +++ b/native/cocos/platform/interfaces/OSInterface.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -44,7 +43,6 @@ public: */ virtual ~OSInterface() = default; - private: CC_DISALLOW_COPY_MOVE_ASSIGN(OSInterface); }; diff --git a/native/cocos/platform/interfaces/modules/Device.cpp b/native/cocos/platform/interfaces/modules/Device.cpp index dfb2d79a49..070d630938 100644 --- a/native/cocos/platform/interfaces/modules/Device.cpp +++ b/native/cocos/platform/interfaces/modules/Device.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/interfaces/modules/Device.h b/native/cocos/platform/interfaces/modules/Device.h index 8c2b3b2610..7fb9a6d865 100644 --- a/native/cocos/platform/interfaces/modules/Device.h +++ b/native/cocos/platform/interfaces/modules/Device.h @@ -1,20 +1,19 @@ /**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/interfaces/modules/IAccelerometer.h b/native/cocos/platform/interfaces/modules/IAccelerometer.h index 13fb543ce7..68cad46fa7 100644 --- a/native/cocos/platform/interfaces/modules/IAccelerometer.h +++ b/native/cocos/platform/interfaces/modules/IAccelerometer.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/interfaces/modules/IBattery.h b/native/cocos/platform/interfaces/modules/IBattery.h index 1c50ee21f6..621e471573 100644 --- a/native/cocos/platform/interfaces/modules/IBattery.h +++ b/native/cocos/platform/interfaces/modules/IBattery.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/interfaces/modules/INetwork.h b/native/cocos/platform/interfaces/modules/INetwork.h index efb026efa9..3458fe0330 100644 --- a/native/cocos/platform/interfaces/modules/INetwork.h +++ b/native/cocos/platform/interfaces/modules/INetwork.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/interfaces/modules/IScreen.h b/native/cocos/platform/interfaces/modules/IScreen.h index f4aee63bf4..b3d8086c28 100644 --- a/native/cocos/platform/interfaces/modules/IScreen.h +++ b/native/cocos/platform/interfaces/modules/IScreen.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/interfaces/modules/ISystem.cpp b/native/cocos/platform/interfaces/modules/ISystem.cpp index afd03ec32f..1efff07a37 100644 --- a/native/cocos/platform/interfaces/modules/ISystem.cpp +++ b/native/cocos/platform/interfaces/modules/ISystem.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/interfaces/modules/ISystem.h b/native/cocos/platform/interfaces/modules/ISystem.h index 86d6a4343a..5bcad64e9c 100644 --- a/native/cocos/platform/interfaces/modules/ISystem.h +++ b/native/cocos/platform/interfaces/modules/ISystem.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/interfaces/modules/ISystemWindow.h b/native/cocos/platform/interfaces/modules/ISystemWindow.h index 47b987cd10..0903b31e4c 100644 --- a/native/cocos/platform/interfaces/modules/ISystemWindow.h +++ b/native/cocos/platform/interfaces/modules/ISystemWindow.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/interfaces/modules/ISystemWindowManager.h b/native/cocos/platform/interfaces/modules/ISystemWindowManager.h index 9fd6a1cc71..8e5f3377b6 100644 --- a/native/cocos/platform/interfaces/modules/ISystemWindowManager.h +++ b/native/cocos/platform/interfaces/modules/ISystemWindowManager.h @@ -1,26 +1,25 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #pragma once diff --git a/native/cocos/platform/interfaces/modules/IVibrator.h b/native/cocos/platform/interfaces/modules/IVibrator.h index d249e600f7..0cf966d27f 100644 --- a/native/cocos/platform/interfaces/modules/IVibrator.h +++ b/native/cocos/platform/interfaces/modules/IVibrator.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/interfaces/modules/IXRInterface.h b/native/cocos/platform/interfaces/modules/IXRInterface.h index 365a5d5c96..55bbdb4e05 100644 --- a/native/cocos/platform/interfaces/modules/IXRInterface.h +++ b/native/cocos/platform/interfaces/modules/IXRInterface.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/interfaces/modules/XRCommon.h b/native/cocos/platform/interfaces/modules/XRCommon.h index adf41d90e8..c0d5cccd41 100644 --- a/native/cocos/platform/interfaces/modules/XRCommon.h +++ b/native/cocos/platform/interfaces/modules/XRCommon.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -70,7 +69,7 @@ enum class XRConfigKey { PRESENT_ENABLE = 15, RENDER_EYE_FRAME_LEFT = 16, RENDER_EYE_FRAME_RIGHT = 17, - FEATURE_PASSTHROUGH= 18, + FEATURE_PASSTHROUGH = 18, IMAGE_TRACKING = 19, IMAGE_TRACKING_CANDIDATEIMAGE = 20, IMAGE_TRACKING_DATA = 21, @@ -332,16 +331,16 @@ struct XRSwapchain { }; struct XRTrackingImageData { - std::string friendlyName; - uint32_t id; - uint8_t *buffer; - uint32_t bufferSize; - float physicalWidth; - float physicalHeight; - uint32_t pixelSizeWidth; - uint32_t pixelSizeHeight; - float posePosition[3]; - float poseQuaternion[4]; + std::string friendlyName; + uint32_t id; + uint8_t *buffer; + uint32_t bufferSize; + float physicalWidth; + float physicalHeight; + uint32_t pixelSizeWidth; + uint32_t pixelSizeHeight; + float posePosition[3]; + float poseQuaternion[4]; }; #define GraphicsApiOpenglES "OpenGLES" diff --git a/native/cocos/platform/interfaces/modules/canvas/CanvasRenderingContext2D.cpp b/native/cocos/platform/interfaces/modules/canvas/CanvasRenderingContext2D.cpp index 27aece3817..c9ec6c7d3f 100644 --- a/native/cocos/platform/interfaces/modules/canvas/CanvasRenderingContext2D.cpp +++ b/native/cocos/platform/interfaces/modules/canvas/CanvasRenderingContext2D.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -311,8 +310,8 @@ void CanvasRenderingContext2D::setFont(const ccstd::string &font) { double fontSize = atof(fontSizeStr.c_str()); bool isBold = font.find("bold", 0) != ccstd::string::npos || font.find("Bold", 0) != ccstd::string::npos; bool isItalic = font.find("italic", 0) != ccstd::string::npos || font.find("Italic", 0) != ccstd::string::npos; - bool isSmallCaps = font.find("small-caps", 0) != ccstd::string::npos || font.find("Small-Caps") !=ccstd::string::npos; - bool isOblique = font.find("oblique", 0) != ccstd::string::npos || font.find("Oblique", 0) != ccstd::string::npos ; + bool isSmallCaps = font.find("small-caps", 0) != ccstd::string::npos || font.find("Small-Caps") != ccstd::string::npos; + bool isOblique = font.find("oblique", 0) != ccstd::string::npos || font.find("Oblique", 0) != ccstd::string::npos; //font-style: italic, oblique, normal //font-weight: normal, bold //font-variant: normal, small-caps diff --git a/native/cocos/platform/interfaces/modules/canvas/CanvasRenderingContext2D.h b/native/cocos/platform/interfaces/modules/canvas/CanvasRenderingContext2D.h index d93d7275bc..76b235b61f 100644 --- a/native/cocos/platform/interfaces/modules/canvas/CanvasRenderingContext2D.h +++ b/native/cocos/platform/interfaces/modules/canvas/CanvasRenderingContext2D.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2018-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2018-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/interfaces/modules/canvas/ICanvasRenderingContext2D.cpp b/native/cocos/platform/interfaces/modules/canvas/ICanvasRenderingContext2D.cpp index d3582aeb7f..90fdde9afa 100644 --- a/native/cocos/platform/interfaces/modules/canvas/ICanvasRenderingContext2D.cpp +++ b/native/cocos/platform/interfaces/modules/canvas/ICanvasRenderingContext2D.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2018-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2018-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/interfaces/modules/canvas/ICanvasRenderingContext2D.h b/native/cocos/platform/interfaces/modules/canvas/ICanvasRenderingContext2D.h index 23665401ef..0650bc089d 100644 --- a/native/cocos/platform/interfaces/modules/canvas/ICanvasRenderingContext2D.h +++ b/native/cocos/platform/interfaces/modules/canvas/ICanvasRenderingContext2D.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2018-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2018-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/ios/AppDelegateBridge.h b/native/cocos/platform/ios/AppDelegateBridge.h index bd629581ed..e2515c9465 100644 --- a/native/cocos/platform/ios/AppDelegateBridge.h +++ b/native/cocos/platform/ios/AppDelegateBridge.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. -AppDelegateBridge - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -25,9 +24,9 @@ AppDelegateBridge #pragma once -#include "platform/UniversalPlatform.h" #import #import +#include "platform/UniversalPlatform.h" @interface AppDelegateBridge : NSObject - (float)getPixelRatio; diff --git a/native/cocos/platform/ios/IOSPlatform.h b/native/cocos/platform/ios/IOSPlatform.h index 3798e46839..e2a701e2b7 100644 --- a/native/cocos/platform/ios/IOSPlatform.h +++ b/native/cocos/platform/ios/IOSPlatform.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/ios/View.h b/native/cocos/platform/ios/View.h index a2bb099b42..4794d331b7 100644 --- a/native/cocos/platform/ios/View.h +++ b/native/cocos/platform/ios/View.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/ios/modules/Accelerometer.h b/native/cocos/platform/ios/modules/Accelerometer.h index 83dfe8e135..8de5dc189a 100644 --- a/native/cocos/platform/ios/modules/Accelerometer.h +++ b/native/cocos/platform/ios/modules/Accelerometer.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/ios/modules/Battery.h b/native/cocos/platform/ios/modules/Battery.h index 1f6e1b5f82..802b19f3a3 100644 --- a/native/cocos/platform/ios/modules/Battery.h +++ b/native/cocos/platform/ios/modules/Battery.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/ios/modules/Network.h b/native/cocos/platform/ios/modules/Network.h index bc90dbfb67..dea5b74a43 100644 --- a/native/cocos/platform/ios/modules/Network.h +++ b/native/cocos/platform/ios/modules/Network.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/ios/modules/Screen.h b/native/cocos/platform/ios/modules/Screen.h index cf98b84441..e00ff0569f 100644 --- a/native/cocos/platform/ios/modules/Screen.h +++ b/native/cocos/platform/ios/modules/Screen.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/ios/modules/System.h b/native/cocos/platform/ios/modules/System.h index d772846e96..bacf60f941 100644 --- a/native/cocos/platform/ios/modules/System.h +++ b/native/cocos/platform/ios/modules/System.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/ios/modules/SystemWindow.h b/native/cocos/platform/ios/modules/SystemWindow.h index 9d3e2a9724..5d9968bd36 100644 --- a/native/cocos/platform/ios/modules/SystemWindow.h +++ b/native/cocos/platform/ios/modules/SystemWindow.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/ios/modules/SystemWindowManager.h b/native/cocos/platform/ios/modules/SystemWindowManager.h index b6e4686684..5950a81115 100644 --- a/native/cocos/platform/ios/modules/SystemWindowManager.h +++ b/native/cocos/platform/ios/modules/SystemWindowManager.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/ios/modules/Vibrator.h b/native/cocos/platform/ios/modules/Vibrator.h index 87f405192d..d0ee61516f 100644 --- a/native/cocos/platform/ios/modules/Vibrator.h +++ b/native/cocos/platform/ios/modules/Vibrator.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/java/jni/JniCocosKeyCodeHandler.cpp b/native/cocos/platform/java/jni/JniCocosKeyCodeHandler.cpp index aaea57e9c3..052a0a2971 100644 --- a/native/cocos/platform/java/jni/JniCocosKeyCodeHandler.cpp +++ b/native/cocos/platform/java/jni/JniCocosKeyCodeHandler.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/java/jni/JniCocosOrientationHelper.cpp b/native/cocos/platform/java/jni/JniCocosOrientationHelper.cpp index 53c6f3dd33..804be6d067 100644 --- a/native/cocos/platform/java/jni/JniCocosOrientationHelper.cpp +++ b/native/cocos/platform/java/jni/JniCocosOrientationHelper.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -65,6 +64,4 @@ JNIEXPORT void JNICALL Java_com_cocos_lib_CocosAbilitySlice_onOrientationChanged pWidth = width; } } - - } diff --git a/native/cocos/platform/java/jni/JniCocosTouchHandler.cpp b/native/cocos/platform/java/jni/JniCocosTouchHandler.cpp index 4bc96a5823..e67fa74379 100644 --- a/native/cocos/platform/java/jni/JniCocosTouchHandler.cpp +++ b/native/cocos/platform/java/jni/JniCocosTouchHandler.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/java/jni/JniHelper.cpp b/native/cocos/platform/java/jni/JniHelper.cpp index 9d678a90b3..67a0681ef9 100644 --- a/native/cocos/platform/java/jni/JniHelper.cpp +++ b/native/cocos/platform/java/jni/JniHelper.cpp @@ -1,20 +1,19 @@ /**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -139,8 +138,8 @@ void JniHelper::init(JNIEnv *env, jobject activity) { } void JniHelper::onDestroy() { - if(JniHelper::sJavaVM) { - if(JniHelper::sActivity) { + if (JniHelper::sJavaVM) { + if (JniHelper::sActivity) { cc::JniHelper::getEnv()->DeleteGlobalRef(JniHelper::sActivity); JniHelper::sActivity = nullptr; } @@ -199,7 +198,7 @@ jobject JniHelper::getActivity() { #if CC_PLATFORM == CC_PLATFORM_OHOS bool JniHelper::setClassLoaderFrom(jobject activityinstance) { - if(!JniHelper::classloader) { + if (!JniHelper::classloader) { JniMethodInfo getclassloaderMethod; if (!JniHelper::getMethodInfoDefaultClassLoader(getclassloaderMethod, "ohos/app/AbilityContext", diff --git a/native/cocos/platform/java/jni/JniHelper.h b/native/cocos/platform/java/jni/JniHelper.h index dc090a6e63..31156625e9 100644 --- a/native/cocos/platform/java/jni/JniHelper.h +++ b/native/cocos/platform/java/jni/JniHelper.h @@ -1,20 +1,19 @@ /**************************************************************************** Copyright (c) 2010-2012 cc-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/java/jni/JniImp.cpp b/native/cocos/platform/java/jni/JniImp.cpp index 02ba120fe9..20c4a612f4 100644 --- a/native/cocos/platform/java/jni/JniImp.cpp +++ b/native/cocos/platform/java/jni/JniImp.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2018-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2018-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/java/jni/JniImp.h b/native/cocos/platform/java/jni/JniImp.h index 8eb285b8c9..6d6d997d67 100644 --- a/native/cocos/platform/java/jni/JniImp.h +++ b/native/cocos/platform/java/jni/JniImp.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2018-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2018-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/java/jni/glue/JniNativeGlue.cpp b/native/cocos/platform/java/jni/glue/JniNativeGlue.cpp index 4809e8ff42..8e1df8dd10 100644 --- a/native/cocos/platform/java/jni/glue/JniNativeGlue.cpp +++ b/native/cocos/platform/java/jni/glue/JniNativeGlue.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -26,6 +25,7 @@ #include "platform/java/jni/glue/JniNativeGlue.h" #include #include +#include "application/ApplicationManager.h" #include "engine/EngineEvents.h" #include "platform/BasePlatform.h" #include "platform/java/jni/JniImp.h" @@ -33,7 +33,6 @@ #include "platform/java/jni/log.h" #include "platform/java/modules/SystemWindow.h" #include "platform/java/modules/SystemWindowManager.h" -#include "application/ApplicationManager.h" namespace cc { JniNativeGlue::~JniNativeGlue() = default; @@ -218,9 +217,9 @@ void JniNativeGlue::engineHandleCmd(JniCommand cmd) { switch (cmd) { case JniCommand::JNI_CMD_INIT_WINDOW: { if (isWindowInitialized) { - return; - } - isWindowInitialized = true; + return; + } + isWindowInitialized = true; // cc::CustomEvent event; // event.name = EVENT_RECREATE_WINDOW; // event.args->ptrVal = reinterpret_cast(getWindowHandle()); @@ -229,7 +228,7 @@ void JniNativeGlue::engineHandleCmd(JniCommand cmd) { info.height = getHeight(); info.externalHandle = getWindowHandle(); BasePlatform* platform = cc::BasePlatform::getPlatform(); - auto *windowMgr = platform->getInterface(); + auto* windowMgr = platform->getInterface(); CC_ASSERT(windowMgr != nullptr); windowMgr->createWindow(info); events::WindowRecreated::broadcast(ISystemWindow::mainWindowId); diff --git a/native/cocos/platform/java/jni/glue/JniNativeGlue.h b/native/cocos/platform/java/jni/glue/JniNativeGlue.h index 1ab8782717..cba7c2a9ea 100644 --- a/native/cocos/platform/java/jni/glue/JniNativeGlue.h +++ b/native/cocos/platform/java/jni/glue/JniNativeGlue.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/java/jni/glue/MessagePipe.cpp b/native/cocos/platform/java/jni/glue/MessagePipe.cpp index fabcab6063..b5d567803f 100644 --- a/native/cocos/platform/java/jni/glue/MessagePipe.cpp +++ b/native/cocos/platform/java/jni/glue/MessagePipe.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/java/jni/glue/MessagePipe.h b/native/cocos/platform/java/jni/glue/MessagePipe.h index 2dee2f30ef..2b4b29e13b 100644 --- a/native/cocos/platform/java/jni/glue/MessagePipe.h +++ b/native/cocos/platform/java/jni/glue/MessagePipe.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/java/jni/log.h b/native/cocos/platform/java/jni/log.h index 59b5ef0f71..2abdb48086 100644 --- a/native/cocos/platform/java/jni/log.h +++ b/native/cocos/platform/java/jni/log.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/java/modules/Accelerometer.cpp b/native/cocos/platform/java/modules/Accelerometer.cpp index 144785ef71..62665af8fd 100644 --- a/native/cocos/platform/java/modules/Accelerometer.cpp +++ b/native/cocos/platform/java/modules/Accelerometer.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/java/modules/Accelerometer.h b/native/cocos/platform/java/modules/Accelerometer.h index 266da13c03..727914c287 100644 --- a/native/cocos/platform/java/modules/Accelerometer.h +++ b/native/cocos/platform/java/modules/Accelerometer.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/java/modules/Battery.cpp b/native/cocos/platform/java/modules/Battery.cpp index cd424f0ae4..9e7acb862e 100644 --- a/native/cocos/platform/java/modules/Battery.cpp +++ b/native/cocos/platform/java/modules/Battery.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/java/modules/Battery.h b/native/cocos/platform/java/modules/Battery.h index 9630940d96..d14def1a59 100644 --- a/native/cocos/platform/java/modules/Battery.h +++ b/native/cocos/platform/java/modules/Battery.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/java/modules/CanvasRenderingContext2DDelegate.cpp b/native/cocos/platform/java/modules/CanvasRenderingContext2DDelegate.cpp index 048ee91c7a..9b362fc1f4 100644 --- a/native/cocos/platform/java/modules/CanvasRenderingContext2DDelegate.cpp +++ b/native/cocos/platform/java/modules/CanvasRenderingContext2DDelegate.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2018-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2018-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/java/modules/CanvasRenderingContext2DDelegate.h b/native/cocos/platform/java/modules/CanvasRenderingContext2DDelegate.h index f5bf2b386a..3148df7283 100644 --- a/native/cocos/platform/java/modules/CanvasRenderingContext2DDelegate.h +++ b/native/cocos/platform/java/modules/CanvasRenderingContext2DDelegate.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2018-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2018-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/java/modules/CommonScreen.cpp b/native/cocos/platform/java/modules/CommonScreen.cpp index 21f97e182c..8e9304ccb0 100644 --- a/native/cocos/platform/java/modules/CommonScreen.cpp +++ b/native/cocos/platform/java/modules/CommonScreen.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/java/modules/CommonScreen.h b/native/cocos/platform/java/modules/CommonScreen.h index 639bfd4fce..1bc58dd08d 100644 --- a/native/cocos/platform/java/modules/CommonScreen.h +++ b/native/cocos/platform/java/modules/CommonScreen.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/java/modules/CommonSystem.cpp b/native/cocos/platform/java/modules/CommonSystem.cpp index 6cd53a7221..5f2505acbc 100644 --- a/native/cocos/platform/java/modules/CommonSystem.cpp +++ b/native/cocos/platform/java/modules/CommonSystem.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/java/modules/CommonSystem.h b/native/cocos/platform/java/modules/CommonSystem.h index fda3b60885..d1074f90a5 100644 --- a/native/cocos/platform/java/modules/CommonSystem.h +++ b/native/cocos/platform/java/modules/CommonSystem.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/java/modules/Network.cpp b/native/cocos/platform/java/modules/Network.cpp index 83d3401a0c..fe13872c9b 100644 --- a/native/cocos/platform/java/modules/Network.cpp +++ b/native/cocos/platform/java/modules/Network.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/java/modules/Network.h b/native/cocos/platform/java/modules/Network.h index e5559b12e4..a4eed0ebce 100644 --- a/native/cocos/platform/java/modules/Network.h +++ b/native/cocos/platform/java/modules/Network.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/java/modules/SystemWindow.cpp b/native/cocos/platform/java/modules/SystemWindow.cpp index 4fc4e66c69..14aa4fb5bd 100644 --- a/native/cocos/platform/java/modules/SystemWindow.cpp +++ b/native/cocos/platform/java/modules/SystemWindow.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/java/modules/SystemWindow.h b/native/cocos/platform/java/modules/SystemWindow.h index a35e5474e1..53fc471f6f 100644 --- a/native/cocos/platform/java/modules/SystemWindow.h +++ b/native/cocos/platform/java/modules/SystemWindow.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -25,8 +24,8 @@ #pragma once -#include #include +#include #include "platform/interfaces/modules/ISystemWindow.h" namespace cc { diff --git a/native/cocos/platform/java/modules/SystemWindowManager.cpp b/native/cocos/platform/java/modules/SystemWindowManager.cpp index 8cecfdccf0..a2e79fe22d 100644 --- a/native/cocos/platform/java/modules/SystemWindowManager.cpp +++ b/native/cocos/platform/java/modules/SystemWindowManager.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -29,7 +28,6 @@ namespace cc { - int SystemWindowManager::init() { return 0; } diff --git a/native/cocos/platform/java/modules/SystemWindowManager.h b/native/cocos/platform/java/modules/SystemWindowManager.h index 5c49ac1401..6190a10473 100644 --- a/native/cocos/platform/java/modules/SystemWindowManager.h +++ b/native/cocos/platform/java/modules/SystemWindowManager.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/java/modules/Vibrator.cpp b/native/cocos/platform/java/modules/Vibrator.cpp index 7d1bf8ac46..caf8d74740 100644 --- a/native/cocos/platform/java/modules/Vibrator.cpp +++ b/native/cocos/platform/java/modules/Vibrator.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/java/modules/Vibrator.h b/native/cocos/platform/java/modules/Vibrator.h index 7f755242df..6208eb7979 100644 --- a/native/cocos/platform/java/modules/Vibrator.h +++ b/native/cocos/platform/java/modules/Vibrator.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/java/modules/XRInterface.cpp b/native/cocos/platform/java/modules/XRInterface.cpp index 77e8dbb346..1097c84bcf 100644 --- a/native/cocos/platform/java/modules/XRInterface.cpp +++ b/native/cocos/platform/java/modules/XRInterface.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -28,10 +27,10 @@ #include #include #include -#include "base/StringUtil.h" #include "android/AndroidPlatform.h" #include "base/Log.h" #include "base/Macros.h" +#include "base/StringUtil.h" #include "bindings/event/EventDispatcher.h" #include "cocos/bindings/jswrapper/SeApi.h" #include "java/jni/JniHelper.h" @@ -231,10 +230,20 @@ void XRInterface::dispatchHandleEventInternal(const xr::XRControllerEvent &xrCon case xr::XRClick::Type::TRIGGER_RIGHT: case xr::XRClick::Type::THUMBSTICK_RIGHT: case xr::XRClick::Type::A: - case xr::XRClick::Type::B: { + case xr::XRClick::Type::B: + case xr::XRClick::Type::START: { controllerInfo->buttonInfos.emplace_back(ControllerInfo::ButtonInfo(stickKeyCode, xrClick->isPress)); break; } + case xr::XRClick::Type::HOME: { + CC_LOG_INFO("[XRInterface] exit when home click in rokid."); +#if CC_USE_XR + xr::XrEntry::getInstance()->destroyXrInstance(); + xr::XrEntry::destroyInstance(); +#endif + CC_CURRENT_APPLICATION_SAFE()->close(); + break; + } default: break; } @@ -434,8 +443,8 @@ void XRInterface::initialize(void *javaVM, void *activity) { if (value.getInt() == 1) { this->endRenderEyeFrame(key == xr::XRConfigKey::RENDER_EYE_FRAME_LEFT ? 0 : 1); } - } else if(key == xr::XRConfigKey::IMAGE_TRACKING_CANDIDATEIMAGE && value.isString()) { - if(!_gThreadPool) { + } else if (key == xr::XRConfigKey::IMAGE_TRACKING_CANDIDATEIMAGE && value.isString()) { + if (!_gThreadPool) { _gThreadPool = LegacyThreadPool::newSingleThreadPool(); } diff --git a/native/cocos/platform/java/modules/XRInterface.h b/native/cocos/platform/java/modules/XRInterface.h index 9b59f399d6..8edcf0ae0a 100644 --- a/native/cocos/platform/java/modules/XRInterface.h +++ b/native/cocos/platform/java/modules/XRInterface.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -29,7 +28,7 @@ #include "base/ThreadPool.h" #include "platform/interfaces/modules/IXRInterface.h" #if CC_USE_XR_REMOTE_PREVIEW -#include "xr/XRRemotePreviewManager.h" + #include "xr/XRRemotePreviewManager.h" #endif namespace se { class Object; @@ -101,12 +100,12 @@ public: void bindXREyeWithRenderWindow(void *window, xr::XREye eye) override; private: - void loadAssetsImage(const std::string &imageInfo); - void dispatchGamepadEventInternal(const xr::XRControllerEvent &xrControllerEvent); - void dispatchHandleEventInternal(const xr::XRControllerEvent &xrControllerEvent); - void dispatchHMDEventInternal(const xr::XRControllerEvent &xrControllerEvent); - ControllerEvent _controllerEvent; - se::Object *_jsPoseEventArray{nullptr}; + void loadAssetsImage(const std::string &imageInfo); + void dispatchGamepadEventInternal(const xr::XRControllerEvent &xrControllerEvent); + void dispatchHandleEventInternal(const xr::XRControllerEvent &xrControllerEvent); + void dispatchHMDEventInternal(const xr::XRControllerEvent &xrControllerEvent); + ControllerEvent _controllerEvent; + se::Object *_jsPoseEventArray{nullptr}; #if CC_USE_VULKAN PFN_vkGetInstanceProcAddr _vkGetInstanceProcAddr{nullptr}; diff --git a/native/cocos/platform/linux/FileUtils-linux.cpp b/native/cocos/platform/linux/FileUtils-linux.cpp index 016a260798..3c0217fd5e 100644 --- a/native/cocos/platform/linux/FileUtils-linux.cpp +++ b/native/cocos/platform/linux/FileUtils-linux.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/linux/FileUtils-linux.h b/native/cocos/platform/linux/FileUtils-linux.h index f2049325b1..b8df0606e9 100644 --- a/native/cocos/platform/linux/FileUtils-linux.h +++ b/native/cocos/platform/linux/FileUtils-linux.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/linux/LinuxPlatform.cpp b/native/cocos/platform/linux/LinuxPlatform.cpp index ed53e137c3..73aa84abc3 100644 --- a/native/cocos/platform/linux/LinuxPlatform.cpp +++ b/native/cocos/platform/linux/LinuxPlatform.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/linux/LinuxPlatform.h b/native/cocos/platform/linux/LinuxPlatform.h index 885b9aab35..f627884a8f 100644 --- a/native/cocos/platform/linux/LinuxPlatform.h +++ b/native/cocos/platform/linux/LinuxPlatform.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/linux/modules/Accelerometer.cpp b/native/cocos/platform/linux/modules/Accelerometer.cpp index a6a49f11f4..0e799f7395 100644 --- a/native/cocos/platform/linux/modules/Accelerometer.cpp +++ b/native/cocos/platform/linux/modules/Accelerometer.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/linux/modules/Accelerometer.h b/native/cocos/platform/linux/modules/Accelerometer.h index 4c72832a0b..03db5e320d 100644 --- a/native/cocos/platform/linux/modules/Accelerometer.h +++ b/native/cocos/platform/linux/modules/Accelerometer.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/linux/modules/Battery.cpp b/native/cocos/platform/linux/modules/Battery.cpp index 6b3f253a51..0adc59cf97 100644 --- a/native/cocos/platform/linux/modules/Battery.cpp +++ b/native/cocos/platform/linux/modules/Battery.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/linux/modules/Battery.h b/native/cocos/platform/linux/modules/Battery.h index 5c39407575..5bac0f65ba 100644 --- a/native/cocos/platform/linux/modules/Battery.h +++ b/native/cocos/platform/linux/modules/Battery.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/linux/modules/CanvasRenderingContext2DDelegate.cpp b/native/cocos/platform/linux/modules/CanvasRenderingContext2DDelegate.cpp index e5ee6f58c8..bb4518b591 100644 --- a/native/cocos/platform/linux/modules/CanvasRenderingContext2DDelegate.cpp +++ b/native/cocos/platform/linux/modules/CanvasRenderingContext2DDelegate.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/linux/modules/CanvasRenderingContext2DDelegate.h b/native/cocos/platform/linux/modules/CanvasRenderingContext2DDelegate.h index a791eea2ed..f7f9843a6c 100644 --- a/native/cocos/platform/linux/modules/CanvasRenderingContext2DDelegate.h +++ b/native/cocos/platform/linux/modules/CanvasRenderingContext2DDelegate.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/linux/modules/Network.cpp b/native/cocos/platform/linux/modules/Network.cpp index fb97724359..6ee9f5a08e 100644 --- a/native/cocos/platform/linux/modules/Network.cpp +++ b/native/cocos/platform/linux/modules/Network.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/linux/modules/Network.h b/native/cocos/platform/linux/modules/Network.h index 53c4e7d5a1..b0e1268687 100644 --- a/native/cocos/platform/linux/modules/Network.h +++ b/native/cocos/platform/linux/modules/Network.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/linux/modules/Screen.cpp b/native/cocos/platform/linux/modules/Screen.cpp index 8e57117975..bd92a89dca 100644 --- a/native/cocos/platform/linux/modules/Screen.cpp +++ b/native/cocos/platform/linux/modules/Screen.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/linux/modules/Screen.h b/native/cocos/platform/linux/modules/Screen.h index f52c31b2f8..10071a0d96 100644 --- a/native/cocos/platform/linux/modules/Screen.h +++ b/native/cocos/platform/linux/modules/Screen.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/linux/modules/System.cpp b/native/cocos/platform/linux/modules/System.cpp index 43f37f1317..cdaab9b760 100644 --- a/native/cocos/platform/linux/modules/System.cpp +++ b/native/cocos/platform/linux/modules/System.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/linux/modules/System.h b/native/cocos/platform/linux/modules/System.h index 90a0fab8f6..540292e2f2 100644 --- a/native/cocos/platform/linux/modules/System.h +++ b/native/cocos/platform/linux/modules/System.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/linux/modules/SystemWindow.cpp b/native/cocos/platform/linux/modules/SystemWindow.cpp index 0d3287a475..acc9e1c29f 100644 --- a/native/cocos/platform/linux/modules/SystemWindow.cpp +++ b/native/cocos/platform/linux/modules/SystemWindow.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/linux/modules/SystemWindow.h b/native/cocos/platform/linux/modules/SystemWindow.h index 440a02f916..da19d53f60 100644 --- a/native/cocos/platform/linux/modules/SystemWindow.h +++ b/native/cocos/platform/linux/modules/SystemWindow.h @@ -1,26 +1,25 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #pragma once diff --git a/native/cocos/platform/linux/modules/SystemWindowManager.cpp b/native/cocos/platform/linux/modules/SystemWindowManager.cpp index 540f3f2004..dc288827e3 100644 --- a/native/cocos/platform/linux/modules/SystemWindowManager.cpp +++ b/native/cocos/platform/linux/modules/SystemWindowManager.cpp @@ -1,27 +1,26 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ #include "SystemWindowManager.h" #include "SDL2/SDL_events.h" diff --git a/native/cocos/platform/linux/modules/SystemWindowManager.h b/native/cocos/platform/linux/modules/SystemWindowManager.h index e30ad52143..ab5488f0f2 100644 --- a/native/cocos/platform/linux/modules/SystemWindowManager.h +++ b/native/cocos/platform/linux/modules/SystemWindowManager.h @@ -1,26 +1,25 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #pragma once diff --git a/native/cocos/platform/linux/modules/Vibrator.cpp b/native/cocos/platform/linux/modules/Vibrator.cpp index cdae9043c6..12e866fc43 100644 --- a/native/cocos/platform/linux/modules/Vibrator.cpp +++ b/native/cocos/platform/linux/modules/Vibrator.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/linux/modules/Vibrator.h b/native/cocos/platform/linux/modules/Vibrator.h index 5a67a11f44..b6d68e80e4 100644 --- a/native/cocos/platform/linux/modules/Vibrator.h +++ b/native/cocos/platform/linux/modules/Vibrator.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/mac/AppDelegate.h b/native/cocos/platform/mac/AppDelegate.h index 70cc630a1d..23ef37e266 100644 --- a/native/cocos/platform/mac/AppDelegate.h +++ b/native/cocos/platform/mac/AppDelegate.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/mac/KeyCodeHelper.cpp b/native/cocos/platform/mac/KeyCodeHelper.cpp index 49832e7251..3bfe113a64 100644 --- a/native/cocos/platform/mac/KeyCodeHelper.cpp +++ b/native/cocos/platform/mac/KeyCodeHelper.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/mac/KeyCodeHelper.h b/native/cocos/platform/mac/KeyCodeHelper.h index abca2d2970..6617228bb6 100644 --- a/native/cocos/platform/mac/KeyCodeHelper.h +++ b/native/cocos/platform/mac/KeyCodeHelper.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/mac/MacPlatform.h b/native/cocos/platform/mac/MacPlatform.h index 9b8c1dbcdd..08fc7c7e30 100644 --- a/native/cocos/platform/mac/MacPlatform.h +++ b/native/cocos/platform/mac/MacPlatform.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/mac/View.h b/native/cocos/platform/mac/View.h index 282e355d26..2e9cec833c 100644 --- a/native/cocos/platform/mac/View.h +++ b/native/cocos/platform/mac/View.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/mac/ViewController.h b/native/cocos/platform/mac/ViewController.h index 56a33ac433..5b41d2c73c 100644 --- a/native/cocos/platform/mac/ViewController.h +++ b/native/cocos/platform/mac/ViewController.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/mac/modules/Accelerometer.h b/native/cocos/platform/mac/modules/Accelerometer.h index 266da13c03..727914c287 100644 --- a/native/cocos/platform/mac/modules/Accelerometer.h +++ b/native/cocos/platform/mac/modules/Accelerometer.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/mac/modules/Battery.h b/native/cocos/platform/mac/modules/Battery.h index 1f6e1b5f82..802b19f3a3 100644 --- a/native/cocos/platform/mac/modules/Battery.h +++ b/native/cocos/platform/mac/modules/Battery.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/mac/modules/Network.h b/native/cocos/platform/mac/modules/Network.h index bc90dbfb67..dea5b74a43 100644 --- a/native/cocos/platform/mac/modules/Network.h +++ b/native/cocos/platform/mac/modules/Network.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/mac/modules/Screen.h b/native/cocos/platform/mac/modules/Screen.h index a7ef519151..aad576dfd7 100644 --- a/native/cocos/platform/mac/modules/Screen.h +++ b/native/cocos/platform/mac/modules/Screen.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/mac/modules/System.h b/native/cocos/platform/mac/modules/System.h index 51c022601d..31908ab6fa 100644 --- a/native/cocos/platform/mac/modules/System.h +++ b/native/cocos/platform/mac/modules/System.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/mac/modules/SystemWindow.h b/native/cocos/platform/mac/modules/SystemWindow.h index 10d4a74d07..4bc284056f 100644 --- a/native/cocos/platform/mac/modules/SystemWindow.h +++ b/native/cocos/platform/mac/modules/SystemWindow.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/mac/modules/SystemWindowManager.h b/native/cocos/platform/mac/modules/SystemWindowManager.h index 9456de9e18..a253b646b3 100644 --- a/native/cocos/platform/mac/modules/SystemWindowManager.h +++ b/native/cocos/platform/mac/modules/SystemWindowManager.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/mac/modules/Vibrator.h b/native/cocos/platform/mac/modules/Vibrator.h index 7f755242df..6208eb7979 100644 --- a/native/cocos/platform/mac/modules/Vibrator.h +++ b/native/cocos/platform/mac/modules/Vibrator.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/ohos/FileUtils-ohos.cpp b/native/cocos/platform/ohos/FileUtils-ohos.cpp index ce955349ce..c11b70f399 100644 --- a/native/cocos/platform/ohos/FileUtils-ohos.cpp +++ b/native/cocos/platform/ohos/FileUtils-ohos.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/ohos/FileUtils-ohos.h b/native/cocos/platform/ohos/FileUtils-ohos.h index 506deb7820..a9da981725 100644 --- a/native/cocos/platform/ohos/FileUtils-ohos.h +++ b/native/cocos/platform/ohos/FileUtils-ohos.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/ohos/OhosPlatform.cpp b/native/cocos/platform/ohos/OhosPlatform.cpp index 18b6fb39f4..3e8a80ef0f 100644 --- a/native/cocos/platform/ohos/OhosPlatform.cpp +++ b/native/cocos/platform/ohos/OhosPlatform.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/ohos/OhosPlatform.h b/native/cocos/platform/ohos/OhosPlatform.h index d1196cecdb..c678c58bac 100644 --- a/native/cocos/platform/ohos/OhosPlatform.h +++ b/native/cocos/platform/ohos/OhosPlatform.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -38,6 +37,7 @@ public: int getSdkVersion() const override; int32_t loop() override; ISystemWindow *createNativeWindow(uint32_t windowId, void *externalHandle) override; + private: void waitWindowInitialized(); diff --git a/native/cocos/platform/ohos/jni/AbilityConsts.h b/native/cocos/platform/ohos/jni/AbilityConsts.h index 984607b21d..e3e7485fc2 100644 --- a/native/cocos/platform/ohos/jni/AbilityConsts.h +++ b/native/cocos/platform/ohos/jni/AbilityConsts.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/ohos/jni/JniCocosAbility.cpp b/native/cocos/platform/ohos/jni/JniCocosAbility.cpp index 999c68ecc6..a570ea5ae4 100644 --- a/native/cocos/platform/ohos/jni/JniCocosAbility.cpp +++ b/native/cocos/platform/ohos/jni/JniCocosAbility.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/ohos/jni/JniCocosAbility.h b/native/cocos/platform/ohos/jni/JniCocosAbility.h index f7bd081308..feae2561b9 100644 --- a/native/cocos/platform/ohos/jni/JniCocosAbility.h +++ b/native/cocos/platform/ohos/jni/JniCocosAbility.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/ohos/jni/JniCocosSurfaceView.cpp b/native/cocos/platform/ohos/jni/JniCocosSurfaceView.cpp index 625e64f128..35ab1c9442 100644 --- a/native/cocos/platform/ohos/jni/JniCocosSurfaceView.cpp +++ b/native/cocos/platform/ohos/jni/JniCocosSurfaceView.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/ohos/modules/Screen.cpp b/native/cocos/platform/ohos/modules/Screen.cpp index 2df9b5d9a9..5efeb64ee3 100644 --- a/native/cocos/platform/ohos/modules/Screen.cpp +++ b/native/cocos/platform/ohos/modules/Screen.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/ohos/modules/Screen.h b/native/cocos/platform/ohos/modules/Screen.h index 6e3005cb27..abf425a031 100644 --- a/native/cocos/platform/ohos/modules/Screen.h +++ b/native/cocos/platform/ohos/modules/Screen.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/ohos/modules/System.cpp b/native/cocos/platform/ohos/modules/System.cpp index 9396039d91..f95bf64fea 100644 --- a/native/cocos/platform/ohos/modules/System.cpp +++ b/native/cocos/platform/ohos/modules/System.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/ohos/modules/System.h b/native/cocos/platform/ohos/modules/System.h index c04654dfd0..59aba30cf6 100644 --- a/native/cocos/platform/ohos/modules/System.h +++ b/native/cocos/platform/ohos/modules/System.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/qnx/FileUtils-qnx.cpp b/native/cocos/platform/qnx/FileUtils-qnx.cpp index d33f9f0780..7cc9be4d91 100644 --- a/native/cocos/platform/qnx/FileUtils-qnx.cpp +++ b/native/cocos/platform/qnx/FileUtils-qnx.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/qnx/FileUtils-qnx.h b/native/cocos/platform/qnx/FileUtils-qnx.h index b8ce5506e2..c5a0e144bd 100644 --- a/native/cocos/platform/qnx/FileUtils-qnx.h +++ b/native/cocos/platform/qnx/FileUtils-qnx.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/qnx/modules/Accelerometer.cpp b/native/cocos/platform/qnx/modules/Accelerometer.cpp index 494f37cfa2..0dab6d7c4f 100644 --- a/native/cocos/platform/qnx/modules/Accelerometer.cpp +++ b/native/cocos/platform/qnx/modules/Accelerometer.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/qnx/modules/CanvasRenderingContext2DDelegate.cpp b/native/cocos/platform/qnx/modules/CanvasRenderingContext2DDelegate.cpp index 65da7451fa..b3be47d07c 100644 --- a/native/cocos/platform/qnx/modules/CanvasRenderingContext2DDelegate.cpp +++ b/native/cocos/platform/qnx/modules/CanvasRenderingContext2DDelegate.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/qnx/modules/CanvasRenderingContext2DDelegate.h b/native/cocos/platform/qnx/modules/CanvasRenderingContext2DDelegate.h index e9091a6e2f..9e59a6147d 100644 --- a/native/cocos/platform/qnx/modules/CanvasRenderingContext2DDelegate.h +++ b/native/cocos/platform/qnx/modules/CanvasRenderingContext2DDelegate.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/qnx/modules/System.cpp b/native/cocos/platform/qnx/modules/System.cpp index cacc1f6e70..3d1429118c 100644 --- a/native/cocos/platform/qnx/modules/System.cpp +++ b/native/cocos/platform/qnx/modules/System.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/qnx/modules/System.h b/native/cocos/platform/qnx/modules/System.h index 90a0fab8f6..540292e2f2 100644 --- a/native/cocos/platform/qnx/modules/System.h +++ b/native/cocos/platform/qnx/modules/System.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/qnx/modules/SystemWindow.cpp b/native/cocos/platform/qnx/modules/SystemWindow.cpp index a325a74373..12a32b3fc9 100644 --- a/native/cocos/platform/qnx/modules/SystemWindow.cpp +++ b/native/cocos/platform/qnx/modules/SystemWindow.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/win32/FileUtils-win32.cpp b/native/cocos/platform/win32/FileUtils-win32.cpp index 9bc2e0158f..57f33cc273 100644 --- a/native/cocos/platform/win32/FileUtils-win32.cpp +++ b/native/cocos/platform/win32/FileUtils-win32.cpp @@ -1,20 +1,19 @@ /**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/win32/FileUtils-win32.h b/native/cocos/platform/win32/FileUtils-win32.h index 92cc1548ba..0af2c99057 100644 --- a/native/cocos/platform/win32/FileUtils-win32.h +++ b/native/cocos/platform/win32/FileUtils-win32.h @@ -1,20 +1,19 @@ /**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/win32/Utils-win32.cpp b/native/cocos/platform/win32/Utils-win32.cpp index 427cb43cca..404feedd19 100644 --- a/native/cocos/platform/win32/Utils-win32.cpp +++ b/native/cocos/platform/win32/Utils-win32.cpp @@ -1,20 +1,19 @@ /**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/win32/Utils-win32.h b/native/cocos/platform/win32/Utils-win32.h index b377f8a438..a8d0abdd73 100644 --- a/native/cocos/platform/win32/Utils-win32.h +++ b/native/cocos/platform/win32/Utils-win32.h @@ -1,20 +1,19 @@ /**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/win32/WindowsPlatform.cpp b/native/cocos/platform/win32/WindowsPlatform.cpp index 99e2fcfdcd..b10d2691d1 100644 --- a/native/cocos/platform/win32/WindowsPlatform.cpp +++ b/native/cocos/platform/win32/WindowsPlatform.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/win32/WindowsPlatform.h b/native/cocos/platform/win32/WindowsPlatform.h index 0380d1dde1..bf4474f922 100644 --- a/native/cocos/platform/win32/WindowsPlatform.h +++ b/native/cocos/platform/win32/WindowsPlatform.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/win32/compat/stdint.h b/native/cocos/platform/win32/compat/stdint.h index b51b64670b..bb29ad0152 100644 --- a/native/cocos/platform/win32/compat/stdint.h +++ b/native/cocos/platform/win32/compat/stdint.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/win32/modules/Accelerometer.cpp b/native/cocos/platform/win32/modules/Accelerometer.cpp index 6167f46544..aa7f9e50b4 100644 --- a/native/cocos/platform/win32/modules/Accelerometer.cpp +++ b/native/cocos/platform/win32/modules/Accelerometer.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/win32/modules/Accelerometer.h b/native/cocos/platform/win32/modules/Accelerometer.h index 8863b1a577..78d62ddc2a 100644 --- a/native/cocos/platform/win32/modules/Accelerometer.h +++ b/native/cocos/platform/win32/modules/Accelerometer.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/win32/modules/Battery.cpp b/native/cocos/platform/win32/modules/Battery.cpp index 97d96a1ceb..141e0dbee3 100644 --- a/native/cocos/platform/win32/modules/Battery.cpp +++ b/native/cocos/platform/win32/modules/Battery.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/win32/modules/Battery.h b/native/cocos/platform/win32/modules/Battery.h index d2f76df45a..44a9b3c4db 100644 --- a/native/cocos/platform/win32/modules/Battery.h +++ b/native/cocos/platform/win32/modules/Battery.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/win32/modules/CanvasRenderingContext2DDelegate.cpp b/native/cocos/platform/win32/modules/CanvasRenderingContext2DDelegate.cpp index 0ef9bd9d62..886858acf8 100644 --- a/native/cocos/platform/win32/modules/CanvasRenderingContext2DDelegate.cpp +++ b/native/cocos/platform/win32/modules/CanvasRenderingContext2DDelegate.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2018-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2018-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/win32/modules/CanvasRenderingContext2DDelegate.h b/native/cocos/platform/win32/modules/CanvasRenderingContext2DDelegate.h index e07d499a92..5d74b5c8c0 100644 --- a/native/cocos/platform/win32/modules/CanvasRenderingContext2DDelegate.h +++ b/native/cocos/platform/win32/modules/CanvasRenderingContext2DDelegate.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2018-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2018-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/win32/modules/Network.cpp b/native/cocos/platform/win32/modules/Network.cpp index 5f1c622317..daaa42b658 100644 --- a/native/cocos/platform/win32/modules/Network.cpp +++ b/native/cocos/platform/win32/modules/Network.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/win32/modules/Network.h b/native/cocos/platform/win32/modules/Network.h index 7a2d0f9f22..0cbb39d319 100644 --- a/native/cocos/platform/win32/modules/Network.h +++ b/native/cocos/platform/win32/modules/Network.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/win32/modules/Screen.cpp b/native/cocos/platform/win32/modules/Screen.cpp index 9de94ca2d1..a86c9cfecf 100644 --- a/native/cocos/platform/win32/modules/Screen.cpp +++ b/native/cocos/platform/win32/modules/Screen.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/win32/modules/Screen.h b/native/cocos/platform/win32/modules/Screen.h index 563f4553ea..4f6f4c4951 100644 --- a/native/cocos/platform/win32/modules/Screen.h +++ b/native/cocos/platform/win32/modules/Screen.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/win32/modules/System.cpp b/native/cocos/platform/win32/modules/System.cpp index 75855c15f1..1ce378982c 100644 --- a/native/cocos/platform/win32/modules/System.cpp +++ b/native/cocos/platform/win32/modules/System.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/win32/modules/System.h b/native/cocos/platform/win32/modules/System.h index 1f664de0d5..8775f73ee0 100644 --- a/native/cocos/platform/win32/modules/System.h +++ b/native/cocos/platform/win32/modules/System.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/win32/modules/SystemWindow.cpp b/native/cocos/platform/win32/modules/SystemWindow.cpp index f0c97c5dfa..27128fa481 100644 --- a/native/cocos/platform/win32/modules/SystemWindow.cpp +++ b/native/cocos/platform/win32/modules/SystemWindow.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/win32/modules/SystemWindow.h b/native/cocos/platform/win32/modules/SystemWindow.h index 3db07eefb3..9365a64613 100644 --- a/native/cocos/platform/win32/modules/SystemWindow.h +++ b/native/cocos/platform/win32/modules/SystemWindow.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/win32/modules/SystemWindowManager.cpp b/native/cocos/platform/win32/modules/SystemWindowManager.cpp index 50c1cafbe2..9b430e4abc 100644 --- a/native/cocos/platform/win32/modules/SystemWindowManager.cpp +++ b/native/cocos/platform/win32/modules/SystemWindowManager.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #include "SystemWindowManager.h" #include "SDL2/SDL_events.h" diff --git a/native/cocos/platform/win32/modules/SystemWindowManager.h b/native/cocos/platform/win32/modules/SystemWindowManager.h index 9a0275cb9a..127725a881 100644 --- a/native/cocos/platform/win32/modules/SystemWindowManager.h +++ b/native/cocos/platform/win32/modules/SystemWindowManager.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/win32/modules/Vibrator.cpp b/native/cocos/platform/win32/modules/Vibrator.cpp index 4ca1bfaf5f..95125109f1 100644 --- a/native/cocos/platform/win32/modules/Vibrator.cpp +++ b/native/cocos/platform/win32/modules/Vibrator.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/platform/win32/modules/Vibrator.h b/native/cocos/platform/win32/modules/Vibrator.h index 7a92fc2345..26b688c013 100644 --- a/native/cocos/platform/win32/modules/Vibrator.h +++ b/native/cocos/platform/win32/modules/Vibrator.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/plugins/Plugins.cpp b/native/cocos/plugins/Plugins.cpp index 764e2f797b..c3f58d14e4 100644 --- a/native/cocos/plugins/Plugins.cpp +++ b/native/cocos/plugins/Plugins.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/plugins/Plugins.h b/native/cocos/plugins/Plugins.h index ac27729a10..1376d75e18 100644 --- a/native/cocos/plugins/Plugins.h +++ b/native/cocos/plugins/Plugins.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/plugins/bus/BusTypes.h b/native/cocos/plugins/bus/BusTypes.h index 3de0e92299..028eff54ad 100644 --- a/native/cocos/plugins/bus/BusTypes.h +++ b/native/cocos/plugins/bus/BusTypes.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/plugins/bus/EventBus.cpp b/native/cocos/plugins/bus/EventBus.cpp index 9daaad619d..4e149275c1 100644 --- a/native/cocos/plugins/bus/EventBus.cpp +++ b/native/cocos/plugins/bus/EventBus.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/plugins/bus/EventBus.h b/native/cocos/plugins/bus/EventBus.h index 287c6cac94..d505d9fa5d 100644 --- a/native/cocos/plugins/bus/EventBus.h +++ b/native/cocos/plugins/bus/EventBus.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -166,7 +165,7 @@ private: void dispatch(EventBase *event); void addListener(Listener *); void removeListener(Listener *); - std::vector _listeners; + std::vector _listeners; friend class Listener; }; diff --git a/native/cocos/primitive/Box.cpp b/native/cocos/primitive/Box.cpp index 25651f7a3a..47bdb296c1 100644 --- a/native/cocos/primitive/Box.cpp +++ b/native/cocos/primitive/Box.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/primitive/Box.h b/native/cocos/primitive/Box.h index a5d65b3fa2..e29f085ee1 100644 --- a/native/cocos/primitive/Box.h +++ b/native/cocos/primitive/Box.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/primitive/Capsule.cpp b/native/cocos/primitive/Capsule.cpp index 7beabbc008..149c584ab9 100644 --- a/native/cocos/primitive/Capsule.cpp +++ b/native/cocos/primitive/Capsule.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/primitive/Capsule.h b/native/cocos/primitive/Capsule.h index 872090b809..ffcd4cdf94 100644 --- a/native/cocos/primitive/Capsule.h +++ b/native/cocos/primitive/Capsule.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/primitive/Circle.cpp b/native/cocos/primitive/Circle.cpp index 88baad5599..99e2945625 100644 --- a/native/cocos/primitive/Circle.cpp +++ b/native/cocos/primitive/Circle.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/primitive/Circle.h b/native/cocos/primitive/Circle.h index b264f0d2e9..69039909dc 100644 --- a/native/cocos/primitive/Circle.h +++ b/native/cocos/primitive/Circle.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/primitive/Cone.cpp b/native/cocos/primitive/Cone.cpp index 50951d8fd4..5f4df37169 100644 --- a/native/cocos/primitive/Cone.cpp +++ b/native/cocos/primitive/Cone.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/primitive/Cone.h b/native/cocos/primitive/Cone.h index a0bc659d6e..56eab63b1b 100644 --- a/native/cocos/primitive/Cone.h +++ b/native/cocos/primitive/Cone.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/primitive/Cylinder.cpp b/native/cocos/primitive/Cylinder.cpp index 7664e7c62e..1f4b2cf850 100644 --- a/native/cocos/primitive/Cylinder.cpp +++ b/native/cocos/primitive/Cylinder.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/primitive/Cylinder.h b/native/cocos/primitive/Cylinder.h index 4e163a37d4..2c5da30d7e 100644 --- a/native/cocos/primitive/Cylinder.h +++ b/native/cocos/primitive/Cylinder.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/primitive/Plane.cpp b/native/cocos/primitive/Plane.cpp index 0dc3f36d71..947104f226 100644 --- a/native/cocos/primitive/Plane.cpp +++ b/native/cocos/primitive/Plane.cpp @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/primitive/Plane.h b/native/cocos/primitive/Plane.h index f54ffa63ea..6a764774c8 100644 --- a/native/cocos/primitive/Plane.h +++ b/native/cocos/primitive/Plane.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/primitive/Primitive.cpp b/native/cocos/primitive/Primitive.cpp index 4cd54c4f38..d51e55829e 100644 --- a/native/cocos/primitive/Primitive.cpp +++ b/native/cocos/primitive/Primitive.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/primitive/Primitive.h b/native/cocos/primitive/Primitive.h index cb464cc767..2e353b8b38 100644 --- a/native/cocos/primitive/Primitive.h +++ b/native/cocos/primitive/Primitive.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/primitive/PrimitiveDefine.h b/native/cocos/primitive/PrimitiveDefine.h index fb5664708e..1e8aa0ef3c 100644 --- a/native/cocos/primitive/PrimitiveDefine.h +++ b/native/cocos/primitive/PrimitiveDefine.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/primitive/PrimitiveUtils.cpp b/native/cocos/primitive/PrimitiveUtils.cpp index e69de29bb2..d3f25096ee 100644 --- a/native/cocos/primitive/PrimitiveUtils.cpp +++ b/native/cocos/primitive/PrimitiveUtils.cpp @@ -0,0 +1,23 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ diff --git a/native/cocos/primitive/PrimitiveUtils.h b/native/cocos/primitive/PrimitiveUtils.h index 1449737744..828de96814 100644 --- a/native/cocos/primitive/PrimitiveUtils.h +++ b/native/cocos/primitive/PrimitiveUtils.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/primitive/Quad.cpp b/native/cocos/primitive/Quad.cpp index 915f14eb4d..41994dacc3 100644 --- a/native/cocos/primitive/Quad.cpp +++ b/native/cocos/primitive/Quad.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/primitive/Quad.h b/native/cocos/primitive/Quad.h index d3b4694b5e..825c667d2e 100644 --- a/native/cocos/primitive/Quad.h +++ b/native/cocos/primitive/Quad.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/primitive/Sphere.cpp b/native/cocos/primitive/Sphere.cpp index fefcbd3534..420d441006 100644 --- a/native/cocos/primitive/Sphere.cpp +++ b/native/cocos/primitive/Sphere.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/primitive/Sphere.h b/native/cocos/primitive/Sphere.h index e1e97ef57b..15d098800d 100644 --- a/native/cocos/primitive/Sphere.h +++ b/native/cocos/primitive/Sphere.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/primitive/Torus.cpp b/native/cocos/primitive/Torus.cpp index e8668a3844..0f418d6ac8 100644 --- a/native/cocos/primitive/Torus.cpp +++ b/native/cocos/primitive/Torus.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/primitive/Torus.h b/native/cocos/primitive/Torus.h index 48d0ccdbec..7b2984eeb0 100644 --- a/native/cocos/primitive/Torus.h +++ b/native/cocos/primitive/Torus.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/primitive/Transform.cpp b/native/cocos/primitive/Transform.cpp index 060cca7a74..2ca7ef7f60 100644 --- a/native/cocos/primitive/Transform.cpp +++ b/native/cocos/primitive/Transform.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/primitive/Transform.h b/native/cocos/primitive/Transform.h index bd3c87ec44..5df7e5977e 100644 --- a/native/cocos/primitive/Transform.h +++ b/native/cocos/primitive/Transform.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/profiler/DebugRenderer.cpp b/native/cocos/profiler/DebugRenderer.cpp index 154c0c95a3..13f5d17a21 100644 --- a/native/cocos/profiler/DebugRenderer.cpp +++ b/native/cocos/profiler/DebugRenderer.cpp @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #include "DebugRenderer.h" #include diff --git a/native/cocos/profiler/DebugRenderer.h b/native/cocos/profiler/DebugRenderer.h index 03f110d352..3914bc5f9c 100644 --- a/native/cocos/profiler/DebugRenderer.h +++ b/native/cocos/profiler/DebugRenderer.h @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once #include diff --git a/native/cocos/profiler/GameStats.h b/native/cocos/profiler/GameStats.h index 1060f971e5..dc85f9083e 100644 --- a/native/cocos/profiler/GameStats.h +++ b/native/cocos/profiler/GameStats.h @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once #include diff --git a/native/cocos/profiler/Profiler.cpp b/native/cocos/profiler/Profiler.cpp index 80168a4523..e192b604df 100644 --- a/native/cocos/profiler/Profiler.cpp +++ b/native/cocos/profiler/Profiler.cpp @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #include "Profiler.h" #if CC_USE_DEBUG_RENDERER diff --git a/native/cocos/profiler/Profiler.h b/native/cocos/profiler/Profiler.h index 883405c24e..2ac05ba36e 100644 --- a/native/cocos/profiler/Profiler.h +++ b/native/cocos/profiler/Profiler.h @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once #include diff --git a/native/cocos/renderer/GFXDeviceManager.h b/native/cocos/renderer/GFXDeviceManager.h index f897d65d6a..c43385a47a 100644 --- a/native/cocos/renderer/GFXDeviceManager.h +++ b/native/cocos/renderer/GFXDeviceManager.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -39,7 +38,7 @@ // arengine only supports gles2, arcore supports gles2 and gles3 // setting the CC_USE_GLES3 off is needed while using CC_USE_AR_AUTO or CC_USE_AR_ENGINE #if CC_USE_AR_MODULE && (CC_USE_AR_AUTO || CC_USE_AR_ENGINE) -#undef CC_USE_GLES3 + #undef CC_USE_GLES3 #endif #ifdef CC_USE_NVN @@ -106,7 +105,7 @@ public: #endif #ifdef CC_USE_GLES2 - // arcore & arengine currently only supports gles, session update requires gl context + // arcore & arengine currently only supports gles, session update requires gl context #if CC_USE_AR_MODULE Device::isSupportDetachDeviceThread = false; #endif diff --git a/native/cocos/renderer/core/MaterialInstance.cpp b/native/cocos/renderer/core/MaterialInstance.cpp index cfebda62d0..322a35aba0 100644 --- a/native/cocos/renderer/core/MaterialInstance.cpp +++ b/native/cocos/renderer/core/MaterialInstance.cpp @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +***************************************************************************/ + #include "renderer/core/MaterialInstance.h" //#include "core/components/RenderableComponent.h" #include "renderer/core/PassInstance.h" diff --git a/native/cocos/renderer/core/MaterialInstance.h b/native/cocos/renderer/core/MaterialInstance.h index 2e7a3bbeb6..7c0793428a 100644 --- a/native/cocos/renderer/core/MaterialInstance.h +++ b/native/cocos/renderer/core/MaterialInstance.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once diff --git a/native/cocos/renderer/core/PassInstance.cpp b/native/cocos/renderer/core/PassInstance.cpp index f7ed7bcc97..4a8cce8739 100644 --- a/native/cocos/renderer/core/PassInstance.cpp +++ b/native/cocos/renderer/core/PassInstance.cpp @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #include "renderer/core/PassInstance.h" #include diff --git a/native/cocos/renderer/core/PassInstance.h b/native/cocos/renderer/core/PassInstance.h index 8b07ba2b9e..5ca715ce12 100644 --- a/native/cocos/renderer/core/PassInstance.h +++ b/native/cocos/renderer/core/PassInstance.h @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once diff --git a/native/cocos/renderer/core/PassUtils.cpp b/native/cocos/renderer/core/PassUtils.cpp index c8d7bb8e5c..da7953b34d 100644 --- a/native/cocos/renderer/core/PassUtils.cpp +++ b/native/cocos/renderer/core/PassUtils.cpp @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #include "renderer/core/PassUtils.h" #include @@ -194,7 +193,6 @@ const ccstd::unordered_map type2writer = { }}, }; - const ccstd::unordered_map type2validator = { {gfx::Type::UNKNOWN, [](const MaterialProperty & /*v*/) -> bool { CC_LOG_ERROR("type2validator unknown type"); diff --git a/native/cocos/renderer/core/PassUtils.h b/native/cocos/renderer/core/PassUtils.h index 93f185fdad..5bafe6911b 100644 --- a/native/cocos/renderer/core/PassUtils.h +++ b/native/cocos/renderer/core/PassUtils.h @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once @@ -65,7 +64,7 @@ constexpr uint32_t customizeType(uint32_t handle, gfx::Type type) { return (handle & ~TYPE_MASK) | ((static_cast(type) << 26) & TYPE_MASK); } -using MacroValue = ccstd::variant; +using MacroValue = ccstd::variant; /** * @en Combination of preprocess macros @@ -86,8 +85,8 @@ using GFXTypeReaderCallback = void (*)(const float *, MaterialProperty &, index_ using GFXTypeWriterCallback = void (*)(float *, const MaterialProperty &, index_t); using GFXTypeValidatorCallback = bool (*)(const MaterialProperty &); -extern const ccstd::unordered_map type2reader; //NOLINT(readability-identifier-naming) -extern const ccstd::unordered_map type2writer; //NOLINT(readability-identifier-naming) +extern const ccstd::unordered_map type2reader; //NOLINT(readability-identifier-naming) +extern const ccstd::unordered_map type2writer; //NOLINT(readability-identifier-naming) extern const ccstd::unordered_map type2validator; //NOLINT(readability-identifier-naming) /** diff --git a/native/cocos/renderer/core/ProgramLib.cpp b/native/cocos/renderer/core/ProgramLib.cpp index fcd4da5cad..4fef1f3ed4 100644 --- a/native/cocos/renderer/core/ProgramLib.cpp +++ b/native/cocos/renderer/core/ProgramLib.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -28,6 +27,7 @@ #include #include #include +#include "ProgramUtils.h" #include "base/Log.h" #include "core/assets/EffectAsset.h" #include "renderer/gfx-base/GFXDevice.h" @@ -37,10 +37,6 @@ namespace cc { namespace { -int32_t getBitCount(int32_t cnt) { - return std::ceil(std::log2(std::max(cnt, 2))); // std::max checks number types -} - ccstd::string mapDefine(const IDefineInfo &info, const ccstd::optional &def) { if (info.type == "boolean") { return def.has_value() ? (macroRecordAsBool(def.value()) ? "1" : "0") : "0"; @@ -148,29 +144,6 @@ int32_t getSize(const IBlockInfo &block) { return s; } -auto genHandles(const IProgramInfo &tmpl) { - Record handleMap{}; - // block member handles - for (const auto &block : tmpl.blocks) { - const auto members = block.members; - uint32_t offset = 0; - for (const auto &uniform : members) { - handleMap[uniform.name] = genHandle(block.binding, - uniform.type, - uniform.count, - offset); - offset += (getTypeSize(uniform.type) >> 2) * uniform.count; // assumes no implicit padding, which is guaranteed by effect compiler - } - } - // samplerTexture handles - for (const auto &samplerTexture : tmpl.samplerTextures) { - handleMap[samplerTexture.name] = genHandle(samplerTexture.binding, - samplerTexture.type, - samplerTexture.count); - } - return handleMap; -} - bool dependencyCheck(const ccstd::vector &dependencies, const MacroRecord &defines) { for (const auto &d : dependencies) { // NOLINT(readability-use-anyofallof) if (d[0] == '!') { // negative dependency @@ -292,65 +265,7 @@ IProgramInfo *ProgramLib::define(IShaderInfo &shader) { IProgramInfo &tmpl = _templates[shader.name]; tmpl.copyFrom(shader); - // calculate option mask offset - int32_t offset = 0; - for (auto &def : tmpl.defines) { - int32_t cnt = 1; - if (def.type == "number") { - auto &range = def.range.value(); - cnt = getBitCount(range[1] - range[0] + 1); // inclusive on both ends - def.map = [=](const MacroValue &value) -> int32_t { - if (ccstd::holds_alternative(value)) { - return ccstd::get(value) - range[0]; - } - if (ccstd::holds_alternative(value)) { - return (ccstd::get(value) ? 1 : 0) - range[0]; - } - CC_ABORT(); // We only support macro with int32_t type now. - return 0; - }; - } else if (def.type == "string") { - cnt = getBitCount(static_cast(def.options.value().size())); - def.map = [=](const MacroValue &value) -> int32_t { - const auto *pValue = ccstd::get_if(&value); - if (pValue != nullptr) { - auto idx = static_cast(std::find(def.options.value().begin(), def.options.value().end(), *pValue) - def.options.value().begin()); - return std::max(0, idx); - } - return 0; - }; - } else if (def.type == "boolean") { - def.map = [](const MacroValue &value) -> int32_t { - const auto *pBool = ccstd::get_if(&value); - if (pBool != nullptr) { - return *pBool ? 1 : 0; - } - const auto *pInt = ccstd::get_if(&value); - if (pInt != nullptr) { - return *pInt ? 1 : 0; - } - const auto *pString = ccstd::get_if(&value); - if (pString != nullptr) { - return *pString != "0" || !(*pString).empty() ? 1 : 0; - } - return 0; - }; - } - def.offset = offset; - offset += cnt; - } - if (offset > 31) { - tmpl.uber = true; - } - // generate constant macros - { - tmpl.constantMacros.clear(); - std::stringstream ss; - for (auto &key : tmpl.builtins.statistics) { - ss << "#define " << key.first << " " << key.second << std::endl; - } - tmpl.constantMacros = ss.str(); - } + render::populateMacros(tmpl); if (_templateInfos.count(tmpl.hash) == 0) { ITemplateInfo tmplInfo{}; @@ -500,7 +415,7 @@ IProgramInfo *ProgramLib::define(IShaderInfo &shader) { auto &fragmentShaderInfo = tmplInfo.shaderInfo.stages.back(); fragmentShaderInfo.stage = gfx::ShaderStageFlagBit::FRAGMENT; fragmentShaderInfo.source = ""; - tmplInfo.handleMap = genHandles(tmpl); + tmplInfo.handleMap = render::genHandles(tmpl); tmplInfo.setLayouts = {}; _templateInfos[tmpl.hash] = tmplInfo; @@ -563,37 +478,7 @@ ccstd::string ProgramLib::getKey(const ccstd::string &name, const MacroRecord &d auto itTpl = _templates.find(name); CC_ASSERT(itTpl != _templates.end()); auto &tmpl = itTpl->second; - auto &tmplDefs = tmpl.defines; - if (tmpl.uber) { - std::stringstream key; - for (auto &tmplDef : tmplDefs) { - auto itDef = defines.find(tmplDef.name); - if (itDef == defines.end() || !tmplDef.map) { - continue; - } - const auto &value = itDef->second; - auto mapped = tmplDef.map(value); - auto offset = tmplDef.offset; - key << offset << mapped << "|"; - } - ccstd::string ret{key.str() + std::to_string(tmpl.hash)}; - return ret; - } - uint32_t key = 0; - std::stringstream ss; - for (auto &tmplDef : tmplDefs) { - auto itDef = defines.find(tmplDef.name); - if (itDef == defines.end() || !tmplDef.map) { - continue; - } - const auto &value = itDef->second; - auto mapped = tmplDef.map(value); - auto offset = tmplDef.offset; - key |= (mapped << offset); - } - ss << std::hex << key << "|" << std::to_string(tmpl.hash); - ccstd::string ret{ss.str()}; - return ret; + return render::getVariantKey(tmpl, defines); } void ProgramLib::destroyShaderByDefines(const MacroRecord &defines) { diff --git a/native/cocos/renderer/core/ProgramLib.h b/native/cocos/renderer/core/ProgramLib.h index c33ae06791..08756da5bb 100644 --- a/native/cocos/renderer/core/ProgramLib.h +++ b/native/cocos/renderer/core/ProgramLib.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/core/ProgramUtils.cpp b/native/cocos/renderer/core/ProgramUtils.cpp new file mode 100644 index 0000000000..baffa4d8ae --- /dev/null +++ b/native/cocos/renderer/core/ProgramUtils.cpp @@ -0,0 +1,168 @@ +/**************************************************************************** + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ +#include "ProgramUtils.h" + +namespace cc { + +namespace render { + +namespace { + +int32_t getBitCount(int32_t cnt) { + return std::ceil(std::log2(std::max(cnt, 2))); // std::max checks number types +} + +template +ccstd::unordered_map genHandlesImpl(const ShaderInfoT &tmpl) { + Record handleMap{}; + // block member handles + for (const auto &block : tmpl.blocks) { + const auto members = block.members; + uint32_t offset = 0; + for (const auto &uniform : members) { + handleMap[uniform.name] = genHandle(block.binding, + uniform.type, + uniform.count, + offset); + offset += (getTypeSize(uniform.type) >> 2) * uniform.count; // assumes no implicit padding, which is guaranteed by effect compiler + } + } + // samplerTexture handles + for (const auto &samplerTexture : tmpl.samplerTextures) { + handleMap[samplerTexture.name] = genHandle(samplerTexture.binding, + samplerTexture.type, + samplerTexture.count); + } + return handleMap; +} + +} // namespace + +void populateMacros(IProgramInfo &tmpl) { + // calculate option mask offset + int32_t offset = 0; + for (auto &def : tmpl.defines) { + int32_t cnt = 1; + if (def.type == "number") { + auto &range = def.range.value(); + cnt = getBitCount(range[1] - range[0] + 1); // inclusive on both ends + def.map = [=](const MacroValue &value) -> int32_t { + if (ccstd::holds_alternative(value)) { + return ccstd::get(value) - range[0]; + } + if (ccstd::holds_alternative(value)) { + return (ccstd::get(value) ? 1 : 0) - range[0]; + } + CC_ABORT(); // We only support macro with int32_t type now. + return 0; + }; + } else if (def.type == "string") { + cnt = getBitCount(static_cast(def.options.value().size())); + def.map = [=](const MacroValue &value) -> int32_t { + const auto *pValue = ccstd::get_if(&value); + if (pValue != nullptr) { + auto idx = static_cast(std::find(def.options.value().begin(), def.options.value().end(), *pValue) - def.options.value().begin()); + return std::max(0, idx); + } + return 0; + }; + } else if (def.type == "boolean") { + def.map = [](const MacroValue &value) -> int32_t { + const auto *pBool = ccstd::get_if(&value); + if (pBool != nullptr) { + return *pBool ? 1 : 0; + } + const auto *pInt = ccstd::get_if(&value); + if (pInt != nullptr) { + return *pInt ? 1 : 0; + } + const auto *pString = ccstd::get_if(&value); + if (pString != nullptr) { + return *pString != "0" || !(*pString).empty() ? 1 : 0; + } + return 0; + }; + } + def.offset = offset; + offset += cnt; + } + if (offset > 31) { + tmpl.uber = true; + } + // generate constant macros + { + tmpl.constantMacros.clear(); + std::stringstream ss; + for (auto &key : tmpl.builtins.statistics) { + ss << "#define " << key.first << " " << key.second << std::endl; + } + tmpl.constantMacros = ss.str(); + } +} + +ccstd::unordered_map genHandles(const IProgramInfo &tmpl) { + return genHandlesImpl(tmpl); +} + +ccstd::unordered_map genHandles(const gfx::ShaderInfo &tmpl) { + return genHandlesImpl(tmpl); +} + +ccstd::string getVariantKey(const IProgramInfo &tmpl, const MacroRecord &defines) { + const auto &tmplDefs = tmpl.defines; + if (tmpl.uber) { + std::stringstream key; + for (const auto &tmplDef : tmplDefs) { + auto itDef = defines.find(tmplDef.name); + if (itDef == defines.end() || !tmplDef.map) { + continue; + } + const auto &value = itDef->second; + auto mapped = tmplDef.map(value); + auto offset = tmplDef.offset; + key << offset << mapped << "|"; + } + ccstd::string ret{key.str() + std::to_string(tmpl.hash)}; + return ret; + } + uint32_t key = 0; + std::stringstream ss; + for (const auto &tmplDef : tmplDefs) { + auto itDef = defines.find(tmplDef.name); + if (itDef == defines.end() || !tmplDef.map) { + continue; + } + const auto &value = itDef->second; + auto mapped = tmplDef.map(value); + auto offset = tmplDef.offset; + key |= (mapped << offset); + } + ss << std::hex << key << "|" << std::to_string(tmpl.hash); + ccstd::string ret{ss.str()}; + return ret; +} + +} // namespace render + +} // namespace cc diff --git a/native/cocos/renderer/core/ProgramUtils.h b/native/cocos/renderer/core/ProgramUtils.h new file mode 100644 index 0000000000..74056194b2 --- /dev/null +++ b/native/cocos/renderer/core/ProgramUtils.h @@ -0,0 +1,40 @@ +/**************************************************************************** + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + +#pragma once +#include "cocos/renderer/core/ProgramLib.h" + +namespace cc { + +namespace render { + +void populateMacros(IProgramInfo& tmpl); + +ccstd::unordered_map genHandles(const IProgramInfo& tmpl); +ccstd::unordered_map genHandles(const gfx::ShaderInfo& tmpl); +ccstd::string getVariantKey(const IProgramInfo& tmpl, const MacroRecord& defines); + +} // namespace render + +} // namespace cc diff --git a/native/cocos/renderer/core/TextureBufferPool.cpp b/native/cocos/renderer/core/TextureBufferPool.cpp index 4f9a2b91bb..3268830393 100644 --- a/native/cocos/renderer/core/TextureBufferPool.cpp +++ b/native/cocos/renderer/core/TextureBufferPool.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/core/TextureBufferPool.h b/native/cocos/renderer/core/TextureBufferPool.h index 87390c3c17..3093c5a692 100644 --- a/native/cocos/renderer/core/TextureBufferPool.h +++ b/native/cocos/renderer/core/TextureBufferPool.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/frame-graph/Blackboard.h b/native/cocos/renderer/frame-graph/Blackboard.h index e14bb67214..bea2c12304 100644 --- a/native/cocos/renderer/frame-graph/Blackboard.h +++ b/native/cocos/renderer/frame-graph/Blackboard.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/frame-graph/CallbackPass.h b/native/cocos/renderer/frame-graph/CallbackPass.h index 87fc0849a3..614ff7a3f4 100644 --- a/native/cocos/renderer/frame-graph/CallbackPass.h +++ b/native/cocos/renderer/frame-graph/CallbackPass.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/frame-graph/DevicePass.cpp b/native/cocos/renderer/frame-graph/DevicePass.cpp index edd337fa3a..dd6749dfd3 100644 --- a/native/cocos/renderer/frame-graph/DevicePass.cpp +++ b/native/cocos/renderer/frame-graph/DevicePass.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/frame-graph/DevicePass.h b/native/cocos/renderer/frame-graph/DevicePass.h index 8480d8ffa7..8ce7b26dcb 100644 --- a/native/cocos/renderer/frame-graph/DevicePass.h +++ b/native/cocos/renderer/frame-graph/DevicePass.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/frame-graph/DevicePassResourceTable.cpp b/native/cocos/renderer/frame-graph/DevicePassResourceTable.cpp index fcf49e4ac6..6aa58b35d6 100644 --- a/native/cocos/renderer/frame-graph/DevicePassResourceTable.cpp +++ b/native/cocos/renderer/frame-graph/DevicePassResourceTable.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/frame-graph/DevicePassResourceTable.h b/native/cocos/renderer/frame-graph/DevicePassResourceTable.h index ed3d886192..a7fcfce3b8 100644 --- a/native/cocos/renderer/frame-graph/DevicePassResourceTable.h +++ b/native/cocos/renderer/frame-graph/DevicePassResourceTable.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/frame-graph/FrameGraph.cpp b/native/cocos/renderer/frame-graph/FrameGraph.cpp index 892841a31d..25b14f79e0 100644 --- a/native/cocos/renderer/frame-graph/FrameGraph.cpp +++ b/native/cocos/renderer/frame-graph/FrameGraph.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/frame-graph/FrameGraph.h b/native/cocos/renderer/frame-graph/FrameGraph.h index a28791e625..ccea4b3559 100644 --- a/native/cocos/renderer/frame-graph/FrameGraph.h +++ b/native/cocos/renderer/frame-graph/FrameGraph.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/frame-graph/Handle.h b/native/cocos/renderer/frame-graph/Handle.h index 6b8e1d966e..6ccb0e9044 100644 --- a/native/cocos/renderer/frame-graph/Handle.h +++ b/native/cocos/renderer/frame-graph/Handle.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/frame-graph/ImmutableState.cpp b/native/cocos/renderer/frame-graph/ImmutableState.cpp index 8b2906cb44..24a0b9ad60 100644 --- a/native/cocos/renderer/frame-graph/ImmutableState.cpp +++ b/native/cocos/renderer/frame-graph/ImmutableState.cpp @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -28,7 +27,6 @@ #include #include "DevicePassResourceTable.h" #include "gfx-base/GFXBarrier.h" -#include "pipeline/custom/GslUtils.h" namespace cc { namespace framegraph { diff --git a/native/cocos/renderer/frame-graph/ImmutableState.h b/native/cocos/renderer/frame-graph/ImmutableState.h index a608e293af..71cbbbcdf7 100644 --- a/native/cocos/renderer/frame-graph/ImmutableState.h +++ b/native/cocos/renderer/frame-graph/ImmutableState.h @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/frame-graph/PassInsertPointManager.cpp b/native/cocos/renderer/frame-graph/PassInsertPointManager.cpp index f39000652b..5b51e27bb7 100644 --- a/native/cocos/renderer/frame-graph/PassInsertPointManager.cpp +++ b/native/cocos/renderer/frame-graph/PassInsertPointManager.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/frame-graph/PassInsertPointManager.h b/native/cocos/renderer/frame-graph/PassInsertPointManager.h index b64019e823..22b25d3a4b 100644 --- a/native/cocos/renderer/frame-graph/PassInsertPointManager.h +++ b/native/cocos/renderer/frame-graph/PassInsertPointManager.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/frame-graph/PassNode.cpp b/native/cocos/renderer/frame-graph/PassNode.cpp index 2b4f8756f0..e0ab608c42 100644 --- a/native/cocos/renderer/frame-graph/PassNode.cpp +++ b/native/cocos/renderer/frame-graph/PassNode.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/frame-graph/PassNode.h b/native/cocos/renderer/frame-graph/PassNode.h index 51e90bfedd..393157112b 100644 --- a/native/cocos/renderer/frame-graph/PassNode.h +++ b/native/cocos/renderer/frame-graph/PassNode.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/frame-graph/PassNodeBuilder.cpp b/native/cocos/renderer/frame-graph/PassNodeBuilder.cpp index 54c58027bc..91342e43e8 100644 --- a/native/cocos/renderer/frame-graph/PassNodeBuilder.cpp +++ b/native/cocos/renderer/frame-graph/PassNodeBuilder.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/frame-graph/PassNodeBuilder.h b/native/cocos/renderer/frame-graph/PassNodeBuilder.h index 2aebdee70c..15c7e0a2ea 100644 --- a/native/cocos/renderer/frame-graph/PassNodeBuilder.h +++ b/native/cocos/renderer/frame-graph/PassNodeBuilder.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/frame-graph/RenderTargetAttachment.h b/native/cocos/renderer/frame-graph/RenderTargetAttachment.h index e27ab7b5a7..cba52c9436 100644 --- a/native/cocos/renderer/frame-graph/RenderTargetAttachment.h +++ b/native/cocos/renderer/frame-graph/RenderTargetAttachment.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/frame-graph/Resource.h b/native/cocos/renderer/frame-graph/Resource.h index ce53949492..2c47239edd 100644 --- a/native/cocos/renderer/frame-graph/Resource.h +++ b/native/cocos/renderer/frame-graph/Resource.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/frame-graph/ResourceAllocator.h b/native/cocos/renderer/frame-graph/ResourceAllocator.h index 988b7e51c4..2830ae8048 100644 --- a/native/cocos/renderer/frame-graph/ResourceAllocator.h +++ b/native/cocos/renderer/frame-graph/ResourceAllocator.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/frame-graph/ResourceEntry.h b/native/cocos/renderer/frame-graph/ResourceEntry.h index 5553d6c97a..f00e3ee6c4 100644 --- a/native/cocos/renderer/frame-graph/ResourceEntry.h +++ b/native/cocos/renderer/frame-graph/ResourceEntry.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/frame-graph/ResourceNode.h b/native/cocos/renderer/frame-graph/ResourceNode.h index 88c7bee29f..ae7d9558df 100644 --- a/native/cocos/renderer/frame-graph/ResourceNode.h +++ b/native/cocos/renderer/frame-graph/ResourceNode.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/frame-graph/VirtualResource.cpp b/native/cocos/renderer/frame-graph/VirtualResource.cpp index 53a6fdcc92..0843990a6d 100644 --- a/native/cocos/renderer/frame-graph/VirtualResource.cpp +++ b/native/cocos/renderer/frame-graph/VirtualResource.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/frame-graph/VirtualResource.h b/native/cocos/renderer/frame-graph/VirtualResource.h index 7a4020ea3c..77d2e94e45 100644 --- a/native/cocos/renderer/frame-graph/VirtualResource.h +++ b/native/cocos/renderer/frame-graph/VirtualResource.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-agent/BufferAgent.cpp b/native/cocos/renderer/gfx-agent/BufferAgent.cpp index ac05640083..ec593a7282 100644 --- a/native/cocos/renderer/gfx-agent/BufferAgent.cpp +++ b/native/cocos/renderer/gfx-agent/BufferAgent.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -87,8 +86,7 @@ void BufferAgent::doResize(uint32_t size, uint32_t /*count*/) { ENQUEUE_MESSAGE_1( mq, BufferFreeStagingBuffer, stagingBuffer, std::move(_stagingBuffer), - { - }); + {}); } if (hasFlag(_flags, BufferFlagBit::ENABLE_STAGING_WRITE) || (size > STAGING_BUFFER_THRESHOLD && hasFlag(_memUsage, MemoryUsageBit::HOST))) { diff --git a/native/cocos/renderer/gfx-agent/BufferAgent.h b/native/cocos/renderer/gfx-agent/BufferAgent.h index f0e91f2eac..235a6b44e0 100644 --- a/native/cocos/renderer/gfx-agent/BufferAgent.h +++ b/native/cocos/renderer/gfx-agent/BufferAgent.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-agent/CommandBufferAgent.cpp b/native/cocos/renderer/gfx-agent/CommandBufferAgent.cpp index 25dc82f406..04276e9ec1 100644 --- a/native/cocos/renderer/gfx-agent/CommandBufferAgent.cpp +++ b/native/cocos/renderer/gfx-agent/CommandBufferAgent.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-agent/CommandBufferAgent.h b/native/cocos/renderer/gfx-agent/CommandBufferAgent.h index 2b649b8ab9..fef058d3b5 100644 --- a/native/cocos/renderer/gfx-agent/CommandBufferAgent.h +++ b/native/cocos/renderer/gfx-agent/CommandBufferAgent.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-agent/DescriptorSetAgent.cpp b/native/cocos/renderer/gfx-agent/DescriptorSetAgent.cpp index a02a5cb265..3eac95852e 100644 --- a/native/cocos/renderer/gfx-agent/DescriptorSetAgent.cpp +++ b/native/cocos/renderer/gfx-agent/DescriptorSetAgent.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-agent/DescriptorSetAgent.h b/native/cocos/renderer/gfx-agent/DescriptorSetAgent.h index 35061c8d35..1b74dda69a 100644 --- a/native/cocos/renderer/gfx-agent/DescriptorSetAgent.h +++ b/native/cocos/renderer/gfx-agent/DescriptorSetAgent.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-agent/DescriptorSetLayoutAgent.cpp b/native/cocos/renderer/gfx-agent/DescriptorSetLayoutAgent.cpp index 88031d0b0e..189f1645ee 100644 --- a/native/cocos/renderer/gfx-agent/DescriptorSetLayoutAgent.cpp +++ b/native/cocos/renderer/gfx-agent/DescriptorSetLayoutAgent.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-agent/DescriptorSetLayoutAgent.h b/native/cocos/renderer/gfx-agent/DescriptorSetLayoutAgent.h index a5d4a69993..cdbefc5a41 100644 --- a/native/cocos/renderer/gfx-agent/DescriptorSetLayoutAgent.h +++ b/native/cocos/renderer/gfx-agent/DescriptorSetLayoutAgent.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-agent/DeviceAgent.cpp b/native/cocos/renderer/gfx-agent/DeviceAgent.cpp index c12faaf59e..5f9f3749ec 100644 --- a/native/cocos/renderer/gfx-agent/DeviceAgent.cpp +++ b/native/cocos/renderer/gfx-agent/DeviceAgent.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -25,10 +24,10 @@ #include #include +#include "application/ApplicationManager.h" #include "base/Log.h" #include "base/threading/MessageQueue.h" #include "base/threading/ThreadSafeLinearAllocator.h" -#include "application/ApplicationManager.h" #include "platform/interfaces/modules/IXRInterface.h" #include "BufferAgent.h" diff --git a/native/cocos/renderer/gfx-agent/DeviceAgent.h b/native/cocos/renderer/gfx-agent/DeviceAgent.h index fc131838f7..5ecd9d544b 100644 --- a/native/cocos/renderer/gfx-agent/DeviceAgent.h +++ b/native/cocos/renderer/gfx-agent/DeviceAgent.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-agent/FramebufferAgent.cpp b/native/cocos/renderer/gfx-agent/FramebufferAgent.cpp index 4f5ad304e6..0c54378d08 100644 --- a/native/cocos/renderer/gfx-agent/FramebufferAgent.cpp +++ b/native/cocos/renderer/gfx-agent/FramebufferAgent.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-agent/FramebufferAgent.h b/native/cocos/renderer/gfx-agent/FramebufferAgent.h index 631aa26d58..d70351c7d6 100644 --- a/native/cocos/renderer/gfx-agent/FramebufferAgent.h +++ b/native/cocos/renderer/gfx-agent/FramebufferAgent.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-agent/InputAssemblerAgent.cpp b/native/cocos/renderer/gfx-agent/InputAssemblerAgent.cpp index 88e8913317..1f7b9063aa 100644 --- a/native/cocos/renderer/gfx-agent/InputAssemblerAgent.cpp +++ b/native/cocos/renderer/gfx-agent/InputAssemblerAgent.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-agent/InputAssemblerAgent.h b/native/cocos/renderer/gfx-agent/InputAssemblerAgent.h index 8312f17d9e..dba5a3c9d0 100644 --- a/native/cocos/renderer/gfx-agent/InputAssemblerAgent.h +++ b/native/cocos/renderer/gfx-agent/InputAssemblerAgent.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-agent/PipelineLayoutAgent.cpp b/native/cocos/renderer/gfx-agent/PipelineLayoutAgent.cpp index 0bc89d59c8..f44af30b60 100644 --- a/native/cocos/renderer/gfx-agent/PipelineLayoutAgent.cpp +++ b/native/cocos/renderer/gfx-agent/PipelineLayoutAgent.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-agent/PipelineLayoutAgent.h b/native/cocos/renderer/gfx-agent/PipelineLayoutAgent.h index 5eb375a6de..be4fbc8412 100644 --- a/native/cocos/renderer/gfx-agent/PipelineLayoutAgent.h +++ b/native/cocos/renderer/gfx-agent/PipelineLayoutAgent.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-agent/PipelineStateAgent.cpp b/native/cocos/renderer/gfx-agent/PipelineStateAgent.cpp index 5478014b4c..fd7a3fa4d2 100644 --- a/native/cocos/renderer/gfx-agent/PipelineStateAgent.cpp +++ b/native/cocos/renderer/gfx-agent/PipelineStateAgent.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-agent/PipelineStateAgent.h b/native/cocos/renderer/gfx-agent/PipelineStateAgent.h index 7f93398831..29b2f4539a 100644 --- a/native/cocos/renderer/gfx-agent/PipelineStateAgent.h +++ b/native/cocos/renderer/gfx-agent/PipelineStateAgent.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-agent/QueryPoolAgent.cpp b/native/cocos/renderer/gfx-agent/QueryPoolAgent.cpp index 928972c2af..e734d86a17 100644 --- a/native/cocos/renderer/gfx-agent/QueryPoolAgent.cpp +++ b/native/cocos/renderer/gfx-agent/QueryPoolAgent.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-agent/QueryPoolAgent.h b/native/cocos/renderer/gfx-agent/QueryPoolAgent.h index 5e70fe34f3..169b051778 100644 --- a/native/cocos/renderer/gfx-agent/QueryPoolAgent.h +++ b/native/cocos/renderer/gfx-agent/QueryPoolAgent.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-agent/QueueAgent.cpp b/native/cocos/renderer/gfx-agent/QueueAgent.cpp index 79372e08e0..abe44adbe1 100644 --- a/native/cocos/renderer/gfx-agent/QueueAgent.cpp +++ b/native/cocos/renderer/gfx-agent/QueueAgent.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-agent/QueueAgent.h b/native/cocos/renderer/gfx-agent/QueueAgent.h index 674095fa5a..4d4a449b77 100644 --- a/native/cocos/renderer/gfx-agent/QueueAgent.h +++ b/native/cocos/renderer/gfx-agent/QueueAgent.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-agent/RenderPassAgent.cpp b/native/cocos/renderer/gfx-agent/RenderPassAgent.cpp index a181692804..3cfb9f631b 100644 --- a/native/cocos/renderer/gfx-agent/RenderPassAgent.cpp +++ b/native/cocos/renderer/gfx-agent/RenderPassAgent.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-agent/RenderPassAgent.h b/native/cocos/renderer/gfx-agent/RenderPassAgent.h index 4008af1cee..7de028425e 100644 --- a/native/cocos/renderer/gfx-agent/RenderPassAgent.h +++ b/native/cocos/renderer/gfx-agent/RenderPassAgent.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-agent/ShaderAgent.cpp b/native/cocos/renderer/gfx-agent/ShaderAgent.cpp index 37910b4afa..7839dd5021 100644 --- a/native/cocos/renderer/gfx-agent/ShaderAgent.cpp +++ b/native/cocos/renderer/gfx-agent/ShaderAgent.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-agent/ShaderAgent.h b/native/cocos/renderer/gfx-agent/ShaderAgent.h index c80bcf21d9..a770b6dc55 100644 --- a/native/cocos/renderer/gfx-agent/ShaderAgent.h +++ b/native/cocos/renderer/gfx-agent/ShaderAgent.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-agent/SwapchainAgent.cpp b/native/cocos/renderer/gfx-agent/SwapchainAgent.cpp index f749cbcd09..c2e4389b7a 100644 --- a/native/cocos/renderer/gfx-agent/SwapchainAgent.cpp +++ b/native/cocos/renderer/gfx-agent/SwapchainAgent.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-agent/SwapchainAgent.h b/native/cocos/renderer/gfx-agent/SwapchainAgent.h index 2a72efb422..4e142f7cc5 100644 --- a/native/cocos/renderer/gfx-agent/SwapchainAgent.h +++ b/native/cocos/renderer/gfx-agent/SwapchainAgent.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-agent/TextureAgent.cpp b/native/cocos/renderer/gfx-agent/TextureAgent.cpp index 15faaae43e..ec12e61aaa 100644 --- a/native/cocos/renderer/gfx-agent/TextureAgent.cpp +++ b/native/cocos/renderer/gfx-agent/TextureAgent.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-agent/TextureAgent.h b/native/cocos/renderer/gfx-agent/TextureAgent.h index 7097668cb5..1304a75c51 100644 --- a/native/cocos/renderer/gfx-agent/TextureAgent.h +++ b/native/cocos/renderer/gfx-agent/TextureAgent.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-base/GFXBarrier.cpp b/native/cocos/renderer/gfx-base/GFXBarrier.cpp index eb5e133bfb..4d44186197 100644 --- a/native/cocos/renderer/gfx-base/GFXBarrier.cpp +++ b/native/cocos/renderer/gfx-base/GFXBarrier.cpp @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #include "GFXBarrier.h" #include #include diff --git a/native/cocos/renderer/gfx-base/GFXBarrier.h b/native/cocos/renderer/gfx-base/GFXBarrier.h index e65670060e..6fc33bc1b6 100644 --- a/native/cocos/renderer/gfx-base/GFXBarrier.h +++ b/native/cocos/renderer/gfx-base/GFXBarrier.h @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #pragma once #include "GFXDef-common.h" diff --git a/native/cocos/renderer/gfx-base/GFXBuffer.cpp b/native/cocos/renderer/gfx-base/GFXBuffer.cpp index 943c41d196..cb54118d19 100644 --- a/native/cocos/renderer/gfx-base/GFXBuffer.cpp +++ b/native/cocos/renderer/gfx-base/GFXBuffer.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-base/GFXBuffer.h b/native/cocos/renderer/gfx-base/GFXBuffer.h index 7cbe204578..715b983078 100644 --- a/native/cocos/renderer/gfx-base/GFXBuffer.h +++ b/native/cocos/renderer/gfx-base/GFXBuffer.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -44,8 +43,8 @@ public: void destroy(); template - void write(const T& value, uint32_t offset) const { - write(reinterpret_cast(&value), offset, sizeof(T)); + void write(const T &value, uint32_t offset) const { + write(reinterpret_cast(&value), offset, sizeof(T)); } void write(const uint8_t *value, uint32_t offset, uint32_t size) const; @@ -73,7 +72,7 @@ protected: static uint8_t *getBufferStagingAddress(Buffer *buffer); static void flushBuffer(Buffer *buffer, const uint8_t *data); - virtual void flush(const uint8_t *data) { update(reinterpret_cast(data), _size); } + virtual void flush(const uint8_t *data) { update(reinterpret_cast(data), _size); } virtual uint8_t *getStagingAddress() const { return _data.get(); } BufferUsage _usage = BufferUsageBit::NONE; diff --git a/native/cocos/renderer/gfx-base/GFXCommandBuffer.cpp b/native/cocos/renderer/gfx-base/GFXCommandBuffer.cpp index cfd50f5cb7..e6dcd60d63 100644 --- a/native/cocos/renderer/gfx-base/GFXCommandBuffer.cpp +++ b/native/cocos/renderer/gfx-base/GFXCommandBuffer.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-base/GFXCommandBuffer.h b/native/cocos/renderer/gfx-base/GFXCommandBuffer.h index d5019ef488..5b2ef2bb5d 100644 --- a/native/cocos/renderer/gfx-base/GFXCommandBuffer.h +++ b/native/cocos/renderer/gfx-base/GFXCommandBuffer.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-base/GFXDef-common.h b/native/cocos/renderer/gfx-base/GFXDef-common.h index 3889873316..b9254f1439 100644 --- a/native/cocos/renderer/gfx-base/GFXDef-common.h +++ b/native/cocos/renderer/gfx-base/GFXDef-common.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -1118,6 +1117,7 @@ struct UniformBlock { ccstd::string name; UniformList members; uint32_t count{0}; + uint32_t flattened{0}; EXPOSE_COPY_FN(UniformBlock) }; @@ -1130,6 +1130,7 @@ struct UniformSamplerTexture { ccstd::string name; Type type{Type::UNKNOWN}; uint32_t count{0}; + uint32_t flattened{0}; EXPOSE_COPY_FN(UniformSamplerTexture) }; @@ -1141,6 +1142,7 @@ struct UniformSampler { uint32_t binding{0}; ccstd::string name; uint32_t count{0}; + uint32_t flattened{0}; EXPOSE_COPY_FN(UniformSampler) }; @@ -1153,6 +1155,7 @@ struct UniformTexture { ccstd::string name; Type type{Type::UNKNOWN}; uint32_t count{0}; + uint32_t flattened{0}; EXPOSE_COPY_FN(UniformTexture) }; @@ -1166,6 +1169,7 @@ struct UniformStorageImage { Type type{Type::UNKNOWN}; uint32_t count{0}; MemoryAccess memoryAccess{MemoryAccessBit::READ_WRITE}; + uint32_t flattened{0}; EXPOSE_COPY_FN(UniformStorageImage) }; @@ -1178,6 +1182,7 @@ struct UniformStorageBuffer { ccstd::string name; uint32_t count{0}; MemoryAccess memoryAccess{MemoryAccessBit::READ_WRITE}; + uint32_t flattened{0}; EXPOSE_COPY_FN(UniformStorageBuffer) }; @@ -1189,6 +1194,7 @@ struct UniformInputAttachment { uint32_t binding{0}; ccstd::string name; uint32_t count{0}; + uint32_t flattened{0}; EXPOSE_COPY_FN(UniformInputAttachment) }; diff --git a/native/cocos/renderer/gfx-base/GFXDef.cpp b/native/cocos/renderer/gfx-base/GFXDef.cpp index 486b11d23b..f48ec4894d 100644 --- a/native/cocos/renderer/gfx-base/GFXDef.cpp +++ b/native/cocos/renderer/gfx-base/GFXDef.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-base/GFXDef.h b/native/cocos/renderer/gfx-base/GFXDef.h index 36e1cf3564..780ac44c06 100644 --- a/native/cocos/renderer/gfx-base/GFXDef.h +++ b/native/cocos/renderer/gfx-base/GFXDef.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-base/GFXDescriptorSet.cpp b/native/cocos/renderer/gfx-base/GFXDescriptorSet.cpp index 700840593c..2c9f263081 100644 --- a/native/cocos/renderer/gfx-base/GFXDescriptorSet.cpp +++ b/native/cocos/renderer/gfx-base/GFXDescriptorSet.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -24,11 +23,11 @@ ****************************************************************************/ #include "GFXDescriptorSet.h" -#include "GFXDescriptorSetLayout.h" #include "GFXBuffer.h" +#include "GFXDescriptorSetLayout.h" +#include "GFXObject.h" #include "GFXTexture.h" #include "states/GFXSampler.h" -#include "GFXObject.h" namespace cc { namespace gfx { diff --git a/native/cocos/renderer/gfx-base/GFXDescriptorSet.h b/native/cocos/renderer/gfx-base/GFXDescriptorSet.h index fd41ef9446..90f37b4ebe 100644 --- a/native/cocos/renderer/gfx-base/GFXDescriptorSet.h +++ b/native/cocos/renderer/gfx-base/GFXDescriptorSet.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-base/GFXDescriptorSetLayout.cpp b/native/cocos/renderer/gfx-base/GFXDescriptorSetLayout.cpp index fec61bf227..47bd0b1b19 100644 --- a/native/cocos/renderer/gfx-base/GFXDescriptorSetLayout.cpp +++ b/native/cocos/renderer/gfx-base/GFXDescriptorSetLayout.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-base/GFXDescriptorSetLayout.h b/native/cocos/renderer/gfx-base/GFXDescriptorSetLayout.h index 6d0c50662a..a3e5a17889 100644 --- a/native/cocos/renderer/gfx-base/GFXDescriptorSetLayout.h +++ b/native/cocos/renderer/gfx-base/GFXDescriptorSetLayout.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-base/GFXDevice.cpp b/native/cocos/renderer/gfx-base/GFXDevice.cpp index 48ca4a5ee6..8a63f30b56 100644 --- a/native/cocos/renderer/gfx-base/GFXDevice.cpp +++ b/native/cocos/renderer/gfx-base/GFXDevice.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -131,14 +130,14 @@ DefaultResource::DefaultResource(Device *device) { ccstd::vector buffer(bufferSize, 255); const uint8_t *bufferData = buffer.data(); if (device->getCapabilities().maxTextureSize >= 2) { - _texture2D = device->createTexture({TextureType::TEX2D, TextureUsageBit::STORAGE | TextureUsageBit::SAMPLED, - Format::RGBA8, 2, 2, TextureFlagBit::NONE}); + _texture2D = device->createTexture({TextureType::TEX2D, TextureUsageBit::STORAGE | TextureUsageBit::SAMPLED, + Format::RGBA8, 2, 2, TextureFlagBit::NONE}); BufferTextureCopy region = {0, 0, 0, {0, 0, 0}, {2, 2, 1}, {0, 0, 1}}; device->copyBuffersToTexture(&bufferData, _texture2D, ®ion, 1); } if (device->getCapabilities().maxTextureSize >= 2) { _textureCube = device->createTexture({TextureType::CUBE, TextureUsageBit::STORAGE | TextureUsageBit::SAMPLED, - Format::RGBA8, 2, 2, TextureFlagBit::NONE, 6}); + Format::RGBA8, 2, 2, TextureFlagBit::NONE, 6}); BufferTextureCopy region = {0, 0, 0, {0, 0, 0}, {2, 2, 1}, {0, 0, 1}}; device->copyBuffersToTexture(&bufferData, _textureCube, ®ion, 1); region.texSubres.baseArrayLayer = 1; @@ -155,13 +154,13 @@ DefaultResource::DefaultResource(Device *device) { if (device->getCapabilities().max3DTextureSize >= 2) { _texture3D = device->createTexture({TextureType::TEX3D, TextureUsageBit::STORAGE | TextureUsageBit::SAMPLED, - Format::RGBA8, 2, 2, TextureFlagBit::NONE, 1, 1, SampleCount::ONE, 2}); + Format::RGBA8, 2, 2, TextureFlagBit::NONE, 1, 1, SampleCount::ONE, 2}); BufferTextureCopy region = {0, 0, 0, {0, 0, 0}, {2, 2, 2}, {0, 0, 1}}; device->copyBuffersToTexture(&bufferData, _texture3D, ®ion, 1); } if (device->getCapabilities().maxArrayTextureLayers >= 2) { _texture1DArray = device->createTexture({TextureType::TEX1D_ARRAY, TextureUsageBit::STORAGE | TextureUsageBit::SAMPLED, - Format::RGBA8, 1, 1, TextureFlagBit::NONE, 2}); + Format::RGBA8, 1, 1, TextureFlagBit::NONE, 2}); BufferTextureCopy region = {0, 0, 0, {0, 0, 0}, {1, 1, 1}, {0, 0, 1}}; device->copyBuffersToTexture(&bufferData, _texture1DArray, ®ion, 1); region.texSubres.baseArrayLayer = 1; @@ -169,7 +168,7 @@ DefaultResource::DefaultResource(Device *device) { } if (device->getCapabilities().maxArrayTextureLayers >= 2) { _texture2DArray = device->createTexture({TextureType::TEX2D_ARRAY, TextureUsageBit::STORAGE | TextureUsageBit::SAMPLED, - Format::RGBA8, 2, 2, TextureFlagBit::NONE, 2}); + Format::RGBA8, 2, 2, TextureFlagBit::NONE, 2}); BufferTextureCopy region = {0, 0, 0, {0, 0, 0}, {2, 2, 1}, {0, 0, 1}}; device->copyBuffersToTexture(&bufferData, _texture2DArray, ®ion, 1); region.texSubres.baseArrayLayer = 1; diff --git a/native/cocos/renderer/gfx-base/GFXDevice.h b/native/cocos/renderer/gfx-base/GFXDevice.h index 8ab53e703f..dffb018ee5 100644 --- a/native/cocos/renderer/gfx-base/GFXDevice.h +++ b/native/cocos/renderer/gfx-base/GFXDevice.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-base/GFXDeviceObject.h b/native/cocos/renderer/gfx-base/GFXDeviceObject.h index b31d6fc74c..7c487daf7e 100644 --- a/native/cocos/renderer/gfx-base/GFXDeviceObject.h +++ b/native/cocos/renderer/gfx-base/GFXDeviceObject.h @@ -1,29 +1,30 @@ /**************************************************************************** -Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. +Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated engine source code (the "Software"), a limited, -worldwide, royalty-free, non-assignable, revocable and non-exclusive license -to use Cocos Creator solely to develop games on your target platforms. You shall -not use Cocos Creator software for developing other software or tools that's -used for developing games. You are not granted to publish, distribute, -sublicense, and/or sell copies of Cocos Creator. -The software or tools in this License Agreement are licensed, not sold. -Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #pragma once -#include "base/Ptr.h" -#include "base/Macros.h" #include +#include "base/Macros.h" +#include "base/Ptr.h" namespace cc { namespace gfx { diff --git a/native/cocos/renderer/gfx-base/GFXFramebuffer.cpp b/native/cocos/renderer/gfx-base/GFXFramebuffer.cpp index dceb0476fc..1fd8b6cce1 100644 --- a/native/cocos/renderer/gfx-base/GFXFramebuffer.cpp +++ b/native/cocos/renderer/gfx-base/GFXFramebuffer.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-base/GFXFramebuffer.h b/native/cocos/renderer/gfx-base/GFXFramebuffer.h index 1c74c07005..01a8b3a925 100644 --- a/native/cocos/renderer/gfx-base/GFXFramebuffer.h +++ b/native/cocos/renderer/gfx-base/GFXFramebuffer.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-base/GFXInputAssembler.cpp b/native/cocos/renderer/gfx-base/GFXInputAssembler.cpp index 7f4dc8c976..dc6a1da58f 100644 --- a/native/cocos/renderer/gfx-base/GFXInputAssembler.cpp +++ b/native/cocos/renderer/gfx-base/GFXInputAssembler.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-base/GFXInputAssembler.h b/native/cocos/renderer/gfx-base/GFXInputAssembler.h index cd3a79c721..6d50248aa9 100644 --- a/native/cocos/renderer/gfx-base/GFXInputAssembler.h +++ b/native/cocos/renderer/gfx-base/GFXInputAssembler.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-base/GFXObject.cpp b/native/cocos/renderer/gfx-base/GFXObject.cpp index 7a75b6bdd7..bf2f1ddb24 100644 --- a/native/cocos/renderer/gfx-base/GFXObject.cpp +++ b/native/cocos/renderer/gfx-base/GFXObject.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-base/GFXObject.h b/native/cocos/renderer/gfx-base/GFXObject.h index 44b2c5641b..73e2b2e4b2 100644 --- a/native/cocos/renderer/gfx-base/GFXObject.h +++ b/native/cocos/renderer/gfx-base/GFXObject.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-base/GFXPipelineLayout.cpp b/native/cocos/renderer/gfx-base/GFXPipelineLayout.cpp index d404249636..deb79bb0de 100644 --- a/native/cocos/renderer/gfx-base/GFXPipelineLayout.cpp +++ b/native/cocos/renderer/gfx-base/GFXPipelineLayout.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-base/GFXPipelineLayout.h b/native/cocos/renderer/gfx-base/GFXPipelineLayout.h index ff7ea4ecd0..9f57c03ccb 100644 --- a/native/cocos/renderer/gfx-base/GFXPipelineLayout.h +++ b/native/cocos/renderer/gfx-base/GFXPipelineLayout.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-base/GFXPipelineState.cpp b/native/cocos/renderer/gfx-base/GFXPipelineState.cpp index 92020a8a5f..d10e1a4ea0 100644 --- a/native/cocos/renderer/gfx-base/GFXPipelineState.cpp +++ b/native/cocos/renderer/gfx-base/GFXPipelineState.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-base/GFXPipelineState.h b/native/cocos/renderer/gfx-base/GFXPipelineState.h index 92e3c5ddbe..0320da6852 100644 --- a/native/cocos/renderer/gfx-base/GFXPipelineState.h +++ b/native/cocos/renderer/gfx-base/GFXPipelineState.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-base/GFXQueryPool.cpp b/native/cocos/renderer/gfx-base/GFXQueryPool.cpp index e25b3373be..783f257f21 100644 --- a/native/cocos/renderer/gfx-base/GFXQueryPool.cpp +++ b/native/cocos/renderer/gfx-base/GFXQueryPool.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-base/GFXQueryPool.h b/native/cocos/renderer/gfx-base/GFXQueryPool.h index adbba02809..1fe36e0010 100644 --- a/native/cocos/renderer/gfx-base/GFXQueryPool.h +++ b/native/cocos/renderer/gfx-base/GFXQueryPool.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-base/GFXQueue.cpp b/native/cocos/renderer/gfx-base/GFXQueue.cpp index 666c4b34c5..b2c6e3dad1 100644 --- a/native/cocos/renderer/gfx-base/GFXQueue.cpp +++ b/native/cocos/renderer/gfx-base/GFXQueue.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-base/GFXQueue.h b/native/cocos/renderer/gfx-base/GFXQueue.h index dde0f63adb..918cb8a26c 100644 --- a/native/cocos/renderer/gfx-base/GFXQueue.h +++ b/native/cocos/renderer/gfx-base/GFXQueue.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-base/GFXRenderPass.cpp b/native/cocos/renderer/gfx-base/GFXRenderPass.cpp index e9151ae271..7dff13380d 100644 --- a/native/cocos/renderer/gfx-base/GFXRenderPass.cpp +++ b/native/cocos/renderer/gfx-base/GFXRenderPass.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-base/GFXRenderPass.h b/native/cocos/renderer/gfx-base/GFXRenderPass.h index 58428d4106..12d606ecf6 100644 --- a/native/cocos/renderer/gfx-base/GFXRenderPass.h +++ b/native/cocos/renderer/gfx-base/GFXRenderPass.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-base/GFXShader.cpp b/native/cocos/renderer/gfx-base/GFXShader.cpp index 0dfdf87392..031d8cf5de 100644 --- a/native/cocos/renderer/gfx-base/GFXShader.cpp +++ b/native/cocos/renderer/gfx-base/GFXShader.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-base/GFXShader.h b/native/cocos/renderer/gfx-base/GFXShader.h index b6c7ea68ee..af853d1c99 100644 --- a/native/cocos/renderer/gfx-base/GFXShader.h +++ b/native/cocos/renderer/gfx-base/GFXShader.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-base/GFXSwapchain.cpp b/native/cocos/renderer/gfx-base/GFXSwapchain.cpp index bed54c390e..f733a85f1f 100644 --- a/native/cocos/renderer/gfx-base/GFXSwapchain.cpp +++ b/native/cocos/renderer/gfx-base/GFXSwapchain.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-base/GFXSwapchain.h b/native/cocos/renderer/gfx-base/GFXSwapchain.h index 05e8eae5ce..34971c703f 100644 --- a/native/cocos/renderer/gfx-base/GFXSwapchain.h +++ b/native/cocos/renderer/gfx-base/GFXSwapchain.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-base/GFXTexture.cpp b/native/cocos/renderer/gfx-base/GFXTexture.cpp index 2c07333108..d8b6a7cde0 100644 --- a/native/cocos/renderer/gfx-base/GFXTexture.cpp +++ b/native/cocos/renderer/gfx-base/GFXTexture.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -121,8 +120,7 @@ void Texture::initialize(const SwapchainTextureInfo &info, Texture *out) { out->doInit(info); } -void Texture::updateTextureInfo(const SwapchainTextureInfo &info, Texture *out) -{ +void Texture::updateTextureInfo(const SwapchainTextureInfo &info, Texture *out) { out->_info.type = TextureType::TEX2D; out->_info.format = info.format; out->_info.width = info.width; diff --git a/native/cocos/renderer/gfx-base/GFXTexture.h b/native/cocos/renderer/gfx-base/GFXTexture.h index 99a748247c..b00defb4fc 100644 --- a/native/cocos/renderer/gfx-base/GFXTexture.h +++ b/native/cocos/renderer/gfx-base/GFXTexture.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-base/SPIRVUtils.cpp b/native/cocos/renderer/gfx-base/SPIRVUtils.cpp index be44febded..b47fb238d1 100644 --- a/native/cocos/renderer/gfx-base/SPIRVUtils.cpp +++ b/native/cocos/renderer/gfx-base/SPIRVUtils.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-base/SPIRVUtils.h b/native/cocos/renderer/gfx-base/SPIRVUtils.h index b4be54a5c8..4885ef0fe6 100644 --- a/native/cocos/renderer/gfx-base/SPIRVUtils.h +++ b/native/cocos/renderer/gfx-base/SPIRVUtils.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-base/states/GFXBufferBarrier.cpp b/native/cocos/renderer/gfx-base/states/GFXBufferBarrier.cpp index f23d77ff86..17f3fd5029 100644 --- a/native/cocos/renderer/gfx-base/states/GFXBufferBarrier.cpp +++ b/native/cocos/renderer/gfx-base/states/GFXBufferBarrier.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-base/states/GFXBufferBarrier.h b/native/cocos/renderer/gfx-base/states/GFXBufferBarrier.h index 531470b84a..09fbac0d70 100644 --- a/native/cocos/renderer/gfx-base/states/GFXBufferBarrier.h +++ b/native/cocos/renderer/gfx-base/states/GFXBufferBarrier.h @@ -1,18 +1,17 @@ /*********************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-base/states/GFXGeneralBarrier.cpp b/native/cocos/renderer/gfx-base/states/GFXGeneralBarrier.cpp index 86ad77d188..d158dd0f0f 100644 --- a/native/cocos/renderer/gfx-base/states/GFXGeneralBarrier.cpp +++ b/native/cocos/renderer/gfx-base/states/GFXGeneralBarrier.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-base/states/GFXGeneralBarrier.h b/native/cocos/renderer/gfx-base/states/GFXGeneralBarrier.h index 49693b5e44..b82050ecbc 100644 --- a/native/cocos/renderer/gfx-base/states/GFXGeneralBarrier.h +++ b/native/cocos/renderer/gfx-base/states/GFXGeneralBarrier.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-base/states/GFXSampler.cpp b/native/cocos/renderer/gfx-base/states/GFXSampler.cpp index 8df2866d0f..1b3d09a438 100644 --- a/native/cocos/renderer/gfx-base/states/GFXSampler.cpp +++ b/native/cocos/renderer/gfx-base/states/GFXSampler.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-base/states/GFXSampler.h b/native/cocos/renderer/gfx-base/states/GFXSampler.h index 814e5940c5..55ff623482 100644 --- a/native/cocos/renderer/gfx-base/states/GFXSampler.h +++ b/native/cocos/renderer/gfx-base/states/GFXSampler.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-base/states/GFXTextureBarrier.cpp b/native/cocos/renderer/gfx-base/states/GFXTextureBarrier.cpp index 34e89b379d..920a7a26a6 100644 --- a/native/cocos/renderer/gfx-base/states/GFXTextureBarrier.cpp +++ b/native/cocos/renderer/gfx-base/states/GFXTextureBarrier.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-base/states/GFXTextureBarrier.h b/native/cocos/renderer/gfx-base/states/GFXTextureBarrier.h index ce53b2c64e..a089ec18b9 100644 --- a/native/cocos/renderer/gfx-base/states/GFXTextureBarrier.h +++ b/native/cocos/renderer/gfx-base/states/GFXTextureBarrier.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-empty/EmptyBuffer.cpp b/native/cocos/renderer/gfx-empty/EmptyBuffer.cpp index 8522299840..5293803863 100644 --- a/native/cocos/renderer/gfx-empty/EmptyBuffer.cpp +++ b/native/cocos/renderer/gfx-empty/EmptyBuffer.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-empty/EmptyBuffer.h b/native/cocos/renderer/gfx-empty/EmptyBuffer.h index 6ec30acda0..e7164d6faf 100644 --- a/native/cocos/renderer/gfx-empty/EmptyBuffer.h +++ b/native/cocos/renderer/gfx-empty/EmptyBuffer.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-empty/EmptyCommandBuffer.cpp b/native/cocos/renderer/gfx-empty/EmptyCommandBuffer.cpp index deb4188f96..0524a3cfbe 100644 --- a/native/cocos/renderer/gfx-empty/EmptyCommandBuffer.cpp +++ b/native/cocos/renderer/gfx-empty/EmptyCommandBuffer.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-empty/EmptyCommandBuffer.h b/native/cocos/renderer/gfx-empty/EmptyCommandBuffer.h index 0e56ff384d..8b07f79dda 100644 --- a/native/cocos/renderer/gfx-empty/EmptyCommandBuffer.h +++ b/native/cocos/renderer/gfx-empty/EmptyCommandBuffer.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-empty/EmptyDescriptorSet.cpp b/native/cocos/renderer/gfx-empty/EmptyDescriptorSet.cpp index 02a564bd73..4e559f4934 100644 --- a/native/cocos/renderer/gfx-empty/EmptyDescriptorSet.cpp +++ b/native/cocos/renderer/gfx-empty/EmptyDescriptorSet.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-empty/EmptyDescriptorSet.h b/native/cocos/renderer/gfx-empty/EmptyDescriptorSet.h index 0026f5ce29..d689832e47 100644 --- a/native/cocos/renderer/gfx-empty/EmptyDescriptorSet.h +++ b/native/cocos/renderer/gfx-empty/EmptyDescriptorSet.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-empty/EmptyDescriptorSetLayout.cpp b/native/cocos/renderer/gfx-empty/EmptyDescriptorSetLayout.cpp index 98d45d5861..69634a941a 100644 --- a/native/cocos/renderer/gfx-empty/EmptyDescriptorSetLayout.cpp +++ b/native/cocos/renderer/gfx-empty/EmptyDescriptorSetLayout.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-empty/EmptyDescriptorSetLayout.h b/native/cocos/renderer/gfx-empty/EmptyDescriptorSetLayout.h index a271768fdb..3adfc34db9 100644 --- a/native/cocos/renderer/gfx-empty/EmptyDescriptorSetLayout.h +++ b/native/cocos/renderer/gfx-empty/EmptyDescriptorSetLayout.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-empty/EmptyDevice.cpp b/native/cocos/renderer/gfx-empty/EmptyDevice.cpp index ef42b3bd80..600abb4efd 100644 --- a/native/cocos/renderer/gfx-empty/EmptyDevice.cpp +++ b/native/cocos/renderer/gfx-empty/EmptyDevice.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-empty/EmptyDevice.h b/native/cocos/renderer/gfx-empty/EmptyDevice.h index ed351fe07f..0a192613b6 100644 --- a/native/cocos/renderer/gfx-empty/EmptyDevice.h +++ b/native/cocos/renderer/gfx-empty/EmptyDevice.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-empty/EmptyFramebuffer.cpp b/native/cocos/renderer/gfx-empty/EmptyFramebuffer.cpp index 8de3d2a5cb..8005332f73 100644 --- a/native/cocos/renderer/gfx-empty/EmptyFramebuffer.cpp +++ b/native/cocos/renderer/gfx-empty/EmptyFramebuffer.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-empty/EmptyFramebuffer.h b/native/cocos/renderer/gfx-empty/EmptyFramebuffer.h index 4afbe926b0..b909584ee7 100644 --- a/native/cocos/renderer/gfx-empty/EmptyFramebuffer.h +++ b/native/cocos/renderer/gfx-empty/EmptyFramebuffer.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-empty/EmptyInputAssembler.cpp b/native/cocos/renderer/gfx-empty/EmptyInputAssembler.cpp index 55a5693e33..5140303fac 100644 --- a/native/cocos/renderer/gfx-empty/EmptyInputAssembler.cpp +++ b/native/cocos/renderer/gfx-empty/EmptyInputAssembler.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-empty/EmptyInputAssembler.h b/native/cocos/renderer/gfx-empty/EmptyInputAssembler.h index 1d933ee43b..a05d602699 100644 --- a/native/cocos/renderer/gfx-empty/EmptyInputAssembler.h +++ b/native/cocos/renderer/gfx-empty/EmptyInputAssembler.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-empty/EmptyPipelineLayout.cpp b/native/cocos/renderer/gfx-empty/EmptyPipelineLayout.cpp index 6b986b22f7..2a0e77e89b 100644 --- a/native/cocos/renderer/gfx-empty/EmptyPipelineLayout.cpp +++ b/native/cocos/renderer/gfx-empty/EmptyPipelineLayout.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-empty/EmptyPipelineLayout.h b/native/cocos/renderer/gfx-empty/EmptyPipelineLayout.h index 1e001c8a6a..28ba82927b 100644 --- a/native/cocos/renderer/gfx-empty/EmptyPipelineLayout.h +++ b/native/cocos/renderer/gfx-empty/EmptyPipelineLayout.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-empty/EmptyPipelineState.cpp b/native/cocos/renderer/gfx-empty/EmptyPipelineState.cpp index 183fc0efaa..fa259868e2 100644 --- a/native/cocos/renderer/gfx-empty/EmptyPipelineState.cpp +++ b/native/cocos/renderer/gfx-empty/EmptyPipelineState.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-empty/EmptyPipelineState.h b/native/cocos/renderer/gfx-empty/EmptyPipelineState.h index 6b4c73fc90..01b3d9f5f0 100644 --- a/native/cocos/renderer/gfx-empty/EmptyPipelineState.h +++ b/native/cocos/renderer/gfx-empty/EmptyPipelineState.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-empty/EmptyQueryPool.cpp b/native/cocos/renderer/gfx-empty/EmptyQueryPool.cpp index 4c70c2348b..b8b0a21d5f 100644 --- a/native/cocos/renderer/gfx-empty/EmptyQueryPool.cpp +++ b/native/cocos/renderer/gfx-empty/EmptyQueryPool.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-empty/EmptyQueryPool.h b/native/cocos/renderer/gfx-empty/EmptyQueryPool.h index fdbad9ca77..6bc65fca04 100644 --- a/native/cocos/renderer/gfx-empty/EmptyQueryPool.h +++ b/native/cocos/renderer/gfx-empty/EmptyQueryPool.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-empty/EmptyQueue.cpp b/native/cocos/renderer/gfx-empty/EmptyQueue.cpp index aecfeac741..c12b151619 100644 --- a/native/cocos/renderer/gfx-empty/EmptyQueue.cpp +++ b/native/cocos/renderer/gfx-empty/EmptyQueue.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-empty/EmptyQueue.h b/native/cocos/renderer/gfx-empty/EmptyQueue.h index b2407a2779..9bc5d513ff 100644 --- a/native/cocos/renderer/gfx-empty/EmptyQueue.h +++ b/native/cocos/renderer/gfx-empty/EmptyQueue.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-empty/EmptyRenderPass.cpp b/native/cocos/renderer/gfx-empty/EmptyRenderPass.cpp index 0d3672554c..ba512bb33b 100644 --- a/native/cocos/renderer/gfx-empty/EmptyRenderPass.cpp +++ b/native/cocos/renderer/gfx-empty/EmptyRenderPass.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-empty/EmptyRenderPass.h b/native/cocos/renderer/gfx-empty/EmptyRenderPass.h index 7e28ab11f2..38cd8fa22e 100644 --- a/native/cocos/renderer/gfx-empty/EmptyRenderPass.h +++ b/native/cocos/renderer/gfx-empty/EmptyRenderPass.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-empty/EmptyShader.cpp b/native/cocos/renderer/gfx-empty/EmptyShader.cpp index 59afe65f1b..d555b91af5 100644 --- a/native/cocos/renderer/gfx-empty/EmptyShader.cpp +++ b/native/cocos/renderer/gfx-empty/EmptyShader.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-empty/EmptyShader.h b/native/cocos/renderer/gfx-empty/EmptyShader.h index 721081115c..1e25bb1d3a 100644 --- a/native/cocos/renderer/gfx-empty/EmptyShader.h +++ b/native/cocos/renderer/gfx-empty/EmptyShader.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-empty/EmptySwapchain.cpp b/native/cocos/renderer/gfx-empty/EmptySwapchain.cpp index 7a7b0cf50a..f3023492bd 100644 --- a/native/cocos/renderer/gfx-empty/EmptySwapchain.cpp +++ b/native/cocos/renderer/gfx-empty/EmptySwapchain.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-empty/EmptySwapchain.h b/native/cocos/renderer/gfx-empty/EmptySwapchain.h index 2b90fd7091..23c5d59b94 100644 --- a/native/cocos/renderer/gfx-empty/EmptySwapchain.h +++ b/native/cocos/renderer/gfx-empty/EmptySwapchain.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-empty/EmptyTexture.cpp b/native/cocos/renderer/gfx-empty/EmptyTexture.cpp index 2566b2c11e..dc9eca00b4 100644 --- a/native/cocos/renderer/gfx-empty/EmptyTexture.cpp +++ b/native/cocos/renderer/gfx-empty/EmptyTexture.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-empty/EmptyTexture.h b/native/cocos/renderer/gfx-empty/EmptyTexture.h index 1b71ecf3c5..c774bd9aa5 100644 --- a/native/cocos/renderer/gfx-empty/EmptyTexture.h +++ b/native/cocos/renderer/gfx-empty/EmptyTexture.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles-common/GLESCommandPool.h b/native/cocos/renderer/gfx-gles-common/GLESCommandPool.h index fc211f676c..214668355c 100644 --- a/native/cocos/renderer/gfx-gles-common/GLESCommandPool.h +++ b/native/cocos/renderer/gfx-gles-common/GLESCommandPool.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles-common/eglw.cpp b/native/cocos/renderer/gfx-gles-common/eglw.cpp index 89d6b9fc6f..3bf8f486d7 100644 --- a/native/cocos/renderer/gfx-gles-common/eglw.cpp +++ b/native/cocos/renderer/gfx-gles-common/eglw.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles-common/eglw.h b/native/cocos/renderer/gfx-gles-common/eglw.h index dabca2f918..029f0b0346 100644 --- a/native/cocos/renderer/gfx-gles-common/eglw.h +++ b/native/cocos/renderer/gfx-gles-common/eglw.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles-common/gles2w.cpp b/native/cocos/renderer/gfx-gles-common/gles2w.cpp index 5de399af9e..920b73b48e 100644 --- a/native/cocos/renderer/gfx-gles-common/gles2w.cpp +++ b/native/cocos/renderer/gfx-gles-common/gles2w.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles-common/gles2w.h b/native/cocos/renderer/gfx-gles-common/gles2w.h index ca3bf52779..b1c09222be 100644 --- a/native/cocos/renderer/gfx-gles-common/gles2w.h +++ b/native/cocos/renderer/gfx-gles-common/gles2w.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles-common/gles3w.cpp b/native/cocos/renderer/gfx-gles-common/gles3w.cpp index c6517444ff..19d56f5b05 100644 --- a/native/cocos/renderer/gfx-gles-common/gles3w.cpp +++ b/native/cocos/renderer/gfx-gles-common/gles3w.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles-common/gles3w.h b/native/cocos/renderer/gfx-gles-common/gles3w.h index e5addbb397..b3bd1dbfbf 100644 --- a/native/cocos/renderer/gfx-gles-common/gles3w.h +++ b/native/cocos/renderer/gfx-gles-common/gles3w.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles2/GLES2Buffer.cpp b/native/cocos/renderer/gfx-gles2/GLES2Buffer.cpp index 6deded086e..70e8834239 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Buffer.cpp +++ b/native/cocos/renderer/gfx-gles2/GLES2Buffer.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles2/GLES2Buffer.h b/native/cocos/renderer/gfx-gles2/GLES2Buffer.h index 2f8466a614..59c49ac5c9 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Buffer.h +++ b/native/cocos/renderer/gfx-gles2/GLES2Buffer.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles2/GLES2CommandBuffer.cpp b/native/cocos/renderer/gfx-gles2/GLES2CommandBuffer.cpp index 4bec942c6d..686b844da4 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2CommandBuffer.cpp +++ b/native/cocos/renderer/gfx-gles2/GLES2CommandBuffer.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -321,6 +320,8 @@ void GLES2CommandBuffer::blitTexture(Texture *srcTexture, Texture *dstTexture, c cmd->count = count; cmd->filter = filter; + ++_numDrawCalls; // blit is also seen as draw call in GLES2 + _curCmdPackage->blitTextureCmds.push(cmd); _curCmdPackage->cmds.push(GLESCmdType::BLIT_TEXTURE); } @@ -374,7 +375,7 @@ void GLES2CommandBuffer::execute(CommandBuffer *const *cmdBuffs, uint32_t count) // current cmd allocator strategy will not work here: (but it doesn't matter anyways) // allocators are designed to only free the cmds they allocated // but here we are essentially ��transfering' the owner ship - //cmdBuff->_cmdAllocator->clearCmds(cmdPackage); + // cmdBuff->_cmdAllocator->clearCmds(cmdPackage); } } diff --git a/native/cocos/renderer/gfx-gles2/GLES2CommandBuffer.h b/native/cocos/renderer/gfx-gles2/GLES2CommandBuffer.h index 24e3a0c66b..187cb905e6 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2CommandBuffer.h +++ b/native/cocos/renderer/gfx-gles2/GLES2CommandBuffer.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles2/GLES2Commands.cpp b/native/cocos/renderer/gfx-gles2/GLES2Commands.cpp index 512a54e8fb..5860a013d2 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Commands.cpp +++ b/native/cocos/renderer/gfx-gles2/GLES2Commands.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -662,8 +661,7 @@ void cmdFuncGLES2CreateTexture(GLES2Device *device, GLES2GPUTexture *gpuTexture) } case TextureType::TEX2D_ARRAY: { gpuTexture->glTarget = GL_TEXTURE_3D; - CC_ASSERT((std::max(std::max(gpuTexture->width, gpuTexture->height), gpuTexture->arrayLayer) <= device->getCapabilities().max3DTextureSize) - && "cmdFuncGLES2CreateTexture: texture2DArray's dimension is too large"); + CC_ASSERT((std::max(std::max(gpuTexture->width, gpuTexture->height), gpuTexture->arrayLayer) <= device->getCapabilities().max3DTextureSize) && "cmdFuncGLES2CreateTexture: texture2DArray's dimension is too large"); GL_CHECK(glGenTextures(1, &gpuTexture->glTexture)); if (gpuTexture->size > 0) { GLuint &glTexture = device->stateCache()->glTextures[device->stateCache()->texUint]; @@ -3179,6 +3177,9 @@ void GLES2GPUBlitManager::draw(GLES2GPUTexture *gpuTextureSrc, GLES2GPUTexture * GLES2Device *device = GLES2Device::getInstance(); auto &descriptor = _gpuDescriptorSet.gpuDescriptors.back(); + glViewport(0, 0, static_cast(gpuTextureDst->width), static_cast(gpuTextureDst->height)); + glScissor(0, 0, static_cast(gpuTextureDst->width), static_cast(gpuTextureDst->height)); + descriptor.gpuTexture = gpuTextureSrc; descriptor.gpuSampler = filter == Filter::POINT ? &_gpuPointSampler : &_gpuLinearSampler; for (uint32_t i = 0U; i < count; ++i) { @@ -3204,6 +3205,11 @@ void GLES2GPUBlitManager::draw(GLES2GPUTexture *gpuTextureSrc, GLES2GPUTexture * cmdFuncGLES2BindState(device, &_gpuPipelineState, &_gpuInputAssembler, &gpuDescriptorSet); cmdFuncGLES2Draw(device, _drawInfo); } + + const auto &origViewport = device->stateCache()->viewport; + const auto &origScissor = device->stateCache()->scissor; + glViewport(origViewport.left, origViewport.top, static_cast(origViewport.width), static_cast(origViewport.height)); + glScissor(origScissor.x, origScissor.y, static_cast(origScissor.width), static_cast(origScissor.height)); } void GLES2GPUFramebufferHub::update(GLES2GPUTexture *texture) { diff --git a/native/cocos/renderer/gfx-gles2/GLES2Commands.h b/native/cocos/renderer/gfx-gles2/GLES2Commands.h index 4ed72b439f..5cbba6a578 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Commands.h +++ b/native/cocos/renderer/gfx-gles2/GLES2Commands.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles2/GLES2DescriptorSet.cpp b/native/cocos/renderer/gfx-gles2/GLES2DescriptorSet.cpp index b17243f00b..a6a83dec4e 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2DescriptorSet.cpp +++ b/native/cocos/renderer/gfx-gles2/GLES2DescriptorSet.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles2/GLES2DescriptorSet.h b/native/cocos/renderer/gfx-gles2/GLES2DescriptorSet.h index 942f83f67f..8d6e81e6d8 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2DescriptorSet.h +++ b/native/cocos/renderer/gfx-gles2/GLES2DescriptorSet.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles2/GLES2DescriptorSetLayout.cpp b/native/cocos/renderer/gfx-gles2/GLES2DescriptorSetLayout.cpp index 9b05bbb121..149f7c80b1 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2DescriptorSetLayout.cpp +++ b/native/cocos/renderer/gfx-gles2/GLES2DescriptorSetLayout.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles2/GLES2DescriptorSetLayout.h b/native/cocos/renderer/gfx-gles2/GLES2DescriptorSetLayout.h index a14eacf4bd..c87e3c35f6 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2DescriptorSetLayout.h +++ b/native/cocos/renderer/gfx-gles2/GLES2DescriptorSetLayout.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles2/GLES2Device.cpp b/native/cocos/renderer/gfx-gles2/GLES2Device.cpp index d3d2701d5f..a79cea72e8 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Device.cpp +++ b/native/cocos/renderer/gfx-gles2/GLES2Device.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles2/GLES2Device.h b/native/cocos/renderer/gfx-gles2/GLES2Device.h index af51d1d7c4..b8db88b835 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Device.h +++ b/native/cocos/renderer/gfx-gles2/GLES2Device.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles2/GLES2Framebuffer.cpp b/native/cocos/renderer/gfx-gles2/GLES2Framebuffer.cpp index ae3649cc64..f4d6e97a09 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Framebuffer.cpp +++ b/native/cocos/renderer/gfx-gles2/GLES2Framebuffer.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles2/GLES2Framebuffer.h b/native/cocos/renderer/gfx-gles2/GLES2Framebuffer.h index 7d781cd05b..9977c545ec 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Framebuffer.h +++ b/native/cocos/renderer/gfx-gles2/GLES2Framebuffer.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles2/GLES2GPUContext.cpp b/native/cocos/renderer/gfx-gles2/GLES2GPUContext.cpp index 85b4475424..44b669a088 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2GPUContext.cpp +++ b/native/cocos/renderer/gfx-gles2/GLES2GPUContext.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles2/GLES2GPUObjects.h b/native/cocos/renderer/gfx-gles2/GLES2GPUObjects.h index c9f272e006..31057eec95 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2GPUObjects.h +++ b/native/cocos/renderer/gfx-gles2/GLES2GPUObjects.h @@ -1,15 +1,16 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE diff --git a/native/cocos/renderer/gfx-gles2/GLES2InputAssembler.cpp b/native/cocos/renderer/gfx-gles2/GLES2InputAssembler.cpp index e7b8f288ff..1599cf842c 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2InputAssembler.cpp +++ b/native/cocos/renderer/gfx-gles2/GLES2InputAssembler.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles2/GLES2InputAssembler.h b/native/cocos/renderer/gfx-gles2/GLES2InputAssembler.h index c4206dd92f..428644a9f0 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2InputAssembler.h +++ b/native/cocos/renderer/gfx-gles2/GLES2InputAssembler.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles2/GLES2PipelineLayout.cpp b/native/cocos/renderer/gfx-gles2/GLES2PipelineLayout.cpp index e7a48c21e2..1a63493d74 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2PipelineLayout.cpp +++ b/native/cocos/renderer/gfx-gles2/GLES2PipelineLayout.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles2/GLES2PipelineLayout.h b/native/cocos/renderer/gfx-gles2/GLES2PipelineLayout.h index aa1b63aca6..28d16a8815 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2PipelineLayout.h +++ b/native/cocos/renderer/gfx-gles2/GLES2PipelineLayout.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles2/GLES2PipelineState.cpp b/native/cocos/renderer/gfx-gles2/GLES2PipelineState.cpp index 10d4bb7549..169157dbf3 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2PipelineState.cpp +++ b/native/cocos/renderer/gfx-gles2/GLES2PipelineState.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles2/GLES2PipelineState.h b/native/cocos/renderer/gfx-gles2/GLES2PipelineState.h index 0d14dbdfdd..1c3451fdd1 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2PipelineState.h +++ b/native/cocos/renderer/gfx-gles2/GLES2PipelineState.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles2/GLES2PrimaryCommandBuffer.cpp b/native/cocos/renderer/gfx-gles2/GLES2PrimaryCommandBuffer.cpp index 401b32afff..2930fdb8d6 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2PrimaryCommandBuffer.cpp +++ b/native/cocos/renderer/gfx-gles2/GLES2PrimaryCommandBuffer.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles2/GLES2PrimaryCommandBuffer.h b/native/cocos/renderer/gfx-gles2/GLES2PrimaryCommandBuffer.h index ab532c6d73..e7248bdf9f 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2PrimaryCommandBuffer.h +++ b/native/cocos/renderer/gfx-gles2/GLES2PrimaryCommandBuffer.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles2/GLES2QueryPool.cpp b/native/cocos/renderer/gfx-gles2/GLES2QueryPool.cpp index d2f6033ace..662cedad84 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2QueryPool.cpp +++ b/native/cocos/renderer/gfx-gles2/GLES2QueryPool.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles2/GLES2QueryPool.h b/native/cocos/renderer/gfx-gles2/GLES2QueryPool.h index 79747b9572..40ef471cf1 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2QueryPool.h +++ b/native/cocos/renderer/gfx-gles2/GLES2QueryPool.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles2/GLES2Queue.cpp b/native/cocos/renderer/gfx-gles2/GLES2Queue.cpp index 14b60614a7..a7cdf2cc3f 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Queue.cpp +++ b/native/cocos/renderer/gfx-gles2/GLES2Queue.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles2/GLES2Queue.h b/native/cocos/renderer/gfx-gles2/GLES2Queue.h index a02e6f133c..dd8aea7387 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Queue.h +++ b/native/cocos/renderer/gfx-gles2/GLES2Queue.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles2/GLES2RenderPass.cpp b/native/cocos/renderer/gfx-gles2/GLES2RenderPass.cpp index e9ab718100..9c0fa7b864 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2RenderPass.cpp +++ b/native/cocos/renderer/gfx-gles2/GLES2RenderPass.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles2/GLES2RenderPass.h b/native/cocos/renderer/gfx-gles2/GLES2RenderPass.h index e6a09b346d..2035fff898 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2RenderPass.h +++ b/native/cocos/renderer/gfx-gles2/GLES2RenderPass.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles2/GLES2Shader.cpp b/native/cocos/renderer/gfx-gles2/GLES2Shader.cpp index cf0caa16c1..64bc5e434d 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Shader.cpp +++ b/native/cocos/renderer/gfx-gles2/GLES2Shader.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles2/GLES2Shader.h b/native/cocos/renderer/gfx-gles2/GLES2Shader.h index 1d778151d2..968da82b31 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Shader.h +++ b/native/cocos/renderer/gfx-gles2/GLES2Shader.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles2/GLES2Std.cpp b/native/cocos/renderer/gfx-gles2/GLES2Std.cpp index 9ff19756a0..5275354ceb 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Std.cpp +++ b/native/cocos/renderer/gfx-gles2/GLES2Std.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles2/GLES2Std.h b/native/cocos/renderer/gfx-gles2/GLES2Std.h index 68a6996299..f8efadba91 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Std.h +++ b/native/cocos/renderer/gfx-gles2/GLES2Std.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -48,7 +47,7 @@ GLenum err = glGetError(); \ if (err != GL_NO_ERROR) { \ CC_LOG_ERROR("%s returned GL error: 0x%x", #x, err); \ - CC_ABORT(); \ + CC_ABORT(); \ } \ } while (0) #define EGL_CHECK(x) \ @@ -57,7 +56,7 @@ EGLint err = eglGetError(); \ if (err != EGL_SUCCESS) { \ CC_LOG_ERROR("%s returned EGL error: 0x%x", #x, err); \ - CC_ABORT(); \ + CC_ABORT(); \ } \ } while (0) #else diff --git a/native/cocos/renderer/gfx-gles2/GLES2Swapchain.cpp b/native/cocos/renderer/gfx-gles2/GLES2Swapchain.cpp index 987ad6b5bf..c812c00f09 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Swapchain.cpp +++ b/native/cocos/renderer/gfx-gles2/GLES2Swapchain.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles2/GLES2Swapchain.h b/native/cocos/renderer/gfx-gles2/GLES2Swapchain.h index 4adc06e7de..1a1b8587e4 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Swapchain.h +++ b/native/cocos/renderer/gfx-gles2/GLES2Swapchain.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles2/GLES2Texture.cpp b/native/cocos/renderer/gfx-gles2/GLES2Texture.cpp index 295b4c5153..ad127f1557 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Texture.cpp +++ b/native/cocos/renderer/gfx-gles2/GLES2Texture.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles2/GLES2Texture.h b/native/cocos/renderer/gfx-gles2/GLES2Texture.h index 77b50ce2e4..545f2083bb 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Texture.h +++ b/native/cocos/renderer/gfx-gles2/GLES2Texture.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles2/GLES2Wrangler.cpp b/native/cocos/renderer/gfx-gles2/GLES2Wrangler.cpp index 5994119902..a7e38da41a 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Wrangler.cpp +++ b/native/cocos/renderer/gfx-gles2/GLES2Wrangler.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles2/GLES2Wrangler.h b/native/cocos/renderer/gfx-gles2/GLES2Wrangler.h index d46bc2301b..239848bbc1 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Wrangler.h +++ b/native/cocos/renderer/gfx-gles2/GLES2Wrangler.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles2/states/GLES2Sampler.cpp b/native/cocos/renderer/gfx-gles2/states/GLES2Sampler.cpp index ef246f10e5..500645c882 100644 --- a/native/cocos/renderer/gfx-gles2/states/GLES2Sampler.cpp +++ b/native/cocos/renderer/gfx-gles2/states/GLES2Sampler.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles2/states/GLES2Sampler.h b/native/cocos/renderer/gfx-gles2/states/GLES2Sampler.h index 30774af7b9..088fe24fa6 100644 --- a/native/cocos/renderer/gfx-gles2/states/GLES2Sampler.h +++ b/native/cocos/renderer/gfx-gles2/states/GLES2Sampler.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles3/GLES3Buffer.cpp b/native/cocos/renderer/gfx-gles3/GLES3Buffer.cpp index 195193d129..dfaa7b8f49 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Buffer.cpp +++ b/native/cocos/renderer/gfx-gles3/GLES3Buffer.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles3/GLES3Buffer.h b/native/cocos/renderer/gfx-gles3/GLES3Buffer.h index ad8b010f1b..0539141962 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Buffer.h +++ b/native/cocos/renderer/gfx-gles3/GLES3Buffer.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles3/GLES3CommandBuffer.cpp b/native/cocos/renderer/gfx-gles3/GLES3CommandBuffer.cpp index 7a39e78d65..ad230a430d 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3CommandBuffer.cpp +++ b/native/cocos/renderer/gfx-gles3/GLES3CommandBuffer.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles3/GLES3CommandBuffer.h b/native/cocos/renderer/gfx-gles3/GLES3CommandBuffer.h index 0af579c343..0153f6b14d 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3CommandBuffer.h +++ b/native/cocos/renderer/gfx-gles3/GLES3CommandBuffer.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles3/GLES3Commands.cpp b/native/cocos/renderer/gfx-gles3/GLES3Commands.cpp index 52eae9c44f..1424ad1507 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Commands.cpp +++ b/native/cocos/renderer/gfx-gles3/GLES3Commands.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles3/GLES3Commands.h b/native/cocos/renderer/gfx-gles3/GLES3Commands.h index 65814f63e2..9546b77047 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Commands.h +++ b/native/cocos/renderer/gfx-gles3/GLES3Commands.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles3/GLES3DescriptorSet.cpp b/native/cocos/renderer/gfx-gles3/GLES3DescriptorSet.cpp index 91b3d13ad1..ed76b77062 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3DescriptorSet.cpp +++ b/native/cocos/renderer/gfx-gles3/GLES3DescriptorSet.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles3/GLES3DescriptorSet.h b/native/cocos/renderer/gfx-gles3/GLES3DescriptorSet.h index 2794522547..5e525f4127 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3DescriptorSet.h +++ b/native/cocos/renderer/gfx-gles3/GLES3DescriptorSet.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles3/GLES3DescriptorSetLayout.cpp b/native/cocos/renderer/gfx-gles3/GLES3DescriptorSetLayout.cpp index 3e166617fb..494fdd44f2 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3DescriptorSetLayout.cpp +++ b/native/cocos/renderer/gfx-gles3/GLES3DescriptorSetLayout.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles3/GLES3DescriptorSetLayout.h b/native/cocos/renderer/gfx-gles3/GLES3DescriptorSetLayout.h index 80dd14e161..f5cf5f8475 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3DescriptorSetLayout.h +++ b/native/cocos/renderer/gfx-gles3/GLES3DescriptorSetLayout.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles3/GLES3Device.cpp b/native/cocos/renderer/gfx-gles3/GLES3Device.cpp index 87a11495b8..4874be7bd1 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Device.cpp +++ b/native/cocos/renderer/gfx-gles3/GLES3Device.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles3/GLES3Device.h b/native/cocos/renderer/gfx-gles3/GLES3Device.h index 287e0abb9d..af75d67fd9 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Device.h +++ b/native/cocos/renderer/gfx-gles3/GLES3Device.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles3/GLES3Framebuffer.cpp b/native/cocos/renderer/gfx-gles3/GLES3Framebuffer.cpp index a229c61f99..0eb96c3b3c 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Framebuffer.cpp +++ b/native/cocos/renderer/gfx-gles3/GLES3Framebuffer.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles3/GLES3Framebuffer.h b/native/cocos/renderer/gfx-gles3/GLES3Framebuffer.h index 9a7bbe0472..50abda51bc 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Framebuffer.h +++ b/native/cocos/renderer/gfx-gles3/GLES3Framebuffer.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles3/GLES3GPUContext.cpp b/native/cocos/renderer/gfx-gles3/GLES3GPUContext.cpp index 8d712bc9d5..5b1090ce4d 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3GPUContext.cpp +++ b/native/cocos/renderer/gfx-gles3/GLES3GPUContext.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles3/GLES3GPUObjects.h b/native/cocos/renderer/gfx-gles3/GLES3GPUObjects.h index 6c71954fa3..d5bf276fdd 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3GPUObjects.h +++ b/native/cocos/renderer/gfx-gles3/GLES3GPUObjects.h @@ -1,15 +1,16 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE diff --git a/native/cocos/renderer/gfx-gles3/GLES3InputAssembler.cpp b/native/cocos/renderer/gfx-gles3/GLES3InputAssembler.cpp index 912ebb76a4..c988df0202 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3InputAssembler.cpp +++ b/native/cocos/renderer/gfx-gles3/GLES3InputAssembler.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles3/GLES3InputAssembler.h b/native/cocos/renderer/gfx-gles3/GLES3InputAssembler.h index 2a59277d8a..14c51e93d5 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3InputAssembler.h +++ b/native/cocos/renderer/gfx-gles3/GLES3InputAssembler.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles3/GLES3PipelineLayout.cpp b/native/cocos/renderer/gfx-gles3/GLES3PipelineLayout.cpp index 6044225fc2..9387f08257 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3PipelineLayout.cpp +++ b/native/cocos/renderer/gfx-gles3/GLES3PipelineLayout.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles3/GLES3PipelineLayout.h b/native/cocos/renderer/gfx-gles3/GLES3PipelineLayout.h index 9cad62a264..a393d0e840 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3PipelineLayout.h +++ b/native/cocos/renderer/gfx-gles3/GLES3PipelineLayout.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles3/GLES3PipelineState.cpp b/native/cocos/renderer/gfx-gles3/GLES3PipelineState.cpp index f55c9208ee..636d9b6e13 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3PipelineState.cpp +++ b/native/cocos/renderer/gfx-gles3/GLES3PipelineState.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles3/GLES3PipelineState.h b/native/cocos/renderer/gfx-gles3/GLES3PipelineState.h index 0033e546f7..78e2867c16 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3PipelineState.h +++ b/native/cocos/renderer/gfx-gles3/GLES3PipelineState.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles3/GLES3PrimaryCommandBuffer.cpp b/native/cocos/renderer/gfx-gles3/GLES3PrimaryCommandBuffer.cpp index 0cf1369ec9..90bd448774 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3PrimaryCommandBuffer.cpp +++ b/native/cocos/renderer/gfx-gles3/GLES3PrimaryCommandBuffer.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles3/GLES3PrimaryCommandBuffer.h b/native/cocos/renderer/gfx-gles3/GLES3PrimaryCommandBuffer.h index 55371e5aad..69312a1ef7 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3PrimaryCommandBuffer.h +++ b/native/cocos/renderer/gfx-gles3/GLES3PrimaryCommandBuffer.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles3/GLES3QueryPool.cpp b/native/cocos/renderer/gfx-gles3/GLES3QueryPool.cpp index c393bee321..72732d014c 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3QueryPool.cpp +++ b/native/cocos/renderer/gfx-gles3/GLES3QueryPool.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles3/GLES3QueryPool.h b/native/cocos/renderer/gfx-gles3/GLES3QueryPool.h index 700b29172d..4fe474b7e7 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3QueryPool.h +++ b/native/cocos/renderer/gfx-gles3/GLES3QueryPool.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles3/GLES3Queue.cpp b/native/cocos/renderer/gfx-gles3/GLES3Queue.cpp index 8f17077428..11c6c0312a 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Queue.cpp +++ b/native/cocos/renderer/gfx-gles3/GLES3Queue.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles3/GLES3Queue.h b/native/cocos/renderer/gfx-gles3/GLES3Queue.h index 3c1cfb40a8..562e9d97ee 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Queue.h +++ b/native/cocos/renderer/gfx-gles3/GLES3Queue.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles3/GLES3RenderPass.cpp b/native/cocos/renderer/gfx-gles3/GLES3RenderPass.cpp index d2663ac1f2..2029f901eb 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3RenderPass.cpp +++ b/native/cocos/renderer/gfx-gles3/GLES3RenderPass.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles3/GLES3RenderPass.h b/native/cocos/renderer/gfx-gles3/GLES3RenderPass.h index b098f4757c..aae937ba62 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3RenderPass.h +++ b/native/cocos/renderer/gfx-gles3/GLES3RenderPass.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles3/GLES3Shader.cpp b/native/cocos/renderer/gfx-gles3/GLES3Shader.cpp index 70f02efeb4..fcb48b7c51 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Shader.cpp +++ b/native/cocos/renderer/gfx-gles3/GLES3Shader.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles3/GLES3Shader.h b/native/cocos/renderer/gfx-gles3/GLES3Shader.h index 2c5265299c..e730df599a 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Shader.h +++ b/native/cocos/renderer/gfx-gles3/GLES3Shader.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles3/GLES3Std.cpp b/native/cocos/renderer/gfx-gles3/GLES3Std.cpp index 7349af5692..8a3eddcea6 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Std.cpp +++ b/native/cocos/renderer/gfx-gles3/GLES3Std.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles3/GLES3Std.h b/native/cocos/renderer/gfx-gles3/GLES3Std.h index 85fc514f4f..36d05df39a 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Std.h +++ b/native/cocos/renderer/gfx-gles3/GLES3Std.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -48,7 +47,7 @@ GLenum err = glGetError(); \ if (err != GL_NO_ERROR) { \ CC_LOG_ERROR("%s returned GL error: 0x%x", #x, err); \ - CC_ABORT(); \ + CC_ABORT(); \ } \ } while (0) #define EGL_CHECK(x) \ @@ -57,7 +56,7 @@ EGLint err = eglGetError(); \ if (err != EGL_SUCCESS) { \ CC_LOG_ERROR("%s returned EGL error: 0x%x", #x, err); \ - CC_ABORT(); \ + CC_ABORT(); \ } \ } while (0) #else diff --git a/native/cocos/renderer/gfx-gles3/GLES3Swapchain.cpp b/native/cocos/renderer/gfx-gles3/GLES3Swapchain.cpp index a741787b34..a2e679c2d5 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Swapchain.cpp +++ b/native/cocos/renderer/gfx-gles3/GLES3Swapchain.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -26,9 +25,9 @@ #include "application/ApplicationManager.h" #include "platform/interfaces/modules/IXRInterface.h" -#include "GLES3Swapchain.h" #include "GLES3Device.h" #include "GLES3GPUObjects.h" +#include "GLES3Swapchain.h" #include "GLES3Texture.h" #if CC_SWAPPY_ENABLED diff --git a/native/cocos/renderer/gfx-gles3/GLES3Swapchain.h b/native/cocos/renderer/gfx-gles3/GLES3Swapchain.h index 0e7c9a4a00..99de0150c2 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Swapchain.h +++ b/native/cocos/renderer/gfx-gles3/GLES3Swapchain.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles3/GLES3Texture.cpp b/native/cocos/renderer/gfx-gles3/GLES3Texture.cpp index 9983e39bfb..bc681b0a36 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Texture.cpp +++ b/native/cocos/renderer/gfx-gles3/GLES3Texture.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles3/GLES3Texture.h b/native/cocos/renderer/gfx-gles3/GLES3Texture.h index 68899b0590..00c6a64995 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Texture.h +++ b/native/cocos/renderer/gfx-gles3/GLES3Texture.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles3/GLES3Wrangler.cpp b/native/cocos/renderer/gfx-gles3/GLES3Wrangler.cpp index 10acafff8b..04c298444f 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Wrangler.cpp +++ b/native/cocos/renderer/gfx-gles3/GLES3Wrangler.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -50,14 +49,14 @@ bool gles3wOpen() { int times = 1; do { auto size = MAX_PATH * times++; - char *path = static_cast(CC_MALLOC(size)); + char *path = static_cast(CC_MALLOC(size)); if (path) { GetModuleFileNameA(engine, path, size); dir = path; } CC_FREE(path); } while (GetLastError() == ERROR_INSUFFICIENT_BUFFER); - + dir = dir.substr(0, dir.rfind("\\") + 1); eglPath = dir + eglPath; glesPath = dir + glesPath; diff --git a/native/cocos/renderer/gfx-gles3/GLES3Wrangler.h b/native/cocos/renderer/gfx-gles3/GLES3Wrangler.h index 03a7e722f7..7aad485223 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Wrangler.h +++ b/native/cocos/renderer/gfx-gles3/GLES3Wrangler.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles3/states/GLES3GeneralBarrier.cpp b/native/cocos/renderer/gfx-gles3/states/GLES3GeneralBarrier.cpp index a112233cbe..4704aea3d6 100644 --- a/native/cocos/renderer/gfx-gles3/states/GLES3GeneralBarrier.cpp +++ b/native/cocos/renderer/gfx-gles3/states/GLES3GeneralBarrier.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles3/states/GLES3GeneralBarrier.h b/native/cocos/renderer/gfx-gles3/states/GLES3GeneralBarrier.h index 37065bbe69..6b5185ccbf 100644 --- a/native/cocos/renderer/gfx-gles3/states/GLES3GeneralBarrier.h +++ b/native/cocos/renderer/gfx-gles3/states/GLES3GeneralBarrier.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles3/states/GLES3Sampler.cpp b/native/cocos/renderer/gfx-gles3/states/GLES3Sampler.cpp index e777b372cc..07c74e29bf 100644 --- a/native/cocos/renderer/gfx-gles3/states/GLES3Sampler.cpp +++ b/native/cocos/renderer/gfx-gles3/states/GLES3Sampler.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-gles3/states/GLES3Sampler.h b/native/cocos/renderer/gfx-gles3/states/GLES3Sampler.h index 05e571fb76..5958a0ef5e 100644 --- a/native/cocos/renderer/gfx-gles3/states/GLES3Sampler.h +++ b/native/cocos/renderer/gfx-gles3/states/GLES3Sampler.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-metal/MTLBuffer.h b/native/cocos/renderer/gfx-metal/MTLBuffer.h index b1f0a645c7..0223c939a4 100644 --- a/native/cocos/renderer/gfx-metal/MTLBuffer.h +++ b/native/cocos/renderer/gfx-metal/MTLBuffer.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-metal/MTLCommandBuffer.h b/native/cocos/renderer/gfx-metal/MTLCommandBuffer.h index 193bbd664d..dee19b279d 100644 --- a/native/cocos/renderer/gfx-metal/MTLCommandBuffer.h +++ b/native/cocos/renderer/gfx-metal/MTLCommandBuffer.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-metal/MTLCommandBuffer.mm b/native/cocos/renderer/gfx-metal/MTLCommandBuffer.mm index 9af87bdeda..fb62d60c48 100644 --- a/native/cocos/renderer/gfx-metal/MTLCommandBuffer.mm +++ b/native/cocos/renderer/gfx-metal/MTLCommandBuffer.mm @@ -551,6 +551,11 @@ void CCMTLCommandBuffer::nextSubpass() { } void CCMTLCommandBuffer::draw(const DrawInfo &info) { + if(!_gpuCommandBufferObj->pipelineState || + !_gpuCommandBufferObj->pipelineState->getGPUPipelineState() || + !_gpuCommandBufferObj->pipelineState->getGPUPipelineState()->mtlRenderPipelineState) { + return; + } CC_PROFILE(CCMTLCommandBufferDraw); if (_firstDirtyDescriptorSet < _GPUDescriptorSets.size()) { bindDescriptorSets(); diff --git a/native/cocos/renderer/gfx-metal/MTLCommandEncoder.h b/native/cocos/renderer/gfx-metal/MTLCommandEncoder.h index 114221c7ce..1f67522db9 100644 --- a/native/cocos/renderer/gfx-metal/MTLCommandEncoder.h +++ b/native/cocos/renderer/gfx-metal/MTLCommandEncoder.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-metal/MTLComputeCommandEncoder.h b/native/cocos/renderer/gfx-metal/MTLComputeCommandEncoder.h index f0fca976e7..eeea0c08dd 100644 --- a/native/cocos/renderer/gfx-metal/MTLComputeCommandEncoder.h +++ b/native/cocos/renderer/gfx-metal/MTLComputeCommandEncoder.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-metal/MTLConfig.h b/native/cocos/renderer/gfx-metal/MTLConfig.h index 37bde3eb12..0e8b70dda7 100644 --- a/native/cocos/renderer/gfx-metal/MTLConfig.h +++ b/native/cocos/renderer/gfx-metal/MTLConfig.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-metal/MTLDescriptorSet.h b/native/cocos/renderer/gfx-metal/MTLDescriptorSet.h index 64d90138fc..7ab4cf097b 100644 --- a/native/cocos/renderer/gfx-metal/MTLDescriptorSet.h +++ b/native/cocos/renderer/gfx-metal/MTLDescriptorSet.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-metal/MTLDescriptorSetLayout.h b/native/cocos/renderer/gfx-metal/MTLDescriptorSetLayout.h index 83ab7af5d7..7367eec636 100644 --- a/native/cocos/renderer/gfx-metal/MTLDescriptorSetLayout.h +++ b/native/cocos/renderer/gfx-metal/MTLDescriptorSetLayout.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-metal/MTLDevice.h b/native/cocos/renderer/gfx-metal/MTLDevice.h index cd1e82d15f..9aa87cabf9 100644 --- a/native/cocos/renderer/gfx-metal/MTLDevice.h +++ b/native/cocos/renderer/gfx-metal/MTLDevice.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-metal/MTLFramebuffer.h b/native/cocos/renderer/gfx-metal/MTLFramebuffer.h index 54857b7e3e..113e08fb97 100644 --- a/native/cocos/renderer/gfx-metal/MTLFramebuffer.h +++ b/native/cocos/renderer/gfx-metal/MTLFramebuffer.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-metal/MTLGPUObjects.h b/native/cocos/renderer/gfx-metal/MTLGPUObjects.h index d5361fcd5b..2ff17986a0 100644 --- a/native/cocos/renderer/gfx-metal/MTLGPUObjects.h +++ b/native/cocos/renderer/gfx-metal/MTLGPUObjects.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-metal/MTLInputAssembler.h b/native/cocos/renderer/gfx-metal/MTLInputAssembler.h index 72c1308b55..d55799645b 100644 --- a/native/cocos/renderer/gfx-metal/MTLInputAssembler.h +++ b/native/cocos/renderer/gfx-metal/MTLInputAssembler.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-metal/MTLPipelineLayout.h b/native/cocos/renderer/gfx-metal/MTLPipelineLayout.h index 6e4d2e31eb..4f640b0a6d 100644 --- a/native/cocos/renderer/gfx-metal/MTLPipelineLayout.h +++ b/native/cocos/renderer/gfx-metal/MTLPipelineLayout.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-metal/MTLPipelineState.h b/native/cocos/renderer/gfx-metal/MTLPipelineState.h index 6011f1cf89..a951bbad4e 100644 --- a/native/cocos/renderer/gfx-metal/MTLPipelineState.h +++ b/native/cocos/renderer/gfx-metal/MTLPipelineState.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -59,9 +58,9 @@ protected: bool createGPUPipelineState(); bool createMTLComputePipelineState(); bool createMTLRenderPipelineState(); - void setVertexDescriptor(MTLRenderPipelineDescriptor *); - void setMTLFunctionsAndFormats(MTLRenderPipelineDescriptor *); - void setBlendStates(MTLRenderPipelineDescriptor *); + bool setVertexDescriptor(MTLRenderPipelineDescriptor *); + bool setMTLFunctionsAndFormats(MTLRenderPipelineDescriptor *); + bool setBlendStates(MTLRenderPipelineDescriptor *); bool createMTLRenderPipeline(MTLRenderPipelineDescriptor *); bool _renderPipelineReady = false; diff --git a/native/cocos/renderer/gfx-metal/MTLPipelineState.mm b/native/cocos/renderer/gfx-metal/MTLPipelineState.mm index 2c8878ccaa..81af7360df 100644 --- a/native/cocos/renderer/gfx-metal/MTLPipelineState.mm +++ b/native/cocos/renderer/gfx-metal/MTLPipelineState.mm @@ -196,19 +196,24 @@ bool CCMTLPipelineState::createMTLRenderPipelineState() { MTLRenderPipelineDescriptor *descriptor = [[MTLRenderPipelineDescriptor alloc] init]; if (descriptor == nil) { CC_LOG_ERROR("CCMTLPipelineState: MTLRenderPipelineDescriptor could not be allocated."); - return false; + ret = false; } - setMTLFunctionsAndFormats(descriptor); - setVertexDescriptor(descriptor); - setBlendStates(descriptor); - ret = createMTLRenderPipeline(descriptor); + if(ret) ret = setMTLFunctionsAndFormats(descriptor); + if(ret) ret = setVertexDescriptor(descriptor); + if(ret) ret = setBlendStates(descriptor); + if(ret) ret = createMTLRenderPipeline(descriptor); [descriptor release]; + if(!ret) { + CC_LOG_ERROR("Failed to create pipeline state, please check if shader/pileinelayout match with each other!"); + } + return ret; } //TODO: reconstruction -void CCMTLPipelineState::setVertexDescriptor(MTLRenderPipelineDescriptor *descriptor) { +bool CCMTLPipelineState::setVertexDescriptor(MTLRenderPipelineDescriptor *descriptor) { + bool res = true; auto activeAttributes = static_cast(_shader)->getAttributes(); ccstd::vector> layouts; ccstd::unordered_map> map; @@ -250,6 +255,10 @@ void CCMTLPipelineState::setVertexDescriptor(MTLRenderPipelineDescriptor *descri descriptor.vertexDescriptor.attributes[dummy.location].bufferIndex = static_cast(_shader)->getAvailableBufferBindingIndex(ShaderStageFlagBit::VERTEX, dummy.stream); CC_LOG_WARNING("Attribute %s is missing, add a dummy data for it.", dummy.name.c_str()); } + + if(layouts.empty()) { + res = false; + } // layouts for (const auto &layout : layouts) { @@ -264,9 +273,10 @@ void CCMTLPipelineState::setVertexDescriptor(MTLRenderPipelineDescriptor *descri } _GPUPipelineState->vertexBufferBindingInfo = std::move(layouts); + return res; } -void CCMTLPipelineState::setMTLFunctionsAndFormats(MTLRenderPipelineDescriptor *descriptor) { +bool CCMTLPipelineState::setMTLFunctionsAndFormats(MTLRenderPipelineDescriptor *descriptor) { const SubpassInfoList &subpasses = _renderPass->getSubpasses(); const ColorAttachmentList &colorAttachments = _renderPass->getColorAttachments(); const auto &ccShader = static_cast(_shader); @@ -346,9 +356,10 @@ void CCMTLPipelineState::setMTLFunctionsAndFormats(MTLRenderPipelineDescriptor * if (depthStencilFormat == Format::DEPTH_STENCIL) descriptor.stencilAttachmentPixelFormat = mtlPixelFormat; } + return true; } -void CCMTLPipelineState::setBlendStates(MTLRenderPipelineDescriptor *descriptor) { +bool CCMTLPipelineState::setBlendStates(MTLRenderPipelineDescriptor *descriptor) { //FIXME: how to handle these two attributes? // BlendState::isIndepend // BlendState::blendColor; @@ -372,6 +383,7 @@ void CCMTLPipelineState::setBlendStates(MTLRenderPipelineDescriptor *descriptor) ++i; } + return true; } bool CCMTLPipelineState::createMTLRenderPipeline(MTLRenderPipelineDescriptor *descriptor) { diff --git a/native/cocos/renderer/gfx-metal/MTLQueryPool.h b/native/cocos/renderer/gfx-metal/MTLQueryPool.h index c4db7a5399..9f8dd7bc20 100644 --- a/native/cocos/renderer/gfx-metal/MTLQueryPool.h +++ b/native/cocos/renderer/gfx-metal/MTLQueryPool.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-metal/MTLQueue.h b/native/cocos/renderer/gfx-metal/MTLQueue.h index eb2c5d3ed4..2ec3ea2c2b 100644 --- a/native/cocos/renderer/gfx-metal/MTLQueue.h +++ b/native/cocos/renderer/gfx-metal/MTLQueue.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-metal/MTLRenderCommandEncoder.h b/native/cocos/renderer/gfx-metal/MTLRenderCommandEncoder.h index 3126252fad..00fffae99f 100644 --- a/native/cocos/renderer/gfx-metal/MTLRenderCommandEncoder.h +++ b/native/cocos/renderer/gfx-metal/MTLRenderCommandEncoder.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-metal/MTLRenderPass.h b/native/cocos/renderer/gfx-metal/MTLRenderPass.h index f36d2eb364..cf9432bd32 100644 --- a/native/cocos/renderer/gfx-metal/MTLRenderPass.h +++ b/native/cocos/renderer/gfx-metal/MTLRenderPass.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-metal/MTLSampler.h b/native/cocos/renderer/gfx-metal/MTLSampler.h index aa5e6a1048..6bae074079 100644 --- a/native/cocos/renderer/gfx-metal/MTLSampler.h +++ b/native/cocos/renderer/gfx-metal/MTLSampler.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-metal/MTLSemaphore.h b/native/cocos/renderer/gfx-metal/MTLSemaphore.h index ab25a06071..54416b396b 100644 --- a/native/cocos/renderer/gfx-metal/MTLSemaphore.h +++ b/native/cocos/renderer/gfx-metal/MTLSemaphore.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-metal/MTLShader.h b/native/cocos/renderer/gfx-metal/MTLShader.h index a89e6216d5..2b1de6edc8 100644 --- a/native/cocos/renderer/gfx-metal/MTLShader.h +++ b/native/cocos/renderer/gfx-metal/MTLShader.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-metal/MTLSwapchain.h b/native/cocos/renderer/gfx-metal/MTLSwapchain.h index dc2980a2a2..855c072da2 100644 --- a/native/cocos/renderer/gfx-metal/MTLSwapchain.h +++ b/native/cocos/renderer/gfx-metal/MTLSwapchain.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-metal/MTLTexture.h b/native/cocos/renderer/gfx-metal/MTLTexture.h index 78083ae95d..65eaf60e10 100644 --- a/native/cocos/renderer/gfx-metal/MTLTexture.h +++ b/native/cocos/renderer/gfx-metal/MTLTexture.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-metal/MTLUtils.h b/native/cocos/renderer/gfx-metal/MTLUtils.h index 49086ea2d4..79fe042b3a 100644 --- a/native/cocos/renderer/gfx-metal/MTLUtils.h +++ b/native/cocos/renderer/gfx-metal/MTLUtils.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-validator/BufferValidator.cpp b/native/cocos/renderer/gfx-validator/BufferValidator.cpp index 1130593114..a6e5f691b0 100644 --- a/native/cocos/renderer/gfx-validator/BufferValidator.cpp +++ b/native/cocos/renderer/gfx-validator/BufferValidator.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -205,6 +204,5 @@ uint8_t *BufferValidator::getStagingAddress() const { return Buffer::getBufferStagingAddress(_actor); } - } // namespace gfx } // namespace cc diff --git a/native/cocos/renderer/gfx-validator/BufferValidator.h b/native/cocos/renderer/gfx-validator/BufferValidator.h index 79de15b5ce..30acaba220 100644 --- a/native/cocos/renderer/gfx-validator/BufferValidator.h +++ b/native/cocos/renderer/gfx-validator/BufferValidator.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-validator/CommandBufferValidator.cpp b/native/cocos/renderer/gfx-validator/CommandBufferValidator.cpp index 15a08f71d2..54ce001655 100644 --- a/native/cocos/renderer/gfx-validator/CommandBufferValidator.cpp +++ b/native/cocos/renderer/gfx-validator/CommandBufferValidator.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-validator/CommandBufferValidator.h b/native/cocos/renderer/gfx-validator/CommandBufferValidator.h index 8c600e3dc2..bba2baaeb5 100644 --- a/native/cocos/renderer/gfx-validator/CommandBufferValidator.h +++ b/native/cocos/renderer/gfx-validator/CommandBufferValidator.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-validator/DescriptorSetLayoutValidator.cpp b/native/cocos/renderer/gfx-validator/DescriptorSetLayoutValidator.cpp index 9a0a6b4f8c..2f94b7e4bd 100644 --- a/native/cocos/renderer/gfx-validator/DescriptorSetLayoutValidator.cpp +++ b/native/cocos/renderer/gfx-validator/DescriptorSetLayoutValidator.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-validator/DescriptorSetLayoutValidator.h b/native/cocos/renderer/gfx-validator/DescriptorSetLayoutValidator.h index 3507cfea11..9fcdc1ba04 100644 --- a/native/cocos/renderer/gfx-validator/DescriptorSetLayoutValidator.h +++ b/native/cocos/renderer/gfx-validator/DescriptorSetLayoutValidator.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-validator/DescriptorSetValidator.cpp b/native/cocos/renderer/gfx-validator/DescriptorSetValidator.cpp index f0da92cfda..01196dffbd 100644 --- a/native/cocos/renderer/gfx-validator/DescriptorSetValidator.cpp +++ b/native/cocos/renderer/gfx-validator/DescriptorSetValidator.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-validator/DescriptorSetValidator.h b/native/cocos/renderer/gfx-validator/DescriptorSetValidator.h index 6ec83a8ddd..e948bdb1e6 100644 --- a/native/cocos/renderer/gfx-validator/DescriptorSetValidator.h +++ b/native/cocos/renderer/gfx-validator/DescriptorSetValidator.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-validator/DeviceValidator.cpp b/native/cocos/renderer/gfx-validator/DeviceValidator.cpp index aaa98de0a4..ca6ba46709 100644 --- a/native/cocos/renderer/gfx-validator/DeviceValidator.cpp +++ b/native/cocos/renderer/gfx-validator/DeviceValidator.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-validator/DeviceValidator.h b/native/cocos/renderer/gfx-validator/DeviceValidator.h index d8b3fdcffe..ebe84a9b11 100644 --- a/native/cocos/renderer/gfx-validator/DeviceValidator.h +++ b/native/cocos/renderer/gfx-validator/DeviceValidator.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-validator/FramebufferValidator.cpp b/native/cocos/renderer/gfx-validator/FramebufferValidator.cpp index 9ca0815658..f7344e1b72 100644 --- a/native/cocos/renderer/gfx-validator/FramebufferValidator.cpp +++ b/native/cocos/renderer/gfx-validator/FramebufferValidator.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-validator/FramebufferValidator.h b/native/cocos/renderer/gfx-validator/FramebufferValidator.h index 2611d67bc1..38c29040f5 100644 --- a/native/cocos/renderer/gfx-validator/FramebufferValidator.h +++ b/native/cocos/renderer/gfx-validator/FramebufferValidator.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-validator/InputAssemblerValidator.cpp b/native/cocos/renderer/gfx-validator/InputAssemblerValidator.cpp index 7b9cbdbc5d..8b76576de3 100644 --- a/native/cocos/renderer/gfx-validator/InputAssemblerValidator.cpp +++ b/native/cocos/renderer/gfx-validator/InputAssemblerValidator.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-validator/InputAssemblerValidator.h b/native/cocos/renderer/gfx-validator/InputAssemblerValidator.h index 5dbf967a41..30c5233014 100644 --- a/native/cocos/renderer/gfx-validator/InputAssemblerValidator.h +++ b/native/cocos/renderer/gfx-validator/InputAssemblerValidator.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-validator/PipelineLayoutValidator.cpp b/native/cocos/renderer/gfx-validator/PipelineLayoutValidator.cpp index 2273fbd48d..6d3e036810 100644 --- a/native/cocos/renderer/gfx-validator/PipelineLayoutValidator.cpp +++ b/native/cocos/renderer/gfx-validator/PipelineLayoutValidator.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-validator/PipelineLayoutValidator.h b/native/cocos/renderer/gfx-validator/PipelineLayoutValidator.h index fc76ea2250..b639a81069 100644 --- a/native/cocos/renderer/gfx-validator/PipelineLayoutValidator.h +++ b/native/cocos/renderer/gfx-validator/PipelineLayoutValidator.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-validator/PipelineStateValidator.cpp b/native/cocos/renderer/gfx-validator/PipelineStateValidator.cpp index 46c01aedcd..31f1781f0f 100644 --- a/native/cocos/renderer/gfx-validator/PipelineStateValidator.cpp +++ b/native/cocos/renderer/gfx-validator/PipelineStateValidator.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-validator/PipelineStateValidator.h b/native/cocos/renderer/gfx-validator/PipelineStateValidator.h index 309152a16e..75b63c4199 100644 --- a/native/cocos/renderer/gfx-validator/PipelineStateValidator.h +++ b/native/cocos/renderer/gfx-validator/PipelineStateValidator.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-validator/QueryPoolValidator.cpp b/native/cocos/renderer/gfx-validator/QueryPoolValidator.cpp index 3e49eb2f87..62eec736b4 100644 --- a/native/cocos/renderer/gfx-validator/QueryPoolValidator.cpp +++ b/native/cocos/renderer/gfx-validator/QueryPoolValidator.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-validator/QueryPoolValidator.h b/native/cocos/renderer/gfx-validator/QueryPoolValidator.h index 853648c62b..a05e9fe8ac 100644 --- a/native/cocos/renderer/gfx-validator/QueryPoolValidator.h +++ b/native/cocos/renderer/gfx-validator/QueryPoolValidator.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-validator/QueueValidator.cpp b/native/cocos/renderer/gfx-validator/QueueValidator.cpp index f01089ea4c..e4455cc7cf 100644 --- a/native/cocos/renderer/gfx-validator/QueueValidator.cpp +++ b/native/cocos/renderer/gfx-validator/QueueValidator.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-validator/QueueValidator.h b/native/cocos/renderer/gfx-validator/QueueValidator.h index 3acef2a602..7465296714 100644 --- a/native/cocos/renderer/gfx-validator/QueueValidator.h +++ b/native/cocos/renderer/gfx-validator/QueueValidator.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-validator/RenderPassValidator.cpp b/native/cocos/renderer/gfx-validator/RenderPassValidator.cpp index f8b9f85624..439e518c96 100644 --- a/native/cocos/renderer/gfx-validator/RenderPassValidator.cpp +++ b/native/cocos/renderer/gfx-validator/RenderPassValidator.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-validator/RenderPassValidator.h b/native/cocos/renderer/gfx-validator/RenderPassValidator.h index 5f3082918d..069a2a4bde 100644 --- a/native/cocos/renderer/gfx-validator/RenderPassValidator.h +++ b/native/cocos/renderer/gfx-validator/RenderPassValidator.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-validator/ShaderValidator.cpp b/native/cocos/renderer/gfx-validator/ShaderValidator.cpp index f7c0db8d4e..dccae9abcd 100644 --- a/native/cocos/renderer/gfx-validator/ShaderValidator.cpp +++ b/native/cocos/renderer/gfx-validator/ShaderValidator.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-validator/ShaderValidator.h b/native/cocos/renderer/gfx-validator/ShaderValidator.h index b9af0fde57..e93d2db2a4 100644 --- a/native/cocos/renderer/gfx-validator/ShaderValidator.h +++ b/native/cocos/renderer/gfx-validator/ShaderValidator.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-validator/SwapchainValidator.cpp b/native/cocos/renderer/gfx-validator/SwapchainValidator.cpp index a0e3524d3b..049ab5de4c 100644 --- a/native/cocos/renderer/gfx-validator/SwapchainValidator.cpp +++ b/native/cocos/renderer/gfx-validator/SwapchainValidator.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-validator/SwapchainValidator.h b/native/cocos/renderer/gfx-validator/SwapchainValidator.h index 2d487be758..12f6992f9e 100644 --- a/native/cocos/renderer/gfx-validator/SwapchainValidator.h +++ b/native/cocos/renderer/gfx-validator/SwapchainValidator.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-validator/TextureValidator.cpp b/native/cocos/renderer/gfx-validator/TextureValidator.cpp index 0383d07dc0..c0bc45a239 100644 --- a/native/cocos/renderer/gfx-validator/TextureValidator.cpp +++ b/native/cocos/renderer/gfx-validator/TextureValidator.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -75,15 +74,13 @@ void TextureValidator::doInit(const TextureInfo &info) { break; } case TextureType::TEX1D_ARRAY: { - if (std::min(info.width, info.height) > 1 || std::max(info.width, info.height) > DeviceValidator::getInstance()->getCapabilities().maxTextureSize - || info.layerCount > DeviceValidator::getInstance()->getCapabilities().maxArrayTextureLayers) { + if (std::min(info.width, info.height) > 1 || std::max(info.width, info.height) > DeviceValidator::getInstance()->getCapabilities().maxTextureSize || info.layerCount > DeviceValidator::getInstance()->getCapabilities().maxArrayTextureLayers) { CC_ABORT(); } break; } case TextureType::TEX2D_ARRAY: { - if (std::max(info.width, info.height) > DeviceValidator::getInstance()->getCapabilities().maxTextureSize - || info.layerCount > DeviceValidator::getInstance()->getCapabilities().maxArrayTextureLayers) { + if (std::max(info.width, info.height) > DeviceValidator::getInstance()->getCapabilities().maxTextureSize || info.layerCount > DeviceValidator::getInstance()->getCapabilities().maxArrayTextureLayers) { CC_ABORT(); } break; diff --git a/native/cocos/renderer/gfx-validator/TextureValidator.h b/native/cocos/renderer/gfx-validator/TextureValidator.h index f992f72df2..a785e1ae48 100644 --- a/native/cocos/renderer/gfx-validator/TextureValidator.h +++ b/native/cocos/renderer/gfx-validator/TextureValidator.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-validator/ValidationUtils.cpp b/native/cocos/renderer/gfx-validator/ValidationUtils.cpp index 5bd98e1040..0c22be8b49 100644 --- a/native/cocos/renderer/gfx-validator/ValidationUtils.cpp +++ b/native/cocos/renderer/gfx-validator/ValidationUtils.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-validator/ValidationUtils.h b/native/cocos/renderer/gfx-validator/ValidationUtils.h index 1fed010b32..5e7e5deb9a 100644 --- a/native/cocos/renderer/gfx-validator/ValidationUtils.h +++ b/native/cocos/renderer/gfx-validator/ValidationUtils.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-vulkan/VKBuffer.cpp b/native/cocos/renderer/gfx-vulkan/VKBuffer.cpp index a4cf66e367..63f4e1e114 100644 --- a/native/cocos/renderer/gfx-vulkan/VKBuffer.cpp +++ b/native/cocos/renderer/gfx-vulkan/VKBuffer.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-vulkan/VKBuffer.h b/native/cocos/renderer/gfx-vulkan/VKBuffer.h index ef8e02a9f1..61705b9a17 100644 --- a/native/cocos/renderer/gfx-vulkan/VKBuffer.h +++ b/native/cocos/renderer/gfx-vulkan/VKBuffer.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-vulkan/VKCommandBuffer.cpp b/native/cocos/renderer/gfx-vulkan/VKCommandBuffer.cpp index 28f8d0e4fb..b943ba8ed3 100644 --- a/native/cocos/renderer/gfx-vulkan/VKCommandBuffer.cpp +++ b/native/cocos/renderer/gfx-vulkan/VKCommandBuffer.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-vulkan/VKCommandBuffer.h b/native/cocos/renderer/gfx-vulkan/VKCommandBuffer.h index a6affd10aa..d020660040 100644 --- a/native/cocos/renderer/gfx-vulkan/VKCommandBuffer.h +++ b/native/cocos/renderer/gfx-vulkan/VKCommandBuffer.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-vulkan/VKCommands.cpp b/native/cocos/renderer/gfx-vulkan/VKCommands.cpp index ab2179e964..47476711d2 100644 --- a/native/cocos/renderer/gfx-vulkan/VKCommands.cpp +++ b/native/cocos/renderer/gfx-vulkan/VKCommands.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-vulkan/VKCommands.h b/native/cocos/renderer/gfx-vulkan/VKCommands.h index a9681641e6..06b6cfe881 100644 --- a/native/cocos/renderer/gfx-vulkan/VKCommands.h +++ b/native/cocos/renderer/gfx-vulkan/VKCommands.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-vulkan/VKDescriptorSet.cpp b/native/cocos/renderer/gfx-vulkan/VKDescriptorSet.cpp index d7e6ea57cc..1821cfa9ab 100644 --- a/native/cocos/renderer/gfx-vulkan/VKDescriptorSet.cpp +++ b/native/cocos/renderer/gfx-vulkan/VKDescriptorSet.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-vulkan/VKDescriptorSet.h b/native/cocos/renderer/gfx-vulkan/VKDescriptorSet.h index a707b87267..b2fa1b3ac3 100644 --- a/native/cocos/renderer/gfx-vulkan/VKDescriptorSet.h +++ b/native/cocos/renderer/gfx-vulkan/VKDescriptorSet.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-vulkan/VKDescriptorSetLayout.cpp b/native/cocos/renderer/gfx-vulkan/VKDescriptorSetLayout.cpp index 3241b2ce6a..1bc750b1d0 100644 --- a/native/cocos/renderer/gfx-vulkan/VKDescriptorSetLayout.cpp +++ b/native/cocos/renderer/gfx-vulkan/VKDescriptorSetLayout.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-vulkan/VKDescriptorSetLayout.h b/native/cocos/renderer/gfx-vulkan/VKDescriptorSetLayout.h index 6355a261c4..5deccd3373 100644 --- a/native/cocos/renderer/gfx-vulkan/VKDescriptorSetLayout.h +++ b/native/cocos/renderer/gfx-vulkan/VKDescriptorSetLayout.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -32,7 +31,6 @@ namespace cc { namespace gfx { - class CC_VULKAN_API CCVKDescriptorSetLayout final : public DescriptorSetLayout { public: CCVKDescriptorSetLayout(); diff --git a/native/cocos/renderer/gfx-vulkan/VKDevice.cpp b/native/cocos/renderer/gfx-vulkan/VKDevice.cpp index 3bcfc2aa84..bef0a58551 100644 --- a/native/cocos/renderer/gfx-vulkan/VKDevice.cpp +++ b/native/cocos/renderer/gfx-vulkan/VKDevice.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-vulkan/VKDevice.h b/native/cocos/renderer/gfx-vulkan/VKDevice.h index 33a51a1d0e..e29a183c98 100644 --- a/native/cocos/renderer/gfx-vulkan/VKDevice.h +++ b/native/cocos/renderer/gfx-vulkan/VKDevice.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-vulkan/VKFramebuffer.cpp b/native/cocos/renderer/gfx-vulkan/VKFramebuffer.cpp index 44471b7b95..efb463ba46 100644 --- a/native/cocos/renderer/gfx-vulkan/VKFramebuffer.cpp +++ b/native/cocos/renderer/gfx-vulkan/VKFramebuffer.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-vulkan/VKFramebuffer.h b/native/cocos/renderer/gfx-vulkan/VKFramebuffer.h index 3d95734cbf..b402513ba6 100644 --- a/native/cocos/renderer/gfx-vulkan/VKFramebuffer.h +++ b/native/cocos/renderer/gfx-vulkan/VKFramebuffer.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-vulkan/VKGPUContext.cpp b/native/cocos/renderer/gfx-vulkan/VKGPUContext.cpp index a18a844182..ecdb9bc85c 100644 --- a/native/cocos/renderer/gfx-vulkan/VKGPUContext.cpp +++ b/native/cocos/renderer/gfx-vulkan/VKGPUContext.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-vulkan/VKGPUObjects.h b/native/cocos/renderer/gfx-vulkan/VKGPUObjects.h index e9eddf086a..13f604c367 100644 --- a/native/cocos/renderer/gfx-vulkan/VKGPUObjects.h +++ b/native/cocos/renderer/gfx-vulkan/VKGPUObjects.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -239,7 +238,7 @@ struct CCVKGPUBufferView : public CCVKGPUDeviceObject { uint32_t offset = 0U; uint32_t range = 0U; - uint8_t* mappedData() const { + uint8_t *mappedData() const { return gpuBuffer->mappedData + offset; } @@ -1070,11 +1069,11 @@ public: void collect(uint32_t layoutId, VkDescriptorSet set); void collect(const CCVKGPUBuffer *buffer); -#define DEFINE_RECYCLE_BIN_COLLECT_FN(_type, typeValue, expr) \ +#define DEFINE_RECYCLE_BIN_COLLECT_FN(_type, typeValue, expr) \ void collect(const _type *gpuRes) { /* NOLINT(bugprone-macro-parentheses) N/A */ \ - Resource &res = emplaceBack(); \ - res.type = typeValue; \ - expr; \ + Resource &res = emplaceBack(); \ + res.type = typeValue; \ + expr; \ } DEFINE_RECYCLE_BIN_COLLECT_FN(CCVKGPURenderPass, RecycledType::RENDER_PASS, res.vkRenderPass = gpuRes->vkRenderPass) @@ -1154,7 +1153,7 @@ public: _ias[buffer].insert(ia); } - void update(CCVKGPUBufferView* oldBuffer, CCVKGPUBufferView* newBuffer) { + void update(CCVKGPUBufferView *oldBuffer, CCVKGPUBufferView *newBuffer) { auto iter = _ias.find(oldBuffer); if (iter != _ias.end()) { for (const auto &ia : iter->second) { diff --git a/native/cocos/renderer/gfx-vulkan/VKGPURecycleBin.cpp b/native/cocos/renderer/gfx-vulkan/VKGPURecycleBin.cpp index 2593f5c2d6..c542bada85 100644 --- a/native/cocos/renderer/gfx-vulkan/VKGPURecycleBin.cpp +++ b/native/cocos/renderer/gfx-vulkan/VKGPURecycleBin.cpp @@ -1,31 +1,31 @@ /**************************************************************************** -Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. +Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated engine source code (the "Software"), a limited, -worldwide, royalty-free, non-assignable, revocable and non-exclusive license -to use Cocos Creator solely to develop games on your target platforms. You shall -not use Cocos Creator software for developing other software or tools that's -used for developing games. You are not granted to publish, distribute, -sublicense, and/or sell copies of Cocos Creator. -The software or tools in this License Agreement are licensed, not sold. -Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ -#include "VKGPUObjects.h" #include "VKDevice.h" +#include "VKGPUObjects.h" namespace cc { namespace gfx { void CCVKGPURecycleBin::collect(const cc::gfx::CCVKGPUTexture *texture) { - auto collectHandleFn = [this](VkImage image, VmaAllocation allocation) { Resource &res = emplaceBack(); res.type = RecycledType::TEXTURE; @@ -48,7 +48,7 @@ void CCVKGPURecycleBin::collect(const cc::gfx::CCVKGPUTextureView *textureView) res.vkImageView = view; }; collectHandleFn(textureView->vkImageView); - for (const auto& swapChainView : textureView->swapchainVkImageViews) { + for (const auto &swapChainView : textureView->swapchainVkImageViews) { collectHandleFn(swapChainView); } } @@ -60,13 +60,13 @@ void CCVKGPURecycleBin::collect(const CCVKGPUFramebuffer *frameBuffer) { res.vkFramebuffer = fbo; }; collectHandleFn(frameBuffer->vkFramebuffer); - for (const auto& fbo : frameBuffer->vkFrameBuffers) { + for (const auto &fbo : frameBuffer->vkFrameBuffers) { collectHandleFn(fbo); } } void CCVKGPURecycleBin::collect(const CCVKGPUDescriptorSet *set) { - for (const auto& instance : set->instances) { + for (const auto &instance : set->instances) { collect(set->layoutID, instance.vkDescriptorSet); } } diff --git a/native/cocos/renderer/gfx-vulkan/VKInputAssembler.cpp b/native/cocos/renderer/gfx-vulkan/VKInputAssembler.cpp index 962feea73a..f7dae717a6 100644 --- a/native/cocos/renderer/gfx-vulkan/VKInputAssembler.cpp +++ b/native/cocos/renderer/gfx-vulkan/VKInputAssembler.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -79,7 +78,7 @@ void CCVKInputAssembler::doDestroy() { void CCVKGPUInputAssembler::shutdown() { auto *hub = CCVKDevice::getInstance()->gpuIAHub(); - for (auto& vb : gpuVertexBuffers) { + for (auto &vb : gpuVertexBuffers) { hub->disengage(this, vb); } if (gpuIndexBuffer) { diff --git a/native/cocos/renderer/gfx-vulkan/VKInputAssembler.h b/native/cocos/renderer/gfx-vulkan/VKInputAssembler.h index 06a9d6c0f3..b24550d438 100644 --- a/native/cocos/renderer/gfx-vulkan/VKInputAssembler.h +++ b/native/cocos/renderer/gfx-vulkan/VKInputAssembler.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-vulkan/VKPipelineLayout.cpp b/native/cocos/renderer/gfx-vulkan/VKPipelineLayout.cpp index 5b9e9370ee..bf9e7863f2 100644 --- a/native/cocos/renderer/gfx-vulkan/VKPipelineLayout.cpp +++ b/native/cocos/renderer/gfx-vulkan/VKPipelineLayout.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-vulkan/VKPipelineLayout.h b/native/cocos/renderer/gfx-vulkan/VKPipelineLayout.h index 15f87e8592..ef7bce9f7f 100644 --- a/native/cocos/renderer/gfx-vulkan/VKPipelineLayout.h +++ b/native/cocos/renderer/gfx-vulkan/VKPipelineLayout.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-vulkan/VKPipelineState.cpp b/native/cocos/renderer/gfx-vulkan/VKPipelineState.cpp index 5160643957..b8880e7e8b 100644 --- a/native/cocos/renderer/gfx-vulkan/VKPipelineState.cpp +++ b/native/cocos/renderer/gfx-vulkan/VKPipelineState.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-vulkan/VKPipelineState.h b/native/cocos/renderer/gfx-vulkan/VKPipelineState.h index a7dbbaec02..54c6d8075c 100644 --- a/native/cocos/renderer/gfx-vulkan/VKPipelineState.h +++ b/native/cocos/renderer/gfx-vulkan/VKPipelineState.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-vulkan/VKQueryPool.cpp b/native/cocos/renderer/gfx-vulkan/VKQueryPool.cpp index 69dbc16601..266e8eb205 100644 --- a/native/cocos/renderer/gfx-vulkan/VKQueryPool.cpp +++ b/native/cocos/renderer/gfx-vulkan/VKQueryPool.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-vulkan/VKQueryPool.h b/native/cocos/renderer/gfx-vulkan/VKQueryPool.h index a3c3d6d6d5..1333e4f8e7 100644 --- a/native/cocos/renderer/gfx-vulkan/VKQueryPool.h +++ b/native/cocos/renderer/gfx-vulkan/VKQueryPool.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-vulkan/VKQueue.cpp b/native/cocos/renderer/gfx-vulkan/VKQueue.cpp index c844717600..b7f9ecf175 100644 --- a/native/cocos/renderer/gfx-vulkan/VKQueue.cpp +++ b/native/cocos/renderer/gfx-vulkan/VKQueue.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-vulkan/VKQueue.h b/native/cocos/renderer/gfx-vulkan/VKQueue.h index 365f973061..c44a91a1aa 100644 --- a/native/cocos/renderer/gfx-vulkan/VKQueue.h +++ b/native/cocos/renderer/gfx-vulkan/VKQueue.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-vulkan/VKRenderPass.cpp b/native/cocos/renderer/gfx-vulkan/VKRenderPass.cpp index cd9128cf5f..8597bf22a8 100644 --- a/native/cocos/renderer/gfx-vulkan/VKRenderPass.cpp +++ b/native/cocos/renderer/gfx-vulkan/VKRenderPass.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-vulkan/VKRenderPass.h b/native/cocos/renderer/gfx-vulkan/VKRenderPass.h index abbe5ef297..09d181ab5f 100644 --- a/native/cocos/renderer/gfx-vulkan/VKRenderPass.h +++ b/native/cocos/renderer/gfx-vulkan/VKRenderPass.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-vulkan/VKShader.cpp b/native/cocos/renderer/gfx-vulkan/VKShader.cpp index 5dea151908..9e23a2a185 100644 --- a/native/cocos/renderer/gfx-vulkan/VKShader.cpp +++ b/native/cocos/renderer/gfx-vulkan/VKShader.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -77,7 +76,7 @@ void CCVKShader::doInit(const ShaderInfo & /*info*/) { } void CCVKShader::doDestroy() { - _gpuShader = nullptr; + _gpuShader = nullptr; } void CCVKGPUShader::shutdown() { diff --git a/native/cocos/renderer/gfx-vulkan/VKShader.h b/native/cocos/renderer/gfx-vulkan/VKShader.h index 688407007a..0bb7d2dde8 100644 --- a/native/cocos/renderer/gfx-vulkan/VKShader.h +++ b/native/cocos/renderer/gfx-vulkan/VKShader.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-vulkan/VKStd.cpp b/native/cocos/renderer/gfx-vulkan/VKStd.cpp index 09dda236ba..f8ded8785f 100644 --- a/native/cocos/renderer/gfx-vulkan/VKStd.cpp +++ b/native/cocos/renderer/gfx-vulkan/VKStd.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-vulkan/VKStd.h b/native/cocos/renderer/gfx-vulkan/VKStd.h index 906a3a9d18..6384018e00 100644 --- a/native/cocos/renderer/gfx-vulkan/VKStd.h +++ b/native/cocos/renderer/gfx-vulkan/VKStd.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -47,7 +46,7 @@ VkResult err = x; \ if (err) { \ CC_LOG_ERROR("%s returned Vulkan error: %d", #x, err); \ - CC_ABORT(); \ + CC_ABORT(); \ } \ } while (0) diff --git a/native/cocos/renderer/gfx-vulkan/VKSwapchain.cpp b/native/cocos/renderer/gfx-vulkan/VKSwapchain.cpp index 62d929cf2e..cc45361003 100644 --- a/native/cocos/renderer/gfx-vulkan/VKSwapchain.cpp +++ b/native/cocos/renderer/gfx-vulkan/VKSwapchain.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-vulkan/VKSwapchain.h b/native/cocos/renderer/gfx-vulkan/VKSwapchain.h index 38f77c89ee..d72ddf4970 100644 --- a/native/cocos/renderer/gfx-vulkan/VKSwapchain.h +++ b/native/cocos/renderer/gfx-vulkan/VKSwapchain.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-vulkan/VKTexture.cpp b/native/cocos/renderer/gfx-vulkan/VKTexture.cpp index 95f34527d9..f3768a74ce 100644 --- a/native/cocos/renderer/gfx-vulkan/VKTexture.cpp +++ b/native/cocos/renderer/gfx-vulkan/VKTexture.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-vulkan/VKTexture.h b/native/cocos/renderer/gfx-vulkan/VKTexture.h index 4aca1003d9..c25625f233 100644 --- a/native/cocos/renderer/gfx-vulkan/VKTexture.h +++ b/native/cocos/renderer/gfx-vulkan/VKTexture.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-vulkan/VKUtils.cpp b/native/cocos/renderer/gfx-vulkan/VKUtils.cpp index e3a0f9b078..d010370a86 100644 --- a/native/cocos/renderer/gfx-vulkan/VKUtils.cpp +++ b/native/cocos/renderer/gfx-vulkan/VKUtils.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-vulkan/VKUtils.h b/native/cocos/renderer/gfx-vulkan/VKUtils.h index 4fba30dca9..a0dd3ec5cd 100644 --- a/native/cocos/renderer/gfx-vulkan/VKUtils.h +++ b/native/cocos/renderer/gfx-vulkan/VKUtils.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-vulkan/states/VKBufferBarrier.cpp b/native/cocos/renderer/gfx-vulkan/states/VKBufferBarrier.cpp index 0592696101..3fb5638316 100644 --- a/native/cocos/renderer/gfx-vulkan/states/VKBufferBarrier.cpp +++ b/native/cocos/renderer/gfx-vulkan/states/VKBufferBarrier.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com - Permission is h>ereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-vulkan/states/VKBufferBarrier.h b/native/cocos/renderer/gfx-vulkan/states/VKBufferBarrier.h index 485b4d8b9d..2609844bab 100644 --- a/native/cocos/renderer/gfx-vulkan/states/VKBufferBarrier.h +++ b/native/cocos/renderer/gfx-vulkan/states/VKBufferBarrier.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-vulkan/states/VKGeneralBarrier.cpp b/native/cocos/renderer/gfx-vulkan/states/VKGeneralBarrier.cpp index 530b6dbd6e..1e98d494f6 100644 --- a/native/cocos/renderer/gfx-vulkan/states/VKGeneralBarrier.cpp +++ b/native/cocos/renderer/gfx-vulkan/states/VKGeneralBarrier.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-vulkan/states/VKGeneralBarrier.h b/native/cocos/renderer/gfx-vulkan/states/VKGeneralBarrier.h index 5c4ee9acb0..7b9d196a5f 100644 --- a/native/cocos/renderer/gfx-vulkan/states/VKGeneralBarrier.h +++ b/native/cocos/renderer/gfx-vulkan/states/VKGeneralBarrier.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-vulkan/states/VKSampler.cpp b/native/cocos/renderer/gfx-vulkan/states/VKSampler.cpp index d3a3979fce..686348f581 100644 --- a/native/cocos/renderer/gfx-vulkan/states/VKSampler.cpp +++ b/native/cocos/renderer/gfx-vulkan/states/VKSampler.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-vulkan/states/VKSampler.h b/native/cocos/renderer/gfx-vulkan/states/VKSampler.h index 33f8f287ff..a03c82db9a 100644 --- a/native/cocos/renderer/gfx-vulkan/states/VKSampler.h +++ b/native/cocos/renderer/gfx-vulkan/states/VKSampler.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-vulkan/states/VKTextureBarrier.cpp b/native/cocos/renderer/gfx-vulkan/states/VKTextureBarrier.cpp index 9a1c2d7e40..9af81baddf 100644 --- a/native/cocos/renderer/gfx-vulkan/states/VKTextureBarrier.cpp +++ b/native/cocos/renderer/gfx-vulkan/states/VKTextureBarrier.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-vulkan/states/VKTextureBarrier.h b/native/cocos/renderer/gfx-vulkan/states/VKTextureBarrier.h index 69f3e64805..52b72b38e5 100644 --- a/native/cocos/renderer/gfx-vulkan/states/VKTextureBarrier.h +++ b/native/cocos/renderer/gfx-vulkan/states/VKTextureBarrier.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-wgpu/WGPUBuffer.cpp b/native/cocos/renderer/gfx-wgpu/WGPUBuffer.cpp index a65e3945d2..84f335b34d 100644 --- a/native/cocos/renderer/gfx-wgpu/WGPUBuffer.cpp +++ b/native/cocos/renderer/gfx-wgpu/WGPUBuffer.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-wgpu/WGPUBuffer.h b/native/cocos/renderer/gfx-wgpu/WGPUBuffer.h index 4cca467c19..2147cf7de4 100644 --- a/native/cocos/renderer/gfx-wgpu/WGPUBuffer.h +++ b/native/cocos/renderer/gfx-wgpu/WGPUBuffer.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-wgpu/WGPUCommandBuffer.cpp b/native/cocos/renderer/gfx-wgpu/WGPUCommandBuffer.cpp index c469d6bda4..d5591fb82c 100644 --- a/native/cocos/renderer/gfx-wgpu/WGPUCommandBuffer.cpp +++ b/native/cocos/renderer/gfx-wgpu/WGPUCommandBuffer.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-wgpu/WGPUCommandBuffer.h b/native/cocos/renderer/gfx-wgpu/WGPUCommandBuffer.h index d6f3c2ea3d..e621bbcc34 100644 --- a/native/cocos/renderer/gfx-wgpu/WGPUCommandBuffer.h +++ b/native/cocos/renderer/gfx-wgpu/WGPUCommandBuffer.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-wgpu/WGPUDef.h b/native/cocos/renderer/gfx-wgpu/WGPUDef.h index a04a735396..59bf5654fa 100644 --- a/native/cocos/renderer/gfx-wgpu/WGPUDef.h +++ b/native/cocos/renderer/gfx-wgpu/WGPUDef.h @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #pragma once #include #include diff --git a/native/cocos/renderer/gfx-wgpu/WGPUDescriptorSet.cpp b/native/cocos/renderer/gfx-wgpu/WGPUDescriptorSet.cpp index 7e351790d5..ced80b7915 100644 --- a/native/cocos/renderer/gfx-wgpu/WGPUDescriptorSet.cpp +++ b/native/cocos/renderer/gfx-wgpu/WGPUDescriptorSet.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-wgpu/WGPUDescriptorSet.h b/native/cocos/renderer/gfx-wgpu/WGPUDescriptorSet.h index 259bf4010b..9c370f61ac 100644 --- a/native/cocos/renderer/gfx-wgpu/WGPUDescriptorSet.h +++ b/native/cocos/renderer/gfx-wgpu/WGPUDescriptorSet.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-wgpu/WGPUDescriptorSetLayout.cpp b/native/cocos/renderer/gfx-wgpu/WGPUDescriptorSetLayout.cpp index e055cfad39..b9f2c8b070 100644 --- a/native/cocos/renderer/gfx-wgpu/WGPUDescriptorSetLayout.cpp +++ b/native/cocos/renderer/gfx-wgpu/WGPUDescriptorSetLayout.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-wgpu/WGPUDescriptorSetLayout.h b/native/cocos/renderer/gfx-wgpu/WGPUDescriptorSetLayout.h index 713944e2b4..00db97bacb 100644 --- a/native/cocos/renderer/gfx-wgpu/WGPUDescriptorSetLayout.h +++ b/native/cocos/renderer/gfx-wgpu/WGPUDescriptorSetLayout.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-wgpu/WGPUDevice.cpp b/native/cocos/renderer/gfx-wgpu/WGPUDevice.cpp index 98fce73bd5..0735a14e7d 100644 --- a/native/cocos/renderer/gfx-wgpu/WGPUDevice.cpp +++ b/native/cocos/renderer/gfx-wgpu/WGPUDevice.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-wgpu/WGPUDevice.h b/native/cocos/renderer/gfx-wgpu/WGPUDevice.h index b9dc6bba7c..ad99398ae6 100644 --- a/native/cocos/renderer/gfx-wgpu/WGPUDevice.h +++ b/native/cocos/renderer/gfx-wgpu/WGPUDevice.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-wgpu/WGPUEMSImpl.cpp b/native/cocos/renderer/gfx-wgpu/WGPUEMSImpl.cpp index b589fd90a9..03aa932ed7 100644 --- a/native/cocos/renderer/gfx-wgpu/WGPUEMSImpl.cpp +++ b/native/cocos/renderer/gfx-wgpu/WGPUEMSImpl.cpp @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #pragma once #include #include diff --git a/native/cocos/renderer/gfx-wgpu/WGPUExports.h b/native/cocos/renderer/gfx-wgpu/WGPUExports.h index 41f0fd51b0..f5d0a6e002 100644 --- a/native/cocos/renderer/gfx-wgpu/WGPUExports.h +++ b/native/cocos/renderer/gfx-wgpu/WGPUExports.h @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #pragma once #include "WGPUBuffer.h" #include "WGPUCommandBuffer.h" diff --git a/native/cocos/renderer/gfx-wgpu/WGPUFrameBuffer.cpp b/native/cocos/renderer/gfx-wgpu/WGPUFrameBuffer.cpp index 965386bfd8..148f436947 100644 --- a/native/cocos/renderer/gfx-wgpu/WGPUFrameBuffer.cpp +++ b/native/cocos/renderer/gfx-wgpu/WGPUFrameBuffer.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-wgpu/WGPUFrameBuffer.h b/native/cocos/renderer/gfx-wgpu/WGPUFrameBuffer.h index d0fcc4b039..883b31277e 100644 --- a/native/cocos/renderer/gfx-wgpu/WGPUFrameBuffer.h +++ b/native/cocos/renderer/gfx-wgpu/WGPUFrameBuffer.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-wgpu/WGPUInputAssembler.cpp b/native/cocos/renderer/gfx-wgpu/WGPUInputAssembler.cpp index 01771be27d..e79f0c81af 100644 --- a/native/cocos/renderer/gfx-wgpu/WGPUInputAssembler.cpp +++ b/native/cocos/renderer/gfx-wgpu/WGPUInputAssembler.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-wgpu/WGPUInputAssembler.h b/native/cocos/renderer/gfx-wgpu/WGPUInputAssembler.h index bc4094a677..aec0e4b7fc 100644 --- a/native/cocos/renderer/gfx-wgpu/WGPUInputAssembler.h +++ b/native/cocos/renderer/gfx-wgpu/WGPUInputAssembler.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-wgpu/WGPUObject.h b/native/cocos/renderer/gfx-wgpu/WGPUObject.h index 9e62b8bb45..819c339084 100644 --- a/native/cocos/renderer/gfx-wgpu/WGPUObject.h +++ b/native/cocos/renderer/gfx-wgpu/WGPUObject.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-wgpu/WGPUPipelineLayout.cpp b/native/cocos/renderer/gfx-wgpu/WGPUPipelineLayout.cpp index 65ca01c858..ea345117b3 100644 --- a/native/cocos/renderer/gfx-wgpu/WGPUPipelineLayout.cpp +++ b/native/cocos/renderer/gfx-wgpu/WGPUPipelineLayout.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-wgpu/WGPUPipelineLayout.h b/native/cocos/renderer/gfx-wgpu/WGPUPipelineLayout.h index 8a94aec3b8..819bb01c1f 100644 --- a/native/cocos/renderer/gfx-wgpu/WGPUPipelineLayout.h +++ b/native/cocos/renderer/gfx-wgpu/WGPUPipelineLayout.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-wgpu/WGPUPipelineState.cpp b/native/cocos/renderer/gfx-wgpu/WGPUPipelineState.cpp index ebdffe099a..03fc57270f 100644 --- a/native/cocos/renderer/gfx-wgpu/WGPUPipelineState.cpp +++ b/native/cocos/renderer/gfx-wgpu/WGPUPipelineState.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-wgpu/WGPUPipelineState.h b/native/cocos/renderer/gfx-wgpu/WGPUPipelineState.h index e6ea201e99..b069a82d1f 100644 --- a/native/cocos/renderer/gfx-wgpu/WGPUPipelineState.h +++ b/native/cocos/renderer/gfx-wgpu/WGPUPipelineState.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-wgpu/WGPUQueryPool.cpp b/native/cocos/renderer/gfx-wgpu/WGPUQueryPool.cpp index dae0bbd6c9..2ffd8ac414 100644 --- a/native/cocos/renderer/gfx-wgpu/WGPUQueryPool.cpp +++ b/native/cocos/renderer/gfx-wgpu/WGPUQueryPool.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-wgpu/WGPUQueryPool.h b/native/cocos/renderer/gfx-wgpu/WGPUQueryPool.h index f881a8ca17..baef41bf0f 100644 --- a/native/cocos/renderer/gfx-wgpu/WGPUQueryPool.h +++ b/native/cocos/renderer/gfx-wgpu/WGPUQueryPool.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-wgpu/WGPUQueue.cpp b/native/cocos/renderer/gfx-wgpu/WGPUQueue.cpp index a0bad34207..7ab53a0641 100644 --- a/native/cocos/renderer/gfx-wgpu/WGPUQueue.cpp +++ b/native/cocos/renderer/gfx-wgpu/WGPUQueue.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-wgpu/WGPUQueue.h b/native/cocos/renderer/gfx-wgpu/WGPUQueue.h index c6e6469123..61480d53ff 100644 --- a/native/cocos/renderer/gfx-wgpu/WGPUQueue.h +++ b/native/cocos/renderer/gfx-wgpu/WGPUQueue.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-wgpu/WGPURenderPass.cpp b/native/cocos/renderer/gfx-wgpu/WGPURenderPass.cpp index 22c10b664c..467e0f1639 100644 --- a/native/cocos/renderer/gfx-wgpu/WGPURenderPass.cpp +++ b/native/cocos/renderer/gfx-wgpu/WGPURenderPass.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-wgpu/WGPURenderPass.h b/native/cocos/renderer/gfx-wgpu/WGPURenderPass.h index 08d5103742..d6bd7ab327 100644 --- a/native/cocos/renderer/gfx-wgpu/WGPURenderPass.h +++ b/native/cocos/renderer/gfx-wgpu/WGPURenderPass.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-wgpu/WGPUSampler.cpp b/native/cocos/renderer/gfx-wgpu/WGPUSampler.cpp index 64972e3a9f..65e1c662f5 100644 --- a/native/cocos/renderer/gfx-wgpu/WGPUSampler.cpp +++ b/native/cocos/renderer/gfx-wgpu/WGPUSampler.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-wgpu/WGPUSampler.h b/native/cocos/renderer/gfx-wgpu/WGPUSampler.h index 7873b7f64b..438846f582 100644 --- a/native/cocos/renderer/gfx-wgpu/WGPUSampler.h +++ b/native/cocos/renderer/gfx-wgpu/WGPUSampler.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-wgpu/WGPUShader.cpp b/native/cocos/renderer/gfx-wgpu/WGPUShader.cpp index 596d80d45b..6bbc29381d 100644 --- a/native/cocos/renderer/gfx-wgpu/WGPUShader.cpp +++ b/native/cocos/renderer/gfx-wgpu/WGPUShader.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-wgpu/WGPUShader.h b/native/cocos/renderer/gfx-wgpu/WGPUShader.h index 8f8729572e..023084d8e9 100644 --- a/native/cocos/renderer/gfx-wgpu/WGPUShader.h +++ b/native/cocos/renderer/gfx-wgpu/WGPUShader.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-wgpu/WGPUSwapchain.cpp b/native/cocos/renderer/gfx-wgpu/WGPUSwapchain.cpp index 011b2b1059..8ee6c73346 100644 --- a/native/cocos/renderer/gfx-wgpu/WGPUSwapchain.cpp +++ b/native/cocos/renderer/gfx-wgpu/WGPUSwapchain.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-wgpu/WGPUSwapchain.h b/native/cocos/renderer/gfx-wgpu/WGPUSwapchain.h index 8e9c064d7f..6fe924cd39 100644 --- a/native/cocos/renderer/gfx-wgpu/WGPUSwapchain.h +++ b/native/cocos/renderer/gfx-wgpu/WGPUSwapchain.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-wgpu/WGPUTexture.cpp b/native/cocos/renderer/gfx-wgpu/WGPUTexture.cpp index 2ad12a9d00..d3f486c99b 100644 --- a/native/cocos/renderer/gfx-wgpu/WGPUTexture.cpp +++ b/native/cocos/renderer/gfx-wgpu/WGPUTexture.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-wgpu/WGPUTexture.h b/native/cocos/renderer/gfx-wgpu/WGPUTexture.h index c451e8c1de..6d448128d6 100644 --- a/native/cocos/renderer/gfx-wgpu/WGPUTexture.h +++ b/native/cocos/renderer/gfx-wgpu/WGPUTexture.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-wgpu/WGPUUtils.cpp b/native/cocos/renderer/gfx-wgpu/WGPUUtils.cpp index c534b28705..f41674337b 100644 --- a/native/cocos/renderer/gfx-wgpu/WGPUUtils.cpp +++ b/native/cocos/renderer/gfx-wgpu/WGPUUtils.cpp @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #include "WGPUUtils.h" #include "WGPUCommandBuffer.h" #include "WGPUDescriptorSet.h" diff --git a/native/cocos/renderer/gfx-wgpu/WGPUUtils.h b/native/cocos/renderer/gfx-wgpu/WGPUUtils.h index 7520bcb538..1ab82fb8fc 100644 --- a/native/cocos/renderer/gfx-wgpu/WGPUUtils.h +++ b/native/cocos/renderer/gfx-wgpu/WGPUUtils.h @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #pragma once #include #include "base/std/container/vector.h" diff --git a/native/cocos/renderer/gfx-wgpu/states/WGPUBufferBarrier.cpp b/native/cocos/renderer/gfx-wgpu/states/WGPUBufferBarrier.cpp index 412d73a6be..a23a7c91f6 100644 --- a/native/cocos/renderer/gfx-wgpu/states/WGPUBufferBarrier.cpp +++ b/native/cocos/renderer/gfx-wgpu/states/WGPUBufferBarrier.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-wgpu/states/WGPUBufferBarrier.h b/native/cocos/renderer/gfx-wgpu/states/WGPUBufferBarrier.h index 875bbeb3c5..27398f67b9 100644 --- a/native/cocos/renderer/gfx-wgpu/states/WGPUBufferBarrier.h +++ b/native/cocos/renderer/gfx-wgpu/states/WGPUBufferBarrier.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-wgpu/states/WGPUGeneralBarrier.cpp b/native/cocos/renderer/gfx-wgpu/states/WGPUGeneralBarrier.cpp index 85199e2b2e..8feb216779 100644 --- a/native/cocos/renderer/gfx-wgpu/states/WGPUGeneralBarrier.cpp +++ b/native/cocos/renderer/gfx-wgpu/states/WGPUGeneralBarrier.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-wgpu/states/WGPUGeneralBarrier.h b/native/cocos/renderer/gfx-wgpu/states/WGPUGeneralBarrier.h index f995478bab..130fbac884 100644 --- a/native/cocos/renderer/gfx-wgpu/states/WGPUGeneralBarrier.h +++ b/native/cocos/renderer/gfx-wgpu/states/WGPUGeneralBarrier.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-wgpu/states/WGPUTextureBarrier.cpp b/native/cocos/renderer/gfx-wgpu/states/WGPUTextureBarrier.cpp index 445461bae5..bbcc572100 100644 --- a/native/cocos/renderer/gfx-wgpu/states/WGPUTextureBarrier.cpp +++ b/native/cocos/renderer/gfx-wgpu/states/WGPUTextureBarrier.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/gfx-wgpu/states/WGPUTextureBarrier.h b/native/cocos/renderer/gfx-wgpu/states/WGPUTextureBarrier.h index 0f38a42e66..91dcbd7989 100644 --- a/native/cocos/renderer/gfx-wgpu/states/WGPUTextureBarrier.h +++ b/native/cocos/renderer/gfx-wgpu/states/WGPUTextureBarrier.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/BatchedBuffer.cpp b/native/cocos/renderer/pipeline/BatchedBuffer.cpp index 468f5f6e31..c94fdbaa9d 100644 --- a/native/cocos/renderer/pipeline/BatchedBuffer.cpp +++ b/native/cocos/renderer/pipeline/BatchedBuffer.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/BatchedBuffer.h b/native/cocos/renderer/pipeline/BatchedBuffer.h index b562120ec0..d3dbce8ed6 100644 --- a/native/cocos/renderer/pipeline/BatchedBuffer.h +++ b/native/cocos/renderer/pipeline/BatchedBuffer.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/ClusterLightCulling.cpp b/native/cocos/renderer/pipeline/ClusterLightCulling.cpp index 1679dc75a2..bd3b17e93b 100644 --- a/native/cocos/renderer/pipeline/ClusterLightCulling.cpp +++ b/native/cocos/renderer/pipeline/ClusterLightCulling.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/ClusterLightCulling.h b/native/cocos/renderer/pipeline/ClusterLightCulling.h index 7ebbe2ce63..bfff4b5ad2 100644 --- a/native/cocos/renderer/pipeline/ClusterLightCulling.h +++ b/native/cocos/renderer/pipeline/ClusterLightCulling.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/Define.cpp b/native/cocos/renderer/pipeline/Define.cpp index be8e454538..89c9508024 100644 --- a/native/cocos/renderer/pipeline/Define.cpp +++ b/native/cocos/renderer/pipeline/Define.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/Define.h b/native/cocos/renderer/pipeline/Define.h index 8b3c668302..fe50a00d31 100644 --- a/native/cocos/renderer/pipeline/Define.h +++ b/native/cocos/renderer/pipeline/Define.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -27,6 +26,7 @@ #include #include "base/Ptr.h" +#include "base/RefCounted.h" #include "base/TypeDef.h" #include "base/Value.h" #include "renderer/gfx-base/GFXDef.h" @@ -158,12 +158,16 @@ enum class CC_DLL RenderQueueSortMode { }; CC_ENUM_CONVERSION_OPERATOR(RenderQueueSortMode) -struct CC_DLL RenderQueueDesc { +class CC_DLL RenderQueueDesc : public RefCounted { +public: + RenderQueueDesc() = default; + RenderQueueDesc(bool isTransparent, RenderQueueSortMode sortMode, const ccstd::vector &stages) // NOLINT + : isTransparent(isTransparent), sortMode(sortMode), stages(stages) {} bool isTransparent = false; RenderQueueSortMode sortMode = RenderQueueSortMode::FRONT_TO_BACK; ccstd::vector stages; }; -using RenderQueueDescList = ccstd::vector; +using RenderQueueDescList = ccstd::vector>; uint32_t getPhaseID(const ccstd::string &phase); @@ -397,7 +401,7 @@ struct CC_DLL UBOSH { }; enum class CC_DLL ForwardStagePriority { - AR = 5, + AR = 5, FORWARD = 10, UI = 20 }; @@ -543,8 +547,8 @@ enum class LayerList : uint32_t { CC_ENUM_CONVERSION_OPERATOR(LayerList) const uint32_t CAMERA_DEFAULT_MASK = ~static_cast(LayerList::UI_2D) & ~static_cast(LayerList::PROFILER); -//constexpr CAMERA_DEFAULT_MASK = Layers.makeMaskExclude([Layers.BitMask.UI_2D, Layers.BitMask.GIZMOS, Layers.BitMask.EDITOR, -// Layers.BitMask.SCENE_GIZMO, Layers.BitMask.PROFILER]); +// constexpr CAMERA_DEFAULT_MASK = Layers.makeMaskExclude([Layers.BitMask.UI_2D, Layers.BitMask.GIZMOS, Layers.BitMask.EDITOR, +// Layers.BitMask.SCENE_GIZMO, Layers.BitMask.PROFILER]); uint32_t nextPow2(uint32_t val); diff --git a/native/cocos/renderer/pipeline/Enum.h b/native/cocos/renderer/pipeline/Enum.h index c5866a0489..ec88f2b6f9 100644 --- a/native/cocos/renderer/pipeline/Enum.h +++ b/native/cocos/renderer/pipeline/Enum.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/GeometryRenderer.cpp b/native/cocos/renderer/pipeline/GeometryRenderer.cpp index 2c1dffd882..1fbf020a94 100644 --- a/native/cocos/renderer/pipeline/GeometryRenderer.cpp +++ b/native/cocos/renderer/pipeline/GeometryRenderer.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/GeometryRenderer.h b/native/cocos/renderer/pipeline/GeometryRenderer.h index 8a4d1a3b61..742a86aa61 100644 --- a/native/cocos/renderer/pipeline/GeometryRenderer.h +++ b/native/cocos/renderer/pipeline/GeometryRenderer.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/GlobalDescriptorSetManager.cpp b/native/cocos/renderer/pipeline/GlobalDescriptorSetManager.cpp index 29cabe8839..4071c07fe3 100644 --- a/native/cocos/renderer/pipeline/GlobalDescriptorSetManager.cpp +++ b/native/cocos/renderer/pipeline/GlobalDescriptorSetManager.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/GlobalDescriptorSetManager.h b/native/cocos/renderer/pipeline/GlobalDescriptorSetManager.h index 5d4ae95fd1..a71abe78bc 100644 --- a/native/cocos/renderer/pipeline/GlobalDescriptorSetManager.h +++ b/native/cocos/renderer/pipeline/GlobalDescriptorSetManager.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/InstancedBuffer.cpp b/native/cocos/renderer/pipeline/InstancedBuffer.cpp index 9d0d0fd55a..8ecc88e9cd 100644 --- a/native/cocos/renderer/pipeline/InstancedBuffer.cpp +++ b/native/cocos/renderer/pipeline/InstancedBuffer.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/InstancedBuffer.h b/native/cocos/renderer/pipeline/InstancedBuffer.h index dd01c78588..e1d61ec33b 100644 --- a/native/cocos/renderer/pipeline/InstancedBuffer.h +++ b/native/cocos/renderer/pipeline/InstancedBuffer.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/LODModelsUtil.cpp b/native/cocos/renderer/pipeline/LODModelsUtil.cpp deleted file mode 100644 index a805c464a1..0000000000 --- a/native/cocos/renderer/pipeline/LODModelsUtil.cpp +++ /dev/null @@ -1,98 +0,0 @@ -/**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. - - http://www.cocos.com - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. -****************************************************************************/ - -#include "LODModelsUtil.h" - -#include "scene/Camera.h" -#include "scene/LODGroup.h" -#include "scene/Model.h" -#include "scene/RenderScene.h" - -namespace cc { -namespace pipeline { - -/** - * @zh LOD所有级别中存储的model集合;包含多个LODGroup的所有LOD - * @en The collection of models stored in all levels of LOD, All LODs containing multiple LODGroups. - */ -ccstd::unordered_map modelsInAnyLODGroup; - -/** - * @zh 指定相机下,某一级LOD使用的model集合;可能包含多个LODGroup的某一级LOD - * @en Specify the model set used by a level of LOD under the camera, LOD of a level that may contain multiple LODGroups. - */ -ccstd::unordered_map visibleModelsByAnyLODGroup; - -void LODModelsCachedUtils::updateCachedLODModels(const scene::RenderScene *scene, const scene::Camera *camera) { - for (const auto &lodGroup : scene->getLODGroups()) { - if (lodGroup->isEnabled()) { - const auto &lodLevels = lodGroup->getLockedLODLevels(); - uint8_t count = lodLevels.size(); - // count == 0 will return to standard LOD processing. - if (count > 0) { - for (auto index = 0; index < lodGroup->getLodCount(); index++) { - const auto &lod = lodGroup->getLodDataArray()[index]; - for (const auto &model : lod->getModels()) { - for (auto i = 0; i < count; i++) { - // The LOD level to use. - if (lodLevels[i] == index) { - auto *node = model->getNode(); - if (node && node->isActive()) { - visibleModelsByAnyLODGroup[model] = true; - break; - } - } - } - modelsInAnyLODGroup[model] = true; - } - } - continue; - } - - int8_t visIndex = lodGroup->getVisibleLODLevel(camera); - for (auto index = 0; index < lodGroup->getLodCount(); index++) { - const auto &lod = lodGroup->getLodDataArray()[index]; - for (const auto &model : lod->getModels()) { - auto *node = model->getNode(); - if (visIndex == index && node && node->isActive()) { - visibleModelsByAnyLODGroup[model] = true; - } - modelsInAnyLODGroup[model] = true; - } - } - } - } -} - -bool LODModelsCachedUtils::isLODModelCulled(const scene::Model *model) { - return modelsInAnyLODGroup[model] && !visibleModelsByAnyLODGroup[model]; -} - -void LODModelsCachedUtils::clearCachedLODModels() { - modelsInAnyLODGroup.clear(); - visibleModelsByAnyLODGroup.clear(); -} -} // namespace pipeline -} // namespace cc diff --git a/native/cocos/renderer/pipeline/LODModelsUtil.h b/native/cocos/renderer/pipeline/LODModelsUtil.h deleted file mode 100644 index fd9069dda0..0000000000 --- a/native/cocos/renderer/pipeline/LODModelsUtil.h +++ /dev/null @@ -1,44 +0,0 @@ -/**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. - - http://www.cocos.com - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. -****************************************************************************/ - -#pragma once - -namespace cc { -namespace scene { -class Model; -class Camera; -class RenderScene; -} // namespace scene - -namespace pipeline { - -class LODModelsCachedUtils { -public: - static void updateCachedLODModels(const scene::RenderScene *scene, const scene::Camera *camera); - static bool isLODModelCulled(const scene::Model *model); - static void clearCachedLODModels(); -}; -} // namespace pipeline -} // namespace cc diff --git a/native/cocos/renderer/pipeline/PipelineSceneData.cpp b/native/cocos/renderer/pipeline/PipelineSceneData.cpp index 6b5e094a4c..09e4db7525 100644 --- a/native/cocos/renderer/pipeline/PipelineSceneData.cpp +++ b/native/cocos/renderer/pipeline/PipelineSceneData.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -30,13 +29,13 @@ #include "gfx-base/GFXDef-common.h" #include "gfx-base/GFXDevice.h" #include "gfx-base/GFXFramebuffer.h" +#include "gi/light-probe/LightProbe.h" #include "scene/Ambient.h" #include "scene/Fog.h" #include "scene/Octree.h" #include "scene/Pass.h" #include "scene/Shadow.h" #include "scene/Skybox.h" -#include "gi/light-probe/LightProbe.h" namespace cc { namespace pipeline { diff --git a/native/cocos/renderer/pipeline/PipelineSceneData.h b/native/cocos/renderer/pipeline/PipelineSceneData.h index d002d1dd48..48603ae1f5 100644 --- a/native/cocos/renderer/pipeline/PipelineSceneData.h +++ b/native/cocos/renderer/pipeline/PipelineSceneData.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/PipelineStateManager.cpp b/native/cocos/renderer/pipeline/PipelineStateManager.cpp index e01a679550..b777e46c47 100644 --- a/native/cocos/renderer/pipeline/PipelineStateManager.cpp +++ b/native/cocos/renderer/pipeline/PipelineStateManager.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/PipelineStateManager.h b/native/cocos/renderer/pipeline/PipelineStateManager.h index 34412c0988..aa4e78f05c 100644 --- a/native/cocos/renderer/pipeline/PipelineStateManager.h +++ b/native/cocos/renderer/pipeline/PipelineStateManager.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/PipelineUBO.cpp b/native/cocos/renderer/pipeline/PipelineUBO.cpp index f7110cb462..c5c23b61d1 100644 --- a/native/cocos/renderer/pipeline/PipelineUBO.cpp +++ b/native/cocos/renderer/pipeline/PipelineUBO.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -171,6 +170,7 @@ void PipelineUBO::updateCameraUBOView(const RenderPipeline *pipeline, float *out output[UBOCamera::CAMERA_POS_OFFSET + 3] = getCombineSignY(); output[UBOCamera::SURFACE_TRANSFORM_OFFSET + 0] = static_cast(camera->getSurfaceTransform()); + output[UBOCamera::SURFACE_TRANSFORM_OFFSET + 1] = static_cast(camera->getCameraUsage()); const float angle = sceneData->getSkybox()->getRotationAngle(); output[UBOCamera::SURFACE_TRANSFORM_OFFSET + 2] = static_cast(cos(mathutils::toRadian(angle))); output[UBOCamera::SURFACE_TRANSFORM_OFFSET + 3] = static_cast(sin(mathutils::toRadian(angle))); diff --git a/native/cocos/renderer/pipeline/PipelineUBO.h b/native/cocos/renderer/pipeline/PipelineUBO.h index 1d0b20ed78..ab92d63af5 100644 --- a/native/cocos/renderer/pipeline/PipelineUBO.h +++ b/native/cocos/renderer/pipeline/PipelineUBO.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/PlanarShadowQueue.cpp b/native/cocos/renderer/pipeline/PlanarShadowQueue.cpp index aad3496132..fa56b20a6c 100644 --- a/native/cocos/renderer/pipeline/PlanarShadowQueue.cpp +++ b/native/cocos/renderer/pipeline/PlanarShadowQueue.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -26,7 +25,6 @@ #include "base/std/container/array.h" #include "Define.h" -#include "LODModelsUtil.h" #include "InstancedBuffer.h" #include "PipelineSceneData.h" #include "PipelineStateManager.h" @@ -67,10 +65,9 @@ void PlanarShadowQueue::gatherShadowPasses(scene::Camera *camera, gfx::CommandBu return; } - LODModelsCachedUtils::updateCachedLODModels(scene, camera); const auto &models = scene->getModels(); for (const auto &model : models) { - if (LODModelsCachedUtils::isLODModelCulled(model)) { + if (scene->isCulledByLod(camera, model)) { continue; } if (!model->isEnabled() || !model->isCastShadow() || !model->getNode()) { @@ -81,7 +78,6 @@ void PlanarShadowQueue::gatherShadowPasses(scene::Camera *camera, gfx::CommandBu _castModels.emplace_back(model); } } - LODModelsCachedUtils::clearCachedLODModels(); const auto &passes = *shadowInfo->getInstancingMaterial()->getPasses(); InstancedBuffer *instancedBuffer = passes[0]->getInstancedBuffer(); diff --git a/native/cocos/renderer/pipeline/PlanarShadowQueue.h b/native/cocos/renderer/pipeline/PlanarShadowQueue.h index 98dfbcd080..315c2fd3bd 100644 --- a/native/cocos/renderer/pipeline/PlanarShadowQueue.h +++ b/native/cocos/renderer/pipeline/PlanarShadowQueue.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/ReflectionProbeBatchedQueue.cpp b/native/cocos/renderer/pipeline/ReflectionProbeBatchedQueue.cpp index 6d30749188..58ebb89b59 100644 --- a/native/cocos/renderer/pipeline/ReflectionProbeBatchedQueue.cpp +++ b/native/cocos/renderer/pipeline/ReflectionProbeBatchedQueue.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -32,25 +31,21 @@ #include "RenderBatchedQueue.h" #include "RenderInstancedQueue.h" #include "core/geometry/AABB.h" +#include "core/geometry/Intersect.h" #include "forward/ForwardPipeline.h" #include "gfx-base/GFXCommandBuffer.h" #include "gfx-base/GFXDevice.h" #include "renderer/core/ProgramLib.h" -#include "scene/ReflectionProbeManager.h" #include "scene/Camera.h" -#include "scene/ReflectionProbe.h" -#include "scene/Skybox.h" #include "scene/Define.h" +#include "scene/ReflectionProbe.h" +#include "scene/ReflectionProbeManager.h" +#include "scene/Skybox.h" namespace cc { namespace pipeline { -const static uint32_t REFLECTION_PROBE_DEFAULT_MASK = ~static_cast(LayerList::UI_2D) - & ~static_cast(LayerList::PROFILER) - & ~static_cast(LayerList::UI_3D) - & ~static_cast(LayerList::GIZMOS) - & ~static_cast(LayerList::SCENE_GIZMO) - & ~static_cast(LayerList::EDITOR); +const static uint32_t REFLECTION_PROBE_DEFAULT_MASK = ~static_cast(LayerList::UI_2D) & ~static_cast(LayerList::PROFILER) & ~static_cast(LayerList::UI_3D) & ~static_cast(LayerList::GIZMOS) & ~static_cast(LayerList::SCENE_GIZMO) & ~static_cast(LayerList::EDITOR); const ccstd::string CC_USE_RGBE_OUTPUT = "CC_USE_RGBE_OUTPUT"; -const cc::scene::IMacroPatch MACRO_PATCH_RGBE_OUTPUT{ CC_USE_RGBE_OUTPUT, true}; +const cc::scene::IMacroPatch MACRO_PATCH_RGBE_OUTPUT{CC_USE_RGBE_OUTPUT, true}; ReflectionProbeBatchedQueue::ReflectionProbeBatchedQueue(RenderPipeline *pipeline) : _phaseID(getPhaseID("default")), _phaseReflectMapID(getPhaseID("reflect-map")) { _pipeline = pipeline; @@ -77,18 +72,29 @@ void ReflectionProbeBatchedQueue::gatherRenderObjects(const scene::Camera *camer const scene::Skybox *skyBox = sceneData->getSkybox(); const scene::RenderScene *const scene = camera->getScene(); - if (static_cast(camera->getClearFlag()) & skyboxFlag) { + if (static_cast(probe->getCamera()->getClearFlag()) & skyboxFlag) { if (skyBox != nullptr && skyBox->isEnabled() && skyBox->getModel()) { add(skyBox->getModel()); } } for (const auto &model : scene->getModels()) { const auto *node = model->getNode(); - if (!node) continue; - if (((node->getLayer() & REFLECTION_PROBE_DEFAULT_MASK) == node->getLayer()) - || (REFLECTION_PROBE_DEFAULT_MASK & static_cast(model->getVisFlags()))) { - if (model->getWorldBounds()) { - if (model->getWorldBounds()->aabbFrustum(probe->getCamera()->getFrustum())) { + const auto *worldBounds = model->getWorldBounds(); + if (scene->isCulledByLod(camera, model)) { + continue; + } + if (!node || !model->isEnabled() || !worldBounds || !model->getBakeToReflectionProbe()) continue; + uint32_t visibility = probe->getCamera()->getVisibility(); + if (probe->getProbeType() == scene::ReflectionProbe::ProbeType::CUBE) { + if (((visibility & node->getLayer()) == node->getLayer()) || + (visibility & static_cast(model->getVisFlags()))) { + if (aabbWithAABB(*worldBounds, *probe->getBoundingBox())) { + add(model); + } + } + } else { + if (((node->getLayer() & REFLECTION_PROBE_DEFAULT_MASK) == node->getLayer()) || (REFLECTION_PROBE_DEFAULT_MASK & static_cast(model->getVisFlags()))) { + if (worldBounds->aabbFrustum(probe->getCamera()->getFrustum())) { add(model); } } @@ -123,7 +129,7 @@ void ReflectionProbeBatchedQueue::add(const scene::Model *model) { auto *pass = subModel->getPass(passIdx); const auto batchingScheme = pass->getBatchingScheme(); - if (!bUseReflectPass) { + if (!bUseReflectPass) { auto patches = const_cast &>(subModel->getPatches()); patches.emplace_back(MACRO_PATCH_RGBE_OUTPUT); subModel->onMacroPatchesStateChanged(patches); @@ -173,7 +179,7 @@ void ReflectionProbeBatchedQueue::resetMacro() const { for (auto iter = patches.begin(); iter != patches.end(); iter++) { if (iter->name == CC_USE_RGBE_OUTPUT) { patches.erase(iter); - const_cast(subModel)->onMacroPatchesStateChanged(patches); + const_cast(subModel)->onMacroPatchesStateChanged(patches); break; } } diff --git a/native/cocos/renderer/pipeline/ReflectionProbeBatchedQueue.h b/native/cocos/renderer/pipeline/ReflectionProbeBatchedQueue.h index 97dccf37b1..08dac4ff3a 100644 --- a/native/cocos/renderer/pipeline/ReflectionProbeBatchedQueue.h +++ b/native/cocos/renderer/pipeline/ReflectionProbeBatchedQueue.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -52,7 +51,7 @@ public: void add(const scene::Model *); void recordCommandBuffer(gfx::Device *, gfx::RenderPass *, gfx::CommandBuffer *) const; - void resetMacro()const; + void resetMacro() const; bool isUseReflectMapPass(const scene::SubModel *subModel) const; diff --git a/native/cocos/renderer/pipeline/RenderAdditiveLightQueue.cpp b/native/cocos/renderer/pipeline/RenderAdditiveLightQueue.cpp index 1afd42261a..0ed830e82b 100644 --- a/native/cocos/renderer/pipeline/RenderAdditiveLightQueue.cpp +++ b/native/cocos/renderer/pipeline/RenderAdditiveLightQueue.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/RenderAdditiveLightQueue.h b/native/cocos/renderer/pipeline/RenderAdditiveLightQueue.h index 173f09d9ba..a795863d2e 100644 --- a/native/cocos/renderer/pipeline/RenderAdditiveLightQueue.h +++ b/native/cocos/renderer/pipeline/RenderAdditiveLightQueue.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/RenderBatchedQueue.cpp b/native/cocos/renderer/pipeline/RenderBatchedQueue.cpp index 08ddd8cdce..8351f878db 100644 --- a/native/cocos/renderer/pipeline/RenderBatchedQueue.cpp +++ b/native/cocos/renderer/pipeline/RenderBatchedQueue.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/RenderBatchedQueue.h b/native/cocos/renderer/pipeline/RenderBatchedQueue.h index ae739891e5..d98bfb2509 100644 --- a/native/cocos/renderer/pipeline/RenderBatchedQueue.h +++ b/native/cocos/renderer/pipeline/RenderBatchedQueue.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/RenderFlow.cpp b/native/cocos/renderer/pipeline/RenderFlow.cpp index 2d868628ce..ce9905f54b 100644 --- a/native/cocos/renderer/pipeline/RenderFlow.cpp +++ b/native/cocos/renderer/pipeline/RenderFlow.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/RenderFlow.h b/native/cocos/renderer/pipeline/RenderFlow.h index a9e72f09f3..524570f698 100644 --- a/native/cocos/renderer/pipeline/RenderFlow.h +++ b/native/cocos/renderer/pipeline/RenderFlow.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -56,8 +55,13 @@ public: virtual void destroy(); inline const ccstd::string &getName() const { return _name; } + inline void setName(ccstd::string &name) { _name = name; } inline uint32_t getPriority() const { return _priority; } + inline void setPriority(uint32_t priority) { _priority = priority; } inline uint32_t getTag() const { return _tag; } + inline void setTag(uint32_t tag) { _tag = tag; } + inline const RenderStageList &getStages() const { return _stages; } + inline void setStages(const RenderStageList &stages) { _stages = stages; } RenderStage *getRenderstageByName(const ccstd::string &name) const; protected: diff --git a/native/cocos/renderer/pipeline/RenderInstancedQueue.cpp b/native/cocos/renderer/pipeline/RenderInstancedQueue.cpp index aa882c2eb3..ccc84e0b46 100644 --- a/native/cocos/renderer/pipeline/RenderInstancedQueue.cpp +++ b/native/cocos/renderer/pipeline/RenderInstancedQueue.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/RenderInstancedQueue.h b/native/cocos/renderer/pipeline/RenderInstancedQueue.h index 19d87c549b..c01cd38be2 100644 --- a/native/cocos/renderer/pipeline/RenderInstancedQueue.h +++ b/native/cocos/renderer/pipeline/RenderInstancedQueue.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/RenderPipeline.cpp b/native/cocos/renderer/pipeline/RenderPipeline.cpp index 6997bbd2d2..21db853940 100644 --- a/native/cocos/renderer/pipeline/RenderPipeline.cpp +++ b/native/cocos/renderer/pipeline/RenderPipeline.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/RenderPipeline.h b/native/cocos/renderer/pipeline/RenderPipeline.h index 9cb11e1ae5..c8abdf8d03 100644 --- a/native/cocos/renderer/pipeline/RenderPipeline.h +++ b/native/cocos/renderer/pipeline/RenderPipeline.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -80,7 +79,9 @@ public: virtual void onGlobalPipelineStateChanged(); inline const RenderFlowList &getFlows() const { return _flows; } + inline void setFlows(const RenderFlowList &flows) { _flows = flows; } inline uint32_t getTag() const { return _tag; } + inline void setTag(uint32_t tag) { _tag = tag; } inline const ccstd::unordered_map &getGlobalBindings() const { return _globalBindings; } inline const MacroRecord &getMacros() const { return _macros; } inline void setValue(const ccstd::string &name, int32_t value) { _macros[name] = value; } @@ -142,8 +143,8 @@ public: inline void resetRenderQueue(bool reset) { _resetRenderQueue = reset; } inline bool isRenderQueueReset() const { return _resetRenderQueue; } - render::PipelineRuntime* getPipelineRuntime() const { return _pipelineRuntime; } - void setPipelineRuntime(render::PipelineRuntime* pipelineRuntime) { + render::PipelineRuntime *getPipelineRuntime() const { return _pipelineRuntime; } + void setPipelineRuntime(render::PipelineRuntime *pipelineRuntime) { _pipelineRuntime = pipelineRuntime; } @@ -202,7 +203,7 @@ protected: bool _resetRenderQueue{true}; - render::PipelineRuntime* _pipelineRuntime{nullptr}; + render::PipelineRuntime *_pipelineRuntime{nullptr}; }; } // namespace pipeline diff --git a/native/cocos/renderer/pipeline/RenderQueue.cpp b/native/cocos/renderer/pipeline/RenderQueue.cpp index 45f594ba32..854daad29e 100644 --- a/native/cocos/renderer/pipeline/RenderQueue.cpp +++ b/native/cocos/renderer/pipeline/RenderQueue.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/RenderQueue.h b/native/cocos/renderer/pipeline/RenderQueue.h index 034de9f376..ae44cf5fed 100644 --- a/native/cocos/renderer/pipeline/RenderQueue.h +++ b/native/cocos/renderer/pipeline/RenderQueue.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/RenderStage.cpp b/native/cocos/renderer/pipeline/RenderStage.cpp index 50dd64acfd..91eb29b9ab 100644 --- a/native/cocos/renderer/pipeline/RenderStage.cpp +++ b/native/cocos/renderer/pipeline/RenderStage.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/RenderStage.h b/native/cocos/renderer/pipeline/RenderStage.h index fd1bd84cde..6aea7ae78c 100644 --- a/native/cocos/renderer/pipeline/RenderStage.h +++ b/native/cocos/renderer/pipeline/RenderStage.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -58,11 +57,16 @@ public: virtual bool initialize(const RenderStageInfo &info); virtual void destroy(); - virtual void render(scene::Camera *camera) = 0; + + // should not be pure virtual, since it will be instantiated in inspector + virtual void render(scene::Camera *camera) {} inline const ccstd::string &getName() const { return _name; } + inline void setName(ccstd::string &name) { _name = name; } inline uint32_t getPriority() const { return _priority; } + inline void setPriority(uint32_t priority) { _priority = priority; } inline uint32_t getTag() const { return _tag; } + inline void setTag(uint32_t tag) { _tag = tag; } inline RenderFlow *getFlow() const { return _flow; } protected: diff --git a/native/cocos/renderer/pipeline/SceneCulling.cpp b/native/cocos/renderer/pipeline/SceneCulling.cpp index c143c77541..d2111d2ab8 100644 --- a/native/cocos/renderer/pipeline/SceneCulling.cpp +++ b/native/cocos/renderer/pipeline/SceneCulling.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -26,7 +25,6 @@ #include "base/std/container/array.h" #include "Define.h" -#include "LODModelsUtil.h" #include "PipelineSceneData.h" #include "RenderPipeline.h" #include "SceneCulling.h" @@ -165,14 +163,12 @@ void sceneCulling(const RenderPipeline *pipeline, scene::Camera *camera) { } } - LODModelsCachedUtils::updateCachedLODModels(scene, camera); - const scene::Octree *octree = scene->getOctree(); if (octree && octree->isEnabled()) { for (const auto &model : scene->getModels()) { // filter model by view visibility if (model->isEnabled()) { - if (LODModelsCachedUtils::isLODModelCulled(model)) { + if (scene->isCulledByLod(camera, model)) { continue; } @@ -199,7 +195,7 @@ void sceneCulling(const RenderPipeline *pipeline, scene::Camera *camera) { models.reserve(scene->getModels().size() / 4); octree->queryVisibility(camera, camera->getFrustum(), false, models); for (const auto &model : models) { - if (LODModelsCachedUtils::isLODModelCulled(model)) { + if (scene->isCulledByLod(camera, model)) { continue; } sceneData->addRenderObject(genRenderObject(model, camera)); @@ -208,7 +204,7 @@ void sceneCulling(const RenderPipeline *pipeline, scene::Camera *camera) { for (const auto &model : scene->getModels()) { // filter model by view visibility if (model->isEnabled()) { - if (LODModelsCachedUtils::isLODModelCulled(model)) { + if (scene->isCulledByLod(camera, model)) { continue; } const auto visibility = camera->getVisibility(); @@ -236,7 +232,6 @@ void sceneCulling(const RenderPipeline *pipeline, scene::Camera *camera) { } } } - LODModelsCachedUtils::clearCachedLODModels(); csmLayers = nullptr; } diff --git a/native/cocos/renderer/pipeline/SceneCulling.h b/native/cocos/renderer/pipeline/SceneCulling.h index bf17be3ae6..28494eebf7 100644 --- a/native/cocos/renderer/pipeline/SceneCulling.h +++ b/native/cocos/renderer/pipeline/SceneCulling.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/ShadowMapBatchedQueue.cpp b/native/cocos/renderer/pipeline/ShadowMapBatchedQueue.cpp index 55512612db..cc414e985a 100644 --- a/native/cocos/renderer/pipeline/ShadowMapBatchedQueue.cpp +++ b/native/cocos/renderer/pipeline/ShadowMapBatchedQueue.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -87,8 +86,7 @@ void ShadowMapBatchedQueue::gatherLightPasses(const scene::Camera *camera, const geometry::AABB ab; for (const auto &ro : castShadowObjects) { const auto *model = ro.model; - if ((visibility & model->getNode()->getLayer()) != model->getNode()->getLayer() - || !model->isEnabled() || !model->isCastShadow() || !model->getNode()) { + if ((visibility & model->getNode()->getLayer()) != model->getNode()->getLayer() || !model->isEnabled() || !model->isCastShadow() || !model->getNode()) { continue; } if (model->getWorldBounds()) { diff --git a/native/cocos/renderer/pipeline/ShadowMapBatchedQueue.h b/native/cocos/renderer/pipeline/ShadowMapBatchedQueue.h index 64ba12e788..40adf9203d 100644 --- a/native/cocos/renderer/pipeline/ShadowMapBatchedQueue.h +++ b/native/cocos/renderer/pipeline/ShadowMapBatchedQueue.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/UIPhase.cpp b/native/cocos/renderer/pipeline/UIPhase.cpp index 8d08b15278..6cdf32ee00 100644 --- a/native/cocos/renderer/pipeline/UIPhase.cpp +++ b/native/cocos/renderer/pipeline/UIPhase.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/UIPhase.h b/native/cocos/renderer/pipeline/UIPhase.h index 09cc9d9cf0..656d36d5c2 100644 --- a/native/cocos/renderer/pipeline/UIPhase.h +++ b/native/cocos/renderer/pipeline/UIPhase.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/custom/ArchiveFwd.h b/native/cocos/renderer/pipeline/custom/ArchiveFwd.h index af6fd49043..5427720d4c 100644 --- a/native/cocos/renderer/pipeline/custom/ArchiveFwd.h +++ b/native/cocos/renderer/pipeline/custom/ArchiveFwd.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/custom/ArchiveTypes.cpp b/native/cocos/renderer/pipeline/custom/ArchiveTypes.cpp index d22372497f..849a9520b5 100644 --- a/native/cocos/renderer/pipeline/custom/ArchiveTypes.cpp +++ b/native/cocos/renderer/pipeline/custom/ArchiveTypes.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/custom/ArchiveTypes.h b/native/cocos/renderer/pipeline/custom/ArchiveTypes.h index e557348f37..953149567d 100644 --- a/native/cocos/renderer/pipeline/custom/ArchiveTypes.h +++ b/native/cocos/renderer/pipeline/custom/ArchiveTypes.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/custom/BinaryArchive.h b/native/cocos/renderer/pipeline/custom/BinaryArchive.h index 1089bf9548..a0a08d0880 100644 --- a/native/cocos/renderer/pipeline/custom/BinaryArchive.h +++ b/native/cocos/renderer/pipeline/custom/BinaryArchive.h @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +***************************************************************************/ + #pragma once #include #include diff --git a/native/cocos/renderer/pipeline/custom/FGDispatcherGraphs.h b/native/cocos/renderer/pipeline/custom/FGDispatcherGraphs.h index 329b4934c7..4050a7fbb5 100644 --- a/native/cocos/renderer/pipeline/custom/FGDispatcherGraphs.h +++ b/native/cocos/renderer/pipeline/custom/FGDispatcherGraphs.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -33,10 +32,9 @@ #include #include #include "cocos/renderer/pipeline/custom/FGDispatcherTypes.h" -#include "cocos/renderer/pipeline/custom/GraphImpl.h" -#include "cocos/renderer/pipeline/custom/GslUtils.h" -#include "cocos/renderer/pipeline/custom/Overload.h" -#include "cocos/renderer/pipeline/custom/PathUtils.h" +#include "cocos/renderer/pipeline/custom/details/GraphImpl.h" +#include "cocos/renderer/pipeline/custom/details/Overload.h" +#include "cocos/renderer/pipeline/custom/details/PathUtils.h" namespace cc { @@ -220,8 +218,8 @@ inline void remove_vertex(ResourceAccessGraph::vertex_descriptor u, ResourceAcce impl::removeVectorVertex(const_cast(g), u, ResourceAccessGraph::directed_category{}); // remove components - g.passID.erase(g.passID.begin() + std::ptrdiff_t(u)); - g.access.erase(g.access.begin() + std::ptrdiff_t(u)); + g.passID.erase(g.passID.begin() + static_cast(u)); + g.access.erase(g.access.begin() + static_cast(u)); } // MutablePropertyGraph(Vertex) @@ -452,7 +450,7 @@ inline void remove_vertex(RelationGraph::vertex_descriptor u, RelationGraph& g) impl::removeVectorVertex(const_cast(g), u, RelationGraph::directed_category{}); // remove components - g.descID.erase(g.descID.begin() + std::ptrdiff_t(u)); + g.descID.erase(g.descID.begin() + static_cast(u)); } // MutablePropertyGraph(Vertex) diff --git a/native/cocos/renderer/pipeline/custom/FGDispatcherTypes.cpp b/native/cocos/renderer/pipeline/custom/FGDispatcherTypes.cpp index 029455afb9..dbfbd9323f 100644 --- a/native/cocos/renderer/pipeline/custom/FGDispatcherTypes.cpp +++ b/native/cocos/renderer/pipeline/custom/FGDispatcherTypes.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/custom/FGDispatcherTypes.h b/native/cocos/renderer/pipeline/custom/FGDispatcherTypes.h index b0239ab47a..c528922111 100644 --- a/native/cocos/renderer/pipeline/custom/FGDispatcherTypes.h +++ b/native/cocos/renderer/pipeline/custom/FGDispatcherTypes.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -37,11 +36,11 @@ #include #include "cocos/base/std/container/string.h" #include "cocos/base/std/container/vector.h" -#include "cocos/renderer/pipeline/custom/GraphTypes.h" #include "cocos/renderer/pipeline/custom/LayoutGraphTypes.h" -#include "cocos/renderer/pipeline/custom/Map.h" #include "cocos/renderer/pipeline/custom/RenderGraphTypes.h" -#include "cocos/renderer/pipeline/custom/Set.h" +#include "cocos/renderer/pipeline/custom/details/GraphTypes.h" +#include "cocos/renderer/pipeline/custom/details/Map.h" +#include "cocos/renderer/pipeline/custom/details/Set.h" #include "gfx-base/GFXDef-common.h" namespace cc { diff --git a/native/cocos/renderer/pipeline/custom/FrameGraphDispatcher.cpp b/native/cocos/renderer/pipeline/custom/FrameGraphDispatcher.cpp index 8594efe4a2..dfb096e9d0 100644 --- a/native/cocos/renderer/pipeline/custom/FrameGraphDispatcher.cpp +++ b/native/cocos/renderer/pipeline/custom/FrameGraphDispatcher.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -37,13 +36,13 @@ #include "FGDispatcherTypes.h" #include "LayoutGraphGraphs.h" #include "LayoutGraphTypes.h" -#include "Range.h" #include "RenderGraphGraphs.h" #include "base/Log.h" #include "boost/graph/depth_first_search.hpp" #include "boost/graph/hawick_circuits.hpp" #include "boost/graph/visitors.hpp" #include "boost/lexical_cast.hpp" +#include "details/Range.h" #include "gfx-base/GFXBarrier.h" #include "gfx-base/GFXDef-common.h" #include "gfx-base/GFXDef.h" @@ -51,9 +50,9 @@ #include "gfx-base/states/GFXBufferBarrier.h" #include "gfx-base/states/GFXTextureBarrier.h" #include "math/Vec2.h" -#include "pipeline/custom/GslUtils.h" #include "pipeline/custom/RenderCommonFwd.h" #include "pipeline/custom/RenderGraphTypes.h" +#include "pipeline/custom/details/GslUtils.h" namespace cc { @@ -184,7 +183,7 @@ bool tryAddEdge(uint32_t srcVertex, uint32_t dstVertex, Graph &graph); // for transive_closure.hpp line 231 inline RelationGraph::vertex_descriptor add_vertex(RelationGraph &g) { // NOLINT - thread_local uint32_t count = 0; // unused + thread_local uint32_t count = 0; // unused return add_vertex(g, count++); } diff --git a/native/cocos/renderer/pipeline/custom/LayoutGraphFwd.h b/native/cocos/renderer/pipeline/custom/LayoutGraphFwd.h index 3b81207401..c49e319968 100644 --- a/native/cocos/renderer/pipeline/custom/LayoutGraphFwd.h +++ b/native/cocos/renderer/pipeline/custom/LayoutGraphFwd.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/custom/LayoutGraphGraphs.h b/native/cocos/renderer/pipeline/custom/LayoutGraphGraphs.h index ca7360788d..d406a4d6c3 100644 --- a/native/cocos/renderer/pipeline/custom/LayoutGraphGraphs.h +++ b/native/cocos/renderer/pipeline/custom/LayoutGraphGraphs.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -32,11 +31,10 @@ #pragma once #include #include -#include "cocos/renderer/pipeline/custom/GraphImpl.h" -#include "cocos/renderer/pipeline/custom/GslUtils.h" #include "cocos/renderer/pipeline/custom/LayoutGraphTypes.h" -#include "cocos/renderer/pipeline/custom/Overload.h" -#include "cocos/renderer/pipeline/custom/PathUtils.h" +#include "cocos/renderer/pipeline/custom/details/GraphImpl.h" +#include "cocos/renderer/pipeline/custom/details/Overload.h" +#include "cocos/renderer/pipeline/custom/details/PathUtils.h" namespace cc { @@ -1145,7 +1143,7 @@ inline void removePathImpl(LayoutGraph::vertex_descriptor u, LayoutGraph& g) noe // notice: here we use ccstd::string, not std::pmr::string // we do not want to increase the memory of g auto pathName = getPath(u, g); - auto iter = g.pathIndex.find(std::string_view(pathName)); + auto iter = g.pathIndex.find(std::string_view{pathName}); CC_EXPECTS(iter != g.pathIndex.end()); g.pathIndex.erase(iter); for (auto&& nvp : g.pathIndex) { @@ -1203,14 +1201,14 @@ inline void remove_vertex_value_impl(const LayoutGraph::VertexHandle& h, LayoutG ccstd::visit( overload( [&](const impl::ValueHandle& h) { - g.stages.erase(g.stages.begin() + std::ptrdiff_t(h.value)); + g.stages.erase(g.stages.begin() + static_cast(h.value)); if (h.value == g.stages.size()) { return; } impl::reindexVectorHandle(g._vertices, h.value); }, [&](const impl::ValueHandle& h) { - g.phases.erase(g.phases.begin() + std::ptrdiff_t(h.value)); + g.phases.erase(g.phases.begin() + static_cast(h.value)); if (h.value == g.phases.size()) { return; } @@ -1226,8 +1224,8 @@ inline void remove_vertex(LayoutGraph::vertex_descriptor u, LayoutGraph& g) noex impl::removeVectorVertex(const_cast(g), u, LayoutGraph::directed_category{}); // remove components - g.names.erase(g.names.begin() + std::ptrdiff_t(u)); - g.descriptors.erase(g.descriptors.begin() + std::ptrdiff_t(u)); + g.names.erase(g.names.begin() + static_cast(u)); + g.descriptors.erase(g.descriptors.begin() + static_cast(u)); } // MutablePropertyGraph(Vertex) @@ -1845,7 +1843,7 @@ inline void removePathImpl(LayoutGraphData::vertex_descriptor u, LayoutGraphData // notice: here we use ccstd::string, not std::pmr::string // we do not want to increase the memory of g auto pathName = getPath(u, g); - auto iter = g.pathIndex.find(std::string_view(pathName)); + auto iter = g.pathIndex.find(std::string_view{pathName}); CC_EXPECTS(iter != g.pathIndex.end()); g.pathIndex.erase(iter); for (auto&& nvp : g.pathIndex) { @@ -1903,14 +1901,14 @@ inline void remove_vertex_value_impl(const LayoutGraphData::VertexHandle& h, Lay ccstd::visit( overload( [&](const impl::ValueHandle& h) { - g.stages.erase(g.stages.begin() + std::ptrdiff_t(h.value)); + g.stages.erase(g.stages.begin() + static_cast(h.value)); if (h.value == g.stages.size()) { return; } impl::reindexVectorHandle(g._vertices, h.value); }, [&](const impl::ValueHandle& h) { - g.phases.erase(g.phases.begin() + std::ptrdiff_t(h.value)); + g.phases.erase(g.phases.begin() + static_cast(h.value)); if (h.value == g.phases.size()) { return; } @@ -1926,9 +1924,9 @@ inline void remove_vertex(LayoutGraphData::vertex_descriptor u, LayoutGraphData& impl::removeVectorVertex(const_cast(g), u, LayoutGraphData::directed_category{}); // remove components - g.names.erase(g.names.begin() + std::ptrdiff_t(u)); - g.updateFrequencies.erase(g.updateFrequencies.begin() + std::ptrdiff_t(u)); - g.layouts.erase(g.layouts.begin() + std::ptrdiff_t(u)); + g.names.erase(g.names.begin() + static_cast(u)); + g.updateFrequencies.erase(g.updateFrequencies.begin() + static_cast(u)); + g.layouts.erase(g.layouts.begin() + static_cast(u)); } // MutablePropertyGraph(Vertex) diff --git a/native/cocos/renderer/pipeline/custom/LayoutGraphJsb.cpp b/native/cocos/renderer/pipeline/custom/LayoutGraphJsb.cpp deleted file mode 100644 index 0384625d96..0000000000 --- a/native/cocos/renderer/pipeline/custom/LayoutGraphJsb.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. - - http://www.cocos.com - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. -****************************************************************************/ - -/** - * ========================= !DO NOT CHANGE THE FOLLOWING SECTION MANUALLY! ========================= - * The following section is auto-generated. - * ========================= !DO NOT CHANGE THE FOLLOWING SECTION MANUALLY! ========================= - */ -// clang-format off -#include "cocos/bindings/auto/jsb_gfx_auto.h" -#include "cocos/renderer/pipeline/custom/JsbConversion.h" -#include "cocos/renderer/pipeline/custom/LayoutGraphJsb.h" -#include "cocos/renderer/pipeline/custom/LayoutGraphTypes.h" - -// clang-format on diff --git a/native/cocos/renderer/pipeline/custom/LayoutGraphNames.h b/native/cocos/renderer/pipeline/custom/LayoutGraphNames.h index 3c63405d84..950a40ee52 100644 --- a/native/cocos/renderer/pipeline/custom/LayoutGraphNames.h +++ b/native/cocos/renderer/pipeline/custom/LayoutGraphNames.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/custom/LayoutGraphReflection.cpp b/native/cocos/renderer/pipeline/custom/LayoutGraphReflection.cpp deleted file mode 100644 index 7fad571b80..0000000000 --- a/native/cocos/renderer/pipeline/custom/LayoutGraphReflection.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. - - http://www.cocos.com - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. -****************************************************************************/ - -/** - * ========================= !DO NOT CHANGE THE FOLLOWING SECTION MANUALLY! ========================= - * The following section is auto-generated. - * ========================= !DO NOT CHANGE THE FOLLOWING SECTION MANUALLY! ========================= - */ -// clang-format off -#include "LayoutGraphReflection.h" -#include "LayoutGraphTypes.h" - -// clang-format on diff --git a/native/cocos/renderer/pipeline/custom/LayoutGraphReflection.h b/native/cocos/renderer/pipeline/custom/LayoutGraphReflection.h deleted file mode 100644 index ce99723f6a..0000000000 --- a/native/cocos/renderer/pipeline/custom/LayoutGraphReflection.h +++ /dev/null @@ -1,36 +0,0 @@ -/**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. - - http://www.cocos.com - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. -****************************************************************************/ - -/** - * ========================= !DO NOT CHANGE THE FOLLOWING SECTION MANUALLY! ========================= - * The following section is auto-generated. - * ========================= !DO NOT CHANGE THE FOLLOWING SECTION MANUALLY! ========================= - */ -// clang-format off -#pragma once -#include "cocos/renderer/pipeline/custom/LayoutGraphFwd.h" -#include "cocos/renderer/pipeline/custom/RenderCommonReflection.h" - -// clang-format on diff --git a/native/cocos/renderer/pipeline/custom/LayoutGraphSerialization.h b/native/cocos/renderer/pipeline/custom/LayoutGraphSerialization.h index 8795bf8b4a..c7d2884456 100644 --- a/native/cocos/renderer/pipeline/custom/LayoutGraphSerialization.h +++ b/native/cocos/renderer/pipeline/custom/LayoutGraphSerialization.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -29,12 +28,12 @@ * ========================= !DO NOT CHANGE THE FOLLOWING SECTION MANUALLY! ========================= */ #pragma once -#include #include "cocos/renderer/pipeline/custom/ArchiveTypes.h" +#include "cocos/renderer/pipeline/custom/LayoutGraphGraphs.h" #include "cocos/renderer/pipeline/custom/LayoutGraphTypes.h" -#include "cocos/renderer/pipeline/custom/Range.h" #include "cocos/renderer/pipeline/custom/RenderCommonSerialization.h" -#include "cocos/renderer/pipeline/custom/SerializationUtils.h" +#include "cocos/renderer/pipeline/custom/details/Range.h" +#include "cocos/renderer/pipeline/custom/details/SerializationUtils.h" namespace cc { @@ -118,21 +117,21 @@ inline void load(InputArchive& ar, LayoutGraph& g) { load(ar, u); load(ar, name); load(ar, descriptors); - switch(id) { - case 0: { - uint32_t val; - load(ar, val); - addVertex(std::move(name), std::move(descriptors), val, g, u); - break; - } - case 1: { - RenderPhase val(g.get_allocator()); - load(ar, val); - addVertex(std::move(name), std::move(descriptors), std::move(val), g, u); - break; - } - default: - throw std::runtime_error("load graph failed"); + switch (id) { + case 0: { + uint32_t val; + load(ar, val); + addVertex(std::move(name), std::move(descriptors), val, g, u); + break; + } + case 1: { + RenderPhase val(g.get_allocator()); + load(ar, val); + addVertex(std::move(name), std::move(descriptors), std::move(val), g, u); + break; + } + default: + throw std::runtime_error("load graph failed"); } } } @@ -202,6 +201,7 @@ inline void save(OutputArchive& ar, const DescriptorSetLayoutData& v) { save(ar, v.capacity); save(ar, v.descriptorBlocks); save(ar, v.uniformBlocks); + save(ar, v.bindingMap); } inline void load(InputArchive& ar, DescriptorSetLayoutData& v) { @@ -209,6 +209,7 @@ inline void load(InputArchive& ar, DescriptorSetLayoutData& v) { load(ar, v.capacity); load(ar, v.descriptorBlocks); load(ar, v.uniformBlocks); + load(ar, v.bindingMap); } inline void save(OutputArchive& ar, const DescriptorSetData& v) { @@ -371,21 +372,21 @@ inline void load(InputArchive& ar, LayoutGraphData& g) { load(ar, name); load(ar, update); load(ar, layout); - switch(id) { - case 0: { - RenderStageData val(g.get_allocator()); - load(ar, val); - addVertex(std::move(name), update, std::move(layout), std::move(val), g, u); - break; - } - case 1: { - RenderPhaseData val(g.get_allocator()); - load(ar, val); - addVertex(std::move(name), update, std::move(layout), std::move(val), g, u); - break; - } - default: - throw std::runtime_error("load graph failed"); + switch (id) { + case 0: { + RenderStageData val(g.get_allocator()); + load(ar, val); + addVertex(std::move(name), update, std::move(layout), std::move(val), g, u); + break; + } + case 1: { + RenderPhaseData val(g.get_allocator()); + load(ar, val); + addVertex(std::move(name), update, std::move(layout), std::move(val), g, u); + break; + } + default: + throw std::runtime_error("load graph failed"); } } load(ar, g.valueNames); diff --git a/native/cocos/renderer/pipeline/custom/LayoutGraphTypes.cpp b/native/cocos/renderer/pipeline/custom/LayoutGraphTypes.cpp index 84cc875a95..824c09aebb 100644 --- a/native/cocos/renderer/pipeline/custom/LayoutGraphTypes.cpp +++ b/native/cocos/renderer/pipeline/custom/LayoutGraphTypes.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -134,19 +133,22 @@ DescriptorBlockData::DescriptorBlockData(DescriptorBlockData const& rhs, const a DescriptorSetLayoutData::DescriptorSetLayoutData(const allocator_type& alloc) noexcept : descriptorBlocks(alloc), - uniformBlocks(alloc) {} + uniformBlocks(alloc), + bindingMap(alloc) {} -DescriptorSetLayoutData::DescriptorSetLayoutData(uint32_t slotIn, uint32_t capacityIn, ccstd::pmr::vector descriptorBlocksIn, ccstd::pmr::unordered_map uniformBlocksIn, const allocator_type& alloc) noexcept // NOLINT +DescriptorSetLayoutData::DescriptorSetLayoutData(uint32_t slotIn, uint32_t capacityIn, ccstd::pmr::vector descriptorBlocksIn, ccstd::pmr::unordered_map uniformBlocksIn, PmrFlatMap bindingMapIn, const allocator_type& alloc) noexcept // NOLINT : slot(slotIn), capacity(capacityIn), descriptorBlocks(std::move(descriptorBlocksIn), alloc), - uniformBlocks(std::move(uniformBlocksIn), alloc) {} + uniformBlocks(std::move(uniformBlocksIn), alloc), + bindingMap(std::move(bindingMapIn), alloc) {} DescriptorSetLayoutData::DescriptorSetLayoutData(DescriptorSetLayoutData&& rhs, const allocator_type& alloc) : slot(rhs.slot), capacity(rhs.capacity), descriptorBlocks(std::move(rhs.descriptorBlocks), alloc), - uniformBlocks(std::move(rhs.uniformBlocks), alloc) {} + uniformBlocks(std::move(rhs.uniformBlocks), alloc), + bindingMap(std::move(rhs.bindingMap), alloc) {} DescriptorSetData::DescriptorSetData(const allocator_type& alloc) noexcept : descriptorSetLayoutData(alloc) {} diff --git a/native/cocos/renderer/pipeline/custom/LayoutGraphTypes.h b/native/cocos/renderer/pipeline/custom/LayoutGraphTypes.h index 3cecf5ff03..89e7dd6bce 100644 --- a/native/cocos/renderer/pipeline/custom/LayoutGraphTypes.h +++ b/native/cocos/renderer/pipeline/custom/LayoutGraphTypes.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -42,11 +41,11 @@ #include "cocos/renderer/gfx-base/GFXDescriptorSet.h" #include "cocos/renderer/gfx-base/GFXDescriptorSetLayout.h" #include "cocos/renderer/gfx-base/GFXPipelineLayout.h" -#include "cocos/renderer/pipeline/custom/GraphTypes.h" #include "cocos/renderer/pipeline/custom/LayoutGraphFwd.h" -#include "cocos/renderer/pipeline/custom/Map.h" #include "cocos/renderer/pipeline/custom/RenderCommonTypes.h" -#include "cocos/renderer/pipeline/custom/Set.h" +#include "cocos/renderer/pipeline/custom/details/GraphTypes.h" +#include "cocos/renderer/pipeline/custom/details/Map.h" +#include "cocos/renderer/pipeline/custom/details/Set.h" namespace cc { @@ -304,6 +303,11 @@ inline bool operator!=(const NameLocalID& lhs, const NameLocalID& rhs) noexcept return !(lhs == rhs); } +inline bool operator<(const NameLocalID& lhs, const NameLocalID& rhs) noexcept { + return std::forward_as_tuple(lhs.value) < + std::forward_as_tuple(rhs.value); +} + struct DescriptorData { DescriptorData() = default; DescriptorData(NameLocalID descriptorIDIn, gfx::Type typeIn, uint32_t countIn) noexcept @@ -351,7 +355,7 @@ struct DescriptorSetLayoutData { } DescriptorSetLayoutData(const allocator_type& alloc) noexcept; // NOLINT - DescriptorSetLayoutData(uint32_t slotIn, uint32_t capacityIn, ccstd::pmr::vector descriptorBlocksIn, ccstd::pmr::unordered_map uniformBlocksIn, const allocator_type& alloc) noexcept; + DescriptorSetLayoutData(uint32_t slotIn, uint32_t capacityIn, ccstd::pmr::vector descriptorBlocksIn, ccstd::pmr::unordered_map uniformBlocksIn, PmrFlatMap bindingMapIn, const allocator_type& alloc) noexcept; DescriptorSetLayoutData(DescriptorSetLayoutData&& rhs, const allocator_type& alloc); DescriptorSetLayoutData(DescriptorSetLayoutData&& rhs) noexcept = default; @@ -363,6 +367,7 @@ struct DescriptorSetLayoutData { uint32_t capacity{0}; ccstd::pmr::vector descriptorBlocks; ccstd::pmr::unordered_map uniformBlocks; + PmrFlatMap bindingMap; }; struct DescriptorSetData { diff --git a/native/cocos/renderer/pipeline/custom/LayoutGraphUtils.cpp b/native/cocos/renderer/pipeline/custom/LayoutGraphUtils.cpp new file mode 100644 index 0000000000..3530961ca6 --- /dev/null +++ b/native/cocos/renderer/pipeline/custom/LayoutGraphUtils.cpp @@ -0,0 +1,298 @@ +/**************************************************************************** + Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated engine source code (the "Software"), a limited, + worldwide, royalty-free, non-assignable, revocable and non-exclusive license + to use Cocos Creator solely to develop games on your target platforms. You shall + not use Cocos Creator software for developing other software or tools that's + used for developing games. You are not granted to publish, distribute, + sublicense, and/or sell copies of Cocos Creator. + + The software or tools in this License Agreement are licensed, not sold. + Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + +#include "LayoutGraphUtils.h" +#include +#include +#include "cocos/base/Log.h" +#include "cocos/base/std/container/string.h" +#include "cocos/renderer/gfx-base/GFXDef-common.h" +#include "cocos/renderer/pipeline/custom/LayoutGraphTypes.h" +#include "cocos/renderer/pipeline/custom/RenderCommonTypes.h" +#include "details/Map.h" + +namespace cc { + +namespace render { + +namespace { + +DescriptorBlockData& getDescriptorBlockData( + PmrFlatMap& map, + const DescriptorBlockIndex& index) { + auto iter = map.find(index); + if (iter != map.end()) { + return iter->second; + } + iter = map.emplace( + std::piecewise_construct, + std::forward_as_tuple(index), + std::forward_as_tuple()) + .first; + + return iter->second; +} + +} // namespace + +gfx::DescriptorType getGfxDescriptorType(DescriptorTypeOrder type) { + switch (type) { + case DescriptorTypeOrder::UNIFORM_BUFFER: + return gfx::DescriptorType::UNIFORM_BUFFER; + case DescriptorTypeOrder::DYNAMIC_UNIFORM_BUFFER: + return gfx::DescriptorType::DYNAMIC_UNIFORM_BUFFER; + case DescriptorTypeOrder::SAMPLER_TEXTURE: + return gfx::DescriptorType::SAMPLER_TEXTURE; + case DescriptorTypeOrder::SAMPLER: + return gfx::DescriptorType::SAMPLER; + case DescriptorTypeOrder::TEXTURE: + return gfx::DescriptorType::TEXTURE; + case DescriptorTypeOrder::STORAGE_BUFFER: + return gfx::DescriptorType::STORAGE_BUFFER; + case DescriptorTypeOrder::DYNAMIC_STORAGE_BUFFER: + return gfx::DescriptorType::DYNAMIC_STORAGE_BUFFER; + case DescriptorTypeOrder::STORAGE_IMAGE: + return gfx::DescriptorType::STORAGE_IMAGE; + case DescriptorTypeOrder::INPUT_ATTACHMENT: + return gfx::DescriptorType::INPUT_ATTACHMENT; + default: + CC_LOG_ERROR("DescriptorType not found"); + return gfx::DescriptorType::INPUT_ATTACHMENT; + } +} + +DescriptorTypeOrder getDescriptorTypeOrder(gfx::DescriptorType type) { + switch (type) { + case gfx::DescriptorType::UNIFORM_BUFFER: + return DescriptorTypeOrder::UNIFORM_BUFFER; + case gfx::DescriptorType::DYNAMIC_UNIFORM_BUFFER: + return DescriptorTypeOrder::DYNAMIC_UNIFORM_BUFFER; + case gfx::DescriptorType::SAMPLER_TEXTURE: + return DescriptorTypeOrder::SAMPLER_TEXTURE; + case gfx::DescriptorType::SAMPLER: + return DescriptorTypeOrder::SAMPLER; + case gfx::DescriptorType::TEXTURE: + return DescriptorTypeOrder::TEXTURE; + case gfx::DescriptorType::STORAGE_BUFFER: + return DescriptorTypeOrder::STORAGE_BUFFER; + case gfx::DescriptorType::DYNAMIC_STORAGE_BUFFER: + return DescriptorTypeOrder::DYNAMIC_STORAGE_BUFFER; + case gfx::DescriptorType::STORAGE_IMAGE: + return DescriptorTypeOrder::STORAGE_IMAGE; + case gfx::DescriptorType::INPUT_ATTACHMENT: + return DescriptorTypeOrder::INPUT_ATTACHMENT; + case gfx::DescriptorType::UNKNOWN: + default: + CC_LOG_ERROR("DescriptorTypeOrder not found"); + return DescriptorTypeOrder::INPUT_ATTACHMENT; + } +} + +NameLocalID getOrCreateDescriptorID(LayoutGraphData& lg, std::string_view name) { + auto iter = lg.attributeIndex.find(name); + if (iter != lg.attributeIndex.end()) { + return iter->second; + } + const auto id = static_cast(lg.valueNames.size()); + lg.attributeIndex.emplace(name, NameLocalID{id}); + lg.valueNames.emplace_back(name); + return NameLocalID{id}; +} + +void makeDescriptorSetLayoutData( + LayoutGraphData& lg, + UpdateFrequency rate, uint32_t set, const IDescriptorInfo& descriptors, + DescriptorSetLayoutData& data, + boost::container::pmr::memory_resource* scratch) { + PmrFlatMap map(scratch); + PmrFlatMap uniformBlocks(scratch); + for (const auto& cb : descriptors.blocks) { + auto& block = getDescriptorBlockData( + map, DescriptorBlockIndex{ + rate, + ParameterType::TABLE, + DescriptorTypeOrder::UNIFORM_BUFFER, + cb.stageFlags, + }); + + const auto nameID = getOrCreateDescriptorID(lg, cb.name); + block.descriptors.emplace_back(nameID, gfx::Type::UNKNOWN, 1); + // add uniform buffer + uniformBlocks.emplace( + std::piecewise_construct, + std::forward_as_tuple(nameID), + std::forward_as_tuple(gfx::UniformBlock{set, 0xFFFFFFFF, cb.name, cb.members, 1})); + } + for (const auto& samplerTexture : descriptors.samplerTextures) { + auto& block = getDescriptorBlockData( + map, DescriptorBlockIndex{ + rate, + ParameterType::TABLE, + DescriptorTypeOrder::SAMPLER_TEXTURE, + samplerTexture.stageFlags, + }); + const auto nameID = getOrCreateDescriptorID(lg, samplerTexture.name); + block.descriptors.emplace_back(nameID, samplerTexture.type, samplerTexture.count); + } + for (const auto& sampler : descriptors.samplers) { + auto& block = getDescriptorBlockData( + map, DescriptorBlockIndex{ + rate, + ParameterType::TABLE, + DescriptorTypeOrder::SAMPLER, + sampler.stageFlags, + }); + const auto nameID = getOrCreateDescriptorID(lg, sampler.name); + block.descriptors.emplace_back(nameID, gfx::Type::SAMPLER, sampler.count); + } + for (const auto& texture : descriptors.textures) { + auto& block = getDescriptorBlockData( + map, DescriptorBlockIndex{ + rate, + ParameterType::TABLE, + DescriptorTypeOrder::TEXTURE, + texture.stageFlags, + }); + const auto nameID = getOrCreateDescriptorID(lg, texture.name); + block.descriptors.emplace_back(nameID, texture.type, texture.count); + } + for (const auto& buffer : descriptors.buffers) { + auto& block = getDescriptorBlockData( + map, DescriptorBlockIndex{ + rate, + ParameterType::TABLE, + DescriptorTypeOrder::STORAGE_BUFFER, + buffer.stageFlags, + }); + const auto nameID = getOrCreateDescriptorID(lg, buffer.name); + block.descriptors.emplace_back(nameID, gfx::Type::UNKNOWN, 1); + } + for (const auto& image : descriptors.images) { + auto& block = getDescriptorBlockData( + map, DescriptorBlockIndex{ + rate, + ParameterType::TABLE, + DescriptorTypeOrder::STORAGE_IMAGE, + image.stageFlags, + }); + const auto nameID = getOrCreateDescriptorID(lg, image.name); + block.descriptors.emplace_back(nameID, image.type, image.count); + } + for (const auto& subpassInput : descriptors.subpassInputs) { + auto& block = getDescriptorBlockData( + map, DescriptorBlockIndex{ + rate, + ParameterType::TABLE, + DescriptorTypeOrder::INPUT_ATTACHMENT, + subpassInput.stageFlags, + }); + const auto nameID = getOrCreateDescriptorID(lg, subpassInput.name); + block.descriptors.emplace_back(nameID, gfx::Type::UNKNOWN, subpassInput.count); + } + + // calculate bindings + uint32_t capacity = 0; + for (auto&& [index, block] : map) { + block.offset = capacity; + for (const auto& d : block.descriptors) { + if (index.descriptorType == DescriptorTypeOrder::UNIFORM_BUFFER) { + // update uniform buffer binding + auto iter = uniformBlocks.find(d.descriptorID); + if (iter == uniformBlocks.end()) { + CC_LOG_ERROR("Uniform block not found"); + continue; + } + auto& ub = iter->second; + assert(ub.binding == 0xFFFFFFFF); + ub.binding = block.capacity; + // add uniform buffer to output + data.uniformBlocks.emplace(d.descriptorID, std::move(ub)); + } + // update block capacity + auto iter = data.bindingMap.find(d.descriptorID); + if (iter != data.bindingMap.end()) { + CC_LOG_ERROR("Duplicated descriptor name: %s", lg.valueNames[d.descriptorID.value].c_str()); + continue; + } + data.bindingMap.emplace(d.descriptorID, block.offset + block.capacity); + block.capacity += d.count; + } + // increate total capacity + capacity += block.capacity; + data.descriptorBlocks.emplace_back(std::move(block)); + } +} + +void initializeDescriptorSetLayoutInfo( + const DescriptorSetLayoutData& layoutData, + gfx::DescriptorSetLayoutInfo& info) { + for (const auto& block : layoutData.descriptorBlocks) { + auto slot = block.offset; + for (const auto& d : block.descriptors) { + auto& binding = info.bindings.emplace_back(); + binding.binding = slot; + binding.descriptorType = getGfxDescriptorType(block.type); + binding.count = d.count; + binding.stageFlags = block.visibility; + binding.immutableSamplers = {}; + + // update slot + slot += d.count; + } + } +} + +namespace { + +const ccstd::unordered_map DEFAULT_UNIFORM_COUNTS{ + {"cc_joints", pipeline::UBOSkinning::layout.members[0].count}, + {"cc_lightPos", pipeline::UBOForwardLight::LIGHTS_PER_PASS}, + {"cc_lightColor", pipeline::UBOForwardLight::LIGHTS_PER_PASS}, + {"cc_lightSizeRangeAngle", pipeline::UBOForwardLight::LIGHTS_PER_PASS}, + {"cc_lightDir", pipeline::UBOForwardLight::LIGHTS_PER_PASS}, +}; + +} // namespace + +uint32_t getSize(const ccstd::vector& blockMembers) { + uint32_t prevSize = 0; + for (const auto& m : blockMembers) { + if (m.count) { + prevSize += getTypeSize(m.type) * m.count; + continue; + } + auto iter = DEFAULT_UNIFORM_COUNTS.find(m.name); + if (iter != DEFAULT_UNIFORM_COUNTS.end()) { + prevSize += getTypeSize(m.type) * iter->second; + continue; + } + CC_LOG_ERROR("Invalid uniform count: %s", m.name.c_str()); + } + return prevSize; +} + +} // namespace render + +} // namespace cc diff --git a/native/cocos/renderer/pipeline/custom/LayoutGraphUtils.h b/native/cocos/renderer/pipeline/custom/LayoutGraphUtils.h new file mode 100644 index 0000000000..e893e1e108 --- /dev/null +++ b/native/cocos/renderer/pipeline/custom/LayoutGraphUtils.h @@ -0,0 +1,54 @@ +/**************************************************************************** + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + +#pragma once +#include +#include "cocos/core/assets/EffectAsset.h" +#include "cocos/renderer/pipeline/custom/LayoutGraphTypes.h" +#include "cocos/renderer/pipeline/custom/RenderCommonTypes.h" + +namespace cc { + +namespace render { + +gfx::DescriptorType getGfxDescriptorType(DescriptorTypeOrder type); +DescriptorTypeOrder getDescriptorTypeOrder(gfx::DescriptorType type); + +NameLocalID getOrCreateDescriptorID(LayoutGraphData& lg, std::string_view name); + +void makeDescriptorSetLayoutData( + LayoutGraphData& lg, + UpdateFrequency rate, uint32_t set, const IDescriptorInfo& descriptors, + DescriptorSetLayoutData& data, + boost::container::pmr::memory_resource* scratch); + +void initializeDescriptorSetLayoutInfo( + const DescriptorSetLayoutData& layoutData, + gfx::DescriptorSetLayoutInfo& info); + +uint32_t getSize(const ccstd::vector& blockMembers); + +} // namespace render + +} // namespace cc diff --git a/native/cocos/renderer/pipeline/custom/NativeDefaultScene.cpp b/native/cocos/renderer/pipeline/custom/NativeDefaultScene.cpp index 4ef8a46d82..219ef6690e 100644 --- a/native/cocos/renderer/pipeline/custom/NativeDefaultScene.cpp +++ b/native/cocos/renderer/pipeline/custom/NativeDefaultScene.cpp @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #include "NativePipelineTypes.h" namespace cc { @@ -16,7 +40,7 @@ void DefaultSceneVisitor::bindInputAssembler(gfx::InputAssembler *ia) {} void DefaultSceneVisitor::updateBuffer(gfx::Buffer *buff, const void *data, uint32_t size) {} void DefaultSceneVisitor::draw(const gfx::DrawInfo &info) {} -SceneTask* DefaultForwardLightingTransversal::transverse(SceneVisitor *visitor) const { +SceneTask *DefaultForwardLightingTransversal::transverse(SceneVisitor *visitor) const { std::ignore = visitor; return nullptr; } diff --git a/native/cocos/renderer/pipeline/custom/NativeExecutor.cpp b/native/cocos/renderer/pipeline/custom/NativeExecutor.cpp index 486ef012a5..63564d42b2 100644 --- a/native/cocos/renderer/pipeline/custom/NativeExecutor.cpp +++ b/native/cocos/renderer/pipeline/custom/NativeExecutor.cpp @@ -1,28 +1,47 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #include #include #include #include "FGDispatcherGraphs.h" -#include "GraphTypes.h" -#include "GraphView.h" -#include "GslUtils.h" #include "NativePipelineFwd.h" #include "NativePipelineTypes.h" -#include "Pmr.h" -#include "Range.h" -#include "RenderCommonFwd.h" #include "RenderGraphGraphs.h" #include "RenderGraphTypes.h" -#include "Set.h" #include "cocos/renderer/gfx-base/GFXBarrier.h" #include "cocos/renderer/gfx-base/GFXDef-common.h" #include "cocos/renderer/gfx-base/GFXDevice.h" #include "cocos/renderer/pipeline/InstancedBuffer.h" -#include "cocos/renderer/pipeline/LODModelsUtil.h" #include "cocos/scene/Model.h" #include "cocos/scene/Octree.h" #include "cocos/scene/Pass.h" #include "cocos/scene/RenderScene.h" #include "cocos/scene/Skybox.h" +#include "details/GraphView.h" +#include "details/GslUtils.h" +#include "details/Range.h" namespace cc { @@ -844,7 +863,7 @@ void octreeCulling( if (!model.isEnabled()) { continue; } - if (pipeline::LODModelsCachedUtils::isLODModelCulled(&model)) { + if (scene->isCulledByLod(&camera, &model)) { continue; } if (any(queue.sceneFlags & SceneFlags::SHADOW_CASTER) && model.isCastShadow()) { @@ -863,7 +882,7 @@ void octreeCulling( for (const auto& pModel : models) { const auto& model = *pModel; CC_EXPECTS(!isPointInstance(model)); - if (pipeline::LODModelsCachedUtils::isLODModelCulled(&model)) { + if (scene->isCulledByLod(&camera, &model)) { continue; } addRenderObject(camera, model, queue); @@ -882,7 +901,7 @@ void frustumCulling( continue; } // filter model by view visibility - if (pipeline::LODModelsCachedUtils::isLODModelCulled(&model)) { + if (scene->isCulledByLod(&camera, &model)) { continue; } const auto visibility = camera.getVisibility(); @@ -953,13 +972,11 @@ void buildRenderQueues( if (!camera->isCullingEnabled()) { continue; } - pipeline::LODModelsCachedUtils::updateCachedLODModels(scene, camera); if (octree && octree->isEnabled()) { octreeCulling(octree, scene, skyBox, *camera, queue); } else { frustumCulling(scene, *camera, queue); } - pipeline::LODModelsCachedUtils::clearCachedLODModels(); queue.sort(); @@ -974,7 +991,7 @@ void NativePipeline::executeRenderGraph(const RenderGraph& rg) { auto& ppl = *this; auto* scratch = &ppl.unsyncPool; - //CC_LOG_INFO(rg.print(scratch).c_str()); + // CC_LOG_INFO(rg.print(scratch).c_str()); RenderGraphContextCleaner contextCleaner(ppl.nativeContext); ResourceCleaner cleaner(ppl.resourceGraph); diff --git a/native/cocos/renderer/pipeline/custom/RenderInterfaceImpl.cpp b/native/cocos/renderer/pipeline/custom/NativeFactory.cpp similarity index 59% rename from native/cocos/renderer/pipeline/custom/RenderInterfaceImpl.cpp rename to native/cocos/renderer/pipeline/custom/NativeFactory.cpp index 8b1c6122ed..cfa0bd5d43 100644 --- a/native/cocos/renderer/pipeline/custom/RenderInterfaceImpl.cpp +++ b/native/cocos/renderer/pipeline/custom/NativeFactory.cpp @@ -23,14 +23,49 @@ THE SOFTWARE. ****************************************************************************/ +#include +#include "BinaryArchive.h" +#include "LayoutGraphSerialization.h" #include "NativePipelineTypes.h" #include "RenderInterfaceTypes.h" -#include "boost/container/pmr/global_resource.hpp" +#include "details/GslUtils.h" +#include "pipeline/custom/LayoutGraphTypes.h" +#include "pipeline/custom/details/Pmr.h" namespace cc { namespace render { +namespace { + +NativeRenderingModule* sRenderingModule = nullptr; + +} // namespace + +RenderingModule* Factory::init(gfx::Device* deviceIn, const ccstd::vector& bufferIn) { + std::ignore = deviceIn; + + std::shared_ptr ptr( + allocatePmrUniquePtr( + boost::container::pmr::get_default_resource())); + { + std::string buffer(bufferIn.begin(), bufferIn.end()); + std::istringstream iss(buffer, std::ios::binary); + BinaryInputArchive ar(iss, boost::container::pmr::get_default_resource()); + load(ar, ptr->layoutGraph); + } + + sRenderingModule = ccnew NativeRenderingModule(std::move(ptr)); + return sRenderingModule; +} + +void Factory::destroy(RenderingModule* renderingModule) noexcept { + auto* ptr = dynamic_cast(renderingModule); + if (ptr) { + ptr->programLibrary.reset(); + } +} + Pipeline* Factory::createPipeline() { return ccnew NativePipeline(boost::container::pmr::get_default_resource()); } diff --git a/native/cocos/renderer/pipeline/custom/LayoutGraphJsb.h b/native/cocos/renderer/pipeline/custom/NativeFwd.h similarity index 56% rename from native/cocos/renderer/pipeline/custom/LayoutGraphJsb.h rename to native/cocos/renderer/pipeline/custom/NativeFwd.h index f61ae9043f..f4991e9cfa 100644 --- a/native/cocos/renderer/pipeline/custom/LayoutGraphJsb.h +++ b/native/cocos/renderer/pipeline/custom/NativeFwd.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -30,8 +29,21 @@ */ // clang-format off #pragma once -#include "cocos/bindings/manual/jsb_conversions.h" +#include "cocos/base/std/variant.h" +#include "cocos/renderer/core/ProgramLib.h" #include "cocos/renderer/pipeline/custom/LayoutGraphFwd.h" -#include "cocos/renderer/pipeline/custom/RenderCommonJsb.h" +#include "cocos/renderer/pipeline/custom/RenderInterfaceFwd.h" + +namespace cc { + +namespace render { + +struct ProgramInfo; +struct ProgramHost; +struct ProgramGroup; + +} // namespace render + +} // namespace cc // clang-format on diff --git a/native/cocos/renderer/pipeline/custom/NativeLayoutGraphImpl.cpp b/native/cocos/renderer/pipeline/custom/NativeLayoutGraph.cpp similarity index 92% rename from native/cocos/renderer/pipeline/custom/NativeLayoutGraphImpl.cpp rename to native/cocos/renderer/pipeline/custom/NativeLayoutGraph.cpp index 82b382f1be..26c5c95a5c 100644 --- a/native/cocos/renderer/pipeline/custom/NativeLayoutGraphImpl.cpp +++ b/native/cocos/renderer/pipeline/custom/NativeLayoutGraph.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -23,17 +22,16 @@ THE SOFTWARE. ****************************************************************************/ -#include "DebugUtils.h" -#include "GslUtils.h" #include "LayoutGraphGraphs.h" #include "LayoutGraphNames.h" #include "LayoutGraphTypes.h" #include "NativePipelineGraphs.h" -#include "Pmr.h" -#include "Range.h" #include "RenderCommonNames.h" #include "cocos/renderer/gfx-base/GFXDevice.h" - +#include "details/DebugUtils.h" +#include "details/GslUtils.h" +#include "details/Pmr.h" +#include "details/Range.h" namespace cc { @@ -87,7 +85,7 @@ void NativeLayoutGraphBuilder::addDescriptorBlock( for (const auto &pairD : block.descriptors) { const auto &name = pairD.first; const auto &d = pairD.second; - auto iter = g.attributeIndex.find(std::string_view(name)); + auto iter = g.attributeIndex.find(std::string_view{name}); if (iter == g.attributeIndex.end()) { auto attrID = gsl::narrow_cast(g.valueNames.size()); g.valueNames.emplace_back(name); @@ -109,7 +107,7 @@ void NativeLayoutGraphBuilder::addUniformBlock(uint32_t nodeID, const Descriptor auto &g = *data; auto &ppl = get(LayoutGraphData::Layout, g, nodeID); auto &layout = ppl.descriptorSets[index.updateFrequency].descriptorSetLayoutData; - auto iter = g.attributeIndex.find(std::string_view(name)); + auto iter = g.attributeIndex.find(std::string_view{name}); if (iter == g.attributeIndex.end()) { auto attrID = gsl::narrow_cast(g.valueNames.size()); g.valueNames.emplace_back(name); diff --git a/native/cocos/renderer/pipeline/custom/NativePipelineImpl.cpp b/native/cocos/renderer/pipeline/custom/NativePipeline.cpp similarity index 95% rename from native/cocos/renderer/pipeline/custom/NativePipelineImpl.cpp rename to native/cocos/renderer/pipeline/custom/NativePipeline.cpp index ca9d58fe92..00a7fc84fd 100644 --- a/native/cocos/renderer/pipeline/custom/NativePipelineImpl.cpp +++ b/native/cocos/renderer/pipeline/custom/NativePipeline.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -30,16 +29,12 @@ #include #include #include -#include "DebugUtils.h" -#include "GslUtils.h" #include "LayoutGraphFwd.h" #include "LayoutGraphGraphs.h" #include "LayoutGraphNames.h" #include "LayoutGraphTypes.h" #include "NativePipelineFwd.h" #include "NativePipelineTypes.h" -#include "Pmr.h" -#include "Range.h" #include "RenderCommonTypes.h" #include "RenderGraphGraphs.h" #include "RenderGraphTypes.h" @@ -62,6 +57,8 @@ #include "cocos/renderer/pipeline/RenderPipeline.h" #include "cocos/scene/RenderScene.h" #include "cocos/scene/RenderWindow.h" +#include "details/DebugUtils.h" +#include "details/GslUtils.h" #if CC_USE_DEBUG_RENDERER #include "profiler/DebugRenderer.h" @@ -343,7 +340,7 @@ LayoutGraphBuilder *NativePipeline::getLayoutGraphBuilder() { } gfx::DescriptorSetLayout *NativePipeline::getDescriptorSetLayout(const ccstd::string &shaderName, UpdateFrequency freq) { - auto iter = layoutGraph.shaderLayoutIndex.find(std::string_view(shaderName)); + auto iter = layoutGraph.shaderLayoutIndex.find(std::string_view{shaderName}); if (iter != layoutGraph.shaderLayoutIndex.end()) { const auto &layouts = get(LayoutGraphData::Layout, layoutGraph, iter->second).descriptorSets; auto iter2 = layouts.find(freq); diff --git a/native/cocos/renderer/pipeline/custom/NativePipelineFwd.h b/native/cocos/renderer/pipeline/custom/NativePipelineFwd.h index dc904a47be..6707f4da6e 100644 --- a/native/cocos/renderer/pipeline/custom/NativePipelineFwd.h +++ b/native/cocos/renderer/pipeline/custom/NativePipelineFwd.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -32,9 +31,9 @@ #pragma once #include "cocos/base/std/variant.h" #include "cocos/renderer/pipeline/InstancedBuffer.h" -#include "cocos/renderer/pipeline/custom/LayoutGraphFwd.h" +#include "cocos/renderer/pipeline/custom/NativeFwd.h" +#include "cocos/renderer/pipeline/custom/PrivateFwd.h" #include "cocos/renderer/pipeline/custom/RenderGraphFwd.h" -#include "cocos/renderer/pipeline/custom/RenderInterfaceFwd.h" namespace cc { @@ -58,6 +57,9 @@ class DefaultForwardLightingTransversal; struct ResourceGroup; struct NativeRenderContext; class NativePipeline; +class NativeProgramProxy; +class NativeProgramLibrary; +class NativeRenderingModule; } // namespace render diff --git a/native/cocos/renderer/pipeline/custom/NativePipelineGraphs.h b/native/cocos/renderer/pipeline/custom/NativePipelineGraphs.h index ff4380695d..3e90228af4 100644 --- a/native/cocos/renderer/pipeline/custom/NativePipelineGraphs.h +++ b/native/cocos/renderer/pipeline/custom/NativePipelineGraphs.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -32,10 +31,9 @@ #pragma once #include #include -#include "cocos/renderer/pipeline/custom/GraphImpl.h" -#include "cocos/renderer/pipeline/custom/GslUtils.h" #include "cocos/renderer/pipeline/custom/NativePipelineTypes.h" -#include "cocos/renderer/pipeline/custom/Overload.h" -#include "cocos/renderer/pipeline/custom/PathUtils.h" +#include "cocos/renderer/pipeline/custom/details/GraphImpl.h" +#include "cocos/renderer/pipeline/custom/details/Overload.h" +#include "cocos/renderer/pipeline/custom/details/PathUtils.h" // clang-format on diff --git a/native/cocos/renderer/pipeline/custom/NativePipelineTypes.cpp b/native/cocos/renderer/pipeline/custom/NativePipelineTypes.cpp index e0079793ea..20afedbea8 100644 --- a/native/cocos/renderer/pipeline/custom/NativePipelineTypes.cpp +++ b/native/cocos/renderer/pipeline/custom/NativePipelineTypes.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -108,6 +107,10 @@ NativeRenderContext::NativeRenderContext(const allocator_type& alloc) noexcept : renderPasses(alloc), resourceGroups(alloc) {} +NativeProgramLibrary::NativeProgramLibrary(const allocator_type& alloc) noexcept +: layoutGraph(alloc), + phases(alloc) {} + } // namespace render } // namespace cc diff --git a/native/cocos/renderer/pipeline/custom/NativePipelineTypes.h b/native/cocos/renderer/pipeline/custom/NativePipelineTypes.h index be9a96db4f..85abd8eca1 100644 --- a/native/cocos/renderer/pipeline/custom/NativePipelineTypes.h +++ b/native/cocos/renderer/pipeline/custom/NativePipelineTypes.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -37,11 +36,12 @@ #include "cocos/renderer/gfx-base/GFXRenderPass.h" #include "cocos/renderer/pipeline/GlobalDescriptorSetManager.h" #include "cocos/renderer/pipeline/InstancedBuffer.h" -#include "cocos/renderer/pipeline/custom/LayoutGraphTypes.h" #include "cocos/renderer/pipeline/custom/NativePipelineFwd.h" +#include "cocos/renderer/pipeline/custom/NativeTypes.h" +#include "cocos/renderer/pipeline/custom/PrivateTypes.h" #include "cocos/renderer/pipeline/custom/RenderGraphTypes.h" -#include "cocos/renderer/pipeline/custom/RenderInterfaceTypes.h" -#include "cocos/renderer/pipeline/custom/Set.h" +#include "cocos/renderer/pipeline/custom/details/Map.h" +#include "cocos/renderer/pipeline/custom/details/Set.h" namespace cc { @@ -131,6 +131,7 @@ public: void addComputeView(const ccstd::string &name, const ComputeView &view) override; RasterQueueBuilder *addQueue(QueueHint hint) override; void setViewport(const gfx::Viewport &viewport) override; + void setVersion(const ccstd::string &name, uint64_t version) override; RenderGraph* renderGraph{nullptr}; const LayoutGraphData* layoutGraph{nullptr}; @@ -502,6 +503,66 @@ public: RenderGraph renderGraph; }; +class NativeProgramProxy final : public ProgramProxy { +public: + NativeProgramProxy() = default; + NativeProgramProxy(IntrusivePtr shaderIn) // NOLINT + : shader(std::move(shaderIn)) {} + + const ccstd::string &getName() const noexcept override; + gfx::Shader *getShader() const noexcept override; + + IntrusivePtr shader; +}; + +class NativeProgramLibrary final : public ProgramLibrary { +public: + using allocator_type = boost::container::pmr::polymorphic_allocator; + allocator_type get_allocator() const noexcept { // NOLINT + return {layoutGraph.get_allocator().resource()}; + } + + NativeProgramLibrary(const allocator_type& alloc) noexcept; // NOLINT + + void addEffect(EffectAsset *effectAsset) override; + void precompileEffect(gfx::Device *device, EffectAsset *effectAsset) override; + ccstd::string getKey(uint32_t phaseID, const ccstd::pmr::string &programName, const MacroRecord &defines) const override; + const gfx::PipelineLayout &getPipelineLayout(gfx::Device *device, uint32_t phaseID, const ccstd::pmr::string &programName) override; + const gfx::DescriptorSetLayout &getMaterialDescriptorSetLayout(gfx::Device *device, uint32_t phaseID, const ccstd::pmr::string &programName) override; + const gfx::DescriptorSetLayout &getLocalDescriptorSetLayout(gfx::Device *device, uint32_t phaseID, const ccstd::pmr::string &programName) override; + const IProgramInfo &getProgramInfo(uint32_t phaseID, const ccstd::pmr::string &programName) const override; + const gfx::ShaderInfo &getShaderInfo(uint32_t phaseID, const ccstd::pmr::string &programName) const override; + ProgramProxy *getProgramVariant(gfx::Device *device, uint32_t phaseID, const ccstd::string &name, const MacroRecord &defines, const ccstd::pmr::string *key) const override; + const ccstd::pmr::vector &getBlockSizes(uint32_t phaseID, const ccstd::pmr::string &programName) const override; + const Record &getHandleMap(uint32_t phaseID, const ccstd::pmr::string &programName) const override; + uint32_t getProgramID(uint32_t phaseID, const ccstd::pmr::string &programName) override; + uint32_t getDescriptorNameID(const ccstd::pmr::string &name) override; + const ccstd::pmr::string &getDescriptorName(uint32_t nameID) override; + + void init(gfx::Device* device); + void destroy(); + + LayoutGraphData layoutGraph; + PmrFlatMap phases; + boost::container::pmr::unsynchronized_pool_resource unsycPool; + bool mergeHighFrequency{false}; + bool fixedLocal{true}; + IntrusivePtr emptyDescriptorSetLayout; + IntrusivePtr emptyPipelineLayout; +}; + +class NativeRenderingModule final : public RenderingModule { +public: + NativeRenderingModule() = default; + NativeRenderingModule(std::shared_ptr programLibraryIn) noexcept // NOLINT + : programLibrary(std::move(programLibraryIn)) {} + + uint32_t getPassID(const ccstd::string &name) const override; + uint32_t getPhaseID(uint32_t passID, const ccstd::string &name) const override; + + std::shared_ptr programLibrary; +}; + } // namespace render } // namespace cc diff --git a/native/cocos/renderer/pipeline/custom/NativeProgramLibrary.cpp b/native/cocos/renderer/pipeline/custom/NativeProgramLibrary.cpp new file mode 100644 index 0000000000..732c30805f --- /dev/null +++ b/native/cocos/renderer/pipeline/custom/NativeProgramLibrary.cpp @@ -0,0 +1,1048 @@ +/**************************************************************************** + Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated engine source code (the "Software"), a limited, + worldwide, royalty-free, non-assignable, revocable and non-exclusive license + to use Cocos Creator solely to develop games on your target platforms. You shall + not use Cocos Creator software for developing other software or tools that's + used for developing games. You are not granted to publish, distribute, + sublicense, and/or sell copies of Cocos Creator. + + The software or tools in this License Agreement are licensed, not sold. + Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + +#include +#include +#include +#include +#include "LayoutGraphUtils.h" +#include "NativePipelineTypes.h" +#include "ProgramLib.h" +#include "ProgramUtils.h" +#include "cocos/base/Log.h" +#include "cocos/core/assets/EffectAsset.h" +#include "cocos/renderer/core/ProgramUtils.h" +#include "cocos/renderer/gfx-base/GFXDef-common.h" +#include "cocos/renderer/pipeline/Define.h" +#include "cocos/renderer/pipeline/custom/LayoutGraphGraphs.h" +#include "cocos/renderer/pipeline/custom/LayoutGraphTypes.h" +#include "gfx-base/GFXDescriptorSetLayout.h" +#include "pipeline/custom/PrivateTypes.h" +#include "pipeline/custom/details/GslUtils.h" + +namespace cc { + +namespace render { + +const ccstd::string &NativeProgramProxy::getName() const noexcept { + return shader->getName(); +} + +gfx::Shader *NativeProgramProxy::getShader() const noexcept { + return shader; +} + +namespace { + +constexpr uint32_t SET_INDEX[4] = {2, 1, 3, 0}; + +constexpr uint32_t setIndex(UpdateFrequency rate) { + return SET_INDEX[static_cast(rate)]; +} + +constexpr auto INVALID_ID = LayoutGraphData::null_vertex(); + +std::tuple +getEffectShader( + const LayoutGraphData &lg, + const EffectAsset &effect, const IPassInfo &pass) { + const auto &programName = pass.program; + auto passID = INVALID_ID; + if (pass.pass) { + passID = locate(INVALID_ID, *pass.pass, lg); + } else { + passID = locate(INVALID_ID, "default", lg); + } + if (passID == INVALID_ID) { + CC_LOG_ERROR("Invalid render pass"); + return {INVALID_ID, INVALID_ID, nullptr, INVALID_ID}; + } + + auto phaseID = INVALID_ID; + if (pass.phase) { + phaseID = locate(passID, *pass.phase, lg); + } else { + phaseID = locate(passID, "default", lg); + } + if (phaseID == INVALID_ID) { + CC_LOG_ERROR("Invalid render phase"); + return {INVALID_ID, INVALID_ID, nullptr, INVALID_ID}; + } + + const IShaderInfo *srcShaderInfo = nullptr; + auto shaderID = INVALID_ID; + for (uint32_t i = 0; i != effect._shaders.size(); ++i) { + const auto &shader = effect._shaders[i]; + if (shader.name == programName) { + srcShaderInfo = &shader; + shaderID = i; + break; + } + } + return {passID, phaseID, srcShaderInfo, shaderID}; +} + +int validateShaderInfo(const IShaderInfo &srcShaderInfo) { + if (srcShaderInfo.descriptors.empty()) { + CC_LOG_ERROR("No descriptors in shaderInfo"); + return 1; + } + return 0; +} + +IProgramInfo makeProgramInfo(const ccstd::string &effectName, const IShaderInfo &shader) { + IProgramInfo programInfo; + programInfo.copyFrom(shader); + programInfo.effectName = effectName; + + populateMacros(programInfo); + + return programInfo; +} + +std::tuple getDescriptorNameAndType( + const pipeline::DescriptorSetLayoutInfos &source, + uint32_t binding) { + for (const auto &[name, block] : source.blocks) { + if (block.binding == binding) { + return {name, gfx::Type::UNKNOWN}; + } + } + for (const auto &[name, texture] : source.samplers) { + if (texture.binding == binding) { + return {name, texture.type}; + } + } + for (const auto &[name, image] : source.storeImages) { + if (image.binding == binding) { + return {name, image.type}; + } + } + return {"", gfx::Type::UNKNOWN}; +} + +void makeLocalDescriptorSetLayoutData( + LayoutGraphData &lg, + const pipeline::DescriptorSetLayoutInfos &source, + DescriptorSetLayoutData &data) { + for (const auto &b : source.bindings) { + const auto [name, type] = getDescriptorNameAndType(source, b.binding); + const auto nameID = getOrCreateDescriptorID(lg, name); + const auto order = getDescriptorTypeOrder(b.descriptorType); + { + auto &block = data.descriptorBlocks.emplace_back(order, b.stageFlags, b.count); + block.offset = b.binding; + block.descriptors.emplace_back(nameID, type, b.count); + } + { + auto iter = data.bindingMap.find(nameID); + if (iter != data.bindingMap.end()) { + CC_LOG_ERROR("Duplicate descriptor name: %s", name.data()); + } + data.bindingMap.emplace(nameID, b.binding); + } + const auto &v = source.blocks.at(ccstd::string(name)); + data.uniformBlocks.emplace(nameID, v); + } +} + +ShaderProgramData &buildProgramData( + const ccstd::string &programName, + const IShaderInfo &srcShaderInfo, + LayoutGraphData &lg, + RenderPhaseData &phase, + bool fixedLocal, + boost::container::pmr::memory_resource *scratch) { + // add shader + auto shaderID = static_cast(phase.shaderPrograms.size()); + phase.shaderIndex.emplace(programName, shaderID); + auto &programData = phase.shaderPrograms.emplace_back(); + + // build per-batch + { + auto res = programData.layout.descriptorSets.emplace( + std::piecewise_construct, + std::forward_as_tuple(UpdateFrequency::PER_BATCH), + std::forward_as_tuple()); + CC_ENSURES(res.second); + + auto &setData = res.first->second; + + makeDescriptorSetLayoutData( + lg, UpdateFrequency::PER_BATCH, + setIndex(UpdateFrequency::PER_BATCH), + srcShaderInfo.descriptors[static_cast(UpdateFrequency::PER_BATCH)], + setData.descriptorSetLayoutData, scratch); + initializeDescriptorSetLayoutInfo( + setData.descriptorSetLayoutData, setData.descriptorSetLayoutInfo); + } + + // build per-instance + if (fixedLocal) { + auto res = programData.layout.descriptorSets.emplace( + std::piecewise_construct, + std::forward_as_tuple(UpdateFrequency::PER_INSTANCE), + std::forward_as_tuple()); + CC_ENSURES(res.second); + auto &setData = res.first->second; + auto &perInstance = setData.descriptorSetLayoutData; + makeLocalDescriptorSetLayoutData(lg, pipeline::localDescriptorSetLayout, perInstance); + initializeDescriptorSetLayoutInfo( + setData.descriptorSetLayoutData, + setData.descriptorSetLayoutInfo); + if (pipeline::localDescriptorSetLayout.bindings.size() != setData.descriptorSetLayoutInfo.bindings.size()) { + CC_LOG_ERROR("Mismatched local descriptor set layout"); + } else { + for (uint32_t i = 0; i != pipeline::localDescriptorSetLayout.bindings.size(); ++i) { + const auto &a = pipeline::localDescriptorSetLayout.bindings[i]; + const auto &b = setData.descriptorSetLayoutInfo.bindings[i]; + if (a.binding != b.binding || + a.descriptorType != b.descriptorType || + a.count != b.count || + a.stageFlags != b.stageFlags) { + CC_LOG_ERROR("Mismatched local descriptor set layout"); + } + } + } + } else { + auto res = programData.layout.descriptorSets.emplace( + std::piecewise_construct, + std::forward_as_tuple(UpdateFrequency::PER_INSTANCE), + std::forward_as_tuple()); + CC_ENSURES(res.second); + auto &setData = res.first->second; + makeDescriptorSetLayoutData( + lg, UpdateFrequency::PER_INSTANCE, + setIndex(UpdateFrequency::PER_INSTANCE), + srcShaderInfo.descriptors[static_cast(UpdateFrequency::PER_INSTANCE)], + setData.descriptorSetLayoutData, scratch); + initializeDescriptorSetLayoutInfo( + setData.descriptorSetLayoutData, + setData.descriptorSetLayoutInfo); + } + + return programData; +} + +void populateMergedShaderInfo( + const ccstd::pmr::vector &valueNames, + const DescriptorSetLayoutData &layout, uint32_t set, + gfx::ShaderInfo &shaderInfo, ccstd::pmr::vector &blockSizes) { + for (const auto &descriptorBlock : layout.descriptorBlocks) { + auto binding = descriptorBlock.offset; + switch (descriptorBlock.type) { + case DescriptorTypeOrder::UNIFORM_BUFFER: + for (const auto &block : descriptorBlock.descriptors) { + auto iter = layout.uniformBlocks.find(block.descriptorID); + + if (iter == layout.uniformBlocks.end()) { + CC_LOG_ERROR("Failed to find uniform block in layout"); + continue; + } + const auto &uniformBlock = iter->second; + blockSizes.emplace_back(getSize(uniformBlock.members)); + shaderInfo.blocks.emplace_back( + gfx::UniformBlock{ + set, + binding, + ccstd::string(valueNames.at(block.descriptorID.value)), + uniformBlock.members, + 1, + } // count is always 1 for UniformBlock + ); + ++binding; + } + if (binding != descriptorBlock.offset + descriptorBlock.capacity) { + CC_LOG_ERROR("Uniform buffer binding mismatch for set"); + } + break; + case DescriptorTypeOrder::DYNAMIC_UNIFORM_BUFFER: + // not implemented yet + break; + case DescriptorTypeOrder::SAMPLER_TEXTURE: + for (const auto &tex : descriptorBlock.descriptors) { + shaderInfo.samplerTextures.emplace_back(gfx::UniformSamplerTexture{ + set, + binding, + ccstd::string(valueNames.at(tex.descriptorID.value)), + tex.type, + tex.count, + }); + ++binding; + } + break; + case DescriptorTypeOrder::SAMPLER: + for (const auto &sampler : descriptorBlock.descriptors) { + shaderInfo.samplers.emplace_back(gfx::UniformSampler{ + set, + binding, + ccstd::string(valueNames.at(sampler.descriptorID.value)), + sampler.count, + }); + ++binding; + } + break; + case DescriptorTypeOrder::TEXTURE: + for (const auto &texture : descriptorBlock.descriptors) { + shaderInfo.textures.emplace_back(gfx::UniformTexture{ + set, + binding, + ccstd::string(valueNames.at(texture.descriptorID.value)), + texture.type, + texture.count, + }); + ++binding; + } + break; + case DescriptorTypeOrder::STORAGE_BUFFER: + for (const auto &buffer : descriptorBlock.descriptors) { + shaderInfo.buffers.emplace_back(gfx::UniformStorageBuffer{ + set, + binding, + ccstd::string(valueNames.at(buffer.descriptorID.value)), + 1, + gfx::MemoryAccessBit::READ_WRITE, /*buffer.memoryAccess*/ + }); + // effect compiler guarantees buffer count = 1 + ++binding; + } + break; + case DescriptorTypeOrder::DYNAMIC_STORAGE_BUFFER: + // not implemented yet + break; + case DescriptorTypeOrder::STORAGE_IMAGE: + for (const auto &image : descriptorBlock.descriptors) { + shaderInfo.images.emplace_back(gfx::UniformStorageImage{ + set, + binding, + ccstd::string(valueNames.at(image.descriptorID.value)), + image.type, + image.count, + gfx::MemoryAccessBit::READ_WRITE, /*image.memoryAccess*/ + }); + ++binding; + } + break; + case DescriptorTypeOrder::INPUT_ATTACHMENT: + for (const auto &subpassInput : descriptorBlock.descriptors) { + shaderInfo.subpassInputs.emplace_back(gfx::UniformInputAttachment{ + set, + binding, + ccstd::string(valueNames.at(subpassInput.descriptorID.value)), + subpassInput.count, + }); + ++binding; + } + break; + default: + CC_LOG_ERROR("Unknown descriptor type"); + } + } +} + +// add descriptor to size-reserved descriptor set +void populateGroupedShaderInfo( + const DescriptorSetLayoutData &layout, + const IDescriptorInfo &descriptorInfo, uint32_t set, + gfx::ShaderInfo &shaderInfo, + ccstd::pmr::vector &blockSizes) { + for (const auto &descriptorBlock : layout.descriptorBlocks) { + const auto visibility = descriptorBlock.visibility; + auto binding = descriptorBlock.offset; + + switch (descriptorBlock.type) { + case DescriptorTypeOrder::UNIFORM_BUFFER: + for (const auto &block : descriptorInfo.blocks) { + if (block.stageFlags != visibility) { + continue; + } + blockSizes.emplace_back(getSize(block.members)); + shaderInfo.blocks.emplace_back( + gfx::UniformBlock{ + set, + binding, + block.name, + block.members, + 1, + } // count is always 1 for UniformBlock + ); + ++binding; + } + break; + case DescriptorTypeOrder::DYNAMIC_UNIFORM_BUFFER: + // not implemented yet + break; + case DescriptorTypeOrder::SAMPLER_TEXTURE: + for (const auto &tex : descriptorInfo.samplerTextures) { + if (tex.stageFlags != visibility) { + continue; + } + shaderInfo.samplerTextures.emplace_back(gfx::UniformSamplerTexture{ + set, + binding, + tex.name, + tex.type, + tex.count, + }); + ++binding; + } + break; + case DescriptorTypeOrder::SAMPLER: + for (const auto &sampler : descriptorInfo.samplers) { + if (sampler.stageFlags != visibility) { + continue; + } + shaderInfo.samplers.emplace_back(gfx::UniformSampler{ + set, + binding, + sampler.name, + sampler.count, + }); + ++binding; + } + break; + case DescriptorTypeOrder::TEXTURE: + for (const auto &texture : descriptorInfo.textures) { + if (texture.stageFlags != visibility) { + continue; + } + shaderInfo.textures.emplace_back(gfx::UniformTexture{ + set, + binding, + texture.name, + texture.type, + texture.count, + }); + ++binding; + } + break; + case DescriptorTypeOrder::STORAGE_BUFFER: + for (const auto &buffer : descriptorInfo.buffers) { + if (buffer.stageFlags != visibility) { + continue; + } + shaderInfo.buffers.emplace_back(gfx::UniformStorageBuffer{ + set, + binding, + buffer.name, + 1, + buffer.memoryAccess, + }); // effect compiler guarantees buffer count = 1 + ++binding; + } + break; + case DescriptorTypeOrder::DYNAMIC_STORAGE_BUFFER: + // not implemented yet + break; + case DescriptorTypeOrder::STORAGE_IMAGE: + for (const auto &image : descriptorInfo.images) { + if (image.stageFlags != visibility) { + continue; + } + shaderInfo.images.emplace_back(gfx::UniformStorageImage{ + set, + binding, + image.name, + image.type, + image.count, + image.memoryAccess, + }); + ++binding; + } + break; + case DescriptorTypeOrder::INPUT_ATTACHMENT: + for (const auto &subpassInput : descriptorInfo.subpassInputs) { + if (subpassInput.stageFlags != visibility) { + continue; + } + shaderInfo.subpassInputs.emplace_back(gfx::UniformInputAttachment{ + set, + subpassInput.binding, + subpassInput.name, + subpassInput.count, + }); + ++binding; + } + break; + default: + CC_LOG_ERROR("Unknown descriptor type"); + } + } +} + +// add fixed local descriptors to gfx.ShaderInfo +void populateLocalShaderInfo( + const IDescriptorInfo &target, + const pipeline::DescriptorSetLayoutInfos &source, + gfx::ShaderInfo &shaderInfo, ccstd::pmr::vector &blockSizes) { + const auto set = setIndex(UpdateFrequency::PER_INSTANCE); + for (const auto &block : target.blocks) { + auto blockIter = source.blocks.find(block.name); + if (blockIter == source.blocks.end()) { + continue; + } + const auto &info = blockIter->second; + + const gfx::DescriptorSetLayoutBinding *pBinding = nullptr; + for (const auto &b : source.bindings) { + if (b.binding == info.binding) { + pBinding = &b; + } + } + if (!pBinding || !(pBinding->descriptorType & gfx::DESCRIPTOR_BUFFER_TYPE)) { + CC_LOG_ERROR("builtin UBO not available !"); + continue; + } + + const auto &binding = *pBinding; + blockSizes.emplace_back(getSize(block.members)); + shaderInfo.blocks.emplace_back( + gfx::UniformBlock{ + set, + binding.binding, + block.name, + block.members, + 1, + }); // effect compiler guarantees block count = 1 + } + for (const auto &samplerTexture : target.samplerTextures) { + auto iter = source.samplers.find(samplerTexture.name); + if (iter == source.samplers.end()) { + CC_LOG_ERROR("builtin sampler not available !"); + continue; + } + const auto &info = iter->second; + + const gfx::DescriptorSetLayoutBinding *pBinding = nullptr; + for (const auto &b : source.bindings) { + if (b.binding == info.binding) { + pBinding = &b; + } + } + if (!pBinding || !(pBinding->descriptorType & gfx::DESCRIPTOR_SAMPLER_TYPE)) { + CC_LOG_ERROR("builtin sampler not available !"); + continue; + } + const auto &binding = *pBinding; + shaderInfo.samplerTextures.emplace_back(gfx::UniformSamplerTexture{ + set, + binding.binding, + samplerTexture.name, + samplerTexture.type, + samplerTexture.count, + }); + } +} + +void makeShaderInfo( + LayoutGraphData &lg, + const PipelineLayoutData &passLayouts, // NOLINT(bugprone-easily-swappable-parameters) + const PipelineLayoutData &phaseLayouts, + const IShaderInfo &srcShaderInfo, + const ShaderProgramData *programData, + bool fixedLocal, + gfx::ShaderInfo &shaderInfo, + ccstd::pmr::vector &blockSizes) { + { // pass + auto iter = passLayouts.descriptorSets.find(UpdateFrequency::PER_PASS); + if (iter != passLayouts.descriptorSets.end()) { + populateMergedShaderInfo( + lg.valueNames, iter->second.descriptorSetLayoutData, + setIndex(UpdateFrequency::PER_PASS), + shaderInfo, blockSizes); + } + } + { // phase + auto iter = phaseLayouts.descriptorSets.find(UpdateFrequency::PER_PHASE); + if (iter != passLayouts.descriptorSets.end()) { + populateMergedShaderInfo( + lg.valueNames, iter->second.descriptorSetLayoutData, + setIndex(UpdateFrequency::PER_PHASE), + shaderInfo, blockSizes); + } + } + { // batch + const auto &batchInfo = srcShaderInfo.descriptors.at( + static_cast(UpdateFrequency::PER_BATCH)); + if (programData) { + auto iter = programData->layout.descriptorSets.find(UpdateFrequency::PER_BATCH); + if (iter != programData->layout.descriptorSets.end()) { + populateMergedShaderInfo( + lg.valueNames, iter->second.descriptorSetLayoutData, + setIndex(UpdateFrequency::PER_BATCH), + shaderInfo, blockSizes); + } + } else { + auto iter = phaseLayouts.descriptorSets.find(UpdateFrequency::PER_BATCH); + if (iter != phaseLayouts.descriptorSets.end()) { + populateGroupedShaderInfo( + iter->second.descriptorSetLayoutData, + batchInfo, setIndex(UpdateFrequency::PER_BATCH), + shaderInfo, blockSizes); + } + } + } + { // instance + const auto &instanceInfo = srcShaderInfo.descriptors.at( + static_cast(UpdateFrequency::PER_INSTANCE)); + if (programData) { + if (fixedLocal) { + populateLocalShaderInfo( + instanceInfo, + pipeline::localDescriptorSetLayout, shaderInfo, blockSizes); + } else { + auto iter = programData->layout.descriptorSets.find( + UpdateFrequency::PER_INSTANCE); + if (iter != programData->layout.descriptorSets.end()) { + populateMergedShaderInfo( + lg.valueNames, iter->second.descriptorSetLayoutData, + setIndex(UpdateFrequency::PER_INSTANCE), + shaderInfo, blockSizes); + } + } + } else { + auto iter = phaseLayouts.descriptorSets.find(UpdateFrequency::PER_INSTANCE); + if (iter != phaseLayouts.descriptorSets.end()) { + populateGroupedShaderInfo( + iter->second.descriptorSetLayoutData, + instanceInfo, setIndex(UpdateFrequency::PER_INSTANCE), + shaderInfo, blockSizes); + } + } + } +} + +// overwrite IProgramInfo using gfx.ShaderInfo +void overwriteProgramBlockInfo(const gfx::ShaderInfo &shaderInfo, IProgramInfo &programInfo) { + const auto set = setIndex(UpdateFrequency::PER_BATCH); + for (auto &block : programInfo.blocks) { + auto found = false; + for (const auto &src : shaderInfo.blocks) { + if (src.set != set) { + continue; + } + if (src.name == block.name) { + block.binding = src.binding; + found = true; + break; + } + } + if (!found) { + CC_LOG_ERROR("block not found in shaderInfo"); + } + } +} + +gfx::DescriptorSetLayout *getDescriptorSetLayout( + const LayoutGraphData &lg, + uint32_t passID, uint32_t phaseID, UpdateFrequency rate) { // NOLINT(bugprone-easily-swappable-parameters) + if (rate < UpdateFrequency::PER_PASS) { + const auto &phaseData = get(LayoutGraphData::Layout, lg, phaseID); + auto iter = phaseData.descriptorSets.find(rate); + if (iter != phaseData.descriptorSets.end()) { + const auto &data = iter->second; + if (!data.descriptorSetLayout) { + CC_LOG_ERROR("descriptor set layout not initialized"); + return nullptr; + } + return data.descriptorSetLayout; + } + return nullptr; + } + + CC_EXPECTS(rate == UpdateFrequency::PER_PASS); + CC_EXPECTS(passID == parent(phaseID, lg)); + + const auto &passData = get(LayoutGraphData::Layout, lg, passID); + auto iter = passData.descriptorSets.find(rate); + if (iter != passData.descriptorSets.end()) { + const auto &data = iter->second; + if (!data.descriptorSetLayout) { + CC_LOG_ERROR("descriptor set layout not initialized"); + return nullptr; + } + return data.descriptorSetLayout; + } + return nullptr; +} + +gfx::DescriptorSetLayout *getProgramDescriptorSetLayout( + gfx::Device *device, + LayoutGraphData &lg, uint32_t phaseID, + const ccstd::pmr::string &programName, UpdateFrequency rate) { + CC_EXPECTS(rate < UpdateFrequency::PER_PHASE); + auto &phase = get(RenderPhaseTag{}, phaseID, lg); + const auto iter = phase.shaderIndex.find(programName); + if (iter == phase.shaderIndex.end()) { + return nullptr; + } + const auto programID = iter->second; + auto &programData = phase.shaderPrograms.at(programID); + + auto iter2 = programData.layout.descriptorSets.find(rate); + if (iter2 == programData.layout.descriptorSets.end()) { + return nullptr; + } + auto &layout = iter2->second; + if (layout.descriptorSetLayout) { + return layout.descriptorSetLayout; + } + layout.descriptorSetLayout = device->createDescriptorSetLayout(layout.descriptorSetLayoutInfo); + return layout.descriptorSetLayout; +} + +// get descriptor set from LayoutGraphData (not from ProgramData) +const gfx::DescriptorSetLayout &getOrCreateDescriptorSetLayout( + const NativeProgramLibrary &lib, + const LayoutGraphData &lg, + uint32_t passID, uint32_t phaseID, UpdateFrequency rate) { // NOLINT(bugprone-easily-swappable-parameters) + if (rate < UpdateFrequency::PER_PASS) { + const auto &phaseData = get(LayoutGraphData::Layout, lg, phaseID); + auto iter = phaseData.descriptorSets.find(rate); + if (iter != phaseData.descriptorSets.end()) { + const auto &data = iter->second; + if (!data.descriptorSetLayout) { + CC_LOG_ERROR("descriptor set layout not initialized"); + return *lib.emptyDescriptorSetLayout; + } + return *data.descriptorSetLayout; + } + return *lib.emptyDescriptorSetLayout; + } + + CC_EXPECTS(rate == UpdateFrequency::PER_PASS); + CC_EXPECTS(passID == parent(phaseID, lg)); + + const auto &passData = get(LayoutGraphData::Layout, lg, passID); + const auto iter = passData.descriptorSets.find(rate); + if (iter != passData.descriptorSets.end()) { + const auto &data = iter->second; + if (!data.descriptorSetLayout) { + CC_LOG_ERROR("descriptor set layout not initialized"); + return *lib.emptyDescriptorSetLayout; + } + return *data.descriptorSetLayout; + } + return *lib.emptyDescriptorSetLayout; +} + +// get or create PerProgram gfx.DescriptorSetLayout +const gfx::DescriptorSetLayout &getOrCreateProgramDescriptorSetLayout( + const NativeProgramLibrary &lib, + gfx::Device *device, + LayoutGraphData &lg, uint32_t phaseID, + const ccstd::pmr::string &programName, UpdateFrequency rate) { + CC_EXPECTS(rate < UpdateFrequency::PER_PHASE); + auto &phase = get(RenderPhaseTag{}, phaseID, lg); + const auto iter = phase.shaderIndex.find(programName); + if (iter == phase.shaderIndex.end()) { + return *lib.emptyDescriptorSetLayout; + } + const auto programID = iter->second; + auto &programData = phase.shaderPrograms.at(programID); + const auto iter2 = programData.layout.descriptorSets.find(rate); + if (iter2 == programData.layout.descriptorSets.end()) { + return *lib.emptyDescriptorSetLayout; + } + auto &layout = iter2->second; + if (layout.descriptorSetLayout) { + return *layout.descriptorSetLayout; + } + layout.descriptorSetLayout = device->createDescriptorSetLayout(layout.descriptorSetLayoutInfo); + return *layout.descriptorSetLayout; +} + +} // namespace + +void NativeProgramLibrary::init(gfx::Device *device) { + emptyDescriptorSetLayout = device->createDescriptorSetLayout({}); + emptyPipelineLayout = device->createPipelineLayout({}); +} + +void NativeProgramLibrary::destroy() { + emptyDescriptorSetLayout.reset(); + emptyPipelineLayout.reset(); +} + +void NativeProgramLibrary::addEffect(EffectAsset *effectAssetIn) { + auto &lg = layoutGraph; + boost::container::pmr::memory_resource *scratch = &unsycPool; + const auto &effect = *effectAssetIn; + for (const auto &tech : effect._techniques) { + for (const auto &pass : tech.passes) { + const auto &programName = pass.program; + const auto [passID, phaseID, pShaderInfo, shaderID] = + getEffectShader(lg, effect, pass); + if (pShaderInfo == nullptr || validateShaderInfo(*pShaderInfo)) { + CC_LOG_ERROR("program not found"); + continue; + } + const auto &srcShaderInfo = *pShaderInfo; + CC_ENSURES(passID != INVALID_ID && phaseID != INVALID_ID); + const auto &passLayout = get(LayoutGraphData::Layout, lg, passID); + const auto &phaseLayout = get(LayoutGraphData::Layout, lg, phaseID); + + // programs + auto iter = this->phases.find(phaseID); + if (iter == this->phases.end()) { + iter = this->phases.emplace(std::piecewise_construct, + std::forward_as_tuple(phaseID), + std::forward_as_tuple()) + .first; + } + auto &phasePrograms = iter->second.programInfos; + auto alloc = phasePrograms.get_allocator(); + + // build program + auto programInfo = makeProgramInfo(effect._name, srcShaderInfo); + + // collect program descriptors + ShaderProgramData *programData = nullptr; + if (!mergeHighFrequency) { + auto &phase = get(RenderPhaseTag{}, phaseID, lg); + buildProgramData(programName, srcShaderInfo, lg, phase, fixedLocal, scratch); + } + + // shaderInfo and blockSizes + gfx::ShaderInfo shaderInfo; + ccstd::pmr::vector blockSizes(alloc); + makeShaderInfo(lg, passLayout, phaseLayout, srcShaderInfo, programData, + fixedLocal, shaderInfo, blockSizes); + + // overwrite programInfo + overwriteProgramBlockInfo(shaderInfo, programInfo); + + // handle map + auto handleMap = genHandles(shaderInfo); + + // attributes + ccstd::pmr::vector attributes(alloc); + for (const auto &attr : programInfo.attributes) { + attributes.emplace_back(gfx::Attribute{ + attr.name, + attr.format, + attr.isNormalized, + 0, + attr.isInstanced, + attr.location, + }); + } + + // create programInfo + auto res = phasePrograms.emplace( + std::piecewise_construct, + std::forward_as_tuple(srcShaderInfo.name), + std::forward_as_tuple( + std::move(programInfo), + std::move(shaderInfo), + std::move(attributes), + std::move(blockSizes), + std::move(handleMap))); + CC_ENSURES(res.second); + } + } +} + +void NativeProgramLibrary::precompileEffect(gfx::Device *device, EffectAsset *effectAsset) { + // noop +} + +ccstd::string NativeProgramLibrary::getKey( + uint32_t phaseID, const ccstd::pmr::string &programName, + const MacroRecord &defines) const { + auto iter = phases.find(phaseID); + if (iter == phases.end()) { + CC_LOG_ERROR("phase not found"); + return ""; + } + const auto &phase = iter->second; + auto iter2 = phase.programInfos.find(programName); + if (iter2 == phase.programInfos.end()) { + CC_LOG_ERROR("program not found"); + return ""; + } + const auto &info = iter2->second; + return getVariantKey(info.programInfo, defines); +} + +const gfx::PipelineLayout &NativeProgramLibrary::getPipelineLayout( + gfx::Device *device, uint32_t phaseID, const ccstd::pmr::string &programName) { + if (mergeHighFrequency) { + CC_EXPECTS(phaseID != LayoutGraphData::null_vertex()); + const auto &layout = get(RenderPhaseTag{}, phaseID, layoutGraph); + return *layout.pipelineLayout; + } + auto &lg = layoutGraph; + auto &phase = get(RenderPhaseTag{}, phaseID, lg); + const auto iter = phase.shaderIndex.find(programName); + if (iter == phase.shaderIndex.end()) { + return *emptyPipelineLayout; + } + const auto programID = iter->second; + auto &programData = phase.shaderPrograms.at(programID); + if (programData.pipelineLayout) { + return *programData.pipelineLayout; + } + + // get pass + const auto passID = parent(phaseID, lg); + if (passID == LayoutGraphData::null_vertex()) { + return *emptyPipelineLayout; + } + // create pipeline layout + gfx::PipelineLayoutInfo info{}; + auto *passSet = getDescriptorSetLayout(lg, passID, phaseID, UpdateFrequency::PER_PASS); + if (passSet) { + info.setLayouts.emplace_back(passSet); + } + auto *phaseSet = getDescriptorSetLayout(lg, passID, phaseID, UpdateFrequency::PER_PHASE); + if (phaseSet) { + info.setLayouts.emplace_back(phaseSet); + } + auto *batchSet = getProgramDescriptorSetLayout( + device, lg, phaseID, programName, UpdateFrequency::PER_BATCH); + if (batchSet) { + info.setLayouts.emplace_back(batchSet); + } + auto *instanceSet = getProgramDescriptorSetLayout( + device, lg, phaseID, programName, UpdateFrequency::PER_INSTANCE); + if (instanceSet) { + info.setLayouts.emplace_back(instanceSet); + } + programData.pipelineLayout = device->createPipelineLayout(info); + return *programData.pipelineLayout; +} + +const gfx::DescriptorSetLayout &NativeProgramLibrary::getMaterialDescriptorSetLayout( + gfx::Device *device, uint32_t phaseID, const ccstd::pmr::string &programName) { + if (mergeHighFrequency) { + CC_EXPECTS(phaseID != LayoutGraphData::null_vertex()); + const auto passID = parent(phaseID, layoutGraph); + return getOrCreateDescriptorSetLayout( + *this, layoutGraph, passID, phaseID, UpdateFrequency::PER_BATCH); + } + return getOrCreateProgramDescriptorSetLayout( + *this, device, layoutGraph, phaseID, programName, UpdateFrequency::PER_BATCH); +} + +const gfx::DescriptorSetLayout &NativeProgramLibrary::getLocalDescriptorSetLayout( + gfx::Device *device, uint32_t phaseID, const ccstd::pmr::string &programName) { + if (mergeHighFrequency) { + CC_EXPECTS(phaseID != LayoutGraphData::null_vertex()); + const auto passID = parent(phaseID, layoutGraph); + return getOrCreateDescriptorSetLayout( + *this, layoutGraph, passID, phaseID, UpdateFrequency::PER_INSTANCE); + } + return getOrCreateProgramDescriptorSetLayout( + *this, device, layoutGraph, phaseID, programName, UpdateFrequency::PER_INSTANCE); +} + +const IProgramInfo &NativeProgramLibrary::getProgramInfo( + uint32_t phaseID, const ccstd::pmr::string &programName) const { + const auto &group = phases.at(phaseID); + return group.programInfos.at(programName).programInfo; +} + +const gfx::ShaderInfo &NativeProgramLibrary::getShaderInfo( + uint32_t phaseID, const ccstd::pmr::string &programName) const { + const auto &group = phases.at(phaseID); + return group.programInfos.at(programName).shaderInfo; +} + +ProgramProxy *NativeProgramLibrary::getProgramVariant( + gfx::Device *device, uint32_t phaseID, const ccstd::string &name, + const MacroRecord &defines, const ccstd::pmr::string *key0) const { + auto iter = phases.find(phaseID); + if (iter == phases.end()) { + CC_LOG_ERROR("phase not found"); + return nullptr; + } + const auto &phase = iter->second; + auto iter2 = phase.programInfos.find(std::string_view{name}); + if (iter2 == phase.programInfos.end()) { + CC_LOG_ERROR("program not found"); + return nullptr; + } + const auto &info = iter2->second; + + const auto &programInfo = info.programInfo; + + std::string_view key; + ccstd::string key1; + + if (key0 == nullptr) { + key1 = getVariantKey(programInfo, defines); + key = key1; + } else { + key = *key0; + } + + auto iter3 = phase.programHosts.find(key); + if (iter3 != phase.programHosts.end()) { + return new NativeProgramProxy(iter3->second.program); + } + + std::ignore = device; + std::ignore = phaseID; + std::ignore = name; + std::ignore = defines; + std::ignore = key; + return nullptr; +} + +const ccstd::pmr::vector &NativeProgramLibrary::getBlockSizes( + uint32_t phaseID, const ccstd::pmr::string &programName) const { + std::ignore = phaseID; + std::ignore = programName; + throw std::runtime_error("not implemented"); +} + +const Record &NativeProgramLibrary::getHandleMap( + uint32_t phaseID, const ccstd::pmr::string &programName) const { + std::ignore = phaseID; + std::ignore = programName; + throw std::runtime_error("not implemented"); +} + +uint32_t NativeProgramLibrary::getProgramID( + uint32_t phaseID, const ccstd::pmr::string &programName) { + std::ignore = phaseID; + std::ignore = programName; + throw std::runtime_error("not implemented"); +} + +uint32_t NativeProgramLibrary::getDescriptorNameID(const ccstd::pmr::string &name) { + std::ignore = name; + return 0xFFFFFFFF; +} + +const ccstd::pmr::string &NativeProgramLibrary::getDescriptorName(uint32_t nameID) { + std::ignore = nameID; + throw std::runtime_error("not implemented"); +} + +} // namespace render + +} // namespace cc diff --git a/native/cocos/renderer/pipeline/custom/NativeRenderGraph.cpp b/native/cocos/renderer/pipeline/custom/NativeRenderGraph.cpp index 9a10f61b38..2ab06e9d6d 100644 --- a/native/cocos/renderer/pipeline/custom/NativeRenderGraph.cpp +++ b/native/cocos/renderer/pipeline/custom/NativeRenderGraph.cpp @@ -1,12 +1,36 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #include #include -#include "DebugUtils.h" -#include "GraphView.h" #include "LayoutGraphGraphs.h" #include "NativePipelineGraphs.h" #include "NativePipelineTypes.h" +#include "RenderCommonNames.h" #include "RenderGraphGraphs.h" -#include "RenderGraphNames.h" +#include "details/DebugUtils.h" +#include "details/GraphView.h" #include "gfx-base/GFXDef-common.h" #include "pipeline/custom/RenderCommonTypes.h" #include "pipeline/custom/RenderGraphFwd.h" @@ -21,7 +45,7 @@ ccstd::string NativeRasterPassBuilder::getName() const { } void NativeRasterPassBuilder::setName(const ccstd::string &name) { - get(RenderGraph::Name, *renderGraph, passID) = std::string_view(name); + get(RenderGraph::Name, *renderGraph, passID) = std::string_view{name}; } void NativeRasterPassBuilder::addRasterView(const ccstd::string &name, const RasterView &view) { @@ -51,7 +75,7 @@ ccstd::string NativeRasterQueueBuilder::getName() const { } void NativeRasterQueueBuilder::setName(const ccstd::string &name) { - get(RenderGraph::Name, *renderGraph, queueID) = std::string_view(name); + get(RenderGraph::Name, *renderGraph, queueID) = std::string_view{name}; } void NativeRasterQueueBuilder::addSceneOfCamera(scene::Camera *camera, LightInfo light, SceneFlags sceneFlags) { @@ -358,13 +382,17 @@ void NativeRasterPassBuilder::setSampler(const ccstd::string &name, gfx::Sampler addSampler(*layoutGraph, name, sampler, data); } +void NativeRasterPassBuilder::setVersion(const ccstd::string &name, uint64_t version) { + // noop +} + // NativeComputeQueue ccstd::string NativeComputeQueueBuilder::getName() const { return std::string(get(RenderGraph::Name, *renderGraph, queueID)); } void NativeComputeQueueBuilder::setName(const ccstd::string &name) { - get(RenderGraph::Name, *renderGraph, queueID) = std::string_view(name); + get(RenderGraph::Name, *renderGraph, queueID) = std::string_view{name}; } void NativeComputeQueueBuilder::addDispatch(const ccstd::string &shader, uint32_t threadGroupCountX, uint32_t threadGroupCountY, uint32_t threadGroupCountZ) { @@ -443,7 +471,7 @@ ccstd::string NativeComputePassBuilder::getName() const { } void NativeComputePassBuilder::setName(const ccstd::string &name) { - get(RenderGraph::Name, *renderGraph, passID) = std::string_view(name); + get(RenderGraph::Name, *renderGraph, passID) = std::string_view{name}; } void NativeComputePassBuilder::addComputeView(const ccstd::string &name, const ComputeView &view) { @@ -534,7 +562,7 @@ ccstd::string NativeMovePassBuilder::getName() const { } void NativeMovePassBuilder::setName(const ccstd::string &name) { - get(RenderGraph::Name, *renderGraph, passID) = std::string_view(name); + get(RenderGraph::Name, *renderGraph, passID) = std::string_view{name}; } void NativeMovePassBuilder::addPair(const MovePair &pair) { @@ -547,7 +575,7 @@ ccstd::string NativeCopyPassBuilder::getName() const { } void NativeCopyPassBuilder::setName(const ccstd::string &name) { - get(RenderGraph::Name, *renderGraph, passID) = std::string_view(name); + get(RenderGraph::Name, *renderGraph, passID) = std::string_view{name}; } void NativeCopyPassBuilder::addPair(const CopyPair &pair) { diff --git a/native/cocos/renderer/pipeline/custom/NativeRenderQueue.cpp b/native/cocos/renderer/pipeline/custom/NativeRenderQueue.cpp index d4f2e62db2..bbbc8baa48 100644 --- a/native/cocos/renderer/pipeline/custom/NativeRenderQueue.cpp +++ b/native/cocos/renderer/pipeline/custom/NativeRenderQueue.cpp @@ -1,9 +1,33 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #include #include -#include "GslUtils.h" #include "NativePipelineTypes.h" #include "cocos/renderer/pipeline/Define.h" #include "cocos/renderer/pipeline/PipelineStateManager.h" +#include "details/GslUtils.h" namespace cc { diff --git a/native/cocos/renderer/pipeline/custom/NativeRenderingModule.cpp b/native/cocos/renderer/pipeline/custom/NativeRenderingModule.cpp new file mode 100644 index 0000000000..09001e9514 --- /dev/null +++ b/native/cocos/renderer/pipeline/custom/NativeRenderingModule.cpp @@ -0,0 +1,44 @@ +/**************************************************************************** + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + +#include "NativePipelineTypes.h" + +namespace cc { + +namespace render { + +uint32_t NativeRenderingModule::getPassID(const ccstd::string &name) const { + std::ignore = name; + return LayoutGraphData::null_vertex(); +} + +uint32_t NativeRenderingModule::getPhaseID(uint32_t passID, const ccstd::string &name) const { + std::ignore = passID; + std::ignore = name; + return LayoutGraphData::null_vertex(); +} + +} // namespace render + +} // namespace cc diff --git a/native/cocos/renderer/pipeline/custom/NativeResourceGraph.cpp b/native/cocos/renderer/pipeline/custom/NativeResourceGraph.cpp index db988d875c..08c3333be0 100644 --- a/native/cocos/renderer/pipeline/custom/NativeResourceGraph.cpp +++ b/native/cocos/renderer/pipeline/custom/NativeResourceGraph.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -24,10 +23,10 @@ ****************************************************************************/ #include "NativePipelineTypes.h" -#include "Range.h" #include "RenderGraphGraphs.h" #include "RenderGraphTypes.h" #include "cocos/renderer/gfx-base/GFXDevice.h" +#include "details/Range.h" #include "gfx-base/GFXDef-common.h" #include "pipeline/custom/RenderCommonFwd.h" diff --git a/native/cocos/renderer/pipeline/custom/NativeTypes.cpp b/native/cocos/renderer/pipeline/custom/NativeTypes.cpp new file mode 100644 index 0000000000..719f69e79a --- /dev/null +++ b/native/cocos/renderer/pipeline/custom/NativeTypes.cpp @@ -0,0 +1,78 @@ +/**************************************************************************** + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + +/** + * ========================= !DO NOT CHANGE THE FOLLOWING SECTION MANUALLY! ========================= + * The following section is auto-generated. + * ========================= !DO NOT CHANGE THE FOLLOWING SECTION MANUALLY! ========================= + */ +// clang-format off +#include "NativeTypes.h" + +namespace cc { + +namespace render { + +ProgramInfo::ProgramInfo(const allocator_type& alloc) noexcept +: attributes(alloc), + blockSizes(alloc) {} + +ProgramInfo::ProgramInfo(IProgramInfo programInfoIn, gfx::ShaderInfo shaderInfoIn, ccstd::pmr::vector attributesIn, ccstd::pmr::vector blockSizesIn, Record handleMapIn, const allocator_type& alloc) noexcept +: programInfo(std::move(programInfoIn)), + shaderInfo(std::move(shaderInfoIn)), + attributes(std::move(attributesIn), alloc), + blockSizes(std::move(blockSizesIn), alloc), + handleMap(std::move(handleMapIn)) {} + +ProgramInfo::ProgramInfo(ProgramInfo&& rhs, const allocator_type& alloc) +: programInfo(std::move(rhs.programInfo)), + shaderInfo(std::move(rhs.shaderInfo)), + attributes(std::move(rhs.attributes), alloc), + blockSizes(std::move(rhs.blockSizes), alloc), + handleMap(std::move(rhs.handleMap)) {} + +ProgramInfo::ProgramInfo(ProgramInfo const& rhs, const allocator_type& alloc) +: programInfo(rhs.programInfo), + shaderInfo(rhs.shaderInfo), + attributes(rhs.attributes, alloc), + blockSizes(rhs.blockSizes, alloc), + handleMap(rhs.handleMap) {} + +ProgramGroup::ProgramGroup(const allocator_type& alloc) noexcept +: programInfos(alloc), + programHosts(alloc) {} + +ProgramGroup::ProgramGroup(ProgramGroup&& rhs, const allocator_type& alloc) +: programInfos(std::move(rhs.programInfos), alloc), + programHosts(std::move(rhs.programHosts), alloc) {} + +ProgramGroup::ProgramGroup(ProgramGroup const& rhs, const allocator_type& alloc) +: programInfos(rhs.programInfos, alloc), + programHosts(rhs.programHosts, alloc) {} + +} // namespace render + +} // namespace cc + +// clang-format on diff --git a/native/cocos/renderer/pipeline/custom/NativeTypes.h b/native/cocos/renderer/pipeline/custom/NativeTypes.h new file mode 100644 index 0000000000..9e029847ec --- /dev/null +++ b/native/cocos/renderer/pipeline/custom/NativeTypes.h @@ -0,0 +1,101 @@ +/**************************************************************************** + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + +/** + * ========================= !DO NOT CHANGE THE FOLLOWING SECTION MANUALLY! ========================= + * The following section is auto-generated. + * ========================= !DO NOT CHANGE THE FOLLOWING SECTION MANUALLY! ========================= + */ +// clang-format off +#pragma once +#include "cocos/base/Ptr.h" +#include "cocos/base/std/container/string.h" +#include "cocos/base/std/hash/hash.h" +#include "cocos/renderer/core/ProgramLib.h" +#include "cocos/renderer/gfx-base/GFXRenderPass.h" +#include "cocos/renderer/pipeline/GlobalDescriptorSetManager.h" +#include "cocos/renderer/pipeline/custom/LayoutGraphTypes.h" +#include "cocos/renderer/pipeline/custom/NativeFwd.h" +#include "cocos/renderer/pipeline/custom/RenderInterfaceTypes.h" +#include "cocos/renderer/pipeline/custom/details/Map.h" + +namespace cc { + +namespace render { + +struct ProgramInfo { + using allocator_type = boost::container::pmr::polymorphic_allocator; + allocator_type get_allocator() const noexcept { // NOLINT + return {attributes.get_allocator().resource()}; + } + + ProgramInfo(const allocator_type& alloc) noexcept; // NOLINT + ProgramInfo(IProgramInfo programInfoIn, gfx::ShaderInfo shaderInfoIn, ccstd::pmr::vector attributesIn, ccstd::pmr::vector blockSizesIn, Record handleMapIn, const allocator_type& alloc) noexcept; + ProgramInfo(ProgramInfo&& rhs, const allocator_type& alloc); + ProgramInfo(ProgramInfo const& rhs, const allocator_type& alloc); + + ProgramInfo(ProgramInfo&& rhs) noexcept = default; + ProgramInfo(ProgramInfo const& rhs) = delete; + ProgramInfo& operator=(ProgramInfo&& rhs) = default; + ProgramInfo& operator=(ProgramInfo const& rhs) = default; + + IProgramInfo programInfo; + gfx::ShaderInfo shaderInfo; + ccstd::pmr::vector attributes; + ccstd::pmr::vector blockSizes; + Record handleMap; +}; + +struct ProgramHost { + ProgramHost() = default; + ProgramHost(IntrusivePtr programIn) noexcept // NOLINT + : program(std::move(programIn)) {} + + IntrusivePtr program; +}; + +struct ProgramGroup { + using allocator_type = boost::container::pmr::polymorphic_allocator; + allocator_type get_allocator() const noexcept { // NOLINT + return {programInfos.get_allocator().resource()}; + } + + ProgramGroup(const allocator_type& alloc) noexcept; // NOLINT + ProgramGroup(ProgramGroup&& rhs, const allocator_type& alloc); + ProgramGroup(ProgramGroup const& rhs, const allocator_type& alloc); + + ProgramGroup(ProgramGroup&& rhs) noexcept = default; + ProgramGroup(ProgramGroup const& rhs) = delete; + ProgramGroup& operator=(ProgramGroup&& rhs) = default; + ProgramGroup& operator=(ProgramGroup const& rhs) = default; + + PmrFlatMap programInfos; + PmrFlatMap programHosts; +}; + +} // namespace render + +} // namespace cc + +// clang-format on diff --git a/native/cocos/renderer/pipeline/custom/PrivateFwd.h b/native/cocos/renderer/pipeline/custom/PrivateFwd.h index f5380c3ba8..9bdfb3b4e7 100644 --- a/native/cocos/renderer/pipeline/custom/PrivateFwd.h +++ b/native/cocos/renderer/pipeline/custom/PrivateFwd.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/custom/PrivateTypes.cpp b/native/cocos/renderer/pipeline/custom/PrivateTypes.cpp index 07087a24c5..5de19c9062 100644 --- a/native/cocos/renderer/pipeline/custom/PrivateTypes.cpp +++ b/native/cocos/renderer/pipeline/custom/PrivateTypes.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/custom/PrivateTypes.h b/native/cocos/renderer/pipeline/custom/PrivateTypes.h index 55e9cf89ba..bced606672 100644 --- a/native/cocos/renderer/pipeline/custom/PrivateTypes.h +++ b/native/cocos/renderer/pipeline/custom/PrivateTypes.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -39,14 +38,14 @@ namespace cc { namespace render { -class ProgramProxy { +class ProgramProxy : public RefCounted { public: - ProgramProxy() noexcept = default; + ProgramProxy() = default; ProgramProxy(ProgramProxy&& rhs) = delete; ProgramProxy(ProgramProxy const& rhs) = delete; ProgramProxy& operator=(ProgramProxy&& rhs) = delete; ProgramProxy& operator=(ProgramProxy const& rhs) = delete; - virtual ~ProgramProxy() noexcept = default; + ~ProgramProxy() noexcept override = default; virtual const ccstd::string &getName() const noexcept = 0; virtual gfx::Shader *getShader() const noexcept = 0; @@ -63,15 +62,18 @@ public: virtual void addEffect(EffectAsset *effectAsset) = 0; virtual void precompileEffect(gfx::Device *device, EffectAsset *effectAsset) = 0; - virtual ccstd::pmr::string getKey(uint32_t phaseID, const ccstd::pmr::string &programName, const MacroRecord &defines) const = 0; - virtual const gfx::PipelineLayout &getPipelineLayout(gfx::Device *device, uint32_t phaseID, const ccstd::pmr::string &programName) const = 0; - virtual const gfx::DescriptorSetLayout &getMaterialDescriptorSetLayout(gfx::Device *device, uint32_t phaseID, const ccstd::pmr::string &programName) const = 0; - virtual const gfx::DescriptorSetLayout &getLocalDescriptorSetLayout(gfx::Device *device, uint32_t phaseID, const ccstd::pmr::string &programName) const = 0; + virtual ccstd::string getKey(uint32_t phaseID, const ccstd::pmr::string &programName, const MacroRecord &defines) const = 0; + virtual const gfx::PipelineLayout &getPipelineLayout(gfx::Device *device, uint32_t phaseID, const ccstd::pmr::string &programName) = 0; + virtual const gfx::DescriptorSetLayout &getMaterialDescriptorSetLayout(gfx::Device *device, uint32_t phaseID, const ccstd::pmr::string &programName) = 0; + virtual const gfx::DescriptorSetLayout &getLocalDescriptorSetLayout(gfx::Device *device, uint32_t phaseID, const ccstd::pmr::string &programName) = 0; virtual const IProgramInfo &getProgramInfo(uint32_t phaseID, const ccstd::pmr::string &programName) const = 0; virtual const gfx::ShaderInfo &getShaderInfo(uint32_t phaseID, const ccstd::pmr::string &programName) const = 0; virtual ProgramProxy *getProgramVariant(gfx::Device *device, uint32_t phaseID, const ccstd::string &name, const MacroRecord &defines, const ccstd::pmr::string *key) const = 0; virtual const ccstd::pmr::vector &getBlockSizes(uint32_t phaseID, const ccstd::pmr::string &programName) const = 0; virtual const Record &getHandleMap(uint32_t phaseID, const ccstd::pmr::string &programName) const = 0; + virtual uint32_t getProgramID(uint32_t phaseID, const ccstd::pmr::string &programName) = 0; + virtual uint32_t getDescriptorNameID(const ccstd::pmr::string &name) = 0; + virtual const ccstd::pmr::string &getDescriptorName(uint32_t nameID) = 0; ProgramProxy *getProgramVariant(gfx::Device *device, uint32_t phaseID, const ccstd::string &name, const MacroRecord &defines) const { return getProgramVariant(device, phaseID, name, defines, nullptr); } diff --git a/native/cocos/renderer/pipeline/custom/RenderCommonFwd.h b/native/cocos/renderer/pipeline/custom/RenderCommonFwd.h index 141d70baf9..df85333138 100644 --- a/native/cocos/renderer/pipeline/custom/RenderCommonFwd.h +++ b/native/cocos/renderer/pipeline/custom/RenderCommonFwd.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/custom/RenderCommonJsb.cpp b/native/cocos/renderer/pipeline/custom/RenderCommonJsb.cpp index 37177bd69f..674463fa9d 100644 --- a/native/cocos/renderer/pipeline/custom/RenderCommonJsb.cpp +++ b/native/cocos/renderer/pipeline/custom/RenderCommonJsb.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -31,9 +30,9 @@ // clang-format off #include "cocos/bindings/auto/jsb_gfx_auto.h" #include "cocos/bindings/auto/jsb_scene_auto.h" -#include "cocos/renderer/pipeline/custom/JsbConversion.h" #include "cocos/renderer/pipeline/custom/RenderCommonJsb.h" #include "cocos/renderer/pipeline/custom/RenderCommonTypes.h" +#include "cocos/renderer/pipeline/custom/details/JsbConversion.h" bool nativevalue_to_se(const cc::render::RasterView &from, se::Value &to, se::Object *ctx) { // NOLINT se::HandleObject obj(se::Object::createPlainObject()); diff --git a/native/cocos/renderer/pipeline/custom/RenderCommonJsb.h b/native/cocos/renderer/pipeline/custom/RenderCommonJsb.h index d88fbd26aa..a79618024e 100644 --- a/native/cocos/renderer/pipeline/custom/RenderCommonJsb.h +++ b/native/cocos/renderer/pipeline/custom/RenderCommonJsb.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/custom/RenderCommonNames.h b/native/cocos/renderer/pipeline/custom/RenderCommonNames.h index 9d720e91d0..52c6a6d9a9 100644 --- a/native/cocos/renderer/pipeline/custom/RenderCommonNames.h +++ b/native/cocos/renderer/pipeline/custom/RenderCommonNames.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/custom/RenderCommonReflection.cpp b/native/cocos/renderer/pipeline/custom/RenderCommonReflection.cpp deleted file mode 100644 index 607451c174..0000000000 --- a/native/cocos/renderer/pipeline/custom/RenderCommonReflection.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. - - http://www.cocos.com - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. -****************************************************************************/ - -/** - * ========================= !DO NOT CHANGE THE FOLLOWING SECTION MANUALLY! ========================= - * The following section is auto-generated. - * ========================= !DO NOT CHANGE THE FOLLOWING SECTION MANUALLY! ========================= - */ -// clang-format off -#include "RenderCommonReflection.h" -#include "RenderCommonTypes.h" - -// clang-format on diff --git a/native/cocos/renderer/pipeline/custom/RenderCommonReflection.h b/native/cocos/renderer/pipeline/custom/RenderCommonReflection.h deleted file mode 100644 index 752de77c98..0000000000 --- a/native/cocos/renderer/pipeline/custom/RenderCommonReflection.h +++ /dev/null @@ -1,35 +0,0 @@ -/**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. - - http://www.cocos.com - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. -****************************************************************************/ - -/** - * ========================= !DO NOT CHANGE THE FOLLOWING SECTION MANUALLY! ========================= - * The following section is auto-generated. - * ========================= !DO NOT CHANGE THE FOLLOWING SECTION MANUALLY! ========================= - */ -// clang-format off -#pragma once -#include "cocos/renderer/pipeline/custom/RenderCommonFwd.h" - -// clang-format on diff --git a/native/cocos/renderer/pipeline/custom/RenderCommonSerialization.h b/native/cocos/renderer/pipeline/custom/RenderCommonSerialization.h index ef530ff08c..a1432dc7e5 100644 --- a/native/cocos/renderer/pipeline/custom/RenderCommonSerialization.h +++ b/native/cocos/renderer/pipeline/custom/RenderCommonSerialization.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -30,9 +29,9 @@ */ #pragma once #include "cocos/renderer/pipeline/custom/ArchiveTypes.h" -#include "cocos/renderer/pipeline/custom/Range.h" #include "cocos/renderer/pipeline/custom/RenderCommonTypes.h" -#include "cocos/renderer/pipeline/custom/SerializationUtils.h" +#include "cocos/renderer/pipeline/custom/details/Range.h" +#include "cocos/renderer/pipeline/custom/details/SerializationUtils.h" namespace cc { diff --git a/native/cocos/renderer/pipeline/custom/RenderCommonTypes.cpp b/native/cocos/renderer/pipeline/custom/RenderCommonTypes.cpp index b5505ab2af..9408292582 100644 --- a/native/cocos/renderer/pipeline/custom/RenderCommonTypes.cpp +++ b/native/cocos/renderer/pipeline/custom/RenderCommonTypes.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/custom/RenderCommonTypes.h b/native/cocos/renderer/pipeline/custom/RenderCommonTypes.h index b5b90a53f1..3120ea2147 100644 --- a/native/cocos/renderer/pipeline/custom/RenderCommonTypes.h +++ b/native/cocos/renderer/pipeline/custom/RenderCommonTypes.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/custom/RenderGraphFwd.h b/native/cocos/renderer/pipeline/custom/RenderGraphFwd.h index 77ca48c206..83f631cac1 100644 --- a/native/cocos/renderer/pipeline/custom/RenderGraphFwd.h +++ b/native/cocos/renderer/pipeline/custom/RenderGraphFwd.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/custom/RenderGraphGraphs.h b/native/cocos/renderer/pipeline/custom/RenderGraphGraphs.h index 0af81630d8..a5a7fc1b2e 100644 --- a/native/cocos/renderer/pipeline/custom/RenderGraphGraphs.h +++ b/native/cocos/renderer/pipeline/custom/RenderGraphGraphs.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -32,11 +31,10 @@ #pragma once #include #include -#include "cocos/renderer/pipeline/custom/GraphImpl.h" -#include "cocos/renderer/pipeline/custom/GslUtils.h" -#include "cocos/renderer/pipeline/custom/Overload.h" -#include "cocos/renderer/pipeline/custom/PathUtils.h" #include "cocos/renderer/pipeline/custom/RenderGraphTypes.h" +#include "cocos/renderer/pipeline/custom/details/GraphImpl.h" +#include "cocos/renderer/pipeline/custom/details/Overload.h" +#include "cocos/renderer/pipeline/custom/details/PathUtils.h" namespace cc { @@ -210,49 +208,49 @@ inline void remove_vertex_value_impl(const ResourceGraph::VertexHandle& h, Resou ccstd::visit( overload( [&](const impl::ValueHandle& h) { - g.resources.erase(g.resources.begin() + std::ptrdiff_t(h.value)); + g.resources.erase(g.resources.begin() + static_cast(h.value)); if (h.value == g.resources.size()) { return; } impl::reindexVectorHandle(g._vertices, h.value); }, [&](const impl::ValueHandle& h) { - g.managedBuffers.erase(g.managedBuffers.begin() + std::ptrdiff_t(h.value)); + g.managedBuffers.erase(g.managedBuffers.begin() + static_cast(h.value)); if (h.value == g.managedBuffers.size()) { return; } impl::reindexVectorHandle(g._vertices, h.value); }, [&](const impl::ValueHandle& h) { - g.managedTextures.erase(g.managedTextures.begin() + std::ptrdiff_t(h.value)); + g.managedTextures.erase(g.managedTextures.begin() + static_cast(h.value)); if (h.value == g.managedTextures.size()) { return; } impl::reindexVectorHandle(g._vertices, h.value); }, [&](const impl::ValueHandle& h) { - g.buffers.erase(g.buffers.begin() + std::ptrdiff_t(h.value)); + g.buffers.erase(g.buffers.begin() + static_cast(h.value)); if (h.value == g.buffers.size()) { return; } impl::reindexVectorHandle(g._vertices, h.value); }, [&](const impl::ValueHandle& h) { - g.textures.erase(g.textures.begin() + std::ptrdiff_t(h.value)); + g.textures.erase(g.textures.begin() + static_cast(h.value)); if (h.value == g.textures.size()) { return; } impl::reindexVectorHandle(g._vertices, h.value); }, [&](const impl::ValueHandle& h) { - g.framebuffers.erase(g.framebuffers.begin() + std::ptrdiff_t(h.value)); + g.framebuffers.erase(g.framebuffers.begin() + static_cast(h.value)); if (h.value == g.framebuffers.size()) { return; } impl::reindexVectorHandle(g._vertices, h.value); }, [&](const impl::ValueHandle& h) { - g.swapchains.erase(g.swapchains.begin() + std::ptrdiff_t(h.value)); + g.swapchains.erase(g.swapchains.begin() + static_cast(h.value)); if (h.value == g.swapchains.size()) { return; } @@ -279,11 +277,11 @@ inline void remove_vertex(ResourceGraph::vertex_descriptor u, ResourceGraph& g) impl::removeVectorVertex(const_cast(g), u, ResourceGraph::directed_category{}); // remove components - g.names.erase(g.names.begin() + std::ptrdiff_t(u)); - g.descs.erase(g.descs.begin() + std::ptrdiff_t(u)); - g.traits.erase(g.traits.begin() + std::ptrdiff_t(u)); - g.states.erase(g.states.begin() + std::ptrdiff_t(u)); - g.samplerInfo.erase(g.samplerInfo.begin() + std::ptrdiff_t(u)); + g.names.erase(g.names.begin() + static_cast(u)); + g.descs.erase(g.descs.begin() + static_cast(u)); + g.traits.erase(g.traits.begin() + static_cast(u)); + g.states.erase(g.states.begin() + static_cast(u)); + g.samplerInfo.erase(g.samplerInfo.begin() + static_cast(u)); } // MutablePropertyGraph(Vertex) @@ -674,8 +672,8 @@ inline void remove_vertex(SubpassGraph::vertex_descriptor u, SubpassGraph& g) no impl::removeVectorVertex(const_cast(g), u, SubpassGraph::directed_category{}); // remove components - g.names.erase(g.names.begin() + std::ptrdiff_t(u)); - g.subpasses.erase(g.subpasses.begin() + std::ptrdiff_t(u)); + g.names.erase(g.names.begin() + static_cast(u)); + g.subpasses.erase(g.subpasses.begin() + static_cast(u)); } // MutablePropertyGraph(Vertex) @@ -3692,84 +3690,84 @@ inline void remove_vertex_value_impl(const RenderGraph::VertexHandle& h, RenderG ccstd::visit( overload( [&](const impl::ValueHandle& h) { - g.rasterPasses.erase(g.rasterPasses.begin() + std::ptrdiff_t(h.value)); + g.rasterPasses.erase(g.rasterPasses.begin() + static_cast(h.value)); if (h.value == g.rasterPasses.size()) { return; } impl::reindexVectorHandle(g._vertices, h.value); }, [&](const impl::ValueHandle& h) { - g.computePasses.erase(g.computePasses.begin() + std::ptrdiff_t(h.value)); + g.computePasses.erase(g.computePasses.begin() + static_cast(h.value)); if (h.value == g.computePasses.size()) { return; } impl::reindexVectorHandle(g._vertices, h.value); }, [&](const impl::ValueHandle& h) { - g.copyPasses.erase(g.copyPasses.begin() + std::ptrdiff_t(h.value)); + g.copyPasses.erase(g.copyPasses.begin() + static_cast(h.value)); if (h.value == g.copyPasses.size()) { return; } impl::reindexVectorHandle(g._vertices, h.value); }, [&](const impl::ValueHandle& h) { - g.movePasses.erase(g.movePasses.begin() + std::ptrdiff_t(h.value)); + g.movePasses.erase(g.movePasses.begin() + static_cast(h.value)); if (h.value == g.movePasses.size()) { return; } impl::reindexVectorHandle(g._vertices, h.value); }, [&](const impl::ValueHandle& h) { - g.presentPasses.erase(g.presentPasses.begin() + std::ptrdiff_t(h.value)); + g.presentPasses.erase(g.presentPasses.begin() + static_cast(h.value)); if (h.value == g.presentPasses.size()) { return; } impl::reindexVectorHandle(g._vertices, h.value); }, [&](const impl::ValueHandle& h) { - g.raytracePasses.erase(g.raytracePasses.begin() + std::ptrdiff_t(h.value)); + g.raytracePasses.erase(g.raytracePasses.begin() + static_cast(h.value)); if (h.value == g.raytracePasses.size()) { return; } impl::reindexVectorHandle(g._vertices, h.value); }, [&](const impl::ValueHandle& h) { - g.renderQueues.erase(g.renderQueues.begin() + std::ptrdiff_t(h.value)); + g.renderQueues.erase(g.renderQueues.begin() + static_cast(h.value)); if (h.value == g.renderQueues.size()) { return; } impl::reindexVectorHandle(g._vertices, h.value); }, [&](const impl::ValueHandle& h) { - g.scenes.erase(g.scenes.begin() + std::ptrdiff_t(h.value)); + g.scenes.erase(g.scenes.begin() + static_cast(h.value)); if (h.value == g.scenes.size()) { return; } impl::reindexVectorHandle(g._vertices, h.value); }, [&](const impl::ValueHandle& h) { - g.blits.erase(g.blits.begin() + std::ptrdiff_t(h.value)); + g.blits.erase(g.blits.begin() + static_cast(h.value)); if (h.value == g.blits.size()) { return; } impl::reindexVectorHandle(g._vertices, h.value); }, [&](const impl::ValueHandle& h) { - g.dispatches.erase(g.dispatches.begin() + std::ptrdiff_t(h.value)); + g.dispatches.erase(g.dispatches.begin() + static_cast(h.value)); if (h.value == g.dispatches.size()) { return; } impl::reindexVectorHandle(g._vertices, h.value); }, [&](const impl::ValueHandle& h) { - g.clearViews.erase(g.clearViews.begin() + std::ptrdiff_t(h.value)); + g.clearViews.erase(g.clearViews.begin() + static_cast(h.value)); if (h.value == g.clearViews.size()) { return; } impl::reindexVectorHandle(g._vertices, h.value); }, [&](const impl::ValueHandle& h) { - g.viewports.erase(g.viewports.begin() + std::ptrdiff_t(h.value)); + g.viewports.erase(g.viewports.begin() + static_cast(h.value)); if (h.value == g.viewports.size()) { return; } @@ -3785,10 +3783,10 @@ inline void remove_vertex(RenderGraph::vertex_descriptor u, RenderGraph& g) noex impl::removeVectorVertex(const_cast(g), u, RenderGraph::directed_category{}); // remove components - g.names.erase(g.names.begin() + std::ptrdiff_t(u)); - g.layoutNodes.erase(g.layoutNodes.begin() + std::ptrdiff_t(u)); - g.data.erase(g.data.begin() + std::ptrdiff_t(u)); - g.valid.erase(g.valid.begin() + std::ptrdiff_t(u)); + g.names.erase(g.names.begin() + static_cast(u)); + g.layoutNodes.erase(g.layoutNodes.begin() + static_cast(u)); + g.data.erase(g.data.begin() + static_cast(u)); + g.valid.erase(g.valid.begin() + static_cast(u)); } // MutablePropertyGraph(Vertex) diff --git a/native/cocos/renderer/pipeline/custom/RenderGraphJsb.cpp b/native/cocos/renderer/pipeline/custom/RenderGraphJsb.cpp deleted file mode 100644 index 5328bb898b..0000000000 --- a/native/cocos/renderer/pipeline/custom/RenderGraphJsb.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. - - http://www.cocos.com - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. -****************************************************************************/ - -/** - * ========================= !DO NOT CHANGE THE FOLLOWING SECTION MANUALLY! ========================= - * The following section is auto-generated. - * ========================= !DO NOT CHANGE THE FOLLOWING SECTION MANUALLY! ========================= - */ -// clang-format off -#include "cocos/bindings/auto/jsb_gfx_auto.h" -#include "cocos/bindings/auto/jsb_scene_auto.h" -#include "cocos/renderer/pipeline/custom/JsbConversion.h" -#include "cocos/renderer/pipeline/custom/RenderGraphJsb.h" -#include "cocos/renderer/pipeline/custom/RenderGraphTypes.h" - -bool nativevalue_to_se(const cc::render::ClearView &from, se::Value &to, se::Object *ctx) { // NOLINT - se::HandleObject obj(se::Object::createPlainObject()); - se::Value tmp; - - nativevalue_to_se(from.slotName, tmp, ctx); - obj->setProperty("slotName", tmp); - - nativevalue_to_se(from.clearFlags, tmp, ctx); - obj->setProperty("clearFlags", tmp); - - nativevalue_to_se(from.clearColor, tmp, ctx); - obj->setProperty("clearColor", tmp); - - to.setObject(obj); - return true; -} - -template <> -bool sevalue_to_native(const se::Value &from, cc::render::ClearView *to, se::Object *ctx) { // NOLINT - SE_PRECONDITION2(from.isObject(), false, " Convert parameter to ClearView failed !"); - - auto *obj = const_cast(from.toObject()); - bool ok = true; - se::Value field; - obj->getProperty("slotName", &field, true); - if(!field.isNullOrUndefined()) { - ok &= sevalue_to_native(field, &(to->slotName), ctx); - } - obj->getProperty("clearFlags", &field, true); - if(!field.isNullOrUndefined()) { - ok &= sevalue_to_native(field, &(to->clearFlags), ctx); - } - obj->getProperty("clearColor", &field, true); - if(!field.isNullOrUndefined()) { - ok &= sevalue_to_native(field, &(to->clearColor), ctx); - } - return ok; -} - -// clang-format on diff --git a/native/cocos/renderer/pipeline/custom/RenderGraphJsb.h b/native/cocos/renderer/pipeline/custom/RenderGraphJsb.h deleted file mode 100644 index d9d748ee53..0000000000 --- a/native/cocos/renderer/pipeline/custom/RenderGraphJsb.h +++ /dev/null @@ -1,43 +0,0 @@ -/**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. - - http://www.cocos.com - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. -****************************************************************************/ - -/** - * ========================= !DO NOT CHANGE THE FOLLOWING SECTION MANUALLY! ========================= - * The following section is auto-generated. - * ========================= !DO NOT CHANGE THE FOLLOWING SECTION MANUALLY! ========================= - */ -// clang-format off -#pragma once -#include "cocos/bindings/manual/jsb_conversions.h" -#include "cocos/renderer/pipeline/custom/RenderCommonJsb.h" -#include "cocos/renderer/pipeline/custom/RenderGraphFwd.h" - -bool nativevalue_to_se(const cc::render::ClearView &from, se::Value &to, se::Object *ctx); // NOLINT - -// if function overload is used, android build fails -template <> -bool sevalue_to_native(const se::Value &from, cc::render::ClearView *to, se::Object *ctx); // NOLINT - -// clang-format on diff --git a/native/cocos/renderer/pipeline/custom/RenderGraphNames.h b/native/cocos/renderer/pipeline/custom/RenderGraphNames.h deleted file mode 100644 index c8332bebcc..0000000000 --- a/native/cocos/renderer/pipeline/custom/RenderGraphNames.h +++ /dev/null @@ -1,84 +0,0 @@ -/**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. - - http://www.cocos.com - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. -****************************************************************************/ - -/** - * ========================= !DO NOT CHANGE THE FOLLOWING SECTION MANUALLY! ========================= - * The following section is auto-generated. - * ========================= !DO NOT CHANGE THE FOLLOWING SECTION MANUALLY! ========================= - */ -// clang-format off -#pragma once -#include "cocos/renderer/pipeline/custom/RenderCommonNames.h" -#include "cocos/renderer/pipeline/custom/RenderGraphTypes.h" - -namespace cc { - -namespace render { - -inline const char* getName(const ResourceDesc& /*v*/) noexcept { return "ResourceDesc"; } -inline const char* getName(const ResourceTraits& /*v*/) noexcept { return "ResourceTraits"; } -inline const char* getName(const RenderSwapchain& /*v*/) noexcept { return "RenderSwapchain"; } -inline const char* getName(const ResourceStates& /*v*/) noexcept { return "ResourceStates"; } -inline const char* getName(const ManagedBuffer& /*v*/) noexcept { return "ManagedBuffer"; } -inline const char* getName(const ManagedTexture& /*v*/) noexcept { return "ManagedTexture"; } -inline const char* getName(const ManagedResource& /*v*/) noexcept { return "ManagedResource"; } -inline const char* getName(const ManagedTag& /*v*/) noexcept { return "Managed"; } -inline const char* getName(const ManagedBufferTag& /*v*/) noexcept { return "ManagedBuffer"; } -inline const char* getName(const ManagedTextureTag& /*v*/) noexcept { return "ManagedTexture"; } -inline const char* getName(const PersistentBufferTag& /*v*/) noexcept { return "PersistentBuffer"; } -inline const char* getName(const PersistentTextureTag& /*v*/) noexcept { return "PersistentTexture"; } -inline const char* getName(const FramebufferTag& /*v*/) noexcept { return "Framebuffer"; } -inline const char* getName(const SwapchainTag& /*v*/) noexcept { return "Swapchain"; } -inline const char* getName(const SamplerTag& /*v*/) noexcept { return "Sampler"; } -inline const char* getName(const ResourceGraph& /*v*/) noexcept { return "ResourceGraph"; } -inline const char* getName(const RasterSubpass& /*v*/) noexcept { return "RasterSubpass"; } -inline const char* getName(const SubpassGraph& /*v*/) noexcept { return "SubpassGraph"; } -inline const char* getName(const RasterPass& /*v*/) noexcept { return "RasterPass"; } -inline const char* getName(const ComputePass& /*v*/) noexcept { return "ComputePass"; } -inline const char* getName(const CopyPass& /*v*/) noexcept { return "CopyPass"; } -inline const char* getName(const MovePass& /*v*/) noexcept { return "MovePass"; } -inline const char* getName(const RaytracePass& /*v*/) noexcept { return "RaytracePass"; } -inline const char* getName(const QueueTag& /*v*/) noexcept { return "Queue"; } -inline const char* getName(const SceneTag& /*v*/) noexcept { return "Scene"; } -inline const char* getName(const DispatchTag& /*v*/) noexcept { return "Dispatch"; } -inline const char* getName(const BlitTag& /*v*/) noexcept { return "Blit"; } -inline const char* getName(const PresentTag& /*v*/) noexcept { return "Present"; } -inline const char* getName(const ClearTag& /*v*/) noexcept { return "Clear"; } -inline const char* getName(const ViewportTag& /*v*/) noexcept { return "Viewport"; } -inline const char* getName(const ClearView& /*v*/) noexcept { return "ClearView"; } -inline const char* getName(const RenderQueue& /*v*/) noexcept { return "RenderQueue"; } -inline const char* getName(const SceneData& /*v*/) noexcept { return "SceneData"; } -inline const char* getName(const Dispatch& /*v*/) noexcept { return "Dispatch"; } -inline const char* getName(const Blit& /*v*/) noexcept { return "Blit"; } -inline const char* getName(const Present& /*v*/) noexcept { return "Present"; } -inline const char* getName(const PresentPass& /*v*/) noexcept { return "PresentPass"; } -inline const char* getName(const RenderData& /*v*/) noexcept { return "RenderData"; } -inline const char* getName(const RenderGraph& /*v*/) noexcept { return "RenderGraph"; } - -} // namespace render - -} // namespace cc - -// clang-format on diff --git a/native/cocos/renderer/pipeline/custom/RenderGraphReflection.cpp b/native/cocos/renderer/pipeline/custom/RenderGraphReflection.cpp deleted file mode 100644 index a5942f291e..0000000000 --- a/native/cocos/renderer/pipeline/custom/RenderGraphReflection.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. - - http://www.cocos.com - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. -****************************************************************************/ - -/** - * ========================= !DO NOT CHANGE THE FOLLOWING SECTION MANUALLY! ========================= - * The following section is auto-generated. - * ========================= !DO NOT CHANGE THE FOLLOWING SECTION MANUALLY! ========================= - */ -// clang-format off -#include "RenderGraphReflection.h" -#include "RenderGraphTypes.h" - -// clang-format on diff --git a/native/cocos/renderer/pipeline/custom/RenderGraphReflection.h b/native/cocos/renderer/pipeline/custom/RenderGraphReflection.h deleted file mode 100644 index a945a96460..0000000000 --- a/native/cocos/renderer/pipeline/custom/RenderGraphReflection.h +++ /dev/null @@ -1,36 +0,0 @@ -/**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. - - http://www.cocos.com - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. -****************************************************************************/ - -/** - * ========================= !DO NOT CHANGE THE FOLLOWING SECTION MANUALLY! ========================= - * The following section is auto-generated. - * ========================= !DO NOT CHANGE THE FOLLOWING SECTION MANUALLY! ========================= - */ -// clang-format off -#pragma once -#include "cocos/renderer/pipeline/custom/RenderCommonReflection.h" -#include "cocos/renderer/pipeline/custom/RenderGraphFwd.h" - -// clang-format on diff --git a/native/cocos/renderer/pipeline/custom/RenderGraphTypes.cpp b/native/cocos/renderer/pipeline/custom/RenderGraphTypes.cpp index df1512010a..dfabba9653 100644 --- a/native/cocos/renderer/pipeline/custom/RenderGraphTypes.cpp +++ b/native/cocos/renderer/pipeline/custom/RenderGraphTypes.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -160,7 +159,8 @@ SubpassGraph::Vertex::Vertex(Vertex const& rhs, const allocator_type& alloc) RasterPass::RasterPass(const allocator_type& alloc) noexcept : rasterViews(alloc), computeViews(alloc), - subpassGraph(alloc) {} + subpassGraph(alloc), + versionName(alloc) {} RasterPass::RasterPass(RasterPass&& rhs, const allocator_type& alloc) : rasterViews(std::move(rhs.rasterViews), alloc), @@ -168,7 +168,9 @@ RasterPass::RasterPass(RasterPass&& rhs, const allocator_type& alloc) subpassGraph(std::move(rhs.subpassGraph), alloc), width(rhs.width), height(rhs.height), - viewport(rhs.viewport) {} + viewport(rhs.viewport), + versionName(std::move(rhs.versionName), alloc), + version(rhs.version) {} RasterPass::RasterPass(RasterPass const& rhs, const allocator_type& alloc) : rasterViews(rhs.rasterViews, alloc), @@ -176,7 +178,9 @@ RasterPass::RasterPass(RasterPass const& rhs, const allocator_type& alloc) subpassGraph(rhs.subpassGraph, alloc), width(rhs.width), height(rhs.height), - viewport(rhs.viewport) {} + viewport(rhs.viewport), + versionName(rhs.versionName, alloc), + version(rhs.version) {} ComputePass::ComputePass(const allocator_type& alloc) noexcept : computeViews(alloc) {} diff --git a/native/cocos/renderer/pipeline/custom/RenderGraphTypes.h b/native/cocos/renderer/pipeline/custom/RenderGraphTypes.h index 900b5bd1ae..a4868dcc5d 100644 --- a/native/cocos/renderer/pipeline/custom/RenderGraphTypes.h +++ b/native/cocos/renderer/pipeline/custom/RenderGraphTypes.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -45,11 +44,10 @@ #include "cocos/renderer/gfx-base/GFXSwapchain.h" #include "cocos/renderer/gfx-base/GFXTexture.h" #include "cocos/renderer/gfx-base/states/GFXSampler.h" -#include "cocos/renderer/pipeline/custom/GraphTypes.h" -#include "cocos/renderer/pipeline/custom/Map.h" #include "cocos/renderer/pipeline/custom/RenderCommonTypes.h" #include "cocos/renderer/pipeline/custom/RenderGraphFwd.h" -#include "cocos/renderer/pipeline/custom/Set.h" +#include "cocos/renderer/pipeline/custom/details/GraphTypes.h" +#include "cocos/renderer/pipeline/custom/details/Map.h" #include "cocos/scene/Camera.h" namespace cc { @@ -469,11 +467,13 @@ struct RasterPass { uint32_t width{0}; uint32_t height{0}; gfx::Viewport viewport; + ccstd::pmr::string versionName; + uint64_t version{0}; }; inline bool operator==(const RasterPass& lhs, const RasterPass& rhs) noexcept { - return std::forward_as_tuple(lhs.rasterViews, lhs.computeViews, lhs.subpassGraph, lhs.width, lhs.height) == - std::forward_as_tuple(rhs.rasterViews, rhs.computeViews, rhs.subpassGraph, rhs.width, rhs.height); + return std::forward_as_tuple(lhs.rasterViews, lhs.computeViews, lhs.subpassGraph, lhs.width, lhs.height, lhs.versionName, lhs.version) == + std::forward_as_tuple(rhs.rasterViews, rhs.computeViews, rhs.subpassGraph, rhs.width, rhs.height, rhs.versionName, rhs.version); } inline bool operator!=(const RasterPass& lhs, const RasterPass& rhs) noexcept { @@ -939,6 +939,8 @@ inline hash_t hash::operator()(const cc::render::RasterP hash_combine(seed, val.subpassGraph); hash_combine(seed, val.width); hash_combine(seed, val.height); + hash_combine(seed, val.versionName); + hash_combine(seed, val.version); return seed; } diff --git a/native/cocos/renderer/pipeline/custom/RenderInterfaceFwd.h b/native/cocos/renderer/pipeline/custom/RenderInterfaceFwd.h index 344b8e2dcb..cf08c7b96e 100644 --- a/native/cocos/renderer/pipeline/custom/RenderInterfaceFwd.h +++ b/native/cocos/renderer/pipeline/custom/RenderInterfaceFwd.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -56,6 +55,7 @@ class SceneTransversal; class LayoutGraphBuilder; class Pipeline; class PipelineBuilder; +class RenderingModule; class Factory; } // namespace render diff --git a/native/cocos/renderer/pipeline/custom/RenderInterfaceTypes.cpp b/native/cocos/renderer/pipeline/custom/RenderInterfaceTypes.cpp index d5031b75fa..93b687be37 100644 --- a/native/cocos/renderer/pipeline/custom/RenderInterfaceTypes.cpp +++ b/native/cocos/renderer/pipeline/custom/RenderInterfaceTypes.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/custom/RenderInterfaceTypes.h b/native/cocos/renderer/pipeline/custom/RenderInterfaceTypes.h index 976cbf0b99..f8ca5ea2b1 100644 --- a/native/cocos/renderer/pipeline/custom/RenderInterfaceTypes.h +++ b/native/cocos/renderer/pipeline/custom/RenderInterfaceTypes.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -173,6 +172,7 @@ public: virtual void addComputeView(const ccstd::string &name, const ComputeView &view) = 0; virtual RasterQueueBuilder *addQueue(QueueHint hint) = 0; virtual void setViewport(const gfx::Viewport &viewport) = 0; + virtual void setVersion(const ccstd::string &name, uint64_t version) = 0; RasterQueueBuilder *addQueue() { return addQueue(QueueHint::NONE); } @@ -325,8 +325,23 @@ public: virtual void setup(const ccstd::vector &cameras, Pipeline *pipeline) = 0; }; +class RenderingModule { +public: + RenderingModule() noexcept = default; + RenderingModule(RenderingModule&& rhs) = delete; + RenderingModule(RenderingModule const& rhs) = delete; + RenderingModule& operator=(RenderingModule&& rhs) = delete; + RenderingModule& operator=(RenderingModule const& rhs) = delete; + virtual ~RenderingModule() noexcept = default; + + virtual uint32_t getPassID(const ccstd::string &name) const = 0; + virtual uint32_t getPhaseID(uint32_t passID, const ccstd::string &name) const = 0; +}; + class Factory { public: + static RenderingModule* init(gfx::Device* deviceIn, const ccstd::vector& bufferIn); + static void destroy(RenderingModule* renderingModule) noexcept; static Pipeline *createPipeline(); }; diff --git a/native/cocos/renderer/pipeline/custom/DebugUtils.h b/native/cocos/renderer/pipeline/custom/details/DebugUtils.h similarity index 73% rename from native/cocos/renderer/pipeline/custom/DebugUtils.h rename to native/cocos/renderer/pipeline/custom/details/DebugUtils.h index 0f5862bfb4..3b8c36f5f1 100644 --- a/native/cocos/renderer/pipeline/custom/DebugUtils.h +++ b/native/cocos/renderer/pipeline/custom/details/DebugUtils.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -26,7 +25,7 @@ #pragma once #include #include -#include "base/std/container/string.h" +#include "cocos/base/std/container/string.h" namespace cc { @@ -69,18 +68,19 @@ inline void indent(ccstd::pmr::string& str) { } inline void unindent(ccstd::string& str) noexcept { - auto sz = str.size() < size_t(4) ? str.size() : size_t(4); + auto sz = str.size() < static_cast(4) ? str.size() : static_cast(4); str.erase(str.size() - sz); } inline void unindent(ccstd::pmr::string& str) noexcept { - auto sz = str.size() < size_t(4) ? str.size() : size_t(4); + auto sz = str.size() < static_cast(4) ? str.size() : static_cast(4); str.erase(str.size() - sz); } -inline void copyString(std::ostream& os, - std::string_view space, std::string_view str, // NOLINT(bugprone-easily-swappable-parameters) - bool append = false) { +inline void copyString( + std::ostream& os, + std::string_view space, std::string_view str, // NOLINT(bugprone-easily-swappable-parameters) + bool append = false) { std::istringstream iss{ccstd::string(str)}; ccstd::string line; int count = 0; @@ -117,9 +117,10 @@ inline void copyString(std::ostream& os, std::string_view str) { } } -inline void copyCppString(std::ostream& os, - std::string_view space, std::string_view str, // NOLINT(bugprone-easily-swappable-parameters) - bool append = false) { +inline void copyCppString( + std::ostream& os, + std::string_view space, std::string_view str, // NOLINT(bugprone-easily-swappable-parameters) + bool append = false) { std::istringstream iss{ccstd::string(str)}; ccstd::string line; int count = 0; @@ -132,7 +133,7 @@ inline void copyCppString(std::ostream& os, #if defined(_MSC_VER) && _MSC_VER < 1920 os << space << line << '\n'; #else - os << space.substr(0, std::max(size_t(4), space.size()) - 4) << line << "\n"; + os << space.substr(0, std::max(static_cast(4), space.size()) - 4) << line << "\n"; #endif } else { if (append) { diff --git a/native/cocos/renderer/pipeline/custom/GraphImpl.h b/native/cocos/renderer/pipeline/custom/details/GraphImpl.h similarity index 96% rename from native/cocos/renderer/pipeline/custom/GraphImpl.h rename to native/cocos/renderer/pipeline/custom/details/GraphImpl.h index 95296a4a92..87db32184d 100644 --- a/native/cocos/renderer/pipeline/custom/GraphImpl.h +++ b/native/cocos/renderer/pipeline/custom/details/GraphImpl.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -28,10 +27,10 @@ #include #include #include -#include "base/std/container/vector.h" -#include "base/std/variant.h" -#include "renderer/pipeline/custom/GraphTypes.h" -#include "renderer/pipeline/custom/GslUtils.h" +#include "cocos/base/std/container/vector.h" +#include "cocos/base/std/variant.h" +#include "cocos/renderer/pipeline/custom/details/GraphTypes.h" +#include "cocos/renderer/pipeline/custom/details/GslUtils.h" namespace cc { diff --git a/native/cocos/renderer/pipeline/custom/GraphTypes.h b/native/cocos/renderer/pipeline/custom/details/GraphTypes.h similarity index 96% rename from native/cocos/renderer/pipeline/custom/GraphTypes.h rename to native/cocos/renderer/pipeline/custom/details/GraphTypes.h index 5c18218019..9e2b35cdb5 100644 --- a/native/cocos/renderer/pipeline/custom/GraphTypes.h +++ b/native/cocos/renderer/pipeline/custom/details/GraphTypes.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -30,11 +29,11 @@ #include #include #include -#include "base/memory/Memory.h" -#include "base/std/container/list.h" -#include "base/std/container/string.h" -#include "base/std/variant.h" -#include "renderer/pipeline/custom/Overload.h" +#include "cocos/base/memory/Memory.h" +#include "cocos/base/std/container/list.h" +#include "cocos/base/std/container/string.h" +#include "cocos/base/std/variant.h" +#include "cocos/renderer/pipeline/custom/details/Overload.h" namespace boost { diff --git a/native/cocos/renderer/pipeline/custom/GraphView.h b/native/cocos/renderer/pipeline/custom/details/GraphView.h similarity index 92% rename from native/cocos/renderer/pipeline/custom/GraphView.h rename to native/cocos/renderer/pipeline/custom/details/GraphView.h index 11ffec2d51..1e24de3fc5 100644 --- a/native/cocos/renderer/pipeline/custom/GraphView.h +++ b/native/cocos/renderer/pipeline/custom/details/GraphView.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/custom/GslUtils.h b/native/cocos/renderer/pipeline/custom/details/GslUtils.h similarity index 62% rename from native/cocos/renderer/pipeline/custom/GslUtils.h rename to native/cocos/renderer/pipeline/custom/details/GslUtils.h index ed43ca9428..9f9dc93011 100644 --- a/native/cocos/renderer/pipeline/custom/GslUtils.h +++ b/native/cocos/renderer/pipeline/custom/details/GslUtils.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -24,8 +23,8 @@ ****************************************************************************/ #pragma once -#include #include +#include "cocos/base/Macros.h" namespace cc { diff --git a/native/cocos/renderer/pipeline/custom/JsbConversion.h b/native/cocos/renderer/pipeline/custom/details/JsbConversion.h similarity index 82% rename from native/cocos/renderer/pipeline/custom/JsbConversion.h rename to native/cocos/renderer/pipeline/custom/details/JsbConversion.h index 97338cc1f1..0173dd70fa 100644 --- a/native/cocos/renderer/pipeline/custom/JsbConversion.h +++ b/native/cocos/renderer/pipeline/custom/details/JsbConversion.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -24,11 +23,11 @@ ****************************************************************************/ #pragma once -#include "base/std/container/map.h" -#include "base/std/container/string.h" -#include "base/std/container/vector.h" -#include "bindings/manual/jsb_conversions.h" -#include "renderer/pipeline/custom/Map.h" +#include "cocos/base/std/container/map.h" +#include "cocos/base/std/container/string.h" +#include "cocos/base/std/container/vector.h" +#include "cocos/bindings/manual/jsb_conversions.h" +#include "cocos/renderer/pipeline/custom/details/Map.h" template inline bool nativevalue_to_se( // NOLINT(readability-identifier-naming) diff --git a/native/cocos/renderer/pipeline/custom/Map.h b/native/cocos/renderer/pipeline/custom/details/Map.h similarity index 83% rename from native/cocos/renderer/pipeline/custom/Map.h rename to native/cocos/renderer/pipeline/custom/details/Map.h index e8cb82b4e3..143df8b34c 100644 --- a/native/cocos/renderer/pipeline/custom/Map.h +++ b/native/cocos/renderer/pipeline/custom/details/Map.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -28,8 +27,8 @@ #include #include #include -#include "cocos/renderer/pipeline/custom/Pmr.h" -#include "cocos/renderer/pipeline/custom/Utility.h" +#include "cocos/renderer/pipeline/custom/details/Pmr.h" +#include "cocos/renderer/pipeline/custom/details/Utility.h" // for std::less<> the transparent comparator // see https://stackoverflow.com/questions/20317413/what-are-transparent-comparators diff --git a/native/cocos/renderer/pipeline/custom/Overload.h b/native/cocos/renderer/pipeline/custom/details/Overload.h similarity index 72% rename from native/cocos/renderer/pipeline/custom/Overload.h rename to native/cocos/renderer/pipeline/custom/details/Overload.h index 9607ab9e18..d6e0854524 100644 --- a/native/cocos/renderer/pipeline/custom/Overload.h +++ b/native/cocos/renderer/pipeline/custom/details/Overload.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -24,12 +23,10 @@ ****************************************************************************/ #pragma once - -#include "boost/mp11/algorithm.hpp" -#include "cocos/base/std/variant.h" - +#include #include #include +#include "cocos/base/std/variant.h" namespace cc { diff --git a/native/cocos/renderer/pipeline/custom/PathUtils.h b/native/cocos/renderer/pipeline/custom/details/PathUtils.h similarity index 77% rename from native/cocos/renderer/pipeline/custom/PathUtils.h rename to native/cocos/renderer/pipeline/custom/details/PathUtils.h index 9904c3b5a4..f5c6c32a1f 100644 --- a/native/cocos/renderer/pipeline/custom/PathUtils.h +++ b/native/cocos/renderer/pipeline/custom/details/PathUtils.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -25,10 +24,10 @@ #pragma once -#include #include #include -#include "base/std/container/array.h" +#include "cocos/base/std/container/array.h" +#include "cocos/renderer/pipeline/custom/details/GslUtils.h" namespace cc { diff --git a/native/cocos/renderer/pipeline/custom/Pmr.h b/native/cocos/renderer/pipeline/custom/details/Pmr.h similarity index 71% rename from native/cocos/renderer/pipeline/custom/Pmr.h rename to native/cocos/renderer/pipeline/custom/details/Pmr.h index 7f6223d54d..3b8c7f25a7 100644 --- a/native/cocos/renderer/pipeline/custom/Pmr.h +++ b/native/cocos/renderer/pipeline/custom/details/Pmr.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -24,10 +23,10 @@ ****************************************************************************/ #pragma once +#include +#include +#include #include -#include "boost/container/pmr/global_resource.hpp" -#include "boost/container/pmr/polymorphic_allocator.hpp" -#include "boost/container/pmr/unsynchronized_pool_resource.hpp" namespace cc { diff --git a/native/cocos/renderer/pipeline/custom/Range.h b/native/cocos/renderer/pipeline/custom/details/Range.h similarity index 61% rename from native/cocos/renderer/pipeline/custom/Range.h rename to native/cocos/renderer/pipeline/custom/details/Range.h index 6d0960449d..9d275ebddd 100644 --- a/native/cocos/renderer/pipeline/custom/Range.h +++ b/native/cocos/renderer/pipeline/custom/details/Range.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/custom/SerializationUtils.h b/native/cocos/renderer/pipeline/custom/details/SerializationUtils.h similarity index 93% rename from native/cocos/renderer/pipeline/custom/SerializationUtils.h rename to native/cocos/renderer/pipeline/custom/details/SerializationUtils.h index 1594ee3111..8ca44b8aec 100644 --- a/native/cocos/renderer/pipeline/custom/SerializationUtils.h +++ b/native/cocos/renderer/pipeline/custom/details/SerializationUtils.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -62,13 +61,22 @@ void save(OutputArchive& ar, const T& v) { template || std::is_integral_v || std::is_floating_point_v, + std::is_integral_v || std::is_floating_point_v, bool> = false> void load(InputArchive& ar, T& v) { - static_assert(!std::is_enum_v || sizeof(T) <= sizeof(uint32_t)); // enum can only be 1, 2, 4 bytes + static_assert(sizeof(T) <= sizeof(uint32_t)); // enum can only be 1, 2, 4 bytes v = static_cast(ar.readNumber()); } +// Cast from double to enum might not be supported. _MSC_VER(1924) +template , + bool> = false> +void load(InputArchive& ar, T& v) { + v = static_cast(static_cast::type>(ar.readNumber())); +} + + // string template void save(OutputArchive& ar, const std::basic_string& v) { diff --git a/native/cocos/renderer/pipeline/custom/Set.h b/native/cocos/renderer/pipeline/custom/details/Set.h similarity index 81% rename from native/cocos/renderer/pipeline/custom/Set.h rename to native/cocos/renderer/pipeline/custom/details/Set.h index a15338167c..b14e150fbe 100644 --- a/native/cocos/renderer/pipeline/custom/Set.h +++ b/native/cocos/renderer/pipeline/custom/details/Set.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -24,11 +23,12 @@ ****************************************************************************/ #pragma once -#include #include #include #include #include +#include "cocos/base/std/hash/hash_fwd.hpp" +#include "cocos/renderer/pipeline/custom/details/Utility.h" // for std::less<> the transparent comparator // see https://stackoverflow.com/questions/20317413/what-are-transparent-comparators diff --git a/native/cocos/renderer/pipeline/custom/Utility.h b/native/cocos/renderer/pipeline/custom/details/Utility.h similarity index 71% rename from native/cocos/renderer/pipeline/custom/Utility.h rename to native/cocos/renderer/pipeline/custom/details/Utility.h index c354e92f02..3c4583adc8 100644 --- a/native/cocos/renderer/pipeline/custom/Utility.h +++ b/native/cocos/renderer/pipeline/custom/details/Utility.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/custom/test/test.h b/native/cocos/renderer/pipeline/custom/test/test.h index 0db00c7742..498ff712f1 100644 --- a/native/cocos/renderer/pipeline/custom/test/test.h +++ b/native/cocos/renderer/pipeline/custom/test/test.h @@ -1,17 +1,17 @@ -/*Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. +/**************************************************************************** + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -35,9 +35,9 @@ #include "../FGDispatcherTypes.h" #include "../LayoutGraphGraphs.h" #include "../NativePipelineTypes.h" -#include "../Range.h" #include "../RenderGraphGraphs.h" #include "../RenderGraphTypes.h" +#include "../details/Range.h" #include "GFXDeviceManager.h" #include "cocos/base/std/container/vector.h" #include "frame-graph/FrameGraph.h" diff --git a/native/cocos/renderer/pipeline/deferred/BloomStage.cpp b/native/cocos/renderer/pipeline/deferred/BloomStage.cpp index f6847e5faf..aad62c520c 100644 --- a/native/cocos/renderer/pipeline/deferred/BloomStage.cpp +++ b/native/cocos/renderer/pipeline/deferred/BloomStage.cpp @@ -1,19 +1,19 @@ /**************************************************************************** Copyright (c) 2020-2021 Huawei Technologies Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -22,7 +22,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #include "BloomStage.h" #include "../PipelineStateManager.h" @@ -86,7 +86,7 @@ RenderStageInfo BloomStage::initInfo = { BLOOM_STAGE_NAME, static_cast(DeferredStagePriority::BLOOM), 0, - {{true, RenderQueueSortMode::BACK_TO_FRONT, {"default"}}}, + {ccnew RenderQueueDesc{true, RenderQueueSortMode::BACK_TO_FRONT, {"default"}}}, }; const RenderStageInfo &BloomStage::getInitializeInfo() { return BloomStage::initInfo; } diff --git a/native/cocos/renderer/pipeline/deferred/BloomStage.h b/native/cocos/renderer/pipeline/deferred/BloomStage.h index 20f4bb2ea6..4673df8cfc 100644 --- a/native/cocos/renderer/pipeline/deferred/BloomStage.h +++ b/native/cocos/renderer/pipeline/deferred/BloomStage.h @@ -1,18 +1,18 @@ /**************************************************************************** Copyright (c) 2020-2021 Huawei Technologies Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once diff --git a/native/cocos/renderer/pipeline/deferred/DeferredPipeline.cpp b/native/cocos/renderer/pipeline/deferred/DeferredPipeline.cpp index e5f694f438..3728c25bb8 100644 --- a/native/cocos/renderer/pipeline/deferred/DeferredPipeline.cpp +++ b/native/cocos/renderer/pipeline/deferred/DeferredPipeline.cpp @@ -1,18 +1,18 @@ /**************************************************************************** Copyright (c) 2020-2021 Huawei Technologies Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/deferred/DeferredPipeline.h b/native/cocos/renderer/pipeline/deferred/DeferredPipeline.h index 2bfef01684..29b77bebfd 100644 --- a/native/cocos/renderer/pipeline/deferred/DeferredPipeline.h +++ b/native/cocos/renderer/pipeline/deferred/DeferredPipeline.h @@ -1,18 +1,18 @@ /**************************************************************************** Copyright (c) 2020-2021 Huawei Technologies Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/deferred/DeferredPipelineSceneData.cpp b/native/cocos/renderer/pipeline/deferred/DeferredPipelineSceneData.cpp index ab28c0e8ff..1a321b8b2f 100644 --- a/native/cocos/renderer/pipeline/deferred/DeferredPipelineSceneData.cpp +++ b/native/cocos/renderer/pipeline/deferred/DeferredPipelineSceneData.cpp @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #include "renderer/pipeline/deferred/DeferredPipelineSceneData.h" #include "renderer/pipeline/RenderPipeline.h" #include "renderer/pipeline/deferred/BloomStage.h" diff --git a/native/cocos/renderer/pipeline/deferred/DeferredPipelineSceneData.h b/native/cocos/renderer/pipeline/deferred/DeferredPipelineSceneData.h index 9fb591527d..a502cbc17d 100644 --- a/native/cocos/renderer/pipeline/deferred/DeferredPipelineSceneData.h +++ b/native/cocos/renderer/pipeline/deferred/DeferredPipelineSceneData.h @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #pragma once #include "base/Ptr.h" diff --git a/native/cocos/renderer/pipeline/deferred/GbufferStage.cpp b/native/cocos/renderer/pipeline/deferred/GbufferStage.cpp index 94b458ca86..54edbf3664 100644 --- a/native/cocos/renderer/pipeline/deferred/GbufferStage.cpp +++ b/native/cocos/renderer/pipeline/deferred/GbufferStage.cpp @@ -1,18 +1,18 @@ /**************************************************************************** Copyright (c) 2020-2021 Huawei Technologies Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -48,8 +48,8 @@ RenderStageInfo GbufferStage::initInfo = { "GbufferStage", static_cast(DeferredStagePriority::GBUFFER), static_cast(RenderFlowTag::SCENE), - {{false, RenderQueueSortMode::FRONT_TO_BACK, {"default"}}, - {true, RenderQueueSortMode::BACK_TO_FRONT, {"default", "planarShadow"}}}}; + {ccnew RenderQueueDesc{false, RenderQueueSortMode::FRONT_TO_BACK, {"default"}}, + ccnew RenderQueueDesc{true, RenderQueueSortMode::BACK_TO_FRONT, {"default", "planarShadow"}}}}; const RenderStageInfo &GbufferStage::getInitializeInfo() { return GbufferStage::initInfo; } GbufferStage::GbufferStage() { @@ -70,9 +70,9 @@ void GbufferStage::activate(RenderPipeline *pipeline, RenderFlow *flow) { RenderStage::activate(pipeline, flow); for (const auto &descriptor : _renderQueueDescriptors) { - uint32_t phase = convertPhase(descriptor.stages); - RenderQueueSortFunc sortFunc = convertQueueSortFunc(descriptor.sortMode); - RenderQueueCreateInfo info = {descriptor.isTransparent, phase, sortFunc}; + uint32_t phase = convertPhase(descriptor->stages); + RenderQueueSortFunc sortFunc = convertQueueSortFunc(descriptor->sortMode); + RenderQueueCreateInfo info = {descriptor->isTransparent, phase, sortFunc}; _renderQueues.emplace_back(ccnew RenderQueue(_pipeline, std::move(info), true)); } _planarShadowQueue = ccnew PlanarShadowQueue(_pipeline); diff --git a/native/cocos/renderer/pipeline/deferred/GbufferStage.h b/native/cocos/renderer/pipeline/deferred/GbufferStage.h index fd3a737518..d0540251fa 100644 --- a/native/cocos/renderer/pipeline/deferred/GbufferStage.h +++ b/native/cocos/renderer/pipeline/deferred/GbufferStage.h @@ -1,18 +1,18 @@ /**************************************************************************** Copyright (c) 2020-2021 Huawei Technologies Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/deferred/LightingStage.cpp b/native/cocos/renderer/pipeline/deferred/LightingStage.cpp index 895d12252d..79d9b08d65 100644 --- a/native/cocos/renderer/pipeline/deferred/LightingStage.cpp +++ b/native/cocos/renderer/pipeline/deferred/LightingStage.cpp @@ -1,18 +1,18 @@ /**************************************************************************** Copyright (c) 2020-2021 Huawei Technologies Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -270,9 +270,9 @@ void LightingStage::activate(RenderPipeline *pipeline, RenderFlow *flow) { auto *const device = pipeline->getDevice(); for (const auto &descriptor : _renderQueueDescriptors) { - uint32_t phase = convertPhase(descriptor.stages); - RenderQueueSortFunc sortFunc = convertQueueSortFunc(descriptor.sortMode); - RenderQueueCreateInfo info = {descriptor.isTransparent, phase, sortFunc}; + uint32_t phase = convertPhase(descriptor->stages); + RenderQueueSortFunc sortFunc = convertQueueSortFunc(descriptor->sortMode); + RenderQueueCreateInfo info = {descriptor->isTransparent, phase, sortFunc}; _renderQueues.emplace_back(ccnew RenderQueue(_pipeline, std::move(info), true)); } diff --git a/native/cocos/renderer/pipeline/deferred/LightingStage.h b/native/cocos/renderer/pipeline/deferred/LightingStage.h index c6e22cf54d..3752ee887a 100644 --- a/native/cocos/renderer/pipeline/deferred/LightingStage.h +++ b/native/cocos/renderer/pipeline/deferred/LightingStage.h @@ -1,18 +1,18 @@ /**************************************************************************** Copyright (c) 2020-2021 Huawei Technologies Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/deferred/MainFlow.cpp b/native/cocos/renderer/pipeline/deferred/MainFlow.cpp index 5827b4ea3d..d7aa23b2ab 100644 --- a/native/cocos/renderer/pipeline/deferred/MainFlow.cpp +++ b/native/cocos/renderer/pipeline/deferred/MainFlow.cpp @@ -1,18 +1,18 @@ /**************************************************************************** Copyright (c) 2020-2021 Huawei Technologies Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/deferred/MainFlow.h b/native/cocos/renderer/pipeline/deferred/MainFlow.h index 3395e0bd16..fdea490daf 100644 --- a/native/cocos/renderer/pipeline/deferred/MainFlow.h +++ b/native/cocos/renderer/pipeline/deferred/MainFlow.h @@ -1,18 +1,18 @@ /**************************************************************************** Copyright (c) 2020-2021 Huawei Technologies Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/deferred/PostProcessStage.cpp b/native/cocos/renderer/pipeline/deferred/PostProcessStage.cpp index 383c69ce58..dbe407383d 100644 --- a/native/cocos/renderer/pipeline/deferred/PostProcessStage.cpp +++ b/native/cocos/renderer/pipeline/deferred/PostProcessStage.cpp @@ -1,19 +1,19 @@ /**************************************************************************** Copyright (c) 2020-2021 Huawei Technologies Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -55,7 +55,7 @@ RenderStageInfo PostProcessStage::initInfo = { STAGE_NAME, static_cast(DeferredStagePriority::POSTPROCESS), 0, - {{true, RenderQueueSortMode::BACK_TO_FRONT, {"default"}}}, + {ccnew RenderQueueDesc{true, RenderQueueSortMode::BACK_TO_FRONT, {"default"}}}, }; const RenderStageInfo &PostProcessStage::getInitializeInfo() { return PostProcessStage::initInfo; } @@ -77,12 +77,12 @@ void PostProcessStage::activate(RenderPipeline *pipeline, RenderFlow *flow) { for (const auto &descriptor : _renderQueueDescriptors) { uint32_t phase = 0; - for (const auto &stage : descriptor.stages) { + for (const auto &stage : descriptor->stages) { phase |= getPhaseID(stage); } std::function sortFunc = opaqueCompareFn; - switch (descriptor.sortMode) { + switch (descriptor->sortMode) { case RenderQueueSortMode::BACK_TO_FRONT: sortFunc = transparentCompareFn; break; @@ -92,7 +92,7 @@ void PostProcessStage::activate(RenderPipeline *pipeline, RenderFlow *flow) { break; } - RenderQueueCreateInfo info = {descriptor.isTransparent, phase, sortFunc}; + RenderQueueCreateInfo info = {descriptor->isTransparent, phase, sortFunc}; _renderQueues.emplace_back(ccnew RenderQueue(_pipeline, std::move(info))); } } diff --git a/native/cocos/renderer/pipeline/deferred/PostProcessStage.h b/native/cocos/renderer/pipeline/deferred/PostProcessStage.h index 292a9df811..3a601821bf 100644 --- a/native/cocos/renderer/pipeline/deferred/PostProcessStage.h +++ b/native/cocos/renderer/pipeline/deferred/PostProcessStage.h @@ -1,18 +1,18 @@ /**************************************************************************** Copyright (c) 2020-2021 Huawei Technologies Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/deferred/ReflectionComp.cpp b/native/cocos/renderer/pipeline/deferred/ReflectionComp.cpp index 2178cf4800..d6f8a48d99 100644 --- a/native/cocos/renderer/pipeline/deferred/ReflectionComp.cpp +++ b/native/cocos/renderer/pipeline/deferred/ReflectionComp.cpp @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #include "ReflectionComp.h" #include "../Define.h" #include "base/Log.h" diff --git a/native/cocos/renderer/pipeline/deferred/ReflectionComp.h b/native/cocos/renderer/pipeline/deferred/ReflectionComp.h index 0a16ffaff0..0de7b2acea 100644 --- a/native/cocos/renderer/pipeline/deferred/ReflectionComp.h +++ b/native/cocos/renderer/pipeline/deferred/ReflectionComp.h @@ -1,3 +1,27 @@ +/**************************************************************************** + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #pragma once #include "base/TypeDef.h" diff --git a/native/cocos/renderer/pipeline/forward/ForwardFlow.cpp b/native/cocos/renderer/pipeline/forward/ForwardFlow.cpp index e9c5b667f7..84f6f56243 100644 --- a/native/cocos/renderer/pipeline/forward/ForwardFlow.cpp +++ b/native/cocos/renderer/pipeline/forward/ForwardFlow.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -30,7 +29,7 @@ #include "profiler/Profiler.h" #if CC_USE_AR_MODULE -#include "pipeline/xr/ar/ARStage.h" + #include "pipeline/xr/ar/ARStage.h" #endif namespace cc { @@ -51,11 +50,11 @@ bool ForwardFlow::initialize(const RenderFlowInfo &info) { if (_stages.empty()) { _isResourceOwner = true; - #if CC_USE_AR_MODULE - auto *arStage = ccnew ARStage; - arStage->initialize(ARStage::getInitializeInfo()); - _stages.emplace_back(arStage); - #endif +#if CC_USE_AR_MODULE + auto *arStage = ccnew ARStage; + arStage->initialize(ARStage::getInitializeInfo()); + _stages.emplace_back(arStage); +#endif auto *forwardStage = ccnew ForwardStage; forwardStage->initialize(ForwardStage::getInitializeInfo()); _stages.emplace_back(forwardStage); diff --git a/native/cocos/renderer/pipeline/forward/ForwardFlow.h b/native/cocos/renderer/pipeline/forward/ForwardFlow.h index 7fbde8ae5a..d628551b3e 100644 --- a/native/cocos/renderer/pipeline/forward/ForwardFlow.h +++ b/native/cocos/renderer/pipeline/forward/ForwardFlow.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/forward/ForwardPipeline.cpp b/native/cocos/renderer/pipeline/forward/ForwardPipeline.cpp index a1d2753f5f..9257e4b26b 100644 --- a/native/cocos/renderer/pipeline/forward/ForwardPipeline.cpp +++ b/native/cocos/renderer/pipeline/forward/ForwardPipeline.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -29,13 +28,13 @@ #include "../PipelineUBO.h" #include "../SceneCulling.h" #include "../helper/Utils.h" +#include "../reflection-probe/ReflectionProbeFlow.h" #include "../shadow/ShadowFlow.h" #include "ForwardFlow.h" #include "gfx-base/GFXDevice.h" #include "profiler/Profiler.h" #include "scene/Camera.h" #include "scene/RenderScene.h" -#include "../reflection-probe/ReflectionProbeFlow.h" namespace cc { namespace pipeline { diff --git a/native/cocos/renderer/pipeline/forward/ForwardPipeline.h b/native/cocos/renderer/pipeline/forward/ForwardPipeline.h index af45f31a3a..cd325d470e 100644 --- a/native/cocos/renderer/pipeline/forward/ForwardPipeline.h +++ b/native/cocos/renderer/pipeline/forward/ForwardPipeline.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/forward/ForwardStage.cpp b/native/cocos/renderer/pipeline/forward/ForwardStage.cpp index f892d92ad4..1a5a47ecda 100644 --- a/native/cocos/renderer/pipeline/forward/ForwardStage.cpp +++ b/native/cocos/renderer/pipeline/forward/ForwardStage.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -52,8 +51,8 @@ RenderStageInfo ForwardStage::initInfo = { "ForwardStage", static_cast(ForwardStagePriority::FORWARD), static_cast(RenderFlowTag::SCENE), - {{false, RenderQueueSortMode::FRONT_TO_BACK, {"default"}}, - {true, RenderQueueSortMode::BACK_TO_FRONT, {"default", "planarShadow"}}}}; + {new RenderQueueDesc{false, RenderQueueSortMode::FRONT_TO_BACK, {"default"}}, + new RenderQueueDesc{true, RenderQueueSortMode::BACK_TO_FRONT, {"default", "planarShadow"}}}}; const RenderStageInfo &ForwardStage::getInitializeInfo() { return ForwardStage::initInfo; } ForwardStage::ForwardStage() { @@ -75,9 +74,9 @@ void ForwardStage::activate(RenderPipeline *pipeline, RenderFlow *flow) { RenderStage::activate(pipeline, flow); for (const auto &descriptor : _renderQueueDescriptors) { - uint32_t phase = convertPhase(descriptor.stages); - RenderQueueSortFunc sortFunc = convertQueueSortFunc(descriptor.sortMode); - RenderQueueCreateInfo info = {descriptor.isTransparent, phase, sortFunc}; + uint32_t phase = convertPhase(descriptor->stages); + RenderQueueSortFunc sortFunc = convertQueueSortFunc(descriptor->sortMode); + RenderQueueCreateInfo info = {descriptor->isTransparent, phase, sortFunc}; _renderQueues.emplace_back(ccnew RenderQueue(_pipeline, std::move(info), true)); } @@ -180,7 +179,7 @@ void ForwardStage::render(scene::Camera *camera) { auto clearFlags = static_cast(camera->getClearFlag()); data.outputTex = framegraph::TextureHandle(builder.readFromBlackboard(RenderPipeline::fgStrHandleOutColorTexture)); - if(!data.outputTex.isValid()) { + if (!data.outputTex.isValid()) { framegraph::Texture::Descriptor colorTexInfo; colorTexInfo.format = sceneData->isHDR() ? gfx::Format::RGBA16F : gfx::Format::RGBA8; colorTexInfo.usage = gfx::TextureUsageBit::COLOR_ATTACHMENT; diff --git a/native/cocos/renderer/pipeline/forward/ForwardStage.h b/native/cocos/renderer/pipeline/forward/ForwardStage.h index 7d5bdb9433..d3730fc5b2 100644 --- a/native/cocos/renderer/pipeline/forward/ForwardStage.h +++ b/native/cocos/renderer/pipeline/forward/ForwardStage.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/helper/Utils.cpp b/native/cocos/renderer/pipeline/helper/Utils.cpp index 317b780716..3c224906b3 100644 --- a/native/cocos/renderer/pipeline/helper/Utils.cpp +++ b/native/cocos/renderer/pipeline/helper/Utils.cpp @@ -1,26 +1,25 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #include "renderer/pipeline/helper/Utils.h" @@ -58,7 +57,7 @@ void renderProfiler(gfx::RenderPass *renderPass, gfx::CommandBuffer *cmdBuff, sc #if CC_EDITOR if (!(camera->getVisibility() & static_cast(pipeline::LayerList::PROFILER))) { - return; + return; } #else if (camera != profilerCamera) { diff --git a/native/cocos/renderer/pipeline/helper/Utils.h b/native/cocos/renderer/pipeline/helper/Utils.h index c904ea06cc..324fa01845 100644 --- a/native/cocos/renderer/pipeline/helper/Utils.h +++ b/native/cocos/renderer/pipeline/helper/Utils.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/reflection-probe/ReflectionProbeFlow.cpp b/native/cocos/renderer/pipeline/reflection-probe/ReflectionProbeFlow.cpp index 65b692d6f0..d27fe14909 100644 --- a/native/cocos/renderer/pipeline/reflection-probe/ReflectionProbeFlow.cpp +++ b/native/cocos/renderer/pipeline/reflection-probe/ReflectionProbeFlow.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -27,11 +26,11 @@ #include "ReflectionProbeStage.h" #include "pipeline/PipelineSceneData.h" -#include "scene/ReflectionProbeManager.h" #include "pipeline/RenderPipeline.h" #include "profiler/Profiler.h" #include "scene/Camera.h" #include "scene/ReflectionProbe.h" +#include "scene/ReflectionProbeManager.h" namespace cc { namespace pipeline { RenderFlowInfo ReflectionProbeFlow::initInfo = { @@ -63,8 +62,8 @@ void ReflectionProbeFlow::render(scene::Camera *camera) { CC_PROFILE(ReflectionProbeFlowRender); const auto *sceneData = _pipeline->getPipelineSceneData(); const auto probes = scene::ReflectionProbeManager::getInstance()->getAllProbes(); - for (auto * probe : probes) { - if (probe->needRender() && probe->getProbeType() == scene::ReflectionProbe::ProbeType::PLANAR) { + for (auto *probe : probes) { + if (probe->needRender()) { renderStage(camera, probe); } } @@ -72,11 +71,24 @@ void ReflectionProbeFlow::render(scene::Camera *camera) { void ReflectionProbeFlow::renderStage(scene::Camera *camera, scene::ReflectionProbe *probe) { for (auto &stage : _stages) { - auto * framebuffer = probe->getRealtimePlanarTexture()->getWindow()->getFramebuffer(); - auto *reflectionProbeStage = static_cast(stage.get()); - reflectionProbeStage->setUsage(framebuffer, probe); - reflectionProbeStage->render(camera); - probe->updatePlanarTexture(camera->getScene()); + if (probe->getProbeType() == scene::ReflectionProbe::ProbeType::PLANAR) { + auto *framebuffer = probe->getRealtimePlanarTexture()->getWindow()->getFramebuffer(); + auto *reflectionProbeStage = static_cast(stage.get()); + reflectionProbeStage->setUsage(framebuffer, probe); + reflectionProbeStage->render(camera); + probe->updatePlanarTexture(camera->getScene()); + } else { + //render the 6 faces of the cubemap + for (uint32_t faceIdx = 0; faceIdx < 6; faceIdx++) { + //update camera dirction + probe->updateCameraDir(faceIdx); + RenderTexture *rt = probe->getBakedCubeTextures()[faceIdx]; + auto *reflectionProbeStage = static_cast(stage.get()); + reflectionProbeStage->setUsage(rt->getWindow()->getFramebuffer(), probe); + reflectionProbeStage->render(camera); + } + probe->setNeedRender(false); + } } } diff --git a/native/cocos/renderer/pipeline/reflection-probe/ReflectionProbeFlow.h b/native/cocos/renderer/pipeline/reflection-probe/ReflectionProbeFlow.h index 8a6c40e8c4..112e5fd498 100644 --- a/native/cocos/renderer/pipeline/reflection-probe/ReflectionProbeFlow.h +++ b/native/cocos/renderer/pipeline/reflection-probe/ReflectionProbeFlow.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/reflection-probe/ReflectionProbeStage.cpp b/native/cocos/renderer/pipeline/reflection-probe/ReflectionProbeStage.cpp index be7ce6e013..54af9f38a5 100644 --- a/native/cocos/renderer/pipeline/reflection-probe/ReflectionProbeStage.cpp +++ b/native/cocos/renderer/pipeline/reflection-probe/ReflectionProbeStage.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -28,10 +27,10 @@ #include "../PipelineUBO.h" #include "../ReflectionProbeBatchedQueue.h" #include "../RenderPipeline.h" -#include "scene/ReflectionProbeManager.h" #include "profiler/Profiler.h" #include "scene/Camera.h" #include "scene/ReflectionProbe.h" +#include "scene/ReflectionProbeManager.h" namespace cc { namespace pipeline { @@ -47,8 +46,8 @@ const RenderStageInfo &ReflectionProbeStage::getInitializeInfo() { return Reflec bool ReflectionProbeStage::initialize(const RenderStageInfo &info) { RenderStage::initialize(info); - RenderQueueDesc descriptor = {true, RenderQueueSortMode::BACK_TO_FRONT, {"default"}}; - _renderQueueDescriptors.emplace_back(std::move(descriptor)); + auto *descriptor = ccnew RenderQueueDesc{true, RenderQueueSortMode::BACK_TO_FRONT, {"default"}}; + _renderQueueDescriptors.emplace_back(descriptor); return true; } @@ -66,15 +65,17 @@ void ReflectionProbeStage::render(scene::Camera *camera) { auto *cmdBuffer = _pipeline->getCommandBuffers()[0]; _reflectionProbeBatchedQueue->gatherRenderObjects(camera, cmdBuffer, _probe); - _pipeline->getPipelineUBO()->updateCameraUBO(_probe->getCamera(), camera->getScene()); _renderArea.x = 0; _renderArea.y = 0; - _renderArea.width = _probe->getRealtimePlanarTexture()->getWidth(); - _renderArea.height = _probe->getRealtimePlanarTexture()->getHeight(); + _renderArea.width = _probe->getRenderArea().x; + _renderArea.height = _probe->getRenderArea().y; + + if (hasFlag(static_cast(_probe->getCamera()->getClearFlag()), gfx::ClearFlagBit::COLOR)) { + _clearColors[0] = _probe->getCamera()->getClearColor(); + } - _clearColors[0] = _probe->getCamera()->getClearColor(); auto *renderPass = _framebuffer->getRenderPass(); cmdBuffer->beginRenderPass(renderPass, _framebuffer, _renderArea, diff --git a/native/cocos/renderer/pipeline/reflection-probe/ReflectionProbeStage.h b/native/cocos/renderer/pipeline/reflection-probe/ReflectionProbeStage.h index 9cdb7d0791..d6e23fbc09 100644 --- a/native/cocos/renderer/pipeline/reflection-probe/ReflectionProbeStage.h +++ b/native/cocos/renderer/pipeline/reflection-probe/ReflectionProbeStage.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/shadow/CSMLayers.cpp b/native/cocos/renderer/pipeline/shadow/CSMLayers.cpp index 8e7241f76e..ee1c7c3692 100644 --- a/native/cocos/renderer/pipeline/shadow/CSMLayers.cpp +++ b/native/cocos/renderer/pipeline/shadow/CSMLayers.cpp @@ -1,15 +1,16 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE diff --git a/native/cocos/renderer/pipeline/shadow/CSMLayers.h b/native/cocos/renderer/pipeline/shadow/CSMLayers.h index 12ea74d531..065dd1b4e5 100644 --- a/native/cocos/renderer/pipeline/shadow/CSMLayers.h +++ b/native/cocos/renderer/pipeline/shadow/CSMLayers.h @@ -1,15 +1,16 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -151,7 +152,7 @@ private: // The ShadowTransformInfo object for 'fixed area shadow' || 'maximum clipping info' || 'CSM layers = 1'. ShadowTransformInfo *_specialLayer{nullptr}; - + float _shadowDistance{0.0F}; ccstd::array _layers{}; diff --git a/native/cocos/renderer/pipeline/shadow/ShadowFlow.cpp b/native/cocos/renderer/pipeline/shadow/ShadowFlow.cpp index 478ca437f5..6aa1c7226d 100644 --- a/native/cocos/renderer/pipeline/shadow/ShadowFlow.cpp +++ b/native/cocos/renderer/pipeline/shadow/ShadowFlow.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/shadow/ShadowFlow.h b/native/cocos/renderer/pipeline/shadow/ShadowFlow.h index 1d9b7315ee..b58ef926f2 100644 --- a/native/cocos/renderer/pipeline/shadow/ShadowFlow.h +++ b/native/cocos/renderer/pipeline/shadow/ShadowFlow.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/shadow/ShadowStage.cpp b/native/cocos/renderer/pipeline/shadow/ShadowStage.cpp index a1a890607f..440050f51d 100644 --- a/native/cocos/renderer/pipeline/shadow/ShadowStage.cpp +++ b/native/cocos/renderer/pipeline/shadow/ShadowStage.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -54,8 +53,8 @@ const RenderStageInfo &ShadowStage::getInitializeInfo() { return ShadowStage::in bool ShadowStage::initialize(const RenderStageInfo &info) { RenderStage::initialize(info); - RenderQueueDesc descriptor = {true, RenderQueueSortMode::BACK_TO_FRONT, {"default"}}; - _renderQueueDescriptors.emplace_back(std::move(descriptor)); + auto *descriptor = ccnew RenderQueueDesc(true, RenderQueueSortMode::BACK_TO_FRONT, {"default"}); + _renderQueueDescriptors.emplace_back(descriptor); return true; } diff --git a/native/cocos/renderer/pipeline/shadow/ShadowStage.h b/native/cocos/renderer/pipeline/shadow/ShadowStage.h index 4e8d0f9fc8..236c8f0a8d 100644 --- a/native/cocos/renderer/pipeline/shadow/ShadowStage.h +++ b/native/cocos/renderer/pipeline/shadow/ShadowStage.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/renderer/pipeline/xr/ar/ARBackground.cpp b/native/cocos/renderer/pipeline/xr/ar/ARBackground.cpp index edc739517d..4c22a484b4 100644 --- a/native/cocos/renderer/pipeline/xr/ar/ARBackground.cpp +++ b/native/cocos/renderer/pipeline/xr/ar/ARBackground.cpp @@ -1,26 +1,26 @@ /**************************************************************************** - * Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. - * - * http://www.cocos.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - ****************************************************************************/ + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ #include "pipeline/xr/ar/ARBackground.h" #include "ar/ARModule.h" @@ -281,7 +281,7 @@ void ARBackground::render(cc::scene::Camera *camera, gfx::RenderPass *renderPass if (apiState < 0) return; #if CC_PLATFORM == CC_PLATFORM_ANDROID - if (!_setTexFlag) { + if (armodule->getTexInitFlag()) { gfx::SamplerInfo samplerInfo; auto *sampler = _device->getSampler(samplerInfo); armodule->setCameraTextureName(static_cast(_glTex)); @@ -299,10 +299,10 @@ void ARBackground::render(cc::scene::Camera *camera, gfx::RenderPass *renderPass _descriptorSet->bindTexture(1, backgroundTex); _descriptorSet->update(); - _setTexFlag = true; + armodule->resetTexInitFlag(); } #elif CC_PLATFORM == CC_PLATFORM_MAC_IOS - if (!_setTexFlag) { + if (armodule->getTexInitFlag()) { auto *pixelBuffer = armodule->getCameraTextureRef(); if (pixelBuffer != nullptr) { gfx::SamplerInfo samplerInfo; @@ -336,7 +336,7 @@ void ARBackground::render(cc::scene::Camera *camera, gfx::RenderPass *renderPass _descriptorSet->bindBuffer(2, _ycbcrTransferBuffer); _descriptorSet->update(); - _setTexFlag = true; + armodule->resetTexInitFlag(); } } #endif @@ -396,11 +396,11 @@ T &ARBackground::getAppropriateShaderSource(ShaderSources &sources) { void ARBackground::destroy() { CC_SAFE_DESTROY_AND_DELETE(_shader); CC_SAFE_DESTROY_AND_DELETE(_vertexBuffer); -#if CC_PLATFORM == CC_PLATFORM_ANDROID +#if CC_PLATFORM == CC_PLATFORM_ANDROID CC_SAFE_DESTROY_AND_DELETE(_uniformBuffer); #elif CC_PLATFORM == CC_PLATFORM_MAC_IOS CC_SAFE_DESTROY_AND_DELETE(_ycbcrTransferBuffer); -#endif +#endif CC_SAFE_DESTROY_AND_DELETE(_inputAssembler); CC_SAFE_DESTROY_AND_DELETE(_descriptorSetLayout); CC_SAFE_DESTROY_AND_DELETE(_descriptorSet); diff --git a/native/cocos/renderer/pipeline/xr/ar/ARBackground.h b/native/cocos/renderer/pipeline/xr/ar/ARBackground.h index 9d37205663..3a4b94c963 100644 --- a/native/cocos/renderer/pipeline/xr/ar/ARBackground.h +++ b/native/cocos/renderer/pipeline/xr/ar/ARBackground.h @@ -1,26 +1,26 @@ /**************************************************************************** - * Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. - * - * http://www.cocos.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - ****************************************************************************/ + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ #pragma once @@ -73,8 +73,6 @@ private: gfx::PipelineLayout* _pipelineLayout{nullptr}; gfx::PipelineState* _pipelineState{nullptr}; - bool _setTexFlag = false; - #if CC_PLATFORM == CC_PLATFORM_ANDROID gfx::Buffer* _uniformBuffer{nullptr}; GLuint _glTex{0U}; diff --git a/native/cocos/renderer/pipeline/xr/ar/ARStage.cpp b/native/cocos/renderer/pipeline/xr/ar/ARStage.cpp index c15d2f8e54..0ccde60007 100644 --- a/native/cocos/renderer/pipeline/xr/ar/ARStage.cpp +++ b/native/cocos/renderer/pipeline/xr/ar/ARStage.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -25,17 +24,17 @@ #include "pipeline/xr/ar/ARStage.h" #include "ar/ARModule.h" -#include "pipeline/xr/ar/ARBackground.h" -#include "pipeline/Enum.h" -#include "pipeline/PipelineSceneData.h" -#include "pipeline/PipelineUBO.h" -#include "pipeline/forward/ForwardPipeline.h" #include "core/scene-graph/Node.h" #include "gfx-base/GFXCommandBuffer.h" #include "gfx-base/GFXDef-common.h" #include "gfx-base/GFXFramebuffer.h" #include "gfx-base/GFXTexture.h" +#include "pipeline/Enum.h" +#include "pipeline/PipelineSceneData.h" +#include "pipeline/PipelineUBO.h" #include "pipeline/RenderPipeline.h" +#include "pipeline/forward/ForwardPipeline.h" +#include "pipeline/xr/ar/ARBackground.h" #include "scene/Camera.h" #include "scene/RenderWindow.h" @@ -123,7 +122,7 @@ void ARStage::render(scene::Camera *camera) { data.depth = builder.create(RenderPipeline::fgStrHandleOutDepthTexture, depthTexInfo); data.depth = builder.write(data.depth, depthAttachmentInfo); - + builder.writeToBlackboard(RenderPipeline::fgStrHandleOutColorTexture, data.outputTex); builder.writeToBlackboard(RenderPipeline::fgStrHandleOutDepthTexture, data.depth); builder.setViewport(_pipeline->getViewport(camera), _pipeline->getScissor(camera)); diff --git a/native/cocos/renderer/pipeline/xr/ar/ARStage.h b/native/cocos/renderer/pipeline/xr/ar/ARStage.h index 0b017b34ba..f97a86b81c 100644 --- a/native/cocos/renderer/pipeline/xr/ar/ARStage.h +++ b/native/cocos/renderer/pipeline/xr/ar/ARStage.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/scene/Ambient.cpp b/native/cocos/scene/Ambient.cpp index 997a6b5f32..0322bd1ec7 100644 --- a/native/cocos/scene/Ambient.cpp +++ b/native/cocos/scene/Ambient.cpp @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #include "scene/Ambient.h" #include "core/Root.h" diff --git a/native/cocos/scene/Ambient.h b/native/cocos/scene/Ambient.h index 3633ac1b4f..6c9f91d228 100644 --- a/native/cocos/scene/Ambient.h +++ b/native/cocos/scene/Ambient.h @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once diff --git a/native/cocos/scene/Camera.cpp b/native/cocos/scene/Camera.cpp index eb8af00771..d156894109 100644 --- a/native/cocos/scene/Camera.cpp +++ b/native/cocos/scene/Camera.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #include "scene/Camera.h" #include "core/Root.h" @@ -157,7 +156,6 @@ void Camera::syncCameraEditor(const Camera *camera) { _matProjInv = camera->_matProjInv; _matViewProj = camera->_matViewProj; #endif - } void Camera::update(bool forceUpdate /*false*/) { @@ -397,12 +395,13 @@ Mat4 Camera::worldMatrixToScreen(const Mat4 &worldMatrix, uint32_t width, uint32 * @zh 计算并设置斜视锥体投影矩阵 * @param clipPlane clip plane in camera space */ -void Camera::calculateObliqueMat(const Vec4& viewSpacePlane) { - Vec4 far{math::sgn(viewSpacePlane.x), math::sgn(viewSpacePlane.y), 1.F, 1.F}; +void Camera::calculateObliqueMat(const Vec4 &viewSpacePlane) { + float clipSpaceMinZ = _device->getCapabilities().clipSpaceMinZ; + Vec4 far{math::sgn(viewSpacePlane.x), math::sgn(viewSpacePlane.y), 1.F, 0.F}; _matProjInv.transformVector(&far); - const Vec4 m4 = {_matProj.m[3], _matProj.m[7], _matProj.m[11], _matProj.m[15]}; + const Vec4 m4 = {_matProj.m[3], _matProj.m[7], clipSpaceMinZ, _matProj.m[15]}; const float scale = 2.F / Vec4::dot(viewSpacePlane, far); const Vec4 newViewSpaceNearPlane = viewSpacePlane * scale; diff --git a/native/cocos/scene/Camera.h b/native/cocos/scene/Camera.h index be53507bd5..36439e3158 100644 --- a/native/cocos/scene/Camera.h +++ b/native/cocos/scene/Camera.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -365,7 +364,8 @@ public: inline bool isCullingEnabled() const { return _isCullingEnabled; } inline void setCullingEnable(bool val) { _isCullingEnabled = val; } - void calculateObliqueMat(const Vec4& viewSpacePlane); + void calculateObliqueMat(const Vec4 &viewSpacePlane); + protected: void setExposure(float ev100); diff --git a/native/cocos/scene/Define.cpp b/native/cocos/scene/Define.cpp index 06cd13340c..0ec3327ef8 100644 --- a/native/cocos/scene/Define.cpp +++ b/native/cocos/scene/Define.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/scene/Define.h b/native/cocos/scene/Define.h index 84504802e9..677d7457d1 100644 --- a/native/cocos/scene/Define.h +++ b/native/cocos/scene/Define.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once diff --git a/native/cocos/scene/DirectionalLight.cpp b/native/cocos/scene/DirectionalLight.cpp index 4d35cfc5a3..03844e4345 100644 --- a/native/cocos/scene/DirectionalLight.cpp +++ b/native/cocos/scene/DirectionalLight.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/scene/DirectionalLight.h b/native/cocos/scene/DirectionalLight.h index 7846b9ec60..50c6da0bb9 100644 --- a/native/cocos/scene/DirectionalLight.h +++ b/native/cocos/scene/DirectionalLight.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/scene/DrawBatch2D.cpp b/native/cocos/scene/DrawBatch2D.cpp index 30757c7ee1..7266484adc 100644 --- a/native/cocos/scene/DrawBatch2D.cpp +++ b/native/cocos/scene/DrawBatch2D.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/scene/DrawBatch2D.h b/native/cocos/scene/DrawBatch2D.h index 086ce4a07c..cda702f309 100644 --- a/native/cocos/scene/DrawBatch2D.h +++ b/native/cocos/scene/DrawBatch2D.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/scene/Fog.cpp b/native/cocos/scene/Fog.cpp index 7d6c744214..23e7c03b56 100644 --- a/native/cocos/scene/Fog.cpp +++ b/native/cocos/scene/Fog.cpp @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #include "scene/Fog.h" #include "core/Root.h" diff --git a/native/cocos/scene/Fog.h b/native/cocos/scene/Fog.h index a71deffdd8..0328b0489e 100644 --- a/native/cocos/scene/Fog.h +++ b/native/cocos/scene/Fog.h @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once diff --git a/native/cocos/scene/LODGroup.cpp b/native/cocos/scene/LODGroup.cpp index e2916b0421..ebf336a7b4 100644 --- a/native/cocos/scene/LODGroup.cpp +++ b/native/cocos/scene/LODGroup.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -42,7 +41,6 @@ LODGroup::LODGroup() = default; LODGroup::~LODGroup() = default; - int8_t LODGroup::getVisibleLODLevel(const Camera *camera) const { float screenUsagePercentage = getScreenUsagePercentage(camera); @@ -88,6 +86,17 @@ float LODGroup::getWorldSpaceSize() const { } void LODGroup::lockLODLevels(ccstd::vector &levels) { + if (levels.size() != _vecLockedLevels.size()) { + _isLockLevelChanged = true; + } else { + auto size = levels.size(); + for (int index = 0; index < size; index++) { + if (levels[index] != _vecLockedLevels[index]) { + _isLockLevelChanged = true; + break; + } + } + } _vecLockedLevels.clear(); _vecLockedLevels.insert(_vecLockedLevels.begin(), levels.begin(), levels.end()); } diff --git a/native/cocos/scene/LODGroup.h b/native/cocos/scene/LODGroup.h index 15773e54c5..a96fe42945 100644 --- a/native/cocos/scene/LODGroup.h +++ b/native/cocos/scene/LODGroup.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -83,8 +82,10 @@ public: int8_t getVisibleLODLevel(const Camera *camera) const; - inline const ccstd::vector& getLockedLODLevels() const { return _vecLockedLevels; } + inline const ccstd::vector &getLockedLODLevels() const { return _vecLockedLevels; } void lockLODLevels(ccstd::vector &levels); + inline bool isLockLevelChanged() const { return _isLockLevelChanged; } + inline void resetLockChangeFlag() { _isLockLevelChanged = false; } inline uint8_t getLodCount() const { return _vecLODData.size(); } inline void clearLODs() { _vecLODData.clear(); } @@ -104,6 +105,7 @@ private: Vec3 _localBoundaryCenter; float _objectSize{1.F}; bool _enabled{true}; + bool _isLockLevelChanged{false}; CC_DISALLOW_COPY_MOVE_ASSIGN(LODGroup); }; diff --git a/native/cocos/scene/Light.cpp b/native/cocos/scene/Light.cpp index b7a054cdc7..bb513c0dda 100644 --- a/native/cocos/scene/Light.cpp +++ b/native/cocos/scene/Light.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/scene/Light.h b/native/cocos/scene/Light.h index 67d251b39b..3939ea4b2f 100644 --- a/native/cocos/scene/Light.h +++ b/native/cocos/scene/Light.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/scene/Model.cpp b/native/cocos/scene/Model.cpp index cc178cacc3..e2496e091e 100644 --- a/native/cocos/scene/Model.cpp +++ b/native/cocos/scene/Model.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #include "base/std/container/array.h" // #include "core/Director.h" @@ -573,7 +572,7 @@ void Model::updateLocalShadowBias() { _localDataUpdated = true; } -void Model::updateReflctionProbeCubemap(TextureCube *texture) { +void Model::updateReflectionProbeCubemap(TextureCube *texture) { _localDataUpdated = true; if (texture == nullptr) { texture = BuiltinResMgr::getInstance()->get(ccstd::string("default-cube-texture")); @@ -589,7 +588,7 @@ void Model::updateReflctionProbeCubemap(TextureCube *texture) { } } } -void Model::updateReflctionProbePlanarMap(gfx::Texture *texture) { +void Model::updateReflectionProbePlanarMap(gfx::Texture *texture) { _localDataUpdated = true; gfx::Texture *bindingTexture = texture; diff --git a/native/cocos/scene/Model.h b/native/cocos/scene/Model.h index 3f224c84a7..7d12f90498 100644 --- a/native/cocos/scene/Model.h +++ b/native/cocos/scene/Model.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -32,6 +31,7 @@ #include "core/TypedArray.h" #include "core/assets/RenderingSubMesh.h" #include "core/assets/Texture2D.h" +#include "core/assets/TextureCube.h" #include "core/builtin/BuiltinResMgr.h" #include "core/event/EventTarget.h" #include "core/geometry/AABB.h" @@ -41,7 +41,6 @@ #include "renderer/gfx-base/GFXDef-common.h" #include "renderer/gfx-base/GFXTexture.h" #include "scene/SubModel.h" -#include "core/assets/TextureCube.h" namespace cc { @@ -114,8 +113,8 @@ public: void updateOctree(); void updateWorldBoundUBOs(); void updateLocalShadowBias(); - void updateReflctionProbeCubemap(TextureCube *texture); - void updateReflctionProbePlanarMap(gfx::Texture *texture); + void updateReflectionProbeCubemap(TextureCube *texture); + void updateReflectionProbePlanarMap(gfx::Texture *texture); inline void attachToScene(RenderScene *scene) { _scene = scene; diff --git a/native/cocos/scene/Octree.cpp b/native/cocos/scene/Octree.cpp index 31d831fb95..f34cce419a 100644 --- a/native/cocos/scene/Octree.cpp +++ b/native/cocos/scene/Octree.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #include "Octree.h" #include diff --git a/native/cocos/scene/Octree.h b/native/cocos/scene/Octree.h index be89d87707..190666fd59 100644 --- a/native/cocos/scene/Octree.h +++ b/native/cocos/scene/Octree.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2020-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once diff --git a/native/cocos/scene/Pass.cpp b/native/cocos/scene/Pass.cpp index d2c3d108e5..7ea68c06fe 100644 --- a/native/cocos/scene/Pass.cpp +++ b/native/cocos/scene/Pass.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,10 +20,11 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #include "scene/Pass.h" #include "base/std/hash/hash.h" +#include "cocos/bindings/jswrapper/SeApi.h" #include "core/Root.h" #include "core/assets/TextureBase.h" #include "core/builtin/BuiltinResMgr.h" @@ -37,7 +37,6 @@ #include "renderer/pipeline/Define.h" #include "renderer/pipeline/InstancedBuffer.h" #include "scene/Define.h" -#include "cocos/bindings/jswrapper/SeApi.h" namespace cc { namespace scene { @@ -335,7 +334,7 @@ void Pass::resetUniform(const ccstd::string &name) { const uint32_t ofs = Pass::getOffsetFromHandle(handle); const uint32_t count = Pass::getCountFromHandle(handle); auto &block = _blocks[binding]; - IPropertyValue givenDefaultOpt; + ccstd::optional givenDefaultOpt; auto iter = _properties.find(name); if (iter != _properties.end()) { givenDefaultOpt = iter->second.value; @@ -347,7 +346,7 @@ void Pass::resetUniform(const ccstd::string &name) { const auto &floatArr = ccstd::get>(value); auto iter = type2writer.find(type); if (iter != type2writer.end()) { - CC_ASSERT_EQ(floatArr.size() , 2); + CC_ASSERT_EQ(floatArr.size(), 2); iter->second(block.data, toMaterialProperty(type, floatArr), static_cast(ofs)); } } diff --git a/native/cocos/scene/Pass.h b/native/cocos/scene/Pass.h index 18ada8ae06..1ca1003995 100644 --- a/native/cocos/scene/Pass.h +++ b/native/cocos/scene/Pass.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/scene/ReflectionProbe.cpp b/native/cocos/scene/ReflectionProbe.cpp index 1c83c937f2..9043104fee 100644 --- a/native/cocos/scene/ReflectionProbe.cpp +++ b/native/cocos/scene/ReflectionProbe.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #include "scene/ReflectionProbe.h" #include "Define.h" @@ -30,9 +29,25 @@ #include "scene/ReflectionProbeManager.h" namespace cc { namespace scene { +// right left up down front back +const std::array CAMERA_DIR{ + Vec3(0, -90, 0), + Vec3(0, 90, 0), + Vec3(90, 0, 0), + Vec3(-90, 0, 0), + Vec3(0, 0, 0), + Vec3(0, 180, 0)}; ReflectionProbe::ReflectionProbe(int32_t id) { _probeId = id; - scene::ReflectionProbeManager::getInstance()->registerProbe(this); +} + +void ReflectionProbe::setResolution(int32_t resolution) { + if (_resolution != resolution) { + for (const auto& rt : _bakedCubeTextures) { + rt->resize(resolution, resolution); + } + _resolution = resolution; + } } void ReflectionProbe::initialize(Node* probeNode, Node* cameraNode) { @@ -88,12 +103,15 @@ void ReflectionProbe::syncCameraParams(const Camera* camera) { _camera->setClearFlag(camera->getClearFlag()); _camera->setClearColor(camera->getClearColor()); _camera->setPriority(camera->getPriority() - 1); + _camera->changeTargetWindow(_realtimePlanarTexture->getWindow()); + _camera->resize(camera->getWidth(), camera->getHeight()); } void ReflectionProbe::renderPlanarReflection(const Camera* sourceCamera) { if (!sourceCamera) return; syncCameraParams(sourceCamera); transformReflectionCamera(sourceCamera); + packBackgroundColor(); _needRender = true; } @@ -126,7 +144,7 @@ void ReflectionProbe::transformReflectionCamera(const Camera* sourceCamera) { _camera->update(true); // Transform the plane from world space to reflection camera space use the inverse transpose matrix - Vec4 viewSpaceProbe{ Vec3::UNIT_Y.x, Vec3::UNIT_Y.y, Vec3::UNIT_Y.z, -Vec3::dot(Vec3::UNIT_Y, _node->getWorldPosition()) }; + Vec4 viewSpaceProbe{Vec3::UNIT_Y.x, Vec3::UNIT_Y.y, Vec3::UNIT_Y.z, -Vec3::dot(Vec3::UNIT_Y, _node->getWorldPosition())}; Mat4 matView = _camera->getMatView(); matView.inverse(); matView.transpose(); @@ -165,9 +183,9 @@ void ReflectionProbe::updatePlanarTexture(const scene::RenderScene* scene) { if (!modelWorldBounds) { continue; } - const auto *probeBoundingBox = getBoundingBox(); + const auto* probeBoundingBox = getBoundingBox(); if (modelWorldBounds->aabbAabb(*probeBoundingBox)) { - model->updateReflctionProbePlanarMap(_realtimePlanarTexture->getGFXTexture()); + model->updateReflectionProbePlanarMap(_realtimePlanarTexture->getGFXTexture()); } } } @@ -184,8 +202,95 @@ void ReflectionProbe::destroy() { _realtimePlanarTexture->destroy(); _realtimePlanarTexture = nullptr; } + for (const auto& rt : _bakedCubeTextures) { + rt->destroy(); + } + _bakedCubeTextures.clear(); +} + +void ReflectionProbe::enable() { + scene::ReflectionProbeManager::getInstance()->registerProbe(this); +} +void ReflectionProbe::disable() { scene::ReflectionProbeManager::getInstance()->unRegisterProbe(this); } +void ReflectionProbe::initBakedTextures() { + if (_bakedCubeTextures.empty()) { + for (uint32_t i = 0; i < 6; i++) { + auto* rt = ccnew RenderTexture(); + IRenderTextureCreateInfo info; + info.name = "capture"; + info.height = _resolution; + info.width = _resolution; + rt->initialize(info); + _bakedCubeTextures.emplace_back(rt); + } + } +} +void ReflectionProbe::resetCameraParams() { + _camera->setProjectionType(CameraProjection::PERSPECTIVE); + _camera->setOrthoHeight(10.F); + _camera->setNearClip(1.F); + _camera->setFarClip(1000.F); + _camera->setFov(static_cast(mathutils::toRadian(90.F))); + _camera->setPriority(0); + if (!_bakedCubeTextures.empty()) { + _camera->changeTargetWindow(_bakedCubeTextures[0]->getWindow()); + } + _camera->resize(_resolution, _resolution); + _camera->setVisibility(_visibility); + + _camera->setClearColor(_backgroundColor); + _camera->setClearDepth(1.F); + _camera->setClearStencil(0.F); + _camera->setClearFlag(_clearFlag); + + _camera->setAperture(CameraAperture::F16_0); + _camera->setShutter(CameraShutter::D125); + _camera->setIso(CameraISO::ISO100); + + _cameraNode->setWorldPosition(_node->getWorldPosition()); + _cameraNode->setWorldRotation(_node->getWorldRotation()); + _camera->update(true); +} +void ReflectionProbe::captureCubemap() { + initBakedTextures(); + resetCameraParams(); + packBackgroundColor(); + _needRender = true; +} + +void ReflectionProbe::updateCameraDir(int32_t faceIdx) { + _cameraNode->setRotationFromEuler(CAMERA_DIR[faceIdx]); + _camera->update(true); +} + +Vec2 ReflectionProbe::getRenderArea() const { + if (_probeType == ProbeType::PLANAR) { + return Vec2(_realtimePlanarTexture->getWidth(), _realtimePlanarTexture->getHeight()); + } + return Vec2(_resolution, _resolution); +} + +void ReflectionProbe::packBackgroundColor() { + Vec3 rgb{_camera->getClearColor().x, _camera->getClearColor().y, _camera->getClearColor().z}; + float maxComp = std::max(std::max(rgb.x, rgb.y), rgb.z); + float e = 128.F; + if (maxComp > 0.0001) { + e = std::log(maxComp) / std::log(1.1F); + e = std::ceil(e); + e = std::clamp(e + 128.F, 0.F, 255.F); + } + float sc = 1.F / std::pow(1.1F, e - 128.F); + Vec3 encode{std::clamp(rgb * sc, Vec3(0.F, 0.F, 0.F), Vec3(1.F, 1.F, 1.F))}; + encode *= 255.F; + Vec3 fVec3{std::floor(encode.x), std::floor(encode.y), std::floor(encode.z)}; + Vec3 sub(encode - fVec3); + Vec3 stepVec3 = sub < Vec3(0.5F, 0.5F, 0.5F) ? Vec3(0.5F, 0.5F, 0.5F) : sub; + Vec3 encodeRounded(fVec3 + stepVec3); + _camera->setClearColor(gfx::Color{encodeRounded.x / 255.F, encodeRounded.y / 255.F, encodeRounded.z / 255.F, e / 255.F}); +} + } // namespace scene } // namespace cc diff --git a/native/cocos/scene/ReflectionProbe.h b/native/cocos/scene/ReflectionProbe.h index ed63567eb9..62ded01d78 100644 --- a/native/cocos/scene/ReflectionProbe.h +++ b/native/cocos/scene/ReflectionProbe.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once @@ -58,20 +57,26 @@ public: } inline ProbeType getProbeType() const { return _probeType; } inline int32_t getProbeId() const { return _probeId; } - inline void setResolution(int32_t resolution) { _resolution = resolution; } + void setResolution(int32_t resolution); inline int32_t getResolution() const { return _resolution; } /** * @en Clearing flags of the camera, specifies which part of the framebuffer will be actually cleared every frame. * @zh 相机的缓冲清除标志位,指定帧缓冲的哪部分要每帧清除。 */ - inline void setClearFlag(gfx::ClearFlagBit value) { _clearFlag = value; } + inline void setClearFlag(gfx::ClearFlagBit value) { + _clearFlag = value; + _camera->setClearFlag(_clearFlag); + } inline gfx::ClearFlagBit getClearFlag() const { return _clearFlag; } /** * @en Clearing color of the camera. * @zh 相机的颜色缓冲默认值。 */ - inline void setBackgroundColor(gfx::Color& val) { _backgroundColor = val; } + inline void setBackgroundColor(gfx::Color& val) { + _backgroundColor = val; + _camera->setClearColor(val); + } inline const gfx::Color& getBackgroundColor() const { return _backgroundColor; } /** @@ -98,10 +103,11 @@ public: inline Node* getNode() { return _node; } inline const Camera* getCamera() const { return _camera; } inline bool needRender() const { return _needRender; } + inline void setNeedRender(bool b) { _needRender = b; } inline const geometry::AABB* getBoundingBox() const { return _boundingBox; } inline void setCameraNode(Node* val) { _cameraNode = val; } - inline Node* getCameraNode()const { return _cameraNode; } + inline Node* getCameraNode() const { return _cameraNode; } inline void setPreviewSphere(Node* val) { _previewSphere = val; } inline const Node* getPreviewSphere() const { return _previewSphere; } @@ -109,6 +115,9 @@ public: inline void setPreviewPlane(Node* val) { _previewPlane = val; } inline const Node* getPreviewPlane() const { return _previewPlane; } + inline void setCubeMap(cc::TextureCube* cubeMap) { _cubemap = cubeMap; } + inline const cc::TextureCube* getCubeMap() const { return _cubemap; } + inline RenderTexture* getRealtimePlanarTexture() const { return _realtimePlanarTexture; } void updateBoundingBox(); void syncCameraParams(const Camera* camera); @@ -120,13 +129,25 @@ public: void updatePlanarTexture(const scene::RenderScene* scene); void destroy(); + void enable(); + void disable(); inline bool validate() const { return _cubemap != nullptr; } + void initBakedTextures(); + void captureCubemap(); + + inline const ccstd::vector>& getBakedCubeTextures() const { return _bakedCubeTextures; } + void resetCameraParams(); + void updateCameraDir(int32_t faceIdx); + Vec2 getRenderArea() const; + void packBackgroundColor(); + private: + ccstd::vector> _bakedCubeTextures; IntrusivePtr _realtimePlanarTexture{nullptr}; - int32_t _resolution = 512; + int32_t _resolution = 256; gfx::ClearFlagBit _clearFlag = gfx::ClearFlagBit::NONE; gfx::Color _backgroundColor{1.0, 1.0, 1.0, 1.0}; int32_t _visibility = 0; diff --git a/native/cocos/scene/ReflectionProbeManager.cpp b/native/cocos/scene/ReflectionProbeManager.cpp index b5b49ca679..3cc4ebadc5 100644 --- a/native/cocos/scene/ReflectionProbeManager.cpp +++ b/native/cocos/scene/ReflectionProbeManager.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/scene/ReflectionProbeManager.h b/native/cocos/scene/ReflectionProbeManager.h index cd2fb2b8df..e6827b9e8c 100644 --- a/native/cocos/scene/ReflectionProbeManager.h +++ b/native/cocos/scene/ReflectionProbeManager.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/scene/RenderScene.cpp b/native/cocos/scene/RenderScene.cpp index cd8cf33dac..78b0399c85 100644 --- a/native/cocos/scene/RenderScene.cpp +++ b/native/cocos/scene/RenderScene.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #include "scene/RenderScene.h" #include "scene/Camera.h" @@ -46,6 +45,77 @@ namespace cc { namespace scene { + +/** + * @zh 管理LODGroup的使用状态,包含使用层级及其上的model可见相机列表;便于判断当前model是否被LODGroup裁剪 + * @en Manage the usage status of LODGroup, including the usage level and the list of visible cameras on its models; easy to determine whether the current mod is cropped by LODGroup。 + */ +class LodStateCache : public RefCounted { +public: + struct ModelInfo { + /** + * @zh model 所属的 LOD 层级 + * @en LOD level of the model。 + */ + int8_t ownerLodLevel{-1}; + const LODGroup *lodGroup{nullptr}; + /** + * @zh model 能被看到的相机列表 + * @en List of cameras that model can be seen. + */ + ccstd::unordered_map visibleCameras; + }; + + struct LODInfo { + /** + * @zh 当前使用哪一级的 LOD, -1 表示没有层级被使用 + * @en Which level of LOD is currently in use, -1 means no levels are used + */ + int8_t usedLevel{-1}; + bool transformDirty{true}; + }; + + explicit LodStateCache(RenderScene *scene) : _renderScene(scene){}; + ~LodStateCache() override = default; + + void addCamera(const Camera *camera); + + void removeCamera(const Camera *camera); + + void addLodGroup(const LODGroup *lodGroup); + + void removeLodGroup(const LODGroup *lodGroup); + + void removeModel(const Model *model); + + void updateLodState(); + + bool isLodModelCulled(const Camera *camera, const Model *model); + + void clearCache(); + +private: + /** + * @zh LOD使用的model集合;包含每个LODGroup的每一级LOD + * @en The collection of models used by LOD; Each LOD of each LODGroup. + */ + ccstd::unordered_map _modelsInLODGroup; + + /** + * @zh 指定相机下,LODGroup使用哪一级的LOD + * @en Specify which level of LOD is used by the LODGroup under the camera. + */ + ccstd::unordered_map> _lodStateInCamera; + + /** + * @zh 上一帧添加的LODGroup + * @en The LODGroup added in the previous frame. + */ + ccstd::vector _newAddedLodGroupVec; + + RenderScene *_renderScene{nullptr}; +}; + RenderScene::RenderScene() = default; RenderScene::~RenderScene() = default; @@ -57,16 +127,20 @@ void RenderScene::activate() { bool RenderScene::initialize(const IRenderSceneInfo &info) { _name = info.name; + _lodStateCache = ccnew LodStateCache(this); return true; } void RenderScene::addLODGroup(LODGroup *group) { + group->attachToScene(this); _lodGroups.emplace_back(group); + _lodStateCache->addLodGroup(group); } void RenderScene::removeLODGroup(LODGroup *group) { auto iter = std::find(_lodGroups.begin(), _lodGroups.end(), group); if (iter != _lodGroups.end()) { + _lodStateCache->removeLodGroup(group); group->detachFromScene(); _lodGroups.erase(iter); } else { @@ -76,11 +150,16 @@ void RenderScene::removeLODGroup(LODGroup *group) { void RenderScene::removeLODGroups() { for (const auto &group : _lodGroups) { + _lodStateCache->removeLodGroup(group); group->detachFromScene(); } _lodGroups.clear(); } +bool RenderScene::isCulledByLod(const Camera *camera, const Model *model) const { + return _lodStateCache->isLodModelCulled(camera, model); +} + void RenderScene::setMainLight(DirectionalLight *dl) { _mainLight = dl; } @@ -108,6 +187,8 @@ void RenderScene::update(uint32_t stamp) { CC_PROFILE_OBJECT_UPDATE(Models, _models.size()); CC_PROFILE_OBJECT_UPDATE(Cameras, _cameras.size()); CC_PROFILE_OBJECT_UPDATE(DrawBatch2D, _batches.size()); + + _lodStateCache->updateLodState(); } void RenderScene::destroy() { @@ -116,16 +197,19 @@ void RenderScene::destroy() { removeSpotLights(); removeLODGroups(); removeModels(); + _lodStateCache->clearCache(); } void RenderScene::addCamera(Camera *camera) { camera->attachToScene(this); _cameras.emplace_back(camera); + _lodStateCache->addCamera(camera); } void RenderScene::removeCamera(Camera *camera) { auto iter = std::find(_cameras.begin(), _cameras.end(), camera); if (iter != _cameras.end()) { + _lodStateCache->removeCamera(camera); (*iter)->detachFromScene(); _cameras.erase(iter); } @@ -133,6 +217,7 @@ void RenderScene::removeCamera(Camera *camera) { void RenderScene::removeCameras() { for (const auto &camera : _cameras) { + _lodStateCache->removeCamera(camera); camera->detachFromScene(); camera->destroy(); } @@ -222,6 +307,7 @@ void RenderScene::removeModel(Model *model) { if (_octree && _octree->isEnabled()) { _octree->remove(*iter); } + _lodStateCache->removeModel(model); model->detachFromScene(); _models.erase(iter); } else { @@ -234,6 +320,7 @@ void RenderScene::removeModels() { if (_octree && _octree->isEnabled()) { _octree->remove(model); } + _lodStateCache->removeModel(model); model->detachFromScene(); CC_SAFE_DESTROY(model); } @@ -268,5 +355,169 @@ void RenderScene::onGlobalPipelineStateChanged() { } } +void LodStateCache::addCamera(const Camera *camera) { + for (const auto &lodGroup : _renderScene->getLODGroups()) { + auto layer = lodGroup->getNode()->getLayer(); + if ((camera->getVisibility() & layer) == layer) { + if (_lodStateInCamera.count(camera) == 0) { + _lodStateInCamera[camera] = {}; + } + break; + } + } +} + +void LodStateCache::removeCamera(const Camera *camera) { + if (_lodStateInCamera.count(camera) != 0) { + _lodStateInCamera.erase(camera); + } +} + +void LodStateCache::addLodGroup(const LODGroup *lodGroup) { + _newAddedLodGroupVec.push_back(lodGroup); + + for (const auto &camera : _renderScene->getCameras()) { + if (_lodStateInCamera.count(camera)) { + continue; + } + auto layer = lodGroup->getNode()->getLayer(); + if ((camera->getVisibility() & layer) == layer) { + _lodStateInCamera[camera] = {}; + } + } +} + +void LodStateCache::removeLodGroup(const LODGroup *lodGroup) { + for (auto index = 0; index < lodGroup->getLodCount(); index++) { + const auto &lod = lodGroup->getLodDataArray()[index]; + for (const auto &model : lod->getModels()) { + _modelsInLODGroup.erase(model); + } + } + for (auto &visibleCamera : _lodStateInCamera) { + visibleCamera.second.erase(lodGroup); + } +} + +void LodStateCache::removeModel(const Model *model) { + if (_modelsInLODGroup.count(model) != 0) { + _modelsInLODGroup.erase(model); + } +} + +// Update list of visible cameras on _modelsInLODGroup and update lod usage level under specified camera. +void LodStateCache::updateLodState() { + //insert _newAddedLodGroupVec's model into _modelsInLODGroup + for (const auto &addedLodGroup : _newAddedLodGroupVec) { + for (uint8_t index = 0; index < addedLodGroup->getLodCount(); index++) { + const auto &lod = addedLodGroup->getLodDataArray()[index]; + for (const auto &model : lod->getModels()) { + auto &modelInfo = _modelsInLODGroup[model]; + modelInfo.ownerLodLevel = index; + modelInfo.lodGroup = addedLodGroup; + } + } + } + _newAddedLodGroupVec.clear(); + + //update current visible lod index & model's visible cameras list + for (const auto &lodGroup : _renderScene->getLODGroups()) { + if (lodGroup->isEnabled()) { + const auto &lodLevels = lodGroup->getLockedLODLevels(); + // lodLevels is not empty, indicating that the user force to use certain layers of LOD + if (!lodLevels.empty()) { + //Update the dirty flag to make it easier to update the visible index of lod after lifting the forced use of lod. + if (lodGroup->getNode()->getChangedFlags() > 0) { + for (auto &visibleCamera : _lodStateInCamera) { + auto &lodInfo = visibleCamera.second[lodGroup]; + lodInfo.transformDirty = true; + } + } + //Update the visible camera list of all models on lodGroup when the visible level changes. + if (lodGroup->isLockLevelChanged()) { + lodGroup->resetLockChangeFlag(); + for (auto index = 0; index < lodGroup->getLodCount(); index++) { + const auto &lod = lodGroup->getLodDataArray()[index]; + for (const auto &model : lod->getModels()) { + auto &modelInfo = _modelsInLODGroup[model]; + modelInfo.visibleCameras.clear(); + if (model->getNode() && model->getNode()->isActive()) { + for (uint8_t visibleIndex : lodLevels) { + if (modelInfo.ownerLodLevel == static_cast(visibleIndex)) { + for (auto &visibleCamera : _lodStateInCamera) { + modelInfo.visibleCameras.emplace(visibleCamera.first, true); + } + break; + } + } + } + } + } + } + continue; + } + + //Normal Process, no LOD is forced. + bool hasUpdated = false; + for (auto &visibleCamera : _lodStateInCamera) { + auto cameraChangeFlags = visibleCamera.first->getNode()->getChangedFlags(); + auto lodGroupChangeFlags = lodGroup->getNode()->getChangedFlags(); + auto &lodInfo = visibleCamera.second[lodGroup]; + //Changes in the camera matrix or changes in the matrix of the node where lodGroup is located or the transformDirty marker is true, etc. All need to recalculate the visible level of LOD. + if (cameraChangeFlags > 0 || lodGroupChangeFlags > 0 || lodInfo.transformDirty) { + if (lodInfo.transformDirty) { + lodInfo.transformDirty = false; + } + + int8_t index = lodGroup->getVisibleLODLevel(visibleCamera.first); + if (index != lodInfo.usedLevel) { + lodInfo.usedLevel = index; + hasUpdated = true; + } + } + } + //The LOD of the last frame is forced to be used, the list of visible cameras of modelInfo needs to be updated. + if (lodGroup->isLockLevelChanged()) { + lodGroup->resetLockChangeFlag(); + hasUpdated = true; + } + + //Update the visible camera list of all models on lodGroup + if (hasUpdated) { + for (auto index = 0; index < lodGroup->getLodCount(); index++) { + const auto &lod = lodGroup->getLodDataArray()[index]; + for (const auto &model : lod->getModels()) { + auto &modelInfo = _modelsInLODGroup[model]; + modelInfo.visibleCameras.clear(); + if (model->getNode() && model->getNode()->isActive()) { + for (auto &visibleCamera : _lodStateInCamera) { + if (modelInfo.ownerLodLevel == visibleCamera.second[lodGroup].usedLevel) { + modelInfo.visibleCameras.emplace(visibleCamera.first, true); + } + } + } + } + } + } + } + } +} + +bool LodStateCache::isLodModelCulled(const Camera *camera, const Model *model) { + const auto &itModel = _modelsInLODGroup.find(model); + if (itModel == _modelsInLODGroup.end()) { + return false; + } + + const auto &visibleCamera = itModel->second.visibleCameras; + return visibleCamera.count(camera) == 0; +} + +void LodStateCache::clearCache() { + _modelsInLODGroup.clear(); + _lodStateInCamera.clear(); + _newAddedLodGroupVec.clear(); +} + } // namespace scene } // namespace cc diff --git a/native/cocos/scene/RenderScene.h b/native/cocos/scene/RenderScene.h index 67770205be..9f409c8b4b 100644 --- a/native/cocos/scene/RenderScene.h +++ b/native/cocos/scene/RenderScene.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once @@ -47,6 +46,7 @@ class DirectionalLight; class LODGroup; class SphereLight; class SpotLight; +class LodStateCache; struct IRaycastResult { Node *node{nullptr}; @@ -75,6 +75,7 @@ public: void addLODGroup(LODGroup *group); void removeLODGroup(LODGroup *group); void removeLODGroups(); + bool isCulledByLod(const Camera *camera, const Model *model) const; void unsetMainLight(DirectionalLight *dl); void addDirectionalLight(DirectionalLight *dl); @@ -116,6 +117,7 @@ private: ccstd::string _name; uint64_t _modelId{0}; IntrusivePtr _mainLight; + IntrusivePtr _lodStateCache; ccstd::vector> _models; ccstd::vector> _cameras; ccstd::vector> _directionalLights; diff --git a/native/cocos/scene/RenderWindow.cpp b/native/cocos/scene/RenderWindow.cpp index db45d0e583..ca5d445414 100644 --- a/native/cocos/scene/RenderWindow.cpp +++ b/native/cocos/scene/RenderWindow.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,12 +20,12 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #include "scene/RenderWindow.h" #include "BasePlatform.h" -#include "interfaces/modules/ISystemWindowManager.h" #include "interfaces/modules/ISystemWindow.h" +#include "interfaces/modules/ISystemWindowManager.h" #include "platform/interfaces/modules/Device.h" #include "renderer/gfx-base/GFXDevice.h" #include "renderer/gfx-base/GFXFramebuffer.h" diff --git a/native/cocos/scene/RenderWindow.h b/native/cocos/scene/RenderWindow.h index 83efe148f9..83a697aa49 100644 --- a/native/cocos/scene/RenderWindow.h +++ b/native/cocos/scene/RenderWindow.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once diff --git a/native/cocos/scene/Shadow.cpp b/native/cocos/scene/Shadow.cpp index 4623e25033..9ff97322f7 100644 --- a/native/cocos/scene/Shadow.cpp +++ b/native/cocos/scene/Shadow.cpp @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #include "scene/Shadow.h" #include diff --git a/native/cocos/scene/Shadow.h b/native/cocos/scene/Shadow.h index 9a34b9d1dd..ac41a58af5 100644 --- a/native/cocos/scene/Shadow.h +++ b/native/cocos/scene/Shadow.h @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once diff --git a/native/cocos/scene/Skybox.cpp b/native/cocos/scene/Skybox.cpp index 56c55c6980..f9b899e016 100644 --- a/native/cocos/scene/Skybox.cpp +++ b/native/cocos/scene/Skybox.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #include "scene/Skybox.h" #include "3d/misc/CreateMesh.h" @@ -188,7 +187,7 @@ void SkyboxInfo::setReflectionMap(TextureCube *val) { } } -TextureCube* SkyboxInfo::getReflectionMap() const { +TextureCube *SkyboxInfo::getReflectionMap() const { const bool isHDR = Root::getInstance()->getPipeline()->getPipelineSceneData()->isHDR(); if (isHDR) { return _reflectionHDR; diff --git a/native/cocos/scene/Skybox.h b/native/cocos/scene/Skybox.h index 48db6d94c6..9c550305bd 100644 --- a/native/cocos/scene/Skybox.h +++ b/native/cocos/scene/Skybox.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once @@ -167,7 +166,7 @@ public: TextureCube *getDiffuseMap() const; void setReflectionMap(TextureCube *val); - TextureCube* getReflectionMap() const; + TextureCube *getReflectionMap() const; void setSkyboxMaterial(Material *val); inline Material *getSkyboxMaterial() const { return _editableMaterial; } @@ -179,18 +178,18 @@ public: // @serializable // @type(TextureCube) // @formerlySerializedAs('_envmap') - TextureCube *_envmapHDR{nullptr}; + IntrusivePtr _envmapHDR{nullptr}; // @serializable // @type(TextureCube) - TextureCube *_envmapLDR{nullptr}; + IntrusivePtr _envmapLDR{nullptr}; // @serializable // @type(TextureCube) - TextureCube *_diffuseMapHDR{nullptr}; + IntrusivePtr _diffuseMapHDR{nullptr}; // @serializable // @type(TextureCube) - TextureCube *_diffuseMapLDR{nullptr}; - TextureCube *_reflectionHDR{nullptr}; - TextureCube *_reflectionLDR{nullptr}; + IntrusivePtr _diffuseMapLDR{nullptr}; + IntrusivePtr _reflectionHDR{nullptr}; + IntrusivePtr _reflectionLDR{nullptr}; // @serializable bool _enabled{false}; // @serializable diff --git a/native/cocos/scene/SphereLight.cpp b/native/cocos/scene/SphereLight.cpp index a7239d04ba..44fc8102b4 100644 --- a/native/cocos/scene/SphereLight.cpp +++ b/native/cocos/scene/SphereLight.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/scene/SphereLight.h b/native/cocos/scene/SphereLight.h index 62fa6af4ea..728813e833 100644 --- a/native/cocos/scene/SphereLight.h +++ b/native/cocos/scene/SphereLight.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/scene/SpotLight.cpp b/native/cocos/scene/SpotLight.cpp index 31ca0dbb5e..0fef9a03bf 100644 --- a/native/cocos/scene/SpotLight.cpp +++ b/native/cocos/scene/SpotLight.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/scene/SpotLight.h b/native/cocos/scene/SpotLight.h index c6dace1875..c76e42d438 100644 --- a/native/cocos/scene/SpotLight.h +++ b/native/cocos/scene/SpotLight.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/scene/SubModel.cpp b/native/cocos/scene/SubModel.cpp index 0191300c08..88e07cf864 100644 --- a/native/cocos/scene/SubModel.cpp +++ b/native/cocos/scene/SubModel.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/scene/SubModel.h b/native/cocos/scene/SubModel.h index 9ce792d37e..918f451ab7 100644 --- a/native/cocos/scene/SubModel.h +++ b/native/cocos/scene/SubModel.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -126,6 +125,7 @@ protected: std::shared_ptr>> _passes; int32_t _reflectionProbeType{0}; + private: static inline int32_t generateId() { static int32_t generator = 0; diff --git a/native/cocos/storage/local-storage/LocalStorage-android.cpp b/native/cocos/storage/local-storage/LocalStorage-android.cpp index f8fdebe2ce..9c70ebef79 100644 --- a/native/cocos/storage/local-storage/LocalStorage-android.cpp +++ b/native/cocos/storage/local-storage/LocalStorage-android.cpp @@ -3,20 +3,19 @@ Copyright (c) 2013 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologic Inc. Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/storage/local-storage/LocalStorage.cpp b/native/cocos/storage/local-storage/LocalStorage.cpp index 2ce47dc6d2..20b5fb277a 100644 --- a/native/cocos/storage/local-storage/LocalStorage.cpp +++ b/native/cocos/storage/local-storage/LocalStorage.cpp @@ -1,40 +1,16 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2012 - Zynga Inc. + Copyright (c) 2013-2016 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. - - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. -****************************************************************************/ - -/* - - Copyright (c) 2012 - Zynga Inc. - Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -46,8 +22,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - */ +****************************************************************************/ /* Local Storage support for the JS Bindings for iOS. diff --git a/native/cocos/storage/local-storage/LocalStorage.h b/native/cocos/storage/local-storage/LocalStorage.h index 5efc54f2e3..049b3ff09c 100644 --- a/native/cocos/storage/local-storage/LocalStorage.h +++ b/native/cocos/storage/local-storage/LocalStorage.h @@ -1,20 +1,19 @@ /**************************************************************************** Copyright (c) 2012 Zynga Inc. Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/ui/edit-box/EditBox-android.cpp b/native/cocos/ui/edit-box/EditBox-android.cpp index 5c63e888ef..49406e354b 100644 --- a/native/cocos/ui/edit-box/EditBox-android.cpp +++ b/native/cocos/ui/edit-box/EditBox-android.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2018-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2018-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -24,9 +23,9 @@ ****************************************************************************/ #include "EditBox.h" -#include "engine/EngineEvents.h" #include "cocos/bindings/jswrapper/SeApi.h" #include "cocos/bindings/manual/jsb_global.h" +#include "engine/EngineEvents.h" #include "platform/java/jni/JniHelper.h" #ifndef JCLS_EDITBOX diff --git a/native/cocos/ui/edit-box/EditBox-linux.cpp b/native/cocos/ui/edit-box/EditBox-linux.cpp index 4d466c4584..e32e55a449 100644 --- a/native/cocos/ui/edit-box/EditBox-linux.cpp +++ b/native/cocos/ui/edit-box/EditBox-linux.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/ui/edit-box/EditBox-ohos.cpp b/native/cocos/ui/edit-box/EditBox-ohos.cpp index 5f07fd2ede..3f6c03009e 100644 --- a/native/cocos/ui/edit-box/EditBox-ohos.cpp +++ b/native/cocos/ui/edit-box/EditBox-ohos.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -24,9 +23,9 @@ ****************************************************************************/ #include "EditBox.h" -#include "engine/EngineEvents.h" #include "cocos/bindings/jswrapper/SeApi.h" #include "cocos/bindings/manual/jsb_global.h" +#include "engine/EngineEvents.h" //#include "platform/Application.h" #include "platform/java/jni/JniHelper.h" diff --git a/native/cocos/ui/edit-box/EditBox-win32.cpp b/native/cocos/ui/edit-box/EditBox-win32.cpp index 628dc95711..9addf641c4 100644 --- a/native/cocos/ui/edit-box/EditBox-win32.cpp +++ b/native/cocos/ui/edit-box/EditBox-win32.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2018-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2018-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/ui/edit-box/EditBox.h b/native/cocos/ui/edit-box/EditBox.h index 923f3fcd84..6b6dd3a640 100644 --- a/native/cocos/ui/edit-box/EditBox.h +++ b/native/cocos/ui/edit-box/EditBox.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2018-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2018-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/ui/videoplayer/VideoPlayer-java.cpp b/native/cocos/ui/videoplayer/VideoPlayer-java.cpp index 9df498a1ea..f9cc8682e0 100644 --- a/native/cocos/ui/videoplayer/VideoPlayer-java.cpp +++ b/native/cocos/ui/videoplayer/VideoPlayer-java.cpp @@ -1,19 +1,18 @@ /**************************************************************************** - Copyright (c) 2014 Chukong Technologies Inc. - Copyright (c) undefined-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2014-2017 Chukong Technologies Inc. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/ui/videoplayer/VideoPlayer.h b/native/cocos/ui/videoplayer/VideoPlayer.h index 1f43cc7420..893a8c0836 100644 --- a/native/cocos/ui/videoplayer/VideoPlayer.h +++ b/native/cocos/ui/videoplayer/VideoPlayer.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2016-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2016-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/ui/webview/WebView-inl.h b/native/cocos/ui/webview/WebView-inl.h index bb0bf009b1..f813f9f530 100644 --- a/native/cocos/ui/webview/WebView-inl.h +++ b/native/cocos/ui/webview/WebView-inl.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/ui/webview/WebView.h b/native/cocos/ui/webview/WebView.h index e550675f04..e1b73ecb1f 100644 --- a/native/cocos/ui/webview/WebView.h +++ b/native/cocos/ui/webview/WebView.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/ui/webview/WebViewImpl-android.cpp b/native/cocos/ui/webview/WebViewImpl-android.cpp index 62fc15ca52..4a5ef35581 100644 --- a/native/cocos/ui/webview/WebViewImpl-android.cpp +++ b/native/cocos/ui/webview/WebViewImpl-android.cpp @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/ui/webview/WebViewImpl-ios.h b/native/cocos/ui/webview/WebViewImpl-ios.h index 6f3e03d0d3..eb15f37b46 100644 --- a/native/cocos/ui/webview/WebViewImpl-ios.h +++ b/native/cocos/ui/webview/WebViewImpl-ios.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/ui/webview/WebViewImpl-java.h b/native/cocos/ui/webview/WebViewImpl-java.h index 3147313fb5..c33bd6d513 100644 --- a/native/cocos/ui/webview/WebViewImpl-java.h +++ b/native/cocos/ui/webview/WebViewImpl-java.h @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/ui/webview/WebViewImpl-ohos.cpp b/native/cocos/ui/webview/WebViewImpl-ohos.cpp index bc98057178..84196f0a7f 100644 --- a/native/cocos/ui/webview/WebViewImpl-ohos.cpp +++ b/native/cocos/ui/webview/WebViewImpl-ohos.cpp @@ -1,19 +1,18 @@ /**************************************************************************** Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/native/cocos/xr/XRRemotePreviewManager.cpp b/native/cocos/xr/XRRemotePreviewManager.cpp index 3b6fc84cae..24c73b2e47 100644 --- a/native/cocos/xr/XRRemotePreviewManager.cpp +++ b/native/cocos/xr/XRRemotePreviewManager.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -23,47 +22,45 @@ THE SOFTWARE. ****************************************************************************/ +#include "application/ApplicationManager.h" #include "base/Log.h" #include "base/Macros.h" -#include "base/std/container/vector.h" #include "base/std/container/list.h" #include "base/std/container/string.h" #include "base/std/container/unordered_map.h" -#include "application/ApplicationManager.h" -#include "platform/java/modules/XRInterface.h" +#include "base/std/container/vector.h" #include "math/Quaternion.h" +#include "platform/java/modules/XRInterface.h" #if CC_USE_XR -#include "Xr.h" -#if ANDROID -#include -#endif -#include "XRRemotePreviewManager.h" -#if CC_USE_WEBSOCKET_SERVER -#include "network/WebSocketServer.h" -#endif + #include "Xr.h" + #if ANDROID + #include + #endif + #include "XRRemotePreviewManager.h" + #if CC_USE_WEBSOCKET_SERVER + #include "network/WebSocketServer.h" + #endif namespace cc { -#define SOCKET_PORT 8989 + #define SOCKET_PORT 8989 // 11259375 const int32_t PACKET_HEAD_CODE = 0x000ABCDEF; XRRemotePreviewManager::XRRemotePreviewManager() { - } XRRemotePreviewManager::~XRRemotePreviewManager() { - } -#if CC_USE_WEBSOCKET_SERVER + #if CC_USE_WEBSOCKET_SERVER void XRRemotePreviewManager::onClientConnected(const std::shared_ptr &connection) { CC_LOG_INFO("[XRRemotePreviewManager] onClientConnected.%p", connection.get()); XRDeviceInfo deviceInfo; deviceInfo.type = static_cast(XRDataPackageType::DPT_MSG_DEVICE_INFO); memset(deviceInfo.deviceName, 0, sizeof(char) * 32); strcpy(deviceInfo.deviceName, "XRDevice"); -#if ANDROID + #if ANDROID char man[PROP_VALUE_MAX + 1]; char mod[PROP_VALUE_MAX + 1]; /* A length 0 value indicates that the property is not defined */ @@ -77,7 +74,7 @@ void XRRemotePreviewManager::onClientConnected(const std::shared_ptrgetConnections(); _xr = CC_GET_XR_INTERFACE(); if (_xr) { @@ -121,40 +118,40 @@ void XRRemotePreviewManager::onConnection(const std::shared_ptrsetOnClose([=](int closeCode, const ccstd::string &closeReason) { - onClientDisconnected(closeCode, closeReason); + onClientDisconnected(closeCode, closeReason); }); } -#endif + #endif void XRRemotePreviewManager::start() { -#if CC_USE_WEBSOCKET_SERVER + #if CC_USE_WEBSOCKET_SERVER _webSocketServer = std::make_shared(); _webSocketServer->setOnBegin([]() { - CC_LOG_INFO("[XRRemotePreviewManager] onBegin"); + CC_LOG_INFO("[XRRemotePreviewManager] onBegin"); }); _webSocketServer->setOnEnd([]() { - CC_LOG_INFO("[XRRemotePreviewManager] onEnd"); + CC_LOG_INFO("[XRRemotePreviewManager] onEnd"); }); _webSocketServer->setOnClose([](const ccstd::string &msg) { - CC_LOG_INFO("[XRRemotePreviewManager] onClose.%s", msg.c_str()); + CC_LOG_INFO("[XRRemotePreviewManager] onClose.%s", msg.c_str()); }); _webSocketServer->setOnListening([](const ccstd::string &msg) { - CC_LOG_INFO("[XRRemotePreviewManager] onListening.%s", msg.c_str()); + CC_LOG_INFO("[XRRemotePreviewManager] onListening.%s", msg.c_str()); }); _webSocketServer->setOnError([](const ccstd::string &msg) { - CC_LOG_INFO("[XRRemotePreviewManager] onError.%s", msg.c_str()); + CC_LOG_INFO("[XRRemotePreviewManager] onError.%s", msg.c_str()); }); _webSocketServer->setOnConnection(std::bind(&XRRemotePreviewManager::onConnection, this, std::placeholders::_1)); - WebSocketServer::listenAsync(_webSocketServer, SOCKET_PORT, "127.0.0.1", nullptr); + WebSocketServer::listenAsync(_webSocketServer, SOCKET_PORT, "127.0.0.1", nullptr); CC_LOG_INFO("[XRRemotePreviewManager] listenAsync ready!"); -#endif + #endif _isStarted = true; } @@ -187,7 +184,7 @@ void XRRemotePreviewManager::packCommonMessageData(const XRCommonMessage &info, } void XRRemotePreviewManager::sendMessage(const ccstd::string &message) { -#if CC_USE_WEBSOCKET_SERVER + #if CC_USE_WEBSOCKET_SERVER if (_webSocketServer && _isConnectionChanged) { _isConnectionChanged = false; _wssConnections = _webSocketServer->getConnections(); @@ -210,18 +207,18 @@ void XRRemotePreviewManager::sendMessage(const ccstd::string &message) { } else { CC_LOG_INFO("[XRRemotePreviewManager] sendMessage [%s] failed [wss invalid] !!!", message.c_str()); } -#endif + #endif } void XRRemotePreviewManager::sendDeviceInfo(const XRDeviceInfo &info) { -#if CC_USE_WEBSOCKET_SERVER + #if CC_USE_WEBSOCKET_SERVER if (_webSocketServer && _isConnectionChanged) { _isConnectionChanged = false; _wssConnections = _webSocketServer->getConnections(); } if (_webSocketServer && !_wssConnections.empty()) { - for (auto &wssConn: _wssConnections) { + for (auto &wssConn : _wssConnections) { if (wssConn->getReadyState() == WebSocketServerConnection::ReadyState::OPEN) { size_t dataLen = 8 + sizeof(info); char data[dataLen]; @@ -234,18 +231,18 @@ void XRRemotePreviewManager::sendDeviceInfo(const XRDeviceInfo &info) { } else { CC_LOG_ERROR("[XRRemotePreviewManager] sendDeviceInfo failed [wss invalid] !!!"); } -#endif + #endif } void XRRemotePreviewManager::sendPoseInfo(const XRPoseInfo &info) { -#if CC_USE_WEBSOCKET_SERVER + #if CC_USE_WEBSOCKET_SERVER if (_webSocketServer && _isConnectionChanged) { _isConnectionChanged = false; _wssConnections = _webSocketServer->getConnections(); } if (_webSocketServer && !_wssConnections.empty()) { - for (auto &wssConn: _wssConnections) { + for (auto &wssConn : _wssConnections) { if (wssConn->getReadyState() == WebSocketServerConnection::ReadyState::OPEN) { size_t dataLen = 8 + sizeof(info); char data[dataLen]; @@ -256,7 +253,7 @@ void XRRemotePreviewManager::sendPoseInfo(const XRPoseInfo &info) { } } } -#endif + #endif } void XRRemotePreviewManager::sendControllerKeyInfo(const ControllerInfo::ButtonInfo &info) { @@ -342,7 +339,7 @@ bool XRRemotePreviewManager::isStarted() const { void XRRemotePreviewManager::tick() { if (this->_isStarted) { xr::XrEntry::getInstance()->getXrPose(_leftEyePose, _rightEyePose, _leftControllerPose, _rightControllerPose); - _devicePoseInfo.type = static_cast (XRDataPackageType::DPT_MSG_POSE_DATA); + _devicePoseInfo.type = static_cast(XRDataPackageType::DPT_MSG_POSE_DATA); _devicePoseInfo.hmdOrientation[0] = _leftEyePose.qx; _devicePoseInfo.hmdOrientation[1] = _leftEyePose.qy; _devicePoseInfo.hmdOrientation[2] = _leftEyePose.qz; diff --git a/native/cocos/xr/XRRemotePreviewManager.h b/native/cocos/xr/XRRemotePreviewManager.h index 85235d8738..02ba00b0c4 100644 --- a/native/cocos/xr/XRRemotePreviewManager.h +++ b/native/cocos/xr/XRRemotePreviewManager.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -26,23 +25,23 @@ #pragma once #include #include -#include "base/RefCounted.h" #include "XRCommon.h" +#include "base/RefCounted.h" namespace cc { class IXRInterface; namespace network { class WebSocketServer; class WebSocketServerConnection; -} +} // namespace network using namespace network; #if CC_USE_XR enum class XRDataPackageType { - DPT_MSG_DEVICE_INFO = 1, - DPT_MSG_POSE_DATA, - DPT_MSG_CONTROLLER_KEY, - DPT_MSG_STRING + DPT_MSG_DEVICE_INFO = 1, + DPT_MSG_POSE_DATA, + DPT_MSG_CONTROLLER_KEY, + DPT_MSG_STRING }; enum class XRKeyEventType { @@ -51,37 +50,37 @@ enum class XRKeyEventType { KET_GRAB }; -#pragma pack(1) + #pragma pack(1) struct XRCommonMessage { - int16_t type; - ccstd::string message; + int16_t type; + ccstd::string message; }; -#pragma pack () + #pragma pack() -#pragma pack(1) + #pragma pack(1) struct XRDeviceInfo { - int16_t type; - int16_t version; - char deviceName[32]; - int16_t xrVendorType; - float leftEyeFov[4]; //L-R-D-U - float rightEyeFov[4]; + int16_t type; + int16_t version; + char deviceName[32]; + int16_t xrVendorType; + float leftEyeFov[4]; //L-R-D-U + float rightEyeFov[4]; }; -#pragma pack () + #pragma pack() -#pragma pack(1) + #pragma pack(1) struct XRPoseInfo { - int16_t type; - float hmdOrientation[4]; - float hmdPosition[3]; - float leftControllerOrientation[4]; - float leftControllerPosition[3]; - float rightControllerOrientation[4]; - float rightControllerPosition[3]; + int16_t type; + float hmdOrientation[4]; + float hmdPosition[3]; + float leftControllerOrientation[4]; + float leftControllerPosition[3]; + float rightControllerOrientation[4]; + float rightControllerPosition[3]; }; -#pragma pack () + #pragma pack() -#pragma pack(1) + #pragma pack(1) struct XRControllerKeyInfo { int16_t type; int16_t keyEventType; @@ -90,45 +89,47 @@ struct XRControllerKeyInfo { int16_t stickKeyCode{0}; bool isButtonPressed{false}; }; -#pragma pack () + #pragma pack() class XRRemotePreviewManager : public RefCounted { - public: - XRRemotePreviewManager(); - ~XRRemotePreviewManager() override; - void start(); - void sendDeviceInfo(const XRDeviceInfo &info); - void sendPoseInfo(const XRPoseInfo &info); - void sendControllerKeyInfo(const ControllerInfo::ButtonInfo &info); - void sendControllerKeyInfo(const ControllerInfo::AxisInfo &info); - void tick(); - void resume(); - void pause(); - void stop(); - bool isStarted() const; - private: - void sendMessage(const ccstd::string &message); - static void packCommonMessageData(const XRCommonMessage &message, char *data); - static void packDeviceInfoData(const XRDeviceInfo &info, char *data); - static void packDevicePoseData(const XRPoseInfo &info, char *data); - static void packControllerKeyData(const XRControllerKeyInfo &info, char *data); -#if CC_USE_WEBSOCKET_SERVER - void onConnection(const std::shared_ptr &connection); - void onClientConnected(const std::shared_ptr &connection); - void onClientDisconnected(int closeCode, const ccstd::string &closeReason); - std::shared_ptr _webSocketServer{nullptr}; - ccstd::vector> _wssConnections; -#endif - bool _isStarted{false}; - bool _isConnectionChanged{false}; - IXRInterface *_xr{nullptr}; - cc::xr::XRPose _leftEyePose{cc::xr::XRPose::Type::VIEW_LEFT, true}; - cc::xr::XRPose _rightEyePose{cc::xr::XRPose::Type::VIEW_RIGHT, true}; - cc::xr::XRPose _leftControllerPose{cc::xr::XRPose::Type::HAND_LEFT, true}; - cc::xr::XRPose _rightControllerPose{cc::xr::XRPose::Type::HAND_RIGHT, true}; - XRPoseInfo _devicePoseInfo; - private: - CC_DISALLOW_COPY_MOVE_ASSIGN(XRRemotePreviewManager); +public: + XRRemotePreviewManager(); + ~XRRemotePreviewManager() override; + void start(); + void sendDeviceInfo(const XRDeviceInfo &info); + void sendPoseInfo(const XRPoseInfo &info); + void sendControllerKeyInfo(const ControllerInfo::ButtonInfo &info); + void sendControllerKeyInfo(const ControllerInfo::AxisInfo &info); + void tick(); + void resume(); + void pause(); + void stop(); + bool isStarted() const; + +private: + void sendMessage(const ccstd::string &message); + static void packCommonMessageData(const XRCommonMessage &message, char *data); + static void packDeviceInfoData(const XRDeviceInfo &info, char *data); + static void packDevicePoseData(const XRPoseInfo &info, char *data); + static void packControllerKeyData(const XRControllerKeyInfo &info, char *data); + #if CC_USE_WEBSOCKET_SERVER + void onConnection(const std::shared_ptr &connection); + void onClientConnected(const std::shared_ptr &connection); + void onClientDisconnected(int closeCode, const ccstd::string &closeReason); + std::shared_ptr _webSocketServer{nullptr}; + ccstd::vector> _wssConnections; + #endif + bool _isStarted{false}; + bool _isConnectionChanged{false}; + IXRInterface *_xr{nullptr}; + cc::xr::XRPose _leftEyePose{cc::xr::XRPose::Type::VIEW_LEFT, true}; + cc::xr::XRPose _rightEyePose{cc::xr::XRPose::Type::VIEW_RIGHT, true}; + cc::xr::XRPose _leftControllerPose{cc::xr::XRPose::Type::HAND_LEFT, true}; + cc::xr::XRPose _rightControllerPose{cc::xr::XRPose::Type::HAND_RIGHT, true}; + XRPoseInfo _devicePoseInfo; + +private: + CC_DISALLOW_COPY_MOVE_ASSIGN(XRRemotePreviewManager); }; #endif diff --git a/native/cocos/xr/Xr.h b/native/cocos/xr/Xr.h index 3b67b4d4cb..385a5a9f05 100644 --- a/native/cocos/xr/Xr.h +++ b/native/cocos/xr/Xr.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -31,7 +30,7 @@ #include "XRCommon.h" #ifndef XR_USE_GRAPHICS_API_OPENGL_ES -#define XR_USE_GRAPHICS_API_OPENGL_ES 1 + #define XR_USE_GRAPHICS_API_OPENGL_ES 1 #endif #ifdef XR_USE_GRAPHICS_API_VULKAN @@ -159,9 +158,9 @@ public: virtual void *getXRPointerConfig(int key) = 0; virtual void getXrPose(cc::xr::XRPose &leftEyePose, - cc::xr::XRPose &rightEyePose, - cc::xr::XRPose &leftControllerPose, - cc::xr::XRPose &rightControllerPose) = 0; + cc::xr::XRPose &rightEyePose, + cc::xr::XRPose &leftControllerPose, + cc::xr::XRPose &rightControllerPose) = 0; }; } // namespace xr diff --git a/native/cocos/xr/ar/ARLib.h b/native/cocos/xr/ar/ARLib.h index 7d2a0e6395..f2fe8ff7e2 100644 --- a/native/cocos/xr/ar/ARLib.h +++ b/native/cocos/xr/ar/ARLib.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -34,20 +33,20 @@ class _jobject; namespace cc { namespace ar { -class ARLib : public IARAPI{ +class ARLib : public IARAPI { public: ARLib(); ~ARLib() override; void config(int featureMask) override; uint32_t getSupportMask() override; void start() override; - void start(void *env, void *context) override; + void start(void* env, void* context) override; void resume() override; - void resume(void *env, void *context) override; + void resume(void* env, void* context) override; void pause() override; void update() override; int getAPIState() override; - + Pose getCameraPose() override; Matrix getCameraViewMatrix() override; Matrix getCameraProjectionMatrix() override; @@ -88,7 +87,7 @@ public: void enableSceneMesh(bool enable) override; float* getAddedSceneMesh() override; float* getUpdatedSceneMesh() override; - int* getRemovedSceneMesh() override; + float* getRemovedSceneMesh() override; int* requireSceneMesh() override; float* getSceneMeshVertices(int meshRef) override; int* getSceneMeshTriangleIndices(int meshRef) override; @@ -116,6 +115,7 @@ public: float* getUpdatedFacesInfo() override; float* getRemovedFacesInfo() override; float* getFaceBlendShapes(int faceRef) override; + protected: #if CC_PLATFORM == CC_PLATFORM_ANDROID _jobject* _impl{nullptr}; @@ -156,9 +156,9 @@ protected: float* _faceBlendShapes{nullptr}; #elif CC_PLATFORM == CC_PLATFORM_MAC_IOS void* _impl{nullptr}; - + int _infoLength = 0; - + void* _plane{nullptr}; void* _sceneMesh{nullptr}; void* _imageTracking{nullptr}; diff --git a/native/cocos/xr/ar/ARModule.cpp b/native/cocos/xr/ar/ARModule.cpp index 27f7813299..90f1ace3b5 100644 --- a/native/cocos/xr/ar/ARModule.cpp +++ b/native/cocos/xr/ar/ARModule.cpp @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -23,14 +22,14 @@ THE SOFTWARE. ****************************************************************************/ +#include "ar/ARModule.h" #include #include #include "math/Vec3.h" -#include "ar/ARModule.h" #if CC_PLATFORM == CC_PLATFORM_ANDROID || CC_PLATFORM == CC_PLATFORM_MAC_IOS #include "ar/ARLib.h" - using ARAPIImpl = cc::ar::ARLib; +using ARAPIImpl = cc::ar::ARLib; #elif CC_PLATFORM == CC_PLATFORM_WINDOWS #include "ar/IARAPI.h" #endif @@ -44,11 +43,15 @@ ARModule::ARModule() { #if CC_PLATFORM == CC_PLATFORM_ANDROID || CC_PLATFORM == CC_PLATFORM_MAC_IOS _impl = std::make_unique(); arModuleInstance.reset(this); + _texInitFlag = true; #endif } ARModule::~ARModule() { +} +ARModule* ARModule::createARModule() { + return new ARModule(); } ARModule* ARModule::get() { @@ -84,11 +87,11 @@ int ARModule::getAPIState() { return _impl->getAPIState(); } -void ARModule::setCameraId(const std::string &id) { +void ARModule::setCameraId(const std::string& id) { _cameraId = id; } -const std::string &ARModule::getCameraId() const { +const std::string& ARModule::getCameraId() const { return _cameraId; } @@ -136,6 +139,13 @@ uint8_t* ARModule::getCameraDepthBuffer() const { return _impl->getCameraDepthBuffer(); } +bool ARModule::getTexInitFlag() const { + return _texInitFlag; +} +void ARModule::resetTexInitFlag() { + _texInitFlag = false; +} + void ARModule::enableLightEstimate(bool enable) const { _impl->enableLightEstimate(enable); } @@ -218,7 +228,7 @@ float* ARModule::getUpdatedSceneMesh() const { return _impl->getUpdatedSceneMesh(); } -int* ARModule::getRemovedSceneMesh() const { +float* ARModule::getRemovedSceneMesh() const { return _impl->getRemovedSceneMesh(); } diff --git a/native/cocos/xr/ar/ARModule.h b/native/cocos/xr/ar/ARModule.h index aac5c77529..464ad1971f 100644 --- a/native/cocos/xr/ar/ARModule.h +++ b/native/cocos/xr/ar/ARModule.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -35,6 +34,7 @@ namespace ar { class CC_DLL ARModule final { public: + static ARModule* createARModule(); static ARModule* get(); ARModule(); @@ -48,8 +48,8 @@ public: void update(); int getAPIState(); - void setCameraId(const std::string &id); - const std::string &getCameraId() const; + void setCameraId(const std::string& id); + const std::string& getCameraId() const; Pose getCameraPose() const; Matrix getCameraViewMatrix() const; Matrix getCameraProjectionMatrix() const; @@ -62,6 +62,8 @@ public: void setCameraTextureName(int id) const; void* getCameraTextureRef() const; uint8_t* getCameraDepthBuffer() const; + bool getTexInitFlag() const; + void resetTexInitFlag(); void enableLightEstimate(bool enable) const; LightVal getMainLightDirection() const; @@ -91,7 +93,7 @@ public: void enableSceneMesh(bool enable) const; float* getAddedSceneMesh() const; float* getUpdatedSceneMesh() const; - int* getRemovedSceneMesh() const; + float* getRemovedSceneMesh() const; int* requireSceneMesh() const; float* getSceneMeshVertices(int meshRef) const; int* getSceneMeshTriangleIndices(int meshRef) const; @@ -123,6 +125,7 @@ public: private: std::unique_ptr _impl; std::string _cameraId; + bool _texInitFlag{false}; }; static std::unique_ptr arModuleInstance; diff --git a/native/cocos/xr/ar/IARAPI.h b/native/cocos/xr/ar/IARAPI.h index 34771a772e..e5beb1be69 100644 --- a/native/cocos/xr/ar/IARAPI.h +++ b/native/cocos/xr/ar/IARAPI.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -89,7 +88,7 @@ public: virtual void enableSceneMesh(bool enable) = 0; virtual float* getAddedSceneMesh() = 0; virtual float* getUpdatedSceneMesh() = 0; - virtual int* getRemovedSceneMesh() = 0; + virtual float* getRemovedSceneMesh() = 0; virtual int* requireSceneMesh() = 0; virtual float* getSceneMeshVertices(int id) = 0; virtual int* getSceneMeshTriangleIndices(int id) = 0; diff --git a/native/extensions/ExtensionExport.h b/native/extensions/ExtensionExport.h index abc3c313ea..2581181766 100644 --- a/native/extensions/ExtensionExport.h +++ b/native/extensions/ExtensionExport.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #ifndef __CCEXTENSIONEXPORT_H__ #define __CCEXTENSIONEXPORT_H__ diff --git a/native/extensions/ExtensionMacros.h b/native/extensions/ExtensionMacros.h index a46aed40c2..36769a0f0e 100644 --- a/native/extensions/ExtensionMacros.h +++ b/native/extensions/ExtensionMacros.h @@ -1,16 +1,16 @@ /**************************************************************************** Copyright (c) 2012 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +22,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #ifndef __EXTENSIONMARCROS_H__ #define __EXTENSIONMARCROS_H__ diff --git a/native/extensions/assets-manager/AssetsManagerEx.cpp b/native/extensions/assets-manager/AssetsManagerEx.cpp index 0ffe764696..8c3e90d107 100644 --- a/native/extensions/assets-manager/AssetsManagerEx.cpp +++ b/native/extensions/assets-manager/AssetsManagerEx.cpp @@ -1,16 +1,16 @@ /**************************************************************************** Copyright (c) 2014 cocos2d-x.org Copyright (c) 2015-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +22,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #include "AssetsManagerEx.h" #include diff --git a/native/extensions/assets-manager/AssetsManagerEx.h b/native/extensions/assets-manager/AssetsManagerEx.h index a3c286a01b..d3b2622de7 100644 --- a/native/extensions/assets-manager/AssetsManagerEx.h +++ b/native/extensions/assets-manager/AssetsManagerEx.h @@ -1,20 +1,20 @@ /**************************************************************************** Copyright (c) 2013 cocos2d-x.org Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -22,7 +22,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once diff --git a/native/extensions/assets-manager/AsyncTaskPool.cpp b/native/extensions/assets-manager/AsyncTaskPool.cpp index 484e3868a7..7281c3442e 100644 --- a/native/extensions/assets-manager/AsyncTaskPool.cpp +++ b/native/extensions/assets-manager/AsyncTaskPool.cpp @@ -1,27 +1,27 @@ /**************************************************************************** Copyright (c) 2010 cocos2d-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. +Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #include "AsyncTaskPool.h" diff --git a/native/extensions/assets-manager/AsyncTaskPool.h b/native/extensions/assets-manager/AsyncTaskPool.h index 4001d3fe59..0892220e0a 100644 --- a/native/extensions/assets-manager/AsyncTaskPool.h +++ b/native/extensions/assets-manager/AsyncTaskPool.h @@ -1,26 +1,26 @@ /**************************************************************************** Copyright (c) 2013-2016 Chukong Technologies Inc. -Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. +Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. ****************************************************************************/ #pragma once diff --git a/native/extensions/assets-manager/EventAssetsManagerEx.cpp b/native/extensions/assets-manager/EventAssetsManagerEx.cpp index badbde2f05..18f4baf7e3 100644 --- a/native/extensions/assets-manager/EventAssetsManagerEx.cpp +++ b/native/extensions/assets-manager/EventAssetsManagerEx.cpp @@ -1,19 +1,19 @@ /**************************************************************************** Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #include "EventAssetsManagerEx.h" #include diff --git a/native/extensions/assets-manager/EventAssetsManagerEx.h b/native/extensions/assets-manager/EventAssetsManagerEx.h index 2d50cbb5aa..4551523da8 100644 --- a/native/extensions/assets-manager/EventAssetsManagerEx.h +++ b/native/extensions/assets-manager/EventAssetsManagerEx.h @@ -1,19 +1,19 @@ /**************************************************************************** Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once @@ -109,4 +109,3 @@ private: }; NS_CC_EXT_END - diff --git a/native/extensions/assets-manager/Manifest.cpp b/native/extensions/assets-manager/Manifest.cpp index 770fe12171..405f79ead2 100644 --- a/native/extensions/assets-manager/Manifest.cpp +++ b/native/extensions/assets-manager/Manifest.cpp @@ -1,20 +1,20 @@ /**************************************************************************** Copyright (c) 2014 cocos2d-x.org Copyright (c) 2015-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -22,7 +22,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #include "Manifest.h" #include "base/Log.h" diff --git a/native/extensions/assets-manager/Manifest.h b/native/extensions/assets-manager/Manifest.h index 9b42040ee9..7f88d22c06 100644 --- a/native/extensions/assets-manager/Manifest.h +++ b/native/extensions/assets-manager/Manifest.h @@ -1,20 +1,20 @@ /**************************************************************************** Copyright (c) 2013 cocos2d-x.org Copyright (c) 2014-2016 Chukong Technologies Inc. - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -22,7 +22,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #pragma once diff --git a/native/extensions/cocos-ext.h b/native/extensions/cocos-ext.h index 2e6793d22e..6672ee6e49 100644 --- a/native/extensions/cocos-ext.h +++ b/native/extensions/cocos-ext.h @@ -1,18 +1,17 @@ /**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2017-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************************************************************/ +****************************************************************************/ #ifndef __COCOS2D_EXT_H__ #define __COCOS2D_EXT_H__ diff --git a/native/external-config.json b/native/external-config.json index 4597e85d4b..38baf292bc 100644 --- a/native/external-config.json +++ b/native/external-config.json @@ -3,6 +3,6 @@ "type": "github", "owner": "cocos-creator", "name": "engine-native-external", - "checkout": "v3.7.0-3" + "checkout": "v3.7.0-7" } } diff --git a/native/tools/swig-config/pipeline.i b/native/tools/swig-config/pipeline.i index 442acd055e..d19faad42d 100644 --- a/native/tools/swig-config/pipeline.i +++ b/native/tools/swig-config/pipeline.i @@ -26,6 +26,8 @@ #include "renderer/pipeline/PipelineSceneData.h" #include "renderer/pipeline/BatchedBuffer.h" #include "renderer/pipeline/GeometryRenderer.h" +#include "renderer/pipeline/reflection-probe/ReflectionProbeFlow.h" +#include "renderer/pipeline/reflection-probe/ReflectionProbeStage.h" %} // Insert code at the beginning of generated source file (.cpp) @@ -33,6 +35,7 @@ #include "bindings/auto/jsb_pipeline_auto.h" #include "bindings/auto/jsb_scene_auto.h" #include "bindings/auto/jsb_gfx_auto.h" +#include "bindings/auto/jsb_assets_auto.h" #include "bindings/auto/jsb_cocos_auto.h" #include "renderer/pipeline/PipelineUBO.h" @@ -153,6 +156,9 @@ using namespace cc; %attribute(cc::pipeline::RenderPipeline, cc::scene::Model*, profiler, getProfiler, setProfiler); %attribute(cc::pipeline::RenderPipeline, float, shadingScale, getShadingScale, setShadingScale); +%attribute(cc::pipeline::RenderPipeline, uint32_t, _tag, getTag, setTag); +%attribute(cc::pipeline::RenderPipeline, cc::pipeline::RenderFlowList , _flows, getFlows, setFlows); + %attribute(cc::pipeline::PipelineSceneData, bool, isHDR, isHDR, setHDR); %attribute(cc::pipeline::PipelineSceneData, float, shadingScale, getShadingScale, setShadingScale); @@ -162,11 +168,19 @@ using namespace cc; %attribute(cc::pipeline::PipelineSceneData, cc::scene::Shadows*, shadows, getShadows); %attribute(cc::pipeline::PipelineSceneData, cc::gi::LightProbes*, lightProbes, getLightProbes); + +%attribute(cc::pipeline::RenderStage, ccstd::string&, _name, getName, setName); +%attribute(cc::pipeline::RenderStage, uint32_t, _priority, getPriority, setPriority); +%attribute(cc::pipeline::RenderStage, uint32_t, _tag, getTag, setTag); + %attribute(cc::pipeline::BloomStage, float, threshold, getThreshold, setThreshold); %attribute(cc::pipeline::BloomStage, float, intensity, getIntensity, setIntensity); %attribute(cc::pipeline::BloomStage, int, iterations, getIterations, setIterations); - +%attribute(cc::pipeline::RenderFlow, ccstd::string&, _name, getName, setName); +%attribute(cc::pipeline::RenderFlow, uint32_t, _priority, getPriority, setPriority); +%attribute(cc::pipeline::RenderFlow, uint32_t, _tag, getTag, setTag); +%attribute(cc::pipeline::RenderFlow, cc::pipeline::RenderStageList, _stages, getStages, setStages); #define CC_USE_GEOMETRY_RENDERER 1 @@ -193,6 +207,7 @@ using namespace cc; %import "core/event/Event.h" +%import "core/assets/Asset.h" %import "core/assets/Material.h" %import "renderer/gfx-base/GFXDef-common.h" @@ -227,3 +242,6 @@ using namespace cc; %include "renderer/pipeline/BatchedBuffer.h" %include "renderer/pipeline/GeometryRenderer.h" +%include "renderer/pipeline/reflection-probe/ReflectionProbeFlow.h" +%include "renderer/pipeline/reflection-probe/ReflectionProbeStage.h" + diff --git a/native/tools/swig-config/scene.i b/native/tools/swig-config/scene.i index 123830bf8a..034f4d6e1c 100644 --- a/native/tools/swig-config/scene.i +++ b/native/tools/swig-config/scene.i @@ -535,6 +535,10 @@ using namespace cc; %attribute(cc::scene::ReflectionProbe, cc::geometry::AABB *, boundingBox, getBoundingBox); %attribute(cc::scene::ReflectionProbe, cc::Node*, previewSphere, getPreviewSphere, setPreviewSphere); %attribute(cc::scene::ReflectionProbe, cc::Node*, previewPlane, getPreviewPlane, setPreviewPlane); +%attribute(cc::scene::ReflectionProbe, ccstd::vector> &, bakedCubeTextures, getBakedCubeTextures); +%attribute(cc::scene::ReflectionProbe, cc::TextureCube*, cubemap, getCubeMap, setCubeMap); +%attribute(cc::scene::ReflectionProbe, cc::Node*, node, getNode); +%attribute(cc::scene::ReflectionProbe, cc::RenderTexture*, realtimePlanarTexture, getRealtimePlanarTexture); %attribute(cc::SceneGlobals, bool, bakedWithStationaryMainLight, getBakedWithStationaryMainLight, setBakedWithStationaryMainLight); diff --git a/pal/audio/audio-buffer-manager.ts b/pal/audio/audio-buffer-manager.ts index e4697cce94..30d08c24a6 100644 --- a/pal/audio/audio-buffer-manager.ts +++ b/pal/audio/audio-buffer-manager.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + interface CachedAudioBufferData { usedCount: number, audioBuffer: AudioBuffer, diff --git a/pal/audio/audio-timer.ts b/pal/audio/audio-timer.ts index 27579ec85b..8bb22779d3 100644 --- a/pal/audio/audio-timer.ts +++ b/pal/audio/audio-timer.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { clamp } from '../../cocos/core/math/utils'; /** diff --git a/pal/audio/minigame/player-minigame.ts b/pal/audio/minigame/player-minigame.ts index b4b07d15ba..1983d414b3 100644 --- a/pal/audio/minigame/player-minigame.ts +++ b/pal/audio/minigame/player-minigame.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { minigame } from 'pal/minigame'; import { systemInfo } from 'pal/system-info'; import { TAOBAO } from 'internal:constants'; @@ -6,6 +30,7 @@ import { AudioEvent, AudioPCMDataView, AudioState, AudioType } from '../type'; import { clamp, clamp01 } from '../../../cocos/core'; import { enqueueOperation, OperationInfo, OperationQueueable } from '../operation-queue'; import { OS } from '../../system-info/enum-type'; +import { Game, game } from '../../../cocos/game'; export class OneShotAudioMinigame { private _innerAudioContext: InnerAudioContext; @@ -79,8 +104,8 @@ export class AudioPlayerMinigame implements OperationQueueable { this._eventTarget = new EventTarget(); // event - systemInfo.on('hide', this._onHide, this); - systemInfo.on('show', this._onShow, this); + game.on(Game.EVENT_PAUSE, this._onInterruptedBegin, this); + game.on(Game.EVENT_RESUME, this._onInterruptedEnd, this); const eventTarget = this._eventTarget; this._onPlay = () => { this._state = AudioState.PLAYING; @@ -140,8 +165,8 @@ export class AudioPlayerMinigame implements OperationQueueable { innerAudioContext.onEnded(this._onEnded); } destroy () { - systemInfo.off('hide', this._onHide, this); - systemInfo.off('show', this._onShow, this); + game.off(Game.EVENT_PAUSE, this._onInterruptedBegin, this); + game.off(Game.EVENT_RESUME, this._onInterruptedEnd, this); if (this._innerAudioContext) { ['Play', 'Pause', 'Stop', 'Seeked', 'Ended'].forEach((event) => { this._offEvent(event); @@ -153,7 +178,7 @@ export class AudioPlayerMinigame implements OperationQueueable { this._innerAudioContext = null; } } - private _onHide () { + private _onInterruptedBegin () { if (this._state === AudioState.PLAYING) { this.pause().then(() => { this._state = AudioState.INTERRUPTED; @@ -162,10 +187,10 @@ export class AudioPlayerMinigame implements OperationQueueable { }).catch((e) => {}); } } - private _onShow () { + private _onInterruptedEnd () { // We don't know whether onShow or resolve callback in pause promise is called at first. if (!this._readyToHandleOnShow) { - this._eventTarget.once(AudioEvent.INTERRUPTION_BEGIN, this._onShow, this); + this._eventTarget.once(AudioEvent.INTERRUPTION_BEGIN, this._onInterruptedEnd, this); return; } if (this._state === AudioState.INTERRUPTED) { diff --git a/pal/audio/minigame/player-web.ts b/pal/audio/minigame/player-web.ts index acbacfb8b1..3da538fbf0 100644 --- a/pal/audio/minigame/player-web.ts +++ b/pal/audio/minigame/player-web.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { minigame } from 'pal/minigame'; import { systemInfo } from 'pal/system-info'; import { clamp01 } from '../../../cocos/core'; @@ -6,6 +30,7 @@ import { audioBufferManager } from '../audio-buffer-manager'; import AudioTimer from '../audio-timer'; import { enqueueOperation, OperationInfo, OperationQueueable } from '../operation-queue'; import { AudioEvent, AudioPCMDataView, AudioState, AudioType } from '../type'; +import { Game, game } from '../../../cocos/game'; declare const fsUtils: any; const audioContext = minigame.tt?.getAudioContext?.(); @@ -88,8 +113,8 @@ export class AudioPlayerWeb implements OperationQueueable { this._src = url; // event - systemInfo.on('hide', this._onHide, this); - systemInfo.on('show', this._onShow, this); + game.on(Game.EVENT_PAUSE, this._onInterruptedBegin, this); + game.on(Game.EVENT_RESUME, this._onInterruptedEnd, this); } destroy () { this._audioTimer.destroy(); @@ -98,10 +123,10 @@ export class AudioPlayerWeb implements OperationQueueable { this._audioBuffer = null; } audioBufferManager.tryReleasingCache(this._src); - systemInfo.off('hide', this._onHide, this); - systemInfo.off('show', this._onShow, this); + game.off(Game.EVENT_PAUSE, this._onInterruptedBegin, this); + game.off(Game.EVENT_RESUME, this._onInterruptedEnd, this); } - private _onHide () { + private _onInterruptedBegin () { if (this._state === AudioState.PLAYING) { this.pause().then(() => { this._state = AudioState.INTERRUPTED; @@ -110,10 +135,10 @@ export class AudioPlayerWeb implements OperationQueueable { }).catch((e) => {}); } } - private _onShow () { + private _onInterruptedEnd () { // We don't know whether onShow or resolve callback in pause promise is called at first. if (!this._readyToHandleOnShow) { - this._eventTarget.once(AudioEvent.INTERRUPTION_BEGIN, this._onShow, this); + this._eventTarget.once(AudioEvent.INTERRUPTION_BEGIN, this._onInterruptedEnd, this); return; } if (this._state === AudioState.INTERRUPTED) { diff --git a/pal/audio/minigame/player.ts b/pal/audio/minigame/player.ts index 0f6fddaae7..414465044a 100644 --- a/pal/audio/minigame/player.ts +++ b/pal/audio/minigame/player.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { minigame } from 'pal/minigame'; import { legacyCC } from '../../../cocos/core/global-exports'; import { AudioLoadOptions, AudioType, AudioState, AudioPCMDataView } from '../type'; diff --git a/pal/audio/native/player.ts b/pal/audio/native/player.ts index 354c016474..9c908cd7ba 100644 --- a/pal/audio/native/player.ts +++ b/pal/audio/native/player.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { systemInfo } from 'pal/system-info'; import { AudioType, AudioState, AudioEvent, AudioPCMDataView, AudioBufferView } from '../type'; import { EventTarget } from '../../../cocos/core/event'; @@ -5,6 +29,7 @@ import { legacyCC } from '../../../cocos/core/global-exports'; import { clamp, clamp01 } from '../../../cocos/core'; import { enqueueOperation, OperationInfo, OperationQueueable } from '../operation-queue'; import { Platform } from '../../system-info/enum-type'; +import { Game, game } from '../../../cocos/game'; const urlCount: Record = {}; const audioEngine = jsb.AudioEngine; @@ -107,17 +132,17 @@ export class AudioPlayer implements OperationQueueable { // this._pcmHeader = audioEngine.getPCMHeader(url); this._pcmHeader = null; // event - systemInfo.on('hide', this._onHide, this); - systemInfo.on('show', this._onShow, this); + game.on(Game.EVENT_PAUSE, this._onInterruptedBegin, this); + game.on(Game.EVENT_RESUME, this._onInterruptedEnd, this); } destroy () { - systemInfo.on('hide', this._onHide, this); - systemInfo.on('show', this._onShow, this); + game.off(Game.EVENT_PAUSE, this._onInterruptedBegin, this); + game.off(Game.EVENT_RESUME, this._onInterruptedEnd, this); if (--urlCount[this._url] <= 0) { audioEngine.uncache(this._url); } } - private _onHide () { + private _onInterruptedBegin () { if (this._state === AudioState.PLAYING) { this.pause().then(() => { this._state = AudioState.INTERRUPTED; @@ -125,7 +150,7 @@ export class AudioPlayer implements OperationQueueable { }).catch((e) => {}); } } - private _onShow () { + private _onInterruptedEnd () { if (this._state === AudioState.INTERRUPTED) { this.play().then(() => { this._eventTarget.emit(AudioEvent.INTERRUPTION_END); diff --git a/pal/audio/operation-queue.ts b/pal/audio/operation-queue.ts index acf56308fe..61f4a11ca3 100644 --- a/pal/audio/operation-queue.ts +++ b/pal/audio/operation-queue.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { EventTarget } from '../../cocos/core'; type OperationMethod = (...args: any[]) => Promise; diff --git a/pal/audio/type.ts b/pal/audio/type.ts index 1474861936..60f4e85053 100644 --- a/pal/audio/type.ts +++ b/pal/audio/type.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + export enum AudioEvent { PLAYED = 'play', PAUSED = 'pause', diff --git a/pal/audio/web/player-dom.ts b/pal/audio/web/player-dom.ts index 25fb9e3e4d..714aa2c582 100644 --- a/pal/audio/web/player-dom.ts +++ b/pal/audio/web/player-dom.ts @@ -1,9 +1,34 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { systemInfo } from 'pal/system-info'; import { AudioEvent, AudioState, AudioPCMDataView, AudioType } from '../type'; import { EventTarget } from '../../../cocos/core/event'; import { clamp, clamp01 } from '../../../cocos/core'; import { enqueueOperation, OperationInfo, OperationQueueable } from '../operation-queue'; import { BrowserType, OS } from '../../system-info/enum-type'; +import { Game, game } from '../../../cocos/game'; function ensurePlaying (domAudio: HTMLAudioElement): Promise { return new Promise((resolve) => { @@ -84,8 +109,8 @@ export class AudioPlayerDOM implements OperationQueueable { this._domAudio = nativeAudio; // event - systemInfo.on('hide', this._onHide, this); - systemInfo.on('show', this._onShow, this); + game.on(Game.EVENT_PAUSE, this._onInterruptedBegin, this); + game.on(Game.EVENT_RESUME, this._onInterruptedEnd, this); this._onEnded = () => { this.seek(0).catch((e) => {}); this._state = AudioState.INIT; @@ -95,8 +120,8 @@ export class AudioPlayerDOM implements OperationQueueable { } destroy () { - systemInfo.off('hide', this._onHide, this); - systemInfo.off('show', this._onShow, this); + game.off(Game.EVENT_PAUSE, this._onInterruptedBegin, this); + game.off(Game.EVENT_RESUME, this._onInterruptedEnd, this); this._domAudio.removeEventListener('ended', this._onEnded); // @ts-expect-error need to release DOM Audio instance this._domAudio = null; @@ -156,7 +181,7 @@ export class AudioPlayerDOM implements OperationQueueable { }); } - private _onHide () { + private _onInterruptedBegin () { if (this._state === AudioState.PLAYING) { this.pause().then(() => { this._state = AudioState.INTERRUPTED; @@ -164,7 +189,7 @@ export class AudioPlayerDOM implements OperationQueueable { }).catch((e) => {}); } } - private _onShow () { + private _onInterruptedEnd () { if (this._state === AudioState.INTERRUPTED) { this.play().then(() => { this._eventTarget.emit(AudioEvent.INTERRUPTION_END); diff --git a/pal/audio/web/player-web.ts b/pal/audio/web/player-web.ts index 1240a073f6..dfa874c652 100644 --- a/pal/audio/web/player-web.ts +++ b/pal/audio/web/player-web.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { EDITOR } from 'internal:constants'; import { systemInfo } from 'pal/system-info'; import { AudioPCMDataView, AudioEvent, AudioState, AudioType } from '../type'; @@ -7,6 +31,7 @@ import { enqueueOperation, OperationInfo, OperationQueueable } from '../operatio import AudioTimer from '../audio-timer'; import { audioBufferManager } from '../audio-buffer-manager'; import legacyCC from '../../../predefine'; +import { Game, game } from '../../../cocos/game'; // NOTE: fix CI const AudioContextClass = (window.AudioContext || window.webkitAudioContext || window.mozAudioContext); @@ -214,8 +239,8 @@ export class AudioPlayerWeb implements OperationQueueable { audioContextAgent!.connectContext(this._gainNode); this._src = url; // event - systemInfo.on('hide', this._onHide, this); - systemInfo.on('show', this._onShow, this); + game.on(Game.EVENT_PAUSE, this._onInterruptedBegin, this); + game.on(Game.EVENT_RESUME, this._onInterruptedEnd, this); } destroy () { this._audioTimer.destroy(); @@ -224,8 +249,8 @@ export class AudioPlayerWeb implements OperationQueueable { this._audioBuffer = null; } audioBufferManager.tryReleasingCache(this._src); - systemInfo.off('hide', this._onHide, this); - systemInfo.off('show', this._onShow, this); + game.off(Game.EVENT_PAUSE, this._onInterruptedBegin, this); + game.off(Game.EVENT_RESUME, this._onInterruptedEnd, this); } static load (url: string): Promise { return new Promise((resolve) => { @@ -282,7 +307,7 @@ export class AudioPlayerWeb implements OperationQueueable { return new AudioPCMDataView(this._audioBuffer.getChannelData(channelIndex), 1); } - private _onHide () { + private _onInterruptedBegin () { if (this._state === AudioState.PLAYING) { this.pause().then(() => { this._state = AudioState.INTERRUPTED; @@ -290,7 +315,7 @@ export class AudioPlayerWeb implements OperationQueueable { }).catch((e) => {}); } } - private _onShow () { + private _onInterruptedEnd () { if (this._state === AudioState.INTERRUPTED) { this.play().then(() => { this._eventTarget.emit(AudioEvent.INTERRUPTION_END); diff --git a/pal/audio/web/player.ts b/pal/audio/web/player.ts index 19e67bbda3..20ece6f458 100644 --- a/pal/audio/web/player.ts +++ b/pal/audio/web/player.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { warnID } from '../../../cocos/core'; import { AudioLoadOptions, AudioType, AudioState, AudioPCMDataView } from '../type'; import { AudioPlayerDOM, OneShotAudioDOM } from './player-dom'; diff --git a/pal/env/minigame/env.ts b/pal/env/minigame/env.ts index 3f7c0ee6ca..e0d8a44df7 100644 --- a/pal/env/minigame/env.ts +++ b/pal/env/minigame/env.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + /* eslint-disable import/no-dynamic-require */ import { BAIDU, TAOBAO, WECHAT, XIAOMI } from 'internal:constants'; diff --git a/pal/env/native/env.ts b/pal/env/native/env.ts index cdb0538d59..94342c4e07 100644 --- a/pal/env/native/env.ts +++ b/pal/env/native/env.ts @@ -1,9 +1,36 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + declare const require: (path: string) => Promise; +const ccwindow = typeof globalThis.jsb !== 'undefined' ? (typeof jsb.window !== 'undefined' ? jsb.window : window) : window; +const ccdocument = ccwindow.document; + export function findCanvas (): { frame: HTMLDivElement, container: HTMLDivElement, canvas: HTMLCanvasElement } { - const container = document.createElement('div'); - const frame = document.documentElement as HTMLDivElement; - const canvas = window.__canvas; + const container = ccdocument.createElement('div'); + const frame = ccdocument.documentElement as HTMLDivElement; + const canvas = ccwindow.__canvas; return { frame, canvas, container }; } diff --git a/pal/env/runtime/env.ts b/pal/env/runtime/env.ts index 833da92a12..cedeca6aa6 100644 --- a/pal/env/runtime/env.ts +++ b/pal/env/runtime/env.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { COCOSPLAY, HUAWEI, OPPO, VIVO } from 'internal:constants'; declare const require: (path: string) => Promise; diff --git a/pal/env/web/env.ts b/pal/env/web/env.ts index c29139ee04..6b84f874b3 100644 --- a/pal/env/web/env.ts +++ b/pal/env/web/env.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + export function findCanvas (): { frame: HTMLDivElement, container: HTMLDivElement, canvas: HTMLCanvasElement } { const frame = document.querySelector('#GameDiv') as HTMLDivElement; const container = document.querySelector('#Cocos3dGameContainer') as HTMLDivElement; diff --git a/pal/input/input-source.ts b/pal/input/input-source.ts index e93f37d418..408396d6ec 100644 --- a/pal/input/input-source.ts +++ b/pal/input/input-source.ts @@ -1,19 +1,18 @@ /* Copyright (c) 2022 Chukong Technologies Inc. - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/pal/input/minigame/accelerometer-input.ts b/pal/input/minigame/accelerometer-input.ts index 369f079495..e575f68a43 100644 --- a/pal/input/minigame/accelerometer-input.ts +++ b/pal/input/minigame/accelerometer-input.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { AccelerometerCallback } from 'pal/input'; import { minigame, AccelerometerIntervalMode } from 'pal/minigame'; import { Acceleration, EventAcceleration } from '../../../cocos/input/types'; diff --git a/pal/input/minigame/gamepad-input.ts b/pal/input/minigame/gamepad-input.ts index b01638f962..4ff3e4ff51 100644 --- a/pal/input/minigame/gamepad-input.ts +++ b/pal/input/minigame/gamepad-input.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { GamepadCallback } from 'pal/input'; import { InputEventType } from '../../../cocos/input/types/event-enum'; import { EventTarget } from '../../../cocos/core/event/event-target'; diff --git a/pal/input/minigame/handheld-input.ts b/pal/input/minigame/handheld-input.ts index edb0ea656c..4b265c2c6d 100644 --- a/pal/input/minigame/handheld-input.ts +++ b/pal/input/minigame/handheld-input.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/pal/input/minigame/handle-input.ts b/pal/input/minigame/handle-input.ts index f861620d43..da9098ac13 100644 --- a/pal/input/minigame/handle-input.ts +++ b/pal/input/minigame/handle-input.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { HandleCallback } from 'pal/input'; import { InputEventType } from '../../../cocos/input/types/event-enum'; import { EventTarget } from '../../../cocos/core/event'; @@ -19,6 +43,8 @@ export class HandleInputDevice { public get rightStick () { return this._rightStick; } public get buttonLeftStick () { return this._buttonLeftStick; } public get buttonRightStick () { return this._buttonRightStick; } + public get buttonOptions () { return this._buttonOptions; } + public get buttonStart () { return this._buttonStart; } public get handLeftPosition () { return this._handLeftPosition; } public get handLeftOrientation () { return this._handLeftOrientation; } public get handRightPosition () { return this._handRightPosition; } @@ -44,6 +70,8 @@ export class HandleInputDevice { private _rightStick!: InputSourceStick; private _buttonLeftStick!: InputSourceButton; private _buttonRightStick!: InputSourceButton; + private _buttonOptions!: InputSourceButton; + private _buttonStart!: InputSourceButton; private _handLeftPosition!: InputSourcePosition; private _handLeftOrientation!: InputSourceOrientation; private _handRightPosition!: InputSourcePosition; @@ -111,6 +139,11 @@ export class HandleInputDevice { rightStickRight.getValue = () => 0; this._rightStick = new InputSourceStick({ up: rightStickUp, down: rightStickDown, left: rightStickLeft, right: rightStickRight }); + this._buttonOptions = new InputSourceButton(); + this._buttonOptions.getValue = () => 0; + this._buttonStart = new InputSourceButton(); + this._buttonStart.getValue = () => 0; + this._handLeftPosition = new InputSourcePosition(); this._handLeftPosition.getValue = () => Vec3.ZERO; this._handLeftOrientation = new InputSourceOrientation(); diff --git a/pal/input/minigame/hmd-input.ts b/pal/input/minigame/hmd-input.ts index 7cbd0a37c3..997bd881ba 100644 --- a/pal/input/minigame/hmd-input.ts +++ b/pal/input/minigame/hmd-input.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { HMDCallback } from 'pal/input'; import { InputEventType } from '../../../cocos/input/types/event-enum'; import { EventTarget } from '../../../cocos/core/event/event-target'; diff --git a/pal/input/minigame/index.ts b/pal/input/minigame/index.ts index 61ba7b3601..4af5ab414e 100644 --- a/pal/input/minigame/index.ts +++ b/pal/input/minigame/index.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + export * from './accelerometer-input'; export * from './gamepad-input'; export * from './handle-input'; diff --git a/pal/input/minigame/keyboard-input.ts b/pal/input/minigame/keyboard-input.ts index cb1d2e2aa3..d615d1740f 100644 --- a/pal/input/minigame/keyboard-input.ts +++ b/pal/input/minigame/keyboard-input.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { KeyboardCallback } from 'pal/input'; import { KeyboardEventData, minigame } from 'pal/minigame'; import { systemInfo } from 'pal/system-info'; diff --git a/pal/input/minigame/mouse-input.ts b/pal/input/minigame/mouse-input.ts index 52b177b40b..e161dd01cb 100644 --- a/pal/input/minigame/mouse-input.ts +++ b/pal/input/minigame/mouse-input.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { MouseCallback } from 'pal/input'; import { MouseEventData, MouseWheelEventData, minigame } from 'pal/minigame'; import { screenAdapter } from 'pal/screen-adapter'; diff --git a/pal/input/minigame/touch-input.ts b/pal/input/minigame/touch-input.ts index 66944b774f..04745631a1 100644 --- a/pal/input/minigame/touch-input.ts +++ b/pal/input/minigame/touch-input.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { TouchCallback } from 'pal/input'; import { minigame } from 'pal/minigame'; import { screenAdapter } from 'pal/screen-adapter'; diff --git a/pal/input/native/accelerometer-input.ts b/pal/input/native/accelerometer-input.ts index a7d3df6ee2..b155b63a58 100644 --- a/pal/input/native/accelerometer-input.ts +++ b/pal/input/native/accelerometer-input.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { AccelerometerCallback } from 'pal/input'; import { systemInfo } from 'pal/system-info'; import { screenAdapter } from 'pal/screen-adapter'; diff --git a/pal/input/native/gamepad-input.ts b/pal/input/native/gamepad-input.ts index f26c467eb7..1e78920254 100644 --- a/pal/input/native/gamepad-input.ts +++ b/pal/input/native/gamepad-input.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + /* eslint-disable brace-style */ import { GamepadCallback } from 'pal/input'; import { systemInfo } from 'pal/system-info'; diff --git a/pal/input/native/handheld-input.ts b/pal/input/native/handheld-input.ts index 823866d191..09fddd0e60 100644 --- a/pal/input/native/handheld-input.ts +++ b/pal/input/native/handheld-input.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/pal/input/native/handle-input.ts b/pal/input/native/handle-input.ts index df7dde16a0..4cf04bdbfe 100644 --- a/pal/input/native/handle-input.ts +++ b/pal/input/native/handle-input.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { HandleCallback } from 'pal/input'; import { InputEventType } from '../../../cocos/input/types/event-enum'; import { EventTarget } from '../../../cocos/core/event/event-target'; @@ -26,6 +50,8 @@ enum Button { RIGHT_STICK_DOWN, RIGHT_STICK_LEFT, RIGHT_STICK_RIGHT, + ROKID_MENU, + ROKID_START, } enum Pose { @@ -50,6 +76,8 @@ const _nativeButtonMap = { 4: Button.BUTTON_WEST, 9: Button.BUTTON_LEFT_STICK, 10: Button.BUTTON_RIGHT_STICK, + 11: Button.ROKID_MENU, + 12: Button.ROKID_START, 13: Button.BUTTON_TRIGGER_LEFT, 14: Button.BUTTON_TRIGGER_RIGHT, }; @@ -74,6 +102,8 @@ export class HandleInputDevice { public get rightStick () { return this._rightStick; } public get buttonLeftStick () { return this._buttonLeftStick; } public get buttonRightStick () { return this._buttonRightStick; } + public get buttonOptions () { return this._buttonOptions; } + public get buttonStart () { return this._buttonStart; } public get handLeftPosition () { return this._handLeftPosition; } public get handLeftOrientation () { return this._handLeftOrientation; } public get handRightPosition () { return this._handRightPosition; } @@ -99,6 +129,8 @@ export class HandleInputDevice { private _rightStick!: InputSourceStick; private _buttonLeftStick!: InputSourceButton; private _buttonRightStick!: InputSourceButton; + private _buttonOptions!: InputSourceButton; + private _buttonStart!: InputSourceButton; private _handLeftPosition!: InputSourcePosition; private _handLeftOrientation!: InputSourceOrientation; private _handRightPosition!: InputSourcePosition; @@ -129,6 +161,8 @@ export class HandleInputDevice { [Button.RIGHT_STICK_RIGHT]: 0, [Button.BUTTON_LEFT_STICK]: 0, [Button.BUTTON_RIGHT_STICK]: 0, + [Button.ROKID_MENU]: 0, + [Button.ROKID_START]: 0, }; private _nativePoseState: NativePoseState = { @@ -298,6 +332,11 @@ export class HandleInputDevice { rightStickRight.getValue = () => this._nativeButtonState[Button.RIGHT_STICK_RIGHT]; this._rightStick = new InputSourceStick({ up: rightStickUp, down: rightStickDown, left: rightStickLeft, right: rightStickRight }); + this._buttonOptions = new InputSourceButton(); + this._buttonOptions.getValue = () => this._nativeButtonState[Button.ROKID_MENU]; + this._buttonStart = new InputSourceButton(); + this._buttonStart.getValue = () => this._nativeButtonState[Button.ROKID_START]; + this._handLeftPosition = new InputSourcePosition(); this._handLeftPosition.getValue = () => this._nativePoseState[Pose.HAND_LEFT].position; this._handLeftOrientation = new InputSourceOrientation(); diff --git a/pal/input/native/hmd-input.ts b/pal/input/native/hmd-input.ts index b82ee21c62..918efe307f 100644 --- a/pal/input/native/hmd-input.ts +++ b/pal/input/native/hmd-input.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { HMDCallback } from 'pal/input'; import { InputEventType } from '../../../cocos/input/types/event-enum'; import { EventTarget } from '../../../cocos/core/event/event-target'; diff --git a/pal/input/native/index.ts b/pal/input/native/index.ts index 61ba7b3601..4af5ab414e 100644 --- a/pal/input/native/index.ts +++ b/pal/input/native/index.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + export * from './accelerometer-input'; export * from './gamepad-input'; export * from './handle-input'; diff --git a/pal/input/native/keyboard-input.ts b/pal/input/native/keyboard-input.ts index cf878f58d1..956e204046 100644 --- a/pal/input/native/keyboard-input.ts +++ b/pal/input/native/keyboard-input.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { KeyboardCallback } from 'pal/input'; import { systemInfo } from 'pal/system-info'; import { KeyCode, EventKeyboard } from '../../../cocos/input/types'; diff --git a/pal/input/native/mouse-input.ts b/pal/input/native/mouse-input.ts index 1f84dbb98b..7fbf92cb98 100644 --- a/pal/input/native/mouse-input.ts +++ b/pal/input/native/mouse-input.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { MouseCallback } from 'pal/input'; import { screenAdapter } from 'pal/screen-adapter'; import { EventMouse } from '../../../cocos/input/types'; diff --git a/pal/input/native/touch-input.ts b/pal/input/native/touch-input.ts index 5756c94b66..04cd2d81b6 100644 --- a/pal/input/native/touch-input.ts +++ b/pal/input/native/touch-input.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { TouchCallback } from 'pal/input'; import { screenAdapter } from 'pal/screen-adapter'; import { Size, Vec2 } from '../../../cocos/core/math'; diff --git a/pal/input/touch-manager.ts b/pal/input/touch-manager.ts index 2cb71343a8..6585fd4923 100644 --- a/pal/input/touch-manager.ts +++ b/pal/input/touch-manager.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { macro } from '../../cocos/core/platform/macro'; import { Touch } from '../../cocos/input/types'; import { Vec2 } from '../../cocos/core/math/vec2'; diff --git a/pal/input/web/accelerometer-input.ts b/pal/input/web/accelerometer-input.ts index 93e100a709..04735a6f77 100644 --- a/pal/input/web/accelerometer-input.ts +++ b/pal/input/web/accelerometer-input.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { AccelerometerCallback } from 'pal/input'; import { systemInfo } from 'pal/system-info'; import { screenAdapter } from 'pal/screen-adapter'; diff --git a/pal/input/web/gamepad-input.ts b/pal/input/web/gamepad-input.ts index d686131d1f..bbfffac889 100644 --- a/pal/input/web/gamepad-input.ts +++ b/pal/input/web/gamepad-input.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { GamepadCallback } from 'pal/input'; import { systemInfo } from 'pal/system-info'; import { InputEventType } from '../../../cocos/input/types/event-enum'; diff --git a/pal/input/web/handheld-input.ts b/pal/input/web/handheld-input.ts index 7143dda3bf..bdfdf3bd56 100644 --- a/pal/input/web/handheld-input.ts +++ b/pal/input/web/handheld-input.ts @@ -1,18 +1,17 @@ /* - Copyright (c) 2022 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated engine source code (the "Software"), a limited, - worldwide, royalty-free, non-assignable, revocable and non-exclusive license - to use Cocos Creator solely to develop games on your target platforms. You shall - not use Cocos Creator software for developing other software or tools that's - used for developing games. You are not granted to publish, distribute, - sublicense, and/or sell copies of Cocos Creator. + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: - The software or tools in this License Agreement are licensed, not sold. - Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/pal/input/web/handle-input.ts b/pal/input/web/handle-input.ts index 78a2398e89..7d67bb6fd0 100644 --- a/pal/input/web/handle-input.ts +++ b/pal/input/web/handle-input.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { HandleCallback } from 'pal/input'; import { InputEventType } from '../../../cocos/input/types/event-enum'; import { EventTarget } from '../../../cocos/core/event'; @@ -26,6 +50,8 @@ enum Button { RIGHT_STICK_DOWN, RIGHT_STICK_LEFT, RIGHT_STICK_RIGHT, + ROKID_MENU, + ROKID_START, } export enum KeyEventType { @@ -34,6 +60,20 @@ export enum KeyEventType { KET_GRAB } +enum StickAxisCode { + UNDEFINE = 0, + X, + Y, + LEFT_STICK_X, + LEFT_STICK_Y, + RIGHT_STICK_X, + RIGHT_STICK_Y, + LEFT_TRIGGER, + RIGHT_TIRGGER, + LEFT_GRIP, + RIGHT_GRIP, +} + const _nativeButtonMap = { 1: Button.BUTTON_EAST, 2: Button.BUTTON_SOUTH, @@ -41,6 +81,8 @@ const _nativeButtonMap = { 4: Button.BUTTON_WEST, 9: Button.BUTTON_LEFT_STICK, 10: Button.BUTTON_RIGHT_STICK, + 11: Button.ROKID_MENU, + 12: Button.ROKID_START, 13: Button.BUTTON_TRIGGER_LEFT, 14: Button.BUTTON_TRIGGER_RIGHT, }; @@ -67,6 +109,8 @@ export class HandleInputDevice { public get rightStick () { return this._rightStick; } public get buttonLeftStick () { return this._buttonLeftStick; } public get buttonRightStick () { return this._buttonRightStick; } + public get buttonOptions () { return this._buttonOptions; } + public get buttonStart () { return this._buttonStart; } public get handLeftPosition () { return this._handLeftPosition; } public get handLeftOrientation () { return this._handLeftOrientation; } public get handRightPosition () { return this._handRightPosition; } @@ -92,6 +136,8 @@ export class HandleInputDevice { private _rightStick!: InputSourceStick; private _buttonLeftStick!: InputSourceButton; private _buttonRightStick!: InputSourceButton; + private _buttonOptions!: InputSourceButton; + private _buttonStart!: InputSourceButton; private _handLeftPosition!: InputSourcePosition; private _handLeftOrientation!: InputSourceOrientation; private _handRightPosition!: InputSourcePosition; @@ -122,6 +168,8 @@ export class HandleInputDevice { [Button.RIGHT_STICK_RIGHT]: 0, [Button.BUTTON_LEFT_STICK]: 0, [Button.BUTTON_RIGHT_STICK]: 0, + [Button.ROKID_MENU]: 0, + [Button.ROKID_START]: 0, }; constructor () { @@ -137,46 +185,48 @@ export class HandleInputDevice { if (keyEventType === KeyEventType.KET_CLICK) { const button = _nativeButtonMap[stickKeyCode]; this._nativeButtonState[button] = isButtonPressed ? 1 : 0; - } else if (keyEventType === KeyEventType.KET_STICK) { + } else if (keyEventType === KeyEventType.KET_STICK || keyEventType === KeyEventType.KET_GRAB) { // - } else if (keyEventType === KeyEventType.KET_GRAB) { - // - let negativeButton: Button | undefined; - let positiveButton: Button | undefined; - let axisValue: IAxisValue | undefined; + let negativeButton: Button|undefined; + let positiveButton: Button|undefined; + let axisValue: IAxisValue|undefined; switch (stickAxisCode) { - case 3: + case StickAxisCode.LEFT_STICK_X: negativeButton = Button.LEFT_STICK_LEFT; positiveButton = Button.LEFT_STICK_RIGHT; axisValue = this._axisToButtons(stickAxisValue); break; - case 4: + case StickAxisCode.LEFT_STICK_Y: negativeButton = Button.LEFT_STICK_DOWN; positiveButton = Button.LEFT_STICK_UP; axisValue = this._axisToButtons(stickAxisValue); break; - case 5: + case StickAxisCode.RIGHT_STICK_X: negativeButton = Button.RIGHT_STICK_LEFT; positiveButton = Button.RIGHT_STICK_RIGHT; axisValue = this._axisToButtons(stickAxisValue); break; - case 6: + case StickAxisCode.RIGHT_STICK_Y: negativeButton = Button.RIGHT_STICK_DOWN; positiveButton = Button.RIGHT_STICK_UP; axisValue = this._axisToButtons(stickAxisValue); break; + case StickAxisCode.LEFT_TRIGGER: + this._nativeButtonState[Button.TRIGGER_LEFT] = stickAxisValue; + break; + case StickAxisCode.RIGHT_TIRGGER: + this._nativeButtonState[Button.TRIGGER_RIGHT] = stickAxisValue; + break; + case StickAxisCode.LEFT_GRIP: + this._nativeButtonState[Button.GRIP_LEFT] = stickAxisValue; + break; + case StickAxisCode.RIGHT_GRIP: + this._nativeButtonState[Button.GRIP_RIGHT] = stickAxisValue; + break; default: - if (stickAxisCode === 7) { - this._nativeButtonState[Button.TRIGGER_LEFT] = stickAxisValue; - } else if (stickAxisCode === 8) { - this._nativeButtonState[Button.TRIGGER_RIGHT] = stickAxisValue; - } else if (stickAxisCode === 9) { - this._nativeButtonState[Button.GRIP_LEFT] = stickAxisValue; - } else if (stickAxisCode === 10) { - this._nativeButtonState[Button.GRIP_RIGHT] = stickAxisValue; - } break; } + if (negativeButton && positiveButton && axisValue) { this._nativeButtonState[negativeButton] = axisValue.negative; this._nativeButtonState[positiveButton] = axisValue.positive; @@ -262,6 +312,11 @@ export class HandleInputDevice { right: rightStickRight, }); + this._buttonOptions = new InputSourceButton(); + this._buttonOptions.getValue = () => this._nativeButtonState[Button.ROKID_MENU]; + this._buttonStart = new InputSourceButton(); + this._buttonStart.getValue = () => this._nativeButtonState[Button.ROKID_START]; + this._handLeftPosition = new InputSourcePosition(); this._handLeftPosition.getValue = () => Vec3.ZERO; this._handLeftOrientation = new InputSourceOrientation(); diff --git a/pal/input/web/hmd-input.ts b/pal/input/web/hmd-input.ts index 7cbd0a37c3..997bd881ba 100644 --- a/pal/input/web/hmd-input.ts +++ b/pal/input/web/hmd-input.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { HMDCallback } from 'pal/input'; import { InputEventType } from '../../../cocos/input/types/event-enum'; import { EventTarget } from '../../../cocos/core/event/event-target'; diff --git a/pal/input/web/index.ts b/pal/input/web/index.ts index 61ba7b3601..4af5ab414e 100644 --- a/pal/input/web/index.ts +++ b/pal/input/web/index.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + export * from './accelerometer-input'; export * from './gamepad-input'; export * from './handle-input'; diff --git a/pal/input/web/keyboard-input.ts b/pal/input/web/keyboard-input.ts index 10e41daa5b..00bf38c30d 100644 --- a/pal/input/web/keyboard-input.ts +++ b/pal/input/web/keyboard-input.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { KeyboardCallback } from 'pal/input'; import { KeyCode, EventKeyboard } from '../../../cocos/input/types'; import { EventTarget } from '../../../cocos/core/event'; diff --git a/pal/input/web/mouse-input.ts b/pal/input/web/mouse-input.ts index a98cfb2971..d531a29cb2 100644 --- a/pal/input/web/mouse-input.ts +++ b/pal/input/web/mouse-input.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { EDITOR, TEST } from 'internal:constants'; import { MouseCallback } from 'pal/input'; import { systemInfo } from 'pal/system-info'; diff --git a/pal/input/web/touch-input.ts b/pal/input/web/touch-input.ts index 73f888a0e8..d097a8df52 100644 --- a/pal/input/web/touch-input.ts +++ b/pal/input/web/touch-input.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { TouchCallback } from 'pal/input'; import { EDITOR, TEST } from 'internal:constants'; import { systemInfo } from 'pal/system-info'; diff --git a/pal/minigame/alipay.ts b/pal/minigame/alipay.ts index 13d44955c2..116515bd9a 100644 --- a/pal/minigame/alipay.ts +++ b/pal/minigame/alipay.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { IMiniGame } from 'pal/minigame'; import { Orientation } from '../screen-adapter/enum-type'; import { cloneObject } from '../utils'; diff --git a/pal/minigame/baidu.ts b/pal/minigame/baidu.ts index e83815a194..addb300a07 100644 --- a/pal/minigame/baidu.ts +++ b/pal/minigame/baidu.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { IMiniGame } from 'pal/minigame'; import { Orientation } from '../screen-adapter/enum-type'; import { cloneObject, createInnerAudioContextPolyfill } from '../utils'; diff --git a/pal/minigame/bytedance.ts b/pal/minigame/bytedance.ts index 86fab8a24c..149bb1010f 100644 --- a/pal/minigame/bytedance.ts +++ b/pal/minigame/bytedance.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { IMiniGame, SystemInfo } from 'pal/minigame'; import { Orientation } from '../screen-adapter/enum-type'; import { cloneObject, createInnerAudioContextPolyfill } from '../utils'; diff --git a/pal/minigame/non-minigame.ts b/pal/minigame/non-minigame.ts index adef70a43c..f714424d70 100644 --- a/pal/minigame/non-minigame.ts +++ b/pal/minigame/non-minigame.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { IMiniGame } from 'pal/minigame'; // @ts-expect-error can't init minigame when it's declared diff --git a/pal/minigame/runtime.ts b/pal/minigame/runtime.ts index 7d994008f3..8c5fef4843 100644 --- a/pal/minigame/runtime.ts +++ b/pal/minigame/runtime.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { COCOSPLAY, HUAWEI, LINKSURE, OPPO, QTT, VIVO } from 'internal:constants'; import { SystemInfo, IMiniGame } from 'pal/minigame'; diff --git a/pal/minigame/taobao.ts b/pal/minigame/taobao.ts index 70f4aa7727..c80f19a6a2 100644 --- a/pal/minigame/taobao.ts +++ b/pal/minigame/taobao.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { IMiniGame, SystemInfo } from 'pal/minigame'; import { Orientation } from '../screen-adapter/enum-type'; import { cloneObject, createInnerAudioContextPolyfill, versionCompare } from '../utils'; diff --git a/pal/minigame/wechat.ts b/pal/minigame/wechat.ts index 0d056edb38..8a5bb57202 100644 --- a/pal/minigame/wechat.ts +++ b/pal/minigame/wechat.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { IMiniGame, SystemInfo } from 'pal/minigame'; import { Orientation } from '../screen-adapter/enum-type'; import { cloneObject, createInnerAudioContextPolyfill, versionCompare } from '../utils'; diff --git a/pal/minigame/xiaomi.ts b/pal/minigame/xiaomi.ts index 945b1f9b3e..c02321d85b 100644 --- a/pal/minigame/xiaomi.ts +++ b/pal/minigame/xiaomi.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { IMiniGame } from 'pal/minigame'; import { Orientation } from '../screen-adapter/enum-type'; import { cloneObject, createInnerAudioContextPolyfill } from '../utils'; diff --git a/pal/pacer/pacer-minigame.ts b/pal/pacer/pacer-minigame.ts index 9df888698a..63cb01fda9 100644 --- a/pal/pacer/pacer-minigame.ts +++ b/pal/pacer/pacer-minigame.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { minigame } from 'pal/minigame'; import { assertIsTrue } from '../../cocos/core/data/utils/asserts'; diff --git a/pal/pacer/pacer-native.ts b/pal/pacer/pacer-native.ts index 07034398d0..e81b27b9c6 100644 --- a/pal/pacer/pacer-native.ts +++ b/pal/pacer/pacer-native.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { assertIsTrue } from '../../cocos/core/data/utils/asserts'; declare const jsb: any; diff --git a/pal/pacer/pacer-web.ts b/pal/pacer/pacer-web.ts index 5001097e16..e0246a83a8 100644 --- a/pal/pacer/pacer-web.ts +++ b/pal/pacer/pacer-web.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { assertIsTrue } from '../../cocos/core/data/utils/asserts'; export class Pacer { diff --git a/pal/screen-adapter/enum-type/index.ts b/pal/screen-adapter/enum-type/index.ts index a7bb84a2fa..36ab0c4cfd 100644 --- a/pal/screen-adapter/enum-type/index.ts +++ b/pal/screen-adapter/enum-type/index.ts @@ -1,2 +1,26 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + export * from './orientation'; export * from './screen-event'; diff --git a/pal/screen-adapter/enum-type/orientation.ts b/pal/screen-adapter/enum-type/orientation.ts index 4233cf44d2..858b7a5e52 100644 --- a/pal/screen-adapter/enum-type/orientation.ts +++ b/pal/screen-adapter/enum-type/orientation.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + const _PORTRAIT = 1; const _PORTRAIT_UPSIDE_DOWN = _PORTRAIT << 1; const _LEFT = _PORTRAIT << 2; diff --git a/pal/screen-adapter/enum-type/screen-event.ts b/pal/screen-adapter/enum-type/screen-event.ts index 4ade6c664c..d9224f241f 100644 --- a/pal/screen-adapter/enum-type/screen-event.ts +++ b/pal/screen-adapter/enum-type/screen-event.ts @@ -1 +1,25 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + export type PalScreenEvent = 'window-resize' | 'orientation-change' | 'fullscreen-change'; diff --git a/pal/screen-adapter/minigame/screen-adapter.ts b/pal/screen-adapter/minigame/screen-adapter.ts index 961e6a4b1f..9a96c1e236 100644 --- a/pal/screen-adapter/minigame/screen-adapter.ts +++ b/pal/screen-adapter/minigame/screen-adapter.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { ALIPAY, BAIDU, COCOSPLAY, RUNTIME_BASED, VIVO, WECHAT } from 'internal:constants'; import { minigame } from 'pal/minigame'; import { ConfigOrientation, IScreenOptions, SafeAreaEdge } from 'pal/screen-adapter'; diff --git a/pal/screen-adapter/native/screen-adapter.ts b/pal/screen-adapter/native/screen-adapter.ts index 5c89b0900b..0525afc465 100644 --- a/pal/screen-adapter/native/screen-adapter.ts +++ b/pal/screen-adapter/native/screen-adapter.ts @@ -1,3 +1,28 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + +import { EDITOR } from 'internal:constants'; import { ConfigOrientation, IScreenOptions, SafeAreaEdge } from 'pal/screen-adapter'; import { EventTarget } from '../../../cocos/core/event/event-target'; import { Size } from '../../../cocos/core/math'; @@ -29,8 +54,8 @@ class ScreenAdapter extends EventTarget { public get windowSize (): Size { const dpr = this.devicePixelRatio; // NOTE: fix precision issue on Metal render end. - const roundWidth = Math.round(window.innerWidth); - const roundHeight = Math.round(window.innerHeight); + const roundWidth = Math.round(jsb.window.innerWidth); + const roundHeight = Math.round(jsb.window.innerHeight); return new Size(roundWidth * dpr, roundHeight * dpr); } public set windowSize (size: Size) { @@ -103,7 +128,9 @@ class ScreenAdapter extends EventTarget { public init (options: IScreenOptions, cbToRebuildFrameBuffer: () => void) { this._cbToUpdateFrameBuffer = cbToRebuildFrameBuffer; - this._cbToUpdateFrameBuffer(); + if (!EDITOR) { + this._cbToUpdateFrameBuffer(); + } } public requestFullScreen (): Promise { diff --git a/pal/screen-adapter/web/screen-adapter.ts b/pal/screen-adapter/web/screen-adapter.ts index 24087521cb..8c215d8057 100644 --- a/pal/screen-adapter/web/screen-adapter.ts +++ b/pal/screen-adapter/web/screen-adapter.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { EDITOR, TEST } from 'internal:constants'; import { ConfigOrientation, IScreenOptions, SafeAreaEdge } from 'pal/screen-adapter'; import { systemInfo } from 'pal/system-info'; diff --git a/pal/system-info/enum-type/browser-type.ts b/pal/system-info/enum-type/browser-type.ts index f07ee573fe..6437093d26 100644 --- a/pal/system-info/enum-type/browser-type.ts +++ b/pal/system-info/enum-type/browser-type.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + export enum BrowserType { /** * @en Browser Type - Unknown diff --git a/pal/system-info/enum-type/event.ts b/pal/system-info/enum-type/event.ts index 1023d8e4d3..aadc531552 100644 --- a/pal/system-info/enum-type/event.ts +++ b/pal/system-info/enum-type/event.ts @@ -1 +1,25 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + export type PalSystemEvent = 'hide' | 'show' | 'close'; diff --git a/pal/system-info/enum-type/feature.ts b/pal/system-info/enum-type/feature.ts index 0a8d03ebc1..174efacb7a 100644 --- a/pal/system-info/enum-type/feature.ts +++ b/pal/system-info/enum-type/feature.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + export enum Feature { /** * @en Feature to support Webp. diff --git a/pal/system-info/enum-type/index.ts b/pal/system-info/enum-type/index.ts index fb25d25a05..9c79deb649 100644 --- a/pal/system-info/enum-type/index.ts +++ b/pal/system-info/enum-type/index.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + export * from './browser-type'; export * from './event'; export * from './language'; diff --git a/pal/system-info/enum-type/language.ts b/pal/system-info/enum-type/language.ts index 545a4916b6..4ae71fb08a 100644 --- a/pal/system-info/enum-type/language.ts +++ b/pal/system-info/enum-type/language.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + export enum Language { /** * @en Unknown language code diff --git a/pal/system-info/enum-type/network-type.ts b/pal/system-info/enum-type/network-type.ts index 5ec3926ad9..45ad52704f 100644 --- a/pal/system-info/enum-type/network-type.ts +++ b/pal/system-info/enum-type/network-type.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + export enum NetworkType { /** * @en Network is unreachable. diff --git a/pal/system-info/enum-type/operating-system.ts b/pal/system-info/enum-type/operating-system.ts index 4942ba7408..07391ec9e5 100644 --- a/pal/system-info/enum-type/operating-system.ts +++ b/pal/system-info/enum-type/operating-system.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + export enum OS { /** * @en Operating System - Unknown diff --git a/pal/system-info/enum-type/platform.ts b/pal/system-info/enum-type/platform.ts index 197f44d643..6fcd5bf439 100644 --- a/pal/system-info/enum-type/platform.ts +++ b/pal/system-info/enum-type/platform.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + export enum Platform { UNKNOWN = 'UNKNOWN', // Web Based diff --git a/pal/system-info/minigame/system-info.ts b/pal/system-info/minigame/system-info.ts index 15841f62f2..79a44311a3 100644 --- a/pal/system-info/minigame/system-info.ts +++ b/pal/system-info/minigame/system-info.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { ALIPAY, BAIDU, BYTEDANCE, COCOSPLAY, HUAWEI, LINKSURE, OPPO, QTT, VIVO, WECHAT, XIAOMI, DEBUG, TEST, TAOBAO } from 'internal:constants'; import { minigame } from 'pal/minigame'; import { IFeatureMap } from 'pal/system-info'; diff --git a/pal/system-info/native/system-info.ts b/pal/system-info/native/system-info.ts index 4e6bc67bd7..9ade346624 100644 --- a/pal/system-info/native/system-info.ts +++ b/pal/system-info/native/system-info.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { IFeatureMap } from 'pal/system-info'; import { EventTarget } from '../../../cocos/core/event'; import { BrowserType, NetworkType, OS, Platform, Language, Feature } from '../enum-type'; diff --git a/pal/system-info/web/system-info.ts b/pal/system-info/web/system-info.ts index 9a631b5f34..17b7832eab 100644 --- a/pal/system-info/web/system-info.ts +++ b/pal/system-info/web/system-info.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import { DEBUG, EDITOR, PREVIEW, TEST } from 'internal:constants'; import { IFeatureMap } from 'pal/system-info'; import { EventTarget } from '../../../cocos/core/event'; diff --git a/pal/utils.ts b/pal/utils.ts index 703d447f0f..25357e50c1 100644 --- a/pal/utils.ts +++ b/pal/utils.ts @@ -1,3 +1,27 @@ +/* + Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. + + https://www.cocos.com/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + /** * This method clones methods in minigame enviroment, sucb as `wx`, `swan` etc. to a module called minigame. * @param targetObject Usually it's specified as the minigame module. diff --git a/platforms/native/builtin/Blob.js b/platforms/native/builtin/Blob.js index d6d6a4a167..80e3234a53 100644 --- a/platforms/native/builtin/Blob.js +++ b/platforms/native/builtin/Blob.js @@ -14,83 +14,79 @@ /*! @source http://purl.eligrey.com/github/Blob.js/blob/master/Blob.js */ -(function(global) { +(function (global) { (function (factory) { - if (typeof define === "function" && define.amd) { + if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. - define(["exports"], factory); - } else if (typeof exports === "object" && typeof exports.nodeName !== "string") { + define(['exports'], factory); + } else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') { // CommonJS factory(exports); } else { // Browser globals factory(global); } -})(function (exports) { - "use strict"; - +}((exports) => { exports.URL = global.URL || global.webkitURL; if (global.Blob && global.URL) { try { - new Blob; + new Blob(); return; } catch (e) {} } // Internally we use a BlobBuilder implementation to base Blob off of // in order to support older browsers that only have BlobBuilder - var BlobBuilder = global.BlobBuilder || global.WebKitBlobBuilder || global.MozBlobBuilder || (function() { - var - get_class = function(object) { + const BlobBuilder = global.BlobBuilder || global.WebKitBlobBuilder || global.MozBlobBuilder || (function () { + const + get_class = function (object) { return Object.prototype.toString.call(object).match(/^\[object\s(.*)\]$/)[1]; - } - , FakeBlobBuilder = function BlobBuilder() { + }; + const FakeBlobBuilder = function BlobBuilder () { this.data = []; - } - , FakeBlob = function Blob(data, type, encoding) { + }; + const FakeBlob = function Blob (data, type, encoding) { this.data = data; this.size = data.length; this.type = type; this.encoding = encoding; - } - , FBB_proto = FakeBlobBuilder.prototype - , FB_proto = FakeBlob.prototype - , FileReaderSync = global.FileReaderSync - , FileException = function(type) { + }; + const FBB_proto = FakeBlobBuilder.prototype; + const FB_proto = FakeBlob.prototype; + const FileReaderSync = global.FileReaderSync; + const FileException = function (type) { this.code = this[this.name = type]; - } - , file_ex_codes = ( - "NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR " - + "NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR" - ).split(" ") - , file_ex_code = file_ex_codes.length - , real_URL = global.URL || global.webkitURL || exports - , real_create_object_URL = real_URL.createObjectURL - , real_revoke_object_URL = real_URL.revokeObjectURL - , URL = real_URL - , btoa = global.btoa - , atob = global.atob + }; + const file_ex_codes = ( + 'NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR ' + + 'NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR' + ).split(' '); + let file_ex_code = file_ex_codes.length; + const real_URL = global.URL || global.webkitURL || exports; + const real_create_object_URL = real_URL.createObjectURL; + const real_revoke_object_URL = real_URL.revokeObjectURL; + let URL = real_URL; + const btoa = global.btoa; + const atob = global.atob; - , ArrayBuffer = global.ArrayBuffer - , Uint8Array = global.Uint8Array + const ArrayBuffer = global.ArrayBuffer; + const Uint8Array = global.Uint8Array; - , origin = /^[\w-]+:\/*\[?[\w\.:-]+\]?(?::[0-9]+)?/ - ; - FakeBlob.fake = FB_proto.fake = true; + const origin = /^[\w-]+:\/*\[?[\w\.:-]+\]?(?::[0-9]+)?/; +FakeBlob.fake = FB_proto.fake = true; while (file_ex_code--) { FileException.prototype[file_ex_codes[file_ex_code]] = file_ex_code + 1; } // Polyfill URL if (!real_URL.createObjectURL) { - URL = exports.URL = function(uri) { - var - uri_info = document.createElementNS("http://www.w3.org/1999/xhtml", "a") - , uri_origin - ; - uri_info.href = uri; - if (!("origin" in uri_info)) { - if (uri_info.protocol.toLowerCase() === "data:") { + URL = exports.URL = function (uri) { + const + uri_info = document.createElementNS('http://www.w3.org/1999/xhtml', 'a'); + let uri_origin; +uri_info.href = uri; + if (!('origin' in uri_info)) { + if (uri_info.protocol.toLowerCase() === 'data:') { uri_info.origin = null; } else { uri_origin = uri.match(origin); @@ -100,130 +96,128 @@ return uri_info; }; } - URL.createObjectURL = function(blob) { - var - type = blob.type - , data_URI_header - ; - if (type === null) { - type = "application/octet-stream"; + URL.createObjectURL = function (blob) { + let + type = blob.type; + let data_URI_header; +if (type === null) { + type = 'application/octet-stream'; } if (blob instanceof FakeBlob) { - data_URI_header = "data:" + type; - if (blob.encoding === "base64") { - return data_URI_header + ";base64," + blob.data; - } else if (blob.encoding === "URI") { - return data_URI_header + "," + decodeURIComponent(blob.data); + data_URI_header = `data:${type}`; + if (blob.encoding === 'base64') { + return `${data_URI_header};base64,${blob.data}`; + } else if (blob.encoding === 'URI') { + return `${data_URI_header},${decodeURIComponent(blob.data)}`; } if (btoa) { - return data_URI_header + ";base64," + btoa(blob.data); + return `${data_URI_header};base64,${btoa(blob.data)}`; } else { - return data_URI_header + "," + encodeURIComponent(blob.data); + return `${data_URI_header},${encodeURIComponent(blob.data)}`; } } else if (real_create_object_URL) { return real_create_object_URL.call(real_URL, blob); } }; - URL.revokeObjectURL = function(object_URL) { - if (object_URL.substring(0, 5) !== "data:" && real_revoke_object_URL) { + URL.revokeObjectURL = function (object_URL) { + if (object_URL.substring(0, 5) !== 'data:' && real_revoke_object_URL) { real_revoke_object_URL.call(real_URL, object_URL); } }; - FBB_proto.append = function(data/*, endings*/) { - var bb = this.data; + FBB_proto.append = function (data/*, endings*/) { + const bb = this.data; // decode data to a binary string if (Uint8Array && (data instanceof ArrayBuffer || data instanceof Uint8Array)) { - var - str = "" - , buf = new Uint8Array(data) - , i = 0 - , buf_len = buf.length - ; - for (; i < buf_len; i++) { + let + str = ''; +const buf = new Uint8Array(data); +let i = 0; +const buf_len = buf.length; +for (; i < buf_len; i++) { str += String.fromCharCode(buf[i]); } bb.push(str); - } else if (get_class(data) === "Blob" || get_class(data) === "File") { + } else if (get_class(data) === 'Blob' || get_class(data) === 'File') { if (FileReaderSync) { - var fr = new FileReaderSync; + const fr = new FileReaderSync(); bb.push(fr.readAsBinaryString(data)); } else { // async FileReader won't work as BlobBuilder is sync - throw new FileException("NOT_READABLE_ERR"); + throw new FileException('NOT_READABLE_ERR'); } } else if (data instanceof FakeBlob) { - if (data.encoding === "base64" && atob) { + if (data.encoding === 'base64' && atob) { bb.push(atob(data.data)); - } else if (data.encoding === "URI") { + } else if (data.encoding === 'URI') { bb.push(decodeURIComponent(data.data)); - } else if (data.encoding === "raw") { + } else if (data.encoding === 'raw') { bb.push(data.data); } } else { - if (typeof data !== "string") { - data += ""; // convert unsupported types to strings + if (typeof data !== 'string') { + data += ''; // convert unsupported types to strings } // decode UTF-16 to binary string bb.push(unescape(encodeURIComponent(data))); } }; - FBB_proto.getBlob = function(type) { + FBB_proto.getBlob = function (type) { if (!arguments.length) { type = null; } - return new FakeBlob(this.data.join(""), type, "raw"); + return new FakeBlob(this.data.join(''), type, 'raw'); }; - FBB_proto.toString = function() { - return "[object BlobBuilder]"; + FBB_proto.toString = function () { + return '[object BlobBuilder]'; }; - FB_proto.slice = function(start, end, type) { - var args = arguments.length; + FB_proto.slice = function (start, end, type) { + const args = arguments.length; if (args < 3) { type = null; } return new FakeBlob( - this.data.slice(start, args > 1 ? end : this.data.length) - , type - , this.encoding + this.data.slice(start, args > 1 ? end : this.data.length), + type, + this.encoding, ); }; - FB_proto.toString = function() { - return "[object Blob]"; + FB_proto.toString = function () { + return '[object Blob]'; }; - FB_proto.close = function() { + FB_proto.close = function () { this.size = 0; delete this.data; }; return FakeBlobBuilder; }()); - exports.Blob = function(blobParts, options) { - var type = options ? (options.type || "") : ""; - var builder = new BlobBuilder(); + exports.Blob = function (blobParts, options) { + const type = options ? (options.type || '') : ''; + const builder = new BlobBuilder(); if (blobParts) { - for (var i = 0, len = blobParts.length; i < len; i++) { + for (let i = 0, len = blobParts.length; i < len; i++) { if (Uint8Array && blobParts[i] instanceof Uint8Array) { builder.append(blobParts[i].buffer); - } - else { + } else { builder.append(blobParts[i]); } } } - var blob = builder.getBlob(type); + const blob = builder.getBlob(type); if (!blob.slice && blob.webkitSlice) { blob.slice = blob.webkitSlice; } return blob; }; - var getPrototypeOf = Object.getPrototypeOf || function(object) { + const getPrototypeOf = Object.getPrototypeOf || function (object) { return object.__proto__; }; exports.Blob.prototype = getPrototypeOf(new exports.Blob()); -}); -})( - typeof self !== "undefined" && self || - typeof window !== "undefined" && window || - typeof global !== "undefined" && global || - this.content || this -); +})); +}( + typeof self !== 'undefined' && self + || typeof window !== 'undefined' && window + || typeof global !== 'undefined' && global + || typeof globalThis !== 'undefined' && globalThis + || this.content || this, +)); diff --git a/platforms/native/builtin/index.js b/platforms/native/builtin/index.js index 28926aa1ca..9b84dfd320 100644 --- a/platforms/native/builtin/index.js +++ b/platforms/native/builtin/index.js @@ -1,14 +1,23 @@ +globalThis.__EDITOR__ = globalThis.process && ('electron' in globalThis.process.versions); + +const jsbWindow = require('../jsbWindow'); + jsb.device = jsb.Device; // cc namespace will be reset to {} in creator, use jsb namespace instead. const { btoa, atob } = require('./base64/base64.min'); -window.btoa = btoa; -window.atob = atob; -const { Blob, URL } = require('./Blob'); -window.Blob = Blob; -window.URL = URL; -window.DOMParser = require('./xmldom/dom-parser').DOMParser; -window.__EDITOR__ = window.process && ('electron' in window.process.versions); +jsbWindow.btoa = btoa; +jsbWindow.atob = atob; +const { Blob, URL } = require('./Blob'); + +jsbWindow.Blob = Blob; +jsbWindow.URL = URL; +jsbWindow.DOMParser = require('./xmldom/dom-parser').DOMParser; + +jsbWindow.XMLHttpRequest = jsb.XMLHttpRequest; +jsbWindow.SocketIO = jsb.SocketIO; +jsbWindow.WebSocket = jsb.WebSocket; + require('./jsb_prepare'); require('./jsb-adapter'); require('./jsb_audioengine'); @@ -16,31 +25,31 @@ require('./jsb_input'); let _oldRequestFrameCallback = null; let _requestAnimationFrameID = 0; -let _requestAnimationFrameCallbacks = {}; +const _requestAnimationFrameCallbacks = {}; let _firstTick = true; -window.requestAnimationFrame = function(cb) { - let id = ++_requestAnimationFrameID; +jsbWindow.requestAnimationFrame = function (cb) { + const id = ++_requestAnimationFrameID; _requestAnimationFrameCallbacks[id] = cb; return id; }; -window.cancelAnimationFrame = function(id) { +jsbWindow.cancelAnimationFrame = function (id) { delete _requestAnimationFrameCallbacks[id]; }; -function tick(nowMilliSeconds) { +function tick (nowMilliSeconds) { if (_firstTick) { _firstTick = false; - if (window.onload) { - var event = new Event('load'); - event._target = window; - window.onload(event); + if (jsbWindow.onload) { + const event = new Event('load'); + event._target = globalThis; + jsbWindow.onload(event); } } fireTimeout(nowMilliSeconds); - for (let id in _requestAnimationFrameCallbacks) { + for (const id in _requestAnimationFrameCallbacks) { _oldRequestFrameCallback = _requestAnimationFrameCallbacks[id]; if (_oldRequestFrameCallback) { delete _requestAnimationFrameCallbacks[id]; @@ -52,7 +61,7 @@ function tick(nowMilliSeconds) { let _timeoutIDIndex = 0; class TimeoutInfo { - constructor(cb, delay, isRepeat, target, args) { + constructor (cb, delay, isRepeat, target, args) { this.cb = cb; this.id = ++_timeoutIDIndex; this.start = performance.now(); @@ -63,25 +72,23 @@ class TimeoutInfo { } } -let _timeoutInfos = {}; +const _timeoutInfos = {}; -function fireTimeout(nowMilliSeconds) { +function fireTimeout (nowMilliSeconds) { let info; - for (let id in _timeoutInfos) { + for (const id in _timeoutInfos) { info = _timeoutInfos[id]; if (info && info.cb) { if ((nowMilliSeconds - info.start) >= info.delay) { // console.log(`fireTimeout: id ${id}, start: ${info.start}, delay: ${info.delay}, now: ${nowMilliSeconds}`); if (typeof info.cb === 'string') { Function(info.cb)(); - } - else if (typeof info.cb === 'function') { + } else if (typeof info.cb === 'function') { info.cb.apply(info.target, info.args); } if (info.isRepeat) { info.start = nowMilliSeconds; - } - else { + } else { delete _timeoutInfos[id]; } } @@ -89,39 +96,39 @@ function fireTimeout(nowMilliSeconds) { } } -function createTimeoutInfo(prevFuncArgs, isRepeat) { - let cb = prevFuncArgs[0]; +function createTimeoutInfo (prevFuncArgs, isRepeat) { + const cb = prevFuncArgs[0]; if (!cb) { - console.error("createTimeoutInfo doesn't pass a callback ..."); + console.error('createTimeoutInfo doesn\'t pass a callback ...'); return 0; } - let delay = prevFuncArgs.length > 1 ? prevFuncArgs[1] : 0; + const delay = prevFuncArgs.length > 1 ? prevFuncArgs[1] : 0; let args; if (prevFuncArgs.length > 2) { args = Array.prototype.slice.call(prevFuncArgs, 2); } - let info = new TimeoutInfo(cb, delay, isRepeat, this, args); + const info = new TimeoutInfo(cb, delay, isRepeat, this, args); _timeoutInfos[info.id] = info; return info.id; } -window.setTimeout = function(cb) { +jsbWindow.setTimeout = function (cb) { return createTimeoutInfo(arguments, false); }; -window.clearTimeout = function(id) { +jsbWindow.clearTimeout = function (id) { delete _timeoutInfos[id]; }; -window.setInterval = function(cb) { +jsbWindow.setInterval = function (cb) { return createTimeoutInfo(arguments, true); }; -window.clearInterval = window.clearTimeout; -window.alert = console.error.bind(console); +jsbWindow.clearInterval = jsbWindow.clearTimeout; +jsbWindow.alert = console.error.bind(console); // File utils (Temporary, won't be accessible) if (typeof jsb.FileUtils !== 'undefined') { @@ -129,19 +136,19 @@ if (typeof jsb.FileUtils !== 'undefined') { delete jsb.FileUtils; } -XMLHttpRequest.prototype.addEventListener = function(eventName, listener, options) { - this['on' + eventName] = listener; -} +jsbWindow.XMLHttpRequest.prototype.addEventListener = function (eventName, listener, options) { + this[`on${eventName}`] = listener; +}; -XMLHttpRequest.prototype.removeEventListener = function(eventName, listener, options) { - this['on' + eventName] = null; -} +jsbWindow.XMLHttpRequest.prototype.removeEventListener = function (eventName, listener, options) { + this[`on${eventName}`] = null; +}; // SocketIO -if (window.SocketIO) { - window.io = window.SocketIO; - SocketIO.prototype._Emit = SocketIO.prototype.emit; - SocketIO.prototype.emit = function (uri, delegate) { +if (jsbWindow.SocketIO) { + jsbWindow.io = jsbWindow.SocketIO; + jsbWindow.SocketIO.prototype._Emit = jsbWindow.SocketIO.prototype.emit; + jsbWindow.SocketIO.prototype.emit = function (uri, delegate) { if (typeof delegate === 'object') { delegate = JSON.stringify(delegate); } @@ -149,27 +156,27 @@ if (window.SocketIO) { }; } -window.gameTick = tick; +jsbWindow.gameTick = tick; // generate get set function jsb.generateGetSet = function (moduleObj) { - for (let classKey in moduleObj) { - let classProto = moduleObj[classKey] && moduleObj[classKey].prototype; + for (const classKey in moduleObj) { + const classProto = moduleObj[classKey] && moduleObj[classKey].prototype; if (!classProto) continue; - for (let getName in classProto) { - let getPos = getName.search(/^get/); + for (const getName in classProto) { + const getPos = getName.search(/^get/); if (getPos == -1) continue; let propName = getName.replace(/^get/, ''); - let nameArr = propName.split(''); - let lowerFirst = nameArr[0].toLowerCase(); - let upperFirst = nameArr[0].toUpperCase(); + const nameArr = propName.split(''); + const lowerFirst = nameArr[0].toLowerCase(); + const upperFirst = nameArr[0].toUpperCase(); nameArr.splice(0, 1); - let left = nameArr.join(''); + const left = nameArr.join(''); propName = lowerFirst + left; - let setName = 'set' + upperFirst + left; + const setName = `set${upperFirst}${left}`; if (classProto.hasOwnProperty(propName)) continue; - let setFunc = classProto[setName]; - let hasSetFunc = typeof setFunc === 'function'; + const setFunc = classProto[setName]; + const hasSetFunc = typeof setFunc === 'function'; if (hasSetFunc) { Object.defineProperty(classProto, propName, { get () { @@ -192,5 +199,19 @@ jsb.generateGetSet = function (moduleObj) { } }; +for (const key in jsbWindow) { + if (globalThis[key] === undefined) { + globalThis[key] = jsbWindow[key]; + console.debug(`[web-adapter] override window.${key}`); + } else { + // globalThis[key] = jsbWindow[key]; + console.debug(`[web-adapter] skip window.${key}`); + } +} + +if (typeof globalThis.window === 'undefined') { + globalThis.window = globalThis; +} + // promise polyfill relies on setTimeout implementation require('./promise.min'); diff --git a/platforms/native/builtin/jsb-adapter/Element.js b/platforms/native/builtin/jsb-adapter/Element.js index 606f82d90d..65d7df9f37 100755 --- a/platforms/native/builtin/jsb-adapter/Element.js +++ b/platforms/native/builtin/jsb-adapter/Element.js @@ -1,31 +1,32 @@ const Node = require('./Node'); const DOMRect = require('./DOMRect'); +const jsbWindow = require('../../jsbWindow'); class Element extends Node { - constructor() { - super() - this.className = '' - this.children = [] + constructor () { + super(); + this.className = ''; + this.children = []; this.clientLeft = 0; this.clientTop = 0; this.scrollLeft = 0; this.scrollTop = 0; } - get clientWidth() { + get clientWidth () { return 0; } - get clientHeight() { + get clientHeight () { return 0; } - getBoundingClientRect() { - return new DOMRect(0, 0, window.innerWidth, window.innerHeight); + getBoundingClientRect () { + return new DOMRect(0, 0, jsbWindow.innerWidth, jsbWindow.innerHeight); } // attrName is a string that names the attribute to be removed from element. - removeAttribute(attrName) { + removeAttribute (attrName) { } } diff --git a/platforms/native/builtin/jsb-adapter/FileReader.js b/platforms/native/builtin/jsb-adapter/FileReader.js index a5d82f8e12..c53aebadf7 100755 --- a/platforms/native/builtin/jsb-adapter/FileReader.js +++ b/platforms/native/builtin/jsb-adapter/FileReader.js @@ -1,28 +1,29 @@ -const EventTarget = require('./EventTarget') +const EventTarget = require('./EventTarget'); +const Event = require('./Event'); +const jsbWindow = require('../../jsbWindow'); class FileReader extends EventTarget { - construct() { - this.result = null - + construct () { + this.result = null; } // Aborts the read operation. Upon return, the readyState will be DONE. - abort() {} + abort () {} // Starts reading the contents of the specified Blob, once finished, the result attribute contains an ArrayBuffer representing the file's data. - readAsArrayBuffer() { + readAsArrayBuffer () { } // Starts reading the contents of the specified Blob, once finished, the result attribute contains a data: URL representing the file's data. - readAsDataURL(blob) { - this.result = 'data:image/png;base64,' + window.btoa(blob); - var event = new Event('load'); + readAsDataURL (blob) { + this.result = `data:image/png;base64,${jsbWindow.btoa(blob)}`; + const event = new Event('load'); this.dispatchEvent(event); } // Starts reading the contents of the specified Blob, once finished, the result attribute contains the contents of the file as a text string. - readAsText() { + readAsText () { } } diff --git a/platforms/native/builtin/jsb-adapter/HTMLCanvasElement.js b/platforms/native/builtin/jsb-adapter/HTMLCanvasElement.js index c227ded993..2a843c7b3d 100644 --- a/platforms/native/builtin/jsb-adapter/HTMLCanvasElement.js +++ b/platforms/native/builtin/jsb-adapter/HTMLCanvasElement.js @@ -2,6 +2,7 @@ const HTMLElement = require('./HTMLElement'); const ImageData = require('./ImageData'); const DOMRect = require('./DOMRect'); const CanvasRenderingContext2D = require('./CanvasRenderingContext2D'); +const jsbWindow = require('../../jsbWindow'); const clamp = function (value) { value = Math.round(value); @@ -106,11 +107,11 @@ class HTMLCanvasElement extends HTMLElement { } get clientWidth () { - return window.innerWidth; + return jsbWindow.innerWidth; } get clientHeight () { - return window.innerHeight; + return jsbWindow.innerHeight; } get data () { @@ -121,7 +122,7 @@ class HTMLCanvasElement extends HTMLElement { } getBoundingClientRect () { - return new DOMRect(0, 0, window.innerWidth, window.innerHeight); + return new DOMRect(0, 0, jsbWindow.innerWidth, jsbWindow.innerHeight); } requestPointerLock () { diff --git a/platforms/native/builtin/jsb-adapter/HTMLElement.js b/platforms/native/builtin/jsb-adapter/HTMLElement.js index c4098156f2..f39bbd63ab 100755 --- a/platforms/native/builtin/jsb-adapter/HTMLElement.js +++ b/platforms/native/builtin/jsb-adapter/HTMLElement.js @@ -1,33 +1,33 @@ const Element = require('./Element'); const { noop } = require('./util'); +const jsbWindow = require('../../jsbWindow'); class HTMLElement extends Element { + constructor (tagName = '') { + super(); + this.tagName = tagName.toUpperCase(); - constructor(tagName = '') { - super() - this.tagName = tagName.toUpperCase() - - this.className = '' - this.children = [] + this.className = ''; + this.children = []; this.style = { - width: `${window.innerWidth}px`, - height: `${window.innerHeight}px` - } + width: `${jsbWindow.innerWidth}px`, + height: `${jsbWindow.innerHeight}px`, + }; - this.innerHTML = '' - this.parentElement = window.__canvas + this.innerHTML = ''; + this.parentElement = jsbWindow.__canvas; } - setAttribute(name, value) { - this[name] = value + setAttribute (name, value) { + this[name] = value; } - getAttribute(name) { - return this[name] + getAttribute (name) { + return this[name]; } - focus() { - + focus () { + } } diff --git a/platforms/native/builtin/jsb-adapter/Node.js b/platforms/native/builtin/jsb-adapter/Node.js index 179aa23026..9e01e8cf77 100755 --- a/platforms/native/builtin/jsb-adapter/Node.js +++ b/platforms/native/builtin/jsb-adapter/Node.js @@ -1,47 +1,48 @@ const EventTarget = require('./EventTarget'); +const jsbWindow = require('../../jsbWindow'); class Node extends EventTarget { - constructor() { - super() - this.childNodes = [] - this.parentNode = window.__canvas; + constructor () { + super(); + this.childNodes = []; + this.parentNode = jsbWindow.__canvas; } - appendChild(node) { + appendChild (node) { if (node instanceof Node) { - this.childNodes.push(node) + this.childNodes.push(node); } else { - throw new TypeError('Failed to executed \'appendChild\' on \'Node\': parameter 1 is not of type \'Node\'.') + throw new TypeError('Failed to executed \'appendChild\' on \'Node\': parameter 1 is not of type \'Node\'.'); } } - insertBefore(newNode, referenceNode) { + insertBefore (newNode, referenceNode) { //REFINE: return newNode; } - replaceChild(newChild, oldChild) { + replaceChild (newChild, oldChild) { //REFINE: return oldChild; } - cloneNode() { - const copyNode = Object.create(this) + cloneNode () { + const copyNode = Object.create(this); - Object.assign(copyNode, this) - return copyNode + Object.assign(copyNode, this); + return copyNode; } - removeChild(node) { - const index = this.childNodes.findIndex((child) => child === node) + removeChild (node) { + const index = this.childNodes.findIndex((child) => child === node); if (index > -1) { - return this.childNodes.splice(index, 1) + return this.childNodes.splice(index, 1); } - return null + return null; } - contains(node) { + contains (node) { return this.childNodes.indexOf(node) > -1; } } diff --git a/platforms/native/builtin/jsb-adapter/document.js b/platforms/native/builtin/jsb-adapter/document.js index aeabea8250..973d53a2c0 100755 --- a/platforms/native/builtin/jsb-adapter/document.js +++ b/platforms/native/builtin/jsb-adapter/document.js @@ -4,33 +4,34 @@ const HTMLCanvasElement = require('./HTMLCanvasElement'); const HTMLVideoElement = require('./HTMLVideoElement'); const HTMLScriptElement = require('./HTMLScriptElement'); const Node = require('./Node'); -const FontFaceSet = require('./FontFaceSet') +const FontFaceSet = require('./FontFaceSet'); + +const jsbWindow = require('../../jsbWindow'); class Document extends Node { + constructor () { + super(); - constructor() { - super() + this.readyState = 'complete'; + this.visibilityState = 'visible'; + this.documentElement = globalThis; + this.hidden = false; + this.style = {}; + this.location = require('./location'); - this.readyState = 'complete' - this.visibilityState = 'visible' - this.documentElement = window - this.hidden = false - this.style = {} - this.location = require('./location') + this.head = new HTMLElement('head'); + this.body = new HTMLElement('body'); - this.head = new HTMLElement('head') - this.body = new HTMLElement('body') + this.fonts = new FontFaceSet(); - this.fonts = new FontFaceSet() - - this.scripts = [] + this.scripts = []; } - createElementNS(namespaceURI, qualifiedName, options) { + createElementNS (namespaceURI, qualifiedName, options) { return this.createElement(qualifiedName); } - createElement(tagName) { + createElement (tagName) { if (tagName === 'canvas') { return new HTMLCanvasElement(1, 1); } else if (tagName === 'img') { @@ -41,85 +42,84 @@ class Document extends Node { return new HTMLScriptElement(); } - return new HTMLElement(tagName) + return new HTMLElement(tagName); } - getElementById(id) { - if (id === window.__canvas.id || id === 'canvas') { - return window.__canvas + getElementById (id) { + if (id === jsbWindow.__canvas.id || id === 'canvas') { + return jsbWindow.__canvas; } return new HTMLElement(id); } - getElementsByTagName(tagName) { + getElementsByTagName (tagName) { if (tagName === 'head') { - return [document.head] + return [document.head]; } else if (tagName === 'body') { - return [document.body] + return [document.body]; } else if (tagName === 'canvas') { - return [window.__canvas] + return [jsbWindow.__canvas]; } - return [new HTMLElement(tagName)] + return [new HTMLElement(tagName)]; } - getElementsByName(tagName) { + getElementsByName (tagName) { if (tagName === 'head') { - return [document.head] + return [document.head]; } else if (tagName === 'body') { - return [document.body] + return [document.body]; } else if (tagName === 'canvas') { - return [window.__canvas] + return [jsbWindow.__canvas]; } - return [new HTMLElement(tagName)] + return [new HTMLElement(tagName)]; } - querySelector(query) { + querySelector (query) { if (query === 'head') { - return document.head + return document.head; } else if (query === 'body') { - return document.body + return document.body; } else if (query === 'canvas') { - return window.__canvas - } else if (query === `#${window.__canvas.id}`) { - return window.__canvas + return jsbWindow.__canvas; + } else if (query === `#${jsbWindow.__canvas.id}`) { + return jsbWindow.__canvas; } return new HTMLElement(query); } - querySelectorAll(query) { + querySelectorAll (query) { if (query === 'head') { - return [document.head] + return [document.head]; } else if (query === 'body') { - return [document.body] + return [document.body]; } else if (query === 'canvas') { - return [window.__canvas] + return [jsbWindow.__canvas]; } else if (query.startsWith('script[type="systemjs-importmap"]')) { return HTMLScriptElement._getAllScriptElementsSystemJSImportType(); } return [new HTMLElement(query)]; } - - createTextNode() { + createTextNode () { return new HTMLElement('text'); } - elementFromPoint() { - return window.canvas; + elementFromPoint () { + return jsbWindow.canvas; } - createEvent(type) { - if (window[type]) { - return new window[type]; + createEvent (type) { + if (jsbWindow[type]) { + return new jsbWindow[type](); } return null; } - exitPointerLock() { + exitPointerLock () { jsb.setCursorEnabled(true); } } -let document = new Document() +let document = new Document(); -module.exports = document +module.exports = document; diff --git a/platforms/native/builtin/jsb-adapter/fetch.js b/platforms/native/builtin/jsb-adapter/fetch.js index b55f271f58..2ec5efb868 100644 --- a/platforms/native/builtin/jsb-adapter/fetch.js +++ b/platforms/native/builtin/jsb-adapter/fetch.js @@ -1,18 +1,18 @@ -var self = window; -var support = { +const self = globalThis; +const support = { searchParams: 'URLSearchParams' in self, iterable: 'Symbol' in self && 'iterator' in Symbol, blob: false, // do not support blob in native formData: 'FormData' in self, - arrayBuffer: 'ArrayBuffer' in self -} + arrayBuffer: 'ArrayBuffer' in self, +}; -function isDataView(obj) { - return obj && DataView.prototype.isPrototypeOf(obj) +function isDataView (obj) { + return obj && DataView.prototype.isPrototypeOf(obj); } if (support.arrayBuffer) { - var viewClasses = [ + const viewClasses = [ '[object Int8Array]', '[object Uint8Array]', '[object Uint8ClampedArray]', @@ -21,480 +21,479 @@ if (support.arrayBuffer) { '[object Int32Array]', '[object Uint32Array]', '[object Float32Array]', - '[object Float64Array]' - ] + '[object Float64Array]', + ]; - var isArrayBufferView = - ArrayBuffer.isView || - function(obj) { - return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1 - } + var isArrayBufferView = ArrayBuffer.isView + || function (obj) { + return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1; + }; } -function normalizeName(name) { +function normalizeName (name) { if (typeof name !== 'string') { - name = String(name) + name = String(name); } if (/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(name) || name === '') { - throw new TypeError('Invalid character in header field name') + throw new TypeError('Invalid character in header field name'); } - return name.toLowerCase() + return name.toLowerCase(); } -function normalizeValue(value) { +function normalizeValue (value) { if (typeof value !== 'string') { - value = String(value) + value = String(value); } - return value + return value; } // Build a destructive iterator for the value list -function iteratorFor(items) { - var iterator = { - next: function() { - var value = items.shift() - return {done: value === undefined, value: value} - } - } +function iteratorFor (items) { + const iterator = { + next () { + const value = items.shift(); + return { done: value === undefined, value }; + }, + }; if (support.iterable) { - iterator[Symbol.iterator] = function() { - return iterator - } + iterator[Symbol.iterator] = function () { + return iterator; + }; } - return iterator + return iterator; } -export function Headers(headers) { - this.map = {} +export function Headers (headers) { + this.map = {}; if (headers instanceof Headers) { - headers.forEach(function(value, name) { - this.append(name, value) - }, this) + headers.forEach(function (value, name) { + this.append(name, value); + }, this); } else if (Array.isArray(headers)) { - headers.forEach(function(header) { - this.append(header[0], header[1]) - }, this) + headers.forEach(function (header) { + this.append(header[0], header[1]); + }, this); } else if (headers) { - Object.getOwnPropertyNames(headers).forEach(function(name) { - this.append(name, headers[name]) - }, this) + Object.getOwnPropertyNames(headers).forEach(function (name) { + this.append(name, headers[name]); + }, this); } } -Headers.prototype.append = function(name, value) { - name = normalizeName(name) - value = normalizeValue(value) - var oldValue = this.map[name] - this.map[name] = oldValue ? oldValue + ', ' + value : value -} +Headers.prototype.append = function (name, value) { + name = normalizeName(name); + value = normalizeValue(value); + const oldValue = this.map[name]; + this.map[name] = oldValue ? `${oldValue}, ${value}` : value; +}; -Headers.prototype['delete'] = function(name) { - delete this.map[normalizeName(name)] -} +Headers.prototype.delete = function (name) { + delete this.map[normalizeName(name)]; +}; -Headers.prototype.get = function(name) { - name = normalizeName(name) - return this.has(name) ? this.map[name] : null -} +Headers.prototype.get = function (name) { + name = normalizeName(name); + return this.has(name) ? this.map[name] : null; +}; -Headers.prototype.has = function(name) { - return this.map.hasOwnProperty(normalizeName(name)) -} +Headers.prototype.has = function (name) { + return this.map.hasOwnProperty(normalizeName(name)); +}; -Headers.prototype.set = function(name, value) { - this.map[normalizeName(name)] = normalizeValue(value) -} +Headers.prototype.set = function (name, value) { + this.map[normalizeName(name)] = normalizeValue(value); +}; -Headers.prototype.forEach = function(callback, thisArg) { - for (var name in this.map) { +Headers.prototype.forEach = function (callback, thisArg) { + for (const name in this.map) { if (this.map.hasOwnProperty(name)) { - callback.call(thisArg, this.map[name], name, this) + callback.call(thisArg, this.map[name], name, this); } } -} +}; -Headers.prototype.keys = function() { - var items = [] - this.forEach(function(value, name) { - items.push(name) - }) - return iteratorFor(items) -} +Headers.prototype.keys = function () { + const items = []; + this.forEach((value, name) => { + items.push(name); + }); + return iteratorFor(items); +}; -Headers.prototype.values = function() { - var items = [] - this.forEach(function(value) { - items.push(value) - }) - return iteratorFor(items) -} +Headers.prototype.values = function () { + const items = []; + this.forEach((value) => { + items.push(value); + }); + return iteratorFor(items); +}; -Headers.prototype.entries = function() { - var items = [] - this.forEach(function(value, name) { - items.push([name, value]) - }) - return iteratorFor(items) -} +Headers.prototype.entries = function () { + const items = []; + this.forEach((value, name) => { + items.push([name, value]); + }); + return iteratorFor(items); +}; if (support.iterable) { - Headers.prototype[Symbol.iterator] = Headers.prototype.entries + Headers.prototype[Symbol.iterator] = Headers.prototype.entries; } -function consumed(body) { +function consumed (body) { if (body.bodyUsed) { - return Promise.reject(new TypeError('Already read')) + return Promise.reject(new TypeError('Already read')); } - body.bodyUsed = true + body.bodyUsed = true; } -function fileReaderReady(reader) { - return new Promise(function(resolve, reject) { - reader.onload = function() { - resolve(reader.result) - } - reader.onerror = function() { - reject(reader.error) - } - }) +function fileReaderReady (reader) { + return new Promise((resolve, reject) => { + reader.onload = function () { + resolve(reader.result); + }; + reader.onerror = function () { + reject(reader.error); + }; + }); } -function readBlobAsArrayBuffer(blob) { - var reader = new FileReader() - var promise = fileReaderReady(reader) - reader.readAsArrayBuffer(blob) - return promise +function readBlobAsArrayBuffer (blob) { + const reader = new FileReader(); + const promise = fileReaderReady(reader); + reader.readAsArrayBuffer(blob); + return promise; } -function readBlobAsText(blob) { - var reader = new FileReader() - var promise = fileReaderReady(reader) - reader.readAsText(blob) - return promise +function readBlobAsText (blob) { + const reader = new FileReader(); + const promise = fileReaderReady(reader); + reader.readAsText(blob); + return promise; } -function readArrayBufferAsText(buf) { - var view = new Uint8Array(buf) - var chars = new Array(view.length) +function readArrayBufferAsText (buf) { + const view = new Uint8Array(buf); + const chars = new Array(view.length); - for (var i = 0; i < view.length; i++) { - chars[i] = String.fromCharCode(view[i]) + for (let i = 0; i < view.length; i++) { + chars[i] = String.fromCharCode(view[i]); } - return chars.join('') + return chars.join(''); } -function bufferClone(buf) { +function bufferClone (buf) { if (buf.slice) { - return buf.slice(0) + return buf.slice(0); } else { - var view = new Uint8Array(buf.byteLength) - view.set(new Uint8Array(buf)) - return view.buffer + const view = new Uint8Array(buf.byteLength); + view.set(new Uint8Array(buf)); + return view.buffer; } } -function Body() { - this.bodyUsed = false +function Body () { + this.bodyUsed = false; - this._initBody = function(body) { - this._bodyInit = body + this._initBody = function (body) { + this._bodyInit = body; if (!body) { - this._bodyText = '' + this._bodyText = ''; } else if (typeof body === 'string') { - this._bodyText = body + this._bodyText = body; } else if (support.blob && Blob.prototype.isPrototypeOf(body)) { - this._bodyBlob = body + this._bodyBlob = body; } else if (support.formData && FormData.prototype.isPrototypeOf(body)) { - this._bodyFormData = body + this._bodyFormData = body; } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) { - this._bodyText = body.toString() + this._bodyText = body.toString(); } else if (support.arrayBuffer && support.blob && isDataView(body)) { - this._bodyArrayBuffer = bufferClone(body.buffer) + this._bodyArrayBuffer = bufferClone(body.buffer); // IE 10-11 can't handle a DataView body. - this._bodyInit = new Blob([this._bodyArrayBuffer]) + this._bodyInit = new Blob([this._bodyArrayBuffer]); } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) { - this._bodyArrayBuffer = bufferClone(body) + this._bodyArrayBuffer = bufferClone(body); } else { - this._bodyText = body = Object.prototype.toString.call(body) + this._bodyText = body = Object.prototype.toString.call(body); } if (!this.headers.get('content-type')) { if (typeof body === 'string') { - this.headers.set('content-type', 'text/plain;charset=UTF-8') + this.headers.set('content-type', 'text/plain;charset=UTF-8'); } else if (this._bodyBlob && this._bodyBlob.type) { - this.headers.set('content-type', this._bodyBlob.type) + this.headers.set('content-type', this._bodyBlob.type); } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) { - this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8') + this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8'); } } - } + }; if (support.blob) { - this.blob = function() { - var rejected = consumed(this) + this.blob = function () { + const rejected = consumed(this); if (rejected) { - return rejected + return rejected; } if (this._bodyBlob) { - return Promise.resolve(this._bodyBlob) + return Promise.resolve(this._bodyBlob); } else if (this._bodyArrayBuffer) { - return Promise.resolve(new Blob([this._bodyArrayBuffer])) + return Promise.resolve(new Blob([this._bodyArrayBuffer])); } else if (this._bodyFormData) { - throw new Error('could not read FormData body as blob') + throw new Error('could not read FormData body as blob'); } else { - return Promise.resolve(new Blob([this._bodyText])) + return Promise.resolve(new Blob([this._bodyText])); } - } + }; - this.arrayBuffer = function() { + this.arrayBuffer = function () { if (this._bodyArrayBuffer) { - return consumed(this) || Promise.resolve(this._bodyArrayBuffer) + return consumed(this) || Promise.resolve(this._bodyArrayBuffer); } else { - return this.blob().then(readBlobAsArrayBuffer) + return this.blob().then(readBlobAsArrayBuffer); } - } + }; } - this.text = function() { - var rejected = consumed(this) + this.text = function () { + const rejected = consumed(this); if (rejected) { - return rejected + return rejected; } if (this._bodyBlob) { - return readBlobAsText(this._bodyBlob) + return readBlobAsText(this._bodyBlob); } else if (this._bodyArrayBuffer) { - return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer)) + return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer)); } else if (this._bodyFormData) { - throw new Error('could not read FormData body as text') + throw new Error('could not read FormData body as text'); } else { - return Promise.resolve(this._bodyText) + return Promise.resolve(this._bodyText); } - } + }; if (support.formData) { - this.formData = function() { - return this.text().then(decode) - } + this.formData = function () { + return this.text().then(decode); + }; } - this.json = function() { - return this.text().then(JSON.parse) - } + this.json = function () { + return this.text().then(JSON.parse); + }; - return this + return this; } // HTTP methods whose capitalization should be normalized -var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'] +const methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']; -function normalizeMethod(method) { - var upcased = method.toUpperCase() - return methods.indexOf(upcased) > -1 ? upcased : method +function normalizeMethod (method) { + const upcased = method.toUpperCase(); + return methods.indexOf(upcased) > -1 ? upcased : method; } -export function Request(input, options) { - options = options || {} - var body = options.body +export function Request (input, options) { + options = options || {}; + let body = options.body; if (input instanceof Request) { if (input.bodyUsed) { - throw new TypeError('Already read') + throw new TypeError('Already read'); } - this.url = input.url - this.credentials = input.credentials + this.url = input.url; + this.credentials = input.credentials; if (!options.headers) { - this.headers = new Headers(input.headers) + this.headers = new Headers(input.headers); } - this.method = input.method - this.mode = input.mode - this.signal = input.signal + this.method = input.method; + this.mode = input.mode; + this.signal = input.signal; if (!body && input._bodyInit != null) { - body = input._bodyInit - input.bodyUsed = true + body = input._bodyInit; + input.bodyUsed = true; } } else { - this.url = String(input) + this.url = String(input); } - this.credentials = options.credentials || this.credentials || 'same-origin' + this.credentials = options.credentials || this.credentials || 'same-origin'; if (options.headers || !this.headers) { - this.headers = new Headers(options.headers) + this.headers = new Headers(options.headers); } - this.method = normalizeMethod(options.method || this.method || 'GET') - this.mode = options.mode || this.mode || null - this.signal = options.signal || this.signal - this.referrer = null + this.method = normalizeMethod(options.method || this.method || 'GET'); + this.mode = options.mode || this.mode || null; + this.signal = options.signal || this.signal; + this.referrer = null; if ((this.method === 'GET' || this.method === 'HEAD') && body) { - throw new TypeError('Body not allowed for GET or HEAD requests') + throw new TypeError('Body not allowed for GET or HEAD requests'); } - this._initBody(body) + this._initBody(body); } -Request.prototype.clone = function() { - return new Request(this, {body: this._bodyInit}) -} +Request.prototype.clone = function () { + return new Request(this, { body: this._bodyInit }); +}; -function decode(body) { - var form = new FormData() +function decode (body) { + const form = new FormData(); body .trim() .split('&') - .forEach(function(bytes) { + .forEach((bytes) => { if (bytes) { - var split = bytes.split('=') - var name = split.shift().replace(/\+/g, ' ') - var value = split.join('=').replace(/\+/g, ' ') - form.append(decodeURIComponent(name), decodeURIComponent(value)) + const split = bytes.split('='); + const name = split.shift().replace(/\+/g, ' '); + const value = split.join('=').replace(/\+/g, ' '); + form.append(decodeURIComponent(name), decodeURIComponent(value)); } - }) - return form + }); + return form; } -function parseHeaders(rawHeaders) { - var headers = new Headers() +function parseHeaders (rawHeaders) { + const headers = new Headers(); // Replace instances of \r\n and \n followed by at least one space or horizontal tab with a space // https://tools.ietf.org/html/rfc7230#section-3.2 - var preProcessedHeaders = rawHeaders.replace(/\r?\n[\t ]+/g, ' ') - preProcessedHeaders.split(/\r?\n/).forEach(function(line) { - var parts = line.split(':') - var key = parts.shift().trim() + const preProcessedHeaders = rawHeaders.replace(/\r?\n[\t ]+/g, ' '); + preProcessedHeaders.split(/\r?\n/).forEach((line) => { + const parts = line.split(':'); + const key = parts.shift().trim(); if (key) { - var value = parts.join(':').trim() - headers.append(key, value) + const value = parts.join(':').trim(); + headers.append(key, value); } - }) - return headers + }); + return headers; } -Body.call(Request.prototype) +Body.call(Request.prototype); -export function Response(bodyInit, options) { +export function Response (bodyInit, options) { if (!options) { - options = {} + options = {}; } - this.type = 'default' - this.status = options.status === undefined ? 200 : options.status - this.ok = this.status >= 200 && this.status < 300 - this.statusText = 'statusText' in options ? options.statusText : 'OK' - this.headers = new Headers(options.headers) - this.url = options.url || '' - this._initBody(bodyInit) + this.type = 'default'; + this.status = options.status === undefined ? 200 : options.status; + this.ok = this.status >= 200 && this.status < 300; + this.statusText = 'statusText' in options ? options.statusText : 'OK'; + this.headers = new Headers(options.headers); + this.url = options.url || ''; + this._initBody(bodyInit); } -Body.call(Response.prototype) +Body.call(Response.prototype); -Response.prototype.clone = function() { +Response.prototype.clone = function () { return new Response(this._bodyInit, { status: this.status, statusText: this.statusText, headers: new Headers(this.headers), - url: this.url - }) -} + url: this.url, + }); +}; -Response.error = function() { - var response = new Response(null, {status: 0, statusText: ''}) - response.type = 'error' - return response -} +Response.error = function () { + const response = new Response(null, { status: 0, statusText: '' }); + response.type = 'error'; + return response; +}; -var redirectStatuses = [301, 302, 303, 307, 308] +const redirectStatuses = [301, 302, 303, 307, 308]; -Response.redirect = function(url, status) { +Response.redirect = function (url, status) { if (redirectStatuses.indexOf(status) === -1) { - throw new RangeError('Invalid status code') + throw new RangeError('Invalid status code'); } - return new Response(null, {status: status, headers: {location: url}}) -} + return new Response(null, { status, headers: { location: url } }); +}; -export var DOMException = self.DOMException +export var DOMException = self.DOMException; try { - new DOMException() + new DOMException(); } catch (err) { - DOMException = function(message, name) { - this.message = message - this.name = name - var error = Error(message) - this.stack = error.stack - } - DOMException.prototype = Object.create(Error.prototype) - DOMException.prototype.constructor = DOMException + DOMException = function (message, name) { + this.message = message; + this.name = name; + const error = Error(message); + this.stack = error.stack; + }; + DOMException.prototype = Object.create(Error.prototype); + DOMException.prototype.constructor = DOMException; } -export function fetch(input, init) { - return new Promise(function(resolve, reject) { - var request = new Request(input, init) +export function fetch (input, init) { + return new Promise((resolve, reject) => { + const request = new Request(input, init); if (request.signal && request.signal.aborted) { - return reject(new DOMException('Aborted', 'AbortError')) + return reject(new DOMException('Aborted', 'AbortError')); } - var xhr = new XMLHttpRequest() + const xhr = new XMLHttpRequest(); - function abortXhr() { - xhr.abort() + function abortXhr () { + xhr.abort(); } - xhr.onload = function() { - var options = { + xhr.onload = function () { + const options = { status: xhr.status, statusText: xhr.statusText, - headers: parseHeaders(xhr.getAllResponseHeaders() || '') - } - options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL') - var body = 'response' in xhr ? xhr.response : xhr.responseText - resolve(new Response(body, options)) - } + headers: parseHeaders(xhr.getAllResponseHeaders() || ''), + }; + options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL'); + const body = 'response' in xhr ? xhr.response : xhr.responseText; + resolve(new Response(body, options)); + }; - xhr.onerror = function() { - reject(new TypeError('Network request failed')) - } + xhr.onerror = function () { + reject(new TypeError('Network request failed')); + }; - xhr.ontimeout = function() { - reject(new TypeError('Network request failed')) - } + xhr.ontimeout = function () { + reject(new TypeError('Network request failed')); + }; - xhr.onabort = function() { - reject(new DOMException('Aborted', 'AbortError')) - } + xhr.onabort = function () { + reject(new DOMException('Aborted', 'AbortError')); + }; - xhr.open(request.method, request.url, true) + xhr.open(request.method, request.url, true); if (request.credentials === 'include') { - xhr.withCredentials = true + xhr.withCredentials = true; } else if (request.credentials === 'omit') { - xhr.withCredentials = false + xhr.withCredentials = false; } if ('responseType' in xhr && support.blob) { - xhr.responseType = 'blob' + xhr.responseType = 'blob'; } - request.headers.forEach(function(value, name) { - xhr.setRequestHeader(name, value) - }) + request.headers.forEach((value, name) => { + xhr.setRequestHeader(name, value); + }); if (request.signal) { - request.signal.addEventListener('abort', abortXhr) + request.signal.addEventListener('abort', abortXhr); - xhr.onreadystatechange = function() { + xhr.onreadystatechange = function () { // DONE (success or failure) if (xhr.readyState === 4) { - request.signal.removeEventListener('abort', abortXhr) + request.signal.removeEventListener('abort', abortXhr); } - } + }; } - xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit) - }) + xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit); + }); } -fetch.polyfill = true \ No newline at end of file +fetch.polyfill = true; diff --git a/platforms/native/builtin/jsb-adapter/window.js b/platforms/native/builtin/jsb-adapter/window.js index be85dbdb32..7c520b4ad4 100755 --- a/platforms/native/builtin/jsb-adapter/window.js +++ b/platforms/native/builtin/jsb-adapter/window.js @@ -1,60 +1,62 @@ +const jsbWindow = require('../../jsbWindow'); + function inject () { - window.ontouchstart = null; - window.ontouchmove = null; - window.ontouchend = null; - window.ontouchcancel = null; + jsbWindow.ontouchstart = null; + jsbWindow.ontouchmove = null; + jsbWindow.ontouchend = null; + jsbWindow.ontouchcancel = null; - window.pageXOffset = window.pageYOffset = window.clientTop = window.clientLeft = 0; - window.outerWidth = window.innerWidth; - window.outerHeight = window.innerHeight; - window.clientWidth = window.innerWidth; - window.clientHeight = window.innerHeight; - if (!__EDITOR__) { - window.top = window.parent = window; - window.location = require('./location'); - window.document = require('./document'); - window.navigator = require('./navigator'); - } + jsbWindow.pageXOffset = jsbWindow.pageYOffset = jsbWindow.clientTop = jsbWindow.clientLeft = 0; + jsbWindow.outerWidth = jsbWindow.innerWidth; + jsbWindow.outerHeight = jsbWindow.innerHeight; + jsbWindow.clientWidth = jsbWindow.innerWidth; + jsbWindow.clientHeight = jsbWindow.innerHeight; + // if (!__EDITOR__) { + jsbWindow.top = jsbWindow.parent = jsbWindow; + jsbWindow.location = require('./location'); + jsbWindow.document = require('./document'); + jsbWindow.navigator = require('./navigator'); + // } - window.CanvasRenderingContext2D = require('./CanvasRenderingContext2D'); - window.Element = require('./Element'); - window.HTMLElement = require('./HTMLElement'); - window.HTMLCanvasElement = require('./HTMLCanvasElement'); - window.HTMLImageElement = require('./HTMLImageElement'); - window.HTMLMediaElement = require('./HTMLMediaElement'); - window.HTMLVideoElement = require('./HTMLVideoElement'); - window.HTMLScriptElement = require('./HTMLScriptElement'); - window.__canvas = new HTMLCanvasElement(); - window.__canvas._width = window.innerWidth; - window.__canvas._height = window.innerHeight; + jsbWindow.CanvasRenderingContext2D = require('./CanvasRenderingContext2D'); + jsbWindow.Element = require('./Element'); + jsbWindow.HTMLElement = require('./HTMLElement'); + jsbWindow.HTMLCanvasElement = require('./HTMLCanvasElement'); + jsbWindow.HTMLImageElement = require('./HTMLImageElement'); + jsbWindow.HTMLMediaElement = require('./HTMLMediaElement'); + jsbWindow.HTMLVideoElement = require('./HTMLVideoElement'); + jsbWindow.HTMLScriptElement = require('./HTMLScriptElement'); + jsbWindow.__canvas = new jsbWindow.HTMLCanvasElement(); + jsbWindow.__canvas._width = jsbWindow.innerWidth; + jsbWindow.__canvas._height = jsbWindow.innerHeight; - window.Image = require('./Image'); - window.FileReader = require('./FileReader'); - window.FontFace = require('./FontFace'); - window.FontFaceSet = require('./FontFaceSet'); - window.EventTarget = require('./EventTarget'); - window.Event = window.Event || require('./Event'); - window.TouchEvent = require('./TouchEvent'); - window.MouseEvent = require('./MouseEvent'); - window.KeyboardEvent = require('./KeyboardEvent'); - window.DeviceMotionEvent = require('./DeviceMotionEvent'); + jsbWindow.Image = require('./Image'); + jsbWindow.FileReader = require('./FileReader'); + jsbWindow.FontFace = require('./FontFace'); + jsbWindow.FontFaceSet = require('./FontFaceSet'); + jsbWindow.EventTarget = require('./EventTarget'); + jsbWindow.Event = jsbWindow.Event || require('./Event'); + jsbWindow.TouchEvent = require('./TouchEvent'); + jsbWindow.MouseEvent = require('./MouseEvent'); + jsbWindow.KeyboardEvent = require('./KeyboardEvent'); + jsbWindow.DeviceMotionEvent = require('./DeviceMotionEvent'); // ES6 const m_fetch = require('./fetch'); - window.fetch = m_fetch.fetch; - window.Headers = m_fetch.Headers; - window.Request = m_fetch.Request; - window.Response = m_fetch.Response; + jsbWindow.fetch = m_fetch.fetch; + jsbWindow.Headers = m_fetch.Headers; + jsbWindow.Request = m_fetch.Request; + jsbWindow.Response = m_fetch.Response; // const PORTRAIT = 0; // const LANDSCAPE_LEFT = -90; // const PORTRAIT_UPSIDE_DOWN = 180; // const LANDSCAPE_RIGHT = 90; - window.orientation = jsb.device.getDeviceOrientation(); + jsbWindow.orientation = jsb.device.getDeviceOrientation(); - // window.devicePixelRatio is readonly + // jsb.window.devicePixelRatio is readonly if (!__EDITOR__) { - Object.defineProperty(window, 'devicePixelRatio', { + Object.defineProperty(jsbWindow, 'devicePixelRatio', { get () { return jsb.device.getDevicePixelRatio ? jsb.device.getDevicePixelRatio() : 1; }, @@ -64,36 +66,36 @@ function inject () { }); } - window.screen = { + jsbWindow.screen = { availTop: 0, availLeft: 0, - availHeight: window.innerWidth, - availWidth: window.innerHeight, + availHeight: jsbWindow.innerWidth, + availWidth: jsbWindow.innerHeight, colorDepth: 8, pixelDepth: 8, left: 0, top: 0, - width: window.innerWidth, - height: window.innerHeight, + width: jsbWindow.innerWidth, + height: jsbWindow.innerHeight, orientation: { //FIXME:cjh type: 'portrait-primary', // portrait-primary, portrait-secondary, landscape-primary, landscape-secondary }, onorientationchange (event) {}, }; - window.addEventListener = function (eventName, listener, options) { - window.__canvas.addEventListener(eventName, listener, options); + jsbWindow.addEventListener = function (eventName, listener, options) { + jsbWindow.__canvas.addEventListener(eventName, listener, options); }; - window.removeEventListener = function (eventName, listener, options) { - window.__canvas.removeEventListener(eventName, listener, options); + jsbWindow.removeEventListener = function (eventName, listener, options) { + jsbWindow.__canvas.removeEventListener(eventName, listener, options); }; - window.dispatchEvent = function (event) { - window.__canvas.dispatchEvent(event); + jsbWindow.dispatchEvent = function (event) { + jsbWindow.__canvas.dispatchEvent(event); }; - window.getComputedStyle = function (element) { + jsbWindow.getComputedStyle = function (element) { return { position: 'absolute', left: '0px', @@ -102,34 +104,34 @@ function inject () { }; }; - window.resize = function (width, height) { - window.innerWidth = width; - window.innerHeight = height; - window.outerWidth = window.innerWidth; - window.outerHeight = window.innerHeight; - window.__canvas._width = window.innerWidth; - window.__canvas._height = window.innerHeight; - window.screen.availWidth = window.innerWidth; - window.screen.availHeight = window.innerHeight; - window.screen.width = window.innerWidth; - window.screen.height = window.innerHeight; - window.clientWidth = window.innerWidth; - window.clientHeight = window.innerHeight; + jsbWindow.resize = function (width, height) { + jsbWindow.innerWidth = width; + jsbWindow.innerHeight = height; + jsbWindow.outerWidth = jsbWindow.innerWidth; + jsbWindow.outerHeight = jsbWindow.innerHeight; + jsbWindow.__canvas._width = jsbWindow.innerWidth; + jsbWindow.__canvas._height = jsbWindow.innerHeight; + jsbWindow.screen.availWidth = jsbWindow.innerWidth; + jsbWindow.screen.availHeight = jsbWindow.innerHeight; + jsbWindow.screen.width = jsbWindow.innerWidth; + jsbWindow.screen.height = jsbWindow.innerHeight; + jsbWindow.clientWidth = jsbWindow.innerWidth; + jsbWindow.clientHeight = jsbWindow.innerHeight; // emit resize consistent with web behavior - const resizeEvent = new Event('resize'); - resizeEvent._target = window; - window.dispatchEvent(resizeEvent); + const resizeEvent = new jsbWindow.Event('resize'); + resizeEvent._target = jsbWindow; + jsbWindow.dispatchEvent(resizeEvent); }; - window.focus = function () {}; - window.scroll = function () {}; + jsbWindow.focus = function () {}; + jsbWindow.scroll = function () {}; - window._isInjected = true; + jsbWindow._isInjected = true; } -if (!window._isInjected) { +if (!jsbWindow._isInjected) { inject(); } if (!__EDITOR__) { - window.localStorage = sys.localStorage; + jsbWindow.localStorage = sys.localStorage; } diff --git a/platforms/native/builtin/jsb_input.js b/platforms/native/builtin/jsb_input.js index 9f96378c0f..6b94bd75a1 100644 --- a/platforms/native/builtin/jsb_input.js +++ b/platforms/native/builtin/jsb_input.js @@ -1,82 +1,75 @@ const EventTarget = require('./jsb-adapter/EventTarget'); const Event = require('./jsb-adapter/Event'); -var eventTarget = new EventTarget(); +const eventTarget = new EventTarget(); -var callbackWrappers = {}; -var callbacks = {}; -var index = 1; -var callbackWrapper = function(cb) { - if (!cb) - return null; +const callbackWrappers = {}; +const callbacks = {}; +let index = 1; +const callbackWrapper = function (cb) { + if (!cb) { return null; } - var func = function(event) { - cb({value: event.text}) + const func = function (event) { + cb({ value: event.text }); }; cb.___index = index++; callbackWrappers[cb.___index] = func; return func; }; -var getCallbackWrapper = function(cb) { +const getCallbackWrapper = function (cb) { if (cb && cb.___index) { - var ret = callbackWrappers[cb.___index]; + const ret = callbackWrappers[cb.___index]; delete callbackWrappers[cb.___index]; return ret; - } - else - return null; + } else { return null; } }; -var removeListener = function(name, cb) { - if (cb) - eventTarget.removeEventListener(name, getCallbackWrapper(cb)) - else { +const removeListener = function (name, cb) { + if (cb) { + eventTarget.removeEventListener(name, getCallbackWrapper(cb)); + } else { // remove all listeners of name - var cbs = callbacks[name]; - if (! cbs) - return; + const cbs = callbacks[name]; + if (!cbs) { return; } - for (var i = 0, len = cbs.length; i < len; ++i) - eventTarget.removeEventListener(name, cbs[i]); + for (let i = 0, len = cbs.length; i < len; ++i) { eventTarget.removeEventListener(name, cbs[i]); } delete callbacks[name]; } }; -var recordCallback = function(name, cb) { - if (!cb || !name || name ==='') - return; +const recordCallback = function (name, cb) { + if (!cb || !name || name === '') { return; } - if (! callbacks[name]) - callbacks[name] = []; + if (!callbacks[name]) { callbacks[name] = []; } callbacks[name].push(cb); -} +}; jsb.inputBox = { - onConfirm: function(cb) { - var newCb = callbackWrapper(cb); + onConfirm (cb) { + const newCb = callbackWrapper(cb); eventTarget.addEventListener('confirm', newCb); recordCallback('confirm', newCb); }, - offConfirm: function(cb) { + offConfirm (cb) { removeListener('confirm', cb); }, - onComplete: function(cb) { - var newCb = callbackWrapper(cb); + onComplete (cb) { + const newCb = callbackWrapper(cb); eventTarget.addEventListener('complete', newCb); recordCallback('complete', newCb); }, - offComplete: function(cb) { + offComplete (cb) { removeListener('complete', cb); }, - onInput: function(cb) { - var newCb = callbackWrapper(cb); + onInput (cb) { + const newCb = callbackWrapper(cb); eventTarget.addEventListener('input', newCb); recordCallback('input', newCb); }, - offInput: function(cb) { + offInput (cb) { removeListener('input', cb); }, @@ -87,20 +80,20 @@ jsb.inputBox = { * @param {bool} options.confirmHold * @param {string} options.confirmType * @param {string} options.inputType - * + * * Values of options.confirmType can be [done|next|search|go|send]. * Values of options.inputType can be [text|email|number|phone|password]. */ - show: function(options) { + show (options) { jsb.showInputBox(options); }, - hide: function() { + hide () { jsb.hideInputBox(); }, }; -jsb.onTextInput = function(eventName, text) { - var event = new Event(eventName); +jsb.onTextInput = function (eventName, text) { + const event = new Event(eventName); event.text = text; eventTarget.dispatchEvent(event); }; diff --git a/platforms/native/builtin/promise.min.js b/platforms/native/builtin/promise.min.js index a1542e92af..4c481f29b6 100644 --- a/platforms/native/builtin/promise.min.js +++ b/platforms/native/builtin/promise.min.js @@ -8,4 +8,6 @@ */ /*! @source https://cdn.jsdelivr.net/npm/promise-polyfill@8/dist/polyfill.js */ -!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n():"function"==typeof define&&define.amd?define(n):n()}(0,function(){"use strict";function e(e){var n=this.constructor;return this.then(function(t){return n.resolve(e()).then(function(){return t})},function(t){return n.resolve(e()).then(function(){return n.reject(t)})})}function n(){}function t(e){if(!(this instanceof t))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=undefined,this._deferreds=[],u(e,this)}function o(e,n){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,t._immediateFn(function(){var t=1===e._state?n.onFulfilled:n.onRejected;if(null!==t){var o;try{o=t(e._value)}catch(f){return void i(n.promise,f)}r(n.promise,o)}else(1===e._state?r:i)(n.promise,e._value)})):e._deferreds.push(n)}function r(e,n){try{if(n===e)throw new TypeError("A promise cannot be resolved with itself.");if(n&&("object"==typeof n||"function"==typeof n)){var o=n.then;if(n instanceof t)return e._state=3,e._value=n,void f(e);if("function"==typeof o)return void u(function(e,n){return function(){e.apply(n,arguments)}}(o,n),e)}e._state=1,e._value=n,f(e)}catch(r){i(e,r)}}function i(e,n){e._state=2,e._value=n,f(e)}function f(e){2===e._state&&0===e._deferreds.length&&t._immediateFn(function(){e._handled||t._unhandledRejectionFn(e._value)});for(var n=0,r=e._deferreds.length;r>n;n++)o(e,e._deferreds[n]);e._deferreds=null}function u(e,n){var t=!1;try{e(function(e){t||(t=!0,r(n,e))},function(e){t||(t=!0,i(n,e))})}catch(o){if(t)return;t=!0,i(n,o)}}var c=setTimeout;t.prototype["catch"]=function(e){return this.then(null,e)},t.prototype.then=function(e,t){var r=new this.constructor(n);return o(this,new function(e,n,t){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof n?n:null,this.promise=t}(e,t,r)),r},t.prototype["finally"]=e,t.all=function(e){return new t(function(n,t){function o(e,f){try{if(f&&("object"==typeof f||"function"==typeof f)){var u=f.then;if("function"==typeof u)return void u.call(f,function(n){o(e,n)},t)}r[e]=f,0==--i&&n(r)}catch(c){t(c)}}if(!e||"undefined"==typeof e.length)throw new TypeError("Promise.all accepts an array");var r=Array.prototype.slice.call(e);if(0===r.length)return n([]);for(var i=r.length,f=0;r.length>f;f++)o(f,r[f])})},t.resolve=function(e){return e&&"object"==typeof e&&e.constructor===t?e:new t(function(n){n(e)})},t.reject=function(e){return new t(function(n,t){t(e)})},t.race=function(e){return new t(function(n,t){for(var o=0,r=e.length;r>o;o++)e[o].then(n,t)})},t._immediateFn="function"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){c(e,0)},t._unhandledRejectionFn=function(e){void 0!==console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var l=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw Error("unable to locate global object")}();"Promise"in l?l.Promise.prototype["finally"]||(l.Promise.prototype["finally"]=e):l.Promise=t}); \ No newline at end of file +!(function (e, n) { typeof exports === 'object' && typeof module !== 'undefined' ? n() : typeof define === 'function' && define.amd ? define(n) : n(); }(0, () => { +function e (e) { const n = this.constructor; return this.then((t) => n.resolve(e()).then(() => t), (t) => n.resolve(e()).then(() => n.reject(t))); } function n () {} function t (e) { if (!(this instanceof t)) throw new TypeError('Promises must be constructed via new'); if (typeof e !== 'function') throw new TypeError('not a function'); this._state = 0, this._handled = !1, this._value = undefined, this._deferreds = [], u(e, this); } function o (e, n) { for (;e._state === 3;)e = e._value; e._state !== 0 ? (e._handled = !0, t._immediateFn(() => { const t = e._state === 1 ? n.onFulfilled : n.onRejected; if (t !== null) { let o; try { o = t(e._value); } catch (f) { return void i(n.promise, f); }r(n.promise, o); } else (e._state === 1 ? r : i)(n.promise, e._value); })) : e._deferreds.push(n); } function r (e, n) { try { if (n === e) throw new TypeError('A promise cannot be resolved with itself.'); if (n && (typeof n === 'object' || typeof n === 'function')) { const o = n.then; if (n instanceof t) return e._state = 3, e._value = n, void f(e); if (typeof o === 'function') return void u((function (e, n) { return function () { e.apply(n, arguments); }; }(o, n)), e); }e._state = 1, e._value = n, f(e); } catch (r) { i(e, r); } } function i (e, n) { e._state = 2, e._value = n, f(e); } function f (e) { e._state === 2 && e._deferreds.length === 0 && t._immediateFn(() => { e._handled || t._unhandledRejectionFn(e._value); }); for (let n = 0, r = e._deferreds.length; r > n; n++)o(e, e._deferreds[n]); e._deferreds = null; } function u (e, n) { let t = !1; try { e((e) => { t || (t = !0, r(n, e)); }, (e) => { t || (t = !0, i(n, e)); }); } catch (o) { if (t) return; t = !0, i(n, o); } } const c = setTimeout; t.prototype.catch = function (e) { return this.then(null, e); }, t.prototype.then = function (e, t) { const r = new this.constructor(n); return o(this, new function (e, n, t) { this.onFulfilled = typeof e === 'function' ? e : null, this.onRejected = typeof n === 'function' ? n : null, this.promise = t; }(e, t, r)), r; }, t.prototype.finally = e, t.all = function (e) { return new t((n, t) => { function o (e, f) { try { if (f && (typeof f === 'object' || typeof f === 'function')) { const u = f.then; if (typeof u === 'function') return void u.call(f, (n) => { o(e, n); }, t); }r[e] = f, --i == 0 && n(r); } catch (c) { t(c); } } if (!e || typeof e.length === 'undefined') throw new TypeError('Promise.all accepts an array'); var r = Array.prototype.slice.call(e); if (r.length === 0) return n([]); for (var i = r.length, f = 0; r.length > f; f++)o(f, r[f]); }); }, t.resolve = function (e) { return e && typeof e === 'object' && e.constructor === t ? e : new t((n) => { n(e); }); }, t.reject = function (e) { return new t((n, t) => { t(e); }); }, t.race = function (e) { return new t((n, t) => { for (let o = 0, r = e.length; r > o; o++)e[o].then(n, t); }); }, t._immediateFn = typeof setImmediate === 'function' && function (e) { setImmediate(e); } || function (e) { c(e, 0); }, t._unhandledRejectionFn = function (e) { void 0 !== console && console && console.warn('Possible Unhandled Promise Rejection:', e); }; const l = (function () { if (typeof self !== 'undefined') return self; if (typeof window !== 'undefined') return window; if (typeof global !== 'undefined') return global; throw Error('unable to locate global object'); }()); 'Promise' in l ? l.Promise.prototype.finally || (l.Promise.prototype.finally = e) : l.Promise = t; +})); diff --git a/platforms/native/engine/jsb-dragonbones.js b/platforms/native/engine/jsb-dragonbones.js index d112a7d18f..5527f79705 100644 --- a/platforms/native/engine/jsb-dragonbones.js +++ b/platforms/native/engine/jsb-dragonbones.js @@ -26,11 +26,11 @@ const cacheManager = require('./jsb-cache-manager'); // @ts-expect-error jsb polyfills (function () { - if (window.dragonBones === undefined || window.middleware === undefined) return; + if (globalThis.dragonBones === undefined || globalThis.middleware === undefined) return; const ArmatureDisplayComponent = cc.internal.ArmatureDisplay; if (ArmatureDisplayComponent === undefined) return; - const dragonBones = window.dragonBones; - const middleware = window.middleware; + const dragonBones = globalThis.dragonBones; + const middleware = globalThis.middleware; // dragonbones global time scale. Object.defineProperty(dragonBones, 'timeScale', { @@ -308,7 +308,7 @@ const cacheManager = require('./jsb-cache-manager'); const rawData = JSON.parse(this.dragonBonesJson); this._uuid = rawData.name; } - + const armatureKey = `${this._uuid}#${atlasUUID}`; const dragonBonesData = this._factory.getDragonBonesData(armatureKey); if (dragonBonesData) return armatureKey; diff --git a/platforms/native/engine/jsb-editor-support.js b/platforms/native/engine/jsb-editor-support.js index 656607d5ce..a1f9dff4e0 100644 --- a/platforms/native/engine/jsb-editor-support.js +++ b/platforms/native/engine/jsb-editor-support.js @@ -25,8 +25,8 @@ // @ts-expect-error jsb polyfills (function () { - if (!window.middleware) return; - const middleware = window.middleware; + if (!globalThis.middleware) return; + const middleware = globalThis.middleware; const middlewareMgr = middleware.MiddlewareManager.getInstance(); let reference = 0; const director = cc.director; @@ -63,11 +63,11 @@ middleware.reset(); //const batcher2D = director.root.batcher2D; - if (window.dragonBones) { + if (globalThis.dragonBones) { const armaSystem = cc.internal.ArmatureSystem.getInstance(); armaSystem.prepareRenderData(); } - if (window.spine) { + if (globalThis.spine) { const skeletonSystem = cc.internal.SpineSkeletonSystem.getInstance(); skeletonSystem.prepareRenderData(); } diff --git a/platforms/native/engine/jsb-fs-utils.js b/platforms/native/engine/jsb-fs-utils.js index c94c6acab7..d8a812d265 100644 --- a/platforms/native/engine/jsb-fs-utils.js +++ b/platforms/native/engine/jsb-fs-utils.js @@ -224,4 +224,4 @@ var fsUtils = { }, }; -window.fsUtils = module.exports = fsUtils; +globalThis.fsUtils = module.exports = fsUtils; diff --git a/platforms/native/engine/jsb-gfx.js b/platforms/native/engine/jsb-gfx.js index d7ef8fb74f..daf9394964 100644 --- a/platforms/native/engine/jsb-gfx.js +++ b/platforms/native/engine/jsb-gfx.js @@ -31,6 +31,7 @@ const bufferProto = gfx.Buffer.prototype; const textureProto = gfx.Texture.prototype; const descriptorSetProto = gfx.DescriptorSet.prototype; +const jsbWindow = require('../jsbWindow'); ///////////////////////////// handle different paradigms ///////////////////////////// const oldCopyTexImagesToTextureFunc = deviceProto.copyTexImagesToTexture; @@ -39,10 +40,10 @@ deviceProto.copyTexImagesToTexture = function (texImages, texture, regions) { if (texImages) { for (let i = 0; i < texImages.length; ++i) { const texImage = texImages[i]; - if (texImage instanceof HTMLCanvasElement) { + if (texImage instanceof jsbWindow.HTMLCanvasElement) { // Refer to HTMLCanvasElement and ImageData implementation images.push(texImage._data.data); - } else if (texImage instanceof HTMLImageElement) { + } else if (texImage instanceof jsbWindow.HTMLImageElement) { // Refer to HTMLImageElement implementation images.push(texImage._data); } else { @@ -56,13 +57,13 @@ deviceProto.copyTexImagesToTexture = function (texImages, texture, regions) { const oldDeviceCreateSwapchainFunc = deviceProto.createSwapchain; deviceProto.createSwapchain = function (info) { - info.windowHandle = window.windowHandler; + info.windowHandle = jsbWindow.windowHandler; return oldDeviceCreateSwapchainFunc.call(this, info); }; const oldSwapchainInitializeFunc = swapchainProto.initialize; swapchainProto.initialize = function (info) { - info.windowHandle = window.windowHandler; + info.windowHandle = jsbWindow.windowHandler; oldSwapchainInitializeFunc.call(this, info); }; diff --git a/platforms/native/engine/jsb-loader.js b/platforms/native/engine/jsb-loader.js index 96e6084eb8..717dfba131 100644 --- a/platforms/native/engine/jsb-loader.js +++ b/platforms/native/engine/jsb-loader.js @@ -24,8 +24,7 @@ THE SOFTWARE. ****************************************************************************/ -'use strict'; - +const jsbWindow = require('../jsbWindow'); const cacheManager = require('./jsb-cache-manager'); const { downloadFile, readText, readArrayBuffer, readJson, getUserDataPath, initJsbDownloader } = require('./jsb-fs-utils'); @@ -35,12 +34,12 @@ const parser = cc.assetManager.parser; const presets = cc.assetManager.presets; downloader.maxConcurrency = 30; downloader.maxRequestsPerFrame = 60; -presets['preload'].maxConcurrency = 15; -presets['preload'].maxRequestsPerFrame = 30; -presets['scene'].maxConcurrency = 32; -presets['scene'].maxRequestsPerFrame = 64; -presets['bundle'].maxConcurrency = 32; -presets['bundle'].maxRequestsPerFrame = 64; +presets.preload.maxConcurrency = 15; +presets.preload.maxRequestsPerFrame = 30; +presets.scene.maxConcurrency = 32; +presets.scene.maxRequestsPerFrame = 64; +presets.bundle.maxConcurrency = 32; +presets.bundle.maxRequestsPerFrame = 64; let suffix = 0; const failureMap = {}; @@ -55,56 +54,56 @@ function downloadScript (url, options, onComplete) { if (loadedScripts[url]) return onComplete && onComplete(); - download(url, function (src, options, onComplete) { - window.require(src); + download(url, (src, options, onComplete) => { + if (__EDITOR__) { + // in editor mode,require is from electron,__require is from engine + globalThis.__require(src); + } else { + globalThis.require(src); + } loadedScripts[url] = true; onComplete && onComplete(null); }, options, options.onFileProgress, onComplete); } function download (url, func, options, onFileProgress, onComplete) { - var result = transformUrl(url, options); + const result = transformUrl(url, options); if (result.inLocal) { func(result.url, options, onComplete); - } - else if (result.inCache) { - cacheManager.updateLastTime(url) - func(result.url, options, function (err, data) { + } else if (result.inCache) { + cacheManager.updateLastTime(url); + func(result.url, options, (err, data) => { if (err) { cacheManager.removeCache(url); } onComplete(err, data); }); - } - else { - var time = Date.now(); - var storagePath = ''; - var failureRecord = failureMap[url]; + } else { + const time = Date.now(); + let storagePath = ''; + const failureRecord = failureMap[url]; if (failureRecord) { storagePath = failureRecord.storagePath; - } - else if (options.__cacheBundleRoot__) { + } else if (options.__cacheBundleRoot__) { storagePath = `${options.__cacheBundleRoot__}/${time}${suffix++}${cc.path.extname(url)}`; - } - else { + } else { storagePath = `${time}${suffix++}${cc.path.extname(url)}`; } - downloadFile(url, `${cacheManager.cacheDir}/${storagePath}`, options.header, onFileProgress, function (err, path) { + downloadFile(url, `${cacheManager.cacheDir}/${storagePath}`, options.header, onFileProgress, (err, path) => { if (err) { if (failureRecord) { failureRecord.retryCount++; if (failureRecord.retryCount >= maxRetryCountFromBreakpoint) { delete failureMap[url]; } - } - else { + } else { failureMap[url] = { retryCount: 0, storagePath }; } onComplete(err, null); return; } delete failureMap[url]; - func(path, options, function (err, data) { + func(path, options, (err, data) => { if (!err) { cacheManager.cacheFile(url, storagePath, options.__cacheBundleRoot__); } @@ -115,21 +114,19 @@ function download (url, func, options, onFileProgress, onComplete) { } function transformUrl (url, options) { - var inLocal = false; - var inCache = false; + let inLocal = false; + let inCache = false; if (REGEX.test(url)) { if (options.reload) { return { url }; - } - else { - var cache = cacheManager.getCache(url); + } else { + const cache = cacheManager.getCache(url); if (cache) { inCache = true; url = cache; } } - } - else { + } else { inLocal = true; } return { url, inLocal, inCache }; @@ -144,18 +141,18 @@ function downloadAsset (url, options, onComplete) { } function _getFontFamily (fontHandle) { - var ttfIndex = fontHandle.lastIndexOf(".ttf"); + const ttfIndex = fontHandle.lastIndexOf('.ttf'); if (ttfIndex === -1) return fontHandle; - var slashPos = fontHandle.lastIndexOf("/"); - var fontFamilyName; + const slashPos = fontHandle.lastIndexOf('/'); + let fontFamilyName; if (slashPos === -1) { - fontFamilyName = fontHandle.substring(0, ttfIndex) + "_LABEL"; + fontFamilyName = `${fontHandle.substring(0, ttfIndex)}_LABEL`; } else { - fontFamilyName = fontHandle.substring(slashPos + 1, ttfIndex) + "_LABEL"; + fontFamilyName = `${fontHandle.substring(slashPos + 1, ttfIndex)}_LABEL`; } if (fontFamilyName.indexOf(' ') !== -1) { - fontFamilyName = '"' + fontFamilyName + '"'; + fontFamilyName = `"${fontFamilyName}"`; } return fontFamilyName; } @@ -178,37 +175,33 @@ function parseArrayBuffer (url, options, onComplete) { function downloadJson (url, options, onComplete) { download(url, parseJson, options, options.onFileProgress, onComplete); -} +} function downloadBundle (nameOrUrl, options, onComplete) { - let bundleName = cc.path.basename(nameOrUrl); - var version = options.version || downloader.bundleVers[bundleName]; + const bundleName = cc.path.basename(nameOrUrl); + const version = options.version || downloader.bundleVers[bundleName]; let url; if (REGEX.test(nameOrUrl) || nameOrUrl.startsWith(getUserDataPath())) { url = nameOrUrl; cacheManager.makeBundleFolder(bundleName); - } - else { - if (downloader.remoteBundles.indexOf(bundleName) !== -1) { + } else if (downloader.remoteBundles.indexOf(bundleName) !== -1) { url = `${downloader.remoteServerAddress}remote/${bundleName}`; cacheManager.makeBundleFolder(bundleName); - } - else { + } else { url = `assets/${bundleName}`; } - } - var config = `${url}/cc.config.${version ? version + '.': ''}json`; + const config = `${url}/cc.config.${version ? `${version}.` : ''}json`; options.__cacheBundleRoot__ = bundleName; - downloadJson(config, options, function (err, response) { + downloadJson(config, options, (err, response) => { if (err) { return onComplete(err, null); } - let out = response; - out && (out.base = url + '/'); + const out = response; + out && (out.base = `${url}/`); if (out.hasPreloadScript) { - var js = `${url}/index.${version ? version + '.' : ''}${out.encrypted ? 'jsc' : `js`}`; - downloadScript(js, options, function (err) { + const js = `${url}/index.${version ? `${version}.` : ''}${out.encrypted ? 'jsc' : `js`}`; + downloadScript(js, options, (err) => { if (err) { return onComplete(err, null); } @@ -218,7 +211,7 @@ function downloadBundle (nameOrUrl, options, onComplete) { onComplete(null, out); } }); -}; +} const downloadCCON = (url, options, onComplete) => { downloadJson(url, options, (err, json) => { @@ -265,23 +258,23 @@ function downloadArrayBuffer (url, options, onComplete) { } function loadFont (url, options, onComplete) { - let fontFamilyName = _getFontFamily(url); + const fontFamilyName = _getFontFamily(url); - let fontFace = new FontFace(fontFamilyName, "url('" + url + "')"); - document.fonts.add(fontFace); + const fontFace = new jsbWindow.FontFace(fontFamilyName, `url('${url}')`); + jsbWindow.document.fonts.add(fontFace); fontFace.load(); - fontFace.loaded.then(function() { + fontFace.loaded.then(() => { onComplete(null, fontFamilyName); - }, function () { + }, () => { cc.warnID(4933, fontFamilyName); onComplete(null, fontFamilyName); }); } const originParsePlist = parser.parsePlist; -let parsePlist = function (url, options, onComplete) { - readText(url, function (err, file) { +const parsePlist = function (url, options, onComplete) { + readText(url, (err, file) => { if (err) return onComplete(err); originParsePlist(file, options, onComplete); }); @@ -294,7 +287,7 @@ parser.parsePlist = parsePlist; downloader.downloadScript = downloadScript; function loadAudioPlayer (url, options, onComplete) { - cc.AudioPlayer.load(url).then(player => { + cc.AudioPlayer.load(url).then((player) => { const audioMeta = { player, url, @@ -302,35 +295,35 @@ function loadAudioPlayer (url, options, onComplete) { type: player.type, }; onComplete(null, audioMeta); - }).catch(err => { + }).catch((err) => { onComplete(err); }); } downloader.register({ // JS - '.js' : downloadScript, - '.jsc' : downloadScript, + '.js': downloadScript, + '.jsc': downloadScript, // Images - '.png' : downloadAsset, - '.jpg' : downloadAsset, - '.bmp' : downloadAsset, - '.jpeg' : downloadAsset, - '.gif' : downloadAsset, - '.ico' : downloadAsset, - '.tiff' : downloadAsset, - '.webp' : downloadAsset, - '.image' : downloadAsset, - '.pvr' : downloadAsset, - '.pkm' : downloadAsset, + '.png': downloadAsset, + '.jpg': downloadAsset, + '.bmp': downloadAsset, + '.jpeg': downloadAsset, + '.gif': downloadAsset, + '.ico': downloadAsset, + '.tiff': downloadAsset, + '.webp': downloadAsset, + '.image': downloadAsset, + '.pvr': downloadAsset, + '.pkm': downloadAsset, '.astc': downloadAsset, // Audio - '.mp3' : downloadAsset, - '.ogg' : downloadAsset, - '.wav' : downloadAsset, - '.m4a' : downloadAsset, + '.mp3': downloadAsset, + '.ogg': downloadAsset, + '.wav': downloadAsset, + '.m4a': downloadAsset, '.ccon': downloadCCON, '.cconb': downloadCCONB, @@ -344,93 +337,93 @@ downloader.register({ '.rm': downloadAsset, '.rmvb': downloadAsset, // Text - '.txt' : downloadAsset, - '.xml' : downloadAsset, - '.vsh' : downloadAsset, - '.fsh' : downloadAsset, - '.atlas' : downloadAsset, + '.txt': downloadAsset, + '.xml': downloadAsset, + '.vsh': downloadAsset, + '.fsh': downloadAsset, + '.atlas': downloadAsset, - '.tmx' : downloadAsset, - '.tsx' : downloadAsset, - '.fnt' : downloadAsset, - '.plist' : downloadAsset, + '.tmx': downloadAsset, + '.tsx': downloadAsset, + '.fnt': downloadAsset, + '.plist': downloadAsset, - '.json' : downloadJson, - '.ExportJson' : downloadAsset, + '.json': downloadJson, + '.ExportJson': downloadAsset, - '.binary' : downloadAsset, - '.bin' : downloadAsset, + '.binary': downloadAsset, + '.bin': downloadAsset, '.dbbin': downloadAsset, '.skel': downloadAsset, // Font - '.font' : downloadAsset, - '.eot' : downloadAsset, - '.ttf' : downloadAsset, - '.woff' : downloadAsset, - '.svg' : downloadAsset, - '.ttc' : downloadAsset, + '.font': downloadAsset, + '.eot': downloadAsset, + '.ttf': downloadAsset, + '.woff': downloadAsset, + '.svg': downloadAsset, + '.ttc': downloadAsset, - 'bundle': downloadBundle, - 'default': downloadText + bundle: downloadBundle, + default: downloadText, }); parser.register({ - + // Images - '.png' : downloader.downloadDomImage, - '.jpg' : downloader.downloadDomImage, - '.bmp' : downloader.downloadDomImage, - '.jpeg' : downloader.downloadDomImage, - '.gif' : downloader.downloadDomImage, - '.ico' : downloader.downloadDomImage, - '.tiff' : downloader.downloadDomImage, - '.webp' : downloader.downloadDomImage, - '.image' : downloader.downloadDomImage, + '.png': downloader.downloadDomImage, + '.jpg': downloader.downloadDomImage, + '.bmp': downloader.downloadDomImage, + '.jpeg': downloader.downloadDomImage, + '.gif': downloader.downloadDomImage, + '.ico': downloader.downloadDomImage, + '.tiff': downloader.downloadDomImage, + '.webp': downloader.downloadDomImage, + '.image': downloader.downloadDomImage, // Audio - '.mp3' : loadAudioPlayer, - '.ogg' : loadAudioPlayer, - '.wav' : loadAudioPlayer, - '.m4a' : loadAudioPlayer, + '.mp3': loadAudioPlayer, + '.ogg': loadAudioPlayer, + '.wav': loadAudioPlayer, + '.m4a': loadAudioPlayer, // compressed texture '.pvr': downloader.downloadDomImage, '.pkm': downloader.downloadDomImage, '.astc': downloader.downloadDomImage, - '.binary' : parseArrayBuffer, - '.bin' : parseArrayBuffer, + '.binary': parseArrayBuffer, + '.bin': parseArrayBuffer, '.dbbin': parseArrayBuffer, '.skel': parseArrayBuffer, // Text - '.txt' : parseText, - '.xml' : parseText, - '.vsh' : parseText, - '.fsh' : parseText, - '.atlas' : parseText, - '.tmx' : parseText, - '.tsx' : parseText, - '.fnt' : parseText, + '.txt': parseText, + '.xml': parseText, + '.vsh': parseText, + '.fsh': parseText, + '.atlas': parseText, + '.tmx': parseText, + '.tsx': parseText, + '.fnt': parseText, - '.plist' : parsePlist, + '.plist': parsePlist, // Font - '.font' : loadFont, - '.eot' : loadFont, - '.ttf' : loadFont, - '.woff' : loadFont, - '.svg' : loadFont, - '.ttc' : loadFont, + '.font': loadFont, + '.eot': loadFont, + '.ttf': loadFont, + '.woff': loadFont, + '.svg': loadFont, + '.ttc': loadFont, - '.ExportJson' : parseJson, + '.ExportJson': parseJson, }); -cc.assetManager.transformPipeline.append(function (task) { - var input = task.output = task.input; - for (var i = 0, l = input.length; i < l; i++) { - var item = input[i]; +cc.assetManager.transformPipeline.append((task) => { + const input = task.output = task.input; + for (let i = 0, l = input.length; i < l; i++) { + const item = input[i]; if (item.config) { item.options.__cacheBundleRoot__ = item.config.name; } @@ -442,11 +435,11 @@ cc.assetManager.transformPipeline.append(function (task) { } }); -var originInit = cc.assetManager.init; +const originInit = cc.assetManager.init; cc.assetManager.init = function (options) { originInit.call(cc.assetManager, options); const jsbDownloaderMaxTasks = cc.settings.querySettings('assets', 'jsbDownloaderMaxTasks'); const jsbDownloaderTimeout = cc.settings.querySettings('assets', 'jsbDownloaderTimeout'); initJsbDownloader(jsbDownloaderMaxTasks, jsbDownloaderTimeout); cacheManager.init(); -}; \ No newline at end of file +}; diff --git a/platforms/native/engine/jsb-spine-skeleton.js b/platforms/native/engine/jsb-spine-skeleton.js index f3794751d2..087be1d98a 100644 --- a/platforms/native/engine/jsb-spine-skeleton.js +++ b/platforms/native/engine/jsb-spine-skeleton.js @@ -26,10 +26,10 @@ const cacheManager = require('./jsb-cache-manager'); // @ts-expect-error jsb polyfills (function () { - if (window.spine === undefined || window.middleware === undefined) return; + if (globalThis.spine === undefined || globalThis.middleware === undefined) return; if (cc.internal.SpineSkeletonData === undefined) return; - const spine = window.spine; - const middleware = window.middleware; + const spine = globalThis.spine; + const middleware = globalThis.middleware; middleware.generateGetSet(spine); diff --git a/platforms/native/jsbWindow.js b/platforms/native/jsbWindow.js new file mode 100644 index 0000000000..cccf6638b6 --- /dev/null +++ b/platforms/native/jsbWindow.js @@ -0,0 +1,3 @@ +const jsbWindow = globalThis.jsb.window = globalThis.jsb.window || {}; //TODO(PatriceJiang): + +module.exports = jsbWindow; diff --git a/scripts/fetch-ral.js b/scripts/fetch-ral.js index 5262a01e17..19fe458ece 100644 --- a/scripts/fetch-ral.js +++ b/scripts/fetch-ral.js @@ -163,6 +163,7 @@ async function removeDir (dirPath) { await removeDir(repositoryPath); let exitCode = await runCommand('git clone git@github.com:yangws/runtime-web-adapter.git', __dirname); if (exitCode !== 0) { + await removeDir(repositoryPath); await runCommand('git clone https://github.com/yangws/runtime-web-adapter', __dirname); } await runCommand('git checkout for-creator-3', repositoryPath); diff --git a/scripts/native-pack-tool/source/platforms/mac.ts b/scripts/native-pack-tool/source/platforms/mac.ts index bedde32cbf..e476926856 100644 --- a/scripts/native-pack-tool/source/platforms/mac.ts +++ b/scripts/native-pack-tool/source/platforms/mac.ts @@ -64,12 +64,16 @@ export class MacPackTool extends MacOSPackTool { cp.stdout.on('data', (data) => { console.log(`[open app] ${data}`); }); - cp.stderr.on(`data`, (data) => { + cp.stderr.on('data', (data) => { console.error(`[open app error] ${data}`); }); cp.on('close', (code, sig) => { console.log(`${app} exit with ${code}, sig: ${sig}`); - resolve(); + if (code !== 0) { + reject(`[open app error] Child process exit width code ${code}`); + } else { + resolve(); + } }); cp.on('exit', (code, sig) => { resolve(); diff --git a/tests/constants-for-test.ts b/tests/constants-for-test.ts index 68a095ff81..3610050a48 100644 --- a/tests/constants-for-test.ts +++ b/tests/constants-for-test.ts @@ -1,4 +1,5 @@ -const _global = typeof window === 'undefined' ? global : window; +const _globalThis = typeof global === 'undefined' ? globalThis : global; +const _global = typeof window === 'undefined' ? _globalThis : window; function defined (name: string) { return typeof _global[name] === 'object'; diff --git a/tests/core/algorithm/move.test.ts b/tests/core/algorithm/move.test.ts index 288242925a..00c5a442d5 100644 --- a/tests/core/algorithm/move.test.ts +++ b/tests/core/algorithm/move.test.ts @@ -1,23 +1,23 @@ -import { move } from '../../../cocos/core/algorithm/move'; +import { shift } from '../../../cocos/core/algorithm/move'; describe('Array utils', () => { - describe('Move', () => { + describe('Shift', () => { test('Location does not alters', () => { - expect(move([1, 2, 3], 0, 0)).toStrictEqual([1, 2, 3]); + expect(shift([1, 2, 3], 0, 0)).toStrictEqual([1, 2, 3]); }); - test('Move right', () => { - expect(move([1, 2, 3], 0, 1)).toStrictEqual([2, 1, 3]); - expect(move([1, 2, 3], 0, 2)).toStrictEqual([2, 3, 1]); - expect(move([1, 2, 3, 4], 0, 2)).toStrictEqual([2, 3, 1, 4]); - expect(move([1, 2, 3, 4], 1, 2)).toStrictEqual([1, 3, 2, 4]); + test('Shift right', () => { + expect(shift([1, 2, 3], 0, 1)).toStrictEqual([2, 1, 3]); + expect(shift([1, 2, 3], 0, 2)).toStrictEqual([2, 3, 1]); + expect(shift([1, 2, 3, 4], 0, 2)).toStrictEqual([2, 3, 1, 4]); + expect(shift([1, 2, 3, 4], 1, 2)).toStrictEqual([1, 3, 2, 4]); }); - test('Move left', () => { - expect(move([1, 2, 3], 1, 0)).toStrictEqual([2, 1, 3]); - expect(move([1, 2, 3], 2, 0)).toStrictEqual([3, 1, 2]); - expect(move([1, 2, 3, 4], 2, 0)).toStrictEqual([3, 1, 2, 4]); - expect(move([1, 2, 3, 4], 2, 1)).toStrictEqual([1, 3, 2, 4]); + test('Shift left', () => { + expect(shift([1, 2, 3], 1, 0)).toStrictEqual([2, 1, 3]); + expect(shift([1, 2, 3], 2, 0)).toStrictEqual([3, 1, 2]); + expect(shift([1, 2, 3, 4], 2, 0)).toStrictEqual([3, 1, 2, 4]); + expect(shift([1, 2, 3, 4], 2, 1)).toStrictEqual([1, 3, 2, 4]); }); }); }); \ No newline at end of file diff --git a/tests/core/algorithm/murmurhash2.test.ts b/tests/core/algorithm/murmurhash2.test.ts new file mode 100644 index 0000000000..9c6751b490 --- /dev/null +++ b/tests/core/algorithm/murmurhash2.test.ts @@ -0,0 +1,12 @@ +import { murmurhash2_32_gc } from '../../../cocos/core/algorithm/murmurhash2_gc' + +const SEED = 3339675911; + +// The test case refers to https://github.com/jtpio/murmurhash2/blob/main/test/murmur2_spec.ts +describe('murmurhash2_32_gc', () => { + test('should encode ASCII strings', () => { + const str = 'abcde'; + const h = murmurhash2_32_gc(str, SEED); + expect(h).toEqual(730143326); + }); +}) diff --git a/tests/core/memop/pool.test.ts b/tests/core/memop/pool.test.ts index 4557df567d..56d15b30bf 100644 --- a/tests/core/memop/pool.test.ts +++ b/tests/core/memop/pool.test.ts @@ -56,7 +56,7 @@ test('shrink', () => { } pool.freeArray(test); // @ts-expect-error - expect(pool._freepool.length).toBeGreaterThan(100); + expect(pool._freePool.length).toBeGreaterThan(100); // @ts-expect-error expect(pool._nextAvail).toBeGreaterThan(100); @@ -66,7 +66,7 @@ test('shrink', () => { pool.tryShrink(); // @ts-expect-error - expect(pool._freepool.length >= 50 && pool._freepool.length <= 100).toBeTruthy(); + expect(pool._freePool.length >= 50 && pool._freePool.length <= 100).toBeTruthy(); // @ts-expect-error expect(pool._nextAvail >= 50 && pool._nextAvail <= 100).toBeTruthy(); @@ -77,7 +77,7 @@ test('shrink', () => { pool.tryShrink(); // @ts-expect-error - expect(pool._freepool.length >= 25 && pool._freepool.length <= 50).toBeTruthy(); + expect(pool._freePool.length >= 25 && pool._freePool.length <= 50).toBeTruthy(); // @ts-expect-error expect(pool._nextAvail >= 25 && pool._nextAvail <= 50).toBeTruthy(); @@ -117,5 +117,5 @@ test('destroy', () => { // @ts-expect-error expect(pool._nextAvail).toBe(-1); // @ts-expect-error - expect(pool._freepool.length).toBe(0); + expect(pool._freePool.length).toBe(0); }); \ No newline at end of file