@pluot/core 0.1.0
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/LICENSE +299 -0
- package/dist/index.js +6155 -0
- package/dist-tsc/3d-view-controls.d.ts +17 -0
- package/dist-tsc/3d-view-controls.d.ts.map +1 -0
- package/dist-tsc/3d-view-controls.js +247 -0
- package/dist-tsc/core.d.ts +10 -0
- package/dist-tsc/core.d.ts.map +1 -0
- package/dist-tsc/core.js +71 -0
- package/dist-tsc/dom-2d-camera.d.ts +26 -0
- package/dist-tsc/dom-2d-camera.d.ts.map +1 -0
- package/dist-tsc/dom-2d-camera.js +323 -0
- package/dist-tsc/feature-detection.d.ts +2 -0
- package/dist-tsc/feature-detection.d.ts.map +1 -0
- package/dist-tsc/feature-detection.js +58 -0
- package/dist-tsc/functional-2d-camera.d.ts +9 -0
- package/dist-tsc/functional-2d-camera.d.ts.map +1 -0
- package/dist-tsc/functional-2d-camera.js +178 -0
- package/dist-tsc/index.d.ts +6 -0
- package/dist-tsc/index.d.ts.map +1 -0
- package/dist-tsc/index.js +5 -0
- package/dist-tsc/lru-store.d.ts +13 -0
- package/dist-tsc/lru-store.d.ts.map +1 -0
- package/dist-tsc/lru-store.js +137 -0
- package/dist-tsc/viewport.d.ts +24 -0
- package/dist-tsc/viewport.d.ts.map +1 -0
- package/dist-tsc/viewport.js +108 -0
- package/package.json +55 -0
- package/src/3d-view-controls.js +271 -0
- package/src/core.ts +89 -0
- package/src/dom-2d-camera.js +441 -0
- package/src/feature-detection.ts +57 -0
- package/src/index.ts +13 -0
- package/src/lru-store.ts +155 -0
- package/src/viewport.ts +145 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export default function createCamera(element: any, options: any): {
|
|
2
|
+
view: any;
|
|
3
|
+
element: any;
|
|
4
|
+
delay: any;
|
|
5
|
+
rotateSpeed: any;
|
|
6
|
+
zoomSpeed: any;
|
|
7
|
+
translateSpeed: any;
|
|
8
|
+
flipX: boolean;
|
|
9
|
+
flipY: boolean;
|
|
10
|
+
modes: any;
|
|
11
|
+
tick: () => boolean;
|
|
12
|
+
lookAt: (center: any, eye: any, up: any) => void;
|
|
13
|
+
rotate: (pitch: any, yaw: any, roll: any) => void;
|
|
14
|
+
pan: (dx: any, dy: any, dz: any) => void;
|
|
15
|
+
translate: (dx: any, dy: any, dz: any) => void;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=3d-view-controls.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"3d-view-controls.d.ts","sourceRoot":"","sources":["../src/3d-view-controls.js"],"names":[],"mappings":"AA8CA;;;;;;;;;;;;;;;EAgOC"}
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
// License copied from https://github.com/mikolalysenko/3d-view-controls/blob/master/LICENSE
|
|
2
|
+
//
|
|
3
|
+
// The MIT License (MIT)
|
|
4
|
+
//
|
|
5
|
+
// Copyright (c) 2013 Mikola Lysenko
|
|
6
|
+
//
|
|
7
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
// of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
// in the Software without restriction, including without limitation the rights
|
|
10
|
+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
// copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
// furnished to do so, subject to the following conditions:
|
|
13
|
+
//
|
|
14
|
+
// The above copyright notice and this permission notice shall be included in
|
|
15
|
+
// all copies or substantial portions of the Software.
|
|
16
|
+
//
|
|
17
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
|
+
// THE SOFTWARE.
|
|
24
|
+
// Reference: https://github.com/mikolalysenko/3d-view-controls/blob/0e59c2ae4a891ce3c7bb83aa4291f89d99366037/camera.js
|
|
25
|
+
// TODO: contribute modifications back upstream once things are working.
|
|
26
|
+
import createView from '3d-view';
|
|
27
|
+
import mouseChange from 'mouse-change';
|
|
28
|
+
import mouseWheel from 'mouse-wheel';
|
|
29
|
+
import mouseOffset from 'mouse-event-offset';
|
|
30
|
+
import hasPassive from 'has-passive-events';
|
|
31
|
+
// Updated right-now implementation to avoid `global` usage.
|
|
32
|
+
// Reference: https://github.com/hughsk/right-now/blob/master/browser.js
|
|
33
|
+
const now = performance && performance.now
|
|
34
|
+
? function now() {
|
|
35
|
+
return performance.now();
|
|
36
|
+
}
|
|
37
|
+
: Date.now ||
|
|
38
|
+
function now() {
|
|
39
|
+
return +new Date();
|
|
40
|
+
};
|
|
41
|
+
export default function createCamera(element, options) {
|
|
42
|
+
element = element || document.body;
|
|
43
|
+
options = options || {};
|
|
44
|
+
var limits = [0.01, Infinity];
|
|
45
|
+
if ('distanceLimits' in options) {
|
|
46
|
+
limits[0] = options.distanceLimits[0];
|
|
47
|
+
limits[1] = options.distanceLimits[1];
|
|
48
|
+
}
|
|
49
|
+
if ('zoomMin' in options) {
|
|
50
|
+
limits[0] = options.zoomMin;
|
|
51
|
+
}
|
|
52
|
+
if ('zoomMax' in options) {
|
|
53
|
+
limits[1] = options.zoomMax;
|
|
54
|
+
}
|
|
55
|
+
var view = createView({
|
|
56
|
+
center: options.center || [0, 0, 0],
|
|
57
|
+
up: options.up || [0, 1, 0],
|
|
58
|
+
eye: options.eye || [0, 0, 10],
|
|
59
|
+
mode: options.mode || 'orbit',
|
|
60
|
+
distanceLimits: limits
|
|
61
|
+
});
|
|
62
|
+
var pmatrix = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
|
|
63
|
+
var distance = 0.0;
|
|
64
|
+
var width = element.clientWidth;
|
|
65
|
+
var height = element.clientHeight;
|
|
66
|
+
var camera = {
|
|
67
|
+
view: view,
|
|
68
|
+
element: element,
|
|
69
|
+
delay: options.delay || 16,
|
|
70
|
+
rotateSpeed: options.rotateSpeed || 1,
|
|
71
|
+
zoomSpeed: options.zoomSpeed || 1,
|
|
72
|
+
translateSpeed: options.translateSpeed || 1,
|
|
73
|
+
flipX: !!options.flipX,
|
|
74
|
+
flipY: !!options.flipY,
|
|
75
|
+
modes: view.modes,
|
|
76
|
+
tick: function () {
|
|
77
|
+
var t = now();
|
|
78
|
+
var delay = this.delay;
|
|
79
|
+
view.idle(t - delay);
|
|
80
|
+
view.flush(t - (100 + delay * 2));
|
|
81
|
+
var ctime = t - 2 * delay;
|
|
82
|
+
view.recalcMatrix(ctime);
|
|
83
|
+
var allEqual = true;
|
|
84
|
+
var matrix = view.computedMatrix;
|
|
85
|
+
for (var i = 0; i < 16; ++i) {
|
|
86
|
+
allEqual = allEqual && (pmatrix[i] === matrix[i]);
|
|
87
|
+
pmatrix[i] = matrix[i];
|
|
88
|
+
}
|
|
89
|
+
var sizeChanged = element.clientWidth === width &&
|
|
90
|
+
element.clientHeight === height;
|
|
91
|
+
width = element.clientWidth;
|
|
92
|
+
height = element.clientHeight;
|
|
93
|
+
if (allEqual) {
|
|
94
|
+
return !sizeChanged;
|
|
95
|
+
}
|
|
96
|
+
distance = Math.exp(view.computedRadius[0]);
|
|
97
|
+
return true;
|
|
98
|
+
},
|
|
99
|
+
lookAt: function (center, eye, up) {
|
|
100
|
+
view.lookAt(view.lastT(), center, eye, up);
|
|
101
|
+
},
|
|
102
|
+
rotate: function (pitch, yaw, roll) {
|
|
103
|
+
view.rotate(view.lastT(), pitch, yaw, roll);
|
|
104
|
+
},
|
|
105
|
+
pan: function (dx, dy, dz) {
|
|
106
|
+
view.pan(view.lastT(), dx, dy, dz);
|
|
107
|
+
},
|
|
108
|
+
translate: function (dx, dy, dz) {
|
|
109
|
+
view.translate(view.lastT(), dx, dy, dz);
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
Object.defineProperties(camera, {
|
|
113
|
+
matrix: {
|
|
114
|
+
get: function () {
|
|
115
|
+
return view.computedMatrix;
|
|
116
|
+
},
|
|
117
|
+
set: function (mat) {
|
|
118
|
+
view.setMatrix(view.lastT(), mat);
|
|
119
|
+
return view.computedMatrix;
|
|
120
|
+
},
|
|
121
|
+
enumerable: true
|
|
122
|
+
},
|
|
123
|
+
mode: {
|
|
124
|
+
get: function () {
|
|
125
|
+
return view.getMode();
|
|
126
|
+
},
|
|
127
|
+
set: function (mode) {
|
|
128
|
+
view.setMode(mode);
|
|
129
|
+
return view.getMode();
|
|
130
|
+
},
|
|
131
|
+
enumerable: true
|
|
132
|
+
},
|
|
133
|
+
center: {
|
|
134
|
+
get: function () {
|
|
135
|
+
return view.computedCenter;
|
|
136
|
+
},
|
|
137
|
+
set: function (ncenter) {
|
|
138
|
+
view.lookAt(view.lastT(), ncenter);
|
|
139
|
+
return view.computedCenter;
|
|
140
|
+
},
|
|
141
|
+
enumerable: true
|
|
142
|
+
},
|
|
143
|
+
eye: {
|
|
144
|
+
get: function () {
|
|
145
|
+
return view.computedEye;
|
|
146
|
+
},
|
|
147
|
+
set: function (neye) {
|
|
148
|
+
view.lookAt(view.lastT(), null, neye);
|
|
149
|
+
return view.computedEye;
|
|
150
|
+
},
|
|
151
|
+
enumerable: true
|
|
152
|
+
},
|
|
153
|
+
up: {
|
|
154
|
+
get: function () {
|
|
155
|
+
return view.computedUp;
|
|
156
|
+
},
|
|
157
|
+
set: function (nup) {
|
|
158
|
+
view.lookAt(view.lastT(), null, null, nup);
|
|
159
|
+
return view.computedUp;
|
|
160
|
+
},
|
|
161
|
+
enumerable: true
|
|
162
|
+
},
|
|
163
|
+
distance: {
|
|
164
|
+
get: function () {
|
|
165
|
+
return distance;
|
|
166
|
+
},
|
|
167
|
+
set: function (d) {
|
|
168
|
+
view.setDistance(view.lastT(), d);
|
|
169
|
+
return d;
|
|
170
|
+
},
|
|
171
|
+
enumerable: true
|
|
172
|
+
},
|
|
173
|
+
distanceLimits: {
|
|
174
|
+
get: function () {
|
|
175
|
+
return view.getDistanceLimits(limits);
|
|
176
|
+
},
|
|
177
|
+
set: function (v) {
|
|
178
|
+
view.setDistanceLimits(v);
|
|
179
|
+
return v;
|
|
180
|
+
},
|
|
181
|
+
enumerable: true
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
element.addEventListener('contextmenu', function (ev) {
|
|
185
|
+
//ev.preventDefault()
|
|
186
|
+
//return false
|
|
187
|
+
});
|
|
188
|
+
var lastX = 0, lastY = 0, lastMods = { shift: false, control: false, alt: false, meta: false };
|
|
189
|
+
mouseChange(element, handleInteraction);
|
|
190
|
+
//enable simple touch interactions
|
|
191
|
+
element.addEventListener('touchstart', function (ev) {
|
|
192
|
+
var xy = mouseOffset(ev.changedTouches[0], element);
|
|
193
|
+
handleInteraction(0, xy[0], xy[1], lastMods);
|
|
194
|
+
handleInteraction(1, xy[0], xy[1], lastMods);
|
|
195
|
+
ev.preventDefault();
|
|
196
|
+
}, hasPassive ? { passive: false } : false);
|
|
197
|
+
element.addEventListener('touchmove', function (ev) {
|
|
198
|
+
var xy = mouseOffset(ev.changedTouches[0], element);
|
|
199
|
+
handleInteraction(1, xy[0], xy[1], lastMods);
|
|
200
|
+
ev.preventDefault();
|
|
201
|
+
}, hasPassive ? { passive: false } : false);
|
|
202
|
+
element.addEventListener('touchend', function (ev) {
|
|
203
|
+
var xy = mouseOffset(ev.changedTouches[0], element);
|
|
204
|
+
handleInteraction(0, lastX, lastY, lastMods);
|
|
205
|
+
ev.preventDefault();
|
|
206
|
+
}, hasPassive ? { passive: false } : false);
|
|
207
|
+
function handleInteraction(buttons, x, y, mods) {
|
|
208
|
+
var scale = 1.0 / element.clientHeight;
|
|
209
|
+
var dx = scale * (x - lastX);
|
|
210
|
+
var dy = scale * (y - lastY);
|
|
211
|
+
var flipX = camera.flipX ? 1 : -1;
|
|
212
|
+
var flipY = camera.flipY ? 1 : -1;
|
|
213
|
+
var drot = Math.PI * camera.rotateSpeed;
|
|
214
|
+
var t = now();
|
|
215
|
+
if (buttons & 1) {
|
|
216
|
+
if (mods.shift) {
|
|
217
|
+
view.rotate(t, 0, 0, -dx * drot);
|
|
218
|
+
}
|
|
219
|
+
else {
|
|
220
|
+
view.rotate(t, flipX * drot * dx, -flipY * drot * dy, 0);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
else if (buttons & 2) {
|
|
224
|
+
view.pan(t, -camera.translateSpeed * dx * distance, camera.translateSpeed * dy * distance, 0);
|
|
225
|
+
}
|
|
226
|
+
else if (buttons & 4) {
|
|
227
|
+
var kzoom = camera.zoomSpeed * dy / window.innerHeight * (t - view.lastT()) * 50.0;
|
|
228
|
+
view.pan(t, 0, 0, distance * (Math.exp(kzoom) - 1));
|
|
229
|
+
}
|
|
230
|
+
lastX = x;
|
|
231
|
+
lastY = y;
|
|
232
|
+
lastMods = mods;
|
|
233
|
+
}
|
|
234
|
+
mouseWheel(element, function (dx, dy, dz) {
|
|
235
|
+
var flipX = camera.flipX ? 1 : -1;
|
|
236
|
+
var flipY = camera.flipY ? 1 : -1;
|
|
237
|
+
var t = now();
|
|
238
|
+
if (Math.abs(dx) > Math.abs(dy)) {
|
|
239
|
+
view.rotate(t, 0, 0, -dx * flipX * Math.PI * camera.rotateSpeed / window.innerWidth);
|
|
240
|
+
}
|
|
241
|
+
else {
|
|
242
|
+
var kzoom = camera.zoomSpeed * flipY * dy / window.innerHeight * (t - view.lastT()) / 100.0;
|
|
243
|
+
view.pan(t, 0, 0, distance * (Math.exp(kzoom) - 1));
|
|
244
|
+
}
|
|
245
|
+
}, true);
|
|
246
|
+
return camera;
|
|
247
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as wasm from "pluot";
|
|
2
|
+
import { type LruStore } from "./lru-store.js";
|
|
3
|
+
import type { AsyncReadable } from "zarrita";
|
|
4
|
+
export declare const render_wasm: typeof wasm.render_wasm, pick_wasm: typeof wasm.pick_wasm;
|
|
5
|
+
export declare function initialize(): Promise<any>;
|
|
6
|
+
export declare function getIsWasmReady(): boolean;
|
|
7
|
+
export declare function setStore(store: AsyncReadable, plotId: string): string;
|
|
8
|
+
export declare function setStoreByName(storeName: string, store: AsyncReadable): void;
|
|
9
|
+
export declare function getStore(storeName: string): LruStore<AsyncReadable<unknown>>;
|
|
10
|
+
//# sourceMappingURL=core.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,OAAO,CAAC;AAC9B,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,eAAO,MAAQ,WAAW,2BAAE,SAAS,uBAAS,CAAC;AA2D/C,wBAAsB,UAAU,iBAQ/B;AAED,wBAAgB,cAAc,IAAI,OAAO,CAExC;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAGrE;AAED,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,QAErE;AAED,wBAAgB,QAAQ,CAAC,SAAS,EAAE,MAAM,oCAEzC"}
|
package/dist-tsc/core.js
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import * as wasm from "pluot";
|
|
2
|
+
import { lru } from "./lru-store.js";
|
|
3
|
+
export const { render_wasm, pick_wasm } = wasm;
|
|
4
|
+
// Global stores singleton.
|
|
5
|
+
const stores = {};
|
|
6
|
+
let isInitializedPromise = undefined;
|
|
7
|
+
let isWasmReady = false;
|
|
8
|
+
async function _initialize() {
|
|
9
|
+
// IMPORTANT: This function should only be executed ONCE.
|
|
10
|
+
await wasm.default();
|
|
11
|
+
// This is a hack that allows avoiding putting these functions on `window` or `globalThis`.
|
|
12
|
+
// It is a workaround for https://github.com/wasm-bindgen/wasm-bindgen/issues/3041
|
|
13
|
+
// See corresponding code in `bindings.rs`.
|
|
14
|
+
wasm.set_zarr_imports({
|
|
15
|
+
zarr_get: async (store_name, key) => {
|
|
16
|
+
console.log(`zarr_get: store_name=${store_name}, key=${key}`);
|
|
17
|
+
return stores[store_name].get(`/${key}`);
|
|
18
|
+
},
|
|
19
|
+
zarr_get_status: (store_name, key) => {
|
|
20
|
+
return stores[store_name].getPeek(`/${key}`);
|
|
21
|
+
},
|
|
22
|
+
zarr_has: async (store_name, key) => {
|
|
23
|
+
// console.log(`zarr_has: store_name=${store_name}, key=${key}`);
|
|
24
|
+
return stores[store_name].get(`/${key}`) !== undefined;
|
|
25
|
+
},
|
|
26
|
+
zarr_has_status: (store_name, key) => {
|
|
27
|
+
return stores[store_name].getPeek(`/${key}`);
|
|
28
|
+
},
|
|
29
|
+
zarr_get_range_from_offset: async (store_name, key, offset, length) => {
|
|
30
|
+
// console.log(`zarr_get_range_from_offset: store_name=${store_name}, key=${key}, offset=${offset}, length=${length}`);
|
|
31
|
+
return stores[store_name].getRange(`/${key}`, { offset, length });
|
|
32
|
+
},
|
|
33
|
+
zarr_get_range_from_offset_status: (store_name, key, offset, length) => {
|
|
34
|
+
// console.log(`zarr_get_range_from_offset: store_name=${store_name}, key=${key}, offset=${offset}, length=${length}`);
|
|
35
|
+
return stores[store_name].getRangePeek(`/${key}`, { offset, length });
|
|
36
|
+
},
|
|
37
|
+
zarr_get_range_from_end: async (store_name, key, suffix_length) => {
|
|
38
|
+
// console.log(`zarr_get_range_from_end: store_name=${store_name}, key=${key}, suffix_length=${suffix_length}`);
|
|
39
|
+
return stores[store_name].getRange(`/${key}`, { suffixLength: suffix_length });
|
|
40
|
+
},
|
|
41
|
+
zarr_get_range_from_end_status: (store_name, key, suffix_length) => {
|
|
42
|
+
// console.log(`zarr_get_range_from_end: store_name=${store_name}, key=${key}, suffix_length=${suffix_length}`);
|
|
43
|
+
return stores[store_name].getRangePeek(`/${key}`, { suffixLength: suffix_length });
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
// Opt-in to better error messages.
|
|
47
|
+
wasm.set_panic_hook();
|
|
48
|
+
}
|
|
49
|
+
export async function initialize() {
|
|
50
|
+
// This function is safe to execute multiple times.
|
|
51
|
+
if (!isInitializedPromise) {
|
|
52
|
+
isInitializedPromise = _initialize().then(() => { isWasmReady = true; });
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
isInitializedPromise.then(() => { isWasmReady = true; });
|
|
56
|
+
}
|
|
57
|
+
return isInitializedPromise;
|
|
58
|
+
}
|
|
59
|
+
export function getIsWasmReady() {
|
|
60
|
+
return isWasmReady;
|
|
61
|
+
}
|
|
62
|
+
export function setStore(store, plotId) {
|
|
63
|
+
stores[plotId + "_store"] = lru(store);
|
|
64
|
+
return plotId + "_store";
|
|
65
|
+
}
|
|
66
|
+
export function setStoreByName(storeName, store) {
|
|
67
|
+
stores[storeName] = lru(store);
|
|
68
|
+
}
|
|
69
|
+
export function getStore(storeName) {
|
|
70
|
+
return stores[storeName];
|
|
71
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export default dom2dCamera;
|
|
2
|
+
declare function dom2dCamera(element: any, { distance, target, rotation, isNdc, isFixed, isPan, isPanInverted, panSpeed, isRotate, rotateSpeed, defaultMouseDownMoveAction, mouseDownMoveModKey, isZoom, zoomSpeed, viewCenter, scaleBounds, translationBounds, onKeyDown, onKeyUp, onMouseDown, onMouseUp, onMouseMove, onWheel, aspectRatioMode, aspectRatioAlignmentMode, }?: {
|
|
3
|
+
distance?: number | undefined;
|
|
4
|
+
target?: number[] | undefined;
|
|
5
|
+
rotation?: number | undefined;
|
|
6
|
+
isNdc?: boolean | undefined;
|
|
7
|
+
isFixed?: boolean | undefined;
|
|
8
|
+
isPan?: boolean | undefined;
|
|
9
|
+
isPanInverted?: boolean[] | undefined;
|
|
10
|
+
panSpeed?: number | undefined;
|
|
11
|
+
isRotate?: boolean | undefined;
|
|
12
|
+
rotateSpeed?: number | undefined;
|
|
13
|
+
defaultMouseDownMoveAction?: string | undefined;
|
|
14
|
+
mouseDownMoveModKey?: string | undefined;
|
|
15
|
+
isZoom?: boolean | undefined;
|
|
16
|
+
zoomSpeed?: number | undefined;
|
|
17
|
+
onKeyDown?: (() => void) | undefined;
|
|
18
|
+
onKeyUp?: (() => void) | undefined;
|
|
19
|
+
onMouseDown?: (() => void) | undefined;
|
|
20
|
+
onMouseUp?: (() => void) | undefined;
|
|
21
|
+
onMouseMove?: (() => void) | undefined;
|
|
22
|
+
onWheel?: (() => void) | undefined;
|
|
23
|
+
aspectRatioMode?: string | undefined;
|
|
24
|
+
aspectRatioAlignmentMode?: string | undefined;
|
|
25
|
+
}): any;
|
|
26
|
+
//# sourceMappingURL=dom-2d-camera.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dom-2d-camera.d.ts","sourceRoot":"","sources":["../src/dom-2d-camera.js"],"names":[],"mappings":";AAoCA;;;;;;;;;;;;;;;;;;;;;;;QAkZC"}
|