@realsee/five 6.0.0-alpha.61 → 6.0.0-alpha.63
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/TERMS.txt +0 -2
- package/docs/classes/five.AnimationFrameLoop.html +1 -1
- package/docs/classes/five.BoxBoundingVolume.html +1 -1
- package/docs/classes/five.Camera.html +1 -1
- package/docs/classes/five.CullingVolume.html +1 -1
- package/docs/classes/five.Fetcher.html +1 -1
- package/docs/classes/five.Five.html +1 -1
- package/docs/classes/five.InternalWebGLRenderer.html +1 -1
- package/docs/classes/five.IntersectMesh.html +1 -1
- package/docs/classes/five.Model.html +1 -1
- package/docs/classes/five.NetworkAbortError.html +1 -1
- package/docs/classes/five.NetworkFirbiddenError.html +1 -1
- package/docs/classes/five.NetworkResponseError.html +1 -1
- package/docs/classes/five.NetworkSubscribe.html +1 -1
- package/docs/classes/five.NetworkTimeoutError.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 +1 -1
- package/docs/classes/five.PanoCircleMesh.html +1 -1
- package/docs/classes/five.PanoCircleMeshCustom.html +1 -1
- package/docs/classes/five.PanoCircleMeshSolid.html +1 -1
- package/docs/classes/five.RegionBoundingVolume.html +1 -1
- package/docs/classes/five.RequestScheduler.html +1 -1
- package/docs/classes/five.Scene.html +1 -1
- package/docs/classes/five.SphereBoundingVolume.html +1 -1
- package/docs/classes/five.Subscribe.html +1 -1
- package/docs/classes/five.TextureLoader.html +1 -1
- package/docs/classes/five.Tile.html +1 -1
- package/docs/classes/five.Tile3DModel.html +1 -1
- package/docs/classes/five.TileCubeTextureTarget.html +1 -1
- package/docs/classes/five.TileNode.html +1 -1
- package/docs/classes/five.Tileset.html +1 -1
- package/docs/classes/five.TilesetCache.html +1 -1
- package/docs/classes/five.TilesetTraverser.html +1 -1
- package/docs/classes/five.Work.html +1 -1
- package/docs/classes/five.XRButton.html +1 -1
- 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.GLTFParser.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/react.Store.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.SpotLight.html +1 -1
- package/docs/enums/five.VolumePlaneIntersect.html +1 -1
- package/docs/index.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 +1 -1
- package/docs/interfaces/five.BaseEvent.html +1 -1
- package/docs/interfaces/five.BoundingVolume.html +1 -1
- package/docs/interfaces/five.CameraPose.html +1 -1
- package/docs/interfaces/five.ClipperParameter.html +1 -1
- package/docs/interfaces/five.DepthPanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.EventCallback.html +1 -1
- package/docs/interfaces/five.FiveInitArgs.html +1 -1
- package/docs/interfaces/five.FloorplanControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.GestureEvent.html +1 -1
- package/docs/interfaces/five.ImageOptions.html +1 -1
- package/docs/interfaces/five.ImageURLMappings.html +1 -1
- package/docs/interfaces/five.ImageURLOptions.html +1 -1
- package/docs/interfaces/five.IntersectEvent.html +1 -1
- package/docs/interfaces/five.IntersectMeshInterface.html +1 -1
- package/docs/interfaces/five.Intersection.html +1 -1
- package/docs/interfaces/five.MapviewControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.ModeChangeEvent.html +1 -1
- package/docs/interfaces/five.ModelControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.ModelEvent.html +1 -1
- package/docs/interfaces/five.ModelLodOptions.html +1 -1
- package/docs/interfaces/five.ModelsEvent.html +1 -1
- package/docs/interfaces/five.MotionKeyframe.html +1 -1
- package/docs/interfaces/five.MovePanoOptions.html +1 -1
- package/docs/interfaces/five.NetworkOptions.html +1 -1
- package/docs/interfaces/five.NetworkResourceEvent.html +1 -1
- package/docs/interfaces/five.ObjectEvent.html +1 -1
- package/docs/interfaces/five.PBMPanoPicture.html +1 -1
- package/docs/interfaces/five.PBMParameters.html +1 -1
- package/docs/interfaces/five.PanoCircleMeshCustomOptions.html +1 -1
- package/docs/interfaces/five.PanoCircleMeshInterface.html +1 -1
- package/docs/interfaces/five.PanoCircleMeshOptions.html +1 -1
- package/docs/interfaces/five.PanoCircleMeshSolidOptions.html +1 -1
- package/docs/interfaces/five.PanoEvent.html +1 -1
- package/docs/interfaces/five.PanoTextureEvent.html +1 -1
- package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.Pose.html +1 -1
- package/docs/interfaces/five.RenderEvent.html +1 -1
- package/docs/interfaces/five.Scissor.html +1 -1
- package/docs/interfaces/five.State.html +1 -1
- package/docs/interfaces/five.StateEvent.html +1 -1
- package/docs/interfaces/five.SubscribeMixinType.emit.html +1 -1
- package/docs/interfaces/five.SubscribeMixinType.hasListener.html +1 -1
- package/docs/interfaces/five.SubscribeMixinType.off.html +1 -1
- package/docs/interfaces/five.SubscribeMixinType.on.html +1 -1
- package/docs/interfaces/five.SubscribeMixinType.once.html +1 -1
- package/docs/interfaces/five.SubscribeMixinType.waitUnitl.html +1 -1
- package/docs/interfaces/five.TextureOptions.html +1 -1
- package/docs/interfaces/five.Tile3DModelLoaderOptions.html +1 -1
- package/docs/interfaces/five.TileCubeNode.html +1 -1
- package/docs/interfaces/five.TileCubeTree.html +1 -1
- package/docs/interfaces/five.TileHeader.html +1 -1
- package/docs/interfaces/five.TilesetHeader.html +1 -1
- package/docs/interfaces/five.TilesetOptions.html +1 -1
- package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.WebXRAxesParams.html +1 -1
- package/docs/interfaces/five.WebXRControllerParams.html +1 -1
- package/docs/interfaces/five.WorkCubeImage.html +1 -1
- package/docs/interfaces/five.WorkImage.html +1 -1
- package/docs/interfaces/five.WorkInitial.html +1 -1
- package/docs/interfaces/five.WorkModel.html +1 -1
- package/docs/interfaces/five.WorkObserver.html +1 -1
- package/docs/interfaces/five.WorkOptions.html +1 -1
- package/docs/interfaces/five.WorkResolvedObserver.html +1 -1
- package/docs/interfaces/five.WorkTile.html +1 -1
- package/docs/interfaces/five.WorkVideo.html +1 -1
- package/docs/interfaces/five.WorksEvent.html +1 -1
- package/docs/interfaces/five.XRControllerEvent.html +1 -1
- package/docs/interfaces/five.XRGestureEvent.html +1 -1
- package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.XRSessionEvent.html +1 -1
- package/docs/interfaces/gltf_loader.DDS.html +1 -1
- package/docs/interfaces/gltf_loader.GLTF.html +1 -1
- package/docs/interfaces/gltf_loader.GLTFReference.html +1 -1
- package/docs/interfaces/gltf_loader.THREEGLTF.html +1 -1
- package/docs/interfaces/react.FiveActionReactCallbacks.html +1 -1
- package/docs/interfaces/react.FiveInjectionTypes.html +1 -1
- package/docs/interfaces/react.PropTypeOfFiveFeatures.html +1 -1
- package/docs/interfaces/sticker.IntersectionLike.html +1 -1
- package/docs/interfaces/vfx.ParticleArgs.html +1 -1
- package/docs/interfaces/vfx.ParticleTweenKeyframe.html +1 -1
- package/docs/interfaces/vue.FiveActionVueCallbacks.html +1 -1
- package/docs/modules/five.SubscribeMixinType.html +1 -1
- package/docs/modules/five.html +1 -1
- package/docs/modules/gltf_loader.html +1 -1
- package/docs/modules/line.html +1 -1
- package/docs/modules/react.html +1 -1
- package/docs/modules/sticker.html +1 -1
- package/docs/modules/vfx.html +1 -1
- package/docs/modules/vue.html +1 -1
- package/docs/modules.html +1 -1
- package/five/index.js +1904 -218
- package/five/index.mjs +23421 -0
- package/gltf-loader/index.js +204 -203
- package/gltf-loader/index.mjs +1708 -0
- package/line/index.js +396 -202
- package/line/index.mjs +775 -0
- package/package.json +41 -5
- package/react/index.js +198 -203
- package/react/index.mjs +1044 -0
- package/scripts/five-plugin-init.js +1 -1
- package/scripts/five-quick-start-init.js +1 -1
- package/scripts/five-react-component-init.js +1 -1
- package/sticker/index.js +198 -203
- package/sticker/index.mjs +399 -0
- package/templates/plugin/devtools/webpack.example.js +1 -1
- package/templates/react-component/devtools/webpack.example.js +1 -1
- package/umd/five-gltf-loader.js +261 -1
- package/umd/five-line.js +454 -1
- package/umd/five-react.js +255 -1
- package/umd/five-sticker.js +255 -1
- package/umd/five-vfx.js +539 -1
- package/umd/five-vue.js +255 -1
- package/umd/five.js +2048 -2
- package/vfx/index.js +481 -202
- package/vfx/index.mjs +1032 -0
- package/vue/index.js +198 -203
- package/vue/index.mjs +573 -0
- package/umd/five-gltf-loader.js.LICENSE.txt +0 -14
- package/umd/five-line.js.LICENSE.txt +0 -14
- package/umd/five-react.js.LICENSE.txt +0 -14
- package/umd/five-sticker.js.LICENSE.txt +0 -14
package/gltf-loader/index.js
CHANGED
|
@@ -1,260 +1,261 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* @license
|
|
2
3
|
* @realsee/five
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* Version: 6.0.0-alpha.61
|
|
6
|
-
*
|
|
4
|
+
* Generated: 12/12/2023
|
|
5
|
+
* Version: 6.0.0-alpha.63
|
|
7
6
|
* Terms:
|
|
8
7
|
* Realsee SDK License Agreement
|
|
9
|
-
*
|
|
10
8
|
* Update: July 28, 2021
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* (the "SDK") and includes any upgrades, modified versions, updates, additions,
|
|
9
|
+
* THIS LICENSE AGREEMENT BETWEEN YOU AND 【BEIKE REALSEE TECHNOLOGY (HK)
|
|
10
|
+
* LIMITED】(“Realsee”) FORMS A LEGALLY BINDING CONTRACT BETWEEN YOU AND REALSEE IN
|
|
11
|
+
* RELATION TO YOUR USE OF THE SDK. This License Agreement accompanies the Realsee
|
|
12
|
+
* Software Development Kit(s) for the software and related explanatory materials
|
|
13
|
+
* (the "SDK") and includes any upgrades, modified versions, updates, additions,
|
|
17
14
|
* and copies of the SDK licensed to You by Realsee.
|
|
18
|
-
* BY DOWNLOADING, INSTALLING, OR OTHERWISE ACCESSING OR USING THE SDK, YOU AGREE
|
|
19
|
-
* THAT YOU HAVE READ, UNDERSTOOD, AND AGREE TO BE BOUND BY THIS AGREEMENT. YOU ARE
|
|
20
|
-
* AGREEING ON YOUR OWN BEHALF AND/OR ON BEHALF OF YOUR COMPANY OR ORGANIZATION TO
|
|
15
|
+
* BY DOWNLOADING, INSTALLING, OR OTHERWISE ACCESSING OR USING THE SDK, YOU AGREE
|
|
16
|
+
* THAT YOU HAVE READ, UNDERSTOOD, AND AGREE TO BE BOUND BY THIS AGREEMENT. YOU ARE
|
|
17
|
+
* AGREEING ON YOUR OWN BEHALF AND/OR ON BEHALF OF YOUR COMPANY OR ORGANIZATION TO
|
|
21
18
|
* THE TERMS AND CONDITIONS STATED BELOW.
|
|
22
|
-
* This Agreement applies to Your use of the SDK in the country in which You
|
|
23
|
-
* legally install it (“Territory”) and is subject to the laws of such Territory
|
|
24
|
-
* and further subject to Section 12 below. Different terms, conditions, and
|
|
19
|
+
* This Agreement applies to Your use of the SDK in the country in which You
|
|
20
|
+
* legally install it (“Territory”) and is subject to the laws of such Territory
|
|
21
|
+
* and further subject to Section 12 below. Different terms, conditions, and
|
|
25
22
|
* limitations may apply to the use of the SDK in any additional countries.
|
|
26
23
|
* 1. DEFINITIONS.
|
|
27
24
|
* “Agreement” means this Realsee SDK License Agreement.
|
|
28
|
-
* “Developer”, “You” and “Your” means the person(s) or entity acquiring or using
|
|
25
|
+
* “Developer”, “You” and “Your” means the person(s) or entity acquiring or using
|
|
29
26
|
* the SDK or otherwise exercising rights under the terms of this Agreement.
|
|
30
|
-
* “Documentation” means the technical or other specifications or documentation
|
|
27
|
+
* “Documentation” means the technical or other specifications or documentation
|
|
31
28
|
* that Realsee may provide to You for use in connection with the SDK.
|
|
32
|
-
* “Integrated Product” means any software, website, or on-line service developed
|
|
29
|
+
* “Integrated Product” means any software, website, or on-line service developed
|
|
33
30
|
* by You based on or using the SDK (collectively, the “Integrated Product”).
|
|
34
|
-
* “Intellectual Property” means any patents, patent rights, trademarks, service
|
|
35
|
-
* marks, registered and unregistered designs, applications for any of the
|
|
36
|
-
* foregoing, copyright, and any other similar protected rights in any country and
|
|
37
|
-
* to the extent recognised by any relevant jurisdiction as intellectual property,
|
|
38
|
-
* trade secrets, know-how and confidential information. Realsee reserves all
|
|
31
|
+
* “Intellectual Property” means any patents, patent rights, trademarks, service
|
|
32
|
+
* marks, registered and unregistered designs, applications for any of the
|
|
33
|
+
* foregoing, copyright, and any other similar protected rights in any country and
|
|
34
|
+
* to the extent recognised by any relevant jurisdiction as intellectual property,
|
|
35
|
+
* trade secrets, know-how and confidential information. Realsee reserves all
|
|
39
36
|
* rights not expressly granted to You.
|
|
40
|
-
* “Realsee” means [Beike Realsee Technology (HK) Limited, a company incorporated
|
|
37
|
+
* “Realsee” means [Beike Realsee Technology (HK) Limited, a company incorporated
|
|
41
38
|
* and validly existing under the laws of Hong Kong].
|
|
42
|
-
* “SDK” means the Realsee-proprietary Software Development Kits (SDK) provided
|
|
43
|
-
* hereunder, includes all development tools (including any compiler and debugger),
|
|
44
|
-
* application programming interfaces (“APIs”), libraries, binary utilities, header
|
|
45
|
-
* files, Documentation, content, data, code samples, and other materials provided
|
|
46
|
-
* to You in connection with this Agreement, whether delivered through a download,
|
|
47
|
-
* or any other media or form, and is licensed, not sold, to You by Realsee for use
|
|
48
|
-
* only under the terms of this Agreement. The terms of this Agreement will govern
|
|
49
|
-
* any updates provided by Realsee that replace and/or supplement the original SDK
|
|
50
|
-
* delivered to You, unless such update is accompanied by a separate license, in
|
|
39
|
+
* “SDK” means the Realsee-proprietary Software Development Kits (SDK) provided
|
|
40
|
+
* hereunder, includes all development tools (including any compiler and debugger),
|
|
41
|
+
* application programming interfaces (“APIs”), libraries, binary utilities, header
|
|
42
|
+
* files, Documentation, content, data, code samples, and other materials provided
|
|
43
|
+
* to You in connection with this Agreement, whether delivered through a download,
|
|
44
|
+
* or any other media or form, and is licensed, not sold, to You by Realsee for use
|
|
45
|
+
* only under the terms of this Agreement. The terms of this Agreement will govern
|
|
46
|
+
* any updates provided by Realsee that replace and/or supplement the original SDK
|
|
47
|
+
* delivered to You, unless such update is accompanied by a separate license, in
|
|
51
48
|
* which case the terms of such license will govern.
|
|
52
49
|
* 2. LICENSED USES AND RESTRICTIONS.
|
|
53
|
-
* 2.1 Subject to the restrictions contained in this Section 2, Realsee grants to
|
|
54
|
-
* You during the term, a limited, non-exclusive, revocable, non-sublicensable,
|
|
55
|
-
* non-transferable license to install and use the SDK within the Territory only
|
|
50
|
+
* 2.1 Subject to the restrictions contained in this Section 2, Realsee grants to
|
|
51
|
+
* You during the term, a limited, non-exclusive, revocable, non-sublicensable,
|
|
52
|
+
* non-transferable license to install and use the SDK within the Territory only
|
|
56
53
|
* for the purpose of internal development.
|
|
57
|
-
* 2.2 Restrictions. You acknowledge and agree that, You shall not, and shall
|
|
58
|
-
* ensure that Your affiliates, employees, agents, representatives, officers,
|
|
54
|
+
* 2.2 Restrictions. You acknowledge and agree that, You shall not, and shall
|
|
55
|
+
* ensure that Your affiliates, employees, agents, representatives, officers,
|
|
59
56
|
* representatives, and subcontractors do not (directly or indirectly):
|
|
60
|
-
* 2.2.1 decompile, reverse engineer, disassemble or attempt to derive the source
|
|
61
|
-
* code of, those components of the SDK provided in object code form, or any part
|
|
57
|
+
* 2.2.1 decompile, reverse engineer, disassemble or attempt to derive the source
|
|
58
|
+
* code of, those components of the SDK provided in object code form, or any part
|
|
62
59
|
* thereof;
|
|
63
|
-
* 2.2.2 remove, alter, or obscure any copyright notice or other proprietary rights
|
|
60
|
+
* 2.2.2 remove, alter, or obscure any copyright notice or other proprietary rights
|
|
64
61
|
* notice on any part of the SDK;
|
|
65
|
-
* 2.2.3 sell, assign, pledge, rent, lease, lend, upload to or host on any website
|
|
66
|
-
* or server for use by any third party except You, redistribute, or sublicense the
|
|
67
|
-
* SDK (or any part thereof), or operate the SDK (or any part thereof) in the
|
|
68
|
-
* capacity of a service bureau or other hosted services provider, in whole or in
|
|
62
|
+
* 2.2.3 sell, assign, pledge, rent, lease, lend, upload to or host on any website
|
|
63
|
+
* or server for use by any third party except You, redistribute, or sublicense the
|
|
64
|
+
* SDK (or any part thereof), or operate the SDK (or any part thereof) in the
|
|
65
|
+
* capacity of a service bureau or other hosted services provider, in whole or in
|
|
69
66
|
* part, nor may You enable others to do so;
|
|
70
67
|
* 2.2.4 or alter, modify, customize or improve the SDK, or any part thereof;
|
|
71
|
-
* 2.2.5 use the SDK (or any part thereof) for any illegal purpose, in any manner
|
|
72
|
-
* that is inconsistent with the terms of this Agreement, or to engage in any
|
|
68
|
+
* 2.2.5 use the SDK (or any part thereof) for any illegal purpose, in any manner
|
|
69
|
+
* that is inconsistent with the terms of this Agreement, or to engage in any
|
|
73
70
|
* illegal activity;
|
|
74
|
-
* 2.2.6 use the SDK (or any part thereof) in any manner that may damage the
|
|
71
|
+
* 2.2.6 use the SDK (or any part thereof) in any manner that may damage the
|
|
75
72
|
* operation of Realsee’s products or services; or
|
|
76
|
-
* 2.2.7 use the SDK or any information contained therein or otherwise provided by
|
|
77
|
-
* Realsee for the purpose of developing, or having developed, any product
|
|
78
|
-
* competitive with any Realsee product or service, as determined by Realsee in its
|
|
73
|
+
* 2.2.7 use the SDK or any information contained therein or otherwise provided by
|
|
74
|
+
* Realsee for the purpose of developing, or having developed, any product
|
|
75
|
+
* competitive with any Realsee product or service, as determined by Realsee in its
|
|
79
76
|
* sole discretion;
|
|
80
77
|
* 2.2.8 include any portion of the SDK in Your Developer products.
|
|
81
|
-
* 2.3 Realsee has the right to impose reasonable conditions such as a reasonable
|
|
78
|
+
* 2.3 Realsee has the right to impose reasonable conditions such as a reasonable
|
|
82
79
|
* fee for use of the SDK in Integrated Product in the future.
|
|
83
|
-
* 2.4 You may make a limited number of copies of the SDK to be used by Your
|
|
84
|
-
* employees or consultants as provided herein, and not for general business
|
|
85
|
-
* purposes, and such employees or consultants shall be subject to the obligations
|
|
80
|
+
* 2.4 You may make a limited number of copies of the SDK to be used by Your
|
|
81
|
+
* employees or consultants as provided herein, and not for general business
|
|
82
|
+
* purposes, and such employees or consultants shall be subject to the obligations
|
|
86
83
|
* and restrictions in this Agreement.
|
|
87
|
-
* 2.5 All licenses not expressly granted in this Agreement are reserved and no
|
|
88
|
-
* other licenses, immunity, or rights, express or implied, are granted by Realsee,
|
|
84
|
+
* 2.5 All licenses not expressly granted in this Agreement are reserved and no
|
|
85
|
+
* other licenses, immunity, or rights, express or implied, are granted by Realsee,
|
|
89
86
|
* by implication, estoppel, or otherwise.
|
|
90
87
|
* 3. CONFIDENTIALITY.
|
|
91
|
-
* The SDK and all source code, Documentation, specifications, engineering details,
|
|
92
|
-
* and related information pertaining to the SDK, whether in oral, written,
|
|
93
|
-
* graphic, or electronic form, are and shall remain the confidential and
|
|
94
|
-
* proprietary information of Realsee or its licensors (collectively, the
|
|
95
|
-
* “Confidential Information”). You shall (i) disclose Confidential Information to
|
|
96
|
-
* only those directors and employees (collectively, “Affiliates”) whose duties
|
|
97
|
-
* justify their need to know such information and who have been clearly informed
|
|
98
|
-
* of their obligation to maintain the confidential, proprietary, and/or trade
|
|
99
|
-
* secret status of such Confidential Information; and (ii) use Confidential
|
|
100
|
-
* Information solely in accordance with the license granted hereunder. In any
|
|
101
|
-
* event, You and Your Affiliates shall treat Confidential Information as strictly
|
|
102
|
-
* confidential and shall use the same care to prevent disclosure of such
|
|
103
|
-
* information as You use with respect to Your own similar confidential and/or
|
|
104
|
-
* proprietary information, which shall not be less than the care a reasonable
|
|
105
|
-
* person would use under similar circumstances. All Confidential Information, and
|
|
106
|
-
* any copies thereof, shall be returned promptly to Realsee upon request. You
|
|
107
|
-
* shall ensure that Your Affiliates comply with the provisions of this Section 3,
|
|
108
|
-
* and You shall be liable for any breach of this Section 3 resulting from the act
|
|
109
|
-
* or omission of any of Your Affiliates. You shall not disclose Confidential
|
|
110
|
-
* Information to any third party, including, without limitation, any of Your
|
|
88
|
+
* The SDK and all source code, Documentation, specifications, engineering details,
|
|
89
|
+
* and related information pertaining to the SDK, whether in oral, written,
|
|
90
|
+
* graphic, or electronic form, are and shall remain the confidential and
|
|
91
|
+
* proprietary information of Realsee or its licensors (collectively, the
|
|
92
|
+
* “Confidential Information”). You shall (i) disclose Confidential Information to
|
|
93
|
+
* only those directors and employees (collectively, “Affiliates”) whose duties
|
|
94
|
+
* justify their need to know such information and who have been clearly informed
|
|
95
|
+
* of their obligation to maintain the confidential, proprietary, and/or trade
|
|
96
|
+
* secret status of such Confidential Information; and (ii) use Confidential
|
|
97
|
+
* Information solely in accordance with the license granted hereunder. In any
|
|
98
|
+
* event, You and Your Affiliates shall treat Confidential Information as strictly
|
|
99
|
+
* confidential and shall use the same care to prevent disclosure of such
|
|
100
|
+
* information as You use with respect to Your own similar confidential and/or
|
|
101
|
+
* proprietary information, which shall not be less than the care a reasonable
|
|
102
|
+
* person would use under similar circumstances. All Confidential Information, and
|
|
103
|
+
* any copies thereof, shall be returned promptly to Realsee upon request. You
|
|
104
|
+
* shall ensure that Your Affiliates comply with the provisions of this Section 3,
|
|
105
|
+
* and You shall be liable for any breach of this Section 3 resulting from the act
|
|
106
|
+
* or omission of any of Your Affiliates. You shall not disclose Confidential
|
|
107
|
+
* Information to any third party, including, without limitation, any of Your
|
|
111
108
|
* subcontractors.
|
|
112
109
|
* 4. PROPRIETARY RIGHTS.
|
|
113
|
-
* 4.1 As between You and Realsee, Realsee and/or its licensors retain ownership of
|
|
114
|
-
* all right, title, and interest in, to, and under the SDK, including, without
|
|
115
|
-
* limitation, all patents, copyrights, trade secrets, trademarks and other
|
|
116
|
-
* intellectual property and other proprietary rights therein, and reserve all
|
|
110
|
+
* 4.1 As between You and Realsee, Realsee and/or its licensors retain ownership of
|
|
111
|
+
* all right, title, and interest in, to, and under the SDK, including, without
|
|
112
|
+
* limitation, all patents, copyrights, trade secrets, trademarks and other
|
|
113
|
+
* intellectual property and other proprietary rights therein, and reserve all
|
|
117
114
|
* rights not expressly granted to You.
|
|
118
|
-
* 4.2 The items contained in the SDK are the intellectual property of Realsee and
|
|
119
|
-
* its licensors and are protected by PRC copyright and patent law, international
|
|
120
|
-
* treaty provisions and applicable laws of the country in which it is being used.
|
|
121
|
-
* You agree to protect all copyright and other ownership interests of Realsee
|
|
122
|
-
* and/or its licensors in all items in the SDK supplied under this License
|
|
123
|
-
* Agreement. You agree that all copies of the items in the SDK, reproduced for any
|
|
124
|
-
* reason by You, contain the same copyright notices, and other proprietary notices
|
|
125
|
-
* as appropriate, as appear on or in the original items delivered by Realsee in
|
|
126
|
-
* the SDK. Realsee and/or its licensors retain title and ownership of the items in
|
|
127
|
-
* the SDK, the media on which it is loaded, and all subsequent copies, regardless
|
|
128
|
-
* of the form or media in or on which the original and other copies may exist.
|
|
129
|
-
* Except as stated above, this Agreement does not grant You any rights to patents,
|
|
130
|
-
* copyrights, trade secrets, trademarks or any other rights in respect to the
|
|
115
|
+
* 4.2 The items contained in the SDK are the intellectual property of Realsee and
|
|
116
|
+
* its licensors and are protected by PRC copyright and patent law, international
|
|
117
|
+
* treaty provisions and applicable laws of the country in which it is being used.
|
|
118
|
+
* You agree to protect all copyright and other ownership interests of Realsee
|
|
119
|
+
* and/or its licensors in all items in the SDK supplied under this License
|
|
120
|
+
* Agreement. You agree that all copies of the items in the SDK, reproduced for any
|
|
121
|
+
* reason by You, contain the same copyright notices, and other proprietary notices
|
|
122
|
+
* as appropriate, as appear on or in the original items delivered by Realsee in
|
|
123
|
+
* the SDK. Realsee and/or its licensors retain title and ownership of the items in
|
|
124
|
+
* the SDK, the media on which it is loaded, and all subsequent copies, regardless
|
|
125
|
+
* of the form or media in or on which the original and other copies may exist.
|
|
126
|
+
* Except as stated above, this Agreement does not grant You any rights to patents,
|
|
127
|
+
* copyrights, trade secrets, trademarks or any other rights in respect to the
|
|
131
128
|
* items in the SDK.
|
|
132
129
|
* 5. TERM AND TERMINATION.
|
|
133
|
-
* 5.1 This Agreement is effective until terminated. Realsee has the right to
|
|
134
|
-
* terminate this Agreement immediately, without judicial intervention, if You fail
|
|
135
|
-
* to comply with any term herein. Upon any such termination You must remove all
|
|
136
|
-
* full and partial copies of the items in the SDK from Your computer and
|
|
130
|
+
* 5.1 This Agreement is effective until terminated. Realsee has the right to
|
|
131
|
+
* terminate this Agreement immediately, without judicial intervention, if You fail
|
|
132
|
+
* to comply with any term herein. Upon any such termination You must remove all
|
|
133
|
+
* full and partial copies of the items in the SDK from Your computer and
|
|
137
134
|
* discontinue the use of the items in the SDK.
|
|
138
|
-
* 5.2 Realsee may at any time, terminate the Agreement with You if: (A) You have
|
|
139
|
-
* breached any provision of the Agreement; or (B) Realsee is required to do so by
|
|
140
|
-
* law; or (C) Realsee decides to no longer provide the SDK or certain parts of the
|
|
141
|
-
* SDK to users in the country in which You are resident or from which You use the
|
|
142
|
-
* service, or the provision of the SDK or certain SDK services to You by Realsee
|
|
135
|
+
* 5.2 Realsee may at any time, terminate the Agreement with You if: (A) You have
|
|
136
|
+
* breached any provision of the Agreement; or (B) Realsee is required to do so by
|
|
137
|
+
* law; or (C) Realsee decides to no longer provide the SDK or certain parts of the
|
|
138
|
+
* SDK to users in the country in which You are resident or from which You use the
|
|
139
|
+
* service, or the provision of the SDK or certain SDK services to You by Realsee
|
|
143
140
|
* is, in Realsee's sole discretion, no longer legally or commercially viable.
|
|
144
|
-
* 5.3 When the Agreement comes to an end, all of the legal rights, obligations and
|
|
145
|
-
* liabilities that You and Realsee have benefited from, been subject to (or which
|
|
146
|
-
* have accrued over time whilst the Agreement has been in force) or which are
|
|
147
|
-
* expressed to continue indefinitely, shall be unaffected by this cessation, and
|
|
148
|
-
* the provisions of Section 3, 4, 6, 7 and 8 shall continue to apply to such
|
|
141
|
+
* 5.3 When the Agreement comes to an end, all of the legal rights, obligations and
|
|
142
|
+
* liabilities that You and Realsee have benefited from, been subject to (or which
|
|
143
|
+
* have accrued over time whilst the Agreement has been in force) or which are
|
|
144
|
+
* expressed to continue indefinitely, shall be unaffected by this cessation, and
|
|
145
|
+
* the provisions of Section 3, 4, 6, 7 and 8 shall continue to apply to such
|
|
149
146
|
* rights, obligations and liabilities indefinitely.
|
|
150
147
|
* 6. DISCLAIMER OF WARRANTY.
|
|
151
|
-
* YOU EXPRESSLY ACKNOWLEDGE AND AGREE THAT, TO THE EXTENT PERMITTED BY APPLICABLE
|
|
152
|
-
* LAW, USE OF THE SDK (OR ANY PART THEREOF) IS AT YOUR SOLE RISK AND THAT THE
|
|
153
|
-
* ENTIRE RISK AS TO SATISFACTORY QUALITY, PERFORMANCE, ACCURACY, AND EFFORT IS
|
|
154
|
-
* WITH YOU. REALSEE LICENSES THE SDK TO YOU ONLY ON AN "AS-IS" BASIS. REALSEE
|
|
155
|
-
* MAKES NO REPRESENTATION WITH RESPECT TO THE ADEQUACY OF ANY ITEMS IN THE SDK,
|
|
156
|
-
* WHETHER OR NOT USED BY YOU IN THE DEVELOPMENT OF INTEGRATED PRODUCT, FOR ANY
|
|
157
|
-
* PARTICULAR PURPOSE OR WITH RESPECT TO THEIR ADEQUACY TO PRODUCE ANY PARTICULAR
|
|
158
|
-
* RESULT. REALSEE AND ITS LICENSORS SHALL NOT BE LIABLE FOR LOSS OR DAMAGE ARISING
|
|
159
|
-
* OUT OF THIS AGREEMENT OR FROM THE DISTRIBUTION OR USE OF INTEGRATED PRODUCT
|
|
160
|
-
* CONTAINING PORTIONS OF THE SDK. REALSEE AND ITS LICENSORS DISCLAIM ALL
|
|
161
|
-
* WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED
|
|
162
|
-
* CONDITIONS OR WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
163
|
-
* OR NONINFRINGEMENT OF ANY THIRD PARTY RIGHT IN RESPECT OF THE ITEMS IN THE SDK
|
|
148
|
+
* YOU EXPRESSLY ACKNOWLEDGE AND AGREE THAT, TO THE EXTENT PERMITTED BY APPLICABLE
|
|
149
|
+
* LAW, USE OF THE SDK (OR ANY PART THEREOF) IS AT YOUR SOLE RISK AND THAT THE
|
|
150
|
+
* ENTIRE RISK AS TO SATISFACTORY QUALITY, PERFORMANCE, ACCURACY, AND EFFORT IS
|
|
151
|
+
* WITH YOU. REALSEE LICENSES THE SDK TO YOU ONLY ON AN "AS-IS" BASIS. REALSEE
|
|
152
|
+
* MAKES NO REPRESENTATION WITH RESPECT TO THE ADEQUACY OF ANY ITEMS IN THE SDK,
|
|
153
|
+
* WHETHER OR NOT USED BY YOU IN THE DEVELOPMENT OF INTEGRATED PRODUCT, FOR ANY
|
|
154
|
+
* PARTICULAR PURPOSE OR WITH RESPECT TO THEIR ADEQUACY TO PRODUCE ANY PARTICULAR
|
|
155
|
+
* RESULT. REALSEE AND ITS LICENSORS SHALL NOT BE LIABLE FOR LOSS OR DAMAGE ARISING
|
|
156
|
+
* OUT OF THIS AGREEMENT OR FROM THE DISTRIBUTION OR USE OF INTEGRATED PRODUCT
|
|
157
|
+
* CONTAINING PORTIONS OF THE SDK. REALSEE AND ITS LICENSORS DISCLAIM ALL
|
|
158
|
+
* WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED
|
|
159
|
+
* CONDITIONS OR WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
160
|
+
* OR NONINFRINGEMENT OF ANY THIRD PARTY RIGHT IN RESPECT OF THE ITEMS IN THE SDK
|
|
164
161
|
* OR ANY SERVICES RELATED TO THE SDK.
|
|
165
|
-
* REALSEE IS UNDER NO OBLIGATION TO PROVIDE ANY SUPPORT UNDER THIS LICENSE
|
|
166
|
-
* AGREEMENT, INCLUDING UPGRADES OR FUTURE VERSIONS OF THE SDK OR ANY PORTIONS
|
|
162
|
+
* REALSEE IS UNDER NO OBLIGATION TO PROVIDE ANY SUPPORT UNDER THIS LICENSE
|
|
163
|
+
* AGREEMENT, INCLUDING UPGRADES OR FUTURE VERSIONS OF THE SDK OR ANY PORTIONS
|
|
167
164
|
* THEREOF, TO YOU, END USER OR TO ANY OTHER PARTY.
|
|
168
165
|
* 7. LIMITATION OF LIABILITY.
|
|
169
|
-
* TO THE EXTENT NOT PROHIBITED BY APPLICABLE LAW, IN NO EVENT WILL REALSEE OR ITS
|
|
170
|
-
* LICENSORS BE LIABLE FOR ANY DIRECT, INCIDENTAL, SPECIAL, INDIRECT, OR
|
|
171
|
-
* CONSEQUENTIAL DAMAGES, INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF USE,
|
|
172
|
-
* LOSS OF BUSINESS, REVENUE, OR PROFITS, LOSS OF OPPORTUNITY (WHETHER DIRECT OR
|
|
173
|
-
* INDIRECT), CORRUPTION OR LOSS OF DATA, LOSS OF REPUTATION OR SAVINGS, DOWNTIME,
|
|
174
|
-
* OR DAMAGE TO, LOSS OF OR REPLACEMENT OF DATA OR TRANSACTIONS, COST OF
|
|
175
|
-
* PROCUREMENT OF SUBSTITUTE SERVICES, BUSINESS INTERRUPTION, OR ANY OTHER
|
|
176
|
-
* COMMERCIAL DAMAGES OR LOSSES, ARISING OUT OF OR RELATED TO YOUR USE OR INABILITY
|
|
177
|
-
* TO USE THE SDK (OR ANY PART THEREOF), ANY INTEGRATED PRODUCT, OR ANY THIRD PARTY
|
|
178
|
-
* SOFTWARE, APPLICATIONS, OR SERVICES IN CONJUNCTION WITH THE SDK (OR ANY PART
|
|
179
|
-
* THEREOF), HOWEVER CAUSED, REGARDLESS OF THE THEORY OF LIABILITY (CONTRACT, TORT,
|
|
180
|
-
* OR OTHERWISE) AND EVEN IF REALSEE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
|
181
|
-
* DAMAGES. IN NO EVENT WILL REALSEE’S TOTAL LIABILITY TO YOU FOR ALL DAMAGES
|
|
182
|
-
* EXCEED ONE HUNDRED DOLLARS ($100.00). THE FOREGOING LIMITATIONS WILL APPLY EVEN
|
|
183
|
-
* IF THE ABOVE STATED REMEDY FAILS OF ITS ESSENTIAL PURPOSE. THE LIMITATIONS
|
|
184
|
-
* CONTAINED IN SECTIONS 6 AND THIS SECTION 7 ARE A FUNDAMENTAL PART OF THE BASIS
|
|
185
|
-
* OF REALSEE’S BARGAIN HEREUNDER, AND REALSEE WOULD NOT ENTER INTO THIS AGREEMENT
|
|
166
|
+
* TO THE EXTENT NOT PROHIBITED BY APPLICABLE LAW, IN NO EVENT WILL REALSEE OR ITS
|
|
167
|
+
* LICENSORS BE LIABLE FOR ANY DIRECT, INCIDENTAL, SPECIAL, INDIRECT, OR
|
|
168
|
+
* CONSEQUENTIAL DAMAGES, INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF USE,
|
|
169
|
+
* LOSS OF BUSINESS, REVENUE, OR PROFITS, LOSS OF OPPORTUNITY (WHETHER DIRECT OR
|
|
170
|
+
* INDIRECT), CORRUPTION OR LOSS OF DATA, LOSS OF REPUTATION OR SAVINGS, DOWNTIME,
|
|
171
|
+
* OR DAMAGE TO, LOSS OF OR REPLACEMENT OF DATA OR TRANSACTIONS, COST OF
|
|
172
|
+
* PROCUREMENT OF SUBSTITUTE SERVICES, BUSINESS INTERRUPTION, OR ANY OTHER
|
|
173
|
+
* COMMERCIAL DAMAGES OR LOSSES, ARISING OUT OF OR RELATED TO YOUR USE OR INABILITY
|
|
174
|
+
* TO USE THE SDK (OR ANY PART THEREOF), ANY INTEGRATED PRODUCT, OR ANY THIRD PARTY
|
|
175
|
+
* SOFTWARE, APPLICATIONS, OR SERVICES IN CONJUNCTION WITH THE SDK (OR ANY PART
|
|
176
|
+
* THEREOF), HOWEVER CAUSED, REGARDLESS OF THE THEORY OF LIABILITY (CONTRACT, TORT,
|
|
177
|
+
* OR OTHERWISE) AND EVEN IF REALSEE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
|
178
|
+
* DAMAGES. IN NO EVENT WILL REALSEE’S TOTAL LIABILITY TO YOU FOR ALL DAMAGES
|
|
179
|
+
* EXCEED ONE HUNDRED DOLLARS ($100.00). THE FOREGOING LIMITATIONS WILL APPLY EVEN
|
|
180
|
+
* IF THE ABOVE STATED REMEDY FAILS OF ITS ESSENTIAL PURPOSE. THE LIMITATIONS
|
|
181
|
+
* CONTAINED IN SECTIONS 6 AND THIS SECTION 7 ARE A FUNDAMENTAL PART OF THE BASIS
|
|
182
|
+
* OF REALSEE’S BARGAIN HEREUNDER, AND REALSEE WOULD NOT ENTER INTO THIS AGREEMENT
|
|
186
183
|
* OR PROVIDE YOU WITH ACCESS TO THE SDK ABSENT SUCH LIMITATIONS.
|
|
187
184
|
* 8. INDEMNIFICATION.
|
|
188
|
-
* To the extent permitted by applicable law, You agree to indemnify, defend and
|
|
189
|
-
* hold harmless Realsee, its affiliates and each of their directors, officers,
|
|
190
|
-
* employees, independent contractors, and agents (each a “Realsee Indemnified
|
|
191
|
-
* Party”) from any and all claims, losses, liabilities, damages, expenses, and
|
|
192
|
-
* costs (including without limitation attorneys’ fees and court costs) incurred by
|
|
193
|
-
* a Realsee Indemnified Party as a result of: (i) Your non-compliance with any
|
|
194
|
-
* terms of this Agreement; (ii) Your use of the SDK (or any part thereof); or
|
|
195
|
-
* (iii) Your use of any Integrated Product, including any claim that Integrated
|
|
196
|
-
* Product infringes the copyright, trademark, trade secret or other intellectual
|
|
185
|
+
* To the extent permitted by applicable law, You agree to indemnify, defend and
|
|
186
|
+
* hold harmless Realsee, its affiliates and each of their directors, officers,
|
|
187
|
+
* employees, independent contractors, and agents (each a “Realsee Indemnified
|
|
188
|
+
* Party”) from any and all claims, losses, liabilities, damages, expenses, and
|
|
189
|
+
* costs (including without limitation attorneys’ fees and court costs) incurred by
|
|
190
|
+
* a Realsee Indemnified Party as a result of: (i) Your non-compliance with any
|
|
191
|
+
* terms of this Agreement; (ii) Your use of the SDK (or any part thereof); or
|
|
192
|
+
* (iii) Your use of any Integrated Product, including any claim that Integrated
|
|
193
|
+
* Product infringes the copyright, trademark, trade secret or other intellectual
|
|
197
194
|
* property right of a third party.
|
|
198
195
|
* 9. ACKNOWLEDGEMENTS.
|
|
199
|
-
* Portions of the SDK may utilize or include third party software and other
|
|
200
|
-
* copyrighted material. Acknowledgments, licensing terms, and disclaimers for such
|
|
201
|
-
* material are contained in Documentation for the SDK or may otherwise accompany
|
|
202
|
-
* such material, and Your use of such materials governed by their respective
|
|
203
|
-
* terms. In the event of conflict between the terms of this Agreement and an
|
|
204
|
-
* applicable open source or third party agreement, the open source or third party
|
|
205
|
-
* agreement will control solely with respect to the open source software or third
|
|
206
|
-
* party software. Moreover, You shall not subject any items (including not limited
|
|
207
|
-
* to source code, object code, and any software) included in the SDK to any open
|
|
196
|
+
* Portions of the SDK may utilize or include third party software and other
|
|
197
|
+
* copyrighted material. Acknowledgments, licensing terms, and disclaimers for such
|
|
198
|
+
* material are contained in Documentation for the SDK or may otherwise accompany
|
|
199
|
+
* such material, and Your use of such materials governed by their respective
|
|
200
|
+
* terms. In the event of conflict between the terms of this Agreement and an
|
|
201
|
+
* applicable open source or third party agreement, the open source or third party
|
|
202
|
+
* agreement will control solely with respect to the open source software or third
|
|
203
|
+
* party software. Moreover, You shall not subject any items (including not limited
|
|
204
|
+
* to source code, object code, and any software) included in the SDK to any open
|
|
208
205
|
* source license.
|
|
209
206
|
* 10. NON-BLOCKING OF REALSEE DEVELOPMENT.
|
|
210
|
-
* You acknowledge that Realsee is currently developing or may develop technologies
|
|
211
|
-
* and products in the future that have or may have design and/or functionality
|
|
212
|
-
* similar to Integrated Product that You may develop based on Your license herein.
|
|
213
|
-
* Nothing in this Agreement shall impair, limit or curtail Realsee's right to
|
|
214
|
-
* continue with its development, maintenance and/or distribution of Realsee's
|
|
207
|
+
* You acknowledge that Realsee is currently developing or may develop technologies
|
|
208
|
+
* and products in the future that have or may have design and/or functionality
|
|
209
|
+
* similar to Integrated Product that You may develop based on Your license herein.
|
|
210
|
+
* Nothing in this Agreement shall impair, limit or curtail Realsee's right to
|
|
211
|
+
* continue with its development, maintenance and/or distribution of Realsee's
|
|
215
212
|
* technology or products.
|
|
216
213
|
* 11. GENERAL.
|
|
217
|
-
* 11.1 Export Control. You may not use or otherwise export or re-export the SDK
|
|
218
|
-
* (or any part thereof) except as authorized by United States law and the laws of
|
|
219
|
-
* the jurisdiction(s) in which the SDK (or any part thereof) was obtained. In
|
|
220
|
-
* particular, but without limitation, the SDK may not be exported or re-exported
|
|
221
|
-
* (i) into any U.S. embargoed countries or (ii) to anyone on the U.S. Treasury
|
|
222
|
-
* Department's list of Specially Designated Nationals or the U.S. Department of
|
|
223
|
-
* Commerce Denied Person's List or Entity List. By using the SDK (or any part
|
|
224
|
-
* thereof), You represent and warrant that You are not located in any such country
|
|
214
|
+
* 11.1 Export Control. You may not use or otherwise export or re-export the SDK
|
|
215
|
+
* (or any part thereof) except as authorized by United States law and the laws of
|
|
216
|
+
* the jurisdiction(s) in which the SDK (or any part thereof) was obtained. In
|
|
217
|
+
* particular, but without limitation, the SDK may not be exported or re-exported
|
|
218
|
+
* (i) into any U.S. embargoed countries or (ii) to anyone on the U.S. Treasury
|
|
219
|
+
* Department's list of Specially Designated Nationals or the U.S. Department of
|
|
220
|
+
* Commerce Denied Person's List or Entity List. By using the SDK (or any part
|
|
221
|
+
* thereof), You represent and warrant that You are not located in any such country
|
|
225
222
|
* or on any such list.
|
|
226
|
-
* 11.2 Governing Law. This Agreement and the rights of the parties hereunder shall
|
|
227
|
-
* be governed by and construed in accordance with the laws of People’s Republic of
|
|
228
|
-
* China (for purpose of this Agreement, excluding Hong Kong, Taiwan, and Macau),
|
|
229
|
-
* without reference to its conflict of laws principles. Any dispute, controversy
|
|
230
|
-
* or claim arising from or in connection with this Agreement, or the breach,
|
|
231
|
-
* termination or invalidity thereof, shall be submitted to China International
|
|
232
|
-
* Economic and Trade Arbitration Commission (“CIETAC”) for arbitration in Beijing
|
|
233
|
-
* which shall be conducted in accordance with the CIETAC's arbitration rules in
|
|
234
|
-
* effect at the time of applying for arbitration. The arbitral award is final and
|
|
223
|
+
* 11.2 Governing Law. This Agreement and the rights of the parties hereunder shall
|
|
224
|
+
* be governed by and construed in accordance with the laws of People’s Republic of
|
|
225
|
+
* China (for purpose of this Agreement, excluding Hong Kong, Taiwan, and Macau),
|
|
226
|
+
* without reference to its conflict of laws principles. Any dispute, controversy
|
|
227
|
+
* or claim arising from or in connection with this Agreement, or the breach,
|
|
228
|
+
* termination or invalidity thereof, shall be submitted to China International
|
|
229
|
+
* Economic and Trade Arbitration Commission (“CIETAC”) for arbitration in Beijing
|
|
230
|
+
* which shall be conducted in accordance with the CIETAC's arbitration rules in
|
|
231
|
+
* effect at the time of applying for arbitration. The arbitral award is final and
|
|
235
232
|
* binding upon both parties.
|
|
236
|
-
* 11.3 Severability. If any provision of this Agreement is held by a court of
|
|
237
|
-
* competent jurisdiction to be unenforceable for any reason, the remaining
|
|
233
|
+
* 11.3 Severability. If any provision of this Agreement is held by a court of
|
|
234
|
+
* competent jurisdiction to be unenforceable for any reason, the remaining
|
|
238
235
|
* provisions hereof will be unaffected and remain in full force and effect.
|
|
239
|
-
* 11.4. Modifications. Realsee reserves the right, from time to time, with or
|
|
240
|
-
* without notice to You, to make revisions to this Agreement in our sole and
|
|
241
|
-
* absolute discretion. The most current version of this Agreement will supersede
|
|
242
|
-
* all previous versions and shall be made available on the website where the SDK
|
|
243
|
-
* is made available, or by such other means as Realsee may determine in its
|
|
244
|
-
* discretion. Any modified versions of this Agreement hereto shall take effect
|
|
245
|
-
* from the time that it is made available. You shall be responsible for regularly
|
|
246
|
-
* checking for notice of any such modifications. You agree that Your continued use
|
|
236
|
+
* 11.4. Modifications. Realsee reserves the right, from time to time, with or
|
|
237
|
+
* without notice to You, to make revisions to this Agreement in our sole and
|
|
238
|
+
* absolute discretion. The most current version of this Agreement will supersede
|
|
239
|
+
* all previous versions and shall be made available on the website where the SDK
|
|
240
|
+
* is made available, or by such other means as Realsee may determine in its
|
|
241
|
+
* discretion. Any modified versions of this Agreement hereto shall take effect
|
|
242
|
+
* from the time that it is made available. You shall be responsible for regularly
|
|
243
|
+
* checking for notice of any such modifications. You agree that Your continued use
|
|
247
244
|
* of the SDK constitutes Your agreement to the modified Agreement.
|
|
248
|
-
* 11.5 Relationship of the Parties. This Agreement will not be construed as
|
|
249
|
-
* creating an agency, partnership, joint venture, fiduciary duty, or any other
|
|
250
|
-
* form of legal association between You and Realsee, and You will not represent to
|
|
245
|
+
* 11.5 Relationship of the Parties. This Agreement will not be construed as
|
|
246
|
+
* creating an agency, partnership, joint venture, fiduciary duty, or any other
|
|
247
|
+
* form of legal association between You and Realsee, and You will not represent to
|
|
251
248
|
* the contrary, whether expressly, by implication, appearance, or otherwise.
|
|
252
|
-
* 11.6 Entire Agreement; Governing Language. This Agreement constitutes the entire
|
|
253
|
-
* agreement between You and Realsee with respect to the use of the SDK licensed
|
|
254
|
-
* hereunder and supersedes all prior understandings regarding such subject matter.
|
|
255
|
-
* No amendment to or modification of this Agreement will be binding unless in
|
|
256
|
-
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
249
|
+
* 11.6 Entire Agreement; Governing Language. This Agreement constitutes the entire
|
|
250
|
+
* agreement between You and Realsee with respect to the use of the SDK licensed
|
|
251
|
+
* hereunder and supersedes all prior understandings regarding such subject matter.
|
|
252
|
+
* No amendment to or modification of this Agreement will be binding unless in
|
|
253
|
+
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
257
254
|
* Agreement and all related documents shall be drafted in English.
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("three");function t(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var r=t(e),a=function(e,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},a(e,t)};function n(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var s=function(){function t(t){e.Loader.call(this,t),this.dracoLoader=null,this.ddsLoader=null}function r(){var e={};return{get:function(t){return e[t]},add:function(t,r){e[t]=r},remove:function(t){delete e[t]},removeAll:function(){e={}}}}t.prototype=Object.assign(Object.create(e.Loader.prototype),{constructor:t,load:function(t,r,a,n){var s,o=this;s=""!==this.resourcePath?this.resourcePath:""!==this.path?this.path:e.LoaderUtils.extractUrlBase(t),o.manager.itemStart(t);var i=function(e){n?n(e):console.error(e),o.manager.itemError(t),o.manager.itemEnd(t)},c=new e.FileLoader(o.manager);c.setPath(this.path),c.setResponseType("arraybuffer"),c.setRequestHeader(this.requestHeader),"use-credentials"===o.crossOrigin&&c.setWithCredentials(!0),c.load(t,(function(e){try{o.parse(e,s,(function(e){r(e),o.manager.itemEnd(t)}),i)}catch(e){i(e)}}),a,i)},setDRACOLoader:function(e){return this.dracoLoader=e,this},setDDSLoader:function(e){return this.ddsLoader=e,this},parse:function(t,r,u,d){var m,y={};if("string"==typeof t)m=t;else if(e.LoaderUtils.decodeText(new Uint8Array(t,0,4))===l){try{y[a.KHR_BINARY_GLTF]=new p(t)}catch(e){return void(d&&d(e))}m=y[a.KHR_BINARY_GLTF].content}else m=e.LoaderUtils.decodeText(new Uint8Array(t));var T=JSON.parse(m);if(void 0===T.asset||T.asset.version[0]<2)d&&d(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));else{if(T.extensionsUsed)for(var M=0;M<T.extensionsUsed.length;++M){var A=T.extensionsUsed[M],R=T.extensionsRequired||[];switch(A){case a.KHR_LIGHTS_PUNCTUAL:y[A]=new s(T);break;case a.KHR_MATERIALS_CLEARCOAT:y[A]=new i;break;case a.KHR_MATERIALS_TRANSMISSION:y[A]=new c;break;case a.KHR_MATERIALS_UNLIT:y[A]=new o;break;case a.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:y[A]=new g;break;case a.KHR_DRACO_MESH_COMPRESSION:y[A]=new h(T,this.dracoLoader);break;case a.MSFT_TEXTURE_DDS:y[A]=new n(this.ddsLoader);break;case a.KHR_TEXTURE_TRANSFORM:y[A]=new f;break;case a.KHR_MESH_QUANTIZATION:y[A]=new v;break;default:R.indexOf(A)>=0&&console.warn('THREE.GLTFLoader: Unknown extension "'+A+'".')}}var S=new j(T,y,{path:r||this.resourcePath||"",crossOrigin:this.crossOrigin,manager:this.manager});S.fileLoader.setRequestHeader(this.requestHeader),S.parse(u,d)}}});var a={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:"KHR_materials_pbrSpecularGlossiness",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",MSFT_TEXTURE_DDS:"MSFT_texture_dds"};function n(e){if(!e)throw new Error("THREE.GLTFLoader: Attempting to load .dds texture without importing DDSLoader");this.name=a.MSFT_TEXTURE_DDS,this.ddsLoader=e}function s(e){this.name=a.KHR_LIGHTS_PUNCTUAL;var t=e.extensions&&e.extensions[a.KHR_LIGHTS_PUNCTUAL]||{};this.lightDefs=t.lights||[]}function o(){this.name=a.KHR_MATERIALS_UNLIT}function i(){this.name=a.KHR_MATERIALS_CLEARCOAT}function c(){this.name=a.KHR_MATERIALS_TRANSMISSION}s.prototype.loadLight=function(t){var r,a=this.lightDefs[t],n=new e.Color(16777215);void 0!==a.color&&n.fromArray(a.color);var s=void 0!==a.range?a.range:0;switch(a.type){case"directional":(r=new e.DirectionalLight(n)).target.position.set(0,0,-1),r.add(r.target);break;case"point":(r=new e.PointLight(n)).distance=s;break;case"spot":(r=new e.SpotLight(n)).distance=s,a.spot=a.spot||{},a.spot.innerConeAngle=void 0!==a.spot.innerConeAngle?a.spot.innerConeAngle:0,a.spot.outerConeAngle=void 0!==a.spot.outerConeAngle?a.spot.outerConeAngle:Math.PI/4,r.angle=a.spot.outerConeAngle,r.penumbra=1-a.spot.innerConeAngle/a.spot.outerConeAngle,r.target.position.set(0,0,-1),r.add(r.target);break;default:throw new Error('THREE.GLTFLoader: Unexpected light type, "'+a.type+'".')}return r.position.set(0,0,0),r.decay=2,void 0!==a.intensity&&(r.intensity=a.intensity),r.name=a.name||"light_"+t,Promise.resolve(r)},o.prototype.getMaterialType=function(){return e.MeshBasicMaterial},o.prototype.extendParams=function(t,r,a){var n=[];t.color=new e.Color(1,1,1),t.opacity=1;var s=r.pbrMetallicRoughness;if(s){if(Array.isArray(s.baseColorFactor)){var o=s.baseColorFactor;t.color.fromArray(o),t.opacity=o[3]}void 0!==s.baseColorTexture&&n.push(a.assignTexture(t,"map",s.baseColorTexture))}return Promise.all(n)},i.prototype.getMaterialType=function(){return e.MeshPhysicalMaterial},i.prototype.extendParams=function(t,r,a){var n=[],s=r.extensions[this.name];if(void 0!==s.clearcoatFactor&&(t.clearcoat=s.clearcoatFactor),void 0!==s.clearcoatTexture&&n.push(a.assignTexture(t,"clearcoatMap",s.clearcoatTexture)),void 0!==s.clearcoatRoughnessFactor&&(t.clearcoatRoughness=s.clearcoatRoughnessFactor),void 0!==s.clearcoatRoughnessTexture&&n.push(a.assignTexture(t,"clearcoatRoughnessMap",s.clearcoatRoughnessTexture)),void 0!==s.clearcoatNormalTexture&&(n.push(a.assignTexture(t,"clearcoatNormalMap",s.clearcoatNormalTexture)),void 0!==s.clearcoatNormalTexture.scale)){var o=s.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new e.Vector2(o,o)}return Promise.all(n)},c.prototype.getMaterialType=function(){return e.MeshPhysicalMaterial},c.prototype.extendParams=function(e,t,r){var a=t.extensions[this.name];return void 0!==a.transmissionFactor&&(e.premultipliedAlpha=!0,e.transparent=!0,e.opacity=1,e.transparency=a.transmissionFactor,(e.map||e.color.r*e.color.g*e.color.b<.99)&&(e.transparency*=.75)),Promise.all([])};var l="glTF",u=12,d={JSON:1313821514,BIN:5130562};function p(t){this.name=a.KHR_BINARY_GLTF,this.content=null,this.body=null;var r=new DataView(t,0,u);if(this.header={magic:e.LoaderUtils.decodeText(new Uint8Array(t.slice(0,4))),version:r.getUint32(4,!0),length:r.getUint32(8,!0)},this.header.magic!==l)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");for(var n=new DataView(t,u),s=0;s<n.byteLength;){var o=n.getUint32(s,!0);s+=4;var i=n.getUint32(s,!0);if(s+=4,i===d.JSON){var c=new Uint8Array(t,u+s,o);this.content=e.LoaderUtils.decodeText(c)}else if(i===d.BIN){var p=u+s;this.body=t.slice(p,p+o)}s+=o}if(null===this.content)throw new Error("THREE.GLTFLoader: JSON content not found.")}function h(e,t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=a.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}function f(){this.name=a.KHR_TEXTURE_TRANSFORM}function m(t){e.MeshStandardMaterial.call(this),this.isGLTFSpecularGlossinessMaterial=!0;var r=["#ifdef USE_SPECULARMAP","\tuniform sampler2D specularMap;","#endif"].join("\n"),a=["#ifdef USE_GLOSSINESSMAP","\tuniform sampler2D glossinessMap;","#endif"].join("\n"),n=["vec3 specularFactor = specular;","#ifdef USE_SPECULARMAP","\tvec4 texelSpecular = texture2D( specularMap, vUv );","\ttexelSpecular = sRGBToLinear( texelSpecular );","\t// reads channel RGB, compatible with a glTF Specular-Glossiness (RGBA) texture","\tspecularFactor *= texelSpecular.rgb;","#endif"].join("\n"),s=["float glossinessFactor = glossiness;","#ifdef USE_GLOSSINESSMAP","\tvec4 texelGlossiness = texture2D( glossinessMap, vUv );","\t// reads channel A, compatible with a glTF Specular-Glossiness (RGBA) texture","\tglossinessFactor *= texelGlossiness.a;","#endif"].join("\n"),o=["PhysicalMaterial material;","material.diffuseColor = diffuseColor.rgb;","vec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );","float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );","material.specularRoughness = max( 1.0 - glossinessFactor, 0.0525 );// 0.0525 corresponds to the base mip of a 256 cubemap.","material.specularRoughness += geometryRoughness;","material.specularRoughness = min( material.specularRoughness, 1.0 );","material.specularColor = specularFactor.rgb;"].join("\n"),i={specular:{value:(new e.Color).setHex(16777215)},glossiness:{value:1},specularMap:{value:null},glossinessMap:{value:null}};this._extraUniforms=i,this.onBeforeCompile=function(e){for(var t in i)e.uniforms[t]=i[t];e.fragmentShader=e.fragmentShader.replace("uniform float roughness;","uniform vec3 specular;"),e.fragmentShader=e.fragmentShader.replace("uniform float metalness;","uniform float glossiness;"),e.fragmentShader=e.fragmentShader.replace("#include <roughnessmap_pars_fragment>",r),e.fragmentShader=e.fragmentShader.replace("#include <metalnessmap_pars_fragment>",a),e.fragmentShader=e.fragmentShader.replace("#include <roughnessmap_fragment>",n),e.fragmentShader=e.fragmentShader.replace("#include <metalnessmap_fragment>",s),e.fragmentShader=e.fragmentShader.replace("#include <lights_physical_fragment>",o)},Object.defineProperties(this,{specular:{get:function(){return i.specular.value},set:function(e){i.specular.value=e}},specularMap:{get:function(){return i.specularMap.value},set:function(e){i.specularMap.value=e}},glossiness:{get:function(){return i.glossiness.value},set:function(e){i.glossiness.value=e}},glossinessMap:{get:function(){return i.glossinessMap.value},set:function(e){i.glossinessMap.value=e,e?(this.defines.USE_GLOSSINESSMAP="",this.defines.USE_ROUGHNESSMAP=""):(delete this.defines.USE_ROUGHNESSMAP,delete this.defines.USE_GLOSSINESSMAP)}}}),delete this.metalness,delete this.roughness,delete this.metalnessMap,delete this.roughnessMap,this.setValues(t)}function g(){return{name:a.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS,specularGlossinessParams:["color","map","lightMap","lightMapIntensity","aoMap","aoMapIntensity","emissive","emissiveIntensity","emissiveMap","bumpMap","bumpScale","normalMap","normalMapType","displacementMap","displacementScale","displacementBias","specularMap","specular","glossinessMap","glossiness","alphaMap","envMap","envMapIntensity","refractionRatio"],getMaterialType:function(){return m},extendParams:function(t,r,a){var n=r.extensions[this.name];t.color=new e.Color(1,1,1),t.opacity=1;var s=[];if(Array.isArray(n.diffuseFactor)){var o=n.diffuseFactor;t.color.fromArray(o),t.opacity=o[3]}if(void 0!==n.diffuseTexture&&s.push(a.assignTexture(t,"map",n.diffuseTexture)),t.emissive=new e.Color(0,0,0),t.glossiness=void 0!==n.glossinessFactor?n.glossinessFactor:1,t.specular=new e.Color(1,1,1),Array.isArray(n.specularFactor)&&t.specular.fromArray(n.specularFactor),void 0!==n.specularGlossinessTexture){var i=n.specularGlossinessTexture;s.push(a.assignTexture(t,"glossinessMap",i)),s.push(a.assignTexture(t,"specularMap",i))}return Promise.all(s)},createMaterial:function(t){var r=new m(t);return r.fog=!0,r.color=t.color,r.map=void 0===t.map?null:t.map,r.lightMap=null,r.lightMapIntensity=1,r.aoMap=void 0===t.aoMap?null:t.aoMap,r.aoMapIntensity=1,r.emissive=t.emissive,r.emissiveIntensity=1,r.emissiveMap=void 0===t.emissiveMap?null:t.emissiveMap,r.bumpMap=void 0===t.bumpMap?null:t.bumpMap,r.bumpScale=1,r.normalMap=void 0===t.normalMap?null:t.normalMap,r.normalMapType=e.TangentSpaceNormalMap,t.normalScale&&(r.normalScale=t.normalScale),r.displacementMap=null,r.displacementScale=1,r.displacementBias=0,r.specularMap=void 0===t.specularMap?null:t.specularMap,r.specular=t.specular,r.glossinessMap=void 0===t.glossinessMap?null:t.glossinessMap,r.glossiness=t.glossiness,r.alphaMap=null,r.envMap=void 0===t.envMap?null:t.envMap,r.envMapIntensity=1,r.refractionRatio=.98,r}}}function v(){this.name=a.KHR_MESH_QUANTIZATION}function y(t,r,a,n){e.Interpolant.call(this,t,r,a,n)}h.prototype.decodePrimitive=function(e,t){var r=this.json,a=this.dracoLoader,n=e.extensions[this.name].bufferView,s=e.extensions[this.name].attributes,o={},i={},c={};for(var l in s){var u=I[l]||l.toLowerCase();o[u]=s[l]}for(l in e.attributes){u=I[l]||l.toLowerCase();if(void 0!==s[l]){var d=r.accessors[e.attributes[l]],p=L[d.componentType];c[u]=p,i[u]=!0===d.normalized}}return t.getDependency("bufferView",n).then((function(e){return new Promise((function(t){a.decodeDracoFile(e,(function(e){for(var r in e.attributes){var a=e.attributes[r],n=i[r];void 0!==n&&(a.normalized=n)}t(e)}),o,c)}))}))},f.prototype.extendTexture=function(e,t){return e=e.clone(),void 0!==t.offset&&e.offset.fromArray(t.offset),void 0!==t.rotation&&(e.rotation=t.rotation),void 0!==t.scale&&e.repeat.fromArray(t.scale),void 0!==t.texCoord&&console.warn('THREE.GLTFLoader: Custom UV sets in "'+this.name+'" extension not yet supported.'),e.needsUpdate=!0,e},m.prototype=Object.create(e.MeshStandardMaterial.prototype),m.prototype.constructor=m,m.prototype.copy=function(t){return e.MeshStandardMaterial.prototype.copy.call(this,t),this.specularMap=t.specularMap,this.specular.copy(t.specular),this.glossinessMap=t.glossinessMap,this.glossiness=t.glossiness,delete this.metalness,delete this.roughness,delete this.metalnessMap,delete this.roughnessMap,this},y.prototype=Object.create(e.Interpolant.prototype),y.prototype.constructor=y,y.prototype.copySampleValue_=function(e){for(var t=this.resultBuffer,r=this.sampleValues,a=this.valueSize,n=e*a*3+a,s=0;s!==a;s++)t[s]=r[n+s];return t},y.prototype.beforeStart_=y.prototype.copySampleValue_,y.prototype.afterEnd_=y.prototype.copySampleValue_,y.prototype.interpolate_=function(e,t,r,a){for(var n=this.resultBuffer,s=this.sampleValues,o=this.valueSize,i=2*o,c=3*o,l=a-t,u=(r-t)/l,d=u*u,p=d*u,h=e*c,f=h-c,m=-2*p+3*d,g=p-d,v=1-m,y=g-d+u,T=0;T!==o;T++){var M=s[f+T+o],A=s[f+T+i]*l,R=s[h+T+o],S=s[h+T]*l;n[T]=v*M+y*A+m*R+g*S}return n};var T=0,M=1,A=2,R=3,S=4,b=5,w=6,L={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},_={9728:e.NearestFilter,9729:e.LinearFilter,9984:e.NearestMipmapNearestFilter,9985:e.LinearMipmapNearestFilter,9986:e.NearestMipmapLinearFilter,9987:e.LinearMipmapLinearFilter},E={33071:e.ClampToEdgeWrapping,33648:e.MirroredRepeatWrapping,10497:e.RepeatWrapping},x={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},I={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv2",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},C={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},D={CUBICSPLINE:void 0,LINEAR:e.InterpolateLinear,STEP:e.InterpolateDiscrete},P="OPAQUE",O="MASK",U="BLEND",F={"image/png":e.RGBAFormat,"image/jpeg":e.RGBFormat};function k(e,t){return"string"!=typeof e||""===e?"":(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}function H(e,t,r){for(var a in r.extensions)void 0===e[a]&&(t.userData.gltfExtensions=t.userData.gltfExtensions||{},t.userData.gltfExtensions[a]=r.extensions[a])}function N(e,t){void 0!==t.extras&&("object"==typeof t.extras?Object.assign(e.userData,t.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+t.extras))}function G(e,t){if(e.updateMorphTargets(),void 0!==t.weights)for(var r=0,a=t.weights.length;r<a;r++)e.morphTargetInfluences[r]=t.weights[r];if(t.extras&&Array.isArray(t.extras.targetNames)){var n=t.extras.targetNames;if(e.morphTargetInfluences.length===n.length){e.morphTargetDictionary={};for(r=0,a=n.length;r<a;r++)e.morphTargetDictionary[n[r]]=r}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function B(e){for(var t="",r=Object.keys(e).sort(),a=0,n=r.length;a<n;a++)t+=r[a]+":"+e[r[a]]+";";return t}function j(t,a,n){this.json=t||{},this.extensions=a||{},this.options=n||{},this.cache=new r,this.associations=new Map,this.primitiveCache={},this.textureLoader=new e.TextureLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.fileLoader=new e.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),"use-credentials"===this.options.crossOrigin&&this.fileLoader.setWithCredentials(!0)}function K(t,r,a){var n=r.attributes,s=[];function o(e,r){return a.getDependency("accessor",e).then((function(e){t.setAttribute(r,e)}))}for(var i in n){var c=I[i]||i.toLowerCase();c in t.attributes||s.push(o(n[i],c))}if(void 0!==r.indices&&!t.index){var l=a.getDependency("accessor",r.indices).then((function(e){t.setIndex(e)}));s.push(l)}return N(t,r),function(t,r,a){var n=r.attributes,s=new e.Box3;if(void 0!==n.POSITION){var o=(h=a.json.accessors[n.POSITION]).min,i=h.max;if(void 0!==o&&void 0!==i){s.set(new e.Vector3(o[0],o[1],o[2]),new e.Vector3(i[0],i[1],i[2]));var c=r.targets;if(void 0!==c){for(var l=new e.Vector3,u=new e.Vector3,d=0,p=c.length;d<p;d++){var h,f=c[d];if(void 0!==f.POSITION)o=(h=a.json.accessors[f.POSITION]).min,i=h.max,void 0!==o&&void 0!==i?(u.setX(Math.max(Math.abs(o[0]),Math.abs(i[0]))),u.setY(Math.max(Math.abs(o[1]),Math.abs(i[1]))),u.setZ(Math.max(Math.abs(o[2]),Math.abs(i[2]))),l.max(u)):console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}s.expandByVector(l)}t.boundingBox=s;var m=new e.Sphere;s.getCenter(m.center),m.radius=s.min.distanceTo(s.max)/2,t.boundingSphere=m}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}(t,r,a),Promise.all(s).then((function(){return void 0!==r.targets?function(e,t,r){for(var a=!1,n=!1,s=0,o=t.length;s<o&&(void 0!==(l=t[s]).POSITION&&(a=!0),void 0!==l.NORMAL&&(n=!0),!a||!n);s++);if(!a&&!n)return Promise.resolve(e);var i=[],c=[];for(s=0,o=t.length;s<o;s++){var l=t[s];if(a){var u=void 0!==l.POSITION?r.getDependency("accessor",l.POSITION):e.attributes.position;i.push(u)}n&&(u=void 0!==l.NORMAL?r.getDependency("accessor",l.NORMAL):e.attributes.normal,c.push(u))}return Promise.all([Promise.all(i),Promise.all(c)]).then((function(t){var r=t[0],s=t[1];return a&&(e.morphAttributes.position=r),n&&(e.morphAttributes.normal=s),e.morphTargetsRelative=!0,e}))}(t,r.targets,a):t}))}function V(t,r){var a=t.getIndex();if(null===a){var n=[],s=t.getAttribute("position");if(void 0===s)return console.error("THREE.GLTFLoader.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),t;for(var o=0;o<s.count;o++)n.push(o);t.setIndex(n),a=t.getIndex()}var i=a.count-2,c=[];if(r===e.TriangleFanDrawMode)for(o=1;o<=i;o++)c.push(a.getX(0)),c.push(a.getX(o)),c.push(a.getX(o+1));else for(o=0;o<i;o++)o%2==0?(c.push(a.getX(o)),c.push(a.getX(o+1)),c.push(a.getX(o+2))):(c.push(a.getX(o+2)),c.push(a.getX(o+1)),c.push(a.getX(o)));c.length/3!==i&&console.error("THREE.GLTFLoader.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");var l=t.clone();return l.setIndex(c),l}return j.prototype.parse=function(e,t){var r=this,a=this.json,n=this.extensions;this.cache.removeAll(),this.markDefs(),Promise.all([this.getDependencies("scene"),this.getDependencies("animation"),this.getDependencies("camera")]).then((function(t){var s={scene:t[0][a.scene||0],scenes:t[0],animations:t[1],cameras:t[2],asset:a.asset,parser:r,userData:{}};H(n,s,a),N(s,a),e(s)})).catch(t)},j.prototype.markDefs=function(){for(var e=this.json.nodes||[],t=this.json.skins||[],r=this.json.meshes||[],a={},n={},s=0,o=t.length;s<o;s++)for(var i=t[s].joints,c=0,l=i.length;c<l;c++)e[i[c]].isBone=!0;for(var u=0,d=e.length;u<d;u++){var p=e[u];void 0!==p.mesh&&(void 0===a[p.mesh]&&(a[p.mesh]=n[p.mesh]=0),a[p.mesh]++,void 0!==p.skin&&(r[p.mesh].isSkinnedMesh=!0))}this.json.meshReferences=a,this.json.meshUses=n},j.prototype.getDependency=function(e,t){var r=e+":"+t,n=this.cache.get(r);if(!n){switch(e){case"scene":n=this.loadScene(t);break;case"node":n=this.loadNode(t);break;case"mesh":n=this.loadMesh(t);break;case"accessor":n=this.loadAccessor(t);break;case"bufferView":n=this.loadBufferView(t);break;case"buffer":n=this.loadBuffer(t);break;case"material":n=this.loadMaterial(t);break;case"texture":n=this.loadTexture(t);break;case"skin":n=this.loadSkin(t);break;case"animation":n=this.loadAnimation(t);break;case"camera":n=this.loadCamera(t);break;case"light":n=this.extensions[a.KHR_LIGHTS_PUNCTUAL].loadLight(t);break;default:throw new Error("Unknown type: "+e)}this.cache.add(r,n)}return n},j.prototype.getDependencies=function(e){var t=this.cache.get(e);if(!t){var r=this,a=this.json[e+("mesh"===e?"es":"s")]||[];t=Promise.all(a.map((function(t,a){return r.getDependency(e,a)}))),this.cache.add(e,t)}return t},j.prototype.loadBuffer=function(e){var t=this.json.buffers[e],r=this.fileLoader;if(t.type&&"arraybuffer"!==t.type)throw new Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(void 0===t.uri&&0===e)return Promise.resolve(this.extensions[a.KHR_BINARY_GLTF].body);var n=this.options;return new Promise((function(e,a){r.load(k(t.uri,n.path),e,void 0,(function(){a(new Error('THREE.GLTFLoader: Failed to load buffer "'+t.uri+'".'))}))}))},j.prototype.loadBufferView=function(e){var t=this.json.bufferViews[e];return this.getDependency("buffer",t.buffer).then((function(e){var r=t.byteLength||0,a=t.byteOffset||0;return e.slice(a,a+r)}))},j.prototype.loadAccessor=function(t){var r=this,a=this.json,n=this.json.accessors[t];if(void 0===n.bufferView&&void 0===n.sparse)return Promise.resolve(null);var s=[];return void 0!==n.bufferView?s.push(this.getDependency("bufferView",n.bufferView)):s.push(null),void 0!==n.sparse&&(s.push(this.getDependency("bufferView",n.sparse.indices.bufferView)),s.push(this.getDependency("bufferView",n.sparse.values.bufferView))),Promise.all(s).then((function(t){var s,o,i=t[0],c=x[n.type],l=L[n.componentType],u=l.BYTES_PER_ELEMENT,d=u*c,p=n.byteOffset||0,h=void 0!==n.bufferView?a.bufferViews[n.bufferView].byteStride:void 0,f=!0===n.normalized;if(h&&h!==d){var m=Math.floor(p/h),g="InterleavedBuffer:"+n.bufferView+":"+n.componentType+":"+m+":"+n.count,v=r.cache.get(g);v||(s=new l(i,m*h,n.count*h/u),v=new e.InterleavedBuffer(s,h/u),r.cache.add(g,v)),o=new e.InterleavedBufferAttribute(v,c,p%h/u,f)}else s=null===i?new l(n.count*c):new l(i,p,n.count*c),o=new e.BufferAttribute(s,c,f);if(void 0!==n.sparse){var y=x.SCALAR,T=L[n.sparse.indices.componentType],M=n.sparse.indices.byteOffset||0,A=n.sparse.values.byteOffset||0,R=new T(t[1],M,n.sparse.count*y),S=new l(t[2],A,n.sparse.count*c);null!==i&&(o=new e.BufferAttribute(o.array.slice(),o.itemSize,o.normalized));for(var b=0,w=R.length;b<w;b++){var _=R[b];if(o.setX(_,S[b*c]),c>=2&&o.setY(_,S[b*c+1]),c>=3&&o.setZ(_,S[b*c+2]),c>=4&&o.setW(_,S[b*c+3]),c>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return o}))},j.prototype.loadTexture=function(t){var r,n=this,s=this.json,o=this.options,i=this.textureLoader,c=self.URL||self.webkitURL,l=s.textures[t],u=l.extensions||{},d=(r=u[a.MSFT_TEXTURE_DDS]?s.images[u[a.MSFT_TEXTURE_DDS].source]:s.images[l.source]).uri,p=!1;return void 0!==r.bufferView&&(d=n.getDependency("bufferView",r.bufferView).then((function(e){p=!0;var t=new Blob([e],{type:r.mimeType});return d=c.createObjectURL(t)}))),Promise.resolve(d).then((function(e){var t=o.manager.getHandler(e);return t||(t=u[a.MSFT_TEXTURE_DDS]?n.extensions[a.MSFT_TEXTURE_DDS].ddsLoader:i),new Promise((function(r,a){t.load(k(e,o.path),r,void 0,a)}))})).then((function(a){!0===p&&c.revokeObjectURL(d),a.flipY=!1,l.name&&(a.name=l.name),r.mimeType in F&&(a.format=F[r.mimeType]);var o=(s.samplers||{})[l.sampler]||{};return a.magFilter=_[o.magFilter]||e.LinearFilter,a.minFilter=_[o.minFilter]||e.LinearMipmapLinearFilter,a.wrapS=E[o.wrapS]||e.RepeatWrapping,a.wrapT=E[o.wrapT]||e.RepeatWrapping,n.associations.set(a,{type:"textures",index:t}),a}))},j.prototype.assignTexture=function(t,r,n){var s=this;return this.getDependency("texture",n.index).then((function(o){if(!o.isCompressedTexture)switch(r){case"aoMap":case"emissiveMap":case"metalnessMap":case"normalMap":case"roughnessMap":o.format=e.RGBFormat}if(void 0===n.texCoord||0==n.texCoord||"aoMap"===r&&1==n.texCoord||console.warn("THREE.GLTFLoader: Custom UV set "+n.texCoord+" for texture "+r+" not yet supported."),s.extensions[a.KHR_TEXTURE_TRANSFORM]){var i=void 0!==n.extensions?n.extensions[a.KHR_TEXTURE_TRANSFORM]:void 0;if(i){var c=this.associations.get(o);o=s.extensions[a.KHR_TEXTURE_TRANSFORM].extendTexture(o,i),this.associations.set(o,c)}}t[r]=o}))},j.prototype.assignFinalMaterial=function(t){var r=t.geometry,a=t.material,n=void 0!==r.attributes.tangent,s=void 0!==r.attributes.color,o=void 0===r.attributes.normal,i=!0===t.isSkinnedMesh,c=Object.keys(r.morphAttributes).length>0,l=c&&void 0!==r.morphAttributes.normal;if(t.isPoints){var u="PointsMaterial:"+a.uuid,d=this.cache.get(u);d||(d=new e.PointsMaterial,e.Material.prototype.copy.call(d,a),d.color.copy(a.color),d.map=a.map,d.sizeAttenuation=!1,this.cache.add(u,d)),a=d}else if(t.isLine){u="LineBasicMaterial:"+a.uuid;var p=this.cache.get(u);p||(p=new e.LineBasicMaterial,e.Material.prototype.copy.call(p,a),p.color.copy(a.color),this.cache.add(u,p)),a=p}if(n||s||o||i||c){u="ClonedMaterial:"+a.uuid+":";a.isGLTFSpecularGlossinessMaterial&&(u+="specular-glossiness:"),i&&(u+="skinning:"),n&&(u+="vertex-tangents:"),s&&(u+="vertex-colors:"),o&&(u+="flat-shading:"),c&&(u+="morph-targets:"),l&&(u+="morph-normals:");var h=this.cache.get(u);h||(h=a.clone(),i&&(h.skinning=!0),n&&(h.vertexTangents=!0),s&&(h.vertexColors=!0),o&&(h.flatShading=!0),c&&(h.morphTargets=!0),l&&(h.morphNormals=!0),this.cache.add(u,h),this.associations.set(h,this.associations.get(a))),a=h}a.aoMap&&void 0===r.attributes.uv2&&void 0!==r.attributes.uv&&r.setAttribute("uv2",r.attributes.uv),a.normalScale&&!n&&(a.normalScale.y=-a.normalScale.y),a.clearcoatNormalScale&&!n&&(a.clearcoatNormalScale.y=-a.clearcoatNormalScale.y),t.material=a},j.prototype.loadMaterial=function(t){var r,n=this,s=this.json,o=this.extensions,i=s.materials[t],c={},l=i.extensions||{},u=[];if(l[a.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]){var d=o[a.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS];r=d.getMaterialType(),u.push(d.extendParams(c,i,n))}else if(l[a.KHR_MATERIALS_UNLIT]){var p=o[a.KHR_MATERIALS_UNLIT];r=p.getMaterialType(),u.push(p.extendParams(c,i,n))}else{r=e.MeshStandardMaterial;var h=i.pbrMetallicRoughness||{};if(c.color=new e.Color(1,1,1),c.opacity=1,Array.isArray(h.baseColorFactor)){var f=h.baseColorFactor;c.color.fromArray(f),c.opacity=f[3]}void 0!==h.baseColorTexture&&u.push(n.assignTexture(c,"map",h.baseColorTexture)),c.metalness=void 0!==h.metallicFactor?h.metallicFactor:1,c.roughness=void 0!==h.roughnessFactor?h.roughnessFactor:1,void 0!==h.metallicRoughnessTexture&&(u.push(n.assignTexture(c,"metalnessMap",h.metallicRoughnessTexture)),u.push(n.assignTexture(c,"roughnessMap",h.metallicRoughnessTexture)))}!0===i.doubleSided&&(c.side=e.DoubleSide);var g=i.alphaMode||P;if(g===U?(c.transparent=!0,c.depthWrite=!1):(c.transparent=!1,g===O&&(c.alphaTest=void 0!==i.alphaCutoff?i.alphaCutoff:.5)),void 0!==i.normalTexture&&r!==e.MeshBasicMaterial&&(u.push(n.assignTexture(c,"normalMap",i.normalTexture)),c.normalScale=new e.Vector2(1,1),void 0!==i.normalTexture.scale&&c.normalScale.set(i.normalTexture.scale,i.normalTexture.scale)),void 0!==i.occlusionTexture&&r!==e.MeshBasicMaterial&&(u.push(n.assignTexture(c,"aoMap",i.occlusionTexture)),void 0!==i.occlusionTexture.strength&&(c.aoMapIntensity=i.occlusionTexture.strength)),void 0!==i.emissiveFactor&&r!==e.MeshBasicMaterial&&(c.emissive=(new e.Color).fromArray(i.emissiveFactor)),void 0!==i.emissiveTexture&&r!==e.MeshBasicMaterial&&u.push(n.assignTexture(c,"emissiveMap",i.emissiveTexture)),l[a.KHR_MATERIALS_CLEARCOAT]){var v=o[a.KHR_MATERIALS_CLEARCOAT];r=v.getMaterialType(),u.push(v.extendParams(c,{extensions:l},n))}if(l[a.KHR_MATERIALS_TRANSMISSION]){v=o[a.KHR_MATERIALS_TRANSMISSION];r=v.getMaterialType(),u.push(v.extendParams(c,{extensions:l},n))}return Promise.all(u).then((function(){var s;return s=r===m?o[a.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(c):new r(c),i.name&&(s.name=i.name),s.map&&(s.map.encoding=e.sRGBEncoding),s.emissiveMap&&(s.emissiveMap.encoding=e.sRGBEncoding),N(s,i),n.associations.set(s,{type:"materials",index:t}),i.extensions&&H(o,s,i),s}))},j.prototype.loadGeometries=function(t){var r=this,n=this.extensions,s=this.primitiveCache;function o(e){return n[a.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(e,r).then((function(t){return K(t,e,r)}))}for(var i,c,l=[],u=0,d=t.length;u<d;u++){var p,h=t[u],f=(c=void 0,(c=(i=h).extensions&&i.extensions[a.KHR_DRACO_MESH_COMPRESSION])?"draco:"+c.bufferView+":"+c.indices+":"+B(c.attributes):i.indices+":"+B(i.attributes)+":"+i.mode),m=s[f];if(m)l.push(m.promise);else p=h.extensions&&h.extensions[a.KHR_DRACO_MESH_COMPRESSION]?o(h):K(new e.BufferGeometry,h,r),s[f]={primitive:h,promise:p},l.push(p)}return Promise.all(l)},j.prototype.loadMesh=function(t){for(var r,a=this,n=this.json.meshes[t],s=n.primitives,o=[],i=0,c=s.length;i<c;i++){var l=void 0===s[i].material?(void 0===(r=this.cache).DefaultMaterial&&(r.DefaultMaterial=new e.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:e.FrontSide})),r.DefaultMaterial):this.getDependency("material",s[i].material);o.push(l)}return o.push(a.loadGeometries(s)),Promise.all(o).then((function(r){for(var o=r.slice(0,r.length-1),i=r[r.length-1],c=[],l=0,u=i.length;l<u;l++){var d,p=i[l],h=s[l],f=o[l];if(h.mode===S||h.mode===b||h.mode===w||void 0===h.mode)!0!==(d=!0===n.isSkinnedMesh?new e.SkinnedMesh(p,f):new e.Mesh(p,f)).isSkinnedMesh||d.geometry.attributes.skinWeight.normalized||d.normalizeSkinWeights(),h.mode===b?d.geometry=V(d.geometry,e.TriangleStripDrawMode):h.mode===w&&(d.geometry=V(d.geometry,e.TriangleFanDrawMode));else if(h.mode===M)d=new e.LineSegments(p,f);else if(h.mode===R)d=new e.Line(p,f);else if(h.mode===A)d=new e.LineLoop(p,f);else{if(h.mode!==T)throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+h.mode);d=new e.Points(p,f)}Object.keys(d.geometry.morphAttributes).length>0&&G(d,n),d.name=n.name||"mesh_"+t,i.length>1&&(d.name+="_"+l),N(d,n),a.assignFinalMaterial(d),c.push(d)}if(1===c.length)return c[0];var m=new e.Group;for(l=0,u=c.length;l<u;l++)m.add(c[l]);return m}))},j.prototype.loadCamera=function(t){var r,a=this.json.cameras[t],n=a[a.type];if(n)return"perspective"===a.type?r=new e.PerspectiveCamera(e.MathUtils.radToDeg(n.yfov),n.aspectRatio||1,n.znear||1,n.zfar||2e6):"orthographic"===a.type&&(r=new e.OrthographicCamera(-n.xmag,n.xmag,n.ymag,-n.ymag,n.znear,n.zfar)),a.name&&(r.name=a.name),N(r,a),Promise.resolve(r);console.warn("THREE.GLTFLoader: Missing camera parameters.")},j.prototype.loadSkin=function(e){var t=this.json.skins[e],r={joints:t.joints};return void 0===t.inverseBindMatrices?Promise.resolve(r):this.getDependency("accessor",t.inverseBindMatrices).then((function(e){return r.inverseBindMatrices=e,r}))},j.prototype.loadAnimation=function(t){for(var r=this.json.animations[t],a=[],n=[],s=[],o=[],i=[],c=0,l=r.channels.length;c<l;c++){var u=r.channels[c],d=r.samplers[u.sampler],p=u.target,h=void 0!==p.node?p.node:p.id,f=void 0!==r.parameters?r.parameters[d.input]:d.input,m=void 0!==r.parameters?r.parameters[d.output]:d.output;a.push(this.getDependency("node",h)),n.push(this.getDependency("accessor",f)),s.push(this.getDependency("accessor",m)),o.push(d),i.push(p)}return Promise.all([Promise.all(a),Promise.all(n),Promise.all(s),Promise.all(o),Promise.all(i)]).then((function(a){for(var n=a[0],s=a[1],o=a[2],i=a[3],c=a[4],l=[],u=0,d=n.length;u<d;u++){var p=n[u],h=s[u],f=o[u],m=i[u],g=c[u];if(void 0!==p){var v;switch(p.updateMatrix(),p.matrixAutoUpdate=!0,C[g.path]){case C.weights:v=e.NumberKeyframeTrack;break;case C.rotation:v=e.QuaternionKeyframeTrack;break;default:v=e.VectorKeyframeTrack}var T=p.name?p.name:p.uuid,M=void 0!==m.interpolation?D[m.interpolation]:e.InterpolateLinear,A=[];C[g.path]===C.weights?p.traverse((function(e){!0===e.isMesh&&e.morphTargetInfluences&&A.push(e.name?e.name:e.uuid)})):A.push(T);var R=f.array;if(f.normalized){var S;if(R.constructor===Int8Array)S=1/127;else if(R.constructor===Uint8Array)S=1/255;else if(R.constructor==Int16Array)S=1/32767;else{if(R.constructor!==Uint16Array)throw new Error("THREE.GLTFLoader: Unsupported output accessor component type.");S=1/65535}for(var b=new Float32Array(R.length),w=0,L=R.length;w<L;w++)b[w]=R[w]*S;R=b}for(w=0,L=A.length;w<L;w++){var _=new v(A[w]+"."+C[g.path],h.array,R,M);"CUBICSPLINE"===m.interpolation&&(_.createInterpolant=function(e){return new y(this.times,this.values,this.getValueSize()/3,e)},_.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),l.push(_)}}}var E=r.name?r.name:"animation_"+t;return new e.AnimationClip(E,void 0,l)}))},j.prototype.loadNode=function(t){var r,n=this.json,s=this.extensions,o=this,i=n.meshReferences,c=n.meshUses,l=n.nodes[t];return(r=[],void 0!==l.mesh&&r.push(o.getDependency("mesh",l.mesh).then((function(e){var t;if(i[l.mesh]>1){var r=c[l.mesh]++;(t=e.clone()).name+="_instance_"+r}else t=e;return void 0!==l.weights&&t.traverse((function(e){if(e.isMesh)for(var t=0,r=l.weights.length;t<r;t++)e.morphTargetInfluences[t]=l.weights[t]})),t}))),void 0!==l.camera&&r.push(o.getDependency("camera",l.camera)),l.extensions&&l.extensions[a.KHR_LIGHTS_PUNCTUAL]&&void 0!==l.extensions[a.KHR_LIGHTS_PUNCTUAL].light&&r.push(o.getDependency("light",l.extensions[a.KHR_LIGHTS_PUNCTUAL].light)),Promise.all(r)).then((function(r){var a;if((a=!0===l.isBone?new e.Bone:r.length>1?new e.Group:1===r.length?r[0]:new e.Object3D)!==r[0])for(var n=0,i=r.length;n<i;n++)a.add(r[n]);if(l.name&&(a.userData.name=l.name,a.name=e.PropertyBinding.sanitizeNodeName(l.name)),N(a,l),l.extensions&&H(s,a,l),void 0!==l.matrix){var c=new e.Matrix4;c.fromArray(l.matrix),a.applyMatrix4(c)}else void 0!==l.translation&&a.position.fromArray(l.translation),void 0!==l.rotation&&a.quaternion.fromArray(l.rotation),void 0!==l.scale&&a.scale.fromArray(l.scale);return o.associations.set(a,{type:"nodes",index:t}),a}))},j.prototype.loadScene=function(){function t(r,a,n,s){var o=n.nodes[r];return s.getDependency("node",r).then((function(t){return void 0===o.skin?t:s.getDependency("skin",o.skin).then((function(e){for(var t=[],a=0,n=(r=e).joints.length;a<n;a++)t.push(s.getDependency("node",r.joints[a]));return Promise.all(t)})).then((function(a){return t.traverse((function(t){if(t.isMesh){for(var n=[],s=[],o=0,i=a.length;o<i;o++){var c=a[o];if(c){n.push(c);var l=new e.Matrix4;void 0!==r.inverseBindMatrices&&l.fromArray(r.inverseBindMatrices.array,16*o),s.push(l)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',r.joints[o])}t.bind(new e.Skeleton(n,s),t.matrixWorld)}})),t}));var r})).then((function(e){a.add(e);var r=[];if(o.children)for(var i=o.children,c=0,l=i.length;c<l;c++){var u=i[c];r.push(t(u,e,n,s))}return Promise.all(r)}))}return function(r){var a=this.json,n=this.extensions,s=this.json.scenes[r],o=new e.Group;s.name&&(o.name=s.name),N(o,s),s.extensions&&H(n,o,s);for(var i=s.nodes||[],c=[],l=0,u=i.length;l<u;l++)c.push(t(i[l],o,a,this));return Promise.all(c).then((function(){return o}))}}(),t}(),o=function(t){e.Loader.call(this,t),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}};o.prototype=Object.assign(Object.create(e.Loader.prototype),{constructor:o,setDecoderPath:function(e){return this.decoderPath=e,this},setDecoderConfig:function(e){return this.decoderConfig=e,this},setWorkerLimit:function(e){return this.workerLimit=e,this},setVerbosity:function(){console.warn("THREE.DRACOLoader: The .setVerbosity() method has been removed.")},setDrawMode:function(){console.warn("THREE.DRACOLoader: The .setDrawMode() method has been removed.")},setSkipDequantization:function(){console.warn("THREE.DRACOLoader: The .setSkipDequantization() method has been removed.")},load:function(t,r,a,n){var s=new e.FileLoader(this.manager);s.setPath(this.path),s.setResponseType("arraybuffer"),"use-credentials"===this.crossOrigin&&s.setWithCredentials(!0),s.load(t,(e=>{var t={attributeIDs:this.defaultAttributeIDs,attributeTypes:this.defaultAttributeTypes,useUniqueIDs:!1};this.decodeGeometry(e,t).then(r).catch(n)}),a,n)},decodeDracoFile:function(e,t,r,a){var n={attributeIDs:r||this.defaultAttributeIDs,attributeTypes:a||this.defaultAttributeTypes,useUniqueIDs:!!r};this.decodeGeometry(e,n).then(t)},decodeGeometry:function(e,t){for(var r in t.attributeTypes){var a=t.attributeTypes[r];void 0!==a.BYTES_PER_ELEMENT&&(t.attributeTypes[r]=a.name)}var n,s=JSON.stringify(t);if(o.taskCache.has(e)){var i=o.taskCache.get(e);if(i.key===s)return i.promise;if(0===e.byteLength)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}var c=this.workerNextTaskID++,l=e.byteLength,u=this._getWorker(c,l).then((r=>(n=r,new Promise(((r,a)=>{n._callbacks[c]={resolve:r,reject:a},n.postMessage({type:"decode",id:c,taskConfig:t,buffer:e},[e])}))))).then((e=>this._createGeometry(e.geometry)));return u.catch((()=>!0)).then((()=>{n&&c&&this._releaseTask(n,c)})),o.taskCache.set(e,{key:s,promise:u}),u},_createGeometry:function(t){var r=new e.BufferGeometry;t.index&&r.setIndex(new e.BufferAttribute(t.index.array,1));for(var a=0;a<t.attributes.length;a++){var n=t.attributes[a],s=n.name,o=n.array,i=n.itemSize;r.setAttribute(s,new e.BufferAttribute(o,i))}return r},_loadLibrary:function(t,r){var a=new e.FileLoader(this.manager);return a.setPath(this.decoderPath),a.setResponseType(r),new Promise(((e,r)=>{a.load(t,e,void 0,r)}))},preload:function(){return this._initDecoder(),this},_initDecoder:function(){if(this.decoderPending)return this.decoderPending;var e="object"!=typeof WebAssembly||"js"===this.decoderConfig.type,t=[];return e?t.push(this._loadLibrary("draco_decoder.js","text")):(t.push(this._loadLibrary("draco_wasm_wrapper.js","text")),t.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(t).then((t=>{var r=t[0];e||(this.decoderConfig.wasmBinary=t[1]);var a=o.DRACOWorker.toString(),n=["/* draco decoder */",r,"","/* worker */",a.substring(a.indexOf("{")+1,a.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([n]))})),this.decoderPending},_getWorker:function(e,t){return this._initDecoder().then((()=>{var r;this.workerPool.length<this.workerLimit?((r=new Worker(this.workerSourceURL))._callbacks={},r._taskCosts={},r._taskLoad=0,r.postMessage({type:"init",decoderConfig:this.decoderConfig}),r.onmessage=function(e){var t=e.data;switch(t.type){case"decode":r._callbacks[t.id].resolve(t);break;case"error":r._callbacks[t.id].reject(t);break;default:console.error('THREE.DRACOLoader: Unexpected message, "'+t.type+'"')}},this.workerPool.push(r)):this.workerPool.sort((function(e,t){return e._taskLoad>t._taskLoad?-1:1}));return(r=this.workerPool[this.workerPool.length-1])._taskCosts[e]=t,r._taskLoad+=t,r}))},_releaseTask:function(e,t){e._taskLoad-=e._taskCosts[t],delete e._callbacks[t],delete e._taskCosts[t]},debug:function(){console.log("Task load: ",this.workerPool.map((e=>e._taskLoad)))},dispose:function(){for(var e=0;e<this.workerPool.length;++e)this.workerPool[e].terminate();return this.workerPool.length=0,this}}),o.DRACOWorker=function(){var e,t;function r(e,t,r,a,n,s){var o,i,c=s.num_components(),l=r.num_points()*c;switch(n){case Float32Array:o=new e.DracoFloat32Array,t.GetAttributeFloatForAllPoints(r,s,o),i=new Float32Array(l);break;case Int8Array:o=new e.DracoInt8Array,t.GetAttributeInt8ForAllPoints(r,s,o),i=new Int8Array(l);break;case Int16Array:o=new e.DracoInt16Array,t.GetAttributeInt16ForAllPoints(r,s,o),i=new Int16Array(l);break;case Int32Array:o=new e.DracoInt32Array,t.GetAttributeInt32ForAllPoints(r,s,o),i=new Int32Array(l);break;case Uint8Array:o=new e.DracoUInt8Array,t.GetAttributeUInt8ForAllPoints(r,s,o),i=new Uint8Array(l);break;case Uint16Array:o=new e.DracoUInt16Array,t.GetAttributeUInt16ForAllPoints(r,s,o),i=new Uint16Array(l);break;case Uint32Array:o=new e.DracoUInt32Array,t.GetAttributeUInt32ForAllPoints(r,s,o),i=new Uint32Array(l);break;default:throw new Error("THREE.DRACOLoader: Unexpected attribute type.")}for(var u=0;u<l;u++)i[u]=o.GetValue(u);return e.destroy(o),{name:a,array:i,itemSize:c}}onmessage=function(a){var n=a.data;switch(n.type){case"init":e=n.decoderConfig,t=new Promise((function(t){e.onModuleLoaded=function(e){t({draco:e})},DracoDecoderModule(e)}));break;case"decode":var s=n.buffer,o=n.taskConfig;t.then((e=>{var t=e.draco,a=new t.Decoder,i=new t.DecoderBuffer;i.Init(new Int8Array(s),s.byteLength);try{var c=function(e,t,a,n){var s,o,i=n.attributeIDs,c=n.attributeTypes,l=t.GetEncodedGeometryType(a);if(l===e.TRIANGULAR_MESH)s=new e.Mesh,o=t.DecodeBufferToMesh(a,s);else{if(l!==e.POINT_CLOUD)throw new Error("THREE.DRACOLoader: Unexpected geometry type.");s=new e.PointCloud,o=t.DecodeBufferToPointCloud(a,s)}if(!o.ok()||0===s.ptr)throw new Error("THREE.DRACOLoader: Decoding failed: "+o.error_msg());var u={index:null,attributes:[]};for(var d in i){var p,h,f=self[c[d]];if(n.useUniqueIDs)h=i[d],p=t.GetAttributeByUniqueId(s,h);else{if(-1===(h=t.GetAttributeId(s,e[i[d]])))continue;p=t.GetAttribute(s,h)}u.attributes.push(r(e,t,s,d,f,p))}if(l===e.TRIANGULAR_MESH){for(var m=s.num_faces(),g=new Uint32Array(3*m),v=new e.DracoInt32Array,y=0;y<m;++y){t.GetFaceFromMesh(s,y,v);for(var T=0;T<3;++T)g[3*y+T]=v.GetValue(T)}u.index={array:g,itemSize:1},e.destroy(v)}return e.destroy(s),u}(t,a,i,o),l=c.attributes.map((e=>e.array.buffer));c.index&&l.push(c.index.array.buffer),self.postMessage({type:"decode",id:n.id,geometry:c},l)}catch(e){console.error(e),self.postMessage({type:"error",id:n.id,error:e.message})}finally{t.destroy(i),t.destroy(a)}}))}}},o.taskCache=new WeakMap,o.setDecoderPath=function(){console.warn("THREE.DRACOLoader: The .setDecoderPath() method has been removed. Use instance methods.")},o.setDecoderConfig=function(){console.warn("THREE.DRACOLoader: The .setDecoderConfig() method has been removed. Use instance methods.")},o.releaseDecoderModule=function(){console.warn("THREE.DRACOLoader: The .releaseDecoderModule() method has been removed. Use instance methods.")},o.getDecoderModule=function(){console.warn("THREE.DRACOLoader: The .getDecoderModule() method has been removed. Use instance methods.")};var i=function(t){e.CompressedTextureLoader.call(this,t)};i.prototype=Object.assign(Object.create(e.CompressedTextureLoader.prototype),{constructor:i,parse:function(t,r){var a={mipmaps:[],width:0,height:0,format:null,mipmapCount:1};function n(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}function s(e,t,r,a){for(var n=r*a*4,s=new Uint8Array(e,t,n),o=new Uint8Array(n),i=0,c=0,l=0;l<a;l++)for(var u=0;u<r;u++){var d=s[c],p=s[++c],h=s[++c],f=s[++c];c++,o[i]=h,o[++i]=p,o[++i]=d,o[++i]=f,i++}return o}var o,i=n("DXT1"),c=n("DXT3"),l=n("DXT5"),u=n("ETC1"),d=new Int32Array(t,0,31);if(542327876!==d[0])return console.error("THREE.DDSLoader.parse: Invalid magic number in DDS header."),a;if(4&!d[20])return console.error("THREE.DDSLoader.parse: Unsupported format, must contain a FourCC code."),a;var p,h=d[21],f=!1;switch(h){case i:o=8,a.format=e.RGB_S3TC_DXT1_Format;break;case c:o=16,a.format=e.RGBA_S3TC_DXT3_Format;break;case l:o=16,a.format=e.RGBA_S3TC_DXT5_Format;break;case u:o=8,a.format=e.RGB_ETC1_Format;break;default:if(!(32===d[22]&&16711680&d[23]&&65280&d[24]&&255&d[25]&&4278190080&d[26]))return console.error("THREE.DDSLoader.parse: Unsupported FourCC code ",(p=h,String.fromCharCode(255&p,p>>8&255,p>>16&255,p>>24&255))),a;f=!0,o=64,a.format=e.RGBAFormat}a.mipmapCount=1,131072&d[2]&&!1!==r&&(a.mipmapCount=Math.max(1,d[7]));var m=d[28];if(a.isCubemap=!!(512&m),a.isCubemap&&(!(1024&m)||!(2048&m)||!(4096&m)||!(8192&m)||!(16384&m)||!(32768&m)))return console.error("THREE.DDSLoader.parse: Incomplete cubemap faces"),a;a.width=d[4],a.height=d[3];for(var g=d[1]+4,v=a.isCubemap?6:1,y=0;y<v;y++)for(var T=a.width,M=a.height,A=0;A<a.mipmapCount;A++){if(f)var R=(S=s(t,g,T,M)).length;else{R=Math.max(4,T)/4*Math.max(4,M)/4*o;var S=new Uint8Array(t,g,R)}var b={data:S,width:T,height:M};a.mipmaps.push(b),g+=R,T=Math.max(T>>1,1),M=Math.max(M>>1,1)}return a}});var c=function(e){function t(t){var a=e.call(this)||this;return a.needsRender=!0,t&&t.children.length&&a.add.apply(a,t.children),a.mixer=new r.AnimationMixer(a),a}return n(t,e),t.prototype.clone=function(){var t=e.prototype.clone.call(this,!0),a=new r.AnimationMixer(t);return t.mixer=a,t.needsRender=!0,t},t}(r.Group),l=function(e){function t(t){var r=e.call(this,t)||this;return r.ddsLoader=new i(t),r.dracoLoader=new o(t),r.dracoLoader.setDecoderPath("https://vr-public.realsee-cdn.cn/release/static/image/release/five/resource/draco/1.5.6/"),r}return n(t,e),Object.defineProperty(t,"version",{get:function(){return"6.0.0-alpha.61"},enumerable:!1,configurable:!0}),t.prototype.load=function(t,r,a,n){return e.prototype.load.call(this,t,r,a,n)},t.prototype.parse=function(t,r,a,n){return e.prototype.parse.call(this,t,r,(function(e){var t=new c(e.scene),r=e.scenes.map((function(r){return r===e.scene?t:new c(r)}));a(Object.assign(e,{scene:t,scenes:r}))}),n)},t}(s);exports.DDSLoader=i,exports.DRACOLoader=o,exports.GLTFLoader=l,exports.GLTFObject=c,exports.THREEGLTFLoader=s;
|
|
255
|
+
*/"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("three");function Ge(p){const T=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(p){for(const u in p)if(u!=="default"){const m=Object.getOwnPropertyDescriptor(p,u);Object.defineProperty(T,u,m.get?m:{enumerable:!0,get:()=>p[u]})}}return T.default=p,Object.freeze(T)}const we=Ge(c);var be=function(p,T){return be=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,m){u.__proto__=m}||function(u,m){for(var g in m)Object.prototype.hasOwnProperty.call(m,g)&&(u[g]=m[g])},be(p,T)};function xe(p,T){if(typeof T!="function"&&T!==null)throw new TypeError("Class extends value "+String(T)+" is not a constructor or null");be(p,T);function u(){this.constructor=p}p.prototype=T===null?Object.create(T):(u.prototype=T.prototype,new u)}var Oe=function(){function p(e){c.Loader.call(this,e),this.dracoLoader=null,this.ddsLoader=null}p.prototype=Object.assign(Object.create(c.Loader.prototype),{constructor:p,load:function(e,r,n,t){var a=this,i;this.resourcePath!==""?i=this.resourcePath:this.path!==""?i=this.path:i=c.LoaderUtils.extractUrlBase(e),a.manager.itemStart(e);var s=function(f){t?t(f):console.error(f),a.manager.itemError(e),a.manager.itemEnd(e)},o=new c.FileLoader(a.manager);o.setPath(this.path),o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),a.crossOrigin==="use-credentials"&&o.setWithCredentials(!0),o.load(e,function(f){try{a.parse(f,i,function(l){r(l),a.manager.itemEnd(e)},s)}catch(l){s(l)}},n,s)},setDRACOLoader:function(e){return this.dracoLoader=e,this},setDDSLoader:function(e){return this.ddsLoader=e,this},parse:function(e,r,n,t){var a,i={};if(typeof e=="string")a=e;else{var s=c.LoaderUtils.decodeText(new Uint8Array(e,0,4));if(s===D){try{i[u.KHR_BINARY_GLTF]=new N(e)}catch(h){t&&t(h);return}a=i[u.KHR_BINARY_GLTF].content}else a=c.LoaderUtils.decodeText(new Uint8Array(e))}var o=JSON.parse(a);if(o.asset===void 0||o.asset.version[0]<2){t&&t(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}if(o.extensionsUsed)for(var f=0;f<o.extensionsUsed.length;++f){var l=o.extensionsUsed[f],v=o.extensionsRequired||[];switch(l){case u.KHR_LIGHTS_PUNCTUAL:i[l]=new g(o);break;case u.KHR_MATERIALS_CLEARCOAT:i[l]=new _;break;case u.KHR_MATERIALS_TRANSMISSION:i[l]=new O;break;case u.KHR_MATERIALS_UNLIT:i[l]=new A;break;case u.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:i[l]=new V;break;case u.KHR_DRACO_MESH_COMPRESSION:i[l]=new x(o,this.dracoLoader);break;case u.MSFT_TEXTURE_DDS:i[l]=new m(this.ddsLoader);break;case u.KHR_TEXTURE_TRANSFORM:i[l]=new w;break;case u.KHR_MESH_QUANTIZATION:i[l]=new $;break;default:v.indexOf(l)>=0&&console.warn('THREE.GLTFLoader: Unknown extension "'+l+'".')}}var d=new I(o,i,{path:r||this.resourcePath||"",crossOrigin:this.crossOrigin,manager:this.manager});d.fileLoader.setRequestHeader(this.requestHeader),d.parse(n,t)}});function T(){var e={};return{get:function(r){return e[r]},add:function(r,n){e[r]=n},remove:function(r){delete e[r]},removeAll:function(){e={}}}}var u={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:"KHR_materials_pbrSpecularGlossiness",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",MSFT_TEXTURE_DDS:"MSFT_texture_dds"};function m(e){if(!e)throw new Error("THREE.GLTFLoader: Attempting to load .dds texture without importing DDSLoader");this.name=u.MSFT_TEXTURE_DDS,this.ddsLoader=e}function g(e){this.name=u.KHR_LIGHTS_PUNCTUAL;var r=e.extensions&&e.extensions[u.KHR_LIGHTS_PUNCTUAL]||{};this.lightDefs=r.lights||[]}g.prototype.loadLight=function(e){var r=this.lightDefs[e],n,t=new c.Color(16777215);r.color!==void 0&&t.fromArray(r.color);var a=r.range!==void 0?r.range:0;switch(r.type){case"directional":n=new c.DirectionalLight(t),n.target.position.set(0,0,-1),n.add(n.target);break;case"point":n=new c.PointLight(t),n.distance=a;break;case"spot":n=new c.SpotLight(t),n.distance=a,r.spot=r.spot||{},r.spot.innerConeAngle=r.spot.innerConeAngle!==void 0?r.spot.innerConeAngle:0,r.spot.outerConeAngle=r.spot.outerConeAngle!==void 0?r.spot.outerConeAngle:Math.PI/4,n.angle=r.spot.outerConeAngle,n.penumbra=1-r.spot.innerConeAngle/r.spot.outerConeAngle,n.target.position.set(0,0,-1),n.add(n.target);break;default:throw new Error('THREE.GLTFLoader: Unexpected light type, "'+r.type+'".')}return n.position.set(0,0,0),n.decay=2,r.intensity!==void 0&&(n.intensity=r.intensity),n.name=r.name||"light_"+e,Promise.resolve(n)};function A(){this.name=u.KHR_MATERIALS_UNLIT}A.prototype.getMaterialType=function(){return c.MeshBasicMaterial},A.prototype.extendParams=function(e,r,n){var t=[];e.color=new c.Color(1,1,1),e.opacity=1;var a=r.pbrMetallicRoughness;if(a){if(Array.isArray(a.baseColorFactor)){var i=a.baseColorFactor;e.color.fromArray(i),e.opacity=i[3]}a.baseColorTexture!==void 0&&t.push(n.assignTexture(e,"map",a.baseColorTexture))}return Promise.all(t)};function _(){this.name=u.KHR_MATERIALS_CLEARCOAT}_.prototype.getMaterialType=function(){return c.MeshPhysicalMaterial},_.prototype.extendParams=function(e,r,n){var t=[],a=r.extensions[this.name];if(a.clearcoatFactor!==void 0&&(e.clearcoat=a.clearcoatFactor),a.clearcoatTexture!==void 0&&t.push(n.assignTexture(e,"clearcoatMap",a.clearcoatTexture)),a.clearcoatRoughnessFactor!==void 0&&(e.clearcoatRoughness=a.clearcoatRoughnessFactor),a.clearcoatRoughnessTexture!==void 0&&t.push(n.assignTexture(e,"clearcoatRoughnessMap",a.clearcoatRoughnessTexture)),a.clearcoatNormalTexture!==void 0&&(t.push(n.assignTexture(e,"clearcoatNormalMap",a.clearcoatNormalTexture)),a.clearcoatNormalTexture.scale!==void 0)){var i=a.clearcoatNormalTexture.scale;e.clearcoatNormalScale=new c.Vector2(i,i)}return Promise.all(t)};function O(){this.name=u.KHR_MATERIALS_TRANSMISSION}O.prototype.getMaterialType=function(){return c.MeshPhysicalMaterial},O.prototype.extendParams=function(e,r,n){var t=[],a=r.extensions[this.name];return a.transmissionFactor!==void 0&&(e.premultipliedAlpha=!0,e.transparent=!0,e.opacity=1,e.transparency=a.transmissionFactor,(e.map||e.color.r*e.color.g*e.color.b<.99)&&(e.transparency*=.75)),Promise.all(t)};var D="glTF",M=12,C={JSON:1313821514,BIN:5130562};function N(e){this.name=u.KHR_BINARY_GLTF,this.content=null,this.body=null;var r=new DataView(e,0,M);if(this.header={magic:c.LoaderUtils.decodeText(new Uint8Array(e.slice(0,4))),version:r.getUint32(4,!0),length:r.getUint32(8,!0)},this.header.magic!==D)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");for(var n=new DataView(e,M),t=0;t<n.byteLength;){var a=n.getUint32(t,!0);t+=4;var i=n.getUint32(t,!0);if(t+=4,i===C.JSON){var s=new Uint8Array(e,M+t,a);this.content=c.LoaderUtils.decodeText(s)}else if(i===C.BIN){var o=M+t;this.body=e.slice(o,o+a)}t+=a}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}function x(e,r){if(!r)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=u.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=r,this.dracoLoader.preload()}x.prototype.decodePrimitive=function(e,r){var n=this.json,t=this.dracoLoader,a=e.extensions[this.name].bufferView,i=e.extensions[this.name].attributes,s={},o={},f={};for(var l in i){var v=j[l]||l.toLowerCase();s[v]=i[l]}for(l in e.attributes){var v=j[l]||l.toLowerCase();if(i[l]!==void 0){var d=n.accessors[e.attributes[l]],h=ee[d.componentType];f[v]=h,o[v]=d.normalized===!0}}return r.getDependency("bufferView",a).then(function(y){return new Promise(function(E){t.decodeDracoFile(y,function(S){for(var R in S.attributes){var L=S.attributes[R],F=o[R];F!==void 0&&(L.normalized=F)}E(S)},s,f)})})};function w(){this.name=u.KHR_TEXTURE_TRANSFORM}w.prototype.extendTexture=function(e,r){return e=e.clone(),r.offset!==void 0&&e.offset.fromArray(r.offset),r.rotation!==void 0&&(e.rotation=r.rotation),r.scale!==void 0&&e.repeat.fromArray(r.scale),r.texCoord!==void 0&&console.warn('THREE.GLTFLoader: Custom UV sets in "'+this.name+'" extension not yet supported.'),e.needsUpdate=!0,e};function b(e){c.MeshStandardMaterial.call(this),this.isGLTFSpecularGlossinessMaterial=!0;var r=["#ifdef USE_SPECULARMAP"," uniform sampler2D specularMap;","#endif"].join(`
|
|
256
|
+
`),n=["#ifdef USE_GLOSSINESSMAP"," uniform sampler2D glossinessMap;","#endif"].join(`
|
|
257
|
+
`),t=["vec3 specularFactor = specular;","#ifdef USE_SPECULARMAP"," vec4 texelSpecular = texture2D( specularMap, vUv );"," texelSpecular = sRGBToLinear( texelSpecular );"," // reads channel RGB, compatible with a glTF Specular-Glossiness (RGBA) texture"," specularFactor *= texelSpecular.rgb;","#endif"].join(`
|
|
258
|
+
`),a=["float glossinessFactor = glossiness;","#ifdef USE_GLOSSINESSMAP"," vec4 texelGlossiness = texture2D( glossinessMap, vUv );"," // reads channel A, compatible with a glTF Specular-Glossiness (RGBA) texture"," glossinessFactor *= texelGlossiness.a;","#endif"].join(`
|
|
259
|
+
`),i=["PhysicalMaterial material;","material.diffuseColor = diffuseColor.rgb;","vec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );","float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );","material.specularRoughness = max( 1.0 - glossinessFactor, 0.0525 );// 0.0525 corresponds to the base mip of a 256 cubemap.","material.specularRoughness += geometryRoughness;","material.specularRoughness = min( material.specularRoughness, 1.0 );","material.specularColor = specularFactor.rgb;"].join(`
|
|
260
|
+
`),s={specular:{value:new c.Color().setHex(16777215)},glossiness:{value:1},specularMap:{value:null},glossinessMap:{value:null}};this._extraUniforms=s,this.onBeforeCompile=function(o){for(var f in s)o.uniforms[f]=s[f];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>",n),o.fragmentShader=o.fragmentShader.replace("#include <roughnessmap_fragment>",t),o.fragmentShader=o.fragmentShader.replace("#include <metalnessmap_fragment>",a),o.fragmentShader=o.fragmentShader.replace("#include <lights_physical_fragment>",i)},Object.defineProperties(this,{specular:{get:function(){return s.specular.value},set:function(o){s.specular.value=o}},specularMap:{get:function(){return s.specularMap.value},set:function(o){s.specularMap.value=o}},glossiness:{get:function(){return s.glossiness.value},set:function(o){s.glossiness.value=o}},glossinessMap:{get:function(){return s.glossinessMap.value},set:function(o){s.glossinessMap.value=o,o?(this.defines.USE_GLOSSINESSMAP="",this.defines.USE_ROUGHNESSMAP=""):(delete this.defines.USE_ROUGHNESSMAP,delete this.defines.USE_GLOSSINESSMAP)}}}),delete this.metalness,delete this.roughness,delete this.metalnessMap,delete this.roughnessMap,this.setValues(e)}b.prototype=Object.create(c.MeshStandardMaterial.prototype),b.prototype.constructor=b,b.prototype.copy=function(e){return c.MeshStandardMaterial.prototype.copy.call(this,e),this.specularMap=e.specularMap,this.specular.copy(e.specular),this.glossinessMap=e.glossinessMap,this.glossiness=e.glossiness,delete this.metalness,delete this.roughness,delete this.metalnessMap,delete this.roughnessMap,this};function V(){return{name:u.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS,specularGlossinessParams:["color","map","lightMap","lightMapIntensity","aoMap","aoMapIntensity","emissive","emissiveIntensity","emissiveMap","bumpMap","bumpScale","normalMap","normalMapType","displacementMap","displacementScale","displacementBias","specularMap","specular","glossinessMap","glossiness","alphaMap","envMap","envMapIntensity","refractionRatio"],getMaterialType:function(){return b},extendParams:function(e,r,n){var t=r.extensions[this.name];e.color=new c.Color(1,1,1),e.opacity=1;var a=[];if(Array.isArray(t.diffuseFactor)){var i=t.diffuseFactor;e.color.fromArray(i),e.opacity=i[3]}if(t.diffuseTexture!==void 0&&a.push(n.assignTexture(e,"map",t.diffuseTexture)),e.emissive=new c.Color(0,0,0),e.glossiness=t.glossinessFactor!==void 0?t.glossinessFactor:1,e.specular=new c.Color(1,1,1),Array.isArray(t.specularFactor)&&e.specular.fromArray(t.specularFactor),t.specularGlossinessTexture!==void 0){var s=t.specularGlossinessTexture;a.push(n.assignTexture(e,"glossinessMap",s)),a.push(n.assignTexture(e,"specularMap",s))}return Promise.all(a)},createMaterial:function(e){var r=new b(e);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=c.TangentSpaceNormalMap,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=.98,r}}}function $(){this.name=u.KHR_MESH_QUANTIZATION}function P(e,r,n,t){c.Interpolant.call(this,e,r,n,t)}P.prototype=Object.create(c.Interpolant.prototype),P.prototype.constructor=P,P.prototype.copySampleValue_=function(e){for(var r=this.resultBuffer,n=this.sampleValues,t=this.valueSize,a=e*t*3+t,i=0;i!==t;i++)r[i]=n[a+i];return r},P.prototype.beforeStart_=P.prototype.copySampleValue_,P.prototype.afterEnd_=P.prototype.copySampleValue_,P.prototype.interpolate_=function(e,r,n,t){for(var a=this.resultBuffer,i=this.sampleValues,s=this.valueSize,o=s*2,f=s*3,l=t-r,v=(n-r)/l,d=v*v,h=d*v,y=e*f,E=y-f,S=-2*h+3*d,R=h-d,L=1-S,F=R-d+v,G=0;G!==s;G++){var te=i[E+G+s],ne=i[E+G+o]*l,Q=i[y+G+s],B=i[y+G]*l;a[G]=L*te+F*ne+S*Q+R*B}return a};var H={FLOAT:5126,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,LINEAR:9729,REPEAT:10497,SAMPLER_2D:35678,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123},ee={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},re={9728:c.NearestFilter,9729:c.LinearFilter,9984:c.NearestMipmapNearestFilter,9985:c.LinearMipmapNearestFilter,9986:c.NearestMipmapLinearFilter,9987:c.LinearMipmapLinearFilter},J={33071:c.ClampToEdgeWrapping,33648:c.MirroredRepeatWrapping,10497:c.RepeatWrapping},W={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},j={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv2",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},X={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},ge={CUBICSPLINE:void 0,LINEAR:c.InterpolateLinear,STEP:c.InterpolateDiscrete},ie={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"},fe={"image/png":c.RGBAFormat,"image/jpeg":c.RGBFormat};function de(e,r){return typeof e!="string"||e===""?"":(/^https?:\/\//i.test(r)&&/^\//.test(e)&&(r=r.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:r+e)}function me(e){return e.DefaultMaterial===void 0&&(e.DefaultMaterial=new c.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:c.FrontSide})),e.DefaultMaterial}function se(e,r,n){for(var t in n.extensions)e[t]===void 0&&(r.userData.gltfExtensions=r.userData.gltfExtensions||{},r.userData.gltfExtensions[t]=n.extensions[t])}function Y(e,r){r.extras!==void 0&&(typeof r.extras=="object"?Object.assign(e.userData,r.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+r.extras))}function Ae(e,r,n){for(var t=!1,a=!1,i=0,s=r.length;i<s;i++){var o=r[i];if(o.POSITION!==void 0&&(t=!0),o.NORMAL!==void 0&&(a=!0),t&&a)break}if(!t&&!a)return Promise.resolve(e);for(var f=[],l=[],i=0,s=r.length;i<s;i++){var o=r[i];if(t){var v=o.POSITION!==void 0?n.getDependency("accessor",o.POSITION):e.attributes.position;f.push(v)}if(a){var v=o.NORMAL!==void 0?n.getDependency("accessor",o.NORMAL):e.attributes.normal;l.push(v)}}return Promise.all([Promise.all(f),Promise.all(l)]).then(function(d){var h=d[0],y=d[1];return t&&(e.morphAttributes.position=h),a&&(e.morphAttributes.normal=y),e.morphTargetsRelative=!0,e})}function Se(e,r){if(e.updateMorphTargets(),r.weights!==void 0)for(var n=0,t=r.weights.length;n<t;n++)e.morphTargetInfluences[n]=r.weights[n];if(r.extras&&Array.isArray(r.extras.targetNames)){var a=r.extras.targetNames;if(e.morphTargetInfluences.length===a.length){e.morphTargetDictionary={};for(var n=0,t=a.length;n<t;n++)e.morphTargetDictionary[a[n]]=n}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function ye(e){var r=e.extensions&&e.extensions[u.KHR_DRACO_MESH_COMPRESSION],n;return r?n="draco:"+r.bufferView+":"+r.indices+":"+U(r.attributes):n=e.indices+":"+U(e.attributes)+":"+e.mode,n}function U(e){for(var r="",n=Object.keys(e).sort(),t=0,a=n.length;t<a;t++)r+=n[t]+":"+e[n[t]]+";";return r}function I(e,r,n){this.json=e||{},this.extensions=r||{},this.options=n||{},this.cache=new T,this.associations=new Map,this.primitiveCache={},this.textureLoader=new c.TextureLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.fileLoader=new c.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}I.prototype.parse=function(e,r){var n=this,t=this.json,a=this.extensions;this.cache.removeAll(),this.markDefs(),Promise.all([this.getDependencies("scene"),this.getDependencies("animation"),this.getDependencies("camera")]).then(function(i){var s={scene:i[0][t.scene||0],scenes:i[0],animations:i[1],cameras:i[2],asset:t.asset,parser:n,userData:{}};se(a,s,t),Y(s,t),e(s)}).catch(r)},I.prototype.markDefs=function(){for(var e=this.json.nodes||[],r=this.json.skins||[],n=this.json.meshes||[],t={},a={},i=0,s=r.length;i<s;i++)for(var o=r[i].joints,f=0,l=o.length;f<l;f++)e[o[f]].isBone=!0;for(var v=0,d=e.length;v<d;v++){var h=e[v];h.mesh!==void 0&&(t[h.mesh]===void 0&&(t[h.mesh]=a[h.mesh]=0),t[h.mesh]++,h.skin!==void 0&&(n[h.mesh].isSkinnedMesh=!0))}this.json.meshReferences=t,this.json.meshUses=a},I.prototype.getDependency=function(e,r){var n=e+":"+r,t=this.cache.get(n);if(!t){switch(e){case"scene":t=this.loadScene(r);break;case"node":t=this.loadNode(r);break;case"mesh":t=this.loadMesh(r);break;case"accessor":t=this.loadAccessor(r);break;case"bufferView":t=this.loadBufferView(r);break;case"buffer":t=this.loadBuffer(r);break;case"material":t=this.loadMaterial(r);break;case"texture":t=this.loadTexture(r);break;case"skin":t=this.loadSkin(r);break;case"animation":t=this.loadAnimation(r);break;case"camera":t=this.loadCamera(r);break;case"light":t=this.extensions[u.KHR_LIGHTS_PUNCTUAL].loadLight(r);break;default:throw new Error("Unknown type: "+e)}this.cache.add(n,t)}return t},I.prototype.getDependencies=function(e){var r=this.cache.get(e);if(!r){var n=this,t=this.json[e+(e==="mesh"?"es":"s")]||[];r=Promise.all(t.map(function(a,i){return n.getDependency(e,i)})),this.cache.add(e,r)}return r},I.prototype.loadBuffer=function(e){var r=this.json.buffers[e],n=this.fileLoader;if(r.type&&r.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+r.type+" buffer type is not supported.");if(r.uri===void 0&&e===0)return Promise.resolve(this.extensions[u.KHR_BINARY_GLTF].body);var t=this.options;return new Promise(function(a,i){n.load(de(r.uri,t.path),a,void 0,function(){i(new Error('THREE.GLTFLoader: Failed to load buffer "'+r.uri+'".'))})})},I.prototype.loadBufferView=function(e){var r=this.json.bufferViews[e];return this.getDependency("buffer",r.buffer).then(function(n){var t=r.byteLength||0,a=r.byteOffset||0;return n.slice(a,a+t)})},I.prototype.loadAccessor=function(e){var r=this,n=this.json,t=this.json.accessors[e];if(t.bufferView===void 0&&t.sparse===void 0)return Promise.resolve(null);var a=[];return t.bufferView!==void 0?a.push(this.getDependency("bufferView",t.bufferView)):a.push(null),t.sparse!==void 0&&(a.push(this.getDependency("bufferView",t.sparse.indices.bufferView)),a.push(this.getDependency("bufferView",t.sparse.values.bufferView))),Promise.all(a).then(function(i){var s=i[0],o=W[t.type],f=ee[t.componentType],l=f.BYTES_PER_ELEMENT,v=l*o,d=t.byteOffset||0,h=t.bufferView!==void 0?n.bufferViews[t.bufferView].byteStride:void 0,y=t.normalized===!0,E,S;if(h&&h!==v){var R=Math.floor(d/h),L="InterleavedBuffer:"+t.bufferView+":"+t.componentType+":"+R+":"+t.count,F=r.cache.get(L);F||(E=new f(s,R*h,t.count*h/l),F=new c.InterleavedBuffer(E,h/l),r.cache.add(L,F)),S=new c.InterleavedBufferAttribute(F,o,d%h/l,y)}else s===null?E=new f(t.count*o):E=new f(s,d,t.count*o),S=new c.BufferAttribute(E,o,y);if(t.sparse!==void 0){var G=W.SCALAR,te=ee[t.sparse.indices.componentType],ne=t.sparse.indices.byteOffset||0,Q=t.sparse.values.byteOffset||0,B=new te(i[1],ne,t.sparse.count*G),oe=new f(i[2],Q,t.sparse.count*o);s!==null&&(S=new c.BufferAttribute(S.array.slice(),S.itemSize,S.normalized));for(var k=0,Le=B.length;k<Le;k++){var ae=B[k];if(S.setX(ae,oe[k*o]),o>=2&&S.setY(ae,oe[k*o+1]),o>=3&&S.setZ(ae,oe[k*o+2]),o>=4&&S.setW(ae,oe[k*o+3]),o>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return S})},I.prototype.loadTexture=function(e){var r=this,n=this.json,t=this.options,a=this.textureLoader,i=self.URL||self.webkitURL,s=n.textures[e],o=s.extensions||{},f;o[u.MSFT_TEXTURE_DDS]?f=n.images[o[u.MSFT_TEXTURE_DDS].source]:f=n.images[s.source];var l=f.uri,v=!1;return f.bufferView!==void 0&&(l=r.getDependency("bufferView",f.bufferView).then(function(d){v=!0;var h=new Blob([d],{type:f.mimeType});return l=i.createObjectURL(h),l})),Promise.resolve(l).then(function(d){var h=t.manager.getHandler(d);return h||(h=o[u.MSFT_TEXTURE_DDS]?r.extensions[u.MSFT_TEXTURE_DDS].ddsLoader:a),new Promise(function(y,E){h.load(de(d,t.path),y,void 0,E)})}).then(function(d){v===!0&&i.revokeObjectURL(l),d.flipY=!1,s.name&&(d.name=s.name),f.mimeType in fe&&(d.format=fe[f.mimeType]);var h=n.samplers||{},y=h[s.sampler]||{};return d.magFilter=re[y.magFilter]||c.LinearFilter,d.minFilter=re[y.minFilter]||c.LinearMipmapLinearFilter,d.wrapS=J[y.wrapS]||c.RepeatWrapping,d.wrapT=J[y.wrapT]||c.RepeatWrapping,r.associations.set(d,{type:"textures",index:e}),d})},I.prototype.assignTexture=function(e,r,n){var t=this;return this.getDependency("texture",n.index).then(function(a){if(!a.isCompressedTexture)switch(r){case"aoMap":case"emissiveMap":case"metalnessMap":case"normalMap":case"roughnessMap":a.format=c.RGBFormat;break}if(n.texCoord!==void 0&&n.texCoord!=0&&!(r==="aoMap"&&n.texCoord==1)&&console.warn("THREE.GLTFLoader: Custom UV set "+n.texCoord+" for texture "+r+" not yet supported."),t.extensions[u.KHR_TEXTURE_TRANSFORM]){var i=n.extensions!==void 0?n.extensions[u.KHR_TEXTURE_TRANSFORM]:void 0;if(i){var s=this.associations.get(a);a=t.extensions[u.KHR_TEXTURE_TRANSFORM].extendTexture(a,i),this.associations.set(a,s)}}e[r]=a})},I.prototype.assignFinalMaterial=function(e){var r=e.geometry,n=e.material,t=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;if(e.isPoints){var l="PointsMaterial:"+n.uuid,v=this.cache.get(l);v||(v=new c.PointsMaterial,c.Material.prototype.copy.call(v,n),v.color.copy(n.color),v.map=n.map,v.sizeAttenuation=!1,this.cache.add(l,v)),n=v}else if(e.isLine){var l="LineBasicMaterial:"+n.uuid,d=this.cache.get(l);d||(d=new c.LineBasicMaterial,c.Material.prototype.copy.call(d,n),d.color.copy(n.color),this.cache.add(l,d)),n=d}if(t||a||i||s||o){var l="ClonedMaterial:"+n.uuid+":";n.isGLTFSpecularGlossinessMaterial&&(l+="specular-glossiness:"),s&&(l+="skinning:"),t&&(l+="vertex-tangents:"),a&&(l+="vertex-colors:"),i&&(l+="flat-shading:"),o&&(l+="morph-targets:"),f&&(l+="morph-normals:");var h=this.cache.get(l);h||(h=n.clone(),s&&(h.skinning=!0),t&&(h.vertexTangents=!0),a&&(h.vertexColors=!0),i&&(h.flatShading=!0),o&&(h.morphTargets=!0),f&&(h.morphNormals=!0),this.cache.add(l,h),this.associations.set(h,this.associations.get(n))),n=h}n.aoMap&&r.attributes.uv2===void 0&&r.attributes.uv!==void 0&&r.setAttribute("uv2",r.attributes.uv),n.normalScale&&!t&&(n.normalScale.y=-n.normalScale.y),n.clearcoatNormalScale&&!t&&(n.clearcoatNormalScale.y=-n.clearcoatNormalScale.y),e.material=n},I.prototype.loadMaterial=function(e){var r=this,n=this.json,t=this.extensions,a=n.materials[e],i,s={},o=a.extensions||{},f=[];if(o[u.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]){var l=t[u.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS];i=l.getMaterialType(),f.push(l.extendParams(s,a,r))}else if(o[u.KHR_MATERIALS_UNLIT]){var v=t[u.KHR_MATERIALS_UNLIT];i=v.getMaterialType(),f.push(v.extendParams(s,a,r))}else{i=c.MeshStandardMaterial;var d=a.pbrMetallicRoughness||{};if(s.color=new c.Color(1,1,1),s.opacity=1,Array.isArray(d.baseColorFactor)){var h=d.baseColorFactor;s.color.fromArray(h),s.opacity=h[3]}d.baseColorTexture!==void 0&&f.push(r.assignTexture(s,"map",d.baseColorTexture)),s.metalness=d.metallicFactor!==void 0?d.metallicFactor:1,s.roughness=d.roughnessFactor!==void 0?d.roughnessFactor:1,d.metallicRoughnessTexture!==void 0&&(f.push(r.assignTexture(s,"metalnessMap",d.metallicRoughnessTexture)),f.push(r.assignTexture(s,"roughnessMap",d.metallicRoughnessTexture)))}a.doubleSided===!0&&(s.side=c.DoubleSide);var y=a.alphaMode||ie.OPAQUE;if(y===ie.BLEND?(s.transparent=!0,s.depthWrite=!1):(s.transparent=!1,y===ie.MASK&&(s.alphaTest=a.alphaCutoff!==void 0?a.alphaCutoff:.5)),a.normalTexture!==void 0&&i!==c.MeshBasicMaterial&&(f.push(r.assignTexture(s,"normalMap",a.normalTexture)),s.normalScale=new c.Vector2(1,1),a.normalTexture.scale!==void 0&&s.normalScale.set(a.normalTexture.scale,a.normalTexture.scale)),a.occlusionTexture!==void 0&&i!==c.MeshBasicMaterial&&(f.push(r.assignTexture(s,"aoMap",a.occlusionTexture)),a.occlusionTexture.strength!==void 0&&(s.aoMapIntensity=a.occlusionTexture.strength)),a.emissiveFactor!==void 0&&i!==c.MeshBasicMaterial&&(s.emissive=new c.Color().fromArray(a.emissiveFactor)),a.emissiveTexture!==void 0&&i!==c.MeshBasicMaterial&&f.push(r.assignTexture(s,"emissiveMap",a.emissiveTexture)),o[u.KHR_MATERIALS_CLEARCOAT]){var E=t[u.KHR_MATERIALS_CLEARCOAT];i=E.getMaterialType(),f.push(E.extendParams(s,{extensions:o},r))}if(o[u.KHR_MATERIALS_TRANSMISSION]){var E=t[u.KHR_MATERIALS_TRANSMISSION];i=E.getMaterialType(),f.push(E.extendParams(s,{extensions:o},r))}return Promise.all(f).then(function(){var S;return i===b?S=t[u.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(s):S=new i(s),a.name&&(S.name=a.name),S.map&&(S.map.encoding=c.sRGBEncoding),S.emissiveMap&&(S.emissiveMap.encoding=c.sRGBEncoding),Y(S,a),r.associations.set(S,{type:"materials",index:e}),a.extensions&&se(t,S,a),S})};function pe(e,r,n){var t=r.attributes,a=new c.Box3;if(t.POSITION!==void 0){var i=n.json.accessors[t.POSITION],s=i.min,o=i.max;if(s!==void 0&&o!==void 0)a.set(new c.Vector3(s[0],s[1],s[2]),new c.Vector3(o[0],o[1],o[2]));else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;var f=r.targets;if(f!==void 0){for(var l=new c.Vector3,v=new c.Vector3,d=0,h=f.length;d<h;d++){var y=f[d];if(y.POSITION!==void 0){var i=n.json.accessors[y.POSITION],s=i.min,o=i.max;s!==void 0&&o!==void 0?(v.setX(Math.max(Math.abs(s[0]),Math.abs(o[0]))),v.setY(Math.max(Math.abs(s[1]),Math.abs(o[1]))),v.setZ(Math.max(Math.abs(s[2]),Math.abs(o[2]))),l.max(v)):console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}a.expandByVector(l)}e.boundingBox=a;var E=new c.Sphere;a.getCenter(E.center),E.radius=a.min.distanceTo(a.max)/2,e.boundingSphere=E}function ue(e,r,n){var t=r.attributes,a=[];function i(l,v){return n.getDependency("accessor",l).then(function(d){e.setAttribute(v,d)})}for(var s in t){var o=j[s]||s.toLowerCase();o in e.attributes||a.push(i(t[s],o))}if(r.indices!==void 0&&!e.index){var f=n.getDependency("accessor",r.indices).then(function(l){e.setIndex(l)});a.push(f)}return Y(e,r),pe(e,r,n),Promise.all(a).then(function(){return r.targets!==void 0?Ae(e,r.targets,n):e})}function z(e,r){var n=e.getIndex();if(n===null){var t=[],a=e.getAttribute("position");if(a!==void 0){for(var i=0;i<a.count;i++)t.push(i);e.setIndex(t),n=e.getIndex()}else return console.error("THREE.GLTFLoader.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),e}var s=n.count-2,o=[];if(r===c.TriangleFanDrawMode)for(var i=1;i<=s;i++)o.push(n.getX(0)),o.push(n.getX(i)),o.push(n.getX(i+1));else for(var i=0;i<s;i++)i%2===0?(o.push(n.getX(i)),o.push(n.getX(i+1)),o.push(n.getX(i+2))):(o.push(n.getX(i+2)),o.push(n.getX(i+1)),o.push(n.getX(i)));o.length/3!==s&&console.error("THREE.GLTFLoader.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");var f=e.clone();return f.setIndex(o),f}return I.prototype.loadGeometries=function(e){var r=this,n=this.extensions,t=this.primitiveCache;function a(h){return n[u.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(h,r).then(function(y){return ue(y,h,r)})}for(var i=[],s=0,o=e.length;s<o;s++){var f=e[s],l=ye(f),v=t[l];if(v)i.push(v.promise);else{var d;f.extensions&&f.extensions[u.KHR_DRACO_MESH_COMPRESSION]?d=a(f):d=ue(new c.BufferGeometry,f,r),t[l]={primitive:f,promise:d},i.push(d)}}return Promise.all(i)},I.prototype.loadMesh=function(e){for(var r=this,n=this.json,t=n.meshes[e],a=t.primitives,i=[],s=0,o=a.length;s<o;s++){var f=a[s].material===void 0?me(this.cache):this.getDependency("material",a[s].material);i.push(f)}return i.push(r.loadGeometries(a)),Promise.all(i).then(function(l){for(var v=l.slice(0,l.length-1),d=l[l.length-1],h=[],y=0,E=d.length;y<E;y++){var S=d[y],R=a[y],L,F=v[y];if(R.mode===H.TRIANGLES||R.mode===H.TRIANGLE_STRIP||R.mode===H.TRIANGLE_FAN||R.mode===void 0)L=t.isSkinnedMesh===!0?new c.SkinnedMesh(S,F):new c.Mesh(S,F),L.isSkinnedMesh===!0&&!L.geometry.attributes.skinWeight.normalized&&L.normalizeSkinWeights(),R.mode===H.TRIANGLE_STRIP?L.geometry=z(L.geometry,c.TriangleStripDrawMode):R.mode===H.TRIANGLE_FAN&&(L.geometry=z(L.geometry,c.TriangleFanDrawMode));else if(R.mode===H.LINES)L=new c.LineSegments(S,F);else if(R.mode===H.LINE_STRIP)L=new c.Line(S,F);else if(R.mode===H.LINE_LOOP)L=new c.LineLoop(S,F);else if(R.mode===H.POINTS)L=new c.Points(S,F);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+R.mode);Object.keys(L.geometry.morphAttributes).length>0&&Se(L,t),L.name=t.name||"mesh_"+e,d.length>1&&(L.name+="_"+y),Y(L,t),r.assignFinalMaterial(L),h.push(L)}if(h.length===1)return h[0];for(var G=new c.Group,y=0,E=h.length;y<E;y++)G.add(h[y]);return G})},I.prototype.loadCamera=function(e){var r,n=this.json.cameras[e],t=n[n.type];if(!t){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return n.type==="perspective"?r=new c.PerspectiveCamera(c.MathUtils.radToDeg(t.yfov),t.aspectRatio||1,t.znear||1,t.zfar||2e6):n.type==="orthographic"&&(r=new c.OrthographicCamera(-t.xmag,t.xmag,t.ymag,-t.ymag,t.znear,t.zfar)),n.name&&(r.name=n.name),Y(r,n),Promise.resolve(r)},I.prototype.loadSkin=function(e){var r=this.json.skins[e],n={joints:r.joints};return r.inverseBindMatrices===void 0?Promise.resolve(n):this.getDependency("accessor",r.inverseBindMatrices).then(function(t){return n.inverseBindMatrices=t,n})},I.prototype.loadAnimation=function(e){for(var r=this.json,n=r.animations[e],t=[],a=[],i=[],s=[],o=[],f=0,l=n.channels.length;f<l;f++){var v=n.channels[f],d=n.samplers[v.sampler],h=v.target,y=h.node!==void 0?h.node:h.id,E=n.parameters!==void 0?n.parameters[d.input]:d.input,S=n.parameters!==void 0?n.parameters[d.output]:d.output;t.push(this.getDependency("node",y)),a.push(this.getDependency("accessor",E)),i.push(this.getDependency("accessor",S)),s.push(d),o.push(h)}return Promise.all([Promise.all(t),Promise.all(a),Promise.all(i),Promise.all(s),Promise.all(o)]).then(function(R){for(var L=R[0],F=R[1],G=R[2],te=R[3],ne=R[4],Q=[],B=0,oe=L.length;B<oe;B++){var k=L[B],Le=F[B],ae=G[B],_e=te[B],Ee=ne[B];if(k!==void 0){k.updateMatrix(),k.matrixAutoUpdate=!0;var he;switch(X[Ee.path]){case X.weights:he=c.NumberKeyframeTrack;break;case X.rotation:he=c.QuaternionKeyframeTrack;break;case X.position:case X.scale:default:he=c.VectorKeyframeTrack;break}var Fe=k.name?k.name:k.uuid,De=_e.interpolation!==void 0?ge[_e.interpolation]:c.InterpolateLinear,ve=[];X[Ee.path]===X.weights?k.traverse(function(ce){ce.isMesh===!0&&ce.morphTargetInfluences&&ve.push(ce.name?ce.name:ce.uuid)}):ve.push(Fe);var q=ae.array;if(ae.normalized){var le;if(q.constructor===Int8Array)le=1/127;else if(q.constructor===Uint8Array)le=1/255;else if(q.constructor==Int16Array)le=1/32767;else if(q.constructor===Uint16Array)le=1/65535;else throw new Error("THREE.GLTFLoader: Unsupported output accessor component type.");for(var Ie=new Float32Array(q.length),Z=0,Re=q.length;Z<Re;Z++)Ie[Z]=q[Z]*le;q=Ie}for(var Z=0,Re=ve.length;Z<Re;Z++){var Me=new he(ve[Z]+"."+X[Ee.path],Le.array,q,De);_e.interpolation==="CUBICSPLINE"&&(Me.createInterpolant=function(Ue){return new P(this.times,this.values,this.getValueSize()/3,Ue)},Me.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),Q.push(Me)}}}var Pe=n.name?n.name:"animation_"+e;return new c.AnimationClip(Pe,void 0,Q)})},I.prototype.loadNode=function(e){var r=this.json,n=this.extensions,t=this,a=r.meshReferences,i=r.meshUses,s=r.nodes[e];return function(){var o=[];return s.mesh!==void 0&&o.push(t.getDependency("mesh",s.mesh).then(function(f){var l;if(a[s.mesh]>1){var v=i[s.mesh]++;l=f.clone(),l.name+="_instance_"+v}else l=f;return s.weights!==void 0&&l.traverse(function(d){if(d.isMesh)for(var h=0,y=s.weights.length;h<y;h++)d.morphTargetInfluences[h]=s.weights[h]}),l})),s.camera!==void 0&&o.push(t.getDependency("camera",s.camera)),s.extensions&&s.extensions[u.KHR_LIGHTS_PUNCTUAL]&&s.extensions[u.KHR_LIGHTS_PUNCTUAL].light!==void 0&&o.push(t.getDependency("light",s.extensions[u.KHR_LIGHTS_PUNCTUAL].light)),Promise.all(o)}().then(function(o){var f;if(s.isBone===!0?f=new c.Bone:o.length>1?f=new c.Group:o.length===1?f=o[0]:f=new c.Object3D,f!==o[0])for(var l=0,v=o.length;l<v;l++)f.add(o[l]);if(s.name&&(f.userData.name=s.name,f.name=c.PropertyBinding.sanitizeNodeName(s.name)),Y(f,s),s.extensions&&se(n,f,s),s.matrix!==void 0){var d=new c.Matrix4;d.fromArray(s.matrix),f.applyMatrix4(d)}else 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);return t.associations.set(f,{type:"nodes",index:e}),f})},I.prototype.loadScene=function(){function e(r,n,t,a){var i=t.nodes[r];return a.getDependency("node",r).then(function(s){if(i.skin===void 0)return s;var o;return a.getDependency("skin",i.skin).then(function(f){o=f;for(var l=[],v=0,d=o.joints.length;v<d;v++)l.push(a.getDependency("node",o.joints[v]));return Promise.all(l)}).then(function(f){return s.traverse(function(l){if(l.isMesh){for(var v=[],d=[],h=0,y=f.length;h<y;h++){var E=f[h];if(E){v.push(E);var S=new c.Matrix4;o.inverseBindMatrices!==void 0&&S.fromArray(o.inverseBindMatrices.array,h*16),d.push(S)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',o.joints[h])}l.bind(new c.Skeleton(v,d),l.matrixWorld)}}),s})}).then(function(s){n.add(s);var o=[];if(i.children)for(var f=i.children,l=0,v=f.length;l<v;l++){var d=f[l];o.push(e(d,s,t,a))}return Promise.all(o)})}return function(n){var t=this.json,a=this.extensions,i=this.json.scenes[n],s=this,o=new c.Group;i.name&&(o.name=i.name),Y(o,i),i.extensions&&se(a,o,i);for(var f=i.nodes||[],l=[],v=0,d=f.length;v<d;v++)l.push(e(f[v],o,t,s));return Promise.all(l).then(function(){return o})}}(),p}(),K=function(p){c.Loader.call(this,p),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}};K.prototype=Object.assign(Object.create(c.Loader.prototype),{constructor:K,setDecoderPath:function(p){return this.decoderPath=p,this},setDecoderConfig:function(p){return this.decoderConfig=p,this},setWorkerLimit:function(p){return this.workerLimit=p,this},setVerbosity:function(){console.warn("THREE.DRACOLoader: The .setVerbosity() method has been removed.")},setDrawMode:function(){console.warn("THREE.DRACOLoader: The .setDrawMode() method has been removed.")},setSkipDequantization:function(){console.warn("THREE.DRACOLoader: The .setSkipDequantization() method has been removed.")},load:function(p,T,u,m){var g=new c.FileLoader(this.manager);g.setPath(this.path),g.setResponseType("arraybuffer"),this.crossOrigin==="use-credentials"&&g.setWithCredentials(!0),g.load(p,A=>{var _={attributeIDs:this.defaultAttributeIDs,attributeTypes:this.defaultAttributeTypes,useUniqueIDs:!1};this.decodeGeometry(A,_).then(T).catch(m)},u,m)},decodeDracoFile:function(p,T,u,m){var g={attributeIDs:u||this.defaultAttributeIDs,attributeTypes:m||this.defaultAttributeTypes,useUniqueIDs:!!u};this.decodeGeometry(p,g).then(T)},decodeGeometry:function(p,T){for(var u in T.attributeTypes){var m=T.attributeTypes[u];m.BYTES_PER_ELEMENT!==void 0&&(T.attributeTypes[u]=m.name)}var g=JSON.stringify(T);if(K.taskCache.has(p)){var A=K.taskCache.get(p);if(A.key===g)return A.promise;if(p.byteLength===0)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}var _,O=this.workerNextTaskID++,D=p.byteLength,M=this._getWorker(O,D).then(C=>(_=C,new Promise((N,x)=>{_._callbacks[O]={resolve:N,reject:x},_.postMessage({type:"decode",id:O,taskConfig:T,buffer:p},[p])}))).then(C=>this._createGeometry(C.geometry));return M.catch(()=>!0).then(()=>{_&&O&&this._releaseTask(_,O)}),K.taskCache.set(p,{key:g,promise:M}),M},_createGeometry:function(p){var T=new c.BufferGeometry;p.index&&T.setIndex(new c.BufferAttribute(p.index.array,1));for(var u=0;u<p.attributes.length;u++){var m=p.attributes[u],g=m.name,A=m.array,_=m.itemSize;T.setAttribute(g,new c.BufferAttribute(A,_))}return T},_loadLibrary:function(p,T){var u=new c.FileLoader(this.manager);return u.setPath(this.decoderPath),u.setResponseType(T),new Promise((m,g)=>{u.load(p,m,void 0,g)})},preload:function(){return this._initDecoder(),this},_initDecoder:function(){if(this.decoderPending)return this.decoderPending;var p=typeof WebAssembly!="object"||this.decoderConfig.type==="js",T=[];return p?T.push(this._loadLibrary("draco_decoder.js","text")):(T.push(this._loadLibrary("draco_wasm_wrapper.js","text")),T.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(T).then(u=>{var m=u[0];p||(this.decoderConfig.wasmBinary=u[1]);var g=K.DRACOWorker.toString(),A=["/* draco decoder */",m,"","/* worker */",g.substring(g.indexOf("{")+1,g.lastIndexOf("}"))].join(`
|
|
261
|
+
`);this.workerSourceURL=URL.createObjectURL(new Blob([A]))}),this.decoderPending},_getWorker:function(p,T){return this._initDecoder().then(()=>{if(this.workerPool.length<this.workerLimit){var u=new Worker(this.workerSourceURL);u._callbacks={},u._taskCosts={},u._taskLoad=0,u.postMessage({type:"init",decoderConfig:this.decoderConfig}),u.onmessage=function(g){var A=g.data;switch(A.type){case"decode":u._callbacks[A.id].resolve(A);break;case"error":u._callbacks[A.id].reject(A);break;default:console.error('THREE.DRACOLoader: Unexpected message, "'+A.type+'"')}},this.workerPool.push(u)}else this.workerPool.sort(function(m,g){return m._taskLoad>g._taskLoad?-1:1});var u=this.workerPool[this.workerPool.length-1];return u._taskCosts[p]=T,u._taskLoad+=T,u})},_releaseTask:function(p,T){p._taskLoad-=p._taskCosts[T],delete p._callbacks[T],delete p._taskCosts[T]},debug:function(){console.log("Task load: ",this.workerPool.map(p=>p._taskLoad))},dispose:function(){for(var p=0;p<this.workerPool.length;++p)this.workerPool[p].terminate();return this.workerPool.length=0,this}});K.DRACOWorker=function(){var p,T;onmessage=function(g){var A=g.data;switch(A.type){case"init":p=A.decoderConfig,T=new Promise(function(D){p.onModuleLoaded=function(M){D({draco:M})},DracoDecoderModule(p)});break;case"decode":var _=A.buffer,O=A.taskConfig;T.then(D=>{var M=D.draco,C=new M.Decoder,N=new M.DecoderBuffer;N.Init(new Int8Array(_),_.byteLength);try{var x=u(M,C,N,O),w=x.attributes.map(b=>b.array.buffer);x.index&&w.push(x.index.array.buffer),self.postMessage({type:"decode",id:A.id,geometry:x},w)}catch(b){console.error(b),self.postMessage({type:"error",id:A.id,error:b.message})}finally{M.destroy(N),M.destroy(C)}});break}};function u(g,A,_,O){var D=O.attributeIDs,M=O.attributeTypes,C,N,x=A.GetEncodedGeometryType(_);if(x===g.TRIANGULAR_MESH)C=new g.Mesh,N=A.DecodeBufferToMesh(_,C);else if(x===g.POINT_CLOUD)C=new g.PointCloud,N=A.DecodeBufferToPointCloud(_,C);else throw new Error("THREE.DRACOLoader: Unexpected geometry type.");if(!N.ok()||C.ptr===0)throw new Error("THREE.DRACOLoader: Decoding failed: "+N.error_msg());var w={index:null,attributes:[]};for(var b in D){var V=self[M[b]],$,P;if(O.useUniqueIDs)P=D[b],$=A.GetAttributeByUniqueId(C,P);else{if(P=A.GetAttributeId(C,g[D[b]]),P===-1)continue;$=A.GetAttribute(C,P)}w.attributes.push(m(g,A,C,b,V,$))}if(x===g.TRIANGULAR_MESH){for(var H=C.num_faces(),ee=H*3,re=new Uint32Array(ee),J=new g.DracoInt32Array,W=0;W<H;++W){A.GetFaceFromMesh(C,W,J);for(var j=0;j<3;++j)re[W*3+j]=J.GetValue(j)}w.index={array:re,itemSize:1},g.destroy(J)}return g.destroy(C),w}function m(g,A,_,O,D,M){var C=M.num_components(),N=_.num_points(),x=N*C,w,b;switch(D){case Float32Array:w=new g.DracoFloat32Array,A.GetAttributeFloatForAllPoints(_,M,w),b=new Float32Array(x);break;case Int8Array:w=new g.DracoInt8Array,A.GetAttributeInt8ForAllPoints(_,M,w),b=new Int8Array(x);break;case Int16Array:w=new g.DracoInt16Array,A.GetAttributeInt16ForAllPoints(_,M,w),b=new Int16Array(x);break;case Int32Array:w=new g.DracoInt32Array,A.GetAttributeInt32ForAllPoints(_,M,w),b=new Int32Array(x);break;case Uint8Array:w=new g.DracoUInt8Array,A.GetAttributeUInt8ForAllPoints(_,M,w),b=new Uint8Array(x);break;case Uint16Array:w=new g.DracoUInt16Array,A.GetAttributeUInt16ForAllPoints(_,M,w),b=new Uint16Array(x);break;case Uint32Array:w=new g.DracoUInt32Array,A.GetAttributeUInt32ForAllPoints(_,M,w),b=new Uint32Array(x);break;default:throw new Error("THREE.DRACOLoader: Unexpected attribute type.")}for(var V=0;V<x;V++)b[V]=w.GetValue(V);return g.destroy(w),{name:O,array:b,itemSize:C}}};K.taskCache=new WeakMap;K.setDecoderPath=function(){console.warn("THREE.DRACOLoader: The .setDecoderPath() method has been removed. Use instance methods.")};K.setDecoderConfig=function(){console.warn("THREE.DRACOLoader: The .setDecoderConfig() method has been removed. Use instance methods.")};K.releaseDecoderModule=function(){console.warn("THREE.DRACOLoader: The .releaseDecoderModule() method has been removed. Use instance methods.")};K.getDecoderModule=function(){console.warn("THREE.DRACOLoader: The .getDecoderModule() method has been removed. Use instance methods.")};var Te=function(p){c.CompressedTextureLoader.call(this,p)};Te.prototype=Object.assign(Object.create(c.CompressedTextureLoader.prototype),{constructor:Te,parse:function(p,T){var u={mipmaps:[],width:0,height:0,format:null,mipmapCount:1},m=542327876,g=131072,A=512,_=1024,O=2048,D=4096,M=8192,C=16384,N=32768,x=4;function w(l){return l.charCodeAt(0)+(l.charCodeAt(1)<<8)+(l.charCodeAt(2)<<16)+(l.charCodeAt(3)<<24)}function b(l){return String.fromCharCode(l&255,l>>8&255,l>>16&255,l>>24&255)}function V(l,v,d,h){for(var y=d*h*4,E=new Uint8Array(l,v,y),S=new Uint8Array(y),R=0,L=0,F=0;F<h;F++)for(var G=0;G<d;G++){var te=E[L];L++;var ne=E[L];L++;var Q=E[L];L++;var B=E[L];L++,S[R]=Q,R++,S[R]=ne,R++,S[R]=te,R++,S[R]=B,R++}return S}var $=w("DXT1"),P=w("DXT3"),H=w("DXT5"),ee=w("ETC1"),re=31,J=0,W=1,j=2,X=3,ge=4,ie=7,fe=20,de=21,me=22,se=23,Y=24,Ae=25,Se=26,ye=28,U=new Int32Array(p,0,re);if(U[J]!==m)return console.error("THREE.DDSLoader.parse: Invalid magic number in DDS header."),u;if(!U[fe]&x)return console.error("THREE.DDSLoader.parse: Unsupported format, must contain a FourCC code."),u;var I,pe=U[de],ue=!1;switch(pe){case $:I=8,u.format=c.RGB_S3TC_DXT1_Format;break;case P:I=16,u.format=c.RGBA_S3TC_DXT3_Format;break;case H:I=16,u.format=c.RGBA_S3TC_DXT5_Format;break;case ee:I=8,u.format=c.RGB_ETC1_Format;break;default:if(U[me]===32&&U[se]&16711680&&U[Y]&65280&&U[Ae]&255&&U[Se]&4278190080)ue=!0,I=64,u.format=c.RGBAFormat;else return console.error("THREE.DDSLoader.parse: Unsupported FourCC code ",b(pe)),u}u.mipmapCount=1,U[j]&g&&T!==!1&&(u.mipmapCount=Math.max(1,U[ie]));var z=U[ye];if(u.isCubemap=!!(z&A),u.isCubemap&&(!(z&_)||!(z&O)||!(z&D)||!(z&M)||!(z&C)||!(z&N)))return console.error("THREE.DDSLoader.parse: Incomplete cubemap faces"),u;u.width=U[ge],u.height=U[X];for(var e=U[W]+4,r=u.isCubemap?6:1,n=0;n<r;n++)for(var t=u.width,a=u.height,i=0;i<u.mipmapCount;i++){if(ue)var s=V(p,e,t,a),o=s.length;else var o=Math.max(4,t)/4*Math.max(4,a)/4*I,s=new Uint8Array(p,e,o);var f={data:s,width:t,height:a};u.mipmaps.push(f),e+=o,t=Math.max(t>>1,1),a=Math.max(a>>1,1)}return u}});var Ce=function(p){xe(T,p);function T(u){var m=p.call(this)||this;return m.needsRender=!0,u&&u.children.length&&m.add.apply(m,u.children),m.mixer=new we.AnimationMixer(m),m}return T.prototype.clone=function(){var u=p.prototype.clone.call(this,!0),m=new we.AnimationMixer(u);return u.mixer=m,u.needsRender=!0,u},T}(we.Group),Ne="https://vr-public.realsee-cdn.cn/release/static/image/release/five/resource/draco/1.5.6/",ke=function(p){xe(T,p);function T(u){var m=p.call(this,u)||this;return m.ddsLoader=new Te(u),m.dracoLoader=new K(u),m.dracoLoader.setDecoderPath(Ne),m}return Object.defineProperty(T,"version",{get:function(){return"6.0.0-alpha.63"},enumerable:!1,configurable:!0}),T.prototype.load=function(u,m,g,A){return p.prototype.load.call(this,u,m,g,A)},T.prototype.parse=function(u,m,g,A){return p.prototype.parse.call(this,u,m,function(_){var O=new Ce(_.scene),D=_.scenes.map(function(M){return M===_.scene?O:new Ce(M)});g(Object.assign(_,{scene:O,scenes:D}))},A)},T}(Oe);exports.DDSLoader=Te;exports.DRACOLoader=K;exports.GLTFLoader=ke;exports.GLTFObject=Ce;exports.THREEGLTFLoader=Oe;
|