@realsee/five 6.7.0-alpha.8 → 6.7.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/docs/assets/hierarchy.js +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/five.AdaptiveLuminancePass.html +22 -0
- package/docs/classes/five.AnimationFrameLoop.html +4 -4
- package/docs/classes/five.BoundingMesh.html +4 -0
- package/docs/classes/five.Camera.html +6 -5
- package/docs/classes/five.EffectComposer.html +21 -0
- package/docs/classes/five.EyeDomeLightingPass.html +21 -0
- package/docs/classes/five.Five.html +90 -76
- package/docs/classes/five.FivePass.html +18 -0
- package/docs/classes/five.FiveRenderer.html +9 -0
- package/docs/classes/five.FullScreenQuad.html +6 -0
- package/docs/classes/five.InternalWebGLRenderer.html +1 -1
- package/docs/classes/five.Model.html +32 -31
- package/docs/classes/five.ModelScene.html +23 -20
- package/docs/classes/five.NetworkSubscribe.html +1 -1
- package/docs/classes/five.PBMContainer.html +1 -1
- package/docs/classes/five.PBMGroup.html +1 -1
- package/docs/classes/five.PBMMesh.html +1 -1
- package/docs/classes/five.PBMMeshMaterial.html +6 -7
- package/docs/classes/five.PBMPointCloud.html +1 -1
- package/docs/classes/five.PBMPointCloudMaterial.html +5 -6
- package/docs/classes/five.PBMSkinnedMesh.html +1 -1
- package/docs/classes/five.PanoCircleMesh.html +3 -3
- package/docs/classes/five.PanoCircleMeshCustom.html +4 -4
- package/docs/classes/five.PanoCircleMeshSolid.html +5 -5
- package/docs/classes/five.Parameter.html +44 -47
- package/docs/classes/five.Scene.html +1 -1
- package/docs/classes/five.Subscribe.html +1 -1
- package/docs/classes/five.TextureLoader.html +2 -2
- package/docs/classes/five.Tile3D.html +21 -21
- package/docs/classes/five.TileNode.html +4 -3
- package/docs/classes/five.Tileset.html +4 -4
- package/docs/classes/five.TrajectoryNode.html +1 -1
- package/docs/classes/five.Work.html +16 -16
- package/docs/classes/five.WorkResolvedObserver.html +20 -21
- package/docs/classes/gltf-loader.DDSLoader.html +1 -1
- package/docs/classes/gltf-loader.DRACOLoader.html +1 -1
- package/docs/classes/gltf-loader.GLTFLoader.html +1 -1
- package/docs/classes/gltf-loader.GLTFObject.html +1 -1
- package/docs/classes/gltf-loader.THREEGLTFLoader.html +1 -1
- package/docs/classes/line.Line.html +1 -1
- package/docs/classes/line.LineGeometry.html +1 -1
- package/docs/classes/line.LineMaterial.html +1 -1
- package/docs/classes/line.LineSegmentsGeometry.html +1 -1
- package/docs/classes/line.THREE_Line2.html +1 -1
- package/docs/classes/line.THREE_LineSegments2.html +1 -1
- package/docs/classes/plugins.BasePlugin.Controller.html +1 -1
- package/docs/classes/plugins.RoundedBoxGeometry.html +1 -1
- package/docs/classes/sticker.Sticker.html +1 -1
- package/docs/classes/vfx.Airflow.html +1 -1
- package/docs/classes/vfx.Flame.html +1 -1
- package/docs/classes/vfx.Particle.html +1 -1
- package/docs/classes/vfx.ParticleGPU.html +1 -1
- package/docs/classes/vfx.SpotLight.html +1 -1
- package/docs/functions/five.loadAt3d.html +1 -1
- package/docs/functions/five.parseWork.html +1 -1
- package/docs/functions/five.workToJson.html +1 -1
- package/docs/functions/plugins.DynamicPathLinePlugin.html +1 -0
- package/docs/functions/react.withFive.html +1 -1
- package/docs/functions/vue.useFiveWorks.html +2 -2
- package/docs/hierarchy.html +1 -1
- package/docs/interfaces/five.AddableObject.html +1 -1
- package/docs/interfaces/five.AjaxOptions.html +1 -1
- package/docs/interfaces/five.AnimationFrame.html +3 -2
- package/docs/interfaces/five.AnimationFrameContext.html +2 -2
- package/docs/interfaces/five.BaseEvent.html +1 -1
- package/docs/interfaces/five.EventCallback.html +1 -1
- package/docs/interfaces/five.FiveInitArgs.html +3 -3
- package/docs/interfaces/five.FiveLoadOptions.html +8 -10
- package/docs/interfaces/five.GestureEvent.html +1 -1
- package/docs/interfaces/five.ImageOptions.html +1 -1
- package/docs/interfaces/five.IntersectEvent.html +1 -1
- package/docs/interfaces/five.IntersectMesh.html +2 -2
- package/docs/interfaces/five.IntersectMeshInterface.html +1 -1
- package/docs/interfaces/five.Intersection.html +1 -1
- package/docs/interfaces/five.LoosePanoWork.html +2 -2
- package/docs/interfaces/five.LooseWork.html +2 -2
- package/docs/interfaces/five.LooseWorkInitial.html +2 -2
- package/docs/interfaces/five.LooseWorkModel.html +3 -2
- package/docs/interfaces/five.LooseWorkObserver.html +3 -2
- package/docs/interfaces/five.LooseWorkPanorama.html +8 -8
- package/docs/interfaces/five.LooseWorkVideo.html +2 -2
- package/docs/interfaces/five.LooseWorkWithExtrinsics.html +7 -7
- package/docs/interfaces/five.ModeChangeEvent.html +2 -2
- package/docs/interfaces/five.ModelControllerCustomInitArgs.html +5 -3
- package/docs/interfaces/five.ModelEvent.html +2 -2
- package/docs/interfaces/five.ModelOptions.html +11 -0
- package/docs/interfaces/five.ModelSceneEvent.html +2 -2
- package/docs/interfaces/five.MovePanoOptions.html +1 -1
- package/docs/interfaces/five.NetworkAbortError.html +1 -1
- package/docs/interfaces/five.NetworkFirbiddenError.html +1 -1
- package/docs/interfaces/five.NetworkOptions.html +1 -1
- package/docs/interfaces/five.NetworkProxyError.html +1 -1
- package/docs/interfaces/five.NetworkResourceEvent.html +2 -2
- package/docs/interfaces/five.NetworkResponseError.html +1 -1
- package/docs/interfaces/five.NetworkTimeoutError.html +1 -1
- package/docs/interfaces/five.ObjectEvent.html +2 -2
- package/docs/interfaces/five.PBMMaterial.html +1 -1
- package/docs/interfaces/five.PBMMeshMaterialParameters.html +2 -3
- package/docs/interfaces/five.PBMPointCloudMaterialParameters.html +2 -3
- package/docs/interfaces/five.PanoCircleMeshInterface.html +1 -1
- package/docs/interfaces/five.PanoCircleMeshSolidOptions.html +2 -2
- package/docs/interfaces/five.PanoEvent.html +1 -1
- package/docs/interfaces/five.PanoTextureEvent.html +1 -1
- package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +12 -10
- package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +5 -3
- package/docs/interfaces/five.ParameterMaterialValue.html +29 -31
- package/docs/interfaces/five.ParameterTilesetValue.html +15 -16
- package/docs/interfaces/five.ParameterValue.html +43 -46
- package/docs/interfaces/five.Pass.html +9 -0
- package/docs/interfaces/five.Pose.html +1 -1
- package/docs/interfaces/five.RenderEvent.html +2 -2
- package/docs/interfaces/five.ResolvedParameterValue.html +43 -46
- package/docs/interfaces/five.State.html +1 -1
- package/docs/interfaces/five.StateEvent.html +1 -1
- package/docs/interfaces/five.TextureOptions.html +1 -1
- package/docs/interfaces/five.TilesetOptions.html +2 -2
- package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +7 -3
- package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +12 -10
- package/docs/interfaces/five.ViewLayer.html +21 -21
- package/docs/interfaces/five.WorkCubeImage.html +2 -2
- package/docs/interfaces/five.WorkImage.html +5 -3
- package/docs/interfaces/five.WorkInitial.html +8 -8
- package/docs/interfaces/five.WorkModel.html +9 -7
- package/docs/interfaces/five.WorkModelJson.html +3 -2
- package/docs/interfaces/five.WorkModelLayer.html +7 -2
- package/docs/interfaces/five.WorkModelLayerJson.html +2 -2
- package/docs/interfaces/five.WorkObserver.html +21 -22
- package/docs/interfaces/five.WorkObserverJson.html +4 -2
- package/docs/interfaces/five.WorkPanoramaJson.html +2 -2
- package/docs/interfaces/five.WorkPanoramasJson.html +2 -2
- package/docs/interfaces/five.WorkTile.html +4 -4
- package/docs/interfaces/five.WorkVideo.html +4 -4
- package/docs/interfaces/five.WorksEvent.html +2 -3
- package/docs/interfaces/five.XRControllerEvent.html +1 -1
- package/docs/interfaces/five.XRGestureEvent.html +1 -1
- package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +12 -10
- package/docs/interfaces/five.XRSessionEvent.html +1 -1
- package/docs/interfaces/plugins.BackgroundPluginController.html +1 -1
- package/docs/interfaces/plugins.BackgroundPluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.BasePlugin.State.html +1 -1
- package/docs/interfaces/plugins.DynamicPathLinePluginController.html +83 -0
- package/docs/interfaces/plugins.DynamicPathLinePluginType.Config.html +36 -0
- package/docs/interfaces/plugins.DynamicPathLinePluginType.EventMap.html +26 -0
- package/docs/interfaces/plugins.DynamicPathLinePluginType.Params.html +6 -0
- package/docs/interfaces/plugins.DynamicPathLinePluginType.PathConfig.html +28 -0
- package/docs/interfaces/plugins.DynamicPathLinePluginType.State.html +10 -0
- package/docs/interfaces/plugins.ItemMaskController.html +1 -1
- package/docs/interfaces/plugins.ItemMaskPluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.ItemMaskPluginType.State.html +1 -1
- package/docs/interfaces/plugins.OrientationPluginController.html +1 -1
- package/docs/interfaces/plugins.OrientationPluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.OrientationPluginType.State.html +1 -1
- package/docs/interfaces/plugins.PanoAnimeController.html +1 -1
- package/docs/interfaces/plugins.PanoAnimePluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.PanoAnimePluginType.State.html +1 -1
- package/docs/interfaces/plugins.PluginTemplateType.EventMap.html +1 -1
- package/docs/interfaces/plugins.PluginTemplateType.State.html +1 -1
- package/docs/interfaces/plugins.TrajectoryController.html +1 -1
- package/docs/interfaces/react.FiveInjectionTypes.html +4 -4
- package/docs/modules/five.html +1 -1
- package/docs/modules/plugins.DynamicPathLinePluginType.html +1 -0
- package/docs/modules/plugins.html +1 -1
- package/docs/types/five.AnimationFrameLoopType.html +1 -1
- package/docs/types/five.Models.html +4 -4
- package/docs/types/five.ParseOptions.html +6 -6
- package/docs/types/five.PostProcessingType.html +1 -1
- package/docs/types/five.RequestAnimationFrameArgs.html +1 -0
- package/docs/types/five.TilesetFrameState.html +2 -3
- package/docs/types/plugins.BasePlugin.EventMap.html +1 -1
- package/docs/types/plugins.DynamicPathLinePluginType.PluginData.html +3 -0
- package/docs/types/plugins.DynamicPathLinePluginType.ServerData.html +3 -0
- package/docs/types/vue.FiveProviderComponent.html +1 -1
- package/five/index.d.ts +311 -85
- package/five/index.js +299 -198
- package/five/index.mjs +6822 -6456
- package/gltf-loader/index.js +3 -3
- package/gltf-loader/index.mjs +146 -146
- package/line/index.js +3 -3
- package/line/index.mjs +10 -10
- package/package.json +1 -1
- package/plugins/index.d.ts +314 -0
- package/plugins/index.js +296 -15
- package/plugins/index.mjs +2615 -1503
- package/react/index.d.ts +1 -1
- package/react/index.js +2 -2
- package/react/index.mjs +2 -2
- package/shader-lib/index.d.ts +24 -1
- package/shader-lib/index.js +22 -13
- package/shader-lib/index.mjs +408 -171
- package/sticker/index.js +3 -3
- package/sticker/index.mjs +7 -7
- package/umd/five-gltf-loader.js +3 -3
- package/umd/five-line.js +3 -3
- package/umd/five-plugins.js +296 -15
- package/umd/five-react.js +2 -2
- package/umd/five-shader-lib.js +22 -13
- package/umd/five-sticker.js +3 -3
- package/umd/five-vfx.js +2 -2
- package/umd/five-vue.js +2 -2
- package/umd/five.js +299 -198
- package/vfx/index.js +2 -2
- package/vfx/index.mjs +2 -2
- package/vue/index.d.ts +1 -1
- package/vue/index.js +2 -2
- package/vue/index.mjs +2 -2
- package/work-downloader/index.js +3 -3
- package/work-downloader/index.mjs +13 -11
- package/docs/interfaces/five.ModelLike.html +0 -3
- package/docs/types/five.Tile3dOptions.html +0 -1
package/gltf-loader/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five
|
|
4
|
-
* Generated:
|
|
5
|
-
* Version: 6.7.0
|
|
4
|
+
* Generated: 12/29/2025
|
|
5
|
+
* Version: 6.7.0
|
|
6
6
|
* Terms:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
* Update: July 28, 2021
|
|
@@ -253,7 +253,7 @@
|
|
|
253
253
|
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
254
254
|
* Agreement and all related documents shall be drafted in English.
|
|
255
255
|
*/import * as De from "three";
|
|
256
|
-
import { Loader as Ee, LoaderUtils as pe, FileLoader as _e, Color as re, SpotLight as or, PointLight as ir, DirectionalLight as ur, MeshBasicMaterial as he, MeshPhysicalMaterial as ke, Vector2 as Be, MeshStandardMaterial as ve, TangentSpaceNormalMap as
|
|
256
|
+
import { Loader as Ee, LoaderUtils as pe, FileLoader as _e, Color as re, SpotLight as or, PointLight as ir, DirectionalLight as ur, MeshBasicMaterial as he, MeshPhysicalMaterial as ke, Vector2 as Be, MeshStandardMaterial as ve, TangentSpaceNormalMap as fr, Interpolant as Ke, MeshPhongMaterial as lr, TextureLoader as cr, InterleavedBuffer as dr, InterleavedBufferAttribute as pr, BufferAttribute as Re, RGBFormat as je, RGBAFormat as Ze, LinearMipmapLinearFilter as Ve, NearestMipmapLinearFilter as hr, LinearMipmapNearestFilter as vr, NearestMipmapNearestFilter as Tr, LinearFilter as Xe, NearestFilter as gr, RepeatWrapping as Fe, MirroredRepeatWrapping as mr, ClampToEdgeWrapping as Ar, PointsMaterial as Sr, Material as ze, LineBasicMaterial as yr, DoubleSide as Er, sRGBEncoding as We, BufferGeometry as $e, SkinnedMesh as _r, Mesh as Rr, LineSegments as Lr, Line as Mr, LineLoop as wr, Points as Ir, Group as Ue, PerspectiveCamera as br, MathUtils as xr, OrthographicCamera as Cr, InterpolateDiscrete as Or, InterpolateLinear as Ye, AnimationClip as Pr, Bone as Dr, Object3D as Fr, PropertyBinding as Ur, Matrix4 as qe, FrontSide as Gr, TriangleFanDrawMode as Je, Skeleton as Hr, Box3 as Nr, Vector3 as ye, Sphere as kr, TriangleStripDrawMode as Br, VectorKeyframeTrack as Kr, QuaternionKeyframeTrack as jr, NumberKeyframeTrack as Vr, CompressedTextureLoader as er, RGB_ETC1_Format as Xr, RGBA_S3TC_DXT5_Format as zr, RGBA_S3TC_DXT3_Format as Wr, RGB_S3TC_DXT1_Format as Yr } from "three";
|
|
257
257
|
var Ge = function(p, T) {
|
|
258
258
|
return Ge = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(u, m) {
|
|
259
259
|
u.__proto__ = m;
|
|
@@ -279,16 +279,16 @@ var qr = (function() {
|
|
|
279
279
|
load: function(e, r, t, n) {
|
|
280
280
|
var a = this, i;
|
|
281
281
|
this.resourcePath !== "" ? i = this.resourcePath : this.path !== "" ? i = this.path : i = pe.extractUrlBase(e), a.manager.itemStart(e);
|
|
282
|
-
var s = function(
|
|
283
|
-
n ? n(
|
|
282
|
+
var s = function(f) {
|
|
283
|
+
n ? n(f) : console.error(f), a.manager.itemError(e), a.manager.itemEnd(e);
|
|
284
284
|
}, o = new _e(a.manager);
|
|
285
|
-
o.setPath(this.path), o.setResponseType("arraybuffer"), o.setRequestHeader(this.requestHeader), a.crossOrigin === "use-credentials" && o.setWithCredentials(!0), o.load(e, function(
|
|
285
|
+
o.setPath(this.path), o.setResponseType("arraybuffer"), o.setRequestHeader(this.requestHeader), a.crossOrigin === "use-credentials" && o.setWithCredentials(!0), o.load(e, function(f) {
|
|
286
286
|
try {
|
|
287
|
-
a.parse(
|
|
288
|
-
r(
|
|
287
|
+
a.parse(f, i, function(l) {
|
|
288
|
+
r(l), a.manager.itemEnd(e);
|
|
289
289
|
}, s);
|
|
290
|
-
} catch (
|
|
291
|
-
s(
|
|
290
|
+
} catch (l) {
|
|
291
|
+
s(l);
|
|
292
292
|
}
|
|
293
293
|
}, t, s);
|
|
294
294
|
},
|
|
@@ -321,41 +321,41 @@ var qr = (function() {
|
|
|
321
321
|
return;
|
|
322
322
|
}
|
|
323
323
|
if (o.extensionsUsed)
|
|
324
|
-
for (var
|
|
325
|
-
var
|
|
326
|
-
switch (
|
|
324
|
+
for (var f = 0; f < o.extensionsUsed.length; ++f) {
|
|
325
|
+
var l = o.extensionsUsed[f], h = o.extensionsRequired || [];
|
|
326
|
+
switch (l) {
|
|
327
327
|
case u.KHR_LIGHTS_PUNCTUAL:
|
|
328
|
-
i[
|
|
328
|
+
i[l] = new v(o);
|
|
329
329
|
break;
|
|
330
330
|
case u.KHR_MATERIALS_CLEARCOAT:
|
|
331
|
-
i[
|
|
331
|
+
i[l] = new _();
|
|
332
332
|
break;
|
|
333
333
|
case u.KHR_MATERIALS_TRANSMISSION:
|
|
334
|
-
i[
|
|
334
|
+
i[l] = new x();
|
|
335
335
|
break;
|
|
336
336
|
case u.KHR_MATERIALS_UNLIT:
|
|
337
|
-
i[
|
|
337
|
+
i[l] = new g();
|
|
338
338
|
break;
|
|
339
339
|
case u.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:
|
|
340
|
-
i[
|
|
340
|
+
i[l] = new K();
|
|
341
341
|
break;
|
|
342
342
|
case u.KHR_DRACO_MESH_COMPRESSION:
|
|
343
|
-
i[
|
|
343
|
+
i[l] = new b(o, this.dracoLoader);
|
|
344
344
|
break;
|
|
345
345
|
case u.MSFT_TEXTURE_DDS:
|
|
346
|
-
i[
|
|
346
|
+
i[l] = new m(this.ddsLoader);
|
|
347
347
|
break;
|
|
348
348
|
case u.KHR_TEXTURE_TRANSFORM:
|
|
349
|
-
i[
|
|
349
|
+
i[l] = new M();
|
|
350
350
|
break;
|
|
351
351
|
case u.KHR_MESH_QUANTIZATION:
|
|
352
|
-
i[
|
|
352
|
+
i[l] = new ne();
|
|
353
353
|
break;
|
|
354
354
|
case u.REALSEE_MATERIALS_LIGHTMAP:
|
|
355
|
-
i[
|
|
355
|
+
i[l] = new J();
|
|
356
356
|
break;
|
|
357
357
|
default:
|
|
358
|
-
h.indexOf(
|
|
358
|
+
h.indexOf(l) >= 0 && console.warn('THREE.GLTFLoader: Unknown extension "' + l + '".');
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
361
|
var c = new C(o, i, {
|
|
@@ -499,16 +499,16 @@ var qr = (function() {
|
|
|
499
499
|
this.name = u.KHR_DRACO_MESH_COMPRESSION, this.json = e, this.dracoLoader = r, this.dracoLoader.preload();
|
|
500
500
|
}
|
|
501
501
|
b.prototype.decodePrimitive = function(e, r) {
|
|
502
|
-
var t = this.json, n = this.dracoLoader, a = e.extensions[this.name].bufferView, i = e.extensions[this.name].attributes, s = {}, o = {},
|
|
503
|
-
for (var
|
|
504
|
-
var h =
|
|
505
|
-
s[h] = i[
|
|
502
|
+
var t = this.json, n = this.dracoLoader, a = e.extensions[this.name].bufferView, i = e.extensions[this.name].attributes, s = {}, o = {}, f = {};
|
|
503
|
+
for (var l in i) {
|
|
504
|
+
var h = fe[l] || l.toLowerCase();
|
|
505
|
+
s[h] = i[l];
|
|
506
506
|
}
|
|
507
|
-
for (
|
|
508
|
-
var h =
|
|
509
|
-
if (i[
|
|
510
|
-
var c = t.accessors[e.attributes[
|
|
511
|
-
|
|
507
|
+
for (l in e.attributes) {
|
|
508
|
+
var h = fe[l] || l.toLowerCase();
|
|
509
|
+
if (i[l] !== void 0) {
|
|
510
|
+
var c = t.accessors[e.attributes[l]], d = Q[c.componentType];
|
|
511
|
+
f[h] = d, o[h] = c.normalized === !0;
|
|
512
512
|
}
|
|
513
513
|
}
|
|
514
514
|
return r.getDependency("bufferView", a).then(function(A) {
|
|
@@ -519,7 +519,7 @@ var qr = (function() {
|
|
|
519
519
|
O !== void 0 && (L.normalized = O);
|
|
520
520
|
}
|
|
521
521
|
E(y);
|
|
522
|
-
}, s,
|
|
522
|
+
}, s, f);
|
|
523
523
|
});
|
|
524
524
|
});
|
|
525
525
|
};
|
|
@@ -575,8 +575,8 @@ var qr = (function() {
|
|
|
575
575
|
glossinessMap: { value: null }
|
|
576
576
|
};
|
|
577
577
|
this._extraUniforms = s, this.onBeforeCompile = function(o) {
|
|
578
|
-
for (var
|
|
579
|
-
o.uniforms[
|
|
578
|
+
for (var f in s)
|
|
579
|
+
o.uniforms[f] = s[f];
|
|
580
580
|
o.fragmentShader = o.fragmentShader.replace("uniform float roughness;", "uniform vec3 specular;"), o.fragmentShader = o.fragmentShader.replace("uniform float metalness;", "uniform float glossiness;"), o.fragmentShader = o.fragmentShader.replace("#include <roughnessmap_pars_fragment>", r), o.fragmentShader = o.fragmentShader.replace("#include <metalnessmap_pars_fragment>", t), o.fragmentShader = o.fragmentShader.replace("#include <roughnessmap_fragment>", n), o.fragmentShader = o.fragmentShader.replace("#include <metalnessmap_fragment>", a), o.fragmentShader = o.fragmentShader.replace("#include <lights_physical_fragment>", i);
|
|
581
581
|
}, Object.defineProperties(
|
|
582
582
|
this,
|
|
@@ -667,7 +667,7 @@ var qr = (function() {
|
|
|
667
667
|
},
|
|
668
668
|
createMaterial: function(e) {
|
|
669
669
|
var r = new w(e);
|
|
670
|
-
return r.fog = !0, r.color = e.color, r.map = e.map === void 0 ? null : e.map, r.lightMap = null, r.lightMapIntensity = 1, r.aoMap = e.aoMap === void 0 ? null : e.aoMap, r.aoMapIntensity = 1, r.emissive = e.emissive, r.emissiveIntensity = 1, r.emissiveMap = e.emissiveMap === void 0 ? null : e.emissiveMap, r.bumpMap = e.bumpMap === void 0 ? null : e.bumpMap, r.bumpScale = 1, r.normalMap = e.normalMap === void 0 ? null : e.normalMap, r.normalMapType =
|
|
670
|
+
return r.fog = !0, r.color = e.color, r.map = e.map === void 0 ? null : e.map, r.lightMap = null, r.lightMapIntensity = 1, r.aoMap = e.aoMap === void 0 ? null : e.aoMap, r.aoMapIntensity = 1, r.emissive = e.emissive, r.emissiveIntensity = 1, r.emissiveMap = e.emissiveMap === void 0 ? null : e.emissiveMap, r.bumpMap = e.bumpMap === void 0 ? null : e.bumpMap, r.bumpScale = 1, r.normalMap = e.normalMap === void 0 ? null : e.normalMap, r.normalMapType = fr, e.normalScale && (r.normalScale = e.normalScale), r.displacementMap = null, r.displacementScale = 1, r.displacementBias = 0, r.specularMap = e.specularMap === void 0 ? null : e.specularMap, r.specular = e.specular, r.glossinessMap = e.glossinessMap === void 0 ? null : e.glossinessMap, r.glossiness = e.glossiness, r.alphaMap = null, r.envMap = e.envMap === void 0 ? null : e.envMap, r.envMapIntensity = 1, r.refractionRatio = 0.98, r;
|
|
671
671
|
}
|
|
672
672
|
};
|
|
673
673
|
}
|
|
@@ -682,8 +682,8 @@ var qr = (function() {
|
|
|
682
682
|
r[i] = t[a + i];
|
|
683
683
|
return r;
|
|
684
684
|
}, D.prototype.beforeStart_ = D.prototype.copySampleValue_, D.prototype.afterEnd_ = D.prototype.copySampleValue_, D.prototype.interpolate_ = function(e, r, t, n) {
|
|
685
|
-
for (var a = this.resultBuffer, i = this.sampleValues, s = this.valueSize, o = s * 2,
|
|
686
|
-
var te = i[E + G + s], ae = i[E + G + o] *
|
|
685
|
+
for (var a = this.resultBuffer, i = this.sampleValues, s = this.valueSize, o = s * 2, f = s * 3, l = n - r, h = (t - r) / l, c = h * h, d = c * h, A = e * f, E = A - f, y = -2 * d + 3 * c, S = d - c, L = 1 - y, O = S - c + h, G = 0; G !== s; G++) {
|
|
686
|
+
var te = i[E + G + s], ae = i[E + G + o] * l, $ = i[A + G + s], B = i[A + G] * l;
|
|
687
687
|
a[G] = L * te + O * ae + y * $ + S * B;
|
|
688
688
|
}
|
|
689
689
|
return a;
|
|
@@ -692,7 +692,7 @@ var qr = (function() {
|
|
|
692
692
|
this.parser = e, this.name = u.REALSEE_MATERIALS_LIGHTMAP;
|
|
693
693
|
}
|
|
694
694
|
J.prototype.getMaterialType = function(e) {
|
|
695
|
-
return
|
|
695
|
+
return lr;
|
|
696
696
|
}, J.prototype.extendParams = function(e, r, t) {
|
|
697
697
|
if (!r.extensions || !r.extensions[this.name])
|
|
698
698
|
return Promise.resolve();
|
|
@@ -733,7 +733,7 @@ var qr = (function() {
|
|
|
733
733
|
MAT2: 4,
|
|
734
734
|
MAT3: 9,
|
|
735
735
|
MAT4: 16
|
|
736
|
-
},
|
|
736
|
+
}, fe = {
|
|
737
737
|
POSITION: "position",
|
|
738
738
|
NORMAL: "normal",
|
|
739
739
|
TANGENT: "tangent",
|
|
@@ -753,7 +753,7 @@ var qr = (function() {
|
|
|
753
753
|
// keyframe track will be initialized with a default interpolation type, then modified.
|
|
754
754
|
LINEAR: Ye,
|
|
755
755
|
STEP: Or
|
|
756
|
-
},
|
|
756
|
+
}, le = {
|
|
757
757
|
OPAQUE: "OPAQUE",
|
|
758
758
|
MASK: "MASK",
|
|
759
759
|
BLEND: "BLEND"
|
|
@@ -788,20 +788,20 @@ var qr = (function() {
|
|
|
788
788
|
if (o.POSITION !== void 0 && (n = !0), o.NORMAL !== void 0 && (a = !0), n && a) break;
|
|
789
789
|
}
|
|
790
790
|
if (!n && !a) return Promise.resolve(e);
|
|
791
|
-
for (var
|
|
791
|
+
for (var f = [], l = [], i = 0, s = r.length; i < s; i++) {
|
|
792
792
|
var o = r[i];
|
|
793
793
|
if (n) {
|
|
794
794
|
var h = o.POSITION !== void 0 ? t.getDependency("accessor", o.POSITION) : e.attributes.position;
|
|
795
|
-
|
|
795
|
+
f.push(h);
|
|
796
796
|
}
|
|
797
797
|
if (a) {
|
|
798
798
|
var h = o.NORMAL !== void 0 ? t.getDependency("accessor", o.NORMAL) : e.attributes.normal;
|
|
799
|
-
|
|
799
|
+
l.push(h);
|
|
800
800
|
}
|
|
801
801
|
}
|
|
802
802
|
return Promise.all([
|
|
803
|
-
Promise.all(
|
|
804
|
-
Promise.all(
|
|
803
|
+
Promise.all(f),
|
|
804
|
+
Promise.all(l)
|
|
805
805
|
]).then(function(c) {
|
|
806
806
|
var d = c[0], A = c[1];
|
|
807
807
|
return n && (e.morphAttributes.position = d), a && (e.morphAttributes.normal = A), e.morphTargetsRelative = !0, e;
|
|
@@ -853,8 +853,8 @@ var qr = (function() {
|
|
|
853
853
|
}).catch(r);
|
|
854
854
|
}, C.prototype.markDefs = function() {
|
|
855
855
|
for (var e = this.json.nodes || [], r = this.json.skins || [], t = this.json.meshes || [], n = {}, a = {}, i = 0, s = r.length; i < s; i++)
|
|
856
|
-
for (var o = r[i].joints,
|
|
857
|
-
e[o[
|
|
856
|
+
for (var o = r[i].joints, f = 0, l = o.length; f < l; f++)
|
|
857
|
+
e[o[f]].isBone = !0;
|
|
858
858
|
for (var h = 0, c = e.length; h < c; h++) {
|
|
859
859
|
var d = e[h];
|
|
860
860
|
d.mesh !== void 0 && (n[d.mesh] === void 0 && (n[d.mesh] = a[d.mesh] = 0), n[d.mesh]++, d.skin !== void 0 && (t[d.mesh].isSkinnedMesh = !0));
|
|
@@ -939,14 +939,14 @@ var qr = (function() {
|
|
|
939
939
|
return Promise.resolve(null);
|
|
940
940
|
var a = [];
|
|
941
941
|
return n.bufferView !== void 0 ? a.push(this.getDependency("bufferView", n.bufferView)) : a.push(null), n.sparse !== void 0 && (a.push(this.getDependency("bufferView", n.sparse.indices.bufferView)), a.push(this.getDependency("bufferView", n.sparse.values.bufferView))), Promise.all(a).then(function(i) {
|
|
942
|
-
var s = i[0], o = z[n.type],
|
|
942
|
+
var s = i[0], o = z[n.type], f = Q[n.componentType], l = f.BYTES_PER_ELEMENT, h = l * o, c = n.byteOffset || 0, d = n.bufferView !== void 0 ? t.bufferViews[n.bufferView].byteStride : void 0, A = n.normalized === !0, E, y;
|
|
943
943
|
if (d && d !== h) {
|
|
944
944
|
var S = Math.floor(c / d), L = "InterleavedBuffer:" + n.bufferView + ":" + n.componentType + ":" + S + ":" + n.count, O = r.cache.get(L);
|
|
945
|
-
O || (E = new
|
|
945
|
+
O || (E = new f(s, S * d, n.count * d / l), O = new dr(E, d / l), r.cache.add(L, O)), y = new pr(O, o, c % d / l, A);
|
|
946
946
|
} else
|
|
947
|
-
s === null ? E = new
|
|
947
|
+
s === null ? E = new f(n.count * o) : E = new f(s, c, n.count * o), y = new Re(E, o, A);
|
|
948
948
|
if (n.sparse !== void 0) {
|
|
949
|
-
var G = z.SCALAR, te = Q[n.sparse.indices.componentType], ae = n.sparse.indices.byteOffset || 0, $ = n.sparse.values.byteOffset || 0, B = new te(i[1], ae, n.sparse.count * G), ue = new
|
|
949
|
+
var G = z.SCALAR, te = Q[n.sparse.indices.componentType], ae = n.sparse.indices.byteOffset || 0, $ = n.sparse.values.byteOffset || 0, B = new te(i[1], ae, n.sparse.count * G), ue = new f(i[2], $, n.sparse.count * o);
|
|
950
950
|
s !== null && (y = new Re(y.array.slice(), y.itemSize, y.normalized));
|
|
951
951
|
for (var H = 0, be = B.length; H < be; H++) {
|
|
952
952
|
var se = B[H];
|
|
@@ -956,20 +956,20 @@ var qr = (function() {
|
|
|
956
956
|
return y;
|
|
957
957
|
});
|
|
958
958
|
}, C.prototype.loadTexture = function(e) {
|
|
959
|
-
var r = this, t = this.json, n = this.options, a = this.textureLoader, i = self.URL || self.webkitURL, s = t.textures[e], o = s.extensions || {},
|
|
960
|
-
o[u.MSFT_TEXTURE_DDS] ?
|
|
961
|
-
var
|
|
962
|
-
return
|
|
959
|
+
var r = this, t = this.json, n = this.options, a = this.textureLoader, i = self.URL || self.webkitURL, s = t.textures[e], o = s.extensions || {}, f;
|
|
960
|
+
o[u.MSFT_TEXTURE_DDS] ? f = t.images[o[u.MSFT_TEXTURE_DDS].source] : f = t.images[s.source];
|
|
961
|
+
var l = f.uri, h = !1;
|
|
962
|
+
return f.bufferView !== void 0 && (l = r.getDependency("bufferView", f.bufferView).then(function(c) {
|
|
963
963
|
h = !0;
|
|
964
|
-
var d = new Blob([c], { type:
|
|
965
|
-
return
|
|
966
|
-
})), Promise.resolve(
|
|
964
|
+
var d = new Blob([c], { type: f.mimeType });
|
|
965
|
+
return l = i.createObjectURL(d), l;
|
|
966
|
+
})), Promise.resolve(l).then(function(c) {
|
|
967
967
|
var d = n.manager.getHandler(c);
|
|
968
968
|
return d || (d = o[u.MSFT_TEXTURE_DDS] ? r.extensions[u.MSFT_TEXTURE_DDS].ddsLoader : a), new Promise(function(A, E) {
|
|
969
969
|
d.load(ge(c, n.path), A, void 0, E);
|
|
970
970
|
});
|
|
971
971
|
}).then(function(c) {
|
|
972
|
-
h === !0 && i.revokeObjectURL(
|
|
972
|
+
h === !0 && i.revokeObjectURL(l), c.flipY = !1, s.name && (c.name = s.name), f.mimeType in Te && (c.format = Te[f.mimeType]);
|
|
973
973
|
var d = t.samplers || {}, A = d[s.sampler] || {};
|
|
974
974
|
return c.magFilter = Z[A.magFilter] || Xe, c.minFilter = Z[A.minFilter] || Ve, c.wrapS = X[A.wrapS] || Fe, c.wrapT = X[A.wrapT] || Fe, r.associations.set(c, {
|
|
975
975
|
type: "textures",
|
|
@@ -999,29 +999,29 @@ var qr = (function() {
|
|
|
999
999
|
e[r] = a;
|
|
1000
1000
|
});
|
|
1001
1001
|
}, C.prototype.assignFinalMaterial = function(e) {
|
|
1002
|
-
var r = e.geometry, t = e.material, n = r.attributes.tangent !== void 0, a = r.attributes.color !== void 0, i = r.attributes.normal === void 0, s = e.isSkinnedMesh === !0, o = Object.keys(r.morphAttributes).length > 0,
|
|
1002
|
+
var r = e.geometry, t = e.material, n = r.attributes.tangent !== void 0, a = r.attributes.color !== void 0, i = r.attributes.normal === void 0, s = e.isSkinnedMesh === !0, o = Object.keys(r.morphAttributes).length > 0, f = o && r.morphAttributes.normal !== void 0;
|
|
1003
1003
|
if (e.isPoints) {
|
|
1004
|
-
var
|
|
1005
|
-
h || (h = new Sr(), ze.prototype.copy.call(h, t), h.color.copy(t.color), h.map = t.map, h.sizeAttenuation = !1, this.cache.add(
|
|
1004
|
+
var l = "PointsMaterial:" + t.uuid, h = this.cache.get(l);
|
|
1005
|
+
h || (h = new Sr(), ze.prototype.copy.call(h, t), h.color.copy(t.color), h.map = t.map, h.sizeAttenuation = !1, this.cache.add(l, h)), t = h;
|
|
1006
1006
|
} else if (e.isLine) {
|
|
1007
|
-
var
|
|
1008
|
-
c || (c = new yr(), ze.prototype.copy.call(c, t), c.color.copy(t.color), this.cache.add(
|
|
1007
|
+
var l = "LineBasicMaterial:" + t.uuid, c = this.cache.get(l);
|
|
1008
|
+
c || (c = new yr(), ze.prototype.copy.call(c, t), c.color.copy(t.color), this.cache.add(l, c)), t = c;
|
|
1009
1009
|
}
|
|
1010
1010
|
if (n || a || i || s || o) {
|
|
1011
|
-
var
|
|
1012
|
-
t.isGLTFSpecularGlossinessMaterial && (
|
|
1013
|
-
var d = this.cache.get(
|
|
1014
|
-
d || (d = t.clone(), s && (d.skinning = !0), n && (d.vertexTangents = !0), a && (d.vertexColors = !0), i && (d.flatShading = !0), o && (d.morphTargets = !0),
|
|
1011
|
+
var l = "ClonedMaterial:" + t.uuid + ":";
|
|
1012
|
+
t.isGLTFSpecularGlossinessMaterial && (l += "specular-glossiness:"), s && (l += "skinning:"), n && (l += "vertex-tangents:"), a && (l += "vertex-colors:"), i && (l += "flat-shading:"), o && (l += "morph-targets:"), f && (l += "morph-normals:");
|
|
1013
|
+
var d = this.cache.get(l);
|
|
1014
|
+
d || (d = t.clone(), s && (d.skinning = !0), n && (d.vertexTangents = !0), a && (d.vertexColors = !0), i && (d.flatShading = !0), o && (d.morphTargets = !0), f && (d.morphNormals = !0), this.cache.add(l, d), this.associations.set(d, this.associations.get(t))), t = d;
|
|
1015
1015
|
}
|
|
1016
1016
|
t.aoMap && r.attributes.uv2 === void 0 && r.attributes.uv !== void 0 && r.setAttribute("uv2", r.attributes.uv), t.normalScale && !n && (t.normalScale.y = -t.normalScale.y), t.clearcoatNormalScale && !n && (t.clearcoatNormalScale.y = -t.clearcoatNormalScale.y), e.material = t;
|
|
1017
1017
|
}, C.prototype.loadMaterial = function(e) {
|
|
1018
|
-
var r = this, t = this.json, n = this.extensions, a = t.materials[e], i, s = {}, o = a.extensions || {},
|
|
1018
|
+
var r = this, t = this.json, n = this.extensions, a = t.materials[e], i, s = {}, o = a.extensions || {}, f = [];
|
|
1019
1019
|
if (o[u.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]) {
|
|
1020
|
-
var
|
|
1021
|
-
i =
|
|
1020
|
+
var l = n[u.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS];
|
|
1021
|
+
i = l.getMaterialType(), f.push(l.extendParams(s, a, r));
|
|
1022
1022
|
} else if (o[u.KHR_MATERIALS_UNLIT]) {
|
|
1023
1023
|
var h = n[u.KHR_MATERIALS_UNLIT];
|
|
1024
|
-
i = h.getMaterialType(),
|
|
1024
|
+
i = h.getMaterialType(), f.push(h.extendParams(s, a, r));
|
|
1025
1025
|
} else {
|
|
1026
1026
|
i = ve;
|
|
1027
1027
|
var c = a.pbrMetallicRoughness || {};
|
|
@@ -1029,23 +1029,23 @@ var qr = (function() {
|
|
|
1029
1029
|
var d = c.baseColorFactor;
|
|
1030
1030
|
s.color.fromArray(d), s.opacity = d[3];
|
|
1031
1031
|
}
|
|
1032
|
-
c.baseColorTexture !== void 0 &&
|
|
1032
|
+
c.baseColorTexture !== void 0 && f.push(r.assignTexture(s, "map", c.baseColorTexture)), s.metalness = c.metallicFactor !== void 0 ? c.metallicFactor : 1, s.roughness = c.roughnessFactor !== void 0 ? c.roughnessFactor : 1, c.metallicRoughnessTexture !== void 0 && (f.push(r.assignTexture(s, "metalnessMap", c.metallicRoughnessTexture)), f.push(r.assignTexture(s, "roughnessMap", c.metallicRoughnessTexture)));
|
|
1033
1033
|
}
|
|
1034
1034
|
a.doubleSided === !0 && (s.side = Er);
|
|
1035
|
-
var A = a.alphaMode ||
|
|
1036
|
-
if (A ===
|
|
1035
|
+
var A = a.alphaMode || le.OPAQUE;
|
|
1036
|
+
if (A === le.BLEND ? (s.transparent = !0, s.depthWrite = !1) : (s.transparent = !1, A === le.MASK && (s.alphaTest = a.alphaCutoff !== void 0 ? a.alphaCutoff : 0.5)), a.normalTexture !== void 0 && i !== he && (f.push(r.assignTexture(s, "normalMap", a.normalTexture)), s.normalScale = new Be(1, 1), a.normalTexture.scale !== void 0 && s.normalScale.set(a.normalTexture.scale, a.normalTexture.scale)), a.occlusionTexture !== void 0 && i !== he && (f.push(r.assignTexture(s, "aoMap", a.occlusionTexture)), a.occlusionTexture.strength !== void 0 && (s.aoMapIntensity = a.occlusionTexture.strength)), a.emissiveFactor !== void 0 && i !== he && (s.emissive = new re().fromArray(a.emissiveFactor)), a.emissiveTexture !== void 0 && i !== he && f.push(r.assignTexture(s, "emissiveMap", a.emissiveTexture)), o[u.KHR_MATERIALS_CLEARCOAT]) {
|
|
1037
1037
|
var E = n[u.KHR_MATERIALS_CLEARCOAT];
|
|
1038
|
-
i = E.getMaterialType(),
|
|
1038
|
+
i = E.getMaterialType(), f.push(E.extendParams(s, { extensions: o }, r));
|
|
1039
1039
|
}
|
|
1040
1040
|
if (o[u.KHR_MATERIALS_TRANSMISSION]) {
|
|
1041
1041
|
var E = n[u.KHR_MATERIALS_TRANSMISSION];
|
|
1042
|
-
i = E.getMaterialType(),
|
|
1042
|
+
i = E.getMaterialType(), f.push(E.extendParams(s, { extensions: o }, r));
|
|
1043
1043
|
}
|
|
1044
1044
|
if (o[u.REALSEE_MATERIALS_LIGHTMAP]) {
|
|
1045
1045
|
var y = n[u.REALSEE_MATERIALS_LIGHTMAP];
|
|
1046
|
-
i = y.getMaterialType(),
|
|
1046
|
+
i = y.getMaterialType(), f.push(y.extendParams(s, { extensions: o }, r));
|
|
1047
1047
|
}
|
|
1048
|
-
return Promise.all(
|
|
1048
|
+
return Promise.all(f).then(function() {
|
|
1049
1049
|
var S;
|
|
1050
1050
|
return i === w ? S = n[u.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(s) : S = new i(s), a.name && (S.name = a.name), S.map && (S.map.encoding = We), S.emissiveMap && (S.emissiveMap.encoding = We), W(S, a), r.associations.set(S, { type: "materials", index: e }), a.extensions && oe(n, S, a), S;
|
|
1051
1051
|
});
|
|
@@ -1065,16 +1065,16 @@ var qr = (function() {
|
|
|
1065
1065
|
}
|
|
1066
1066
|
} else
|
|
1067
1067
|
return;
|
|
1068
|
-
var
|
|
1069
|
-
if (
|
|
1070
|
-
for (var
|
|
1071
|
-
var A =
|
|
1068
|
+
var f = r.targets;
|
|
1069
|
+
if (f !== void 0) {
|
|
1070
|
+
for (var l = new ye(), h = new ye(), c = 0, d = f.length; c < d; c++) {
|
|
1071
|
+
var A = f[c];
|
|
1072
1072
|
if (A.POSITION !== void 0) {
|
|
1073
1073
|
var i = t.json.accessors[A.POSITION], s = i.min, o = i.max;
|
|
1074
|
-
s !== void 0 && o !== void 0 ? (h.setX(Math.max(Math.abs(s[0]), Math.abs(o[0]))), h.setY(Math.max(Math.abs(s[1]), Math.abs(o[1]))), h.setZ(Math.max(Math.abs(s[2]), Math.abs(o[2]))),
|
|
1074
|
+
s !== void 0 && o !== void 0 ? (h.setX(Math.max(Math.abs(s[0]), Math.abs(o[0]))), h.setY(Math.max(Math.abs(s[1]), Math.abs(o[1]))), h.setZ(Math.max(Math.abs(s[2]), Math.abs(o[2]))), l.max(h)) : console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");
|
|
1075
1075
|
}
|
|
1076
1076
|
}
|
|
1077
|
-
a.expandByVector(
|
|
1077
|
+
a.expandByVector(l);
|
|
1078
1078
|
}
|
|
1079
1079
|
e.boundingBox = a;
|
|
1080
1080
|
var E = new kr();
|
|
@@ -1082,20 +1082,20 @@ var qr = (function() {
|
|
|
1082
1082
|
}
|
|
1083
1083
|
function V(e, r, t) {
|
|
1084
1084
|
var n = r.attributes, a = [];
|
|
1085
|
-
function i(
|
|
1086
|
-
return t.getDependency("accessor",
|
|
1085
|
+
function i(l, h) {
|
|
1086
|
+
return t.getDependency("accessor", l).then(function(c) {
|
|
1087
1087
|
e.setAttribute(h, c);
|
|
1088
1088
|
});
|
|
1089
1089
|
}
|
|
1090
1090
|
for (var s in n) {
|
|
1091
|
-
var o =
|
|
1091
|
+
var o = fe[s] || s.toLowerCase();
|
|
1092
1092
|
o in e.attributes || a.push(i(n[s], o));
|
|
1093
1093
|
}
|
|
1094
1094
|
if (r.indices !== void 0 && !e.index) {
|
|
1095
|
-
var
|
|
1096
|
-
e.setIndex(
|
|
1095
|
+
var f = t.getDependency("accessor", r.indices).then(function(l) {
|
|
1096
|
+
e.setIndex(l);
|
|
1097
1097
|
});
|
|
1098
|
-
a.push(
|
|
1098
|
+
a.push(f);
|
|
1099
1099
|
}
|
|
1100
1100
|
return W(e, r), me(e, r, t), Promise.all(a).then(function() {
|
|
1101
1101
|
return r.targets !== void 0 ? we(e, r.targets, t) : e;
|
|
@@ -1120,8 +1120,8 @@ var qr = (function() {
|
|
|
1120
1120
|
for (var i = 0; i < s; i++)
|
|
1121
1121
|
i % 2 === 0 ? (o.push(t.getX(i)), o.push(t.getX(i + 1)), o.push(t.getX(i + 2))) : (o.push(t.getX(i + 2)), o.push(t.getX(i + 1)), o.push(t.getX(i)));
|
|
1122
1122
|
o.length / 3 !== s && console.error("THREE.GLTFLoader.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");
|
|
1123
|
-
var
|
|
1124
|
-
return
|
|
1123
|
+
var f = e.clone();
|
|
1124
|
+
return f.setIndex(o), f;
|
|
1125
1125
|
}
|
|
1126
1126
|
return C.prototype.loadGeometries = function(e) {
|
|
1127
1127
|
var r = this, t = this.extensions, n = this.primitiveCache;
|
|
@@ -1131,22 +1131,22 @@ var qr = (function() {
|
|
|
1131
1131
|
});
|
|
1132
1132
|
}
|
|
1133
1133
|
for (var i = [], s = 0, o = e.length; s < o; s++) {
|
|
1134
|
-
var
|
|
1134
|
+
var f = e[s], l = U(f), h = n[l];
|
|
1135
1135
|
if (h)
|
|
1136
1136
|
i.push(h.promise);
|
|
1137
1137
|
else {
|
|
1138
1138
|
var c;
|
|
1139
|
-
|
|
1139
|
+
f.extensions && f.extensions[u.KHR_DRACO_MESH_COMPRESSION] ? c = a(f) : c = V(new $e(), f, r), n[l] = { primitive: f, promise: c }, i.push(c);
|
|
1140
1140
|
}
|
|
1141
1141
|
}
|
|
1142
1142
|
return Promise.all(i);
|
|
1143
1143
|
}, C.prototype.loadMesh = function(e) {
|
|
1144
1144
|
for (var r = this, t = this.json, n = t.meshes[e], a = n.primitives, i = [], s = 0, o = a.length; s < o; s++) {
|
|
1145
|
-
var
|
|
1146
|
-
i.push(
|
|
1145
|
+
var f = a[s].material === void 0 ? Me(this.cache) : this.getDependency("material", a[s].material);
|
|
1146
|
+
i.push(f);
|
|
1147
1147
|
}
|
|
1148
|
-
return i.push(r.loadGeometries(a)), Promise.all(i).then(function(
|
|
1149
|
-
for (var h =
|
|
1148
|
+
return i.push(r.loadGeometries(a)), Promise.all(i).then(function(l) {
|
|
1149
|
+
for (var h = l.slice(0, l.length - 1), c = l[l.length - 1], d = [], A = 0, E = c.length; A < E; A++) {
|
|
1150
1150
|
var y = c[A], S = a[A], L, O = h[A];
|
|
1151
1151
|
if (S.mode === N.TRIANGLES || S.mode === N.TRIANGLE_STRIP || S.mode === N.TRIANGLE_FAN || S.mode === void 0)
|
|
1152
1152
|
L = n.isSkinnedMesh === !0 ? new _r(y, O) : new Rr(y, O), L.isSkinnedMesh === !0 && !L.geometry.attributes.skinWeight.normalized && L.normalizeSkinWeights(), S.mode === N.TRIANGLE_STRIP ? L.geometry = ie(L.geometry, Br) : S.mode === N.TRIANGLE_FAN && (L.geometry = ie(L.geometry, Je));
|
|
@@ -1181,8 +1181,8 @@ var qr = (function() {
|
|
|
1181
1181
|
return t.inverseBindMatrices = n, t;
|
|
1182
1182
|
});
|
|
1183
1183
|
}, C.prototype.loadAnimation = function(e) {
|
|
1184
|
-
for (var r = this.json, t = r.animations[e], n = [], a = [], i = [], s = [], o = [],
|
|
1185
|
-
var h = t.channels[
|
|
1184
|
+
for (var r = this.json, t = r.animations[e], n = [], a = [], i = [], s = [], o = [], f = 0, l = t.channels.length; f < l; f++) {
|
|
1185
|
+
var h = t.channels[f], c = t.samplers[h.sampler], d = h.target, A = d.node !== void 0 ? d.node : d.id, E = t.parameters !== void 0 ? t.parameters[c.input] : c.input, y = t.parameters !== void 0 ? t.parameters[c.output] : c.output;
|
|
1186
1186
|
n.push(this.getDependency("node", A)), a.push(this.getDependency("accessor", E)), i.push(this.getDependency("accessor", y)), s.push(c), o.push(d);
|
|
1187
1187
|
}
|
|
1188
1188
|
return Promise.all([
|
|
@@ -1251,30 +1251,30 @@ var qr = (function() {
|
|
|
1251
1251
|
var r = this.json, t = this.extensions, n = this, a = r.meshReferences, i = r.meshUses, s = r.nodes[e];
|
|
1252
1252
|
return (function() {
|
|
1253
1253
|
var o = [];
|
|
1254
|
-
return s.mesh !== void 0 && o.push(n.getDependency("mesh", s.mesh).then(function(
|
|
1255
|
-
var
|
|
1254
|
+
return s.mesh !== void 0 && o.push(n.getDependency("mesh", s.mesh).then(function(f) {
|
|
1255
|
+
var l;
|
|
1256
1256
|
if (a[s.mesh] > 1) {
|
|
1257
1257
|
var h = i[s.mesh]++;
|
|
1258
|
-
|
|
1258
|
+
l = f.clone(), l.name += "_instance_" + h;
|
|
1259
1259
|
} else
|
|
1260
|
-
|
|
1261
|
-
return s.weights !== void 0 &&
|
|
1260
|
+
l = f;
|
|
1261
|
+
return s.weights !== void 0 && l.traverse(function(c) {
|
|
1262
1262
|
if (c.isMesh)
|
|
1263
1263
|
for (var d = 0, A = s.weights.length; d < A; d++)
|
|
1264
1264
|
c.morphTargetInfluences[d] = s.weights[d];
|
|
1265
|
-
}),
|
|
1265
|
+
}), l;
|
|
1266
1266
|
})), s.camera !== void 0 && o.push(n.getDependency("camera", s.camera)), s.extensions && s.extensions[u.KHR_LIGHTS_PUNCTUAL] && s.extensions[u.KHR_LIGHTS_PUNCTUAL].light !== void 0 && o.push(n.getDependency("light", s.extensions[u.KHR_LIGHTS_PUNCTUAL].light)), Promise.all(o);
|
|
1267
1267
|
})().then(function(o) {
|
|
1268
|
-
var
|
|
1269
|
-
if (s.isBone === !0 ?
|
|
1270
|
-
for (var
|
|
1271
|
-
|
|
1272
|
-
if (s.name && (
|
|
1268
|
+
var f;
|
|
1269
|
+
if (s.isBone === !0 ? f = new Dr() : o.length > 1 ? f = new Ue() : o.length === 1 ? f = o[0] : f = new Fr(), f !== o[0])
|
|
1270
|
+
for (var l = 0, h = o.length; l < h; l++)
|
|
1271
|
+
f.add(o[l]);
|
|
1272
|
+
if (s.name && (f.userData.name = s.name, f.name = Ur.sanitizeNodeName(s.name)), W(f, s), s.extensions && oe(t, f, s), s.matrix !== void 0) {
|
|
1273
1273
|
var c = new qe();
|
|
1274
|
-
c.fromArray(s.matrix),
|
|
1274
|
+
c.fromArray(s.matrix), f.applyMatrix4(c);
|
|
1275
1275
|
} else
|
|
1276
|
-
s.translation !== void 0 &&
|
|
1277
|
-
return n.associations.set(
|
|
1276
|
+
s.translation !== void 0 && f.position.fromArray(s.translation), s.rotation !== void 0 && f.quaternion.fromArray(s.rotation), s.scale !== void 0 && f.scale.fromArray(s.scale);
|
|
1277
|
+
return n.associations.set(f, { type: "nodes", index: e }), f;
|
|
1278
1278
|
});
|
|
1279
1279
|
}, C.prototype.loadScene = /* @__PURE__ */ (function() {
|
|
1280
1280
|
function e(r, t, n, a) {
|
|
@@ -1282,16 +1282,16 @@ var qr = (function() {
|
|
|
1282
1282
|
return a.getDependency("node", r).then(function(s) {
|
|
1283
1283
|
if (i.skin === void 0) return s;
|
|
1284
1284
|
var o;
|
|
1285
|
-
return a.getDependency("skin", i.skin).then(function(
|
|
1286
|
-
o =
|
|
1287
|
-
for (var
|
|
1288
|
-
|
|
1289
|
-
return Promise.all(
|
|
1290
|
-
}).then(function(
|
|
1291
|
-
return s.traverse(function(
|
|
1292
|
-
if (
|
|
1293
|
-
for (var h = [], c = [], d = 0, A =
|
|
1294
|
-
var E =
|
|
1285
|
+
return a.getDependency("skin", i.skin).then(function(f) {
|
|
1286
|
+
o = f;
|
|
1287
|
+
for (var l = [], h = 0, c = o.joints.length; h < c; h++)
|
|
1288
|
+
l.push(a.getDependency("node", o.joints[h]));
|
|
1289
|
+
return Promise.all(l);
|
|
1290
|
+
}).then(function(f) {
|
|
1291
|
+
return s.traverse(function(l) {
|
|
1292
|
+
if (l.isMesh) {
|
|
1293
|
+
for (var h = [], c = [], d = 0, A = f.length; d < A; d++) {
|
|
1294
|
+
var E = f[d];
|
|
1295
1295
|
if (E) {
|
|
1296
1296
|
h.push(E);
|
|
1297
1297
|
var y = new qe();
|
|
@@ -1299,7 +1299,7 @@ var qr = (function() {
|
|
|
1299
1299
|
} else
|
|
1300
1300
|
console.warn('THREE.GLTFLoader: Joint "%s" could not be found.', o.joints[d]);
|
|
1301
1301
|
}
|
|
1302
|
-
|
|
1302
|
+
l.bind(new Hr(h, c), l.matrixWorld);
|
|
1303
1303
|
}
|
|
1304
1304
|
}), s;
|
|
1305
1305
|
});
|
|
@@ -1307,8 +1307,8 @@ var qr = (function() {
|
|
|
1307
1307
|
t.add(s);
|
|
1308
1308
|
var o = [];
|
|
1309
1309
|
if (i.children)
|
|
1310
|
-
for (var
|
|
1311
|
-
var c = l
|
|
1310
|
+
for (var f = i.children, l = 0, h = f.length; l < h; l++) {
|
|
1311
|
+
var c = f[l];
|
|
1312
1312
|
o.push(e(c, s, n, a));
|
|
1313
1313
|
}
|
|
1314
1314
|
return Promise.all(o);
|
|
@@ -1317,9 +1317,9 @@ var qr = (function() {
|
|
|
1317
1317
|
return function(t) {
|
|
1318
1318
|
var n = this.json, a = this.extensions, i = this.json.scenes[t], s = this, o = new Ue();
|
|
1319
1319
|
i.name && (o.name = i.name), W(o, i), i.extensions && oe(a, o, i);
|
|
1320
|
-
for (var
|
|
1321
|
-
|
|
1322
|
-
return Promise.all(
|
|
1320
|
+
for (var f = i.nodes || [], l = [], h = 0, c = f.length; h < c; h++)
|
|
1321
|
+
l.push(e(f[h], o, n, s));
|
|
1322
|
+
return Promise.all(l).then(function() {
|
|
1323
1323
|
return o;
|
|
1324
1324
|
});
|
|
1325
1325
|
};
|
|
@@ -1593,19 +1593,19 @@ He.prototype = Object.assign(Object.create(er.prototype), {
|
|
|
1593
1593
|
constructor: He,
|
|
1594
1594
|
parse: function(p, T) {
|
|
1595
1595
|
var u = { mipmaps: [], width: 0, height: 0, format: null, mipmapCount: 1 }, m = 542327876, v = 131072, g = 512, _ = 1024, x = 2048, P = 4096, R = 8192, I = 16384, F = 32768, b = 4;
|
|
1596
|
-
function M(
|
|
1597
|
-
return
|
|
1596
|
+
function M(f) {
|
|
1597
|
+
return f.charCodeAt(0) + (f.charCodeAt(1) << 8) + (f.charCodeAt(2) << 16) + (f.charCodeAt(3) << 24);
|
|
1598
1598
|
}
|
|
1599
|
-
function w(
|
|
1599
|
+
function w(f) {
|
|
1600
1600
|
return String.fromCharCode(
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1601
|
+
f & 255,
|
|
1602
|
+
f >> 8 & 255,
|
|
1603
|
+
f >> 16 & 255,
|
|
1604
|
+
f >> 24 & 255
|
|
1605
1605
|
);
|
|
1606
1606
|
}
|
|
1607
|
-
function K(
|
|
1608
|
-
for (var d = h * c * 4, A = new Uint8Array(
|
|
1607
|
+
function K(f, l, h, c) {
|
|
1608
|
+
for (var d = h * c * 4, A = new Uint8Array(f, l, d), E = new Uint8Array(d), y = 0, S = 0, L = 0; L < c; L++)
|
|
1609
1609
|
for (var O = 0; O < h; O++) {
|
|
1610
1610
|
var G = A[S];
|
|
1611
1611
|
S++;
|
|
@@ -1618,10 +1618,10 @@ He.prototype = Object.assign(Object.create(er.prototype), {
|
|
|
1618
1618
|
}
|
|
1619
1619
|
return E;
|
|
1620
1620
|
}
|
|
1621
|
-
var ne = M("DXT1"), D = M("DXT3"), J = M("DXT5"), N = M("ETC1"), Q = 31, Z = 0, X = 1, z = 2,
|
|
1621
|
+
var ne = M("DXT1"), D = M("DXT3"), J = M("DXT5"), N = M("ETC1"), Q = 31, Z = 0, X = 1, z = 2, fe = 3, j = 4, Le = 7, le = 20, Te = 21, ge = 22, Me = 23, oe = 24, W = 25, we = 26, Ie = 28, U = new Int32Array(p, 0, Q);
|
|
1622
1622
|
if (U[Z] !== m)
|
|
1623
1623
|
return console.error("THREE.DDSLoader.parse: Invalid magic number in DDS header."), u;
|
|
1624
|
-
if (!U[
|
|
1624
|
+
if (!U[le] & b)
|
|
1625
1625
|
return console.error("THREE.DDSLoader.parse: Unsupported format, must contain a FourCC code."), u;
|
|
1626
1626
|
var Y, C = U[Te], me = !1;
|
|
1627
1627
|
switch (C) {
|
|
@@ -1647,7 +1647,7 @@ He.prototype = Object.assign(Object.create(er.prototype), {
|
|
|
1647
1647
|
var V = U[Ie];
|
|
1648
1648
|
if (u.isCubemap = !!(V & g), u.isCubemap && (!(V & _) || !(V & x) || !(V & P) || !(V & R) || !(V & I) || !(V & F)))
|
|
1649
1649
|
return console.error("THREE.DDSLoader.parse: Incomplete cubemap faces"), u;
|
|
1650
|
-
u.width = U[j], u.height = U[
|
|
1650
|
+
u.width = U[j], u.height = U[fe];
|
|
1651
1651
|
for (var ie = U[X] + 4, e = u.isCubemap ? 6 : 1, r = 0; r < e; r++)
|
|
1652
1652
|
for (var t = u.width, n = u.height, a = 0; a < u.mipmapCount; a++) {
|
|
1653
1653
|
if (me)
|
|
@@ -1683,7 +1683,7 @@ var Qe = (
|
|
|
1683
1683
|
}
|
|
1684
1684
|
return Object.defineProperty(T, "version", {
|
|
1685
1685
|
get: function() {
|
|
1686
|
-
return "6.7.0
|
|
1686
|
+
return "6.7.0";
|
|
1687
1687
|
},
|
|
1688
1688
|
enumerable: !1,
|
|
1689
1689
|
configurable: !0
|