@aibee/crc-bmap 0.8.64 → 0.8.66

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.
package/lib/bmap.esm.js CHANGED
@@ -15000,32 +15000,54 @@ var TextTexture = class extends Object3D13 {
15000
15000
  };
15001
15001
 
15002
15002
  // ../lib/src/elements/line.js
15003
- import { BufferGeometry as BufferGeometry7, Line as Line3, LineBasicMaterial as LineBasicMaterial3, Object3D as Object3D14 } from "three";
15003
+ import { Object3D as Object3D14 } from "three";
15004
+ import { Line2 as Line22 } from "three/examples/jsm/lines/Line2";
15005
+ import { LineGeometry as LineGeometry2 } from "three/examples/jsm/lines/LineGeometry";
15006
+ import { LineMaterial as LineMaterial2 } from "three/examples/jsm/lines/LineMaterial";
15004
15007
  var LineElement = class extends Object3D14 {
15008
+ registryEvent() {
15009
+ this.context.addEventListener("resize", this.onResize);
15010
+ }
15005
15011
  setPosition(point1, point22) {
15006
- this.geometry.setFromPoints([
15007
- point1,
15008
- point22
15012
+ this.geometry.setPositions([
15013
+ point1.x,
15014
+ point1.y,
15015
+ point1.z,
15016
+ point22.x,
15017
+ point22.y,
15018
+ point22.z
15009
15019
  ]);
15010
15020
  if (!this.line) {
15011
15021
  this.createLine();
15012
15022
  }
15013
15023
  }
15014
15024
  createLine() {
15015
- this.line = new Line3(this.geometry, this.material);
15025
+ this.line = new Line22(this.geometry, this.material);
15026
+ this.line.renderOrder = 100003;
15016
15027
  this.add(this.line);
15017
15028
  }
15018
15029
  dispose() {
15030
+ var _this_line;
15019
15031
  if (this.line) {
15020
15032
  dispose(this.line);
15021
15033
  }
15022
15034
  this.geometry = null;
15023
15035
  this.material = null;
15036
+ (_this_line = this.line) == null ? void 0 : _this_line.clear();
15037
+ this.line = null;
15024
15038
  }
15025
15039
  constructor(context, point1, point22) {
15026
- super(), this.context = context, this.geometry = new BufferGeometry7(), this.material = new LineBasicMaterial3({
15027
- color: 0
15028
- });
15040
+ super(), this.context = context, this.geometry = new LineGeometry2(), this.material = new LineMaterial2({
15041
+ color: 0,
15042
+ transparent: true,
15043
+ depthTest: false,
15044
+ linewidth: 2
15045
+ }), this.line = null, this.onResize = () => {
15046
+ const { width, height } = this.context.clientSize;
15047
+ this.material.resolution.set(width, height);
15048
+ };
15049
+ this.onResize();
15050
+ this.registryEvent();
15029
15051
  if (point1 && point22) {
15030
15052
  this.setPosition(point1, point22);
15031
15053
  }
@@ -18641,8 +18663,8 @@ var import_es_array_buffer_transfer3 = __toESM(require_es_array_buffer_transfer(
18641
18663
  var import_es_array_buffer_transfer_to_fixed_length3 = __toESM(require_es_array_buffer_transfer_to_fixed_length(), 1);
18642
18664
  var import_es_array_push20 = __toESM(require_es_array_push(), 1);
18643
18665
  var import_es_typed_array_uint16_array2 = __toESM(require_es_typed_array_uint16_array(), 1);
18644
- import { BufferGeometry as BufferGeometry8, Matrix4 as Matrix43, Vector3 as Vector320, Ray as Ray3, Sphere, LineSegments as LineSegments5, BufferAttribute as BufferAttribute2, ShaderChunk, ShaderMaterial as ShaderMaterial4, UniformsLib, Color as Color7, Vector2 as Vector213 } from "three";
18645
- var MeshLine = class extends BufferGeometry8 {
18666
+ import { BufferGeometry as BufferGeometry7, Matrix4 as Matrix43, Vector3 as Vector320, Ray as Ray3, Sphere, LineSegments as LineSegments5, BufferAttribute as BufferAttribute2, ShaderChunk, ShaderMaterial as ShaderMaterial4, UniformsLib, Color as Color7, Vector2 as Vector213 } from "three";
18667
+ var MeshLine = class extends BufferGeometry7 {
18646
18668
  constructor() {
18647
18669
  super();
18648
18670
  this.isMeshLine = true;
@@ -19396,7 +19418,7 @@ var Path2 = class extends Object3D15 {
19396
19418
  repeat: new Vector214(this.getRepeat(), 1)
19397
19419
  });
19398
19420
  const mesh = this.mesh = new Mesh11(lineGeometry, material);
19399
- mesh.renderOrder = 9;
19421
+ mesh.renderOrder = 100009;
19400
19422
  this.add(mesh);
19401
19423
  return mesh;
19402
19424
  });