move reflection-probe to 3d module (#13711)

* add validate

* fix switch probe error

* export  reflectionProbe

* remove export reflectionProbeManager

* export
This commit is contained in:
徐兵
2022-12-08 16:31:46 +08:00
committed by GitHub
parent 88d4950a54
commit 3dc654cbcd
5 changed files with 38 additions and 13 deletions
+1
View File
@@ -33,6 +33,7 @@ export * from './framework';
export * from './lights';
export * from './skinned-mesh-renderer';
export * from './lod';
export * from './reflection-probe';
export {
utils,
+26
View File
@@ -0,0 +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 engine source code (the "Software"), a limited,
worldwide, royalty-free, non-assignable, revocable and non-exclusive license
to use Cocos Creator solely to develop games on your target platforms. You shall
not use Cocos Creator software for developing other 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 { ReflectionProbe } from './reflection-probe-component';
@@ -24,17 +24,17 @@
*/
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';
import { CCObject, Color, Enum, size, Vec3 } from '../../core';
import { TextureCube } from '../asset/assets';
import { scene } from '../render-scene';
import { CAMERA_DEFAULT_MASK } from '../rendering/define';
import { ReflectionProbeManager } from '../rendering/reflection-probe-manager';
import { Component } from '../scene-graph/component';
import { Layers } from '../scene-graph/layers';
import { Camera } from './camera-component';
import { Node, TransformBit } from '../scene-graph';
import { ProbeClearFlag, ProbeType } from '../render-scene/scene/reflection-probe';
import { TextureCube } from '../../asset/assets';
import { scene } from '../../render-scene';
import { CAMERA_DEFAULT_MASK } from '../../rendering/define';
import { ReflectionProbeManager } from '../../rendering/reflection-probe-manager';
import { Component } from '../../scene-graph/component';
import { Layers } from '../../scene-graph/layers';
import { Camera } from '../../misc/camera-component';
import { Node, TransformBit } from '../../scene-graph';
import { ProbeClearFlag, ProbeType } from '../../render-scene/scene/reflection-probe';
export enum ProbeResolution {
/**
-1
View File
@@ -30,6 +30,5 @@ export { ModelRenderer } from './model-renderer';
export { Renderer } from './renderer';
export { MissingScript } from './missing-script';
export { PrefabLink } from './prefab-link';
export { ReflectionProbe } from './reflection-probe-component';
/** deprecated */
export * from './deprecated';
+1 -2
View File
@@ -6,7 +6,6 @@ import { AccessType, AttachmentType, ComputeView, LightInfo, QueueHint, RasterVi
import { Vec4, macro, geometry, toRadian, cclegacy } from '../../core';
import { Material } from '../../asset/assets';
import { SRGBToLinear } from '../pipeline-funcs';
import { ReflectionProbeManager } from '../reflection-probe-manager';
import { RenderWindow } from '../../render-scene/core/render-window';
// Anti-aliasing type, other types will be gradually added in the future
@@ -604,7 +603,7 @@ export function buildShadowPass (passName: Readonly<string>,
export function buildReflectionProbePasss (camera: Camera,
ppl: Pipeline,
isOffScreen: boolean) {
const probes = ReflectionProbeManager.probeManager.getProbes();
const probes = cclegacy.internal.reflectionProbeManager.getProbes();
if (probes.length === 0) {
return;
}