Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove regl render mode #2507

Merged
merged 6 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/brave-nails-wave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@antv/l7-core': patch
'@antv/l7-renderer': patch
'@antv/l7-scene': patch
---

refactor: remove regl render mode
1 change: 0 additions & 1 deletion examples/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import type { GUIOptions, TestCaseBasemap } from './types';

export const DEFAULT_GUI_OPTIONS: GUIOptions = {
map: 'Map',
renderer: 'device',
animate: false,
enableWebGPU: false,
};
Expand Down
3 changes: 0 additions & 3 deletions examples/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ export const Main = () => {
guiRef.current
.add(inintGuiOptions, 'map', MAP_TYPES)
.onChange((map: GUIOptions['map']) => onChange({ map }));
guiRef.current
.add(inintGuiOptions, 'renderer', ['regl', 'device'])
.onChange((renderer: GUIOptions['renderer']) => onChange({ renderer }));
guiRef.current
.add(inintGuiOptions, 'enableWebGPU')
.onChange((enableWebGPU: GUIOptions['enableWebGPU']) => onChange({ enableWebGPU }));
Expand Down
2 changes: 0 additions & 2 deletions examples/types.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import type { Scene } from '@antv/l7';
import type { ISceneConfig } from '@antv/l7-core';
import type { Controller, GUI } from 'lil-gui';

export type GUIOptions = {
map: TestCaseBasemap;
renderer: ISceneConfig['renderer'];
animate: boolean;
enableWebGPU: boolean;
[keys: string]: any;
Expand Down
4 changes: 0 additions & 4 deletions packages/core/src/services/config/IConfigService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ export interface ISceneConfig extends IRenderConfig {
// TODO: 场景是否支持 stencil mask
stencil?: boolean;
debug?: boolean;
/**
* Support regl & @antv/g-device-api now
*/
renderer?: 'regl' | 'device';
}

export interface IGlobalConfigService {
Expand Down
2 changes: 1 addition & 1 deletion packages/renderer/__tests__/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DeviceRendererService } from '../src/index';
import { DeviceRendererService } from '../src';

describe('template', () => {
it('DeviceRenderer', () => {
Expand Down
3 changes: 1 addition & 2 deletions packages/renderer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
"@antv/g-device-api": "^1.6.4",
"@antv/l7-core": "workspace:*",
"@antv/l7-utils": "workspace:*",
"@babel/runtime": "^7.7.7",
"regl": "1.6.1"
"@babel/runtime": "^7.7.7"
},
"devDependencies": {
"@antv/l7-test-utils": "workspace:^"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ import type {
} from '@antv/l7-core';
import { gl } from '@antv/l7-core';
import { lodashUtil } from '@antv/l7-utils';
import type DeviceRendererService from '.';
import type DeviceAttribute from './DeviceAttribute';
import type DeviceBuffer from './DeviceBuffer';
import type DeviceElements from './DeviceElements';
import DeviceFramebuffer from './DeviceFramebuffer';
import type { DeviceRendererService } from './DeviceRendererService';
import DeviceTexture2D from './DeviceTexture2D';
import {
blendEquationMap,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const { isUndefined } = lodashUtil;
/**
* Device API renderer
*/
export default class DeviceRendererService implements IRendererService {
export class DeviceRendererService implements IRendererService {
uniformBuffers: IBuffer[] = [];
extensionObject: IExtensions;
private device: Device;
Expand Down
5 changes: 1 addition & 4 deletions packages/renderer/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
import DeviceRendererService from './device';
import ReglRendererService from './regl';

export { DeviceRendererService, ReglRendererService };
export { DeviceRendererService } from './DeviceRendererService';
44 changes: 0 additions & 44 deletions packages/renderer/src/regl/ReglAttribute.ts

This file was deleted.

45 changes: 0 additions & 45 deletions packages/renderer/src/regl/ReglBuffer.ts

This file was deleted.

37 changes: 0 additions & 37 deletions packages/renderer/src/regl/ReglElements.ts

This file was deleted.

51 changes: 0 additions & 51 deletions packages/renderer/src/regl/ReglFramebuffer.ts

This file was deleted.

Loading
Loading