Skip to content

Commit

Permalink
[Fixed] eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
GengineJS committed Jul 17, 2023
1 parent c7438ae commit d89d814
Show file tree
Hide file tree
Showing 3 changed files with 337 additions and 181 deletions.
8 changes: 4 additions & 4 deletions cocos/3d/reflection-probe/reflection-probe-component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
import { ccclass, executeInEditMode, menu, playOnFocus, serializable, tooltip, type, visible } from 'cc.decorator';
import { EDITOR, EDITOR_NOT_IN_PREVIEW } from 'internal:constants';
import { CCBoolean, CCObject, Color, Enum, Vec3 } from '../../core';
import { CCBoolean, CCObject, Color, Enum, Vec3, warn } from '../../core';

import { TextureCube } from '../../asset/assets';
import { scene } from '../../render-scene';
Expand Down Expand Up @@ -127,7 +127,7 @@ export class ReflectionProbe extends Component {
* @zh 设置探针类型,环境反射或者平面反射
*/
@type(Enum(ProbeType))
set probeType (value: number) {
set probeType (value: ProbeType) {
this.probe.probeType = value;
if (value !== this._probeType) {
const lastSize = this._size.clone();
Expand All @@ -151,7 +151,7 @@ export class ReflectionProbe extends Component {
this._objFlags ^= CCObject.Flags.IsRotationLocked;
}
if (!this._sourceCamera) {
console.warn('the reflection camera is invalid, please set the reflection camera');
warn('the reflection camera is invalid, please set the reflection camera');
} else {
this.probe.switchProbeType(value, this._sourceCamera.camera);
}
Expand All @@ -163,7 +163,7 @@ export class ReflectionProbe extends Component {
this.size = this._size;
}
}
get probeType (): number {
get probeType (): ProbeType {
return this._probeType;
}

Expand Down
Loading

0 comments on commit d89d814

Please sign in to comment.