@anov/3d-ability 0.0.124 → 0.0.126
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/dist/business/Area/Fence/FenceBase.d.ts +35 -0
- package/dist/business/Area/Fence/fence_base_01.d.ts +11 -0
- package/dist/business/Area/Fence/fence_feeting_01.d.ts +11 -0
- package/dist/business/Area/Fence/fence_roll_01.d.ts +11 -0
- package/dist/business/Area/FillArea/FillAreaBase.d.ts +32 -0
- package/dist/business/Area/FillArea/fillArea_face_01.d.ts +11 -0
- package/dist/business/Area/FillArea/fillArea_line_01.d.ts +10 -0
- package/dist/business/Box/index.d.ts +13 -0
- package/dist/business/Box/index.js +97 -0
- package/dist/business/Box/index.js.map +1 -0
- package/dist/business/Box/interface.d.ts +10 -0
- package/dist/business/Box/interface.js +2 -0
- package/dist/business/Box/interface.js.map +1 -0
- package/dist/business/Box/types.d.ts +10 -0
- package/dist/business/Box/types.js +2 -0
- package/dist/business/Box/types.js.map +1 -0
- package/dist/business/Cylinder/index.d.ts +13 -0
- package/dist/business/Cylinder/index.js +95 -0
- package/dist/business/Cylinder/index.js.map +1 -0
- package/dist/business/Cylinder/interface.d.ts +10 -0
- package/dist/business/Cylinder/interface.js +2 -0
- package/dist/business/Cylinder/interface.js.map +1 -0
- package/dist/business/Cylinder/types.d.ts +9 -0
- package/dist/business/Cylinder/types.js +2 -0
- package/dist/business/Cylinder/types.js.map +1 -0
- package/dist/business/InfoPanel/index.d.ts +42 -0
- package/dist/business/InfoPanel/index.js +288 -0
- package/dist/business/InfoPanel/index.js.map +1 -0
- package/dist/business/InfoPanel/type.d.ts +52 -0
- package/dist/business/InfoPanel/type.js +2 -0
- package/dist/business/InfoPanel/type.js.map +1 -0
- package/dist/business/Line/index.d.ts +13 -0
- package/dist/business/Line/index.js +110 -0
- package/dist/business/Line/index.js.map +1 -0
- package/dist/business/Line/interface.d.ts +9 -0
- package/dist/business/Line/interface.js +2 -0
- package/dist/business/Line/interface.js.map +1 -0
- package/dist/business/Line/types.d.ts +6 -0
- package/dist/business/Line/types.js +2 -0
- package/dist/business/Line/types.js.map +1 -0
- package/dist/business/Plane/index.d.ts +13 -0
- package/dist/business/Plane/index.js +96 -0
- package/dist/business/Plane/index.js.map +1 -0
- package/dist/business/Plane/interface.d.ts +19 -0
- package/dist/business/Plane/interface.js +2 -0
- package/dist/business/Plane/interface.js.map +1 -0
- package/dist/business/Plane/types.d.ts +8 -0
- package/dist/business/Plane/types.js +2 -0
- package/dist/business/Plane/types.js.map +1 -0
- package/dist/business/Sphere/index.d.ts +13 -0
- package/dist/business/Sphere/index.js +89 -0
- package/dist/business/Sphere/index.js.map +1 -0
- package/dist/business/Sphere/interface.d.ts +10 -0
- package/dist/business/Sphere/interface.js +2 -0
- package/dist/business/Sphere/interface.js.map +1 -0
- package/dist/business/Sphere/types.d.ts +6 -0
- package/dist/business/Sphere/types.js +2 -0
- package/dist/business/Sphere/types.js.map +1 -0
- package/dist/business/VideoPanel/index.d.ts +59 -0
- package/dist/business/VideoPanel/index.js +364 -0
- package/dist/business/VideoPanel/index.js.map +1 -0
- package/dist/business/VideoPanel/type.d.ts +62 -0
- package/dist/business/VideoPanel/type.js +2 -0
- package/dist/business/VideoPanel/type.js.map +1 -0
- package/dist/business/index.d.ts +7 -0
- package/dist/business/index.js +7 -0
- package/dist/business/index.js.map +1 -1
- package/dist/core/Material/SurfaceMaterial/index.d.ts +4 -2
- package/dist/core/Material/SurfaceMaterial/index.js +8 -2
- package/dist/core/Material/SurfaceMaterial/index.js.map +1 -1
- package/dist/core/WeatherSystem/objects/rain/index.d.ts +1 -1
- package/dist/core/WeatherSystem/objects/rain/index.js +5 -6
- package/dist/core/WeatherSystem/objects/rain/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Mesh, Object3D, Vector3 } from '@anov/3d-core';
|
|
2
|
+
import ObjectLayer from '../../Base/ObjectLayer';
|
|
3
|
+
import type { FenceOption } from '../type';
|
|
4
|
+
declare class FenceBase extends ObjectLayer {
|
|
5
|
+
_mesh: Mesh;
|
|
6
|
+
_height: number;
|
|
7
|
+
_alpha: number;
|
|
8
|
+
_color: string;
|
|
9
|
+
_corner: number;
|
|
10
|
+
_close: boolean;
|
|
11
|
+
_points: Vector3[];
|
|
12
|
+
_uri: string;
|
|
13
|
+
_option: FenceOption;
|
|
14
|
+
_listeners: Set<unknown>;
|
|
15
|
+
private _areaInstance;
|
|
16
|
+
constructor(option: FenceOption, _areaInstance: Object3D);
|
|
17
|
+
get mesh(): Mesh<import("@anov/3d-core").BufferGeometry<import("@anov/3d-core").NormalBufferAttributes>, import("@anov/3d-core").Material | import("@anov/3d-core").Material[], import("@anov/3d-core").Object3DEventMap>;
|
|
18
|
+
get uri(): string;
|
|
19
|
+
set uri(value: string);
|
|
20
|
+
get height(): number;
|
|
21
|
+
set height(newValue: number);
|
|
22
|
+
get color(): string;
|
|
23
|
+
set color(newValue: string);
|
|
24
|
+
get alpha(): number;
|
|
25
|
+
set alpha(newValue: number);
|
|
26
|
+
get corner(): number;
|
|
27
|
+
set corner(newValue: number);
|
|
28
|
+
get close(): boolean;
|
|
29
|
+
set close(newValue: boolean);
|
|
30
|
+
_initParams(option: FenceOption): void;
|
|
31
|
+
delete(): void;
|
|
32
|
+
dispose(): void;
|
|
33
|
+
addReloadListener(callback: Function): void;
|
|
34
|
+
}
|
|
35
|
+
export default FenceBase;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Mesh, Object3D, Vector3 } from '@anov/3d-core';
|
|
2
|
+
import { ShaderMaterial } from '@anov/3d-core';
|
|
3
|
+
import type { FenceOption } from '../type';
|
|
4
|
+
import FenceBase from './FenceBase';
|
|
5
|
+
declare class Fence_Base_01 extends FenceBase {
|
|
6
|
+
constructor(option: FenceOption, areaInstance: Object3D);
|
|
7
|
+
create(): void;
|
|
8
|
+
createFenceMesh(points: Vector3[], radius: number, close: boolean, height: number, color: string, alpha: number): Mesh<import("@anov/3d-core").BufferGeometry<import("@anov/3d-core").NormalBufferAttributes>, ShaderMaterial, import("@anov/3d-core").Object3DEventMap>;
|
|
9
|
+
createFenceMaterial(height: number, color: string, alpha: number): ShaderMaterial;
|
|
10
|
+
}
|
|
11
|
+
export default Fence_Base_01;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Mesh, Object3D, Vector3 } from '@anov/3d-core';
|
|
2
|
+
import { ShaderMaterial } from '@anov/3d-core';
|
|
3
|
+
import type { FenceOption } from '../type';
|
|
4
|
+
import FenceBase from './FenceBase';
|
|
5
|
+
declare class Fence_Feeting_01 extends FenceBase {
|
|
6
|
+
constructor(option: FenceOption, areaInstance: Object3D);
|
|
7
|
+
create(): void;
|
|
8
|
+
createFenceMesh(points: Vector3[], radius: number, close: boolean, height: number, color: string, alpha: number): Mesh<import("@anov/3d-core").BufferGeometry<import("@anov/3d-core").NormalBufferAttributes>, ShaderMaterial, import("@anov/3d-core").Object3DEventMap>;
|
|
9
|
+
createFenceMaterial(height: number, color: string, alpha: number): ShaderMaterial;
|
|
10
|
+
}
|
|
11
|
+
export default Fence_Feeting_01;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Mesh, Object3D, Vector3 } from '@anov/3d-core';
|
|
2
|
+
import { ShaderMaterial } from '@anov/3d-core';
|
|
3
|
+
import type { FenceOption } from '../type';
|
|
4
|
+
import FenceBase from './FenceBase';
|
|
5
|
+
declare class Fence_Roll_01 extends FenceBase {
|
|
6
|
+
constructor(option: FenceOption, areaInstance: Object3D);
|
|
7
|
+
create(): void;
|
|
8
|
+
createFenceMesh(points: Vector3[], radius: number, close: boolean, height: number, color: string, alpha: number): Mesh<import("@anov/3d-core").BufferGeometry<import("@anov/3d-core").NormalBufferAttributes>, ShaderMaterial, import("@anov/3d-core").Object3DEventMap>;
|
|
9
|
+
createFenceMaterial(height: number, color: string, alpha: number): ShaderMaterial;
|
|
10
|
+
}
|
|
11
|
+
export default Fence_Roll_01;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Line2, Mesh, Object3D, Vector3 } from '@anov/3d-core';
|
|
2
|
+
import ObjectLayer from '../../Base/ObjectLayer';
|
|
3
|
+
import type { FillAreaOption } from '../type';
|
|
4
|
+
declare class FillAreaBase extends ObjectLayer {
|
|
5
|
+
_mesh: Mesh | Line2;
|
|
6
|
+
_alpha: number;
|
|
7
|
+
_color: string;
|
|
8
|
+
_corner: number;
|
|
9
|
+
_close: boolean;
|
|
10
|
+
_points: Vector3[];
|
|
11
|
+
_uri: string;
|
|
12
|
+
_option: FillAreaOption;
|
|
13
|
+
_listeners: Set<unknown>;
|
|
14
|
+
private _areaInstance;
|
|
15
|
+
constructor(option: FillAreaOption, areaInstance: Object3D);
|
|
16
|
+
get mesh(): Mesh<import("@anov/3d-core").BufferGeometry<import("@anov/3d-core").NormalBufferAttributes>, import("@anov/3d-core").Material | import("@anov/3d-core").Material[], import("@anov/3d-core").Object3DEventMap> | Line2;
|
|
17
|
+
get uri(): string;
|
|
18
|
+
set uri(value: string);
|
|
19
|
+
get alpha(): number;
|
|
20
|
+
set alpha(newValue: number);
|
|
21
|
+
get color(): string;
|
|
22
|
+
set color(newValue: string);
|
|
23
|
+
get corner(): number;
|
|
24
|
+
set corner(newValue: number);
|
|
25
|
+
get close(): boolean;
|
|
26
|
+
set close(newValue: boolean);
|
|
27
|
+
_initParams(option: FillAreaOption): void;
|
|
28
|
+
delete(): void;
|
|
29
|
+
dispose(): void;
|
|
30
|
+
addReloadListener(callback: Function): void;
|
|
31
|
+
}
|
|
32
|
+
export default FillAreaBase;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Object3D, Vector3 } from '@anov/3d-core';
|
|
2
|
+
import { ExtrudeGeometry, Mesh, MeshBasicMaterial } from '@anov/3d-core';
|
|
3
|
+
import * as THREE from '@anov/3d-core';
|
|
4
|
+
import type { FillAreaOption } from '../type';
|
|
5
|
+
import FillAreaBase from './FillAreaBase';
|
|
6
|
+
declare class FillArea_Face_01 extends FillAreaBase {
|
|
7
|
+
constructor(option: FillAreaOption, areaInstance: Object3D);
|
|
8
|
+
create(): void;
|
|
9
|
+
createMesh(points: Vector3[], color: string, alpha: number): Mesh<ExtrudeGeometry, MeshBasicMaterial, THREE.Object3DEventMap>;
|
|
10
|
+
}
|
|
11
|
+
export default FillArea_Face_01;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Line2, Vector3 } from '@anov/3d-core';
|
|
2
|
+
import * as THREE from '@anov/3d-core';
|
|
3
|
+
import type { FillAreaOption } from '../type';
|
|
4
|
+
import FillAreaBase from './FillAreaBase';
|
|
5
|
+
declare class FillArea_Line_01 extends FillAreaBase {
|
|
6
|
+
constructor(option: FillAreaOption, areaInstance: THREE.Object3D);
|
|
7
|
+
create(): void;
|
|
8
|
+
createMesh(points: Vector3[], color: string, alpha: number): Line2;
|
|
9
|
+
}
|
|
10
|
+
export default FillArea_Line_01;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import ObjectLayer from '../Base/ObjectLayer';
|
|
2
|
+
import type { options } from './types';
|
|
3
|
+
import { IBox } from './interface';
|
|
4
|
+
import { Mesh } from '@anov/3d-core';
|
|
5
|
+
export declare class Box extends ObjectLayer implements IBox {
|
|
6
|
+
private mesh;
|
|
7
|
+
private currentOptions;
|
|
8
|
+
constructor(options: options);
|
|
9
|
+
createBox(options: options): Mesh;
|
|
10
|
+
updateBox(options: options): void;
|
|
11
|
+
/** 销毁释放资源 */
|
|
12
|
+
destroy(): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
6
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
7
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
8
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
9
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
11
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
12
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
13
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
14
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
15
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
16
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
17
|
+
/*
|
|
18
|
+
* @Descripttion: Box 封装
|
|
19
|
+
* @version:
|
|
20
|
+
* @Author: 周志国
|
|
21
|
+
* @Date: 2025-09-08
|
|
22
|
+
* @LastEditors: 周志国
|
|
23
|
+
* @LastEditTime: 2025-09-11 10:44:43
|
|
24
|
+
* @changeLog: 实现立方体对象,支持默认参数、更新与销毁
|
|
25
|
+
* @FilePath: /anov-3d-webgl/packages/anov-3d-ability/src/business/Box/index.ts
|
|
26
|
+
*/
|
|
27
|
+
import ObjectLayer from "../Base/ObjectLayer";
|
|
28
|
+
import { BoxGeometry, MeshBasicMaterial, Mesh } from '@anov/3d-core';
|
|
29
|
+
import _ from 'lodash';
|
|
30
|
+
export var Box = /*#__PURE__*/function (_ObjectLayer) {
|
|
31
|
+
_inherits(Box, _ObjectLayer);
|
|
32
|
+
var _super = _createSuper(Box);
|
|
33
|
+
function Box(options) {
|
|
34
|
+
var _this;
|
|
35
|
+
_classCallCheck(this, Box);
|
|
36
|
+
_this = _super.call(this);
|
|
37
|
+
_defineProperty(_assertThisInitialized(_this), "mesh", void 0);
|
|
38
|
+
_defineProperty(_assertThisInitialized(_this), "currentOptions", void 0);
|
|
39
|
+
_this.currentOptions = options;
|
|
40
|
+
_this.mesh = _this.createBox(options);
|
|
41
|
+
_this.add(_this.mesh);
|
|
42
|
+
return _this;
|
|
43
|
+
}
|
|
44
|
+
_createClass(Box, [{
|
|
45
|
+
key: "createBox",
|
|
46
|
+
value: function createBox(options) {
|
|
47
|
+
var _options$width = options.width,
|
|
48
|
+
width = _options$width === void 0 ? 1 : _options$width,
|
|
49
|
+
_options$height = options.height,
|
|
50
|
+
height = _options$height === void 0 ? 1 : _options$height,
|
|
51
|
+
_options$length = options.length,
|
|
52
|
+
length = _options$length === void 0 ? 1 : _options$length,
|
|
53
|
+
_options$widthSegment = options.widthSegment,
|
|
54
|
+
widthSegment = _options$widthSegment === void 0 ? 1 : _options$widthSegment,
|
|
55
|
+
_options$heightSegmen = options.heightSegment,
|
|
56
|
+
heightSegment = _options$heightSegmen === void 0 ? 1 : _options$heightSegmen,
|
|
57
|
+
_options$lengthSegmen = options.lengthSegment,
|
|
58
|
+
lengthSegment = _options$lengthSegmen === void 0 ? 1 : _options$lengthSegmen,
|
|
59
|
+
_options$material = options.material,
|
|
60
|
+
material = _options$material === void 0 ? {} : _options$material;
|
|
61
|
+
var defaultMat = {
|
|
62
|
+
color: 0xffffff,
|
|
63
|
+
opacity: 1,
|
|
64
|
+
transparent: false,
|
|
65
|
+
wireframe: false,
|
|
66
|
+
visible: true
|
|
67
|
+
};
|
|
68
|
+
var geometry = new BoxGeometry(width, height, length, widthSegment, heightSegment, lengthSegment);
|
|
69
|
+
var mat = new MeshBasicMaterial(_objectSpread(_objectSpread({}, defaultMat), material));
|
|
70
|
+
return new Mesh(geometry, mat);
|
|
71
|
+
}
|
|
72
|
+
}, {
|
|
73
|
+
key: "updateBox",
|
|
74
|
+
value: function updateBox(options) {
|
|
75
|
+
if (!this.mesh) return;
|
|
76
|
+
_.mergeWith(this.currentOptions, options);
|
|
77
|
+
this.remove(this.mesh);
|
|
78
|
+
this.mesh.geometry.dispose();
|
|
79
|
+
this.mesh.material.dispose();
|
|
80
|
+
this.mesh = this.createBox(this.currentOptions);
|
|
81
|
+
this.add(this.mesh);
|
|
82
|
+
}
|
|
83
|
+
/** 销毁释放资源 */
|
|
84
|
+
}, {
|
|
85
|
+
key: "destroy",
|
|
86
|
+
value: function destroy() {
|
|
87
|
+
if (!this.mesh) return;
|
|
88
|
+
this.remove(this.mesh);
|
|
89
|
+
this.mesh.geometry.dispose();
|
|
90
|
+
this.mesh.material.dispose();
|
|
91
|
+
// @ts-ignore
|
|
92
|
+
this.mesh = null;
|
|
93
|
+
}
|
|
94
|
+
}]);
|
|
95
|
+
return Box;
|
|
96
|
+
}(ObjectLayer);
|
|
97
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ObjectLayer","BoxGeometry","MeshBasicMaterial","Mesh","_","Box","_ObjectLayer","_inherits","_super","_createSuper","options","_this","_classCallCheck","call","_defineProperty","_assertThisInitialized","currentOptions","mesh","createBox","add","_createClass","key","value","_options$width","width","_options$height","height","_options$length","length","_options$widthSegment","widthSegment","_options$heightSegmen","heightSegment","_options$lengthSegmen","lengthSegment","_options$material","material","defaultMat","color","opacity","transparent","wireframe","visible","geometry","mat","_objectSpread","updateBox","mergeWith","remove","dispose","destroy"],"sources":["../../../src/business/Box/index.ts"],"sourcesContent":["/*\n * @Descripttion: Box 封装\n * @version: \n * @Author: 周志国\n * @Date: 2025-09-08\n * @LastEditors: 周志国\n * @LastEditTime: 2025-09-11 10:44:43\n * @changeLog: 实现立方体对象,支持默认参数、更新与销毁\n * @FilePath: /anov-3d-webgl/packages/anov-3d-ability/src/business/Box/index.ts\n */\nimport ObjectLayer from '../Base/ObjectLayer'\nimport type { options } from './types'\nimport { IBox } from './interface'\nimport {\n BoxGeometry,\n MeshBasicMaterial,\n MeshBasicMaterialParameters,\n Mesh,\n} from '@anov/3d-core'\nimport _ from 'lodash'\nexport class Box extends ObjectLayer implements IBox {\n private mesh!: Mesh\n private currentOptions!: options\n constructor(options: options) {\n super()\n this.currentOptions = options\n this.mesh = this.createBox(options)\n this.add(this.mesh)\n }\n createBox(options: options): Mesh {\n const {\n width = 1,\n height = 1,\n length = 1,\n widthSegment = 1,\n heightSegment = 1,\n lengthSegment = 1,\n material = {},\n } = options\n\n const defaultMat: MeshBasicMaterialParameters = {\n color: 0xffffff,\n opacity: 1,\n transparent: false,\n wireframe: false,\n visible: true,\n }\n\n const geometry = new BoxGeometry(width, height, length, widthSegment, heightSegment, lengthSegment)\n const mat = new MeshBasicMaterial({ ...defaultMat, ...material })\n return new Mesh(geometry, mat)\n }\n updateBox(options: options): void {\n if (!this.mesh) return\n _.mergeWith(this.currentOptions, options)\n this.remove(this.mesh)\n this.mesh.geometry.dispose()\n ;(this.mesh.material as any).dispose()\n this.mesh = this.createBox(this.currentOptions)\n this.add(this.mesh)\n } \n /** 销毁释放资源 */\n public destroy() {\n if (!this.mesh) return\n this.remove(this.mesh)\n this.mesh.geometry.dispose()\n ;(this.mesh.material as any).dispose()\n // @ts-ignore\n this.mesh = null\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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,IAAI,EAAE;MAChB,IAAI,CAAC+B,MAAM,CAAC,IAAI,CAAC/B,IAAI,CAAC;MACtB,IAAI,CAACA,IAAI,CAAC0B,QAAQ,CAACM,OAAO,CAAC,CAAC;MAC1B,IAAI,CAAChC,IAAI,CAACmB,QAAQ,CAASa,OAAO,CAAC,CAAC;MACtC;MACA,IAAI,CAAChC,IAAI,GAAG,IAAI;IAClB;EAAC;EAAA,OAAAZ,GAAA;AAAA,EAjDsBL,WAAW"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Mesh } from '@anov/3d-core';
|
|
2
|
+
import type { options } from './types';
|
|
3
|
+
export interface IBox {
|
|
4
|
+
/** 创建立方体 */
|
|
5
|
+
createBox: (options: options) => Mesh;
|
|
6
|
+
/** 更新立方体 */
|
|
7
|
+
updateBox: (options: options) => void;
|
|
8
|
+
/** 销毁立方体 */
|
|
9
|
+
destroy: () => void;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/business/Box/interface.ts"],"sourcesContent":["/*\n * @Descripttion: \n * @version: \n * @Author: 周志国\n * @Date: 2025-09-10 14:24:00\n * @LastEditors: 周志国\n * @LastEditTime: 2025-09-10 14:38:28\n * @changeLog: \n * @FilePath: /anov-3d-webgl/packages/anov-3d-ability/src/business/Box/interface.ts\n */\n\n// ./interface.ts\nimport type { Mesh } from '@anov/3d-core'\nimport type { options } from './types'\n\nexport interface IBox {\n /** 创建立方体 */\n createBox: (options: options) => Mesh\n /** 更新立方体 */\n updateBox: (options: options) => void\n /** 销毁立方体 */\n destroy: () => void\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { MeshBasicMaterialParameters } from '@anov/3d-core';
|
|
2
|
+
export type options = {
|
|
3
|
+
width?: number;
|
|
4
|
+
height?: number;
|
|
5
|
+
length?: number;
|
|
6
|
+
widthSegment?: number;
|
|
7
|
+
heightSegment?: number;
|
|
8
|
+
lengthSegment?: number;
|
|
9
|
+
material?: MeshBasicMaterialParameters;
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/business/Box/types.ts"],"sourcesContent":["\nimport type { MeshBasicMaterialParameters } from '@anov/3d-core'\n\nexport type options = {\n width?: number\n height?: number\n length?: number\n widthSegment?: number\n heightSegment?: number\n lengthSegment?: number\n material?: MeshBasicMaterialParameters\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import ObjectLayer from '../Base/ObjectLayer';
|
|
2
|
+
import type { options } from './types';
|
|
3
|
+
import { ICylinder } from './interface';
|
|
4
|
+
import { Mesh } from '@anov/3d-core';
|
|
5
|
+
export declare class Cylinder extends ObjectLayer implements ICylinder {
|
|
6
|
+
private mesh;
|
|
7
|
+
private currentOptions;
|
|
8
|
+
constructor(options: options);
|
|
9
|
+
createCylinder(options: options): Mesh;
|
|
10
|
+
updateCylinder(options: options): void;
|
|
11
|
+
/** 销毁释放资源 */
|
|
12
|
+
destroy(): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
6
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
7
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
8
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
9
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
11
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
12
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
13
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
14
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
15
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
16
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
17
|
+
/*
|
|
18
|
+
* @Descripttion: Cylinder 封装
|
|
19
|
+
* @version:
|
|
20
|
+
* @Author: 周志国
|
|
21
|
+
* @Date: 2025-09-08
|
|
22
|
+
* @LastEditors: 周志国
|
|
23
|
+
* @LastEditTime: 2025-09-11 11:14:21
|
|
24
|
+
* @changeLog:
|
|
25
|
+
* @FilePath: /anov-3d-webgl/packages/anov-3d-ability/src/business/Cylinder/index.ts
|
|
26
|
+
*/
|
|
27
|
+
import ObjectLayer from "../Base/ObjectLayer";
|
|
28
|
+
import { CylinderGeometry, MeshBasicMaterial, Mesh } from '@anov/3d-core';
|
|
29
|
+
import _ from 'lodash';
|
|
30
|
+
export var Cylinder = /*#__PURE__*/function (_ObjectLayer) {
|
|
31
|
+
_inherits(Cylinder, _ObjectLayer);
|
|
32
|
+
var _super = _createSuper(Cylinder);
|
|
33
|
+
function Cylinder(options) {
|
|
34
|
+
var _this;
|
|
35
|
+
_classCallCheck(this, Cylinder);
|
|
36
|
+
_this = _super.call(this);
|
|
37
|
+
_defineProperty(_assertThisInitialized(_this), "mesh", void 0);
|
|
38
|
+
_defineProperty(_assertThisInitialized(_this), "currentOptions", void 0);
|
|
39
|
+
_this.currentOptions = options;
|
|
40
|
+
_this.mesh = _this.createCylinder(_this.currentOptions);
|
|
41
|
+
_this.add(_this.mesh); // 添加到 ObjectLayer
|
|
42
|
+
return _this;
|
|
43
|
+
}
|
|
44
|
+
_createClass(Cylinder, [{
|
|
45
|
+
key: "createCylinder",
|
|
46
|
+
value: function createCylinder(options) {
|
|
47
|
+
var _options$radius = options.radius,
|
|
48
|
+
radius = _options$radius === void 0 ? 1 : _options$radius,
|
|
49
|
+
_options$height = options.height,
|
|
50
|
+
height = _options$height === void 0 ? 1 : _options$height,
|
|
51
|
+
_options$circleSegmen = options.circleSegment,
|
|
52
|
+
circleSegment = _options$circleSegmen === void 0 ? 16 : _options$circleSegmen,
|
|
53
|
+
_options$heightSegmen = options.heightSegment,
|
|
54
|
+
heightSegment = _options$heightSegmen === void 0 ? 1 : _options$heightSegmen,
|
|
55
|
+
_options$openEnded = options.openEnded,
|
|
56
|
+
openEnded = _options$openEnded === void 0 ? false : _options$openEnded,
|
|
57
|
+
_options$material = options.material,
|
|
58
|
+
material = _options$material === void 0 ? {} : _options$material;
|
|
59
|
+
var geometry = new CylinderGeometry(radius, radius, height, circleSegment, heightSegment, openEnded);
|
|
60
|
+
var defaultMat = {
|
|
61
|
+
color: 0xffffff,
|
|
62
|
+
opacity: 1,
|
|
63
|
+
transparent: false,
|
|
64
|
+
wireframe: false,
|
|
65
|
+
visible: true
|
|
66
|
+
};
|
|
67
|
+
var mat = new MeshBasicMaterial(_objectSpread(_objectSpread({}, defaultMat), material));
|
|
68
|
+
return new Mesh(geometry, mat);
|
|
69
|
+
}
|
|
70
|
+
}, {
|
|
71
|
+
key: "updateCylinder",
|
|
72
|
+
value: function updateCylinder(options) {
|
|
73
|
+
if (!this.mesh) return;
|
|
74
|
+
_.mergeWith(this.currentOptions, options);
|
|
75
|
+
this.remove(this.mesh);
|
|
76
|
+
this.mesh.geometry.dispose();
|
|
77
|
+
this.mesh.material.dispose();
|
|
78
|
+
this.mesh = this.createCylinder(this.currentOptions);
|
|
79
|
+
this.add(this.mesh);
|
|
80
|
+
}
|
|
81
|
+
/** 销毁释放资源 */
|
|
82
|
+
}, {
|
|
83
|
+
key: "destroy",
|
|
84
|
+
value: function destroy() {
|
|
85
|
+
if (!this.mesh) return;
|
|
86
|
+
this.remove(this.mesh);
|
|
87
|
+
this.mesh.geometry.dispose();
|
|
88
|
+
this.mesh.material.dispose();
|
|
89
|
+
// @ts-ignore
|
|
90
|
+
this.mesh = null;
|
|
91
|
+
}
|
|
92
|
+
}]);
|
|
93
|
+
return Cylinder;
|
|
94
|
+
}(ObjectLayer);
|
|
95
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ObjectLayer","CylinderGeometry","MeshBasicMaterial","Mesh","_","Cylinder","_ObjectLayer","_inherits","_super","_createSuper","options","_this","_classCallCheck","call","_defineProperty","_assertThisInitialized","currentOptions","mesh","createCylinder","add","_createClass","key","value","_options$radius","radius","_options$height","height","_options$circleSegmen","circleSegment","_options$heightSegmen","heightSegment","_options$openEnded","openEnded","_options$material","material","geometry","defaultMat","color","opacity","transparent","wireframe","visible","mat","_objectSpread","updateCylinder","mergeWith","remove","dispose","destroy"],"sources":["../../../src/business/Cylinder/index.ts"],"sourcesContent":["/*\n * @Descripttion: Cylinder 封装\n * @version: \n * @Author: 周志国\n * @Date: 2025-09-08\n * @LastEditors: 周志国\n * @LastEditTime: 2025-09-11 11:14:21\n * @changeLog: \n * @FilePath: /anov-3d-webgl/packages/anov-3d-ability/src/business/Cylinder/index.ts\n */\nimport ObjectLayer from '../Base/ObjectLayer'\nimport type { options } from './types'\nimport { ICylinder } from './interface'\nimport {\n CylinderGeometry,\n MeshBasicMaterial,\n Mesh,\n} from '@anov/3d-core'\nimport _ from 'lodash'\nexport class Cylinder extends ObjectLayer implements ICylinder {\n private mesh!: Mesh\n private currentOptions!: options\n constructor(options: options) {\n super()\n this.currentOptions = options\n this.mesh = this.createCylinder(this.currentOptions)\n this.add(this.mesh) // 添加到 ObjectLayer\n }\n\n createCylinder(options: options): Mesh {\n const {\n radius = 1,\n height = 1,\n circleSegment = 16,\n heightSegment = 1,\n openEnded = false,\n material = {},\n } = options\n const geometry = new CylinderGeometry(\n radius,\n radius,\n height,\n circleSegment,\n heightSegment,\n openEnded,\n )\n const defaultMat = {\n color: 0xffffff,\n opacity: 1,\n transparent: false,\n wireframe: false,\n visible: true,\n }\n const mat = new MeshBasicMaterial({ ...defaultMat, ...material })\n return new Mesh(geometry, mat)\n }\n\n updateCylinder(options: options): void {\n if (!this.mesh) return\n _.mergeWith(this.currentOptions, options)\n this.remove(this.mesh)\n this.mesh.geometry.dispose();\n (this.mesh.material as any).dispose()\n this.mesh = this.createCylinder(this.currentOptions)\n this.add(this.mesh)\n }\n /** 销毁释放资源 */\n public destroy() {\n if (!this.mesh) return\n this.remove(this.mesh)\n this.mesh.geometry.dispose();\n (this.mesh.material as any).dispose()\n // @ts-ignore\n this.mesh = null\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAOA,WAAW;AAGlB,SACEC,gBAAgB,EAChBC,iBAAiB,EACjBC,IAAI,QACC,eAAe;AACtB,OAAOC,CAAC,MAAM,QAAQ;AACtB,WAAaC,QAAQ,0BAAAC,YAAA;EAAAC,SAAA,CAAAF,QAAA,EAAAC,YAAA;EAAA,IAAAE,MAAA,GAAAC,YAAA,CAAAJ,QAAA;EAGnB,SAAAA,SAAYK,OAAgB,EAAE;IAAA,IAAAC,KAAA;IAAAC,eAAA,OAAAP,QAA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ttion: \n * @version: \n * @Author: 周志国\n * @Date: 2025-09-09 09:39:13\n * @LastEditors: 周志国\n * @LastEditTime: 2025-09-09 09:45:58\n * @changeLog: \n * @FilePath: /anov-3d-webgl/packages/anov-3d-ability/src/business/Cylinder/interface.ts\n */\nimport type { options } from './types'\nimport type { Mesh } from '@anov/3d-core'\nexport interface ICylinder {\n /**\n * 创建圆柱体\n * @param options - 参数配置\n * @returns \n */\n createCylinder: (options: options) => Mesh\n}"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/business/Cylinder/types.ts"],"sourcesContent":["/*\n * @Descripttion: \n * @version: \n * @Author: 周志国\n * @Date: 2025-09-09 09:38:55\n * @LastEditors: 周志国\n * @LastEditTime: 2025-09-11 11:11:05\n * @changeLog: \n * @FilePath: /anov-3d-webgl/packages/anov-3d-ability/src/business/Cylinder/types.ts\n */\nimport type { MeshBasicMaterialParameters } from '@anov/3d-core'\n\nexport type options = {\n radius?: number\n height?: number\n circleSegment?: number\n heightSegment?: number\n openEnded?: boolean\n material?: MeshBasicMaterialParameters\n}\n\n\n\n"],"mappings":""}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file index.ts
|
|
3
|
+
* @description 信息面板
|
|
4
|
+
* @author xingwei
|
|
5
|
+
* @createTime 2025-08-22
|
|
6
|
+
* @lastEditTime 2025-08-22
|
|
7
|
+
*/
|
|
8
|
+
import ObjectLayer from "../Base/ObjectLayer";
|
|
9
|
+
import type { Option } from './type';
|
|
10
|
+
import { IPanel } from './type';
|
|
11
|
+
declare class InfoPanel extends ObjectLayer implements IPanel {
|
|
12
|
+
private _title;
|
|
13
|
+
private _content;
|
|
14
|
+
private _width;
|
|
15
|
+
private _height;
|
|
16
|
+
private _bgColor;
|
|
17
|
+
private _position;
|
|
18
|
+
private _type;
|
|
19
|
+
private _borderRadius;
|
|
20
|
+
private _bgUrl;
|
|
21
|
+
private _className;
|
|
22
|
+
private _customStyle;
|
|
23
|
+
private _closeable;
|
|
24
|
+
private _padding;
|
|
25
|
+
private _group;
|
|
26
|
+
private _onClose;
|
|
27
|
+
visible: boolean;
|
|
28
|
+
constructor(option: Option);
|
|
29
|
+
private init;
|
|
30
|
+
private createBox;
|
|
31
|
+
/** 创建背景 */
|
|
32
|
+
private createBgDom;
|
|
33
|
+
/** 创建头部 */
|
|
34
|
+
private createHeaderDom;
|
|
35
|
+
/** 自动定位面板 */
|
|
36
|
+
private applyPosition;
|
|
37
|
+
open(): void;
|
|
38
|
+
close(): void;
|
|
39
|
+
update(option: Option): void;
|
|
40
|
+
destroy(): void;
|
|
41
|
+
}
|
|
42
|
+
export { InfoPanel };
|