mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 08:02:39 +08:00
move reflection-probe to 3d module (#13711)
* add validate * fix switch probe error * export reflectionProbe * remove export reflectionProbeManager * export
This commit is contained in:
@@ -33,6 +33,7 @@ export * from './framework';
|
||||
export * from './lights';
|
||||
export * from './skinned-mesh-renderer';
|
||||
export * from './lod';
|
||||
export * from './reflection-probe';
|
||||
|
||||
export {
|
||||
utils,
|
||||
|
||||
@@ -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';
|
||||
+10
-10
@@ -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 {
|
||||
/**
|
||||
@@ -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';
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user