@anov/3d-ability 0.0.4-alpha1

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.
Files changed (64) hide show
  1. package/README.md +1 -0
  2. package/dist/city/flyinglead.d.ts +0 -0
  3. package/dist/city/flyinglead.js +0 -0
  4. package/dist/city/radar.d.ts +0 -0
  5. package/dist/city/radar.js +0 -0
  6. package/dist/city/scanning.d.ts +0 -0
  7. package/dist/city/scanning.js +0 -0
  8. package/dist/city/surroundLine.d.ts +0 -0
  9. package/dist/city/surroundLine.js +0 -0
  10. package/dist/core/mouseDrawe.d.ts +2 -0
  11. package/dist/core/mouseDrawe.js +1 -0
  12. package/dist/environment/cloud/cloud.d.ts +1 -0
  13. package/dist/environment/cloud/cloud.js +1 -0
  14. package/dist/environment/cloud/index.d.ts +7 -0
  15. package/dist/environment/cloud/index.js +60 -0
  16. package/dist/environment/rain.d.ts +20 -0
  17. package/dist/environment/rain.js +44 -0
  18. package/dist/environment/rainShder/index.d.ts +8 -0
  19. package/dist/environment/rainShder/index.js +70 -0
  20. package/dist/environment/rainShder/shader.d.ts +26 -0
  21. package/dist/environment/rainShder/shader.js +28 -0
  22. package/dist/environment/shaderCloud/cloudMaterial.d.ts +10 -0
  23. package/dist/environment/shaderCloud/cloudMaterial.js +39 -0
  24. package/dist/environment/shaderCloud/index.d.ts +2 -0
  25. package/dist/environment/shaderCloud/index.js +45 -0
  26. package/dist/environment/shaderCloud/shader.d.ts +5 -0
  27. package/dist/environment/shaderCloud/shader.js +6 -0
  28. package/dist/environment/showShder/index.d.ts +8 -0
  29. package/dist/environment/showShder/index.js +73 -0
  30. package/dist/environment/showShder/shader.d.ts +28 -0
  31. package/dist/environment/showShder/shader.js +32 -0
  32. package/dist/environment/sky/index.d.ts +12 -0
  33. package/dist/environment/sky/index.js +116 -0
  34. package/dist/environment/snow.d.ts +16 -0
  35. package/dist/environment/snow.js +45 -0
  36. package/dist/environment/sun/index.d.ts +13 -0
  37. package/dist/environment/sun/index.js +76 -0
  38. package/dist/environment/utils/points.d.ts +26 -0
  39. package/dist/environment/utils/points.js +55 -0
  40. package/dist/environment/volumetricCloud/cloudMaterial.d.ts +3 -0
  41. package/dist/environment/volumetricCloud/cloudMaterial.js +60 -0
  42. package/dist/environment/volumetricCloud/inex.d.ts +8 -0
  43. package/dist/environment/volumetricCloud/inex.js +42 -0
  44. package/dist/helper/view/index.d.ts +40 -0
  45. package/dist/helper/view/index.js +385 -0
  46. package/dist/helper/view/utils.d.ts +6 -0
  47. package/dist/helper/view/utils.js +91 -0
  48. package/dist/index.d.ts +18 -0
  49. package/dist/index.js +20 -0
  50. package/dist/material/pristineGridMaterial/index.d.ts +20 -0
  51. package/dist/material/pristineGridMaterial/index.js +102 -0
  52. package/dist/material/pristineGridMaterial/shader/fragment.d.ts +2 -0
  53. package/dist/material/pristineGridMaterial/shader/fragment.js +1 -0
  54. package/dist/material/pristineGridMaterial/shader/vertex.d.ts +2 -0
  55. package/dist/material/pristineGridMaterial/shader/vertex.js +1 -0
  56. package/dist/postEffects/bloomPass.d.ts +5 -0
  57. package/dist/postEffects/bloomPass.js +30 -0
  58. package/dist/postEffects/index.d.ts +11 -0
  59. package/dist/postEffects/index.js +32 -0
  60. package/dist/postEffects/outlinePass.d.ts +16 -0
  61. package/dist/postEffects/outlinePass.js +51 -0
  62. package/dist/utils/index.d.ts +1 -0
  63. package/dist/utils/index.js +3 -0
  64. package/package.json +29 -0
@@ -0,0 +1,76 @@
1
+ import { DirectionalLight, Group, Mesh, MeshBasicMaterial, SphereGeometry, Vector3 } from '@anov/3d-core';
2
+ import { getPosition } from 'suncalc';
3
+
4
+ /**
5
+ * 获取当前笛卡尔坐标
6
+ * @param date
7
+ * @param latitude
8
+ * @param longitude
9
+ */
10
+ var getThreePosition = function getThreePosition(date, latitude, longitude, distance) {
11
+ var _getPosition = getPosition(date, latitude, longitude),
12
+ altitude = _getPosition.altitude,
13
+ azimuth = _getPosition.azimuth;
14
+ var x = distance * Math.cos(altitude) * Math.cos(azimuth);
15
+ var z = distance * Math.cos(altitude) * Math.sin(azimuth);
16
+ var y = distance * Math.sin(altitude);
17
+ return new Vector3(x, y, z);
18
+ };
19
+ export var getSunPosition = function getSunPosition(date, latitude, longitude) {
20
+ var _getPosition2 = getPosition(date, latitude, longitude),
21
+ altitude = _getPosition2.altitude,
22
+ azimuth = _getPosition2.azimuth;
23
+ return {
24
+ altitude: altitude,
25
+ azimuth: azimuth
26
+ };
27
+ };
28
+
29
+ /**
30
+ * entity
31
+ * @returns
32
+ */
33
+ var createSunEntity = function createSunEntity() {
34
+ var box = new SphereGeometry(1);
35
+ var mater = new MeshBasicMaterial({
36
+ color: 'yellow'
37
+ });
38
+ var mesh = new Mesh(box, mater);
39
+ return mesh;
40
+ };
41
+
42
+ /**
43
+ * sun light
44
+ * @returns
45
+ */
46
+ var createSunLight = function createSunLight() {
47
+ var sunLight = new DirectionalLight('white', 8);
48
+ sunLight.castShadow = true;
49
+ sunLight.shadow.bias = -0.005;
50
+ sunLight.shadow.mapSize.set(1024, 1024);
51
+ return sunLight;
52
+ };
53
+
54
+ /**
55
+ * create init
56
+ * @param date
57
+ * @param latitude
58
+ * @param longitude
59
+ * @param distance
60
+ */
61
+ export var createSun = function createSun(date, latitude, longitude) {
62
+ var distance = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1000;
63
+ var autoUpdate = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
64
+ var position = getThreePosition(date, latitude, longitude, distance);
65
+ var group = new Group();
66
+ group.add(createSunEntity(), createSunLight());
67
+ group.position.set(position.x, position.y, position.z);
68
+ group.lookAt(0, 0, 0);
69
+ var updateSunPosition = function updateSunPosition(date, latitude, longitude) {
70
+ var currentPosition = getThreePosition(date, latitude, longitude, distance);
71
+ group.position.set(currentPosition.x, currentPosition.y, currentPosition.z);
72
+ };
73
+ return [group, updateSunPosition, function (currentDate) {
74
+ return getSunPosition(currentDate || date, latitude, longitude);
75
+ }];
76
+ };
@@ -0,0 +1,26 @@
1
+ import { BufferGeometry, Points, PointsMaterial, Vector3 } from '@anov/3d-core';
2
+ import type { SpeedType } from '../rain';
3
+ interface EnvPointsOptions {
4
+ range?: number;
5
+ count?: number;
6
+ opacity?: number;
7
+ url: string;
8
+ size?: number;
9
+ speed?: SpeedType;
10
+ }
11
+ export declare type AVector3 = Vector3 & {
12
+ speedX: number;
13
+ speedY: number;
14
+ speedZ: number;
15
+ };
16
+ declare class EnvironmentPoints {
17
+ private opts;
18
+ points: AVector3[];
19
+ material: PointsMaterial | null;
20
+ geometry: BufferGeometry | null;
21
+ point: Points | null;
22
+ constructor(opts: EnvPointsOptions);
23
+ private createEnvPoints;
24
+ animation(handlefn: (position: AVector3) => void): void;
25
+ }
26
+ export default EnvironmentPoints;
@@ -0,0 +1,55 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3
+ 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); } }
4
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
5
+ 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; }
6
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
8
+ import { BufferGeometry, Points, PointsMaterial, TextureLoader, Vector3 } from '@anov/3d-core';
9
+ var EnvironmentPoints = /*#__PURE__*/function () {
10
+ function EnvironmentPoints(opts) {
11
+ _classCallCheck(this, EnvironmentPoints);
12
+ _defineProperty(this, "opts", {});
13
+ _defineProperty(this, "points", []);
14
+ _defineProperty(this, "material", null);
15
+ _defineProperty(this, "geometry", null);
16
+ _defineProperty(this, "point", null);
17
+ this.opts = opts;
18
+ this.createEnvPoints();
19
+ }
20
+ _createClass(EnvironmentPoints, [{
21
+ key: "createEnvPoints",
22
+ value: function createEnvPoints() {
23
+ var _this$opts$range;
24
+ this.material = new PointsMaterial({
25
+ size: this.opts.size || 1,
26
+ map: new TextureLoader().load(this.opts.url),
27
+ transparent: true,
28
+ opacity: this.opts.opacity,
29
+ depthTest: false
30
+ });
31
+ this.geometry = new BufferGeometry();
32
+ var range = (_this$opts$range = this.opts.range) !== null && _this$opts$range !== void 0 ? _this$opts$range : 1000;
33
+ for (var i = 0; i < (this.opts.count || 500); i++) {
34
+ var _this$opts$speed, _this$opts$speed2, _this$opts$speed3;
35
+ var _position = new Vector3(Math.random() * range - range / 2, Math.random() * range, Math.random() * range - range / 2);
36
+ _position.speedX = ((_this$opts$speed = this.opts.speed) === null || _this$opts$speed === void 0 ? void 0 : _this$opts$speed.x) || 0;
37
+ _position.speedY = ((_this$opts$speed2 = this.opts.speed) === null || _this$opts$speed2 === void 0 ? void 0 : _this$opts$speed2.x) || 10;
38
+ _position.speedZ = ((_this$opts$speed3 = this.opts.speed) === null || _this$opts$speed3 === void 0 ? void 0 : _this$opts$speed3.x) || 0;
39
+ this.points.push(_position);
40
+ }
41
+ this.geometry.setFromPoints(this.points);
42
+ this.point = new Points(this.geometry, this.material);
43
+ }
44
+ }, {
45
+ key: "animation",
46
+ value: function animation(handlefn) {
47
+ this.points.forEach(function (position) {
48
+ handlefn(position);
49
+ });
50
+ this.point.geometry.setFromPoints(this.points);
51
+ }
52
+ }]);
53
+ return EnvironmentPoints;
54
+ }();
55
+ export default EnvironmentPoints;
@@ -0,0 +1,3 @@
1
+ import { RawShaderMaterial } from '@anov/3d-core';
2
+ declare const cloudMaterial: RawShaderMaterial;
3
+ export default cloudMaterial;
@@ -0,0 +1,60 @@
1
+ import { BackSide, Color, Data3DTexture, GLSL3, LinearFilter, RawShaderMaterial, RedFormat, Vector3, lib } from '@anov/3d-core';
2
+ var size = 128;
3
+ var data = new Uint8Array(size * size * size);
4
+ var i = 0;
5
+ var scale = 0.05;
6
+ var perlin = new lib.ImprovedNoise();
7
+ var vector = new Vector3();
8
+ for (var z = 0; z < size; z++) {
9
+ for (var y = 0; y < size; y++) {
10
+ for (var x = 0; x < size; x++) {
11
+ var d = 1.0 - vector.set(x, y, z).subScalar(size / 2).divideScalar(size).length();
12
+ data[i] = (128 + 128 * perlin.noise(x * scale / 1.5, y * scale, z * scale / 1.5)) * d * d;
13
+ i++;
14
+ }
15
+ }
16
+ }
17
+ var texture = new Data3DTexture(data, size, size, size);
18
+ texture.format = RedFormat;
19
+ texture.minFilter = LinearFilter;
20
+ texture.magFilter = LinearFilter;
21
+ texture.unpackAlignment = 1;
22
+ texture.needsUpdate = true;
23
+
24
+ // Material
25
+ var vertexShader = /* glsl */"\nin vec3 position;\n\nuniform mat4 modelMatrix;\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform vec3 cameraPos;\nout vec3 vOrigin;\nout vec3 vDirection;\nvoid main() {\n vec4 mvPosition = modelViewMatrix * vec4(position, 1.0);\n vOrigin = vec3(inverse(modelMatrix) * vec4(cameraPos, 1.0)).xyz;\n vDirection = position - vOrigin;\n gl_Position = projectionMatrix * mvPosition;\n}\n";
26
+ var fragmentShader = /* glsl */"\n\n\nprecision highp float;\nprecision highp sampler3D;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\n\nin vec3 vOrigin;\nin vec3 vDirection;\n\nout vec4 color;\n\nuniform vec3 base;\nuniform sampler3D map;\n\nuniform float threshold;\nuniform float range;\nuniform float opacity;\nuniform float steps;\nuniform float frame;\n\nuint wang_hash(uint seed) {\n seed = (seed ^ 61u) ^ (seed >> 16u);\n seed *= 9u;\n seed = seed ^ (seed >> 4u);\n seed *= 0x27d4eb2du;\n seed = seed ^ (seed >> 15u);\n return seed;\n}\n\nfloat randomFloat(inout uint seed) {\n return float(wang_hash(seed)) / 4294967296.;\n}\n\nvec2 hitBox(vec3 orig, vec3 dir) {\n const vec3 box_min = vec3(-0.5);\n const vec3 box_max = vec3(0.5);\n vec3 inv_dir = 1.0 / dir;\n vec3 tmin_tmp = (box_min - orig) * inv_dir;\n vec3 tmax_tmp = (box_max - orig) * inv_dir;\n vec3 tmin = min(tmin_tmp, tmax_tmp);\n vec3 tmax = max(tmin_tmp, tmax_tmp);\n float t0 = max(tmin.x, max(tmin.y, tmin.z));\n float t1 = min(tmax.x, min(tmax.y, tmax.z));\n return vec2(t0, t1);\n}\n\nfloat sample1(vec3 p) {\n return texture(map, p).r;\n}\n\nfloat shading(vec3 coord) {\n float step = 0.01;\n return sample1(coord + vec3(-step)) - sample1(coord + vec3(step));\n}\n\nvec4 linearToSRGB(in vec4 value) {\n return vec4(mix(pow(value.rgb, vec3(0.41666)) * 1.055 - vec3(0.055), value.rgb * 12.92, vec3(lessThanEqual(value.rgb, vec3(0.0031308)))), value.a);\n}\n\nvoid main() {\n vec3 rayDir = normalize(vDirection);\n vec2 bounds = hitBox(vOrigin, rayDir);\n\n if(bounds.x > bounds.y)\n discard;\n\n bounds.x = max(bounds.x, 0.0);\n\n vec3 p = vOrigin + bounds.x * rayDir;\n vec3 inc = 1.0 / abs(rayDir);\n float delta = min(inc.x, min(inc.y, inc.z));\n delta /= steps;\n\n// Jitter\n// Nice little seed from\n// https://blog.demofox.org/2020/05/25/casual-shadertoy-path-tracing-1-basic-camera-diffuse-emissive/\n uint seed = uint(gl_FragCoord.x) * uint(1973) + uint(gl_FragCoord.y) * uint(9277) + uint(frame) * uint(26699);\n vec3 size = vec3(textureSize(map, 0));\n float randNum = randomFloat(seed) * 2.0 - 1.0;\n p += rayDir * randNum * (1.0 / size);\n\n vec4 ac = vec4(base, 0.0);\n\n for(float t = bounds.x; t < bounds.y; t += delta) {\n\n float d = sample1(p + 0.5);\n\n d = smoothstep(threshold - range, threshold + range, d) * opacity;\n\n float col = shading(p + 0.5) * 3.0 + ((p.x + p.y) * 0.25) + 0.2;\n\n ac.rgb += (1.0 - ac.a) * d * col;\n\n ac.a += (1.0 - ac.a) * d;\n\n if(ac.a >= 0.95)\n break;\n\n p += rayDir * delta;\n\n }\n\n color = linearToSRGB(ac);\n\n if(color.a == 0.0)\n discard;\n\n}\n\n";
27
+ var cloudMaterial = new RawShaderMaterial({
28
+ glslVersion: GLSL3,
29
+ uniforms: {
30
+ base: {
31
+ value: new Color(0x798AA0)
32
+ },
33
+ map: {
34
+ value: texture
35
+ },
36
+ cameraPos: {
37
+ value: new Vector3()
38
+ },
39
+ threshold: {
40
+ value: 0.25
41
+ },
42
+ opacity: {
43
+ value: 0.25
44
+ },
45
+ range: {
46
+ value: 0.1
47
+ },
48
+ steps: {
49
+ value: 100
50
+ },
51
+ frame: {
52
+ value: 0
53
+ }
54
+ },
55
+ vertexShader: vertexShader,
56
+ fragmentShader: fragmentShader,
57
+ side: BackSide,
58
+ transparent: true
59
+ });
60
+ export default cloudMaterial;
@@ -0,0 +1,8 @@
1
+ import { Mesh } from '@anov/3d-core';
2
+ export declare class VolumetricCloud {
3
+ private geometries;
4
+ cloudGroup: Mesh;
5
+ constructor();
6
+ }
7
+ declare const createVolumetricCloud: () => Mesh;
8
+ export default createVolumetricCloud;
@@ -0,0 +1,42 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ 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); } }
3
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
4
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5
+ 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; }
6
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
8
+ import { BoxGeometry, Mesh, use } from '@anov/3d-core';
9
+ import cloudMaterial from "./cloudMaterial";
10
+ export var VolumetricCloud = /*#__PURE__*/_createClass(function VolumetricCloud() {
11
+ _classCallCheck(this, VolumetricCloud);
12
+ _defineProperty(this, "geometries", []);
13
+ _defineProperty(this, "cloudGroup", void 0);
14
+ // cloud density
15
+ // for (let i = 0; i < 100; i++) {
16
+ // const cloud = new BoxGeometry(100, 100, 100)
17
+
18
+ // cloud.translate(Math.random() * 1000 - 500, -Math.random() * Math.random() * 200 - 15, i)
19
+ // // cloud.rotateZ(Math.random() * Math.PI / 2)
20
+ // cloud.scale(Math.random() * Math.random() * 1.1 + 0.5, Math.random() * Math.random() * 1.1 + 0.5, 1)
21
+ // this.geometries.push(cloud)
22
+ // }
23
+
24
+ var box = new BoxGeometry(100, 100, 100);
25
+ // const mergedGeometry = BufferGeometryUtils.mergeGeometries(this.geometries, false)
26
+ this.cloudGroup = new Mesh(box, cloudMaterial);
27
+ var _use$useScene = use.useScene(),
28
+ camera = _use$useScene.camera;
29
+ use.useframe(function () {
30
+ // @ts-ignore
31
+ // this.cloudGroup.material.uniforms.cameraPos.value.copy(camera!.position)
32
+ });
33
+ });
34
+ var createVolumetricCloud = function createVolumetricCloud() {
35
+ var _use$useScene2 = use.useScene(),
36
+ scene = _use$useScene2.scene;
37
+ var cloudGroup = new VolumetricCloud().cloudGroup;
38
+ if (!scene) throw new Error('scene is not defined');
39
+ scene.add(cloudGroup);
40
+ return cloudGroup;
41
+ };
42
+ export default createVolumetricCloud;
@@ -0,0 +1,40 @@
1
+ import type { LineSegments, OrbitControls, PerspectiveCamera, Sprite, WebGLRenderer, lib } from '@anov/3d-core';
2
+ import { Mesh, Object3D, OrthographicCamera, Vector3, Vector4 } from '@anov/3d-core';
3
+ declare type GizmoOrientation = '+x' | '-x' | '+y' | '-y' | '+z' | '-z';
4
+ export declare type DomPlacement = 'top-left' | 'top-right' | 'top-center' | 'center-right' | 'center-left' | 'center-center' | 'bottom-left' | 'bottom-right' | 'bottom-center';
5
+ declare class ViewHelper extends Object3D {
6
+ camera: OrthographicCamera | PerspectiveCamera;
7
+ orthoCamera: OrthographicCamera;
8
+ isViewHelper: boolean;
9
+ animating: boolean;
10
+ target: Vector3;
11
+ backgroundSphere: Mesh;
12
+ axesLines: LineSegments;
13
+ spritePoints: Sprite[];
14
+ domElement: HTMLElement;
15
+ domContainer: HTMLElement;
16
+ domRect: DOMRect;
17
+ dragging: boolean;
18
+ renderer: WebGLRenderer;
19
+ controls?: OrbitControls | lib.TrackballControls;
20
+ controlsChangeEvent: {
21
+ listener: () => void;
22
+ };
23
+ viewport: Vector4;
24
+ offsetHeight: number;
25
+ constructor(camera: PerspectiveCamera | OrthographicCamera, renderer: WebGLRenderer, placement?: DomPlacement, size?: number);
26
+ startListening(): void;
27
+ onPointerDown(e: PointerEvent): void;
28
+ onPointerMove(e: PointerEvent): void;
29
+ onPointerLeave(): void;
30
+ handleClick(e: PointerEvent): void;
31
+ handleHover(e: PointerEvent): void;
32
+ setControls(controls?: OrbitControls | lib.TrackballControls): void;
33
+ render(): void;
34
+ updateOrientation(fromCamera?: boolean): void;
35
+ update(): void;
36
+ animate(delta: number): void;
37
+ setOrientation(orientation: GizmoOrientation): void;
38
+ dispose(): void;
39
+ }
40
+ export default ViewHelper;