@vkzstudio/muza-ui 1.0.47 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +173 -171
- package/dist/Muza_BP_logo.svg +26 -26
- package/dist/components/Accordion/Accordion.d.ts +112 -18
- package/dist/components/Accordion/Accordion.d.ts.map +1 -1
- package/dist/components/Accordion/Accordion.js +208 -110
- package/dist/components/Accordion/Accordion.stories.d.ts +3 -0
- package/dist/components/Accordion/Accordion.stories.d.ts.map +1 -1
- package/dist/components/Alert/Alert.d.ts +3 -1
- package/dist/components/Alert/Alert.d.ts.map +1 -1
- package/dist/components/Alert/Alert.js +28 -24
- package/dist/components/Button/Button.stories.d.ts.map +1 -1
- package/dist/components/ButtonArrow/ButtonArrow.stories.d.ts.map +1 -1
- package/dist/components/Calendar/Calendar.js +10 -11
- package/dist/components/Card/Card.stories.d.ts.map +1 -1
- package/dist/components/CardCheckboxAmount/CardCheckboxAmount.d.ts +111 -0
- package/dist/components/CardCheckboxAmount/CardCheckboxAmount.d.ts.map +1 -0
- package/dist/components/CardCheckboxAmount/CardCheckboxAmount.js +115 -0
- package/dist/components/CardCheckboxAmount/CardCheckboxAmount.stories.d.ts +13 -0
- package/dist/components/CardCheckboxAmount/CardCheckboxAmount.stories.d.ts.map +1 -0
- package/dist/components/CardCheckboxAmount/index.d.ts +2 -0
- package/dist/components/CardCheckboxAmount/index.d.ts.map +1 -0
- package/dist/components/Carousel/Carousel.d.ts +30 -3
- package/dist/components/Carousel/Carousel.d.ts.map +1 -1
- package/dist/components/Carousel/Carousel.js +112 -92
- package/dist/components/Carousel/Carousel.stories.d.ts.map +1 -1
- package/dist/components/Chip/Chip.d.ts.map +1 -1
- package/dist/components/Chip/Chip.js +6 -2
- package/dist/components/Chip/Chip.stories.d.ts.map +1 -1
- package/dist/components/DataTable/DataTable.stories.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.js +10 -2
- package/dist/components/DatePicker/DatePicker.stories.d.ts +1 -0
- package/dist/components/DatePicker/DatePicker.stories.d.ts.map +1 -1
- package/dist/components/DatePickerButton/DatePickerButton.d.ts +97 -0
- package/dist/components/DatePickerButton/DatePickerButton.d.ts.map +1 -0
- package/dist/components/DatePickerButton/DatePickerButton.js +329 -0
- package/dist/components/DatePickerButton/DatePickerButton.stories.d.ts +15 -0
- package/dist/components/DatePickerButton/DatePickerButton.stories.d.ts.map +1 -0
- package/dist/components/DatePickerButton/index.d.ts +2 -0
- package/dist/components/DatePickerButton/index.d.ts.map +1 -0
- package/dist/components/Dialog/Dialog.js +1 -1
- package/dist/components/Dialog/Dialog.stories.d.ts +1 -0
- package/dist/components/Dialog/Dialog.stories.d.ts.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.stories.d.ts +1 -0
- package/dist/components/DropdownMenu/DropdownMenu.stories.d.ts.map +1 -1
- package/dist/components/Icons/CustomBadges.d.ts +5 -0
- package/dist/components/Icons/CustomBadges.d.ts.map +1 -1
- package/dist/components/Icons/CustomBadges.js +216 -13
- package/dist/components/Icons/CustomLogos.d.ts +18 -2
- package/dist/components/Icons/CustomLogos.d.ts.map +1 -1
- package/dist/components/Icons/CustomLogos.js +103 -97
- package/dist/components/Icons/LogosAndBadges.stories.d.ts +1 -0
- package/dist/components/Icons/LogosAndBadges.stories.d.ts.map +1 -1
- package/dist/components/Input/Input.js +22 -32
- package/dist/components/LanguageSwitcher/LanguageSwitcher.d.ts +26 -1
- package/dist/components/LanguageSwitcher/LanguageSwitcher.d.ts.map +1 -1
- package/dist/components/LanguageSwitcher/LanguageSwitcher.js +86 -44
- package/dist/components/LanguageSwitcher/LanguageSwitcher.stories.d.ts +2 -0
- package/dist/components/LanguageSwitcher/LanguageSwitcher.stories.d.ts.map +1 -1
- package/dist/components/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/components/Lightbox/Lightbox.js +70 -54
- package/dist/components/Lightbox/Lightbox.stories.d.ts +1 -0
- package/dist/components/Lightbox/Lightbox.stories.d.ts.map +1 -1
- package/dist/components/Lightbox/LightboxOverrides.css +5 -5
- package/dist/components/LoginScreen/LoginScreen.js +8 -8
- package/dist/components/LoginScreen/LoginScreen.stories.d.ts.map +1 -1
- package/dist/components/LoginScreen/LoginScreen3D/LoginScreen3DModel.js +10 -9
- package/dist/components/LoginScreen/LoginScreen3D/LoginScreen3DScene.js +21 -22
- package/dist/components/LoginScreen/LoginScreenItem.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.stories.d.ts +1 -0
- package/dist/components/MultiSelect/MultiSelect.stories.d.ts.map +1 -1
- package/dist/components/Pagination/Pagination.stories.d.ts.map +1 -1
- package/dist/components/Popover/Popover.d.ts +8 -1
- package/dist/components/Popover/Popover.d.ts.map +1 -1
- package/dist/components/Popover/Popover.js +7 -6
- package/dist/components/Popover/Popover.stories.d.ts +1 -0
- package/dist/components/Popover/Popover.stories.d.ts.map +1 -1
- package/dist/components/Reorderable/Reorderable.js +74 -78
- package/dist/components/Reorderable/Reorderable.stories.d.ts.map +1 -1
- package/dist/components/ReorderableTable/ReorderableTable.js +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.stories.d.ts.map +1 -1
- package/dist/components/SegmentedIconControl/SegmentedIconControl.stories.d.ts.map +1 -1
- package/dist/components/Select/Select.stories.d.ts +1 -0
- package/dist/components/Select/Select.stories.d.ts.map +1 -1
- package/dist/components/Sheet/Sheet.stories.d.ts +1 -0
- package/dist/components/Sheet/Sheet.stories.d.ts.map +1 -1
- package/dist/components/SwipeButton/SwipeButton.js +37 -42
- package/dist/components/Tag/Tag.js +1 -1
- package/dist/components/TextEditor/LinkBubbleMenu.js +2 -2
- package/dist/components/TextEditor/TextEditor.d.ts.map +1 -1
- package/dist/components/TextEditor/TextEditor.js +17 -14
- package/dist/components/TextEditor/TextEditor.stories.d.ts.map +1 -1
- package/dist/components/Toast/Toast.stories.d.ts +1 -0
- package/dist/components/Toast/Toast.stories.d.ts.map +1 -1
- package/dist/components/Toggle/Toggle.stories.d.ts.map +1 -1
- package/dist/components/ToggleCheckButton/ToggleCheckButton.stories.d.ts.map +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts.map +1 -1
- package/dist/components/Tooltip/Tooltip.stories.d.ts +1 -0
- package/dist/components/Tooltip/Tooltip.stories.d.ts.map +1 -1
- package/dist/components/Typography/Typography.d.ts +10 -1
- package/dist/components/Typography/Typography.d.ts.map +1 -1
- package/dist/components/Typography/Typography.js +82 -67
- package/dist/components/Typography/Typography.stories.d.ts +1 -0
- package/dist/components/Typography/Typography.stories.d.ts.map +1 -1
- package/dist/components/TypographyLink/TypographyLink.d.ts +72 -0
- package/dist/components/TypographyLink/TypographyLink.d.ts.map +1 -0
- package/dist/components/TypographyLink/TypographyLink.js +103 -0
- package/dist/components/TypographyLink/TypographyLink.stories.d.ts +12 -0
- package/dist/components/TypographyLink/TypographyLink.stories.d.ts.map +1 -0
- package/dist/components/TypographyLink/index.d.ts +2 -0
- package/dist/components/TypographyLink/index.d.ts.map +1 -0
- package/dist/components/UniversalFooter/UniversalFooter.d.ts +198 -0
- package/dist/components/UniversalFooter/UniversalFooter.d.ts.map +1 -0
- package/dist/components/UniversalFooter/UniversalFooter.js +401 -0
- package/dist/components/UniversalFooter/UniversalFooter.stories.d.ts +19 -0
- package/dist/components/UniversalFooter/UniversalFooter.stories.d.ts.map +1 -0
- package/dist/components/UniversalFooter/index.d.ts +2 -0
- package/dist/components/UniversalFooter/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/fonts/Objectivity/OFL.txt +92 -92
- package/dist/globals.css +12 -12
- package/dist/index.js +354 -322
- package/dist/muza-ui.css +1 -1
- package/dist/styles/3rd-parties.css +5 -5
- package/dist/styles/animations.css +21 -21
- package/dist/styles/breakpoints.css +4 -4
- package/dist/styles/primitives.css +163 -161
- package/dist/styles/token-colors.css +1445 -1437
- package/dist/styles/token-sizes.css +1553 -1513
- package/dist/styles/typography.css +113 -113
- package/dist/styles/utilities.css +66 -66
- package/dist/styles/white-label.css +26 -26
- package/dist/translations/TranslationContext.js +22 -24
- package/dist/translations/index.d.ts +1 -1
- package/dist/translations/index.d.ts.map +1 -1
- package/dist/translations/locales/cs.d.ts.map +1 -1
- package/dist/translations/locales/cs.js +9 -1
- package/dist/translations/locales/en.d.ts.map +1 -1
- package/dist/translations/locales/en.js +9 -1
- package/dist/translations/locales/sk.d.ts.map +1 -1
- package/dist/translations/locales/sk.js +9 -1
- package/dist/translations/types.d.ts +20 -0
- package/dist/translations/types.d.ts.map +1 -1
- package/llms-full.md +584 -584
- package/llms.txt +37 -37
- package/package.json +20 -24
- package/dist/_virtual/_commonjsHelpers.js +0 -6
- package/dist/_virtual/constants.js +0 -5
- package/dist/_virtual/constants2.js +0 -4
- package/dist/_virtual/index.js +0 -7
- package/dist/_virtual/index2.js +0 -4
- package/dist/_virtual/index3.js +0 -4
- package/dist/_virtual/index4.js +0 -7
- package/dist/_virtual/index5.js +0 -5
- package/dist/_virtual/index6.js +0 -4
- package/dist/_virtual/index7.js +0 -4
- package/dist/_virtual/react-dom-server-legacy.browser.development.js +0 -4
- package/dist/_virtual/react-dom-server-legacy.browser.production.min.js +0 -4
- package/dist/_virtual/react-dom-server.browser.development.js +0 -4
- package/dist/_virtual/react-dom-server.browser.production.min.js +0 -4
- package/dist/_virtual/react-is.development.js +0 -4
- package/dist/_virtual/react-is.production.min.js +0 -4
- package/dist/_virtual/react-reconciler-constants.development.js +0 -4
- package/dist/_virtual/react-reconciler-constants.production.min.js +0 -4
- package/dist/_virtual/react-reconciler.development.js +0 -4
- package/dist/_virtual/scheduler.development.js +0 -4
- package/dist/_virtual/scheduler.production.min.js +0 -4
- package/dist/_virtual/server.browser.js +0 -5
- package/dist/_virtual/server.browser2.js +0 -4
- package/dist/node_modules/@date-fns/tz/date/index.js +0 -61
- package/dist/node_modules/@date-fns/tz/date/mini.js +0 -69
- package/dist/node_modules/@date-fns/tz/tzName/index.js +0 -11
- package/dist/node_modules/@date-fns/tz/tzOffset/index.js +0 -22
- package/dist/node_modules/@popperjs/core/lib/createPopper.js +0 -122
- package/dist/node_modules/@popperjs/core/lib/dom-utils/contains.js +0 -18
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js +0 -23
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js +0 -37
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js +0 -32
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js +0 -7
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js +0 -10
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js +0 -17
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js +0 -9
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js +0 -13
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getNodeName.js +0 -6
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js +0 -10
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js +0 -35
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getParentNode.js +0 -18
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js +0 -10
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js +0 -21
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getWindow.js +0 -12
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js +0 -11
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js +0 -9
- package/dist/node_modules/@popperjs/core/lib/dom-utils/instanceOf.js +0 -20
- package/dist/node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js +0 -7
- package/dist/node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js +0 -8
- package/dist/node_modules/@popperjs/core/lib/dom-utils/isTableElement.js +0 -7
- package/dist/node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js +0 -16
- package/dist/node_modules/@popperjs/core/lib/enums.js +0 -31
- package/dist/node_modules/@popperjs/core/lib/modifiers/applyStyles.js +0 -47
- package/dist/node_modules/@popperjs/core/lib/modifiers/arrow.js +0 -37
- package/dist/node_modules/@popperjs/core/lib/modifiers/computeStyles.js +0 -99
- package/dist/node_modules/@popperjs/core/lib/modifiers/eventListeners.js +0 -26
- package/dist/node_modules/@popperjs/core/lib/modifiers/flip.js +0 -74
- package/dist/node_modules/@popperjs/core/lib/modifiers/hide.js +0 -44
- package/dist/node_modules/@popperjs/core/lib/modifiers/offset.js +0 -31
- package/dist/node_modules/@popperjs/core/lib/modifiers/popperOffsets.js +0 -19
- package/dist/node_modules/@popperjs/core/lib/modifiers/preventOverflow.js +0 -54
- package/dist/node_modules/@popperjs/core/lib/popper.js +0 -27
- package/dist/node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js +0 -27
- package/dist/node_modules/@popperjs/core/lib/utils/computeOffsets.js +0 -54
- package/dist/node_modules/@popperjs/core/lib/utils/debounce.js +0 -13
- package/dist/node_modules/@popperjs/core/lib/utils/detectOverflow.js +0 -33
- package/dist/node_modules/@popperjs/core/lib/utils/expandToHashMap.js +0 -8
- package/dist/node_modules/@popperjs/core/lib/utils/getAltAxis.js +0 -6
- package/dist/node_modules/@popperjs/core/lib/utils/getBasePlacement.js +0 -6
- package/dist/node_modules/@popperjs/core/lib/utils/getFreshSideObject.js +0 -11
- package/dist/node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js +0 -6
- package/dist/node_modules/@popperjs/core/lib/utils/getOppositePlacement.js +0 -14
- package/dist/node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js +0 -12
- package/dist/node_modules/@popperjs/core/lib/utils/getVariation.js +0 -6
- package/dist/node_modules/@popperjs/core/lib/utils/math.js +0 -6
- package/dist/node_modules/@popperjs/core/lib/utils/mergeByName.js +0 -15
- package/dist/node_modules/@popperjs/core/lib/utils/mergePaddingObject.js +0 -7
- package/dist/node_modules/@popperjs/core/lib/utils/orderModifiers.js +0 -31
- package/dist/node_modules/@popperjs/core/lib/utils/rectToClientRect.js +0 -11
- package/dist/node_modules/@popperjs/core/lib/utils/userAgent.js +0 -9
- package/dist/node_modules/@popperjs/core/lib/utils/within.js +0 -12
- package/dist/node_modules/@react-three/drei/core/useAnimations.js +0 -34
- package/dist/node_modules/@react-three/drei/core/useGLTF.js +0 -18
- package/dist/node_modules/@react-three/fiber/dist/events-776716bd.esm.js +0 -1311
- package/dist/node_modules/@react-three/fiber/dist/react-three-fiber.esm.js +0 -145
- package/dist/node_modules/@react-three/fiber/node_modules/suspend-react/index.js +0 -47
- package/dist/node_modules/@tiptap/core/dist/index.js +0 -2857
- package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js +0 -45
- package/dist/node_modules/@tiptap/extension-bold/dist/index.js +0 -76
- package/dist/node_modules/@tiptap/extension-bubble-menu/dist/index.js +0 -129
- package/dist/node_modules/@tiptap/extension-bullet-list/dist/index.js +0 -55
- package/dist/node_modules/@tiptap/extension-character-count/dist/index.js +0 -73
- package/dist/node_modules/@tiptap/extension-code/dist/index.js +0 -54
- package/dist/node_modules/@tiptap/extension-code-block/dist/index.js +0 -136
- package/dist/node_modules/@tiptap/extension-document/dist/index.js +0 -10
- package/dist/node_modules/@tiptap/extension-dropcursor/dist/index.js +0 -21
- package/dist/node_modules/@tiptap/extension-gapcursor/dist/index.js +0 -25
- package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js +0 -56
- package/dist/node_modules/@tiptap/extension-heading/dist/index.js +0 -55
- package/dist/node_modules/@tiptap/extension-history/dist/index.js +0 -36
- package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +0 -59
- package/dist/node_modules/@tiptap/extension-italic/dist/index.js +0 -75
- package/dist/node_modules/@tiptap/extension-link/dist/index.js +0 -272
- package/dist/node_modules/@tiptap/extension-list-item/dist/index.js +0 -34
- package/dist/node_modules/@tiptap/extension-ordered-list/dist/index.js +0 -73
- package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js +0 -34
- package/dist/node_modules/@tiptap/extension-placeholder/dist/index.js +0 -53
- package/dist/node_modules/@tiptap/extension-strike/dist/index.js +0 -64
- package/dist/node_modules/@tiptap/extension-text/dist/index.js +0 -9
- package/dist/node_modules/@tiptap/react/dist/index.js +0 -709
- package/dist/node_modules/@tiptap/starter-kit/dist/index.js +0 -30
- package/dist/node_modules/color/index.js +0 -262
- package/dist/node_modules/color/node_modules/color-convert/conversions.js +0 -421
- package/dist/node_modules/color/node_modules/color-convert/index.js +0 -35
- package/dist/node_modules/color/node_modules/color-convert/route.js +0 -46
- package/dist/node_modules/color/node_modules/color-name/index.js +0 -153
- package/dist/node_modules/color-string/index.js +0 -105
- package/dist/node_modules/color-string/node_modules/color-name/index.js +0 -153
- package/dist/node_modules/date-fns/_lib/defaultOptions.js +0 -7
- package/dist/node_modules/date-fns/_lib/normalizeDates.js +0 -11
- package/dist/node_modules/date-fns/constants.js +0 -4
- package/dist/node_modules/date-fns/constructFrom.js +0 -8
- package/dist/node_modules/date-fns/isSameWeek.js +0 -14
- package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +0 -9
- package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +0 -18
- package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js +0 -31
- package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +0 -15
- package/dist/node_modules/date-fns/locale/cs/_lib/formatDistance.js +0 -275
- package/dist/node_modules/date-fns/locale/cs/_lib/formatLong.js +0 -33
- package/dist/node_modules/date-fns/locale/cs/_lib/formatRelative.js +0 -25
- package/dist/node_modules/date-fns/locale/cs/_lib/localize.js +0 -167
- package/dist/node_modules/date-fns/locale/cs/_lib/match.js +0 -109
- package/dist/node_modules/date-fns/locale/cs.js +0 -21
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +0 -70
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js +0 -33
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +0 -11
- package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js +0 -155
- package/dist/node_modules/date-fns/locale/en-US/_lib/match.js +0 -110
- package/dist/node_modules/date-fns/locale/en-US.js +0 -21
- package/dist/node_modules/date-fns/locale/sk/_lib/formatDistance.js +0 -158
- package/dist/node_modules/date-fns/locale/sk/_lib/formatLong.js +0 -33
- package/dist/node_modules/date-fns/locale/sk/_lib/formatRelative.js +0 -60
- package/dist/node_modules/date-fns/locale/sk/_lib/localize.js +0 -175
- package/dist/node_modules/date-fns/locale/sk/_lib/match.js +0 -111
- package/dist/node_modules/date-fns/locale/sk.js +0 -21
- package/dist/node_modules/date-fns/startOfWeek.js +0 -11
- package/dist/node_modules/date-fns/toDate.js +0 -8
- package/dist/node_modules/framer-motion/dist/es/animation/animate/index.js +0 -25
- package/dist/node_modules/framer-motion/dist/es/animation/animate/resolve-subjects.js +0 -8
- package/dist/node_modules/framer-motion/dist/es/animation/animate/sequence.js +0 -12
- package/dist/node_modules/framer-motion/dist/es/animation/animate/subject.js +0 -32
- package/dist/node_modules/framer-motion/dist/es/animation/sequence/create.js +0 -128
- package/dist/node_modules/framer-motion/dist/es/animation/sequence/utils/calc-repeat-duration.js +0 -6
- package/dist/node_modules/framer-motion/dist/es/animation/sequence/utils/calc-time.js +0 -6
- package/dist/node_modules/framer-motion/dist/es/animation/sequence/utils/edit.js +0 -22
- package/dist/node_modules/framer-motion/dist/es/animation/sequence/utils/normalize-times.js +0 -7
- package/dist/node_modules/framer-motion/dist/es/animation/sequence/utils/sort.js +0 -6
- package/dist/node_modules/framer-motion/dist/es/animation/utils/create-visual-element.js +0 -40
- package/dist/node_modules/framer-motion/dist/es/animation/utils/is-dom-keyframes.js +0 -6
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js +0 -59
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js +0 -34
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js +0 -47
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js +0 -17
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.js +0 -12
- package/dist/node_modules/framer-motion/dist/es/components/Reorder/Group.js +0 -46
- package/dist/node_modules/framer-motion/dist/es/components/Reorder/Item.js +0 -34
- package/dist/node_modules/framer-motion/dist/es/components/Reorder/utils/auto-scroll.js +0 -64
- package/dist/node_modules/framer-motion/dist/es/components/Reorder/utils/check-reorder.js +0 -17
- package/dist/node_modules/framer-motion/dist/es/context/LayoutGroupContext.js +0 -5
- package/dist/node_modules/framer-motion/dist/es/context/LazyContext.js +0 -5
- package/dist/node_modules/framer-motion/dist/es/context/MotionConfigContext.js +0 -9
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/create.js +0 -13
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/index.js +0 -5
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.js +0 -15
- package/dist/node_modules/framer-motion/dist/es/context/PresenceContext.js +0 -5
- package/dist/node_modules/framer-motion/dist/es/context/ReorderContext.js +0 -5
- package/dist/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.js +0 -5
- package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.js +0 -8
- package/dist/node_modules/framer-motion/dist/es/events/event-info.js +0 -14
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js +0 -277
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.js +0 -22
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/use-drag-controls.js +0 -70
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js +0 -67
- package/dist/node_modules/framer-motion/dist/es/gestures/focus.js +0 -28
- package/dist/node_modules/framer-motion/dist/es/gestures/hover.js +0 -21
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js +0 -131
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.js +0 -43
- package/dist/node_modules/framer-motion/dist/es/gestures/press.js +0 -23
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js +0 -27
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js +0 -34
- package/dist/node_modules/framer-motion/dist/es/motion/features/animations.js +0 -13
- package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.js +0 -39
- package/dist/node_modules/framer-motion/dist/es/motion/features/drag.js +0 -17
- package/dist/node_modules/framer-motion/dist/es/motion/features/gestures.js +0 -21
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js +0 -60
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout.js +0 -11
- package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.js +0 -14
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.js +0 -44
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.js +0 -21
- package/dist/node_modules/framer-motion/dist/es/motion/index.js +0 -63
- package/dist/node_modules/framer-motion/dist/es/motion/utils/symbol.js +0 -4
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js +0 -22
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js +0 -65
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js +0 -52
- package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.js +0 -38
- package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.js +0 -18
- package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.js +0 -13
- package/dist/node_modules/framer-motion/dist/es/render/components/motion/proxy.js +0 -7
- package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js +0 -10
- package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.js +0 -16
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js +0 -20
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js +0 -24
- package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.js +0 -10
- package/dist/node_modules/framer-motion/dist/es/render/html/use-props.js +0 -27
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js +0 -9
- package/dist/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.js +0 -30
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.js +0 -22
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.js +0 -10
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js +0 -8
- package/dist/node_modules/framer-motion/dist/es/utils/distance.js +0 -9
- package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.js +0 -4
- package/dist/node_modules/framer-motion/dist/es/utils/is-browser.js +0 -4
- package/dist/node_modules/framer-motion/dist/es/utils/is-ref-object.js +0 -6
- package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.js +0 -28
- package/dist/node_modules/framer-motion/dist/es/utils/use-constant.js +0 -8
- package/dist/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js +0 -6
- package/dist/node_modules/framer-motion/dist/es/utils/use-motion-value-event.js +0 -7
- package/dist/node_modules/framer-motion/dist/es/value/use-combine-values.js +0 -15
- package/dist/node_modules/framer-motion/dist/es/value/use-computed.js +0 -10
- package/dist/node_modules/framer-motion/dist/es/value/use-motion-value.js +0 -15
- package/dist/node_modules/framer-motion/dist/es/value/use-transform.js +0 -31
- package/dist/node_modules/imask/esm/controls/html-contenteditable-mask-element.js +0 -34
- package/dist/node_modules/imask/esm/controls/html-input-mask-element.js +0 -31
- package/dist/node_modules/imask/esm/controls/html-mask-element.js +0 -48
- package/dist/node_modules/imask/esm/controls/input-history.js +0 -30
- package/dist/node_modules/imask/esm/controls/input.js +0 -222
- package/dist/node_modules/imask/esm/controls/mask-element.js +0 -43
- package/dist/node_modules/imask/esm/core/action-details.js +0 -51
- package/dist/node_modules/imask/esm/core/change-details.js +0 -36
- package/dist/node_modules/imask/esm/core/continuous-tail-details.js +0 -42
- package/dist/node_modules/imask/esm/core/holder.js +0 -6
- package/dist/node_modules/imask/esm/core/utils.js +0 -67
- package/dist/node_modules/imask/esm/index.js +0 -50
- package/dist/node_modules/imask/esm/masked/base.js +0 -252
- package/dist/node_modules/imask/esm/masked/date.js +0 -117
- package/dist/node_modules/imask/esm/masked/dynamic.js +0 -222
- package/dist/node_modules/imask/esm/masked/enum.js +0 -69
- package/dist/node_modules/imask/esm/masked/factory.js +0 -46
- package/dist/node_modules/imask/esm/masked/function.js +0 -23
- package/dist/node_modules/imask/esm/masked/number.js +0 -212
- package/dist/node_modules/imask/esm/masked/pattern/chunk-tail-details.js +0 -103
- package/dist/node_modules/imask/esm/masked/pattern/cursor.js +0 -100
- package/dist/node_modules/imask/esm/masked/pattern/fixed-definition.js +0 -102
- package/dist/node_modules/imask/esm/masked/pattern/input-definition.js +0 -133
- package/dist/node_modules/imask/esm/masked/pattern.js +0 -322
- package/dist/node_modules/imask/esm/masked/pipe.js +0 -23
- package/dist/node_modules/imask/esm/masked/range.js +0 -78
- package/dist/node_modules/imask/esm/masked/regexp.js +0 -21
- package/dist/node_modules/imask/esm/masked/repeat.js +0 -104
- package/dist/node_modules/its-fine/dist/index.js +0 -116
- package/dist/node_modules/linkifyjs/dist/linkify.js +0 -707
- package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.js +0 -106
- package/dist/node_modules/motion-dom/dist/es/animation/GroupAnimation.js +0 -76
- package/dist/node_modules/motion-dom/dist/es/animation/GroupAnimationWithThen.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.js +0 -133
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.js +0 -108
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js +0 -37
- package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.js +0 -17
- package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.js +0 -37
- package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.js +0 -30
- package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/defaults.js +0 -32
- package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/find.js +0 -52
- package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/index.js +0 -98
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.js +0 -9
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.js +0 -46
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.js +0 -46
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.js +0 -30
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.js +0 -22
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js +0 -69
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.js +0 -75
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.js +0 -16
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.js +0 -31
- package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.js +0 -27
- package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.js +0 -23
- package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.js +0 -31
- package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.js +0 -22
- package/dist/node_modules/motion-dom/dist/es/animation/utils/get-final-keyframe.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-animatable.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.js +0 -9
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.js +0 -16
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.js +0 -15
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.js +0 -21
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.js +0 -24
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.js +0 -17
- package/dist/node_modules/motion-dom/dist/es/events/add-dom-event.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.js +0 -27
- package/dist/node_modules/motion-dom/dist/es/frameloop/frame.js +0 -9
- package/dist/node_modules/motion-dom/dist/es/frameloop/microtask.js +0 -5
- package/dist/node_modules/motion-dom/dist/es/frameloop/order.js +0 -21
- package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.js +0 -41
- package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.js +0 -15
- package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.js +0 -11
- package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.js +0 -11
- package/dist/node_modules/motion-dom/dist/es/gestures/hover.js +0 -24
- package/dist/node_modules/motion-dom/dist/es/gestures/press/index.js +0 -33
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.js +0 -27
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/state.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.js +0 -27
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/conversion.js +0 -25
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/copy.js +0 -14
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.js +0 -52
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.js +0 -36
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.js +0 -25
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/models.js +0 -18
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/utils.js +0 -34
- package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.js +0 -16
- package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.js +0 -25
- package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.js +0 -623
- package/dist/node_modules/motion-dom/dist/es/projection/node/state.js +0 -15
- package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.js +0 -60
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.js +0 -21
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.js +0 -16
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.js +0 -21
- package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/projection/utils/each-axis.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/projection/utils/flat-tree.js +0 -19
- package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.js +0 -20
- package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/render/Feature.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/render/VisualElement.js +0 -247
- package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.js +0 -28
- package/dist/node_modules/motion-dom/dist/es/render/dom/is-css-var.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.js +0 -65
- package/dist/node_modules/motion-dom/dist/es/render/dom/style-set.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.js +0 -38
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.js +0 -29
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.js +0 -37
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.js +0 -14
- package/dist/node_modules/motion-dom/dist/es/render/object/ObjectVisualElement.js +0 -37
- package/dist/node_modules/motion-dom/dist/es/render/store.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.js +0 -40
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.js +0 -32
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.js +0 -28
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.js +0 -15
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/render.js +0 -11
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.js +0 -15
- package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.js +0 -141
- package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.js +0 -20
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.js +0 -9
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-variant-label.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/render/utils/keys-position.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.js +0 -23
- package/dist/node_modules/motion-dom/dist/es/render/utils/motion-values.js +0 -25
- package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.js +0 -15
- package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.js +0 -5
- package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.js +0 -20
- package/dist/node_modules/motion-dom/dist/es/render/utils/setters.js +0 -21
- package/dist/node_modules/motion-dom/dist/es/render/utils/shallow-compare.js +0 -14
- package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/utils/delay.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/utils/interpolate.js +0 -42
- package/dist/node_modules/motion-dom/dist/es/utils/is-html-element.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/utils/is-svg-element.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/utils/mix/color.js +0 -29
- package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.js +0 -51
- package/dist/node_modules/motion-dom/dist/es/utils/mix/immediate.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/utils/mix/index.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/utils/mix/number.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/utils/mix/visibility.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.js +0 -15
- package/dist/node_modules/motion-dom/dist/es/utils/supports/flags.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/utils/supports/linear-easing.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/utils/supports/memo.js +0 -9
- package/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.js +0 -5
- package/dist/node_modules/motion-dom/dist/es/utils/transform.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/value/index.js +0 -218
- package/dist/node_modules/motion-dom/dist/es/value/types/auto.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.js +0 -19
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.js +0 -22
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/value/types/color/index.js +0 -15
- package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.js +0 -16
- package/dist/node_modules/motion-dom/dist/es/value/types/color/utils.js +0 -18
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/filter.js +0 -24
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.js +0 -49
- package/dist/node_modules/motion-dom/dist/es/value/types/dimensions.js +0 -9
- package/dist/node_modules/motion-dom/dist/es/value/types/int.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/defaults.js +0 -24
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.js +0 -70
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/transform.js +0 -31
- package/dist/node_modules/motion-dom/dist/es/value/types/numbers/index.js +0 -17
- package/dist/node_modules/motion-dom/dist/es/value/types/numbers/units.js +0 -17
- package/dist/node_modules/motion-dom/dist/es/value/types/test.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/color-regex.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/float-regex.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/sanitize.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/value/utils/is-motion-value.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/value/will-change/add-will-change.js +0 -14
- package/dist/node_modules/motion-dom/dist/es/value/will-change/is.js +0 -7
- package/dist/node_modules/motion-utils/dist/es/array.js +0 -20
- package/dist/node_modules/motion-utils/dist/es/clamp.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/easing/anticipate.js +0 -5
- package/dist/node_modules/motion-utils/dist/es/easing/back.js +0 -9
- package/dist/node_modules/motion-utils/dist/es/easing/circ.js +0 -8
- package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.js +0 -18
- package/dist/node_modules/motion-utils/dist/es/easing/ease.js +0 -7
- package/dist/node_modules/motion-utils/dist/es/easing/modifiers/mirror.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/easing/modifiers/reverse.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/easing/utils/get-easing-for-segment.js +0 -8
- package/dist/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/easing/utils/map.js +0 -32
- package/dist/node_modules/motion-utils/dist/es/errors.js +0 -15
- package/dist/node_modules/motion-utils/dist/es/format-error-message.js +0 -6
- package/dist/node_modules/motion-utils/dist/es/global-config.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/is-numerical-string.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/is-object.js +0 -6
- package/dist/node_modules/motion-utils/dist/es/is-zero-value-string.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/memo.js +0 -8
- package/dist/node_modules/motion-utils/dist/es/noop.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/pipe.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/progress.js +0 -7
- package/dist/node_modules/motion-utils/dist/es/subscription-manager.js +0 -29
- package/dist/node_modules/motion-utils/dist/es/time-conversion.js +0 -5
- package/dist/node_modules/motion-utils/dist/es/velocity-per-second.js +0 -6
- package/dist/node_modules/motion-utils/dist/es/warn-once.js +0 -8
- package/dist/node_modules/motion-utils/dist/es/wrap.js +0 -7
- package/dist/node_modules/object-assign/index.js +0 -54
- package/dist/node_modules/orderedmap/dist/index.js +0 -103
- package/dist/node_modules/photoswipe/dist/photoswipe.esm.js +0 -2956
- package/dist/node_modules/prop-types/checkPropTypes.js +0 -54
- package/dist/node_modules/prop-types/factoryWithThrowingShims.js +0 -52
- package/dist/node_modules/prop-types/factoryWithTypeCheckers.js +0 -329
- package/dist/node_modules/prop-types/index.js +0 -17
- package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.js +0 -10
- package/dist/node_modules/prop-types/lib/has.js +0 -7
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +0 -95
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +0 -78
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +0 -10
- package/dist/node_modules/prosemirror-commands/dist/index.js +0 -388
- package/dist/node_modules/prosemirror-dropcursor/dist/index.js +0 -86
- package/dist/node_modules/prosemirror-gapcursor/dist/index.js +0 -204
- package/dist/node_modules/prosemirror-history/dist/index.js +0 -248
- package/dist/node_modules/prosemirror-keymap/dist/index.js +0 -62
- package/dist/node_modules/prosemirror-model/dist/index.js +0 -2733
- package/dist/node_modules/prosemirror-schema-list/dist/index.js +0 -88
- package/dist/node_modules/prosemirror-state/dist/index.js +0 -822
- package/dist/node_modules/prosemirror-transform/dist/index.js +0 -1520
- package/dist/node_modules/prosemirror-view/dist/index.js +0 -3794
- package/dist/node_modules/react-day-picker/dist/esm/DayPicker.js +0 -229
- package/dist/node_modules/react-day-picker/dist/esm/UI.js +0 -22
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarDay.js +0 -19
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarMonth.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarWeek.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/classes/DateLib.js +0 -222
- package/dist/node_modules/react-day-picker/dist/esm/components/Button.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/CaptionLabel.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/Chevron.js +0 -18
- package/dist/node_modules/react-day-picker/dist/esm/components/Day.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/components/DayButton.js +0 -11
- package/dist/node_modules/react-day-picker/dist/esm/components/Dropdown.js +0 -19
- package/dist/node_modules/react-day-picker/dist/esm/components/DropdownNav.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/Footer.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/Month.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/components/MonthCaption.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/components/MonthGrid.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/Months.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/MonthsDropdown.js +0 -9
- package/dist/node_modules/react-day-picker/dist/esm/components/Nav.js +0 -27
- package/dist/node_modules/react-day-picker/dist/esm/components/NextMonthButton.js +0 -9
- package/dist/node_modules/react-day-picker/dist/esm/components/Option.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/PreviousMonthButton.js +0 -9
- package/dist/node_modules/react-day-picker/dist/esm/components/Root.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/components/Select.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/Week.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/components/WeekNumber.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/components/WeekNumberHeader.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/Weekday.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/Weekdays.js +0 -11
- package/dist/node_modules/react-day-picker/dist/esm/components/Weeks.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/YearsDropdown.js +0 -9
- package/dist/node_modules/react-day-picker/dist/esm/components/custom-components.js +0 -54
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatCaption.js +0 -9
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatDay.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader.js +0 -6
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown.js +0 -9
- package/dist/node_modules/react-day-picker/dist/esm/formatters/index.js +0 -18
- package/dist/node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.js +0 -19
- package/dist/node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.js +0 -42
- package/dist/node_modules/react-day-picker/dist/esm/helpers/endOfBroadcastWeek.js +0 -9
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getComponents.js +0 -10
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDataAttributes.js +0 -16
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDates.js +0 -21
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDays.js +0 -10
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames.js +0 -16
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getFocusableDate.js +0 -15
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getFormatters.js +0 -10
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getMonths.js +0 -24
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getNavMonth.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getNextFocus.js +0 -12
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getNextMonth.js +0 -12
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getPreviousMonth.js +0 -12
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getWeekdays.js +0 -11
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getWeeks.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js +0 -16
- package/dist/node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/helpers/useControlledValue.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/labels/index.js +0 -26
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelDayButton.js +0 -10
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelGrid.js +0 -9
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelGridcell.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.js +0 -6
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelNav.js +0 -6
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelNext.js +0 -6
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelPrevious.js +0 -6
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.js +0 -6
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.js +0 -6
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekday.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.js +0 -6
- package/dist/node_modules/react-day-picker/dist/esm/selection/useMulti.js +0 -21
- package/dist/node_modules/react-day-picker/dist/esm/selection/useRange.js +0 -18
- package/dist/node_modules/react-day-picker/dist/esm/selection/useSingle.js +0 -15
- package/dist/node_modules/react-day-picker/dist/esm/useAnimation.js +0 -56
- package/dist/node_modules/react-day-picker/dist/esm/useCalendar.js +0 -44
- package/dist/node_modules/react-day-picker/dist/esm/useDayPicker.js +0 -12
- package/dist/node_modules/react-day-picker/dist/esm/useFocus.js +0 -23
- package/dist/node_modules/react-day-picker/dist/esm/useSelection.js +0 -19
- package/dist/node_modules/react-day-picker/dist/esm/utils/addToRange.js +0 -32
- package/dist/node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.js +0 -26
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek.js +0 -15
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.js +0 -28
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.js +0 -9
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeOverlaps.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/utils/typeguards.js +0 -26
- package/dist/node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js +0 -3621
- package/dist/node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js +0 -1234
- package/dist/node_modules/react-dom/cjs/react-dom-server.browser.development.js +0 -3600
- package/dist/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js +0 -1255
- package/dist/node_modules/react-dom/server.browser.js +0 -15
- package/dist/node_modules/react-imask/esm/hook.js +0 -75
- package/dist/node_modules/react-imask/esm/input.js +0 -23
- package/dist/node_modules/react-imask/esm/mixin.js +0 -131
- package/dist/node_modules/react-photoswipe-gallery/dist/context.js +0 -17
- package/dist/node_modules/react-photoswipe-gallery/dist/gallery.js +0 -216
- package/dist/node_modules/react-photoswipe-gallery/dist/helpers/ensure-ref-passed.js +0 -10
- package/dist/node_modules/react-photoswipe-gallery/dist/helpers/entry-item-ref-is-element.js +0 -4
- package/dist/node_modules/react-photoswipe-gallery/dist/helpers/get-base-url.js +0 -6
- package/dist/node_modules/react-photoswipe-gallery/dist/helpers/get-hash-value.js +0 -6
- package/dist/node_modules/react-photoswipe-gallery/dist/helpers/get-hash-without-gid-and-pid.js +0 -9
- package/dist/node_modules/react-photoswipe-gallery/dist/helpers/get-initial-active-slide-index.js +0 -6
- package/dist/node_modules/react-photoswipe-gallery/dist/helpers/get-slides-and-index-from-data-source.js +0 -39
- package/dist/node_modules/react-photoswipe-gallery/dist/helpers/get-slides-and-index-from-items-refs.js +0 -31
- package/dist/node_modules/react-photoswipe-gallery/dist/helpers/hash-includes-navigation-query-params.js +0 -8
- package/dist/node_modules/react-photoswipe-gallery/dist/helpers/hash-to-object.js +0 -9
- package/dist/node_modules/react-photoswipe-gallery/dist/helpers/item-to-slide.js +0 -37
- package/dist/node_modules/react-photoswipe-gallery/dist/helpers/object-to-hash.js +0 -6
- package/dist/node_modules/react-photoswipe-gallery/dist/helpers/sort-nodes.js +0 -6
- package/dist/node_modules/react-photoswipe-gallery/dist/hooks.js +0 -22
- package/dist/node_modules/react-photoswipe-gallery/dist/item.js +0 -54
- package/dist/node_modules/react-photoswipe-gallery/dist/lightbox-stub.js +0 -8
- package/dist/node_modules/react-photoswipe-gallery/dist/no-ref-error.js +0 -14
- package/dist/node_modules/react-photoswipe-gallery/dist/no-source-id-error.js +0 -18
- package/dist/node_modules/react-reconciler/cjs/react-reconciler-constants.development.js +0 -32
- package/dist/node_modules/react-reconciler/cjs/react-reconciler-constants.production.min.js +0 -17
- package/dist/node_modules/react-reconciler/cjs/react-reconciler.development.js +0 -9139
- package/dist/node_modules/react-reconciler/cjs/react-reconciler.production.min.js +0 -3778
- package/dist/node_modules/react-reconciler/constants.js +0 -10
- package/dist/node_modules/react-reconciler/index.js +0 -10
- package/dist/node_modules/react-use-measure/dist/index.js +0 -60
- package/dist/node_modules/rope-sequence/dist/index.js +0 -100
- package/dist/node_modules/scheduler/cjs/scheduler.development.js +0 -277
- package/dist/node_modules/scheduler/cjs/scheduler.production.min.js +0 -213
- package/dist/node_modules/scheduler/index.js +0 -10
- package/dist/node_modules/three/build/three.module.js +0 -20599
- package/dist/node_modules/three-stdlib/_polyfill/LoaderUtils.js +0 -15
- package/dist/node_modules/three-stdlib/_polyfill/constants.js +0 -5
- package/dist/node_modules/three-stdlib/libs/MeshoptDecoder.js +0 -201
- package/dist/node_modules/three-stdlib/loaders/DRACOLoader.js +0 -246
- package/dist/node_modules/three-stdlib/loaders/GLTFLoader.js +0 -1670
- package/dist/node_modules/three-stdlib/utils/BufferGeometryUtils.js +0 -34
- package/dist/node_modules/tippy.js/dist/tippy.esm.js +0 -813
- package/dist/node_modules/w3c-keyname/index.js +0 -93
- package/dist/node_modules/zustand/esm/index.js +0 -61
|
@@ -1,1670 +0,0 @@
|
|
|
1
|
-
import { Loader as Te, LoaderUtils as G, FileLoader as ce, MeshPhysicalMaterial as y, Vector2 as le, Color as C, SpotLight as Re, PointLight as xe, DirectionalLight as Ee, Matrix4 as B, Vector3 as D, InstancedMesh as _e, Quaternion as ue, InstancedBufferAttribute as Le, Object3D as he, TextureLoader as Se, ImageBitmapLoader as ye, BufferAttribute as K, InterleavedBuffer as Me, LinearMipmapLinearFilter as fe, NearestMipmapLinearFilter as ve, LinearMipmapNearestFilter as we, NearestMipmapNearestFilter as be, LinearFilter as de, NearestFilter as Ne, RepeatWrapping as Y, MirroredRepeatWrapping as Ie, ClampToEdgeWrapping as Oe, PointsMaterial as Ce, Material as V, LineBasicMaterial as De, MeshStandardMaterial as pe, DoubleSide as Fe, MeshBasicMaterial as k, PropertyBinding as Pe, BufferGeometry as He, SkinnedMesh as ke, Mesh as Ge, LineSegments as Be, Line as Ue, LineLoop as je, Points as Ke, Group as X, PerspectiveCamera as Ve, MathUtils as Xe, OrthographicCamera as ze, Skeleton as qe, AnimationClip as We, Bone as Ye, InterpolateDiscrete as Qe, InterpolateLinear as me, InterleavedBufferAttribute as Ze, Texture as J, VectorKeyframeTrack as $, NumberKeyframeTrack as ee, QuaternionKeyframeTrack as te, FrontSide as Je, Interpolant as $e, Box3 as et, Sphere as tt, TriangleStripDrawMode as st, TriangleFanDrawMode as nt } from "../../three/build/three.module.js";
|
|
2
|
-
import { toTrianglesDrawMode as se } from "../utils/BufferGeometryUtils.js";
|
|
3
|
-
import { version as rt } from "../_polyfill/constants.js";
|
|
4
|
-
import { decodeText as U } from "../_polyfill/LoaderUtils.js";
|
|
5
|
-
const O = "srgb", v = "srgb-linear", ne = 3001, it = 3e3;
|
|
6
|
-
class Vt extends Te {
|
|
7
|
-
constructor(t) {
|
|
8
|
-
super(t), this.dracoLoader = null, this.ktx2Loader = null, this.meshoptDecoder = null, this.pluginCallbacks = [], this.register(function(e) {
|
|
9
|
-
return new ut(e);
|
|
10
|
-
}), this.register(function(e) {
|
|
11
|
-
return new ht(e);
|
|
12
|
-
}), this.register(function(e) {
|
|
13
|
-
return new xt(e);
|
|
14
|
-
}), this.register(function(e) {
|
|
15
|
-
return new Et(e);
|
|
16
|
-
}), this.register(function(e) {
|
|
17
|
-
return new _t(e);
|
|
18
|
-
}), this.register(function(e) {
|
|
19
|
-
return new dt(e);
|
|
20
|
-
}), this.register(function(e) {
|
|
21
|
-
return new pt(e);
|
|
22
|
-
}), this.register(function(e) {
|
|
23
|
-
return new mt(e);
|
|
24
|
-
}), this.register(function(e) {
|
|
25
|
-
return new At(e);
|
|
26
|
-
}), this.register(function(e) {
|
|
27
|
-
return new lt(e);
|
|
28
|
-
}), this.register(function(e) {
|
|
29
|
-
return new gt(e);
|
|
30
|
-
}), this.register(function(e) {
|
|
31
|
-
return new ft(e);
|
|
32
|
-
}), this.register(function(e) {
|
|
33
|
-
return new Rt(e);
|
|
34
|
-
}), this.register(function(e) {
|
|
35
|
-
return new Tt(e);
|
|
36
|
-
}), this.register(function(e) {
|
|
37
|
-
return new at(e);
|
|
38
|
-
}), this.register(function(e) {
|
|
39
|
-
return new Lt(e);
|
|
40
|
-
}), this.register(function(e) {
|
|
41
|
-
return new St(e);
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
load(t, e, r, s) {
|
|
45
|
-
const n = this;
|
|
46
|
-
let i;
|
|
47
|
-
if (this.resourcePath !== "")
|
|
48
|
-
i = this.resourcePath;
|
|
49
|
-
else if (this.path !== "") {
|
|
50
|
-
const c = G.extractUrlBase(t);
|
|
51
|
-
i = G.resolveURL(c, this.path);
|
|
52
|
-
} else
|
|
53
|
-
i = G.extractUrlBase(t);
|
|
54
|
-
this.manager.itemStart(t);
|
|
55
|
-
const a = function(c) {
|
|
56
|
-
s ? s(c) : console.error(c), n.manager.itemError(t), n.manager.itemEnd(t);
|
|
57
|
-
}, o = new ce(this.manager);
|
|
58
|
-
o.setPath(this.path), o.setResponseType("arraybuffer"), o.setRequestHeader(this.requestHeader), o.setWithCredentials(this.withCredentials), o.load(
|
|
59
|
-
t,
|
|
60
|
-
function(c) {
|
|
61
|
-
try {
|
|
62
|
-
n.parse(
|
|
63
|
-
c,
|
|
64
|
-
i,
|
|
65
|
-
function(l) {
|
|
66
|
-
e(l), n.manager.itemEnd(t);
|
|
67
|
-
},
|
|
68
|
-
a
|
|
69
|
-
);
|
|
70
|
-
} catch (l) {
|
|
71
|
-
a(l);
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
r,
|
|
75
|
-
a
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
setDRACOLoader(t) {
|
|
79
|
-
return this.dracoLoader = t, this;
|
|
80
|
-
}
|
|
81
|
-
setDDSLoader() {
|
|
82
|
-
throw new Error('THREE.GLTFLoader: "MSFT_texture_dds" no longer supported. Please update to "KHR_texture_basisu".');
|
|
83
|
-
}
|
|
84
|
-
setKTX2Loader(t) {
|
|
85
|
-
return this.ktx2Loader = t, this;
|
|
86
|
-
}
|
|
87
|
-
setMeshoptDecoder(t) {
|
|
88
|
-
return this.meshoptDecoder = t, this;
|
|
89
|
-
}
|
|
90
|
-
register(t) {
|
|
91
|
-
return this.pluginCallbacks.indexOf(t) === -1 && this.pluginCallbacks.push(t), this;
|
|
92
|
-
}
|
|
93
|
-
unregister(t) {
|
|
94
|
-
return this.pluginCallbacks.indexOf(t) !== -1 && this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(t), 1), this;
|
|
95
|
-
}
|
|
96
|
-
parse(t, e, r, s) {
|
|
97
|
-
let n;
|
|
98
|
-
const i = {}, a = {};
|
|
99
|
-
if (typeof t == "string")
|
|
100
|
-
n = JSON.parse(t);
|
|
101
|
-
else if (t instanceof ArrayBuffer)
|
|
102
|
-
if (U(new Uint8Array(t.slice(0, 4))) === Ae) {
|
|
103
|
-
try {
|
|
104
|
-
i[A.KHR_BINARY_GLTF] = new yt(t);
|
|
105
|
-
} catch (l) {
|
|
106
|
-
s && s(l);
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
n = JSON.parse(i[A.KHR_BINARY_GLTF].content);
|
|
110
|
-
} else
|
|
111
|
-
n = JSON.parse(U(new Uint8Array(t)));
|
|
112
|
-
else
|
|
113
|
-
n = t;
|
|
114
|
-
if (n.asset === void 0 || n.asset.version[0] < 2) {
|
|
115
|
-
s && s(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));
|
|
116
|
-
return;
|
|
117
|
-
}
|
|
118
|
-
const o = new kt(n, {
|
|
119
|
-
path: e || this.resourcePath || "",
|
|
120
|
-
crossOrigin: this.crossOrigin,
|
|
121
|
-
requestHeader: this.requestHeader,
|
|
122
|
-
manager: this.manager,
|
|
123
|
-
ktx2Loader: this.ktx2Loader,
|
|
124
|
-
meshoptDecoder: this.meshoptDecoder
|
|
125
|
-
});
|
|
126
|
-
o.fileLoader.setRequestHeader(this.requestHeader);
|
|
127
|
-
for (let c = 0; c < this.pluginCallbacks.length; c++) {
|
|
128
|
-
const l = this.pluginCallbacks[c](o);
|
|
129
|
-
l.name || console.error("THREE.GLTFLoader: Invalid plugin found: missing name"), a[l.name] = l, i[l.name] = !0;
|
|
130
|
-
}
|
|
131
|
-
if (n.extensionsUsed)
|
|
132
|
-
for (let c = 0; c < n.extensionsUsed.length; ++c) {
|
|
133
|
-
const l = n.extensionsUsed[c], u = n.extensionsRequired || [];
|
|
134
|
-
switch (l) {
|
|
135
|
-
case A.KHR_MATERIALS_UNLIT:
|
|
136
|
-
i[l] = new ct();
|
|
137
|
-
break;
|
|
138
|
-
case A.KHR_DRACO_MESH_COMPRESSION:
|
|
139
|
-
i[l] = new Mt(n, this.dracoLoader);
|
|
140
|
-
break;
|
|
141
|
-
case A.KHR_TEXTURE_TRANSFORM:
|
|
142
|
-
i[l] = new vt();
|
|
143
|
-
break;
|
|
144
|
-
case A.KHR_MESH_QUANTIZATION:
|
|
145
|
-
i[l] = new wt();
|
|
146
|
-
break;
|
|
147
|
-
default:
|
|
148
|
-
u.indexOf(l) >= 0 && a[l] === void 0 && console.warn('THREE.GLTFLoader: Unknown extension "' + l + '".');
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
o.setExtensions(i), o.setPlugins(a), o.parse(r, s);
|
|
152
|
-
}
|
|
153
|
-
parseAsync(t, e) {
|
|
154
|
-
const r = this;
|
|
155
|
-
return new Promise(function(s, n) {
|
|
156
|
-
r.parse(t, e, s, n);
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
function ot() {
|
|
161
|
-
let f = {};
|
|
162
|
-
return {
|
|
163
|
-
get: function(t) {
|
|
164
|
-
return f[t];
|
|
165
|
-
},
|
|
166
|
-
add: function(t, e) {
|
|
167
|
-
f[t] = e;
|
|
168
|
-
},
|
|
169
|
-
remove: function(t) {
|
|
170
|
-
delete f[t];
|
|
171
|
-
},
|
|
172
|
-
removeAll: function() {
|
|
173
|
-
f = {};
|
|
174
|
-
}
|
|
175
|
-
};
|
|
176
|
-
}
|
|
177
|
-
const A = {
|
|
178
|
-
KHR_BINARY_GLTF: "KHR_binary_glTF",
|
|
179
|
-
KHR_DRACO_MESH_COMPRESSION: "KHR_draco_mesh_compression",
|
|
180
|
-
KHR_LIGHTS_PUNCTUAL: "KHR_lights_punctual",
|
|
181
|
-
KHR_MATERIALS_CLEARCOAT: "KHR_materials_clearcoat",
|
|
182
|
-
KHR_MATERIALS_DISPERSION: "KHR_materials_dispersion",
|
|
183
|
-
KHR_MATERIALS_IOR: "KHR_materials_ior",
|
|
184
|
-
KHR_MATERIALS_SHEEN: "KHR_materials_sheen",
|
|
185
|
-
KHR_MATERIALS_SPECULAR: "KHR_materials_specular",
|
|
186
|
-
KHR_MATERIALS_TRANSMISSION: "KHR_materials_transmission",
|
|
187
|
-
KHR_MATERIALS_IRIDESCENCE: "KHR_materials_iridescence",
|
|
188
|
-
KHR_MATERIALS_ANISOTROPY: "KHR_materials_anisotropy",
|
|
189
|
-
KHR_MATERIALS_UNLIT: "KHR_materials_unlit",
|
|
190
|
-
KHR_MATERIALS_VOLUME: "KHR_materials_volume",
|
|
191
|
-
KHR_TEXTURE_BASISU: "KHR_texture_basisu",
|
|
192
|
-
KHR_TEXTURE_TRANSFORM: "KHR_texture_transform",
|
|
193
|
-
KHR_MESH_QUANTIZATION: "KHR_mesh_quantization",
|
|
194
|
-
KHR_MATERIALS_EMISSIVE_STRENGTH: "KHR_materials_emissive_strength",
|
|
195
|
-
EXT_MATERIALS_BUMP: "EXT_materials_bump",
|
|
196
|
-
EXT_TEXTURE_WEBP: "EXT_texture_webp",
|
|
197
|
-
EXT_TEXTURE_AVIF: "EXT_texture_avif",
|
|
198
|
-
EXT_MESHOPT_COMPRESSION: "EXT_meshopt_compression",
|
|
199
|
-
EXT_MESH_GPU_INSTANCING: "EXT_mesh_gpu_instancing"
|
|
200
|
-
};
|
|
201
|
-
class at {
|
|
202
|
-
constructor(t) {
|
|
203
|
-
this.parser = t, this.name = A.KHR_LIGHTS_PUNCTUAL, this.cache = { refs: {}, uses: {} };
|
|
204
|
-
}
|
|
205
|
-
_markDefs() {
|
|
206
|
-
const t = this.parser, e = this.parser.json.nodes || [];
|
|
207
|
-
for (let r = 0, s = e.length; r < s; r++) {
|
|
208
|
-
const n = e[r];
|
|
209
|
-
n.extensions && n.extensions[this.name] && n.extensions[this.name].light !== void 0 && t._addNodeRef(this.cache, n.extensions[this.name].light);
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
_loadLight(t) {
|
|
213
|
-
const e = this.parser, r = "light:" + t;
|
|
214
|
-
let s = e.cache.get(r);
|
|
215
|
-
if (s)
|
|
216
|
-
return s;
|
|
217
|
-
const n = e.json, o = ((n.extensions && n.extensions[this.name] || {}).lights || [])[t];
|
|
218
|
-
let c;
|
|
219
|
-
const l = new C(16777215);
|
|
220
|
-
o.color !== void 0 && l.setRGB(o.color[0], o.color[1], o.color[2], v);
|
|
221
|
-
const u = o.range !== void 0 ? o.range : 0;
|
|
222
|
-
switch (o.type) {
|
|
223
|
-
case "directional":
|
|
224
|
-
c = new Ee(l), c.target.position.set(0, 0, -1), c.add(c.target);
|
|
225
|
-
break;
|
|
226
|
-
case "point":
|
|
227
|
-
c = new xe(l), c.distance = u;
|
|
228
|
-
break;
|
|
229
|
-
case "spot":
|
|
230
|
-
c = new Re(l), c.distance = u, o.spot = o.spot || {}, o.spot.innerConeAngle = o.spot.innerConeAngle !== void 0 ? o.spot.innerConeAngle : 0, o.spot.outerConeAngle = o.spot.outerConeAngle !== void 0 ? o.spot.outerConeAngle : Math.PI / 4, c.angle = o.spot.outerConeAngle, c.penumbra = 1 - o.spot.innerConeAngle / o.spot.outerConeAngle, c.target.position.set(0, 0, -1), c.add(c.target);
|
|
231
|
-
break;
|
|
232
|
-
default:
|
|
233
|
-
throw new Error("THREE.GLTFLoader: Unexpected light type: " + o.type);
|
|
234
|
-
}
|
|
235
|
-
return c.position.set(0, 0, 0), c.decay = 2, M(c, o), o.intensity !== void 0 && (c.intensity = o.intensity), c.name = e.createUniqueName(o.name || "light_" + t), s = Promise.resolve(c), e.cache.add(r, s), s;
|
|
236
|
-
}
|
|
237
|
-
getDependency(t, e) {
|
|
238
|
-
if (t === "light")
|
|
239
|
-
return this._loadLight(e);
|
|
240
|
-
}
|
|
241
|
-
createNodeAttachment(t) {
|
|
242
|
-
const e = this, r = this.parser, n = r.json.nodes[t], a = (n.extensions && n.extensions[this.name] || {}).light;
|
|
243
|
-
return a === void 0 ? null : this._loadLight(a).then(function(o) {
|
|
244
|
-
return r._getNodeRef(e.cache, a, o);
|
|
245
|
-
});
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
class ct {
|
|
249
|
-
constructor() {
|
|
250
|
-
this.name = A.KHR_MATERIALS_UNLIT;
|
|
251
|
-
}
|
|
252
|
-
getMaterialType() {
|
|
253
|
-
return k;
|
|
254
|
-
}
|
|
255
|
-
extendParams(t, e, r) {
|
|
256
|
-
const s = [];
|
|
257
|
-
t.color = new C(1, 1, 1), t.opacity = 1;
|
|
258
|
-
const n = e.pbrMetallicRoughness;
|
|
259
|
-
if (n) {
|
|
260
|
-
if (Array.isArray(n.baseColorFactor)) {
|
|
261
|
-
const i = n.baseColorFactor;
|
|
262
|
-
t.color.setRGB(i[0], i[1], i[2], v), t.opacity = i[3];
|
|
263
|
-
}
|
|
264
|
-
n.baseColorTexture !== void 0 && s.push(r.assignTexture(t, "map", n.baseColorTexture, O));
|
|
265
|
-
}
|
|
266
|
-
return Promise.all(s);
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
class lt {
|
|
270
|
-
constructor(t) {
|
|
271
|
-
this.parser = t, this.name = A.KHR_MATERIALS_EMISSIVE_STRENGTH;
|
|
272
|
-
}
|
|
273
|
-
extendMaterialParams(t, e) {
|
|
274
|
-
const s = this.parser.json.materials[t];
|
|
275
|
-
if (!s.extensions || !s.extensions[this.name])
|
|
276
|
-
return Promise.resolve();
|
|
277
|
-
const n = s.extensions[this.name].emissiveStrength;
|
|
278
|
-
return n !== void 0 && (e.emissiveIntensity = n), Promise.resolve();
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
class ut {
|
|
282
|
-
constructor(t) {
|
|
283
|
-
this.parser = t, this.name = A.KHR_MATERIALS_CLEARCOAT;
|
|
284
|
-
}
|
|
285
|
-
getMaterialType(t) {
|
|
286
|
-
const r = this.parser.json.materials[t];
|
|
287
|
-
return !r.extensions || !r.extensions[this.name] ? null : y;
|
|
288
|
-
}
|
|
289
|
-
extendMaterialParams(t, e) {
|
|
290
|
-
const r = this.parser, s = r.json.materials[t];
|
|
291
|
-
if (!s.extensions || !s.extensions[this.name])
|
|
292
|
-
return Promise.resolve();
|
|
293
|
-
const n = [], i = s.extensions[this.name];
|
|
294
|
-
if (i.clearcoatFactor !== void 0 && (e.clearcoat = i.clearcoatFactor), i.clearcoatTexture !== void 0 && n.push(r.assignTexture(e, "clearcoatMap", i.clearcoatTexture)), i.clearcoatRoughnessFactor !== void 0 && (e.clearcoatRoughness = i.clearcoatRoughnessFactor), i.clearcoatRoughnessTexture !== void 0 && n.push(r.assignTexture(e, "clearcoatRoughnessMap", i.clearcoatRoughnessTexture)), i.clearcoatNormalTexture !== void 0 && (n.push(r.assignTexture(e, "clearcoatNormalMap", i.clearcoatNormalTexture)), i.clearcoatNormalTexture.scale !== void 0)) {
|
|
295
|
-
const a = i.clearcoatNormalTexture.scale;
|
|
296
|
-
e.clearcoatNormalScale = new le(a, a);
|
|
297
|
-
}
|
|
298
|
-
return Promise.all(n);
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
class ht {
|
|
302
|
-
constructor(t) {
|
|
303
|
-
this.parser = t, this.name = A.KHR_MATERIALS_DISPERSION;
|
|
304
|
-
}
|
|
305
|
-
getMaterialType(t) {
|
|
306
|
-
const r = this.parser.json.materials[t];
|
|
307
|
-
return !r.extensions || !r.extensions[this.name] ? null : y;
|
|
308
|
-
}
|
|
309
|
-
extendMaterialParams(t, e) {
|
|
310
|
-
const s = this.parser.json.materials[t];
|
|
311
|
-
if (!s.extensions || !s.extensions[this.name])
|
|
312
|
-
return Promise.resolve();
|
|
313
|
-
const n = s.extensions[this.name];
|
|
314
|
-
return e.dispersion = n.dispersion !== void 0 ? n.dispersion : 0, Promise.resolve();
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
class ft {
|
|
318
|
-
constructor(t) {
|
|
319
|
-
this.parser = t, this.name = A.KHR_MATERIALS_IRIDESCENCE;
|
|
320
|
-
}
|
|
321
|
-
getMaterialType(t) {
|
|
322
|
-
const r = this.parser.json.materials[t];
|
|
323
|
-
return !r.extensions || !r.extensions[this.name] ? null : y;
|
|
324
|
-
}
|
|
325
|
-
extendMaterialParams(t, e) {
|
|
326
|
-
const r = this.parser, s = r.json.materials[t];
|
|
327
|
-
if (!s.extensions || !s.extensions[this.name])
|
|
328
|
-
return Promise.resolve();
|
|
329
|
-
const n = [], i = s.extensions[this.name];
|
|
330
|
-
return i.iridescenceFactor !== void 0 && (e.iridescence = i.iridescenceFactor), i.iridescenceTexture !== void 0 && n.push(r.assignTexture(e, "iridescenceMap", i.iridescenceTexture)), i.iridescenceIor !== void 0 && (e.iridescenceIOR = i.iridescenceIor), e.iridescenceThicknessRange === void 0 && (e.iridescenceThicknessRange = [100, 400]), i.iridescenceThicknessMinimum !== void 0 && (e.iridescenceThicknessRange[0] = i.iridescenceThicknessMinimum), i.iridescenceThicknessMaximum !== void 0 && (e.iridescenceThicknessRange[1] = i.iridescenceThicknessMaximum), i.iridescenceThicknessTexture !== void 0 && n.push(
|
|
331
|
-
r.assignTexture(e, "iridescenceThicknessMap", i.iridescenceThicknessTexture)
|
|
332
|
-
), Promise.all(n);
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
class dt {
|
|
336
|
-
constructor(t) {
|
|
337
|
-
this.parser = t, this.name = A.KHR_MATERIALS_SHEEN;
|
|
338
|
-
}
|
|
339
|
-
getMaterialType(t) {
|
|
340
|
-
const r = this.parser.json.materials[t];
|
|
341
|
-
return !r.extensions || !r.extensions[this.name] ? null : y;
|
|
342
|
-
}
|
|
343
|
-
extendMaterialParams(t, e) {
|
|
344
|
-
const r = this.parser, s = r.json.materials[t];
|
|
345
|
-
if (!s.extensions || !s.extensions[this.name])
|
|
346
|
-
return Promise.resolve();
|
|
347
|
-
const n = [];
|
|
348
|
-
e.sheenColor = new C(0, 0, 0), e.sheenRoughness = 0, e.sheen = 1;
|
|
349
|
-
const i = s.extensions[this.name];
|
|
350
|
-
if (i.sheenColorFactor !== void 0) {
|
|
351
|
-
const a = i.sheenColorFactor;
|
|
352
|
-
e.sheenColor.setRGB(a[0], a[1], a[2], v);
|
|
353
|
-
}
|
|
354
|
-
return i.sheenRoughnessFactor !== void 0 && (e.sheenRoughness = i.sheenRoughnessFactor), i.sheenColorTexture !== void 0 && n.push(r.assignTexture(e, "sheenColorMap", i.sheenColorTexture, O)), i.sheenRoughnessTexture !== void 0 && n.push(r.assignTexture(e, "sheenRoughnessMap", i.sheenRoughnessTexture)), Promise.all(n);
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
class pt {
|
|
358
|
-
constructor(t) {
|
|
359
|
-
this.parser = t, this.name = A.KHR_MATERIALS_TRANSMISSION;
|
|
360
|
-
}
|
|
361
|
-
getMaterialType(t) {
|
|
362
|
-
const r = this.parser.json.materials[t];
|
|
363
|
-
return !r.extensions || !r.extensions[this.name] ? null : y;
|
|
364
|
-
}
|
|
365
|
-
extendMaterialParams(t, e) {
|
|
366
|
-
const r = this.parser, s = r.json.materials[t];
|
|
367
|
-
if (!s.extensions || !s.extensions[this.name])
|
|
368
|
-
return Promise.resolve();
|
|
369
|
-
const n = [], i = s.extensions[this.name];
|
|
370
|
-
return i.transmissionFactor !== void 0 && (e.transmission = i.transmissionFactor), i.transmissionTexture !== void 0 && n.push(r.assignTexture(e, "transmissionMap", i.transmissionTexture)), Promise.all(n);
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
class mt {
|
|
374
|
-
constructor(t) {
|
|
375
|
-
this.parser = t, this.name = A.KHR_MATERIALS_VOLUME;
|
|
376
|
-
}
|
|
377
|
-
getMaterialType(t) {
|
|
378
|
-
const r = this.parser.json.materials[t];
|
|
379
|
-
return !r.extensions || !r.extensions[this.name] ? null : y;
|
|
380
|
-
}
|
|
381
|
-
extendMaterialParams(t, e) {
|
|
382
|
-
const r = this.parser, s = r.json.materials[t];
|
|
383
|
-
if (!s.extensions || !s.extensions[this.name])
|
|
384
|
-
return Promise.resolve();
|
|
385
|
-
const n = [], i = s.extensions[this.name];
|
|
386
|
-
e.thickness = i.thicknessFactor !== void 0 ? i.thicknessFactor : 0, i.thicknessTexture !== void 0 && n.push(r.assignTexture(e, "thicknessMap", i.thicknessTexture)), e.attenuationDistance = i.attenuationDistance || 1 / 0;
|
|
387
|
-
const a = i.attenuationColor || [1, 1, 1];
|
|
388
|
-
return e.attenuationColor = new C().setRGB(
|
|
389
|
-
a[0],
|
|
390
|
-
a[1],
|
|
391
|
-
a[2],
|
|
392
|
-
v
|
|
393
|
-
), Promise.all(n);
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
class At {
|
|
397
|
-
constructor(t) {
|
|
398
|
-
this.parser = t, this.name = A.KHR_MATERIALS_IOR;
|
|
399
|
-
}
|
|
400
|
-
getMaterialType(t) {
|
|
401
|
-
const r = this.parser.json.materials[t];
|
|
402
|
-
return !r.extensions || !r.extensions[this.name] ? null : y;
|
|
403
|
-
}
|
|
404
|
-
extendMaterialParams(t, e) {
|
|
405
|
-
const s = this.parser.json.materials[t];
|
|
406
|
-
if (!s.extensions || !s.extensions[this.name])
|
|
407
|
-
return Promise.resolve();
|
|
408
|
-
const n = s.extensions[this.name];
|
|
409
|
-
return e.ior = n.ior !== void 0 ? n.ior : 1.5, Promise.resolve();
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
class gt {
|
|
413
|
-
constructor(t) {
|
|
414
|
-
this.parser = t, this.name = A.KHR_MATERIALS_SPECULAR;
|
|
415
|
-
}
|
|
416
|
-
getMaterialType(t) {
|
|
417
|
-
const r = this.parser.json.materials[t];
|
|
418
|
-
return !r.extensions || !r.extensions[this.name] ? null : y;
|
|
419
|
-
}
|
|
420
|
-
extendMaterialParams(t, e) {
|
|
421
|
-
const r = this.parser, s = r.json.materials[t];
|
|
422
|
-
if (!s.extensions || !s.extensions[this.name])
|
|
423
|
-
return Promise.resolve();
|
|
424
|
-
const n = [], i = s.extensions[this.name];
|
|
425
|
-
e.specularIntensity = i.specularFactor !== void 0 ? i.specularFactor : 1, i.specularTexture !== void 0 && n.push(r.assignTexture(e, "specularIntensityMap", i.specularTexture));
|
|
426
|
-
const a = i.specularColorFactor || [1, 1, 1];
|
|
427
|
-
return e.specularColor = new C().setRGB(a[0], a[1], a[2], v), i.specularColorTexture !== void 0 && n.push(
|
|
428
|
-
r.assignTexture(e, "specularColorMap", i.specularColorTexture, O)
|
|
429
|
-
), Promise.all(n);
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
class Tt {
|
|
433
|
-
constructor(t) {
|
|
434
|
-
this.parser = t, this.name = A.EXT_MATERIALS_BUMP;
|
|
435
|
-
}
|
|
436
|
-
getMaterialType(t) {
|
|
437
|
-
const r = this.parser.json.materials[t];
|
|
438
|
-
return !r.extensions || !r.extensions[this.name] ? null : y;
|
|
439
|
-
}
|
|
440
|
-
extendMaterialParams(t, e) {
|
|
441
|
-
const r = this.parser, s = r.json.materials[t];
|
|
442
|
-
if (!s.extensions || !s.extensions[this.name])
|
|
443
|
-
return Promise.resolve();
|
|
444
|
-
const n = [], i = s.extensions[this.name];
|
|
445
|
-
return e.bumpScale = i.bumpFactor !== void 0 ? i.bumpFactor : 1, i.bumpTexture !== void 0 && n.push(r.assignTexture(e, "bumpMap", i.bumpTexture)), Promise.all(n);
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
class Rt {
|
|
449
|
-
constructor(t) {
|
|
450
|
-
this.parser = t, this.name = A.KHR_MATERIALS_ANISOTROPY;
|
|
451
|
-
}
|
|
452
|
-
getMaterialType(t) {
|
|
453
|
-
const r = this.parser.json.materials[t];
|
|
454
|
-
return !r.extensions || !r.extensions[this.name] ? null : y;
|
|
455
|
-
}
|
|
456
|
-
extendMaterialParams(t, e) {
|
|
457
|
-
const r = this.parser, s = r.json.materials[t];
|
|
458
|
-
if (!s.extensions || !s.extensions[this.name])
|
|
459
|
-
return Promise.resolve();
|
|
460
|
-
const n = [], i = s.extensions[this.name];
|
|
461
|
-
return i.anisotropyStrength !== void 0 && (e.anisotropy = i.anisotropyStrength), i.anisotropyRotation !== void 0 && (e.anisotropyRotation = i.anisotropyRotation), i.anisotropyTexture !== void 0 && n.push(r.assignTexture(e, "anisotropyMap", i.anisotropyTexture)), Promise.all(n);
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
|
-
class xt {
|
|
465
|
-
constructor(t) {
|
|
466
|
-
this.parser = t, this.name = A.KHR_TEXTURE_BASISU;
|
|
467
|
-
}
|
|
468
|
-
loadTexture(t) {
|
|
469
|
-
const e = this.parser, r = e.json, s = r.textures[t];
|
|
470
|
-
if (!s.extensions || !s.extensions[this.name])
|
|
471
|
-
return null;
|
|
472
|
-
const n = s.extensions[this.name], i = e.options.ktx2Loader;
|
|
473
|
-
if (!i) {
|
|
474
|
-
if (r.extensionsRequired && r.extensionsRequired.indexOf(this.name) >= 0)
|
|
475
|
-
throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");
|
|
476
|
-
return null;
|
|
477
|
-
}
|
|
478
|
-
return e.loadTextureImage(t, n.source, i);
|
|
479
|
-
}
|
|
480
|
-
}
|
|
481
|
-
class Et {
|
|
482
|
-
constructor(t) {
|
|
483
|
-
this.parser = t, this.name = A.EXT_TEXTURE_WEBP, this.isSupported = null;
|
|
484
|
-
}
|
|
485
|
-
loadTexture(t) {
|
|
486
|
-
const e = this.name, r = this.parser, s = r.json, n = s.textures[t];
|
|
487
|
-
if (!n.extensions || !n.extensions[e])
|
|
488
|
-
return null;
|
|
489
|
-
const i = n.extensions[e], a = s.images[i.source];
|
|
490
|
-
let o = r.textureLoader;
|
|
491
|
-
if (a.uri) {
|
|
492
|
-
const c = r.options.manager.getHandler(a.uri);
|
|
493
|
-
c !== null && (o = c);
|
|
494
|
-
}
|
|
495
|
-
return this.detectSupport().then(function(c) {
|
|
496
|
-
if (c)
|
|
497
|
-
return r.loadTextureImage(t, i.source, o);
|
|
498
|
-
if (s.extensionsRequired && s.extensionsRequired.indexOf(e) >= 0)
|
|
499
|
-
throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");
|
|
500
|
-
return r.loadTexture(t);
|
|
501
|
-
});
|
|
502
|
-
}
|
|
503
|
-
detectSupport() {
|
|
504
|
-
return this.isSupported || (this.isSupported = new Promise(function(t) {
|
|
505
|
-
const e = new Image();
|
|
506
|
-
e.src = "data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA", e.onload = e.onerror = function() {
|
|
507
|
-
t(e.height === 1);
|
|
508
|
-
};
|
|
509
|
-
})), this.isSupported;
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
class _t {
|
|
513
|
-
constructor(t) {
|
|
514
|
-
this.parser = t, this.name = A.EXT_TEXTURE_AVIF, this.isSupported = null;
|
|
515
|
-
}
|
|
516
|
-
loadTexture(t) {
|
|
517
|
-
const e = this.name, r = this.parser, s = r.json, n = s.textures[t];
|
|
518
|
-
if (!n.extensions || !n.extensions[e])
|
|
519
|
-
return null;
|
|
520
|
-
const i = n.extensions[e], a = s.images[i.source];
|
|
521
|
-
let o = r.textureLoader;
|
|
522
|
-
if (a.uri) {
|
|
523
|
-
const c = r.options.manager.getHandler(a.uri);
|
|
524
|
-
c !== null && (o = c);
|
|
525
|
-
}
|
|
526
|
-
return this.detectSupport().then(function(c) {
|
|
527
|
-
if (c)
|
|
528
|
-
return r.loadTextureImage(t, i.source, o);
|
|
529
|
-
if (s.extensionsRequired && s.extensionsRequired.indexOf(e) >= 0)
|
|
530
|
-
throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");
|
|
531
|
-
return r.loadTexture(t);
|
|
532
|
-
});
|
|
533
|
-
}
|
|
534
|
-
detectSupport() {
|
|
535
|
-
return this.isSupported || (this.isSupported = new Promise(function(t) {
|
|
536
|
-
const e = new Image();
|
|
537
|
-
e.src = "data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=", e.onload = e.onerror = function() {
|
|
538
|
-
t(e.height === 1);
|
|
539
|
-
};
|
|
540
|
-
})), this.isSupported;
|
|
541
|
-
}
|
|
542
|
-
}
|
|
543
|
-
class Lt {
|
|
544
|
-
constructor(t) {
|
|
545
|
-
this.name = A.EXT_MESHOPT_COMPRESSION, this.parser = t;
|
|
546
|
-
}
|
|
547
|
-
loadBufferView(t) {
|
|
548
|
-
const e = this.parser.json, r = e.bufferViews[t];
|
|
549
|
-
if (r.extensions && r.extensions[this.name]) {
|
|
550
|
-
const s = r.extensions[this.name], n = this.parser.getDependency("buffer", s.buffer), i = this.parser.options.meshoptDecoder;
|
|
551
|
-
if (!i || !i.supported) {
|
|
552
|
-
if (e.extensionsRequired && e.extensionsRequired.indexOf(this.name) >= 0)
|
|
553
|
-
throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");
|
|
554
|
-
return null;
|
|
555
|
-
}
|
|
556
|
-
return n.then(function(a) {
|
|
557
|
-
const o = s.byteOffset || 0, c = s.byteLength || 0, l = s.count, u = s.byteStride, h = new Uint8Array(a, o, c);
|
|
558
|
-
return i.decodeGltfBufferAsync ? i.decodeGltfBufferAsync(l, u, h, s.mode, s.filter).then(function(d) {
|
|
559
|
-
return d.buffer;
|
|
560
|
-
}) : i.ready.then(function() {
|
|
561
|
-
const d = new ArrayBuffer(l * u);
|
|
562
|
-
return i.decodeGltfBuffer(
|
|
563
|
-
new Uint8Array(d),
|
|
564
|
-
l,
|
|
565
|
-
u,
|
|
566
|
-
h,
|
|
567
|
-
s.mode,
|
|
568
|
-
s.filter
|
|
569
|
-
), d;
|
|
570
|
-
});
|
|
571
|
-
});
|
|
572
|
-
} else
|
|
573
|
-
return null;
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
|
-
class St {
|
|
577
|
-
constructor(t) {
|
|
578
|
-
this.name = A.EXT_MESH_GPU_INSTANCING, this.parser = t;
|
|
579
|
-
}
|
|
580
|
-
createNodeMesh(t) {
|
|
581
|
-
const e = this.parser.json, r = e.nodes[t];
|
|
582
|
-
if (!r.extensions || !r.extensions[this.name] || r.mesh === void 0)
|
|
583
|
-
return null;
|
|
584
|
-
const s = e.meshes[r.mesh];
|
|
585
|
-
for (const c of s.primitives)
|
|
586
|
-
if (c.mode !== _.TRIANGLES && c.mode !== _.TRIANGLE_STRIP && c.mode !== _.TRIANGLE_FAN && c.mode !== void 0)
|
|
587
|
-
return null;
|
|
588
|
-
const i = r.extensions[this.name].attributes, a = [], o = {};
|
|
589
|
-
for (const c in i)
|
|
590
|
-
a.push(
|
|
591
|
-
this.parser.getDependency("accessor", i[c]).then((l) => (o[c] = l, o[c]))
|
|
592
|
-
);
|
|
593
|
-
return a.length < 1 ? null : (a.push(this.parser.createNodeMesh(t)), Promise.all(a).then((c) => {
|
|
594
|
-
const l = c.pop(), u = l.isGroup ? l.children : [l], h = c[0].count, d = [];
|
|
595
|
-
for (const p of u) {
|
|
596
|
-
const T = new B(), m = new D(), g = new ue(), x = new D(1, 1, 1), E = new _e(p.geometry, p.material, h);
|
|
597
|
-
for (let R = 0; R < h; R++)
|
|
598
|
-
o.TRANSLATION && m.fromBufferAttribute(o.TRANSLATION, R), o.ROTATION && g.fromBufferAttribute(o.ROTATION, R), o.SCALE && x.fromBufferAttribute(o.SCALE, R), E.setMatrixAt(R, T.compose(m, g, x));
|
|
599
|
-
for (const R in o)
|
|
600
|
-
if (R === "_COLOR_0") {
|
|
601
|
-
const S = o[R];
|
|
602
|
-
E.instanceColor = new Le(S.array, S.itemSize, S.normalized);
|
|
603
|
-
} else R !== "TRANSLATION" && R !== "ROTATION" && R !== "SCALE" && p.geometry.setAttribute(R, o[R]);
|
|
604
|
-
he.prototype.copy.call(E, p), this.parser.assignFinalMaterial(E), d.push(E);
|
|
605
|
-
}
|
|
606
|
-
return l.isGroup ? (l.clear(), l.add(...d), l) : d[0];
|
|
607
|
-
}));
|
|
608
|
-
}
|
|
609
|
-
}
|
|
610
|
-
const Ae = "glTF", H = 12, re = { JSON: 1313821514, BIN: 5130562 };
|
|
611
|
-
class yt {
|
|
612
|
-
constructor(t) {
|
|
613
|
-
this.name = A.KHR_BINARY_GLTF, this.content = null, this.body = null;
|
|
614
|
-
const e = new DataView(t, 0, H);
|
|
615
|
-
if (this.header = {
|
|
616
|
-
magic: U(new Uint8Array(t.slice(0, 4))),
|
|
617
|
-
version: e.getUint32(4, !0),
|
|
618
|
-
length: e.getUint32(8, !0)
|
|
619
|
-
}, this.header.magic !== Ae)
|
|
620
|
-
throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");
|
|
621
|
-
if (this.header.version < 2)
|
|
622
|
-
throw new Error("THREE.GLTFLoader: Legacy binary file detected.");
|
|
623
|
-
const r = this.header.length - H, s = new DataView(t, H);
|
|
624
|
-
let n = 0;
|
|
625
|
-
for (; n < r; ) {
|
|
626
|
-
const i = s.getUint32(n, !0);
|
|
627
|
-
n += 4;
|
|
628
|
-
const a = s.getUint32(n, !0);
|
|
629
|
-
if (n += 4, a === re.JSON) {
|
|
630
|
-
const o = new Uint8Array(t, H + n, i);
|
|
631
|
-
this.content = U(o);
|
|
632
|
-
} else if (a === re.BIN) {
|
|
633
|
-
const o = H + n;
|
|
634
|
-
this.body = t.slice(o, o + i);
|
|
635
|
-
}
|
|
636
|
-
n += i;
|
|
637
|
-
}
|
|
638
|
-
if (this.content === null)
|
|
639
|
-
throw new Error("THREE.GLTFLoader: JSON content not found.");
|
|
640
|
-
}
|
|
641
|
-
}
|
|
642
|
-
class Mt {
|
|
643
|
-
constructor(t, e) {
|
|
644
|
-
if (!e)
|
|
645
|
-
throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");
|
|
646
|
-
this.name = A.KHR_DRACO_MESH_COMPRESSION, this.json = t, this.dracoLoader = e, this.dracoLoader.preload();
|
|
647
|
-
}
|
|
648
|
-
decodePrimitive(t, e) {
|
|
649
|
-
const r = this.json, s = this.dracoLoader, n = t.extensions[this.name].bufferView, i = t.extensions[this.name].attributes, a = {}, o = {}, c = {};
|
|
650
|
-
for (const l in i) {
|
|
651
|
-
const u = Q[l] || l.toLowerCase();
|
|
652
|
-
a[u] = i[l];
|
|
653
|
-
}
|
|
654
|
-
for (const l in t.attributes) {
|
|
655
|
-
const u = Q[l] || l.toLowerCase();
|
|
656
|
-
if (i[l] !== void 0) {
|
|
657
|
-
const h = r.accessors[t.attributes[l]], d = F[h.componentType];
|
|
658
|
-
c[u] = d.name, o[u] = h.normalized === !0;
|
|
659
|
-
}
|
|
660
|
-
}
|
|
661
|
-
return e.getDependency("bufferView", n).then(function(l) {
|
|
662
|
-
return new Promise(function(u, h) {
|
|
663
|
-
s.decodeDracoFile(
|
|
664
|
-
l,
|
|
665
|
-
function(d) {
|
|
666
|
-
for (const p in d.attributes) {
|
|
667
|
-
const T = d.attributes[p], m = o[p];
|
|
668
|
-
m !== void 0 && (T.normalized = m);
|
|
669
|
-
}
|
|
670
|
-
u(d);
|
|
671
|
-
},
|
|
672
|
-
a,
|
|
673
|
-
c,
|
|
674
|
-
v,
|
|
675
|
-
h
|
|
676
|
-
);
|
|
677
|
-
});
|
|
678
|
-
});
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
class vt {
|
|
682
|
-
constructor() {
|
|
683
|
-
this.name = A.KHR_TEXTURE_TRANSFORM;
|
|
684
|
-
}
|
|
685
|
-
extendTexture(t, e) {
|
|
686
|
-
return (e.texCoord === void 0 || e.texCoord === t.channel) && e.offset === void 0 && e.rotation === void 0 && e.scale === void 0 || (t = t.clone(), e.texCoord !== void 0 && (t.channel = e.texCoord), e.offset !== void 0 && t.offset.fromArray(e.offset), e.rotation !== void 0 && (t.rotation = e.rotation), e.scale !== void 0 && t.repeat.fromArray(e.scale), t.needsUpdate = !0), t;
|
|
687
|
-
}
|
|
688
|
-
}
|
|
689
|
-
class wt {
|
|
690
|
-
constructor() {
|
|
691
|
-
this.name = A.KHR_MESH_QUANTIZATION;
|
|
692
|
-
}
|
|
693
|
-
}
|
|
694
|
-
class ge extends $e {
|
|
695
|
-
constructor(t, e, r, s) {
|
|
696
|
-
super(t, e, r, s);
|
|
697
|
-
}
|
|
698
|
-
copySampleValue_(t) {
|
|
699
|
-
const e = this.resultBuffer, r = this.sampleValues, s = this.valueSize, n = t * s * 3 + s;
|
|
700
|
-
for (let i = 0; i !== s; i++)
|
|
701
|
-
e[i] = r[n + i];
|
|
702
|
-
return e;
|
|
703
|
-
}
|
|
704
|
-
interpolate_(t, e, r, s) {
|
|
705
|
-
const n = this.resultBuffer, i = this.sampleValues, a = this.valueSize, o = a * 2, c = a * 3, l = s - e, u = (r - e) / l, h = u * u, d = h * u, p = t * c, T = p - c, m = -2 * d + 3 * h, g = d - h, x = 1 - m, E = g - h + u;
|
|
706
|
-
for (let R = 0; R !== a; R++) {
|
|
707
|
-
const S = i[T + R + a], w = i[T + R + o] * l, L = i[p + R + a], P = i[p + R] * l;
|
|
708
|
-
n[R] = x * S + E * w + m * L + g * P;
|
|
709
|
-
}
|
|
710
|
-
return n;
|
|
711
|
-
}
|
|
712
|
-
}
|
|
713
|
-
const bt = /* @__PURE__ */ new ue();
|
|
714
|
-
class Nt extends ge {
|
|
715
|
-
interpolate_(t, e, r, s) {
|
|
716
|
-
const n = super.interpolate_(t, e, r, s);
|
|
717
|
-
return bt.fromArray(n).normalize().toArray(n), n;
|
|
718
|
-
}
|
|
719
|
-
}
|
|
720
|
-
const _ = {
|
|
721
|
-
POINTS: 0,
|
|
722
|
-
LINES: 1,
|
|
723
|
-
LINE_LOOP: 2,
|
|
724
|
-
LINE_STRIP: 3,
|
|
725
|
-
TRIANGLES: 4,
|
|
726
|
-
TRIANGLE_STRIP: 5,
|
|
727
|
-
TRIANGLE_FAN: 6
|
|
728
|
-
}, F = {
|
|
729
|
-
5120: Int8Array,
|
|
730
|
-
5121: Uint8Array,
|
|
731
|
-
5122: Int16Array,
|
|
732
|
-
5123: Uint16Array,
|
|
733
|
-
5125: Uint32Array,
|
|
734
|
-
5126: Float32Array
|
|
735
|
-
}, ie = {
|
|
736
|
-
9728: Ne,
|
|
737
|
-
9729: de,
|
|
738
|
-
9984: be,
|
|
739
|
-
9985: we,
|
|
740
|
-
9986: ve,
|
|
741
|
-
9987: fe
|
|
742
|
-
}, oe = {
|
|
743
|
-
33071: Oe,
|
|
744
|
-
33648: Ie,
|
|
745
|
-
10497: Y
|
|
746
|
-
}, z = {
|
|
747
|
-
SCALAR: 1,
|
|
748
|
-
VEC2: 2,
|
|
749
|
-
VEC3: 3,
|
|
750
|
-
VEC4: 4,
|
|
751
|
-
MAT2: 4,
|
|
752
|
-
MAT3: 9,
|
|
753
|
-
MAT4: 16
|
|
754
|
-
}, Q = {
|
|
755
|
-
POSITION: "position",
|
|
756
|
-
NORMAL: "normal",
|
|
757
|
-
TANGENT: "tangent",
|
|
758
|
-
// uv => uv1, 4 uv channels
|
|
759
|
-
// https://github.com/mrdoob/three.js/pull/25943
|
|
760
|
-
// https://github.com/mrdoob/three.js/pull/25788
|
|
761
|
-
...rt >= 152 ? {
|
|
762
|
-
TEXCOORD_0: "uv",
|
|
763
|
-
TEXCOORD_1: "uv1",
|
|
764
|
-
TEXCOORD_2: "uv2",
|
|
765
|
-
TEXCOORD_3: "uv3"
|
|
766
|
-
} : {
|
|
767
|
-
TEXCOORD_0: "uv",
|
|
768
|
-
TEXCOORD_1: "uv2"
|
|
769
|
-
},
|
|
770
|
-
COLOR_0: "color",
|
|
771
|
-
WEIGHTS_0: "skinWeight",
|
|
772
|
-
JOINTS_0: "skinIndex"
|
|
773
|
-
}, N = {
|
|
774
|
-
scale: "scale",
|
|
775
|
-
translation: "position",
|
|
776
|
-
rotation: "quaternion",
|
|
777
|
-
weights: "morphTargetInfluences"
|
|
778
|
-
}, It = {
|
|
779
|
-
CUBICSPLINE: void 0,
|
|
780
|
-
// We use a custom interpolant (GLTFCubicSplineInterpolation) for CUBICSPLINE tracks. Each
|
|
781
|
-
// keyframe track will be initialized with a default interpolation type, then modified.
|
|
782
|
-
LINEAR: me,
|
|
783
|
-
STEP: Qe
|
|
784
|
-
}, q = {
|
|
785
|
-
OPAQUE: "OPAQUE",
|
|
786
|
-
MASK: "MASK",
|
|
787
|
-
BLEND: "BLEND"
|
|
788
|
-
};
|
|
789
|
-
function Ot(f) {
|
|
790
|
-
return f.DefaultMaterial === void 0 && (f.DefaultMaterial = new pe({
|
|
791
|
-
color: 16777215,
|
|
792
|
-
emissive: 0,
|
|
793
|
-
metalness: 1,
|
|
794
|
-
roughness: 1,
|
|
795
|
-
transparent: !1,
|
|
796
|
-
depthTest: !0,
|
|
797
|
-
side: Je
|
|
798
|
-
})), f.DefaultMaterial;
|
|
799
|
-
}
|
|
800
|
-
function I(f, t, e) {
|
|
801
|
-
for (const r in e.extensions)
|
|
802
|
-
f[r] === void 0 && (t.userData.gltfExtensions = t.userData.gltfExtensions || {}, t.userData.gltfExtensions[r] = e.extensions[r]);
|
|
803
|
-
}
|
|
804
|
-
function M(f, t) {
|
|
805
|
-
t.extras !== void 0 && (typeof t.extras == "object" ? Object.assign(f.userData, t.extras) : console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, " + t.extras));
|
|
806
|
-
}
|
|
807
|
-
function Ct(f, t, e) {
|
|
808
|
-
let r = !1, s = !1, n = !1;
|
|
809
|
-
for (let c = 0, l = t.length; c < l; c++) {
|
|
810
|
-
const u = t[c];
|
|
811
|
-
if (u.POSITION !== void 0 && (r = !0), u.NORMAL !== void 0 && (s = !0), u.COLOR_0 !== void 0 && (n = !0), r && s && n)
|
|
812
|
-
break;
|
|
813
|
-
}
|
|
814
|
-
if (!r && !s && !n)
|
|
815
|
-
return Promise.resolve(f);
|
|
816
|
-
const i = [], a = [], o = [];
|
|
817
|
-
for (let c = 0, l = t.length; c < l; c++) {
|
|
818
|
-
const u = t[c];
|
|
819
|
-
if (r) {
|
|
820
|
-
const h = u.POSITION !== void 0 ? e.getDependency("accessor", u.POSITION) : f.attributes.position;
|
|
821
|
-
i.push(h);
|
|
822
|
-
}
|
|
823
|
-
if (s) {
|
|
824
|
-
const h = u.NORMAL !== void 0 ? e.getDependency("accessor", u.NORMAL) : f.attributes.normal;
|
|
825
|
-
a.push(h);
|
|
826
|
-
}
|
|
827
|
-
if (n) {
|
|
828
|
-
const h = u.COLOR_0 !== void 0 ? e.getDependency("accessor", u.COLOR_0) : f.attributes.color;
|
|
829
|
-
o.push(h);
|
|
830
|
-
}
|
|
831
|
-
}
|
|
832
|
-
return Promise.all([
|
|
833
|
-
Promise.all(i),
|
|
834
|
-
Promise.all(a),
|
|
835
|
-
Promise.all(o)
|
|
836
|
-
]).then(function(c) {
|
|
837
|
-
const l = c[0], u = c[1], h = c[2];
|
|
838
|
-
return r && (f.morphAttributes.position = l), s && (f.morphAttributes.normal = u), n && (f.morphAttributes.color = h), f.morphTargetsRelative = !0, f;
|
|
839
|
-
});
|
|
840
|
-
}
|
|
841
|
-
function Dt(f, t) {
|
|
842
|
-
if (f.updateMorphTargets(), t.weights !== void 0)
|
|
843
|
-
for (let e = 0, r = t.weights.length; e < r; e++)
|
|
844
|
-
f.morphTargetInfluences[e] = t.weights[e];
|
|
845
|
-
if (t.extras && Array.isArray(t.extras.targetNames)) {
|
|
846
|
-
const e = t.extras.targetNames;
|
|
847
|
-
if (f.morphTargetInfluences.length === e.length) {
|
|
848
|
-
f.morphTargetDictionary = {};
|
|
849
|
-
for (let r = 0, s = e.length; r < s; r++)
|
|
850
|
-
f.morphTargetDictionary[e[r]] = r;
|
|
851
|
-
} else
|
|
852
|
-
console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.");
|
|
853
|
-
}
|
|
854
|
-
}
|
|
855
|
-
function Ft(f) {
|
|
856
|
-
let t;
|
|
857
|
-
const e = f.extensions && f.extensions[A.KHR_DRACO_MESH_COMPRESSION];
|
|
858
|
-
if (e ? t = "draco:" + e.bufferView + ":" + e.indices + ":" + W(e.attributes) : t = f.indices + ":" + W(f.attributes) + ":" + f.mode, f.targets !== void 0)
|
|
859
|
-
for (let r = 0, s = f.targets.length; r < s; r++)
|
|
860
|
-
t += ":" + W(f.targets[r]);
|
|
861
|
-
return t;
|
|
862
|
-
}
|
|
863
|
-
function W(f) {
|
|
864
|
-
let t = "";
|
|
865
|
-
const e = Object.keys(f).sort();
|
|
866
|
-
for (let r = 0, s = e.length; r < s; r++)
|
|
867
|
-
t += e[r] + ":" + f[e[r]] + ";";
|
|
868
|
-
return t;
|
|
869
|
-
}
|
|
870
|
-
function Z(f) {
|
|
871
|
-
switch (f) {
|
|
872
|
-
case Int8Array:
|
|
873
|
-
return 1 / 127;
|
|
874
|
-
case Uint8Array:
|
|
875
|
-
return 1 / 255;
|
|
876
|
-
case Int16Array:
|
|
877
|
-
return 1 / 32767;
|
|
878
|
-
case Uint16Array:
|
|
879
|
-
return 1 / 65535;
|
|
880
|
-
default:
|
|
881
|
-
throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.");
|
|
882
|
-
}
|
|
883
|
-
}
|
|
884
|
-
function Pt(f) {
|
|
885
|
-
return f.search(/\.jpe?g($|\?)/i) > 0 || f.search(/^data\:image\/jpeg/) === 0 ? "image/jpeg" : f.search(/\.webp($|\?)/i) > 0 || f.search(/^data\:image\/webp/) === 0 ? "image/webp" : "image/png";
|
|
886
|
-
}
|
|
887
|
-
const Ht = /* @__PURE__ */ new B();
|
|
888
|
-
class kt {
|
|
889
|
-
constructor(t = {}, e = {}) {
|
|
890
|
-
this.json = t, this.extensions = {}, this.plugins = {}, this.options = e, this.cache = new ot(), this.associations = /* @__PURE__ */ new Map(), this.primitiveCache = {}, this.nodeCache = {}, this.meshCache = { refs: {}, uses: {} }, this.cameraCache = { refs: {}, uses: {} }, this.lightCache = { refs: {}, uses: {} }, this.sourceCache = {}, this.textureCache = {}, this.nodeNamesUsed = {};
|
|
891
|
-
let r = !1, s = !1, n = -1;
|
|
892
|
-
typeof navigator < "u" && typeof navigator.userAgent < "u" && (r = /^((?!chrome|android).)*safari/i.test(navigator.userAgent) === !0, s = navigator.userAgent.indexOf("Firefox") > -1, n = s ? navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1] : -1), typeof createImageBitmap > "u" || r || s && n < 98 ? this.textureLoader = new Se(this.options.manager) : this.textureLoader = new ye(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new ce(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
|
|
893
|
-
}
|
|
894
|
-
setExtensions(t) {
|
|
895
|
-
this.extensions = t;
|
|
896
|
-
}
|
|
897
|
-
setPlugins(t) {
|
|
898
|
-
this.plugins = t;
|
|
899
|
-
}
|
|
900
|
-
parse(t, e) {
|
|
901
|
-
const r = this, s = this.json, n = this.extensions;
|
|
902
|
-
this.cache.removeAll(), this.nodeCache = {}, this._invokeAll(function(i) {
|
|
903
|
-
return i._markDefs && i._markDefs();
|
|
904
|
-
}), Promise.all(
|
|
905
|
-
this._invokeAll(function(i) {
|
|
906
|
-
return i.beforeRoot && i.beforeRoot();
|
|
907
|
-
})
|
|
908
|
-
).then(function() {
|
|
909
|
-
return Promise.all([
|
|
910
|
-
r.getDependencies("scene"),
|
|
911
|
-
r.getDependencies("animation"),
|
|
912
|
-
r.getDependencies("camera")
|
|
913
|
-
]);
|
|
914
|
-
}).then(function(i) {
|
|
915
|
-
const a = {
|
|
916
|
-
scene: i[0][s.scene || 0],
|
|
917
|
-
scenes: i[0],
|
|
918
|
-
animations: i[1],
|
|
919
|
-
cameras: i[2],
|
|
920
|
-
asset: s.asset,
|
|
921
|
-
parser: r,
|
|
922
|
-
userData: {}
|
|
923
|
-
};
|
|
924
|
-
return I(n, a, s), M(a, s), Promise.all(
|
|
925
|
-
r._invokeAll(function(o) {
|
|
926
|
-
return o.afterRoot && o.afterRoot(a);
|
|
927
|
-
})
|
|
928
|
-
).then(function() {
|
|
929
|
-
for (const o of a.scenes)
|
|
930
|
-
o.updateMatrixWorld();
|
|
931
|
-
t(a);
|
|
932
|
-
});
|
|
933
|
-
}).catch(e);
|
|
934
|
-
}
|
|
935
|
-
/**
|
|
936
|
-
* Marks the special nodes/meshes in json for efficient parse.
|
|
937
|
-
*/
|
|
938
|
-
_markDefs() {
|
|
939
|
-
const t = this.json.nodes || [], e = this.json.skins || [], r = this.json.meshes || [];
|
|
940
|
-
for (let s = 0, n = e.length; s < n; s++) {
|
|
941
|
-
const i = e[s].joints;
|
|
942
|
-
for (let a = 0, o = i.length; a < o; a++)
|
|
943
|
-
t[i[a]].isBone = !0;
|
|
944
|
-
}
|
|
945
|
-
for (let s = 0, n = t.length; s < n; s++) {
|
|
946
|
-
const i = t[s];
|
|
947
|
-
i.mesh !== void 0 && (this._addNodeRef(this.meshCache, i.mesh), i.skin !== void 0 && (r[i.mesh].isSkinnedMesh = !0)), i.camera !== void 0 && this._addNodeRef(this.cameraCache, i.camera);
|
|
948
|
-
}
|
|
949
|
-
}
|
|
950
|
-
/**
|
|
951
|
-
* Counts references to shared node / Object3D resources. These resources
|
|
952
|
-
* can be reused, or "instantiated", at multiple nodes in the scene
|
|
953
|
-
* hierarchy. Mesh, Camera, and Light instances are instantiated and must
|
|
954
|
-
* be marked. Non-scenegraph resources (like Materials, Geometries, and
|
|
955
|
-
* Textures) can be reused directly and are not marked here.
|
|
956
|
-
*
|
|
957
|
-
* Example: CesiumMilkTruck sample model reuses "Wheel" meshes.
|
|
958
|
-
*/
|
|
959
|
-
_addNodeRef(t, e) {
|
|
960
|
-
e !== void 0 && (t.refs[e] === void 0 && (t.refs[e] = t.uses[e] = 0), t.refs[e]++);
|
|
961
|
-
}
|
|
962
|
-
/** Returns a reference to a shared resource, cloning it if necessary. */
|
|
963
|
-
_getNodeRef(t, e, r) {
|
|
964
|
-
if (t.refs[e] <= 1)
|
|
965
|
-
return r;
|
|
966
|
-
const s = r.clone(), n = (i, a) => {
|
|
967
|
-
const o = this.associations.get(i);
|
|
968
|
-
o != null && this.associations.set(a, o);
|
|
969
|
-
for (const [c, l] of i.children.entries())
|
|
970
|
-
n(l, a.children[c]);
|
|
971
|
-
};
|
|
972
|
-
return n(r, s), s.name += "_instance_" + t.uses[e]++, s;
|
|
973
|
-
}
|
|
974
|
-
_invokeOne(t) {
|
|
975
|
-
const e = Object.values(this.plugins);
|
|
976
|
-
e.push(this);
|
|
977
|
-
for (let r = 0; r < e.length; r++) {
|
|
978
|
-
const s = t(e[r]);
|
|
979
|
-
if (s)
|
|
980
|
-
return s;
|
|
981
|
-
}
|
|
982
|
-
return null;
|
|
983
|
-
}
|
|
984
|
-
_invokeAll(t) {
|
|
985
|
-
const e = Object.values(this.plugins);
|
|
986
|
-
e.unshift(this);
|
|
987
|
-
const r = [];
|
|
988
|
-
for (let s = 0; s < e.length; s++) {
|
|
989
|
-
const n = t(e[s]);
|
|
990
|
-
n && r.push(n);
|
|
991
|
-
}
|
|
992
|
-
return r;
|
|
993
|
-
}
|
|
994
|
-
/**
|
|
995
|
-
* Requests the specified dependency asynchronously, with caching.
|
|
996
|
-
* @param {string} type
|
|
997
|
-
* @param {number} index
|
|
998
|
-
* @return {Promise<Object3D|Material|THREE.Texture|AnimationClip|ArrayBuffer|Object>}
|
|
999
|
-
*/
|
|
1000
|
-
getDependency(t, e) {
|
|
1001
|
-
const r = t + ":" + e;
|
|
1002
|
-
let s = this.cache.get(r);
|
|
1003
|
-
if (!s) {
|
|
1004
|
-
switch (t) {
|
|
1005
|
-
case "scene":
|
|
1006
|
-
s = this.loadScene(e);
|
|
1007
|
-
break;
|
|
1008
|
-
case "node":
|
|
1009
|
-
s = this._invokeOne(function(n) {
|
|
1010
|
-
return n.loadNode && n.loadNode(e);
|
|
1011
|
-
});
|
|
1012
|
-
break;
|
|
1013
|
-
case "mesh":
|
|
1014
|
-
s = this._invokeOne(function(n) {
|
|
1015
|
-
return n.loadMesh && n.loadMesh(e);
|
|
1016
|
-
});
|
|
1017
|
-
break;
|
|
1018
|
-
case "accessor":
|
|
1019
|
-
s = this.loadAccessor(e);
|
|
1020
|
-
break;
|
|
1021
|
-
case "bufferView":
|
|
1022
|
-
s = this._invokeOne(function(n) {
|
|
1023
|
-
return n.loadBufferView && n.loadBufferView(e);
|
|
1024
|
-
});
|
|
1025
|
-
break;
|
|
1026
|
-
case "buffer":
|
|
1027
|
-
s = this.loadBuffer(e);
|
|
1028
|
-
break;
|
|
1029
|
-
case "material":
|
|
1030
|
-
s = this._invokeOne(function(n) {
|
|
1031
|
-
return n.loadMaterial && n.loadMaterial(e);
|
|
1032
|
-
});
|
|
1033
|
-
break;
|
|
1034
|
-
case "texture":
|
|
1035
|
-
s = this._invokeOne(function(n) {
|
|
1036
|
-
return n.loadTexture && n.loadTexture(e);
|
|
1037
|
-
});
|
|
1038
|
-
break;
|
|
1039
|
-
case "skin":
|
|
1040
|
-
s = this.loadSkin(e);
|
|
1041
|
-
break;
|
|
1042
|
-
case "animation":
|
|
1043
|
-
s = this._invokeOne(function(n) {
|
|
1044
|
-
return n.loadAnimation && n.loadAnimation(e);
|
|
1045
|
-
});
|
|
1046
|
-
break;
|
|
1047
|
-
case "camera":
|
|
1048
|
-
s = this.loadCamera(e);
|
|
1049
|
-
break;
|
|
1050
|
-
default:
|
|
1051
|
-
if (s = this._invokeOne(function(n) {
|
|
1052
|
-
return n != this && n.getDependency && n.getDependency(t, e);
|
|
1053
|
-
}), !s)
|
|
1054
|
-
throw new Error("Unknown type: " + t);
|
|
1055
|
-
break;
|
|
1056
|
-
}
|
|
1057
|
-
this.cache.add(r, s);
|
|
1058
|
-
}
|
|
1059
|
-
return s;
|
|
1060
|
-
}
|
|
1061
|
-
/**
|
|
1062
|
-
* Requests all dependencies of the specified type asynchronously, with caching.
|
|
1063
|
-
* @param {string} type
|
|
1064
|
-
* @return {Promise<Array<Object>>}
|
|
1065
|
-
*/
|
|
1066
|
-
getDependencies(t) {
|
|
1067
|
-
let e = this.cache.get(t);
|
|
1068
|
-
if (!e) {
|
|
1069
|
-
const r = this, s = this.json[t + (t === "mesh" ? "es" : "s")] || [];
|
|
1070
|
-
e = Promise.all(
|
|
1071
|
-
s.map(function(n, i) {
|
|
1072
|
-
return r.getDependency(t, i);
|
|
1073
|
-
})
|
|
1074
|
-
), this.cache.add(t, e);
|
|
1075
|
-
}
|
|
1076
|
-
return e;
|
|
1077
|
-
}
|
|
1078
|
-
/**
|
|
1079
|
-
* Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#buffers-and-buffer-views
|
|
1080
|
-
* @param {number} bufferIndex
|
|
1081
|
-
* @return {Promise<ArrayBuffer>}
|
|
1082
|
-
*/
|
|
1083
|
-
loadBuffer(t) {
|
|
1084
|
-
const e = this.json.buffers[t], r = this.fileLoader;
|
|
1085
|
-
if (e.type && e.type !== "arraybuffer")
|
|
1086
|
-
throw new Error("THREE.GLTFLoader: " + e.type + " buffer type is not supported.");
|
|
1087
|
-
if (e.uri === void 0 && t === 0)
|
|
1088
|
-
return Promise.resolve(this.extensions[A.KHR_BINARY_GLTF].body);
|
|
1089
|
-
const s = this.options;
|
|
1090
|
-
return new Promise(function(n, i) {
|
|
1091
|
-
r.load(G.resolveURL(e.uri, s.path), n, void 0, function() {
|
|
1092
|
-
i(new Error('THREE.GLTFLoader: Failed to load buffer "' + e.uri + '".'));
|
|
1093
|
-
});
|
|
1094
|
-
});
|
|
1095
|
-
}
|
|
1096
|
-
/**
|
|
1097
|
-
* Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#buffers-and-buffer-views
|
|
1098
|
-
* @param {number} bufferViewIndex
|
|
1099
|
-
* @return {Promise<ArrayBuffer>}
|
|
1100
|
-
*/
|
|
1101
|
-
loadBufferView(t) {
|
|
1102
|
-
const e = this.json.bufferViews[t];
|
|
1103
|
-
return this.getDependency("buffer", e.buffer).then(function(r) {
|
|
1104
|
-
const s = e.byteLength || 0, n = e.byteOffset || 0;
|
|
1105
|
-
return r.slice(n, n + s);
|
|
1106
|
-
});
|
|
1107
|
-
}
|
|
1108
|
-
/**
|
|
1109
|
-
* Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#accessors
|
|
1110
|
-
* @param {number} accessorIndex
|
|
1111
|
-
* @return {Promise<BufferAttribute|InterleavedBufferAttribute>}
|
|
1112
|
-
*/
|
|
1113
|
-
loadAccessor(t) {
|
|
1114
|
-
const e = this, r = this.json, s = this.json.accessors[t];
|
|
1115
|
-
if (s.bufferView === void 0 && s.sparse === void 0) {
|
|
1116
|
-
const i = z[s.type], a = F[s.componentType], o = s.normalized === !0, c = new a(s.count * i);
|
|
1117
|
-
return Promise.resolve(new K(c, i, o));
|
|
1118
|
-
}
|
|
1119
|
-
const n = [];
|
|
1120
|
-
return s.bufferView !== void 0 ? n.push(this.getDependency("bufferView", s.bufferView)) : n.push(null), s.sparse !== void 0 && (n.push(this.getDependency("bufferView", s.sparse.indices.bufferView)), n.push(this.getDependency("bufferView", s.sparse.values.bufferView))), Promise.all(n).then(function(i) {
|
|
1121
|
-
const a = i[0], o = z[s.type], c = F[s.componentType], l = c.BYTES_PER_ELEMENT, u = l * o, h = s.byteOffset || 0, d = s.bufferView !== void 0 ? r.bufferViews[s.bufferView].byteStride : void 0, p = s.normalized === !0;
|
|
1122
|
-
let T, m;
|
|
1123
|
-
if (d && d !== u) {
|
|
1124
|
-
const g = Math.floor(h / d), x = "InterleavedBuffer:" + s.bufferView + ":" + s.componentType + ":" + g + ":" + s.count;
|
|
1125
|
-
let E = e.cache.get(x);
|
|
1126
|
-
E || (T = new c(a, g * d, s.count * d / l), E = new Me(T, d / l), e.cache.add(x, E)), m = new Ze(
|
|
1127
|
-
E,
|
|
1128
|
-
o,
|
|
1129
|
-
h % d / l,
|
|
1130
|
-
p
|
|
1131
|
-
);
|
|
1132
|
-
} else
|
|
1133
|
-
a === null ? T = new c(s.count * o) : T = new c(a, h, s.count * o), m = new K(T, o, p);
|
|
1134
|
-
if (s.sparse !== void 0) {
|
|
1135
|
-
const g = z.SCALAR, x = F[s.sparse.indices.componentType], E = s.sparse.indices.byteOffset || 0, R = s.sparse.values.byteOffset || 0, S = new x(
|
|
1136
|
-
i[1],
|
|
1137
|
-
E,
|
|
1138
|
-
s.sparse.count * g
|
|
1139
|
-
), w = new c(i[2], R, s.sparse.count * o);
|
|
1140
|
-
a !== null && (m = new K(
|
|
1141
|
-
m.array.slice(),
|
|
1142
|
-
m.itemSize,
|
|
1143
|
-
m.normalized
|
|
1144
|
-
));
|
|
1145
|
-
for (let L = 0, P = S.length; L < P; L++) {
|
|
1146
|
-
const b = S[L];
|
|
1147
|
-
if (m.setX(b, w[L * o]), o >= 2 && m.setY(b, w[L * o + 1]), o >= 3 && m.setZ(b, w[L * o + 2]), o >= 4 && m.setW(b, w[L * o + 3]), o >= 5)
|
|
1148
|
-
throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
|
|
1149
|
-
}
|
|
1150
|
-
}
|
|
1151
|
-
return m;
|
|
1152
|
-
});
|
|
1153
|
-
}
|
|
1154
|
-
/**
|
|
1155
|
-
* Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#textures
|
|
1156
|
-
* @param {number} textureIndex
|
|
1157
|
-
* @return {Promise<THREE.Texture|null>}
|
|
1158
|
-
*/
|
|
1159
|
-
loadTexture(t) {
|
|
1160
|
-
const e = this.json, r = this.options, n = e.textures[t].source, i = e.images[n];
|
|
1161
|
-
let a = this.textureLoader;
|
|
1162
|
-
if (i.uri) {
|
|
1163
|
-
const o = r.manager.getHandler(i.uri);
|
|
1164
|
-
o !== null && (a = o);
|
|
1165
|
-
}
|
|
1166
|
-
return this.loadTextureImage(t, n, a);
|
|
1167
|
-
}
|
|
1168
|
-
loadTextureImage(t, e, r) {
|
|
1169
|
-
const s = this, n = this.json, i = n.textures[t], a = n.images[e], o = (a.uri || a.bufferView) + ":" + i.sampler;
|
|
1170
|
-
if (this.textureCache[o])
|
|
1171
|
-
return this.textureCache[o];
|
|
1172
|
-
const c = this.loadImageSource(e, r).then(function(l) {
|
|
1173
|
-
l.flipY = !1, l.name = i.name || a.name || "", l.name === "" && typeof a.uri == "string" && a.uri.startsWith("data:image/") === !1 && (l.name = a.uri);
|
|
1174
|
-
const h = (n.samplers || {})[i.sampler] || {};
|
|
1175
|
-
return l.magFilter = ie[h.magFilter] || de, l.minFilter = ie[h.minFilter] || fe, l.wrapS = oe[h.wrapS] || Y, l.wrapT = oe[h.wrapT] || Y, s.associations.set(l, { textures: t }), l;
|
|
1176
|
-
}).catch(function() {
|
|
1177
|
-
return null;
|
|
1178
|
-
});
|
|
1179
|
-
return this.textureCache[o] = c, c;
|
|
1180
|
-
}
|
|
1181
|
-
loadImageSource(t, e) {
|
|
1182
|
-
const r = this, s = this.json, n = this.options;
|
|
1183
|
-
if (this.sourceCache[t] !== void 0)
|
|
1184
|
-
return this.sourceCache[t].then((u) => u.clone());
|
|
1185
|
-
const i = s.images[t], a = self.URL || self.webkitURL;
|
|
1186
|
-
let o = i.uri || "", c = !1;
|
|
1187
|
-
if (i.bufferView !== void 0)
|
|
1188
|
-
o = r.getDependency("bufferView", i.bufferView).then(function(u) {
|
|
1189
|
-
c = !0;
|
|
1190
|
-
const h = new Blob([u], { type: i.mimeType });
|
|
1191
|
-
return o = a.createObjectURL(h), o;
|
|
1192
|
-
});
|
|
1193
|
-
else if (i.uri === void 0)
|
|
1194
|
-
throw new Error("THREE.GLTFLoader: Image " + t + " is missing URI and bufferView");
|
|
1195
|
-
const l = Promise.resolve(o).then(function(u) {
|
|
1196
|
-
return new Promise(function(h, d) {
|
|
1197
|
-
let p = h;
|
|
1198
|
-
e.isImageBitmapLoader === !0 && (p = function(T) {
|
|
1199
|
-
const m = new J(T);
|
|
1200
|
-
m.needsUpdate = !0, h(m);
|
|
1201
|
-
}), e.load(G.resolveURL(u, n.path), p, void 0, d);
|
|
1202
|
-
});
|
|
1203
|
-
}).then(function(u) {
|
|
1204
|
-
return c === !0 && a.revokeObjectURL(o), M(u, i), u.userData.mimeType = i.mimeType || Pt(i.uri), u;
|
|
1205
|
-
}).catch(function(u) {
|
|
1206
|
-
throw console.error("THREE.GLTFLoader: Couldn't load texture", o), u;
|
|
1207
|
-
});
|
|
1208
|
-
return this.sourceCache[t] = l, l;
|
|
1209
|
-
}
|
|
1210
|
-
/**
|
|
1211
|
-
* Asynchronously assigns a texture to the given material parameters.
|
|
1212
|
-
* @param {Object} materialParams
|
|
1213
|
-
* @param {string} mapName
|
|
1214
|
-
* @param {Object} mapDef
|
|
1215
|
-
* @return {Promise<Texture>}
|
|
1216
|
-
*/
|
|
1217
|
-
assignTexture(t, e, r, s) {
|
|
1218
|
-
const n = this;
|
|
1219
|
-
return this.getDependency("texture", r.index).then(function(i) {
|
|
1220
|
-
if (!i)
|
|
1221
|
-
return null;
|
|
1222
|
-
if (r.texCoord !== void 0 && r.texCoord > 0 && (i = i.clone(), i.channel = r.texCoord), n.extensions[A.KHR_TEXTURE_TRANSFORM]) {
|
|
1223
|
-
const a = r.extensions !== void 0 ? r.extensions[A.KHR_TEXTURE_TRANSFORM] : void 0;
|
|
1224
|
-
if (a) {
|
|
1225
|
-
const o = n.associations.get(i);
|
|
1226
|
-
i = n.extensions[A.KHR_TEXTURE_TRANSFORM].extendTexture(i, a), n.associations.set(i, o);
|
|
1227
|
-
}
|
|
1228
|
-
}
|
|
1229
|
-
return s !== void 0 && (typeof s == "number" && (s = s === ne ? O : v), "colorSpace" in i ? i.colorSpace = s : i.encoding = s === O ? ne : it), t[e] = i, i;
|
|
1230
|
-
});
|
|
1231
|
-
}
|
|
1232
|
-
/**
|
|
1233
|
-
* Assigns final material to a Mesh, Line, or Points instance. The instance
|
|
1234
|
-
* already has a material (generated from the glTF material options alone)
|
|
1235
|
-
* but reuse of the same glTF material may require multiple threejs materials
|
|
1236
|
-
* to accommodate different primitive types, defines, etc. New materials will
|
|
1237
|
-
* be created if necessary, and reused from a cache.
|
|
1238
|
-
* @param {Object3D} mesh Mesh, Line, or Points instance.
|
|
1239
|
-
*/
|
|
1240
|
-
assignFinalMaterial(t) {
|
|
1241
|
-
const e = t.geometry;
|
|
1242
|
-
let r = t.material;
|
|
1243
|
-
const s = e.attributes.tangent === void 0, n = e.attributes.color !== void 0, i = e.attributes.normal === void 0;
|
|
1244
|
-
if (t.isPoints) {
|
|
1245
|
-
const a = "PointsMaterial:" + r.uuid;
|
|
1246
|
-
let o = this.cache.get(a);
|
|
1247
|
-
o || (o = new Ce(), V.prototype.copy.call(o, r), o.color.copy(r.color), o.map = r.map, o.sizeAttenuation = !1, this.cache.add(a, o)), r = o;
|
|
1248
|
-
} else if (t.isLine) {
|
|
1249
|
-
const a = "LineBasicMaterial:" + r.uuid;
|
|
1250
|
-
let o = this.cache.get(a);
|
|
1251
|
-
o || (o = new De(), V.prototype.copy.call(o, r), o.color.copy(r.color), o.map = r.map, this.cache.add(a, o)), r = o;
|
|
1252
|
-
}
|
|
1253
|
-
if (s || n || i) {
|
|
1254
|
-
let a = "ClonedMaterial:" + r.uuid + ":";
|
|
1255
|
-
s && (a += "derivative-tangents:"), n && (a += "vertex-colors:"), i && (a += "flat-shading:");
|
|
1256
|
-
let o = this.cache.get(a);
|
|
1257
|
-
o || (o = r.clone(), n && (o.vertexColors = !0), i && (o.flatShading = !0), s && (o.normalScale && (o.normalScale.y *= -1), o.clearcoatNormalScale && (o.clearcoatNormalScale.y *= -1)), this.cache.add(a, o), this.associations.set(o, this.associations.get(r))), r = o;
|
|
1258
|
-
}
|
|
1259
|
-
t.material = r;
|
|
1260
|
-
}
|
|
1261
|
-
getMaterialType() {
|
|
1262
|
-
return pe;
|
|
1263
|
-
}
|
|
1264
|
-
/**
|
|
1265
|
-
* Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#materials
|
|
1266
|
-
* @param {number} materialIndex
|
|
1267
|
-
* @return {Promise<Material>}
|
|
1268
|
-
*/
|
|
1269
|
-
loadMaterial(t) {
|
|
1270
|
-
const e = this, r = this.json, s = this.extensions, n = r.materials[t];
|
|
1271
|
-
let i;
|
|
1272
|
-
const a = {}, o = n.extensions || {}, c = [];
|
|
1273
|
-
if (o[A.KHR_MATERIALS_UNLIT]) {
|
|
1274
|
-
const u = s[A.KHR_MATERIALS_UNLIT];
|
|
1275
|
-
i = u.getMaterialType(), c.push(u.extendParams(a, n, e));
|
|
1276
|
-
} else {
|
|
1277
|
-
const u = n.pbrMetallicRoughness || {};
|
|
1278
|
-
if (a.color = new C(1, 1, 1), a.opacity = 1, Array.isArray(u.baseColorFactor)) {
|
|
1279
|
-
const h = u.baseColorFactor;
|
|
1280
|
-
a.color.setRGB(h[0], h[1], h[2], v), a.opacity = h[3];
|
|
1281
|
-
}
|
|
1282
|
-
u.baseColorTexture !== void 0 && c.push(e.assignTexture(a, "map", u.baseColorTexture, O)), a.metalness = u.metallicFactor !== void 0 ? u.metallicFactor : 1, a.roughness = u.roughnessFactor !== void 0 ? u.roughnessFactor : 1, u.metallicRoughnessTexture !== void 0 && (c.push(e.assignTexture(a, "metalnessMap", u.metallicRoughnessTexture)), c.push(e.assignTexture(a, "roughnessMap", u.metallicRoughnessTexture))), i = this._invokeOne(function(h) {
|
|
1283
|
-
return h.getMaterialType && h.getMaterialType(t);
|
|
1284
|
-
}), c.push(
|
|
1285
|
-
Promise.all(
|
|
1286
|
-
this._invokeAll(function(h) {
|
|
1287
|
-
return h.extendMaterialParams && h.extendMaterialParams(t, a);
|
|
1288
|
-
})
|
|
1289
|
-
)
|
|
1290
|
-
);
|
|
1291
|
-
}
|
|
1292
|
-
n.doubleSided === !0 && (a.side = Fe);
|
|
1293
|
-
const l = n.alphaMode || q.OPAQUE;
|
|
1294
|
-
if (l === q.BLEND ? (a.transparent = !0, a.depthWrite = !1) : (a.transparent = !1, l === q.MASK && (a.alphaTest = n.alphaCutoff !== void 0 ? n.alphaCutoff : 0.5)), n.normalTexture !== void 0 && i !== k && (c.push(e.assignTexture(a, "normalMap", n.normalTexture)), a.normalScale = new le(1, 1), n.normalTexture.scale !== void 0)) {
|
|
1295
|
-
const u = n.normalTexture.scale;
|
|
1296
|
-
a.normalScale.set(u, u);
|
|
1297
|
-
}
|
|
1298
|
-
if (n.occlusionTexture !== void 0 && i !== k && (c.push(e.assignTexture(a, "aoMap", n.occlusionTexture)), n.occlusionTexture.strength !== void 0 && (a.aoMapIntensity = n.occlusionTexture.strength)), n.emissiveFactor !== void 0 && i !== k) {
|
|
1299
|
-
const u = n.emissiveFactor;
|
|
1300
|
-
a.emissive = new C().setRGB(
|
|
1301
|
-
u[0],
|
|
1302
|
-
u[1],
|
|
1303
|
-
u[2],
|
|
1304
|
-
v
|
|
1305
|
-
);
|
|
1306
|
-
}
|
|
1307
|
-
return n.emissiveTexture !== void 0 && i !== k && c.push(e.assignTexture(a, "emissiveMap", n.emissiveTexture, O)), Promise.all(c).then(function() {
|
|
1308
|
-
const u = new i(a);
|
|
1309
|
-
return n.name && (u.name = n.name), M(u, n), e.associations.set(u, { materials: t }), n.extensions && I(s, u, n), u;
|
|
1310
|
-
});
|
|
1311
|
-
}
|
|
1312
|
-
/** When Object3D instances are targeted by animation, they need unique names. */
|
|
1313
|
-
createUniqueName(t) {
|
|
1314
|
-
const e = Pe.sanitizeNodeName(t || "");
|
|
1315
|
-
return e in this.nodeNamesUsed ? e + "_" + ++this.nodeNamesUsed[e] : (this.nodeNamesUsed[e] = 0, e);
|
|
1316
|
-
}
|
|
1317
|
-
/**
|
|
1318
|
-
* Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#geometry
|
|
1319
|
-
*
|
|
1320
|
-
* Creates BufferGeometries from primitives.
|
|
1321
|
-
*
|
|
1322
|
-
* @param {Array<GLTF.Primitive>} primitives
|
|
1323
|
-
* @return {Promise<Array<BufferGeometry>>}
|
|
1324
|
-
*/
|
|
1325
|
-
loadGeometries(t) {
|
|
1326
|
-
const e = this, r = this.extensions, s = this.primitiveCache;
|
|
1327
|
-
function n(a) {
|
|
1328
|
-
return r[A.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a, e).then(function(o) {
|
|
1329
|
-
return ae(o, a, e);
|
|
1330
|
-
});
|
|
1331
|
-
}
|
|
1332
|
-
const i = [];
|
|
1333
|
-
for (let a = 0, o = t.length; a < o; a++) {
|
|
1334
|
-
const c = t[a], l = Ft(c), u = s[l];
|
|
1335
|
-
if (u)
|
|
1336
|
-
i.push(u.promise);
|
|
1337
|
-
else {
|
|
1338
|
-
let h;
|
|
1339
|
-
c.extensions && c.extensions[A.KHR_DRACO_MESH_COMPRESSION] ? h = n(c) : h = ae(new He(), c, e), s[l] = { primitive: c, promise: h }, i.push(h);
|
|
1340
|
-
}
|
|
1341
|
-
}
|
|
1342
|
-
return Promise.all(i);
|
|
1343
|
-
}
|
|
1344
|
-
/**
|
|
1345
|
-
* Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#meshes
|
|
1346
|
-
* @param {number} meshIndex
|
|
1347
|
-
* @return {Promise<Group|Mesh|SkinnedMesh>}
|
|
1348
|
-
*/
|
|
1349
|
-
loadMesh(t) {
|
|
1350
|
-
const e = this, r = this.json, s = this.extensions, n = r.meshes[t], i = n.primitives, a = [];
|
|
1351
|
-
for (let o = 0, c = i.length; o < c; o++) {
|
|
1352
|
-
const l = i[o].material === void 0 ? Ot(this.cache) : this.getDependency("material", i[o].material);
|
|
1353
|
-
a.push(l);
|
|
1354
|
-
}
|
|
1355
|
-
return a.push(e.loadGeometries(i)), Promise.all(a).then(function(o) {
|
|
1356
|
-
const c = o.slice(0, o.length - 1), l = o[o.length - 1], u = [];
|
|
1357
|
-
for (let d = 0, p = l.length; d < p; d++) {
|
|
1358
|
-
const T = l[d], m = i[d];
|
|
1359
|
-
let g;
|
|
1360
|
-
const x = c[d];
|
|
1361
|
-
if (m.mode === _.TRIANGLES || m.mode === _.TRIANGLE_STRIP || m.mode === _.TRIANGLE_FAN || m.mode === void 0)
|
|
1362
|
-
g = n.isSkinnedMesh === !0 ? new ke(T, x) : new Ge(T, x), g.isSkinnedMesh === !0 && g.normalizeSkinWeights(), m.mode === _.TRIANGLE_STRIP ? g.geometry = se(g.geometry, st) : m.mode === _.TRIANGLE_FAN && (g.geometry = se(g.geometry, nt));
|
|
1363
|
-
else if (m.mode === _.LINES)
|
|
1364
|
-
g = new Be(T, x);
|
|
1365
|
-
else if (m.mode === _.LINE_STRIP)
|
|
1366
|
-
g = new Ue(T, x);
|
|
1367
|
-
else if (m.mode === _.LINE_LOOP)
|
|
1368
|
-
g = new je(T, x);
|
|
1369
|
-
else if (m.mode === _.POINTS)
|
|
1370
|
-
g = new Ke(T, x);
|
|
1371
|
-
else
|
|
1372
|
-
throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + m.mode);
|
|
1373
|
-
Object.keys(g.geometry.morphAttributes).length > 0 && Dt(g, n), g.name = e.createUniqueName(n.name || "mesh_" + t), M(g, n), m.extensions && I(s, g, m), e.assignFinalMaterial(g), u.push(g);
|
|
1374
|
-
}
|
|
1375
|
-
for (let d = 0, p = u.length; d < p; d++)
|
|
1376
|
-
e.associations.set(u[d], {
|
|
1377
|
-
meshes: t,
|
|
1378
|
-
primitives: d
|
|
1379
|
-
});
|
|
1380
|
-
if (u.length === 1)
|
|
1381
|
-
return n.extensions && I(s, u[0], n), u[0];
|
|
1382
|
-
const h = new X();
|
|
1383
|
-
n.extensions && I(s, h, n), e.associations.set(h, { meshes: t });
|
|
1384
|
-
for (let d = 0, p = u.length; d < p; d++)
|
|
1385
|
-
h.add(u[d]);
|
|
1386
|
-
return h;
|
|
1387
|
-
});
|
|
1388
|
-
}
|
|
1389
|
-
/**
|
|
1390
|
-
* Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#cameras
|
|
1391
|
-
* @param {number} cameraIndex
|
|
1392
|
-
* @return {Promise<THREE.Camera>}
|
|
1393
|
-
*/
|
|
1394
|
-
loadCamera(t) {
|
|
1395
|
-
let e;
|
|
1396
|
-
const r = this.json.cameras[t], s = r[r.type];
|
|
1397
|
-
if (!s) {
|
|
1398
|
-
console.warn("THREE.GLTFLoader: Missing camera parameters.");
|
|
1399
|
-
return;
|
|
1400
|
-
}
|
|
1401
|
-
return r.type === "perspective" ? e = new Ve(
|
|
1402
|
-
Xe.radToDeg(s.yfov),
|
|
1403
|
-
s.aspectRatio || 1,
|
|
1404
|
-
s.znear || 1,
|
|
1405
|
-
s.zfar || 2e6
|
|
1406
|
-
) : r.type === "orthographic" && (e = new ze(-s.xmag, s.xmag, s.ymag, -s.ymag, s.znear, s.zfar)), r.name && (e.name = this.createUniqueName(r.name)), M(e, r), Promise.resolve(e);
|
|
1407
|
-
}
|
|
1408
|
-
/**
|
|
1409
|
-
* Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#skins
|
|
1410
|
-
* @param {number} skinIndex
|
|
1411
|
-
* @return {Promise<Skeleton>}
|
|
1412
|
-
*/
|
|
1413
|
-
loadSkin(t) {
|
|
1414
|
-
const e = this.json.skins[t], r = [];
|
|
1415
|
-
for (let s = 0, n = e.joints.length; s < n; s++)
|
|
1416
|
-
r.push(this._loadNodeShallow(e.joints[s]));
|
|
1417
|
-
return e.inverseBindMatrices !== void 0 ? r.push(this.getDependency("accessor", e.inverseBindMatrices)) : r.push(null), Promise.all(r).then(function(s) {
|
|
1418
|
-
const n = s.pop(), i = s, a = [], o = [];
|
|
1419
|
-
for (let c = 0, l = i.length; c < l; c++) {
|
|
1420
|
-
const u = i[c];
|
|
1421
|
-
if (u) {
|
|
1422
|
-
a.push(u);
|
|
1423
|
-
const h = new B();
|
|
1424
|
-
n !== null && h.fromArray(n.array, c * 16), o.push(h);
|
|
1425
|
-
} else
|
|
1426
|
-
console.warn('THREE.GLTFLoader: Joint "%s" could not be found.', e.joints[c]);
|
|
1427
|
-
}
|
|
1428
|
-
return new qe(a, o);
|
|
1429
|
-
});
|
|
1430
|
-
}
|
|
1431
|
-
/**
|
|
1432
|
-
* Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#animations
|
|
1433
|
-
* @param {number} animationIndex
|
|
1434
|
-
* @return {Promise<AnimationClip>}
|
|
1435
|
-
*/
|
|
1436
|
-
loadAnimation(t) {
|
|
1437
|
-
const e = this.json, r = this, s = e.animations[t], n = s.name ? s.name : "animation_" + t, i = [], a = [], o = [], c = [], l = [];
|
|
1438
|
-
for (let u = 0, h = s.channels.length; u < h; u++) {
|
|
1439
|
-
const d = s.channels[u], p = s.samplers[d.sampler], T = d.target, m = T.node, g = s.parameters !== void 0 ? s.parameters[p.input] : p.input, x = s.parameters !== void 0 ? s.parameters[p.output] : p.output;
|
|
1440
|
-
T.node !== void 0 && (i.push(this.getDependency("node", m)), a.push(this.getDependency("accessor", g)), o.push(this.getDependency("accessor", x)), c.push(p), l.push(T));
|
|
1441
|
-
}
|
|
1442
|
-
return Promise.all([
|
|
1443
|
-
Promise.all(i),
|
|
1444
|
-
Promise.all(a),
|
|
1445
|
-
Promise.all(o),
|
|
1446
|
-
Promise.all(c),
|
|
1447
|
-
Promise.all(l)
|
|
1448
|
-
]).then(function(u) {
|
|
1449
|
-
const h = u[0], d = u[1], p = u[2], T = u[3], m = u[4], g = [];
|
|
1450
|
-
for (let x = 0, E = h.length; x < E; x++) {
|
|
1451
|
-
const R = h[x], S = d[x], w = p[x], L = T[x], P = m[x];
|
|
1452
|
-
if (R === void 0)
|
|
1453
|
-
continue;
|
|
1454
|
-
R.updateMatrix && R.updateMatrix();
|
|
1455
|
-
const b = r._createAnimationTracks(R, S, w, L, P);
|
|
1456
|
-
if (b)
|
|
1457
|
-
for (let j = 0; j < b.length; j++)
|
|
1458
|
-
g.push(b[j]);
|
|
1459
|
-
}
|
|
1460
|
-
return new We(n, void 0, g);
|
|
1461
|
-
});
|
|
1462
|
-
}
|
|
1463
|
-
createNodeMesh(t) {
|
|
1464
|
-
const e = this.json, r = this, s = e.nodes[t];
|
|
1465
|
-
return s.mesh === void 0 ? null : r.getDependency("mesh", s.mesh).then(function(n) {
|
|
1466
|
-
const i = r._getNodeRef(r.meshCache, s.mesh, n);
|
|
1467
|
-
return s.weights !== void 0 && i.traverse(function(a) {
|
|
1468
|
-
if (a.isMesh)
|
|
1469
|
-
for (let o = 0, c = s.weights.length; o < c; o++)
|
|
1470
|
-
a.morphTargetInfluences[o] = s.weights[o];
|
|
1471
|
-
}), i;
|
|
1472
|
-
});
|
|
1473
|
-
}
|
|
1474
|
-
/**
|
|
1475
|
-
* Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#nodes-and-hierarchy
|
|
1476
|
-
* @param {number} nodeIndex
|
|
1477
|
-
* @return {Promise<Object3D>}
|
|
1478
|
-
*/
|
|
1479
|
-
loadNode(t) {
|
|
1480
|
-
const e = this.json, r = this, s = e.nodes[t], n = r._loadNodeShallow(t), i = [], a = s.children || [];
|
|
1481
|
-
for (let c = 0, l = a.length; c < l; c++)
|
|
1482
|
-
i.push(r.getDependency("node", a[c]));
|
|
1483
|
-
const o = s.skin === void 0 ? Promise.resolve(null) : r.getDependency("skin", s.skin);
|
|
1484
|
-
return Promise.all([n, Promise.all(i), o]).then(function(c) {
|
|
1485
|
-
const l = c[0], u = c[1], h = c[2];
|
|
1486
|
-
h !== null && l.traverse(function(d) {
|
|
1487
|
-
d.isSkinnedMesh && d.bind(h, Ht);
|
|
1488
|
-
});
|
|
1489
|
-
for (let d = 0, p = u.length; d < p; d++)
|
|
1490
|
-
l.add(u[d]);
|
|
1491
|
-
return l;
|
|
1492
|
-
});
|
|
1493
|
-
}
|
|
1494
|
-
// ._loadNodeShallow() parses a single node.
|
|
1495
|
-
// skin and child nodes are created and added in .loadNode() (no '_' prefix).
|
|
1496
|
-
_loadNodeShallow(t) {
|
|
1497
|
-
const e = this.json, r = this.extensions, s = this;
|
|
1498
|
-
if (this.nodeCache[t] !== void 0)
|
|
1499
|
-
return this.nodeCache[t];
|
|
1500
|
-
const n = e.nodes[t], i = n.name ? s.createUniqueName(n.name) : "", a = [], o = s._invokeOne(function(c) {
|
|
1501
|
-
return c.createNodeMesh && c.createNodeMesh(t);
|
|
1502
|
-
});
|
|
1503
|
-
return o && a.push(o), n.camera !== void 0 && a.push(
|
|
1504
|
-
s.getDependency("camera", n.camera).then(function(c) {
|
|
1505
|
-
return s._getNodeRef(s.cameraCache, n.camera, c);
|
|
1506
|
-
})
|
|
1507
|
-
), s._invokeAll(function(c) {
|
|
1508
|
-
return c.createNodeAttachment && c.createNodeAttachment(t);
|
|
1509
|
-
}).forEach(function(c) {
|
|
1510
|
-
a.push(c);
|
|
1511
|
-
}), this.nodeCache[t] = Promise.all(a).then(function(c) {
|
|
1512
|
-
let l;
|
|
1513
|
-
if (n.isBone === !0 ? l = new Ye() : c.length > 1 ? l = new X() : c.length === 1 ? l = c[0] : l = new he(), l !== c[0])
|
|
1514
|
-
for (let u = 0, h = c.length; u < h; u++)
|
|
1515
|
-
l.add(c[u]);
|
|
1516
|
-
if (n.name && (l.userData.name = n.name, l.name = i), M(l, n), n.extensions && I(r, l, n), n.matrix !== void 0) {
|
|
1517
|
-
const u = new B();
|
|
1518
|
-
u.fromArray(n.matrix), l.applyMatrix4(u);
|
|
1519
|
-
} else
|
|
1520
|
-
n.translation !== void 0 && l.position.fromArray(n.translation), n.rotation !== void 0 && l.quaternion.fromArray(n.rotation), n.scale !== void 0 && l.scale.fromArray(n.scale);
|
|
1521
|
-
return s.associations.has(l) || s.associations.set(l, {}), s.associations.get(l).nodes = t, l;
|
|
1522
|
-
}), this.nodeCache[t];
|
|
1523
|
-
}
|
|
1524
|
-
/**
|
|
1525
|
-
* Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#scenes
|
|
1526
|
-
* @param {number} sceneIndex
|
|
1527
|
-
* @return {Promise<Group>}
|
|
1528
|
-
*/
|
|
1529
|
-
loadScene(t) {
|
|
1530
|
-
const e = this.extensions, r = this.json.scenes[t], s = this, n = new X();
|
|
1531
|
-
r.name && (n.name = s.createUniqueName(r.name)), M(n, r), r.extensions && I(e, n, r);
|
|
1532
|
-
const i = r.nodes || [], a = [];
|
|
1533
|
-
for (let o = 0, c = i.length; o < c; o++)
|
|
1534
|
-
a.push(s.getDependency("node", i[o]));
|
|
1535
|
-
return Promise.all(a).then(function(o) {
|
|
1536
|
-
for (let l = 0, u = o.length; l < u; l++)
|
|
1537
|
-
n.add(o[l]);
|
|
1538
|
-
const c = (l) => {
|
|
1539
|
-
const u = /* @__PURE__ */ new Map();
|
|
1540
|
-
for (const [h, d] of s.associations)
|
|
1541
|
-
(h instanceof V || h instanceof J) && u.set(h, d);
|
|
1542
|
-
return l.traverse((h) => {
|
|
1543
|
-
const d = s.associations.get(h);
|
|
1544
|
-
d != null && u.set(h, d);
|
|
1545
|
-
}), u;
|
|
1546
|
-
};
|
|
1547
|
-
return s.associations = c(n), n;
|
|
1548
|
-
});
|
|
1549
|
-
}
|
|
1550
|
-
_createAnimationTracks(t, e, r, s, n) {
|
|
1551
|
-
const i = [], a = t.name ? t.name : t.uuid, o = [];
|
|
1552
|
-
N[n.path] === N.weights ? t.traverse(function(h) {
|
|
1553
|
-
h.morphTargetInfluences && o.push(h.name ? h.name : h.uuid);
|
|
1554
|
-
}) : o.push(a);
|
|
1555
|
-
let c;
|
|
1556
|
-
switch (N[n.path]) {
|
|
1557
|
-
case N.weights:
|
|
1558
|
-
c = ee;
|
|
1559
|
-
break;
|
|
1560
|
-
case N.rotation:
|
|
1561
|
-
c = te;
|
|
1562
|
-
break;
|
|
1563
|
-
case N.position:
|
|
1564
|
-
case N.scale:
|
|
1565
|
-
c = $;
|
|
1566
|
-
break;
|
|
1567
|
-
default:
|
|
1568
|
-
switch (r.itemSize) {
|
|
1569
|
-
case 1:
|
|
1570
|
-
c = ee;
|
|
1571
|
-
break;
|
|
1572
|
-
case 2:
|
|
1573
|
-
case 3:
|
|
1574
|
-
default:
|
|
1575
|
-
c = $;
|
|
1576
|
-
break;
|
|
1577
|
-
}
|
|
1578
|
-
break;
|
|
1579
|
-
}
|
|
1580
|
-
const l = s.interpolation !== void 0 ? It[s.interpolation] : me, u = this._getArrayFromAccessor(r);
|
|
1581
|
-
for (let h = 0, d = o.length; h < d; h++) {
|
|
1582
|
-
const p = new c(
|
|
1583
|
-
o[h] + "." + N[n.path],
|
|
1584
|
-
e.array,
|
|
1585
|
-
u,
|
|
1586
|
-
l
|
|
1587
|
-
);
|
|
1588
|
-
s.interpolation === "CUBICSPLINE" && this._createCubicSplineTrackInterpolant(p), i.push(p);
|
|
1589
|
-
}
|
|
1590
|
-
return i;
|
|
1591
|
-
}
|
|
1592
|
-
_getArrayFromAccessor(t) {
|
|
1593
|
-
let e = t.array;
|
|
1594
|
-
if (t.normalized) {
|
|
1595
|
-
const r = Z(e.constructor), s = new Float32Array(e.length);
|
|
1596
|
-
for (let n = 0, i = e.length; n < i; n++)
|
|
1597
|
-
s[n] = e[n] * r;
|
|
1598
|
-
e = s;
|
|
1599
|
-
}
|
|
1600
|
-
return e;
|
|
1601
|
-
}
|
|
1602
|
-
_createCubicSplineTrackInterpolant(t) {
|
|
1603
|
-
t.createInterpolant = function(r) {
|
|
1604
|
-
const s = this instanceof te ? Nt : ge;
|
|
1605
|
-
return new s(this.times, this.values, this.getValueSize() / 3, r);
|
|
1606
|
-
}, t.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline = !0;
|
|
1607
|
-
}
|
|
1608
|
-
}
|
|
1609
|
-
function Gt(f, t, e) {
|
|
1610
|
-
const r = t.attributes, s = new et();
|
|
1611
|
-
if (r.POSITION !== void 0) {
|
|
1612
|
-
const a = e.json.accessors[r.POSITION], o = a.min, c = a.max;
|
|
1613
|
-
if (o !== void 0 && c !== void 0) {
|
|
1614
|
-
if (s.set(new D(o[0], o[1], o[2]), new D(c[0], c[1], c[2])), a.normalized) {
|
|
1615
|
-
const l = Z(F[a.componentType]);
|
|
1616
|
-
s.min.multiplyScalar(l), s.max.multiplyScalar(l);
|
|
1617
|
-
}
|
|
1618
|
-
} else {
|
|
1619
|
-
console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");
|
|
1620
|
-
return;
|
|
1621
|
-
}
|
|
1622
|
-
} else
|
|
1623
|
-
return;
|
|
1624
|
-
const n = t.targets;
|
|
1625
|
-
if (n !== void 0) {
|
|
1626
|
-
const a = new D(), o = new D();
|
|
1627
|
-
for (let c = 0, l = n.length; c < l; c++) {
|
|
1628
|
-
const u = n[c];
|
|
1629
|
-
if (u.POSITION !== void 0) {
|
|
1630
|
-
const h = e.json.accessors[u.POSITION], d = h.min, p = h.max;
|
|
1631
|
-
if (d !== void 0 && p !== void 0) {
|
|
1632
|
-
if (o.setX(Math.max(Math.abs(d[0]), Math.abs(p[0]))), o.setY(Math.max(Math.abs(d[1]), Math.abs(p[1]))), o.setZ(Math.max(Math.abs(d[2]), Math.abs(p[2]))), h.normalized) {
|
|
1633
|
-
const T = Z(F[h.componentType]);
|
|
1634
|
-
o.multiplyScalar(T);
|
|
1635
|
-
}
|
|
1636
|
-
a.max(o);
|
|
1637
|
-
} else
|
|
1638
|
-
console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");
|
|
1639
|
-
}
|
|
1640
|
-
}
|
|
1641
|
-
s.expandByVector(a);
|
|
1642
|
-
}
|
|
1643
|
-
f.boundingBox = s;
|
|
1644
|
-
const i = new tt();
|
|
1645
|
-
s.getCenter(i.center), i.radius = s.min.distanceTo(s.max) / 2, f.boundingSphere = i;
|
|
1646
|
-
}
|
|
1647
|
-
function ae(f, t, e) {
|
|
1648
|
-
const r = t.attributes, s = [];
|
|
1649
|
-
function n(i, a) {
|
|
1650
|
-
return e.getDependency("accessor", i).then(function(o) {
|
|
1651
|
-
f.setAttribute(a, o);
|
|
1652
|
-
});
|
|
1653
|
-
}
|
|
1654
|
-
for (const i in r) {
|
|
1655
|
-
const a = Q[i] || i.toLowerCase();
|
|
1656
|
-
a in f.attributes || s.push(n(r[i], a));
|
|
1657
|
-
}
|
|
1658
|
-
if (t.indices !== void 0 && !f.index) {
|
|
1659
|
-
const i = e.getDependency("accessor", t.indices).then(function(a) {
|
|
1660
|
-
f.setIndex(a);
|
|
1661
|
-
});
|
|
1662
|
-
s.push(i);
|
|
1663
|
-
}
|
|
1664
|
-
return M(f, t), Gt(f, t, e), Promise.all(s).then(function() {
|
|
1665
|
-
return t.targets !== void 0 ? Ct(f, t.targets, e) : f;
|
|
1666
|
-
});
|
|
1667
|
-
}
|
|
1668
|
-
export {
|
|
1669
|
-
Vt as GLTFLoader
|
|
1670
|
-
};
|