Skip to content

Commit

Permalink
refactor(mask): move sprite mask layer to root
Browse files Browse the repository at this point in the history
  • Loading branch information
singlecoder committed Sep 3, 2024
1 parent 4afe44b commit 603ba2a
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 6 deletions.
1 change: 0 additions & 1 deletion packages/core/src/2d/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export { SpriteMaskInteraction } from "./enums/SpriteMaskInteraction";
export { SpriteMaskLayer } from "./enums/SpriteMaskLayer";
export { TextHorizontalAlignment, TextVerticalAlignment } from "./enums/TextAlignment";
export { OverflowMode } from "./enums/TextOverflow";
export { FontStyle } from "./enums/FontStyle";
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/2d/sprite/SpriteMask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import { RenderElement } from "../../RenderPipeline/RenderElement";
import { SubPrimitiveChunk } from "../../RenderPipeline/SubPrimitiveChunk";
import { SubRenderElement } from "../../RenderPipeline/SubRenderElement";
import { Renderer, RendererUpdateFlags } from "../../Renderer";
import { SpriteMaskLayer } from "../../SpriteMaskLayer";
import { assignmentClone, ignoreClone } from "../../clone/CloneManager";
import { ShaderProperty } from "../../shader/ShaderProperty";
import { SimpleSpriteAssembler } from "../assembler/SimpleSpriteAssembler";
import { SpriteMaskLayer } from "../enums/SpriteMaskLayer";
import { SpriteModifyFlags } from "../enums/SpriteModifyFlags";
import { Sprite } from "./Sprite";

Expand Down
3 changes: 1 addition & 2 deletions packages/core/src/Engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
IXRDevice
} from "@galacean/engine-design";
import { Color } from "@galacean/engine-math";
import { SpriteMaskInteraction } from "./2d";
import { CharRenderInfo } from "./2d/text/CharRenderInfo";
import { Font } from "./2d/text/Font";
import { BasicResources } from "./BasicResources";
Expand Down Expand Up @@ -569,7 +568,7 @@ export class Engine extends EventDispatcher {
return Promise.all(initializePromises).then(() => this);
}

private _createSpriteMaterial(maskInteraction: SpriteMaskInteraction = SpriteMaskInteraction.None): Material {
private _createSpriteMaterial(): Material {
const material = new Material(this, Shader.find("Sprite"));
const renderState = material.renderState;
const target = renderState.blendState.targetBlendState;
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/Renderer.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
// @ts-ignore
import { BoundingBox, Matrix, Vector3, Vector4 } from "@galacean/engine-math";
import { SpriteMaskLayer } from "./2d";
import { SpriteMaskInteraction } from "./2d/enums/SpriteMaskInteraction";
import { Camera } from "./Camera";
import { Component } from "./Component";
import { DependentMode, dependentComponents } from "./ComponentsDependencies";
import { Entity } from "./Entity";
import { RenderContext } from "./RenderPipeline/RenderContext";
import { SubRenderElement } from "./RenderPipeline/SubRenderElement";
import { SpriteMaskLayer } from "./SpriteMaskLayer";
import { Transform, TransformModifyFlags } from "./Transform";
import { assignmentClone, deepClone, ignoreClone } from "./clone/CloneManager";
import { IComponentCustomClone } from "./clone/ComponentCloner";
Expand All @@ -15,7 +16,6 @@ import { ShaderMacro, ShaderProperty } from "./shader";
import { ShaderData } from "./shader/ShaderData";
import { ShaderMacroCollection } from "./shader/ShaderMacroCollection";
import { ShaderDataGroup } from "./shader/enums/ShaderDataGroup";
import { Camera } from "./Camera";

/**
* Basis for all renderers.
Expand Down
File renamed without changes.

0 comments on commit 603ba2a

Please sign in to comment.