mirror of
https://github.com/motajs/template.git
synced 2026-11-09 03:34:30 +08:00
refactor: 将 render-core, render-elements, render-assets, render-style 合并
This commit is contained in:
1 parent
93fb788bef
commit
744a21e042
105 files changed
+149
-192
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import { MotaOffscreenCanvas2D, RenderItem } from '@motajs/render-core';
|
||||
import { MotaOffscreenCanvas2D, RenderItem } from '@motajs/render';
|
||||
import { ILayerState } from '@user/data-state';
|
||||
import { IMapRenderer } from './types';
|
||||
import { ElementNamespace, ComponentInternalInstance } from 'vue';
|
||||
|
||||
@@ -13,11 +13,7 @@ import { IMapRenderer, IMapRendererTicker, IMovingBlock } from '../types';
|
||||
import { isNil } from 'lodash-es';
|
||||
import { IHookController, logger } from '@motajs/common';
|
||||
import { BlockCls, IMaterialFramedData } from '@user/client-base';
|
||||
import {
|
||||
ITexture,
|
||||
ITextureSplitter,
|
||||
TextureRowSplitter
|
||||
} from '@motajs/render-assets';
|
||||
import { ITexture, ITextureSplitter, TextureRowSplitter } from '@motajs/render';
|
||||
import { IMapHeroRenderer } from './types';
|
||||
import { TimingFn } from 'mutate-animate';
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
IMapVertexBlock
|
||||
} from '../types';
|
||||
import { IMapTextArea, IMapTextRenderable, IOnMapTextRenderer } from './types';
|
||||
import { ITransformUpdatable, Transform } from '@motajs/render-core';
|
||||
import { ITransformUpdatable, Transform } from '@motajs/render';
|
||||
|
||||
export class OnMapTextRenderer
|
||||
implements IOnMapTextRenderer, ITransformUpdatable<Transform>
|
||||
@@ -116,6 +116,7 @@ export class OnMapTextRenderer
|
||||
(e * renderWidth) / 2,
|
||||
(f * renderHeight) / 2
|
||||
);
|
||||
// 由于 WebGL 坐标系与 Canvas2D 坐标系不一样,所以还需要变换一下
|
||||
ctx.scale(1, -1);
|
||||
|
||||
// draw text in each block
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { ITexture } from '@motajs/render-assets';
|
||||
import { ITexture, Font } from '@motajs/render';
|
||||
import {
|
||||
FaceDirection,
|
||||
HeroAnimateDirection,
|
||||
IHeroState,
|
||||
IMapLayer
|
||||
} from '@user/data-state';
|
||||
import { Font } from '@motajs/render-style';
|
||||
|
||||
import { IMapRenderResult } from '../types';
|
||||
|
||||
export interface IMapExtensionManager {
|
||||
|
||||
@@ -2,8 +2,9 @@ import {
|
||||
ITextureAnimater,
|
||||
ITextureRenderable,
|
||||
SizedCanvasImageSource,
|
||||
TextureColumnAnimater
|
||||
} from '@motajs/render-assets';
|
||||
TextureColumnAnimater,
|
||||
Transform
|
||||
} from '@motajs/render';
|
||||
import {
|
||||
AutotileProcessor,
|
||||
BlockCls,
|
||||
@@ -45,7 +46,6 @@ import {
|
||||
DYNAMIC_RESERVE,
|
||||
MOVING_TOLERANCE
|
||||
} from '../shared';
|
||||
import { Transform } from '@motajs/render-core';
|
||||
import { MapViewport } from './viewport';
|
||||
import { INSTANCED_COUNT } from './constant';
|
||||
import { StaticBlockStatus } from './status';
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { IDirtyMark, IDirtyTracker } from '@motajs/common';
|
||||
import {
|
||||
ITextureRenderable,
|
||||
SizedCanvasImageSource
|
||||
} from '@motajs/render-assets';
|
||||
import { Transform } from '@motajs/render-core';
|
||||
SizedCanvasImageSource,
|
||||
Transform
|
||||
} from '@motajs/render';
|
||||
import {
|
||||
IAutotileProcessor,
|
||||
IMaterialFramedData,
|
||||
|
||||
@@ -21,7 +21,7 @@ import { DYNAMIC_RESERVE, MAP_BLOCK_HEIGHT, MAP_BLOCK_WIDTH } from '../shared';
|
||||
import { BlockSplitter } from './block';
|
||||
import { clamp, isNil } from 'lodash-es';
|
||||
import { BlockCls, IMaterialFramedData } from '@user/client-base';
|
||||
import { IRect } from '@motajs/render-assets';
|
||||
import { IRect } from '@motajs/render';
|
||||
import { INSTANCED_COUNT } from './constant';
|
||||
|
||||
export interface IMapDataGetter {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Transform } from '@motajs/render-core';
|
||||
import { Transform } from '@motajs/render';
|
||||
import {
|
||||
IBlockData,
|
||||
IMapRenderArea,
|
||||
|
||||
Reference in new issue
Block a user