Skip to content

Commit d99e539

Browse files
committed
refactor: remove engine v1 editor support
1 parent 8e1d7da commit d99e539

21 files changed

Lines changed: 50 additions & 543 deletions

File tree

sass/editor.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@
5959
@import 'editor/editor-message-box';
6060
@import 'editor/editor-confirmation-dialog';
6161
@import 'editor/editor-settings-launch-page';
62-
@import 'editor/editor-engine-picker';
6362
@import 'editor/editor-auditor-picker';
6463
@import 'editor/editor-clipboard';
6564
@import 'editor/editor-howdoi';

sass/editor/_editor-engine-picker.scss

Lines changed: 0 additions & 76 deletions
This file was deleted.

src/common/editor.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@ class Editor<T extends EditorMethods> extends Caller<T> {
2626
*/
2727
isCodeEditor: boolean = false;
2828

29-
/**
30-
* Whether the Editor project is using engine v2.
31-
*/
32-
projectEngineV2: boolean = ('settings' in config.project) ? (config.project.settings as Record<string, any>)?.engineV2 ?? false : false;
33-
3429
/**
3530
* Editor API history global
3631
*/

src/editor-api/external-types/config.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ type Plan = {
99
};
1010

1111
type ProjectSettings = {
12-
engineV2: boolean,
1312
antiAlias: boolean,
1413
fillMode: string,
1514
resolutionMode: string,

src/editor/assets/assets-srgb.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -313,16 +313,6 @@ const startChecker = () => {
313313
const isMaterial = usage.type === 'asset' && observer.get('type') === 'material';
314314
const isUIElement = usage.path.includes('components.element');
315315
const isSprite = usage.path.includes('components.sprite');
316-
const isSpecularSheen = usage.path === 'data.specularMap' || usage.path === 'data.sheenMap';
317-
318-
// if project is using engine v1 and the usage is a specular or sheen map
319-
// suppress the issue and log info message
320-
if (!editor.projectEngineV2 && isSpecularSheen) {
321-
editor.call('console:log', uiMsg, verboseMsg, usage.jump);
322-
suppressed++;
323-
continue;
324-
}
325-
326316
// if all issues are usages then fixable so log a warning
327317
if (issues.length === usages.length) {
328318
editor.call('console:warn', uiMsg, verboseMsg, usage.jump);

src/editor/attributes/reference/components/audiosource.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export const fields: AttributeReference[] = [{
44
name: 'audiosource:component',
55
title: 'pc.AudioSourceComponent',
66
subTitle: '{pc.Component}',
7-
description: `The AudioSource Component controls playback of an audio sample. ${editor.projectEngineV2 ? 'This class has been removed' : 'This class will be deprecated'} in favor of {@link pc.SoundComponent}.`,
7+
description: 'The AudioSource Component controls playback of an audio sample. This class has been removed in favor of {@link pc.SoundComponent}.',
88
url: 'https://api.playcanvas.com/engine/classes/AudioSourceComponent.html'
99
}, {
1010
name: 'audiosource:3d',

src/editor/attributes/reference/settings.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,8 @@ editor.once('load', () => {
298298
description: 'The order in which attempts are made to create the graphics devices.'
299299
}, {
300300
name: 'settings:project:enableWebGpu',
301-
title: `Enable WebGPU${editor.projectEngineV2 ? '' : ' (beta)'}`,
302-
description: `When enabled, the application will try to use WebGPU${editor.projectEngineV2 ? '' : ' (beta)'} if available.`
301+
title: 'Enable WebGPU',
302+
description: 'When enabled, the application will try to use WebGPU if available.'
303303
}, {
304304
name: 'settings:project:enableWebGl2',
305305
title: 'Enable WebGL 2.0',

src/editor/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,6 @@ import './alerts/alert-maintenance';
317317
// pickers
318318
import './pickers/picker';
319319
import './pickers/picker-confirm';
320-
import './pickers/picker-engine';
321320
import './pickers/picker-color';
322321
import './pickers/picker-asset';
323322
import './pickers/picker-curve';

src/editor/inspector/assets/texture.ts

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,33 +1150,6 @@ class TextureAssetInspector extends Container {
11501150
this._webgl1NonPotWithoutAddressClampWarning.hidden = true;
11511151
this._webgl1NonPotWithMipmapsWarning.hidden = true;
11521152

1153-
// Don't show WebGL1 warnings when running in Engine v2 mode
1154-
if (editor.projectEngineV2) {
1155-
return;
1156-
}
1157-
1158-
const assets = this._assets;
1159-
// Show the warnings if any of the assets have an issue
1160-
1161-
for (let i = 0; i < assets.length; i++) {
1162-
const asset = assets[i];
1163-
if (!TextureCompressor.isPOT(asset.get('meta.width'), asset.get('meta.height'))) {
1164-
if (asset.get('data.mipmaps')) {
1165-
this._webgl1NonPotWithMipmapsWarning.hidden = false;
1166-
break;
1167-
}
1168-
}
1169-
}
1170-
1171-
for (let i = 0; i < assets.length; i++) {
1172-
const asset = assets[i];
1173-
if (!TextureCompressor.isPOT(asset.get('meta.width'), asset.get('meta.height'))) {
1174-
if (asset.get('data.addressu') !== 'clamp' || asset.get('data.addressv') !== 'clamp') {
1175-
this._webgl1NonPotWithoutAddressClampWarning.hidden = false;
1176-
break;
1177-
}
1178-
}
1179-
}
11801153
}
11811154

11821155
link(assets: Observer[]) {

src/editor/inspector/components/audiosource.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class AudiosourceComponentInspector extends ComponentInspector {
9090

9191
super(args);
9292

93-
this.headerText += editor.projectEngineV2 ? ' (REMOVED)' : ' (LEGACY)';
93+
this.headerText += ' (REMOVED)';
9494

9595
this._attributesInspector = new AttributesInspector({
9696
assets: args.assets,
@@ -102,9 +102,7 @@ class AudiosourceComponentInspector extends ComponentInspector {
102102

103103
this._field('3d').on('change', this._toggleFields.bind(this));
104104

105-
if (editor.projectEngineV2) {
106-
this._attributesInspector.enabled = false;
107-
}
105+
this._attributesInspector.enabled = false;
108106
}
109107

110108
_toggleFields() {

0 commit comments

Comments
 (0)