@xviewer.js/core 1.0.0-alpha.19 → 1.0.0-alpha.21

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/main.js CHANGED
@@ -1143,6 +1143,7 @@ class aJSONLoader extends aLoader {
1143
1143
  class aTextureLoader extends aLoader {
1144
1144
  load({ url, onLoad, onProgress, onError, texSettings }) {
1145
1145
  const loadCallback = (tex)=>{
1146
+ tex.colorSpace = three.SRGBColorSpace;
1146
1147
  onLoad(Object.assign(tex, texSettings));
1147
1148
  };
1148
1149
  const loader = new three.TextureLoader(this.manager.loadingManager);
@@ -1346,7 +1347,7 @@ class Component extends ObjectInstance {
1346
1347
  }
1347
1348
  }
1348
1349
 
1349
- const { clamp: clamp$1, lerp } = three.MathUtils;
1350
+ const { clamp: clamp$4, lerp: lerp$1 } = three.MathUtils;
1350
1351
  class CinestationBrain extends Component {
1351
1352
  get vcam() {
1352
1353
  return this._vcam;
@@ -1360,7 +1361,7 @@ class CinestationBrain extends Component {
1360
1361
  this._vcams.forEach((v)=>v.enabled = v === vcam);
1361
1362
  if (this._lerpTime < this.brainBlend.time) {
1362
1363
  this._lerpTime += dt;
1363
- let t = clamp$1(this._lerpTime / this.brainBlend.time, 0, 1);
1364
+ let t = clamp$4(this._lerpTime / this.brainBlend.time, 0, 1);
1364
1365
  this._lerpToMainCamera(vcam, this.brainBlend.style(t));
1365
1366
  } else {
1366
1367
  this._lerpToMainCamera(vcam, 1);
@@ -1396,9 +1397,9 @@ class CinestationBrain extends Component {
1396
1397
  const isChanged = isLensChanged || isTransformChanged;
1397
1398
  from.position.lerp(finalPosition, t);
1398
1399
  from.quaternion.slerp(finalRotation, t);
1399
- from.fov = lerp(from.fov, fov, t);
1400
- from.near = lerp(from.near, near, t);
1401
- from.far = lerp(from.far, far, t);
1400
+ from.fov = lerp$1(from.fov, fov, t);
1401
+ from.near = lerp$1(from.near, near, t);
1402
+ from.far = lerp$1(from.far, far, t);
1402
1403
  if (isLensChanged) {
1403
1404
  from.updateProjectionMatrix();
1404
1405
  }
@@ -1999,15 +2000,579 @@ SystemInfo.cpuCoreCount = navigator.hardwareConcurrency || 1;
1999
2000
  SystemInfo.baseUrl = document.location.origin;
2000
2001
  SystemInfo.isIFrame = window.self !== window.top;
2001
2002
 
2002
- const { min, max, exp } = Math;
2003
+ const { clamp: clamp$3 } = three.MathUtils;
2004
+ const { min, max: max$1, exp } = Math;
2005
+ const kNegligibleResidual = 0.01;
2006
+ const kLogNegligibleResidual = Math.log(kNegligibleResidual) // -4.605170186;
2007
+ ;
2008
+ function exponentialDamp(current, target, dampTime, deltaTime) {
2009
+ let k = -kLogNegligibleResidual / dampTime;
2010
+ return current + (target - current) * (1 - exp(-k * deltaTime));
2011
+ }
2003
2012
  // cuve like exponentialDecay but cost less
2004
2013
  function quarticDamp(current, target, dampTime, deltaTime) {
2005
2014
  let t = 1 - min(deltaTime, dampTime) / dampTime;
2006
2015
  let tt = t * t;
2007
2016
  return current + (target - current) * (1 - tt * tt);
2008
2017
  }
2018
+ function smoothDamp(state, current, target, smoothTime, maxSpeed, deltaTime) {
2019
+ if (state._velocity === undefined) {
2020
+ state._velocity = 0;
2021
+ }
2022
+ smoothTime = max$1(0.0001, smoothTime);
2023
+ let num = 2 / smoothTime;
2024
+ let num2 = num * deltaTime;
2025
+ let num3 = 1 / (1 + num2 + 0.48 * num2 * num2 + 0.235 * num2 * num2 * num2);
2026
+ let num4 = current - target;
2027
+ let num5 = target;
2028
+ let num6 = maxSpeed * smoothTime;
2029
+ num4 = clamp$3(num4, -num6, num6);
2030
+ target = current - num4;
2031
+ let num7 = (state._velocity + num * num4) * deltaTime;
2032
+ state._velocity = (state._velocity - num * num7) * num3;
2033
+ let num8 = target + (num4 + num7) * num3;
2034
+ if (num5 - current > 0 == num8 > num5) {
2035
+ num8 = num5;
2036
+ state._velocity = (num8 - num5) / deltaTime;
2037
+ }
2038
+ return num8;
2039
+ }
2040
+ function Quat_exponentialDamp(current, target, dampTime, deltaTime, out = current) {
2041
+ return out.copy(current).slerp(target, exponentialDamp(0, 1, dampTime, deltaTime));
2042
+ }
2043
+ function Quat_quarticDamp(current, target, dampTime, deltaTime, out = current) {
2044
+ return out.copy(current).slerp(target, quarticDamp(0, 1, dampTime, deltaTime));
2045
+ }
2046
+ function Quat_smoothDamp(current, target, dampTime, deltaTime, out = current) {
2047
+ return out.copy(current).slerp(target, smoothDamp(out, 0, 1, dampTime, Infinity, deltaTime));
2048
+ }
2049
+ function Vec3_smoothDamp(current, target, dampTime, deltaTime, out = current) {
2050
+ return out.copy(current).lerp(target, smoothDamp(out, 0, 1, dampTime, Infinity, deltaTime));
2051
+ }
2052
+
2053
+ const Vector3_UNIT_X = Object.freeze(new three.Vector3(1, 0, 0));
2054
+ const Vector3_UNIT_Y = Object.freeze(new three.Vector3(0, 1, 0));
2055
+ const Vector3_UNIT_Z = Object.freeze(new three.Vector3(0, 0, 1));
2056
+ const Vector3_RIGHT = Object.freeze(new three.Vector3(1, 0, 0));
2057
+ const Vector3_UP = Object.freeze(new three.Vector3(0, 1, 0));
2058
+ const Vector3_ZERO = Object.freeze(new three.Vector3(0, 0, 0));
2059
+ const Vector3_ONE = Object.freeze(new three.Vector3(1, 1, 1));
2060
+ const Vector3_NEG_ONE = Object.freeze(new three.Vector3(-1, -1, -1));
2061
+
2062
+ const { clamp: clamp$2 } = three.MathUtils;
2063
+ const { max, abs: abs$1, acos } = Math;
2064
+ const EPSILON = 1.e-6;
2065
+ const __delta = new three.Vector3();
2066
+ function VInterpTo(current, target, deltaTime, speed, out = current) {
2067
+ if (speed <= 0) {
2068
+ return out.copy(target);
2069
+ }
2070
+ let dist = __delta.copy(target).sub(current);
2071
+ if (dist.lengthSq() < EPSILON) {
2072
+ return out.copy(target);
2073
+ }
2074
+ return out.copy(current).add(dist.multiplyScalar(clamp$2(deltaTime * speed, 0, 1)));
2075
+ }
2076
+ function VInterpConstantTo(current, target, deltaTime, speed, out = current) {
2077
+ let delta = __delta.copy(target).sub(current);
2078
+ let deltaM = delta.length();
2079
+ let maxStep = speed * deltaTime;
2080
+ if (deltaM > maxStep) {
2081
+ if (maxStep > 0) {
2082
+ let deltaN = delta.multiplyScalar(1 / deltaM);
2083
+ return out.copy(current).add(deltaN);
2084
+ } else {
2085
+ return out.copy(current);
2086
+ }
2087
+ }
2088
+ return out.copy(target);
2089
+ }
2090
+ function Quat_Equals(a, b, epsilon = EPSILON) {
2091
+ return abs$1(a.x - b.x) <= epsilon * max(1., abs$1(a.x), abs$1(b.x)) && abs$1(a.y - b.y) <= epsilon * max(1., abs$1(a.y), abs$1(b.y)) && abs$1(a.z - b.z) <= epsilon * max(1., abs$1(a.z), abs$1(b.z)) && abs$1(a.w - b.w) <= epsilon * max(1., abs$1(a.w), abs$1(b.w));
2092
+ }
2093
+ function Quat_AngularDistance(a, b) {
2094
+ let innerProd = a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w;
2095
+ return acos(2 * innerProd * innerProd - 1);
2096
+ }
2097
+ function QInterpTo(current, target, deltaTime, speed) {
2098
+ if (speed <= 0) {
2099
+ return target;
2100
+ }
2101
+ if (Quat_Equals(current, target)) {
2102
+ return target;
2103
+ }
2104
+ return current.slerp(target, clamp$2(speed * deltaTime, 0, 1));
2105
+ }
2106
+ function QInterpConstantTo(current, target, deltaTime, speed, out = current) {
2107
+ if (speed <= 0) {
2108
+ return out.copy(target);
2109
+ }
2110
+ if (Quat_Equals(current, target)) {
2111
+ return out.copy(target);
2112
+ }
2113
+ let deltaSpeed = clamp$2(speed * deltaTime, 0, 1);
2114
+ let angularDist = max(Quat_AngularDistance(current, target), EPSILON);
2115
+ return out.copy(current).slerp(target, clamp$2(deltaSpeed / angularDist, 0, 1));
2116
+ }
2117
+ //非线性
2118
+ function FInterpTo(current, target, deltaTime, speed) {
2119
+ if (speed <= 0) {
2120
+ return target;
2121
+ }
2122
+ let dist = target - current;
2123
+ if (abs$1(dist) < EPSILON) {
2124
+ return target;
2125
+ }
2126
+ return current + dist * clamp$2(speed * deltaTime, 0, 1);
2127
+ }
2128
+ //线性插值
2129
+ function FInterpConstantTo(current, target, deltaTime, speed) {
2130
+ let dist = target - current;
2131
+ if (abs$1(dist) < EPSILON) {
2132
+ return target;
2133
+ }
2134
+ let step = speed * deltaTime;
2135
+ return current + clamp$2(dist, -step, step);
2136
+ }
2137
+
2138
+ const { lerp, clamp: clamp$1 } = three.MathUtils;
2139
+ function catmullRom(t, p0, p1, p2, p3) {
2140
+ const v0 = (p2 - p0) * 0.5;
2141
+ const v1 = (p3 - p1) * 0.5;
2142
+ const t2 = t * t;
2143
+ const t3 = t * t2;
2144
+ return (2 * p1 - 2 * p2 + v0 + v1) * t3 + (-3 * p1 + 3 * p2 - 2 * v0 - v1) * t2 + v0 * t + p1;
2145
+ }
2146
+ class CurvePoint {
2147
+ set(x, y) {
2148
+ this.x = x;
2149
+ this.y = y;
2150
+ return this;
2151
+ }
2152
+ lerp(p, t, out = this) {
2153
+ out.x = lerp(this.x, p.x, t);
2154
+ out.y = lerp(this.y, p.y, t);
2155
+ return out;
2156
+ }
2157
+ constructor(x = 0, y = 0, mode = 0){
2158
+ this.x = x;
2159
+ this.y = y;
2160
+ this.mode = mode;
2161
+ }
2162
+ }
2163
+ class AnimationCurve {
2164
+ _getInterpolant(samples) {
2165
+ if (this._samples !== samples) {
2166
+ this._samples = samples;
2167
+ this._interpolant = new three.LinearInterpolant(new Float32Array(samples), new Float32Array(samples), 1, new Float32Array(samples));
2168
+ }
2169
+ return this._interpolant;
2170
+ }
2171
+ createCurvePoint(x, y, mode) {
2172
+ return new CurvePoint(x, y, mode);
2173
+ }
2174
+ resample(samples = 100) {
2175
+ const step = 1 / (samples - 1);
2176
+ const interpolant = this._getInterpolant(samples);
2177
+ const times = interpolant.parameterPositions;
2178
+ const values = interpolant.sampleValues;
2179
+ const point = this.createCurvePoint();
2180
+ for(let i = 0; i < samples; i++){
2181
+ this.getPoint(i * step, point);
2182
+ times[i] = point.x;
2183
+ values[i] = point.y;
2184
+ }
2185
+ }
2186
+ evaluate(t) {
2187
+ if (this.needsUpdate) {
2188
+ this.needsUpdate = false;
2189
+ this.resample();
2190
+ }
2191
+ return this._interpolant.evaluate(t)[0];
2192
+ }
2193
+ getPoint(t, out) {
2194
+ const points = this.points;
2195
+ if (t <= 0) {
2196
+ return out.set(t, points[0].y);
2197
+ }
2198
+ if (t >= 1) {
2199
+ return out.set(t, points[points.length - 1].y);
2200
+ }
2201
+ const p = (points.length - 1) * t;
2202
+ const intPoint = Math.floor(p);
2203
+ const weight = p - intPoint;
2204
+ const p0 = points[intPoint === 0 ? intPoint : intPoint - 1];
2205
+ const p1 = points[intPoint];
2206
+ const p2 = points[intPoint > points.length - 2 ? points.length - 1 : intPoint + 1];
2207
+ const p3 = points[intPoint > points.length - 3 ? points.length - 1 : intPoint + 2];
2208
+ if (p1.mode === 1 || p0 === p1 && p2.mode === 1) {
2209
+ return p1.lerp(p2, weight, out);
2210
+ }
2211
+ return out.set(clamp$1(catmullRom(weight, p0.x, p1.x, p2.x, p3.x), 0, 1), clamp$1(catmullRom(weight, p0.y, p1.y, p2.y, p3.y), 0, 1));
2212
+ }
2213
+ constructor(name = "", points = [
2214
+ new CurvePoint(0, 0),
2215
+ new CurvePoint(1, 1)
2216
+ ]){
2217
+ this.name = name;
2218
+ this.points = points;
2219
+ this.needsUpdate = true;
2220
+ this.isAnimationCurve = true;
2221
+ this._samples = 100;
2222
+ this._interpolant = new three.LinearInterpolant(new Float32Array(100), new Float32Array(100), 1, new Float32Array(100));
2223
+ }
2224
+ }
2009
2225
 
2010
- const Vector3_ZERO = new three.Vector3();
2226
+ const { floor } = Math;
2227
+ // Copyright (C) 2016 Keijiro Takahashi
2228
+ // https://mrl.cs.nyu.edu/~perlin/noise/
2229
+ class Perlin {
2230
+ static Noise(x, y, z) {
2231
+ let fade = Perlin._Fade;
2232
+ let grad = Perlin._Grad;
2233
+ let lerp = Perlin._Lerp;
2234
+ let p = Perlin._Permutation;
2235
+ if (y !== undefined && z !== undefined) {
2236
+ let xi = floor(x);
2237
+ let yi = floor(y);
2238
+ let zi = floor(z);
2239
+ let X = xi & 0xff; // FIND UNIT CUBE THAT
2240
+ let Y = yi & 0xff; // CONTAINS POINT.
2241
+ let Z = zi & 0xff;
2242
+ x -= xi; // FIND RELATIVE X,Y,Z
2243
+ y -= yi; // OF POINT IN CUBE.
2244
+ z -= zi;
2245
+ let u = fade(x); // COMPUTE FADE CURVES
2246
+ let v = fade(y); // FOR EACH OF X,Y,Z.
2247
+ let w = fade(z);
2248
+ let A = p[X] + Y, AA = p[A] + Z, AB = p[A + 1] + Z; // HASH COORDINATES OF
2249
+ let B = p[X + 1] + Y, BA = p[B] + Z, BB = p[B + 1] + Z; // THE 8 CUBE CORNERS,
2250
+ return lerp(w, lerp(v, lerp(u, grad(p[AA], x, y, z), grad(p[BA], x - 1, y, z)), lerp(u, grad(p[AB], x, y - 1, z), grad(p[BB], x - 1, y - 1, z))), lerp(v, lerp(u, grad(p[AA + 1], x, y, z - 1), grad(p[BA + 1], x - 1, y, z - 1)), lerp(u, grad(p[AB + 1], x, y - 1, z - 1), grad(p[BB + 1], x - 1, y - 1, z - 1))));
2251
+ } else if (y !== undefined) {
2252
+ let xi = floor(x);
2253
+ let yi = floor(y);
2254
+ let X = xi & 0xff;
2255
+ let Y = yi & 0xff;
2256
+ x -= xi;
2257
+ y -= yi;
2258
+ let u = fade(x);
2259
+ let v = fade(y);
2260
+ let A = p[X] + Y & 0xff;
2261
+ let B = p[X + 1] + Y & 0xff;
2262
+ return lerp(v, lerp(u, grad(p[A], x, y), grad(p[B], x - 1, y)), lerp(u, grad(p[A + 1], x, y - 1), grad(p[B + 1], x - 1, y - 1)));
2263
+ } else {
2264
+ let xi = floor(x);
2265
+ let X = xi & 0xff;
2266
+ x -= xi;
2267
+ let u = fade(x);
2268
+ return lerp(u, grad(p[X], x), grad(p[X + 1], x - 1));
2269
+ }
2270
+ }
2271
+ static Fbm(octave, x, y, z) {
2272
+ let f = 0;
2273
+ let w = 0.5;
2274
+ let noise = Perlin.Noise;
2275
+ if (y !== undefined && z !== undefined) {
2276
+ for(let i = 0; i < octave; i++){
2277
+ f += w * noise(x, y, z);
2278
+ x *= 2.0;
2279
+ y *= 2.0;
2280
+ z *= 2.0;
2281
+ w *= 0.5;
2282
+ }
2283
+ } else if (y !== undefined) {
2284
+ for(let i = 0; i < octave; i++){
2285
+ f += w * noise(x, y);
2286
+ x *= 2.0;
2287
+ y *= 2.0;
2288
+ w *= 0.5;
2289
+ }
2290
+ } else {
2291
+ for(let i = 0; i < octave; i++){
2292
+ f += w * noise(x);
2293
+ x *= 2.0;
2294
+ w *= 0.5;
2295
+ }
2296
+ }
2297
+ return f;
2298
+ }
2299
+ static _Fade(t) {
2300
+ return t * t * t * (t * (t * 6 - 15) + 10);
2301
+ }
2302
+ static _Lerp(t, a, b) {
2303
+ return a + t * (b - a);
2304
+ }
2305
+ static _Grad(hash, x, y, z) {
2306
+ if (y !== undefined && z !== undefined) {
2307
+ let h = hash & 15; // CONVERT LO 4 BITS OF HASH CODE
2308
+ let u = h < 8 ? x : y, v = h < 4 ? y : h == 12 || h == 14 ? x : z;
2309
+ return ((h & 1) == 0 ? u : -u) + ((h & 2) == 0 ? v : -v);
2310
+ } else if (y !== undefined) {
2311
+ return ((hash & 1) == 0 ? x : -x) + ((hash & 2) == 0 ? y : -y);
2312
+ } else {
2313
+ return (hash & 1) == 0 ? x : -x;
2314
+ }
2315
+ }
2316
+ }
2317
+ Perlin._Permutation = [
2318
+ 151,
2319
+ 160,
2320
+ 137,
2321
+ 91,
2322
+ 90,
2323
+ 15,
2324
+ 131,
2325
+ 13,
2326
+ 201,
2327
+ 95,
2328
+ 96,
2329
+ 53,
2330
+ 194,
2331
+ 233,
2332
+ 7,
2333
+ 225,
2334
+ 140,
2335
+ 36,
2336
+ 103,
2337
+ 30,
2338
+ 69,
2339
+ 142,
2340
+ 8,
2341
+ 99,
2342
+ 37,
2343
+ 240,
2344
+ 21,
2345
+ 10,
2346
+ 23,
2347
+ 190,
2348
+ 6,
2349
+ 148,
2350
+ 247,
2351
+ 120,
2352
+ 234,
2353
+ 75,
2354
+ 0,
2355
+ 26,
2356
+ 197,
2357
+ 62,
2358
+ 94,
2359
+ 252,
2360
+ 219,
2361
+ 203,
2362
+ 117,
2363
+ 35,
2364
+ 11,
2365
+ 32,
2366
+ 57,
2367
+ 177,
2368
+ 33,
2369
+ 88,
2370
+ 237,
2371
+ 149,
2372
+ 56,
2373
+ 87,
2374
+ 174,
2375
+ 20,
2376
+ 125,
2377
+ 136,
2378
+ 171,
2379
+ 168,
2380
+ 68,
2381
+ 175,
2382
+ 74,
2383
+ 165,
2384
+ 71,
2385
+ 134,
2386
+ 139,
2387
+ 48,
2388
+ 27,
2389
+ 166,
2390
+ 77,
2391
+ 146,
2392
+ 158,
2393
+ 231,
2394
+ 83,
2395
+ 111,
2396
+ 229,
2397
+ 122,
2398
+ 60,
2399
+ 211,
2400
+ 133,
2401
+ 230,
2402
+ 220,
2403
+ 105,
2404
+ 92,
2405
+ 41,
2406
+ 55,
2407
+ 46,
2408
+ 245,
2409
+ 40,
2410
+ 244,
2411
+ 102,
2412
+ 143,
2413
+ 54,
2414
+ 65,
2415
+ 25,
2416
+ 63,
2417
+ 161,
2418
+ 1,
2419
+ 216,
2420
+ 80,
2421
+ 73,
2422
+ 209,
2423
+ 76,
2424
+ 132,
2425
+ 187,
2426
+ 208,
2427
+ 89,
2428
+ 18,
2429
+ 169,
2430
+ 200,
2431
+ 196,
2432
+ 135,
2433
+ 130,
2434
+ 116,
2435
+ 188,
2436
+ 159,
2437
+ 86,
2438
+ 164,
2439
+ 100,
2440
+ 109,
2441
+ 198,
2442
+ 173,
2443
+ 186,
2444
+ 3,
2445
+ 64,
2446
+ 52,
2447
+ 217,
2448
+ 226,
2449
+ 250,
2450
+ 124,
2451
+ 123,
2452
+ 5,
2453
+ 202,
2454
+ 38,
2455
+ 147,
2456
+ 118,
2457
+ 126,
2458
+ 255,
2459
+ 82,
2460
+ 85,
2461
+ 212,
2462
+ 207,
2463
+ 206,
2464
+ 59,
2465
+ 227,
2466
+ 47,
2467
+ 16,
2468
+ 58,
2469
+ 17,
2470
+ 182,
2471
+ 189,
2472
+ 28,
2473
+ 42,
2474
+ 223,
2475
+ 183,
2476
+ 170,
2477
+ 213,
2478
+ 119,
2479
+ 248,
2480
+ 152,
2481
+ 2,
2482
+ 44,
2483
+ 154,
2484
+ 163,
2485
+ 70,
2486
+ 221,
2487
+ 153,
2488
+ 101,
2489
+ 155,
2490
+ 167,
2491
+ 43,
2492
+ 172,
2493
+ 9,
2494
+ 129,
2495
+ 22,
2496
+ 39,
2497
+ 253,
2498
+ 19,
2499
+ 98,
2500
+ 108,
2501
+ 110,
2502
+ 79,
2503
+ 113,
2504
+ 224,
2505
+ 232,
2506
+ 178,
2507
+ 185,
2508
+ 112,
2509
+ 104,
2510
+ 218,
2511
+ 246,
2512
+ 97,
2513
+ 228,
2514
+ 251,
2515
+ 34,
2516
+ 242,
2517
+ 193,
2518
+ 238,
2519
+ 210,
2520
+ 144,
2521
+ 12,
2522
+ 191,
2523
+ 179,
2524
+ 162,
2525
+ 241,
2526
+ 81,
2527
+ 51,
2528
+ 145,
2529
+ 235,
2530
+ 249,
2531
+ 14,
2532
+ 239,
2533
+ 107,
2534
+ 49,
2535
+ 192,
2536
+ 214,
2537
+ 31,
2538
+ 181,
2539
+ 199,
2540
+ 106,
2541
+ 157,
2542
+ 184,
2543
+ 84,
2544
+ 204,
2545
+ 176,
2546
+ 115,
2547
+ 121,
2548
+ 50,
2549
+ 45,
2550
+ 127,
2551
+ 4,
2552
+ 150,
2553
+ 254,
2554
+ 138,
2555
+ 236,
2556
+ 205,
2557
+ 93,
2558
+ 222,
2559
+ 114,
2560
+ 67,
2561
+ 29,
2562
+ 24,
2563
+ 72,
2564
+ 243,
2565
+ 141,
2566
+ 128,
2567
+ 195,
2568
+ 78,
2569
+ 66,
2570
+ 215,
2571
+ 61,
2572
+ 156,
2573
+ 180,
2574
+ 151
2575
+ ];
2011
2576
 
2012
2577
  const { clamp, degToRad } = three.MathUtils;
2013
2578
  const { abs, tan } = Math;
@@ -2932,7 +3497,7 @@ ResourceManager._texSettingKeys = [
2932
3497
  "minFilter",
2933
3498
  "format",
2934
3499
  "anisotropy",
2935
- "encoding",
3500
+ "colorSpace",
2936
3501
  "repeat"
2937
3502
  ];
2938
3503
 
@@ -3418,6 +3983,9 @@ class Viewer extends EventEmitter {
3418
3983
  this._camera = camera;
3419
3984
  return result;
3420
3985
  }
3986
+ blit(renderTarget, material, lod, face) {
3987
+ Viewer.Blit(this._renderer, renderTarget, material, lod, face);
3988
+ }
3421
3989
  compile(target) {
3422
3990
  if (Array.isArray(target)) {
3423
3991
  if (target.every((v)=>v.isMaterial)) {
@@ -3548,22 +4116,46 @@ class Plugin extends ObjectInstance {
3548
4116
  }
3549
4117
  }
3550
4118
 
4119
+ exports.AnimationCurve = AnimationCurve;
3551
4120
  exports.Box = Box;
3552
4121
  exports.CinestationBlendDefinition = CinestationBlendDefinition;
3553
4122
  exports.CinestationBrain = CinestationBrain;
3554
4123
  exports.Component = Component;
4124
+ exports.DeviceInput = DeviceInput;
4125
+ exports.Easing = Easing;
3555
4126
  exports.EventEmitter = EventEmitter;
4127
+ exports.FInterpConstantTo = FInterpConstantTo;
4128
+ exports.FInterpTo = FInterpTo;
3556
4129
  exports.FreelookVirtualCamera = FreelookVirtualCamera;
3557
4130
  exports.Logger = Logger;
3558
4131
  exports.ObjectInstance = ObjectInstance;
4132
+ exports.Perlin = Perlin;
3559
4133
  exports.Plane = Plane;
3560
4134
  exports.Plugin = Plugin;
3561
4135
  exports.PropertyManager = PropertyManager;
4136
+ exports.QInterpConstantTo = QInterpConstantTo;
4137
+ exports.QInterpTo = QInterpTo;
4138
+ exports.Quat_AngularDistance = Quat_AngularDistance;
4139
+ exports.Quat_Equals = Quat_Equals;
4140
+ exports.Quat_exponentialDamp = Quat_exponentialDamp;
4141
+ exports.Quat_quarticDamp = Quat_quarticDamp;
4142
+ exports.Quat_smoothDamp = Quat_smoothDamp;
3562
4143
  exports.Sphere = Sphere;
3563
4144
  exports.SystemInfo = SystemInfo;
3564
4145
  exports.Tween = Tween;
3565
4146
  exports.TweenChain = TweenChain;
3566
4147
  exports.TweenManager = TweenManager;
4148
+ exports.VInterpConstantTo = VInterpConstantTo;
4149
+ exports.VInterpTo = VInterpTo;
4150
+ exports.Vec3_smoothDamp = Vec3_smoothDamp;
4151
+ exports.Vector3_NEG_ONE = Vector3_NEG_ONE;
4152
+ exports.Vector3_ONE = Vector3_ONE;
4153
+ exports.Vector3_RIGHT = Vector3_RIGHT;
4154
+ exports.Vector3_UNIT_X = Vector3_UNIT_X;
4155
+ exports.Vector3_UNIT_Y = Vector3_UNIT_Y;
4156
+ exports.Vector3_UNIT_Z = Vector3_UNIT_Z;
4157
+ exports.Vector3_UP = Vector3_UP;
4158
+ exports.Vector3_ZERO = Vector3_ZERO;
3567
4159
  exports.Viewer = Viewer;
3568
4160
  exports.VirtualCamera = VirtualCamera;
3569
4161
  exports.aEXRLoader = aEXRLoader;
@@ -3572,7 +4164,10 @@ exports.aGLTFLoader = aGLTFLoader;
3572
4164
  exports.aHDRLoader = aHDRLoader;
3573
4165
  exports.aJSONLoader = aJSONLoader;
3574
4166
  exports.aTextureLoader = aTextureLoader;
4167
+ exports.exponentialDamp = exponentialDamp;
3575
4168
  exports.getClassInstance = getClassInstance;
3576
4169
  exports.mixin = mixin;
3577
4170
  exports.property = property;
4171
+ exports.quarticDamp = quarticDamp;
4172
+ exports.smoothDamp = smoothDamp;
3578
4173
  //# sourceMappingURL=main.js.map