Skip to content

Commit

Permalink
feat: udpate code
Browse files Browse the repository at this point in the history
  • Loading branch information
cptbtptpbcptdtptp committed Jan 14, 2025
1 parent 48f94f7 commit 35cfef7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 30 deletions.
11 changes: 11 additions & 0 deletions packages/ui/src/component/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export { UICanvas } from "./UICanvas";
export { UIGroup } from "./UIGroup";
export { UIRenderer } from "./UIRenderer";
export { UITransform } from "./UITransform";
export { Button } from "./advanced/Button";
export { Image } from "./advanced/Image";
export { Text } from "./advanced/Text";
export { ColorTransition } from "./interactive/transition/ColorTransition";
export { ScaleTransition } from "./interactive/transition/ScaleTransition";
export { SpriteTransition } from "./interactive/transition/SpriteTransition";
export { Transition } from "./interactive/transition/Transition";
35 changes: 5 additions & 30 deletions packages/ui/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,10 @@ import {
Shader,
ShaderPass
} from "@galacean/engine";
import { UICanvas } from ".";
import { UIGroup } from "./component/UIGroup";
import { UITransform } from "./component/UITransform";
import { Button } from "./component/advanced/Button";
import { Image } from "./component/advanced/Image";
import { Text } from "./component/advanced/Text";
import { ColorTransition } from "./component/interactive/transition/ColorTransition";
import { ScaleTransition } from "./component/interactive/transition/ScaleTransition";
import { SpriteTransition } from "./component/interactive/transition/SpriteTransition";
import * as GUIComponent from "./component";
import uiDefaultFs from "./shader/uiDefault.fs.glsl";
import uiDefaultVs from "./shader/uiDefault.vs.glsl";

export { UICanvas } from "./component/UICanvas";
export { UIGroup } from "./component/UIGroup";
export { UIRenderer } from "./component/UIRenderer";
export { UITransform } from "./component/UITransform";
export { Button } from "./component/advanced/Button";
export { Image } from "./component/advanced/Image";
export { Text } from "./component/advanced/Text";
export { ColorTransition } from "./component/interactive/transition/ColorTransition";
export { ScaleTransition } from "./component/interactive/transition/ScaleTransition";
export { SpriteTransition } from "./component/interactive/transition/SpriteTransition";
export { Transition } from "./component/interactive/transition/Transition";
export * from "./component";
export { CanvasRenderMode } from "./enums/CanvasRenderMode";
export { ResolutionAdaptationMode } from "./enums/ResolutionAdaptationMode";
export { UIPointerEventEmitter } from "./input/UIPointerEventEmitter";
Expand Down Expand Up @@ -126,13 +107,7 @@ ReflectionParser.registerCustomParseComponent("Text", async (instance: any, item
* Register GUI components for the editor.
*/
export function registerGUI() {
Loader.registerClass("Text", Text);
Loader.registerClass("Image", Image);
Loader.registerClass("Button", Button);
Loader.registerClass("UIGroup", UIGroup);
Loader.registerClass("UICanvas", UICanvas);
Loader.registerClass("UITransform", UITransform);
Loader.registerClass("ScaleTransition", ScaleTransition);
Loader.registerClass("ColorTransition", ColorTransition);
Loader.registerClass("SpriteTransition", SpriteTransition);
for (let key in GUIComponent) {
Loader.registerClass(key, GUIComponent[key]);
}
}

Check warning on line 113 in packages/ui/src/index.ts

View check run for this annotation

Codecov / codecov/patch

packages/ui/src/index.ts#L110-L113

Added lines #L110 - L113 were not covered by tests

0 comments on commit 35cfef7

Please sign in to comment.