@aibee/crc-bmap 0.0.141 → 0.0.142

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,6 +16,7 @@ export declare class Floor extends Object3D {
16
16
  glbModelLayer: Layer;
17
17
  laneLayer: Layer;
18
18
  mergeGraphicLayer: Layer;
19
+ textTextureLayer: Layer;
19
20
  grounds: Set<Graphic>;
20
21
  groundLayer: Layer;
21
22
  shadow: Shadow;
@@ -15,3 +15,4 @@ export * from './glb-model';
15
15
  export * from './lane';
16
16
  export * from './merge-graphic';
17
17
  export * from './poi2';
18
+ export * from './text-texture';
@@ -0,0 +1,26 @@
1
+ import { Context } from "../context";
2
+ import { Mesh, Object3D } from "three";
3
+ import { PolygonGeometry } from "../types";
4
+ export interface TextTextureOptions {
5
+ texts: string[];
6
+ deltaHeight: number;
7
+ airHeight: number;
8
+ height: number;
9
+ geometry: PolygonGeometry;
10
+ fillColor: string;
11
+ fillOpacity: number;
12
+ strokeColor: string;
13
+ strokeOpacity: number;
14
+ secondHeight: number;
15
+ secondRotate: number;
16
+ }
17
+ export declare const defaultTextTextureOptions: TextTextureOptions;
18
+ export type TextTextureOptionsParam = Partial<TextTextureOptions>;
19
+ export declare class TextTexture extends Object3D {
20
+ private context;
21
+ options: TextTextureOptions[];
22
+ mesh?: Mesh;
23
+ constructor(context: Context, options: TextTextureOptionsParam[]);
24
+ init(): Promise<void>;
25
+ dispose(): void;
26
+ }
@@ -1 +1,2 @@
1
1
  export * from './material';
2
+ export * from './text-texture';
@@ -0,0 +1,20 @@
1
+ import { DataTexture } from "three";
2
+ export declare class TextTextureFactory {
3
+ private static canvas;
4
+ private static ctx;
5
+ private static options;
6
+ static getCanvas(): HTMLCanvasElement;
7
+ static getCtx(): CanvasRenderingContext2D;
8
+ static getMergedOptions(options?: Partial<typeof this.options>): {
9
+ width: number;
10
+ height: number;
11
+ font: string;
12
+ textBaseline: CanvasTextBaseline;
13
+ lineWidth: number;
14
+ fillStyle: string;
15
+ strokeStyle: string;
16
+ };
17
+ static setCtxStyle(options: typeof this.options): void;
18
+ static getTextureByText(text: string, options?: Partial<typeof this.options>): DataTexture;
19
+ static dispose(): void;
20
+ }
@@ -122,7 +122,16 @@ export interface AibeeParkingSpaceLayer {
122
122
  geometry: PolygonGeometry;
123
123
  })[];
124
124
  }
125
- export type AibeeLayerData = AibeeGraphicLayer | AibeeRangeLayer | AibeeGroundLayer | AibeeWallLayer | AibeeLaneLayer | AibeeTexture2dLayer | AibeeTexture3dLayer | AibeeGlbLayer | AibeeStoreLayer | AibeeFacilityLayer | AibeeParkingSpaceLayer;
125
+ export interface AibeeTextLayer {
126
+ name: string;
127
+ l_type: "text";
128
+ elements: (AibeeGraphicLayer["elements"][0] & {
129
+ texts: string[];
130
+ secondHeight: number;
131
+ secondRotate: number;
132
+ })[];
133
+ }
134
+ export type AibeeLayerData = AibeeGraphicLayer | AibeeRangeLayer | AibeeGroundLayer | AibeeWallLayer | AibeeLaneLayer | AibeeTexture2dLayer | AibeeTexture3dLayer | AibeeGlbLayer | AibeeStoreLayer | AibeeFacilityLayer | AibeeParkingSpaceLayer | AibeeTextLayer;
126
135
  export interface AibeeFloorData {
127
136
  layers: AibeeLayerData[];
128
137
  floorHeight: number;
@@ -7,3 +7,4 @@ export declare function strToNumber(str: string): number;
7
7
  */
8
8
  export declare function addAlphaToHexColor(hexColor: string, alpha: number): string;
9
9
  export declare function darkenColor(hexColor: string, factor?: number): string;
10
+ export declare function hexToRgb(hex: string, opacity?: number): string;
@@ -0,0 +1,2 @@
1
+ import { BufferGeometry, Line, LineBasicMaterial, Vector3 } from "three";
2
+ export declare function createThreeLine(points: Vector3[], color?: number): Line<BufferGeometry<import("three").NormalBufferAttributes>, LineBasicMaterial>;
@@ -22,3 +22,4 @@ export * from './road';
22
22
  export * from './road2';
23
23
  export * from './webworker';
24
24
  export * from './string';
25
+ export * from './create';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aibee/crc-bmap",
3
- "version": "0.0.141",
3
+ "version": "0.0.142",
4
4
  "description": "",
5
5
  "main": "lib/bmap.min.js",
6
6
  "module": "lib/bmap.esm.js",